41 lines
908 B
Vue
41 lines
908 B
Vue
<template>
|
|
<uni-data-select
|
|
v-model="modelValue"
|
|
:localdata="options"
|
|
placeholder="请选择商业公司"
|
|
v-bind="omit($attrs,['change'])"
|
|
/>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {defineModel, defineOptions, defineProps, getCurrentInstance, ref,onMounted} from 'vue'
|
|
import {omit} from "radash";
|
|
import {getBusinessCompanyList} from "../api/orderManager";
|
|
|
|
defineOptions({
|
|
name: "BusinessCompany",
|
|
inheritAttrs: false
|
|
})
|
|
|
|
const modelValue = defineModel()
|
|
const props = defineProps([])
|
|
const {proxy} = getCurrentInstance()
|
|
|
|
const options = ref([])
|
|
|
|
onMounted(async () => {
|
|
const {data} = await getBusinessCompanyList({
|
|
isUnit: 0,
|
|
queryParam: {
|
|
areaId: 0
|
|
}
|
|
})
|
|
options.value = data.map(item => {
|
|
return {
|
|
value: item.businessname,
|
|
text: item.businessname
|
|
}
|
|
})
|
|
})
|
|
</script>
|