| | |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button type="primary" icon="el-icon-menu" @click="workingTramClick">生产班组</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>--> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="usercode" |
| | | label="用户编码" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="username" |
| | | label="用户名称" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="password" |
| | | label="用户密码" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="org_name" |
| | | label="所属组织" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="group_name" |
| | | label="生产班组" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wagetype" |
| | | label="工资类型" |
| | | sortable="custom" |
| | | width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.wagetype==='1'">计时制</div> |
| | |
| | | <el-table-column |
| | | prop="mobile" |
| | | label="联系方式" |
| | | min-width="110" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | prop="email" |
| | | label="电子邮箱" |
| | | sortable="custom" |
| | | min-width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.email===''">/</div> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="" |
| | | prop="enable" |
| | | label="在职状态" |
| | | width="110" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | <el-table-column |
| | | prop="lm_user" |
| | | label="创建人员" |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | width="200" |
| | | width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="is_role" |
| | | label="关联角色" |
| | | width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <i class="el-icon-share" @click="roleClick({row})" /> |
| | | <i v-if="row.is_role==='Y'" class="el-icon-share" @click="roleClick({row})" /> |
| | | <i v-if="row.is_role==='N'" class="el-icon-share" style="color: rgb(180 ,181, 185)" @click="roleClick({row})" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | fixed="right" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | |
| | | title="关联角色" |
| | | :visible.sync="dialogVisibleRoles" |
| | | width="800px" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | | :top="isIpad?'3vh':'15vh'" |
| | | :fullscreen="isIpad" |
| | | :close-on-click-modal="false" |
| | | class="dialogVisibleRoles" |
| | | @closed="handleCloseRoles" |
| | |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!--导入组件--> |
| | | <import-picker ref="importPickerFunc" :shows.sync="shows" :title="title_value" :colos="colos" :code="code" /> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | |
| | | import { |
| | | AddUpdateUser, |
| | | DeleteUser, |
| | | RoleTypeAdd, |
| | | RoleTypeDelete, |
| | | SaveUserAssoctRole, |
| | | UserAssociationRole, |
| | | UserGroupAdd, |
| | |
| | | export default { |
| | | name: 'YYQD', |
| | | components: { |
| | | Pagination |
| | | Pagination, ImportPicker |
| | | }, |
| | | data() { |
| | | const validateName = (rule, value, callback) => { |
| | |
| | | } |
| | | |
| | | return { |
| | | isFullscreen: false, |
| | | isIpad: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | |
| | | UserCode: '', |
| | | UserName: '', |
| | | Password: '', |
| | | Enable: '', |
| | | Enable: 'Y', |
| | | StuOrg: '', |
| | | Mobile: '', |
| | | Email: '', |
| | |
| | | page: 1, |
| | | prop: 'group_code', |
| | | order: 'desc' |
| | | }, |
| | | |
| | | title_value: '数据导入 / 用户清单', |
| | | code: '2', |
| | | shows: false |
| | | } |
| | | }, |
| | | watch: { |
| | | shows() { |
| | | if (!this.shows) { |
| | | this.getUserSearch() |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getUserSearch() |
| | | this.getUserOrganization() |
| | | this.handleRequest() |
| | | }, |
| | | |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | handleRequest() { |
| | | this.getUserSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getUserOrganization() |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 获取用户清单 |
| | | async getUserSearch() { |
| | | const res = await UserSearch(this.form) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | return { code: res.code } |
| | | }, |
| | | // 获取所属组织 |
| | | async getUserOrganization() { |
| | |
| | | }, |
| | | // 导入按钮 |
| | | upload() { |
| | | |
| | | this.shows = true |
| | | this.$refs.importPickerFunc.newDataFunc() |
| | | }, |
| | | colos() { |
| | | this.shows = false |
| | | }, |
| | | // 排序改变时 |
| | | sortChange({ column, prop, order }) { |
| | |
| | | this.form.UserCode = '' |
| | | this.form.UserName = '' |
| | | this.form.StuOrg = '' |
| | | this.form.Enable = '' |
| | | this.form.Enable = 'Y' |
| | | this.form.wagetype = '' |
| | | this.$refs.cascader.checkedValue = ''// 级联选择器的清空 |
| | | this.getUserSearch() |
| | |
| | | this.dialogForm.UserCode = '' |
| | | this.dialogForm.UserName = '' |
| | | this.dialogForm.Password = '' |
| | | this.dialogForm.Enable = '' |
| | | this.dialogForm.Enable = 'Y' |
| | | this.$refs.dialogCascader.checkedValue = '' |
| | | this.dialogForm.StuOrg = '' |
| | | this.dialogForm.Mobile = '' |
| | |
| | | }, |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | console.log(window.innerHeight) |
| | | console.log(window.innerWidth) |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | // this.isFullscreen = window.innerHeight < 800 |
| | | if (window.innerHeight < 800) { |
| | | this.tableHeight = this.mainHeight - 50 |
| | | if (window.innerHeight < 769) { |
| | | this.tableHeight = this.tableHeight - 50 |
| | | } |
| | | this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367 |
| | | }) |
| | | }, |
| | | // 关联角色点击事件 |
| | |
| | | const res = await SaveUserAssoctRole(this.dialogFormRoles.roleTreeSelectedArr, this.dialogFormRoles.usercode) |
| | | if (res.code === '200') { |
| | | this.$message.success('保存成功!') |
| | | await this.getUserSearch() |
| | | this.dialogVisibleRoles = false |
| | | } |
| | | }, |
| | |
| | | if (row.group_name.trim().length < 1) { |
| | | return this.$message.info('班组名称不能为空!') |
| | | } |
| | | if (row.description.trim().length < 1) { |
| | | return this.$message.info('班组描述不能为空!') |
| | | } |
| | | // if (row.description.trim().length < 1) { |
| | | // return this.$message.info('班组描述不能为空!') |
| | | // } |
| | | const data = { |
| | | code: row.group_code, |
| | | name: row.group_name, |