| | |
| | | return message |
| | | }, |
| | | parseType(type){ |
| | | let typeList = [{id:1,name:'超级管理员'},{id:2,name:'管理员'},{id:3,name:'普通用户'}] |
| | | let typeList = [{id:2,name:'管理员'},{id:3,name:'普通用户'}] |
| | | if(type){ |
| | | let a = typeList.find(item => item.id === type) |
| | | return a.name |
| | |
| | | idcard:'', |
| | | email:'', |
| | | company:'', |
| | | companyid:'', |
| | | department:'', |
| | | job:'', |
| | | type:'', |
| | |
| | | isanalysis: [{ required: true, message: '是否气体检测中心不能为空', trigger: 'change' }] |
| | | }, |
| | | isList:[{id:1,name:'是'},{id:0,name:'否'}], |
| | | typeList:[{id:1,name:'超级管理员'},{id:2,name:'管理员'},{id:3,name:'普通用户'}], |
| | | typeList:[{id:2,name:'管理员'},{id:3,name:'普通用户'}], |
| | | dialogUserRoleFormVisible: false, |
| | | userRoleDataForm: { |
| | | userRoles: [], |
| | |
| | | userRoleDataFormRules: { |
| | | userRoles: [{ type: 'array', required: true, message: '角色不能为空', trigger: 'change' }] |
| | | }, |
| | | typeList:[{id:1,name:'超级管理员'},{id:2,name:'管理员'},{id:3,name:'普通用户'}], |
| | | roleList: [], |
| | | passwordType: 'password', |
| | | confirmPasswordType: 'password', |
| | |
| | | }, |
| | | companyChange(val){ |
| | | this.dataForm.company = val.company |
| | | this.dataForm.companyid = val.id |
| | | if (val.ismain === 1) { |
| | | this.isMain = true; |
| | | }else{ |
| | |
| | | params['pageSize'] = _this.pageSize |
| | | params['type'] = _this.userType |
| | | params['realname'] = _this.realname |
| | | params['isMain'] = true |
| | | params['isMain'] = false |
| | | for (const i in _this.queryForm) { |
| | | if (_this.queryForm[i] != undefined && _this.queryForm[i].toString() != '') { |
| | | params[i] = _this.queryForm[i] |
| | |
| | | _this.pageTotal = computePageCount(result.totalCount, result.pageSize) |
| | | _this.currentPage = result.pageIndex |
| | | _this.userData = result.result |
| | | }else if(res.code === '100'){ |
| | | this.$store.dispatch('LogOut').then(() => { |
| | | location.reload()// In order to re-instantiate the vue-router object to avoid bugs |
| | | parseError({ error: res.message, vm: _this }) |
| | | }) |
| | | } else { |
| | | parseError({ error: res.data.message, vm: _this }) |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |
| | | _this.listLoading = false |
| | | }).catch(error => { |
| | |
| | | }) |
| | | _this.getUserList() |
| | | } else { |
| | | parseError({ error: res.data.message, vm: _this }) |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |
| | | }).catch(error => { |
| | | parseError({ error: error, vm: _this }) |
| | |
| | | }) |
| | | _this.getUserList() |
| | | } else { |
| | | parseError({ error: res.data.message, vm: _this }) |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |
| | | }).catch(error => { |
| | | parseError({ error: error, vm: _this }) |
| | |
| | | }) |
| | | _this.getUserList() |
| | | } else { |
| | | parseError({ error: res.data.message, vm: _this }) |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |
| | | }).catch(error => { |
| | | parseError({ error: error, vm: _this }) |
| | |
| | | }) |
| | | _this.getUserList() |
| | | } else { |
| | | parseError({ error: res.data.message, vm: _this }) |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | showEditHandle: function(row) { |
| | | this.resetDataForm() |
| | | this.dataForm = row |
| | | this.dataForm.companyid = row.companyInfo.id |
| | | this.dataForm.password = null |
| | | this.dialogStatus = 'update' |
| | | this.dialogFormVisible = true |