Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangzhijiang
2022-05-30 11:21:42 +08:00
@@ -69,7 +69,8 @@
userIds: [], userIds: [],
searchModel: '', searchModel: '',
defaultExpandedKeys: [], defaultExpandedKeys: [],
defaultCheckedKeys: [] defaultCheckedKeys: [],
content: []
} }
}, },
mounted() { mounted() {
@@ -91,12 +92,38 @@
// }, // },
onCheck(checkedKeys, info) { onCheck(checkedKeys, info) {
this.userIds = [] this.userIds = checkedKeys.checked
this.userName = [] this.userName = []
if (info.checkedNodes && info.checkedNodes.length > 0) { if (info.checkedNodes && info.checkedNodes.length > 0) {
info.checkedNodes.forEach(res => { info.checkedNodes.forEach(res => {
this.userIds.push(res.data.props.id || res.data.props.dataRef.key) if (res.data.props.dataRef.key) {
this.userName.push(res.data.props.title) this.content.push({
id: res.data.props.dataRef.key,
title: res.data.props.dataRef.title
})
} else {
this.content.push({
id: res.data.props.id,
title: res.data.props.title
})
}
})
}
if (this.content && this.content.length > 0) {
for (let i = 0; i < this.content.length; i++) {
for (let j = i + 1; j < this.content.length; j++) {
if (this.content[i].id == this.content[j].id) {
this.content.splice(j, 1)
j--
}
}
}
this.userIds.forEach(res => {
this.content.forEach(val => {
if (res == val.id) {
this.userName.push(val.title)
}
})
}) })
} }
}, },
@@ -163,7 +190,7 @@
postAction('sys/user/queryDepartUserTreeList', { postAction('sys/user/queryDepartUserTreeList', {
departId: this.departId, departId: this.departId,
json: gData, json: gData,
flag:'1', flag: '1'
}).then((res) => { }).then((res) => {
this.confirmLoading = false this.confirmLoading = false
if (res.success) { if (res.success) {
@@ -221,7 +248,7 @@
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
z-index:100; z-index: 100;
border-top: 1px solid #e8e8e8; border-top: 1px solid #e8e8e8;
padding: 10px 16px; padding: 10px 16px;
text-align: right; text-align: right;