BUG 28482
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<section class="AiUserPicker">
|
||||
<el-select size="small" :value="value" placeholder="选择人员" clearable @change="v=>$emit('select',v)" v-bind="$attrs"
|
||||
<el-select size="small" :value="value" placeholder="选择人员" clearable @change="handleSelect" v-bind="$attrs"
|
||||
filterable>
|
||||
<el-option v-for="row in list" :key="row.id" :value="row.id" :label="row[label]"/>
|
||||
</el-select>
|
||||
@@ -19,7 +19,8 @@ export default {
|
||||
instance: Function,
|
||||
action: {default: "/appportaluser/list"},
|
||||
params: {default: () => ({})},
|
||||
label: {default: "phone"}
|
||||
label: {default: "phone"},
|
||||
name: {default: ""}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -34,6 +35,12 @@ export default {
|
||||
this.list = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelect(v) {
|
||||
let list = this.list.filter(e => [v].flat().includes(e.id))
|
||||
this.$emit('select', v)
|
||||
this.$emit("update:name", list?.map(e => e[this.label])?.toString() || "")
|
||||
this.$emit("list", list)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
Reference in New Issue
Block a user