页面更新时添加锁

liujun-2024-06-06-相关方新需求
liujun 2024-06-11 09:32:40 +08:00
parent a37882569c
commit a7eba8b92e
1 changed files with 11 additions and 11 deletions

View File

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