| 1234567891011121314151617181920212223242526272829 |
- <template>
- <el-select ref="selectRef" v-bind="$attrs">
- <el-option v-for="option in dataList" :key="option.id" :label="option.name" :value="option.id" />
- </el-select>
- </template>
- <script setup>
- import { listUniversity } from '@/api/dz/school';
- import { nextTick, onMounted } from 'vue';
- const props = defineProps({
- deptId: {
- type: Number,
- default: null,
- },
- });
- const selectRef = ref(null);
- const dataList = ref([])
- const loadData = async () => {
- const { rows } = await listUniversity({
- pageNum: 1,
- pageSize: 100000
- })
- dataList.value = rows;
- }
- onMounted(() => {
- loadData();
- });
- </script>
- <style lang="scss" scoped></style>
|