33 lines
749 B
Vue
Raw Normal View History

<template>
<uni-data-select
v-model="modelValue"
:localdata="options"
v-bind="omit($attrs,['change'])"
/>
</template>
<script setup>
import {defineModel, defineOptions, onMounted, ref} from 'vue'
import {omit} from "radash";
import UniDataSelect from "../../uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue";
import {getDeptList} from "../../api/dept";
defineOptions({
name: "LargeArea"
})
const modelValue = defineModel()
const options = ref([])
onMounted(async () => {
const {data} = await getDeptList()
options.value = data.filter(i => i.isUnit === 1).map(i => ({
value: i.deptId,
text: i.deptName
}))
})
</script>
<style lang="scss" scoped>
</style>