From 89b24e8ac8377c8f438eae301845cd1e44f0a4ef Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期二, 10 五月 2022 08:38:04 +0800
Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/ztqt
---
src/views/systemManage/userManage/index.vue | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/views/systemManage/userManage/index.vue b/src/views/systemManage/userManage/index.vue
index 4a265a2..8db5777 100644
--- a/src/views/systemManage/userManage/index.vue
+++ b/src/views/systemManage/userManage/index.vue
@@ -348,11 +348,11 @@
<el-row>
<el-col :span="12">
<el-form-item label="单位:" prop="company">
- <el-select v-model.trim="dataForm.company" auto-complete="on" style="width:100%;">
+ <el-select v-model.trim="dataForm.company" value-key="item" auto-complete="on" style="width:100%;" @change="companyChange">
<el-option
v-for="item in companyList"
:key="item.id"
- :value="item.company"
+ :value="item"
:label="item.company"
>
</el-option>
@@ -360,7 +360,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="部门:" prop="department">
+ <el-form-item label="部门:" prop="department" v-if="isMain">
<el-select v-model.trim="dataForm.department" auto-complete="on" style="width:100%;">
<el-option
v-for="item in departmentList"
@@ -654,6 +654,7 @@
tableKey: 0,
userData: null,
listLoading: true,
+ isMain:false,
iscompanyList:[{id:1,name:'否'},{id:0,name:'是'}],
queryForm: {
realname:'',
@@ -760,6 +761,15 @@
this.sort = param.prop;
this.order = param.order;
this.getUserList()
+ },
+ companyChange(val){
+ this.dataForm.company = val.company
+ if (val.ismain === 1) {
+ this.isMain = true;
+ }else{
+ this.isMain = false;
+ this.dataForm.department = ''
+ }
},
getUserList() {
const _this = this
@@ -1014,6 +1024,8 @@
this.dataForm.password = null
this.dialogStatus = 'update'
this.dialogFormVisible = true
+ let ismain = this.companyList.find(item=>item.company === row.company).ismain
+ this.isMain = ismain === 1;
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
@@ -1331,7 +1343,6 @@
const _this = this;
bindCard(_this.cardDataForm).then(response => {
const res = response.data
- debugger
if (res.code === '200'){
_this.$message({
message: '绑定成功',
--
Gitblit v1.9.2