BUG 28444
This commit is contained in:
47
project/xiushan/components/AiUserPicker.vue
Normal file
47
project/xiushan/components/AiUserPicker.vue
Normal 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>
|
||||
Reference in New Issue
Block a user