diff --git a/project/hlj/app/AppFormAudit/components/List.vue b/project/hlj/app/AppFormAudit/components/List.vue index d9009752..2c95be85 100644 --- a/project/hlj/app/AppFormAudit/components/List.vue +++ b/project/hlj/app/AppFormAudit/components/List.vue @@ -52,7 +52,7 @@ - +
@@ -132,6 +132,7 @@ }, edit (e) { + console.log(e) this.id = e.id this.form.name = e.name this.form.examineUserIds = e.examineUserIds.split(',').map((v, index) => { diff --git a/project/hlj/app/AppMicrodiskManage/components/List.vue b/project/hlj/app/AppMicrodiskManage/components/List.vue index ddd151cf..e8bb3436 100644 --- a/project/hlj/app/AppMicrodiskManage/components/List.vue +++ b/project/hlj/app/AppMicrodiskManage/components/List.vue @@ -354,8 +354,9 @@ }, filterNode(value, data) { + console.log(data) if (!value) return true - return data.name.indexOf(value) !== -1 + return data.fileName.indexOf(value) !== -1 }, settingAadmin (id) { diff --git a/ui/packages/common/AiUserSelecter.vue b/ui/packages/common/AiUserSelecter.vue index 6482966a..f78d384f 100644 --- a/ui/packages/common/AiUserSelecter.vue +++ b/ui/packages/common/AiUserSelecter.vue @@ -83,7 +83,7 @@
- {{ item.name }} + {{ item.name }}
@@ -235,7 +235,9 @@ return { ...item, id: item[this.props.id], - name: item[this.props.label] + name: item[this.props.label], + [this.props.id]: item[this.props.id], + [this.props.label]: item[this.props.label] } }))) @@ -254,7 +256,9 @@ return { ...item, id: item[this.props.id], - name: item[this.props.label] + name: item[this.props.label], + [this.props.id]: item[this.props.id], + [this.props.label]: item[this.props.label] } }))) this.userIds = this.chooseUser.map(v => v[this.props.id]) @@ -278,14 +282,18 @@ return { ...item, id: item[this.props.id], - name: item[this.props.label] + name: item[this.props.label], + [this.props.id]: item[this.props.id], + [this.props.label]: item[this.props.label] } }))) this.chooseUser = JSON.parse(JSON.stringify(this.value.map(item => { return { ...item, id: item[this.props.id], - name: item[this.props.label] + name: item[this.props.label], + [this.props.id]: item[this.props.id], + [this.props.label]: item[this.props.label] } }))) @@ -307,18 +315,18 @@ ] } else { this.list.forEach(v => { - if (!this.chooseUser.map(e => e.id).includes(v.id)) { + if (!this.chooseUser.map(e => e[this.props.id]).includes(v[this.props.id])) { this.chooseUser.push(v) } }) } } else { this.chooseUser = this.chooseUser.filter(v => { - return !this.list.map(v => v.id).includes(v.id) + return !this.list.map(v => v[this.props.id]).includes(v[this.props.id]) }) } - this.userIds = this.chooseUser.map(v => v.id) + this.userIds = this.chooseUser.map(v => v[this.props.id]) }, showSelecter () { @@ -328,7 +336,7 @@ }, onTreeChange (e) { - this.search.departmentId = e.id || '' + this.search.departmentId = e[this.props.id] || '' this.search.current = 1 this.$nextTick(() => { @@ -346,7 +354,7 @@ onboxChange (id, v) { if (!this.isMultiple) { - const checked = this.list.filter(v => v.id === id) + const checked = this.list.filter(v => v[this.props.id] === id) if (v) { const v = checked[checked.length - 1] this.chooseUser = [v] @@ -354,7 +362,7 @@ } if (!v) { - if (this.chooseUser.findIndex(v => v.id === id) > -1) { + if (this.chooseUser.findIndex(v => v[this.props.id] === id) > -1) { this.chooseUser = [] } } @@ -363,21 +371,21 @@ onCheckboxChange (ids) { this.$nextTick(() => { - const checked = this.list.filter(v => ids.includes(v.id)) - const unChecked = this.list.filter(v => !ids.includes(v.id)) + const checked = this.list.filter(v => ids.includes(v[this.props.id])) + const unChecked = this.list.filter(v => !ids.includes(v[this.props.id])) if (!this.isMultiple) { return false } this.chooseUser.forEach((v, index) => { - if (unChecked.findIndex(e => e.id === v.id) > -1) { + if (unChecked.findIndex(e => e[this.props.id] === v[this.props.id]) > -1) { this.chooseUser.splice(index, 1) } }) checked.forEach(v => { - if (this.chooseUser.findIndex(e => e.id === v.id) < 0) { + if (this.chooseUser.findIndex(e => e[this.props.id] === v[this.props.id]) < 0) { this.chooseUser.push(v) } }) @@ -505,16 +513,12 @@ this.$emit('change', JSON.parse(JSON.stringify(this.chooseUser.map(item => { return { - ...item, - [this.props.id]: item.id, - [this.props.label]: item.name + ...item } })))) this.showUserList = JSON.parse(JSON.stringify(this.chooseUser.map(item => { return { - ...item, - [this.props.id]: item.id, - [this.props.label]: item.name + ...item } }))) this.isShow = false