BUG 28444

This commit is contained in:
aixianling
2022-03-22 20:26:57 +08:00
parent d4c11d65e6
commit bd65a54b2c
2 changed files with 54 additions and 12 deletions

View File

@@ -0,0 +1,47 @@
<template>
<section class="AiUserPicker">
<el-select size="small" :value="value" placeholder="选择人员" clearable @change="v=>$emit('select',v)" v-bind="$attrs"
filterable>
<el-option v-for="row in list" :key="row.id" :value="row.id" :label="row.phone"/>
</el-select>
</section>
</template>
<script>
export default {
name: "AiUserPicker",
model: {
prop: "value",
event: "select"
},
props: {
value: {default: ""},
instance: Function,
action: {default: "/appportaluser/list"},
params: {default: () => ({})}
},
data() {
return {
list: []
}
},
methods: {
getUsers() {
let {action, params} = this
this.instance?.post(action, null, {params: {...params, size: 9999}}).then(res => {
if (res?.data) {
this.list = res.data.records
}
})
}
},
created() {
this.getUsers()
}
}
</script>
<style lang="scss" scoped>
.AiUserPicker {
}
</style>