【修改】修改bug
This commit is contained in:
+45
-16
@@ -169,7 +169,7 @@
|
||||
|
||||
<el-col :xl="8" :lg="8">
|
||||
<el-form-item label="角色名" class="search-item">
|
||||
<!-- <el-input :placeholder="'根据角色名查询'" class="search-item" v-model="searchForm.roleName"/>-->
|
||||
<!-- <el-input :placeholder="'根据角色名查询'" class="search-item" v-model="searchForm.roleName"/>-->
|
||||
<el-select v-model="searchForm.roleName" class="icon-auth" placeholder="请选择角色名">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<template v-for="item in roleList">
|
||||
@@ -824,9 +824,12 @@ export default {
|
||||
rows.forEach(row => {
|
||||
/* 双重for循环,为了解决,第二次点击弹框得时候,删除已选择里面得人员,表格勾选没有取消问题 */
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].USID == row.USID) {
|
||||
if (this.tableData[i].USID == row.USID && !this.isOrg) {
|
||||
// console.log(this.tableData[i], '666')
|
||||
this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i])
|
||||
}else if (this.tableData[i].orgCode == row.orgCode&& this.isOrg){
|
||||
this.$refs.orgTable && this.$refs.orgTable.toggleRowSelection(this.tableData[i])
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -940,12 +943,21 @@ export default {
|
||||
const nameList = this.config.valueName instanceof Array ? this.config.valueName.split(',') : (this.config.valueName === '' ? [] : this.config.valueName.split(','))
|
||||
this.checkedIdList = idList
|
||||
const checkedList = []
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
USID: id,
|
||||
USNAME: nameList[index]
|
||||
if(this.isOrg){
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
orgCode:id,
|
||||
orgName:nameList[index]
|
||||
})
|
||||
})
|
||||
})
|
||||
}else{
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
USID: id,
|
||||
USNAME: nameList[index],
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if (this.maxSelected == 1) {
|
||||
//
|
||||
@@ -983,10 +995,18 @@ export default {
|
||||
if (!this.dialogModel) {
|
||||
this.checkedName = this.config.valueName || ''
|
||||
if (this.config.value !== '') {
|
||||
this.checkedList = [{
|
||||
USID: this.config.value,
|
||||
USNAME: this.config.valueName
|
||||
}]
|
||||
if(this.isOrg){
|
||||
this.checkedList = [{
|
||||
orgCode: this.config.value,
|
||||
orgName: this.config.valueName
|
||||
}]
|
||||
}else{
|
||||
this.checkedList = [{
|
||||
USID: this.config.value,
|
||||
USNAME: this.config.valueName
|
||||
}]
|
||||
}
|
||||
|
||||
const idList = this.config.value === '' ? [] : this.config.value.split(',')
|
||||
this.checkedIdList = [...idList]
|
||||
}
|
||||
@@ -995,12 +1015,21 @@ export default {
|
||||
const nameList = this.config.valueName instanceof Array ? this.config.valueName.split(',') : (this.config.valueName === '' ? [] : this.config.valueName.split(','))
|
||||
this.checkedIdList = idList
|
||||
const checkedList = []
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
USID: id,
|
||||
USNAME: nameList[index]
|
||||
if(this.isOrg){
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
orgCode: id,
|
||||
orgName: nameList[index]
|
||||
})
|
||||
})
|
||||
})
|
||||
}else {
|
||||
idList.map((id, index) => {
|
||||
checkedList.push({
|
||||
USID: id,
|
||||
USNAME: nameList[index]
|
||||
})
|
||||
})
|
||||
}
|
||||
this.checkedList = checkedList
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user