fix:人员单位加载
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
dev_ljl 2025-08-04 10:09:12 +08:00
parent c847bd29e1
commit d9856230e6

View File

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref, watch} from 'vue'; import {onMounted, ref, watch} from 'vue';
import {Select} from 'ant-design-vue'; import {Select} from 'ant-design-vue';
import {resident_unitList, resident_unitInfo} from "#/api/property/resident/unit"; import {resident_unitList, resident_unitInfo} from "#/api/property/resident/unit";
@ -17,7 +17,7 @@ const props= withDefaults(defineProps<{
unitId: '', unitId: '',
}); });
async function queryUnit(value: string, callback: any) { async function queryUnit(value: string|undefined, callback: any) {
const queryData = { const queryData = {
name: value, name: value,
pageSize: 100, pageSize: 100,
@ -64,6 +64,10 @@ watch(() => props.unitId,
getUnitInfo(newX) getUnitInfo(newX)
} }
}, {immediate: true}) }, {immediate: true})
onMounted(()=>{
queryUnit(undefined, (d: any[]) => (data.value = d));
})
</script> </script>
<template> <template>