From a3ee87d62ccecc2e1e0b4f2f0cb8875a5efa88c8 Mon Sep 17 00:00:00 2001
From: lyfO_o <764716047@qq.com>
Date: Fri, 13 May 2022 14:51:20 +0800
Subject: [PATCH] 用户相关部门
---
src/views/systemManage/userManage/index.vue | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/views/systemManage/userManage/index.vue b/src/views/systemManage/userManage/index.vue
index 24ddb6e..d530bf6 100644
--- a/src/views/systemManage/userManage/index.vue
+++ b/src/views/systemManage/userManage/index.vue
@@ -200,7 +200,7 @@
<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>
@@ -226,7 +226,7 @@
<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">
@@ -676,6 +676,7 @@
idcard:'',
email:'',
company:'',
+ companyid:'',
department:'',
job:'',
type:'',
@@ -764,6 +765,7 @@
},
companyChange(val){
this.dataForm.company = val.company
+ this.dataForm.companyid = val.id
if (val.ismain === 1) {
this.isMain = true;
}else{
@@ -796,8 +798,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 => {
@@ -830,7 +838,7 @@
})
_this.getUserList()
} else {
- parseError({ error: res.data.message, vm: _this })
+ parseError({ error: res.message, vm: _this })
}
}).catch(error => {
parseError({ error: error, vm: _this })
@@ -866,7 +874,7 @@
})
_this.getUserList()
} else {
- parseError({ error: res.data.message, vm: _this })
+ parseError({ error: res.message, vm: _this })
}
}).catch(error => {
parseError({ error: error, vm: _this })
@@ -954,7 +962,7 @@
})
_this.getUserList()
} else {
- parseError({ error: res.data.message, vm: _this })
+ parseError({ error: res.message, vm: _this })
}
}).catch(error => {
parseError({ error: error, vm: _this })
@@ -1022,6 +1030,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
@@ -1172,7 +1181,7 @@
})
_this.getUserList()
} else {
- parseError({ error: res.data.message, vm: _this })
+ parseError({ error: res.message, vm: _this })
}
})
.catch((error) => {
--
Gitblit v1.9.2