| | |
| | | <span>{{ scope.row.company }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="部门" prop="department" align="center" sortable="custom" width="100px"> |
| | | <el-table-column label="部门" prop="departmentname" align="center" sortable="custom" width="100px"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.department }}</span> |
| | | <span>{{ scope.row.departmentname }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="职位" prop="job" align="center" sortable="custom" width="100px"> |
| | |
| | | <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{ |
| | |
| | | createddate:'', |
| | | lastmodifiedby:'', |
| | | lastmodifieddate:'', |
| | | issecurityofficer:'', |
| | | } |
| | | }, |
| | | getDepartmentData(){ |
| | |
| | | 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.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 |