| | |
| | | <span>{{ scope.row.roles | parseRoles }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="人员MAC地址" prop="deviceNo" align="center" width="100px"> |
| | | <!-- <el-table-column label="人员MAC地址" prop="deviceNo" align="center" width="100px"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.deviceNo}}</span> |
| | | </template> |
| | |
| | | <span>{{ scope.row.endtime}}</span> |
| | | </template> |
| | | |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column label="是否单位负责人" prop="iscompany" align="center" width="100px"> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in isList"> |
| | |
| | | <el-option |
| | | v-for="item in departmentList" |
| | | :key="item.id" |
| | | :value="item.department" |
| | | :value="item.id" |
| | | :label="item.department" |
| | | > |
| | | </el-option> |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="是否安全员:" prop="issecurityofficer"> |
| | | <el-select v-model.trim="dataForm.issecurityofficer" auto-complete="on" style="width:100%;"> |
| | | <el-option |
| | | v-for="item in isSecurityOfficerList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="状态:" prop="status"> |
| | | <el-select v-model.trim="dataForm.status" auto-complete="on" style="width:100%;"> |
| | | <el-option |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="定位卡编号:" prop="empNo"> |
| | | <el-input v-model.trim="dataForm.empNo"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="定位卡MAC地址:" prop="deviceNo"> |
| | | <el-input v-model.trim="dataForm.deviceNo"></el-input> |
| | |
| | | listLoading: true, |
| | | isMain:false, |
| | | iscompanyList:[{id:1,name:'否'},{id:0,name:'是'}], |
| | | isSecurityOfficerList:[{id:1,name:'是'},{id:0,name:'否'}], |
| | | queryForm: { |
| | | realname:'', |
| | | username: '', |
| | |
| | | idcard:'', |
| | | email:'', |
| | | company:'', |
| | | companyid:'', |
| | | department:'', |
| | | job:'', |
| | | type:'', |
| | |
| | | lastmodifieddate:'', |
| | | empNo:'', |
| | | deviceNo:'', |
| | | issecurityofficer:'', |
| | | }, |
| | | cardDataForm:{ |
| | | username:'', |
| | |
| | | }, |
| | | companyChange(val){ |
| | | this.dataForm.company = val.company |
| | | this.dataForm.companyid = val.id |
| | | if (val.ismain === 1) { |
| | | this.isMain = true; |
| | | }else{ |
| | |
| | | _this.pageTotal = computePageCount(result.totalCount, result.pageSize) |
| | | _this.currentPage = result.pageIndex |
| | | _this.userData = result.result |
| | | } else { |
| | | parseError({ error: res.data.message, vm: _this }) |
| | | }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.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 }) |
| | |
| | | createddate:'', |
| | | lastmodifiedby:'', |
| | | lastmodifieddate:'', |
| | | issecurityofficer:'', |
| | | } |
| | | }, |
| | | getDepartmentData(){ |
| | |
| | | }) |
| | | _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 }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | this.resetDataForm() |
| | | this.dataForm = row |
| | | this.dataForm.password = null |
| | | this.dataForm.companyid = row.companyInfo.id |
| | | this.dialogStatus = 'update' |
| | | this.dialogFormVisible = true |
| | | let ismain = this.companyList.find(item=>item.company === row.company).ismain |
| | |
| | | formData.append('file', files[0]) |
| | | } |
| | | formData.append('action', 'import') |
| | | importUser(formData) |
| | | .then((response) => { |
| | | const res = response.data |
| | | if (res.code == 200) { |
| | | _this.importDialogFormVisible = false |
| | | _this.$message({ |
| | | message: '导入成功', |
| | | type: 'success' |
| | | }) |
| | | _this.getUserList() |
| | | } else { |
| | | parseError({ error: res.data.message, vm: _this }) |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | parseError({ error: error, vm: _this }) |
| | | }) |
| | | importUser(formData).then((response) => { |
| | | const res = response.data |
| | | if (res.code == 200) { |
| | | _this.importDialogFormVisible = false |
| | | _this.$message({ |
| | | message: '导入成功', |
| | | type: 'success' |
| | | }) |
| | | _this.getUserList() |
| | | } else { |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |
| | | }).catch((error) => { |
| | | parseError({ error: error, vm: _this }) |
| | | }) |
| | | }, |
| | | getProvince(){ |
| | | const _this = this |