页面更新时添加锁
parent
a37882569c
commit
a7eba8b92e
|
@ -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,7 +354,9 @@ export default {
|
|||
for (let i = 0; i < this.selectPeopleList.length; i++) {
|
||||
this.selectPeopleList[i].isSelect = true
|
||||
}
|
||||
this.getPeopleList()
|
||||
if (!this.lock) {
|
||||
this.getPeopleList()
|
||||
}
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
|
@ -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 })
|
||||
|
|
Loading…
Reference in New Issue