页面更新时添加锁
parent
a37882569c
commit
a7eba8b92e
|
@ -76,6 +76,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
<div style="font-size: 10px; color: red">{{ '温馨提示:1、输入名称、电话、身份证号按回车或让输入框失去焦点即可搜索。2、双击人员列可直接添加' }}</div>
|
||||||
<el-divider content-position="center">搜索条件</el-divider>
|
<el-divider content-position="center">搜索条件</el-divider>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -143,7 +144,6 @@
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
@row-dblclick="clickAddSelect"
|
@row-dblclick="clickAddSelect"
|
||||||
@selection-change="updateSelect"
|
@selection-change="updateSelect"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-table-column :reserve-selection="true" fixed type="selection" width="55" align="center"/>
|
<el-table-column :reserve-selection="true" fixed type="selection" width="55" align="center"/>
|
||||||
<el-table-column fixed type="index" label="序号" width="50" align="center"/>
|
<el-table-column fixed type="index" label="序号" width="50" align="center"/>
|
||||||
|
@ -221,8 +221,7 @@
|
||||||
:data="selectPeopleList"
|
:data="selectPeopleList"
|
||||||
border
|
border
|
||||||
height="642px"
|
height="642px"
|
||||||
style="width: 100%;margin-left: 10px"
|
style="width: 100%;margin-left: 10px">
|
||||||
@row-dblclick="clickAddSelect">
|
|
||||||
<el-table-column prop="NAME" fixed label="姓名" width="100px" style="width: 150px"/>
|
<el-table-column prop="NAME" fixed label="姓名" width="100px" style="width: 150px"/>
|
||||||
<el-table-column prop="USERNAME" label="用户名" width="150px" style="width: 150px"/>
|
<el-table-column prop="USERNAME" label="用户名" width="150px" style="width: 150px"/>
|
||||||
<el-table-column prop="BELONG_TO_CORP_NAME" label="所属企业" width="200px" style="width: 150px"/>
|
<el-table-column prop="BELONG_TO_CORP_NAME" label="所属企业" width="200px" style="width: 150px"/>
|
||||||
|
@ -321,7 +320,8 @@ export default {
|
||||||
},
|
},
|
||||||
peopleList: [],
|
peopleList: [],
|
||||||
selectPeopleList: [],
|
selectPeopleList: [],
|
||||||
fullscreenFlag: false
|
fullscreenFlag: false,
|
||||||
|
lock: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -354,7 +354,9 @@ export default {
|
||||||
for (let i = 0; i < this.selectPeopleList.length; i++) {
|
for (let i = 0; i < this.selectPeopleList.length; i++) {
|
||||||
this.selectPeopleList[i].isSelect = true
|
this.selectPeopleList[i].isSelect = true
|
||||||
}
|
}
|
||||||
this.getPeopleList()
|
if (!this.lock) {
|
||||||
|
this.getPeopleList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
|
@ -522,25 +524,23 @@ export default {
|
||||||
addSelect(row) {
|
addSelect(row) {
|
||||||
this.selectPeopleList.push(row)
|
this.selectPeopleList.push(row)
|
||||||
this.$refs.multipleTable.toggleRowSelection(row)
|
this.$refs.multipleTable.toggleRowSelection(row)
|
||||||
this.getPeopleList()
|
|
||||||
},
|
},
|
||||||
clickAddSelect(row, column, event) {
|
clickAddSelect(row, column, event) {
|
||||||
if (!row.isSelect) {
|
if (!row.isSelect) {
|
||||||
this.addSelect(row)
|
this.addSelect(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickDeleteSelect(row, column, event) {
|
|
||||||
if (!row.isSelect) {
|
|
||||||
this.deleteSelect(row)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deleteSelect(row) {
|
deleteSelect(row) {
|
||||||
this.selectPeopleList = this.selectPeopleList.filter(ver => ver.USER_ID !== row.USER_ID)
|
this.selectPeopleList = this.selectPeopleList.filter(ver => ver.USER_ID !== row.USER_ID)
|
||||||
|
this.form.peopleList = this.form.peopleList.filter(ver => ver.USER_ID !== row.USER_ID)
|
||||||
|
// 重新选择
|
||||||
this.$refs.multipleTable.clearSelection()
|
this.$refs.multipleTable.clearSelection()
|
||||||
|
this.lock = true
|
||||||
this.form.peopleList.forEach(row => {
|
this.form.peopleList.forEach(row => {
|
||||||
this.$refs.multipleTable.toggleRowSelection(row)
|
this.$refs.multipleTable.toggleRowSelection(row)
|
||||||
})
|
})
|
||||||
this.getPeopleList()
|
this.getPeopleList()
|
||||||
|
this.lock = false
|
||||||
},
|
},
|
||||||
viewUserInfo(row) {
|
viewUserInfo(row) {
|
||||||
this.$refs.userInfos.init({ XGF_USER_ID: row.USER_ID })
|
this.$refs.userInfos.init({ XGF_USER_ID: row.USER_ID })
|
||||||
|
|
Loading…
Reference in New Issue