From 4e27705d66a69199b336c7f7f608f06dbd1d81fa Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Tue, 07 Jun 2022 15:47:46 +0800
Subject: [PATCH] 'lct'
---
src/views/systemManage/userManage/index.vue | 36 +++++++++++++++++++++++++++++++-----
1 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/src/views/systemManage/userManage/index.vue b/src/views/systemManage/userManage/index.vue
index 1238b78..719e7d8 100644
--- a/src/views/systemManage/userManage/index.vue
+++ b/src/views/systemManage/userManage/index.vue
@@ -425,6 +425,19 @@
</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
@@ -437,13 +450,14 @@
</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>
@@ -656,6 +670,7 @@
listLoading: true,
isMain:false,
iscompanyList:[{id:1,name:'否'},{id:0,name:'是'}],
+ isSecurityOfficerList:[{id:1,name:'是'},{id:0,name:'否'}],
queryForm: {
realname:'',
username: '',
@@ -676,6 +691,7 @@
idcard:'',
email:'',
company:'',
+ companyid:'',
department:'',
job:'',
type:'',
@@ -691,6 +707,7 @@
lastmodifieddate:'',
empNo:'',
deviceNo:'',
+ issecurityofficer:'',
},
cardDataForm:{
username:'',
@@ -764,6 +781,7 @@
},
companyChange(val){
this.dataForm.company = val.company
+ this.dataForm.companyid = val.id
if (val.ismain === 1) {
this.isMain = true;
}else{
@@ -796,8 +814,14 @@
_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 => {
@@ -866,7 +890,7 @@
})
_this.getUserList()
} else {
- parseError({ error: res.data.message, vm: _this })
+ parseError({ error: res.message, vm: _this })
}
}).catch(error => {
parseError({ error: error, vm: _this })
@@ -894,6 +918,7 @@
createddate:'',
lastmodifiedby:'',
lastmodifieddate:'',
+ issecurityofficer:'',
}
},
getDepartmentData(){
@@ -1022,6 +1047,7 @@
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
--
Gitblit v1.9.2