提交
This commit is contained in:
1 parent
427bcb1551
commit
31b04575e2
247 files changed
+39284
-20367
No files matched your search
@@ -25,9 +25,15 @@
|
||||
<el-form-item label="体检机构">
|
||||
<el-select
|
||||
v-model="searchForm.checkupInstitutionId"
|
||||
placeholder="全部"
|
||||
placeholder="输入机构名称检索"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
reserve-keyword
|
||||
style="width: 100%"
|
||||
:loading="institutionOptionsLoading"
|
||||
:remote-method="remoteSearchInstitutions"
|
||||
@visible-change="onInstitutionSelectVisible"
|
||||
>
|
||||
<el-option
|
||||
v-for="inst in institutionOptions"
|
||||
@@ -303,8 +309,6 @@
|
||||
checkupInstitutionId: ''
|
||||
})
|
||||
|
||||
const institutionOptions = ref<any[]>([])
|
||||
|
||||
// ── 表格 ─────────────────────────────
|
||||
const loading = ref(false)
|
||||
const tableData = ref<any[]>([])
|
||||
@@ -353,15 +357,30 @@
|
||||
}
|
||||
}
|
||||
|
||||
const loadInstitutions = async () => {
|
||||
const institutionOptions = ref<any[]>([])
|
||||
const institutionOptionsLoading = ref(false)
|
||||
|
||||
async function remoteSearchInstitutions(query: string) {
|
||||
institutionOptionsLoading.value = true
|
||||
try {
|
||||
const res: any = await fetchCheckupInstitutionList({ page: 1, pageSize: 100, status: '1' })
|
||||
const res: any = await fetchCheckupInstitutionList({
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
keyword: query?.trim() || undefined,
|
||||
status: '1'
|
||||
})
|
||||
institutionOptions.value = Array.isArray(res) ? res : (res?.list ?? [])
|
||||
} catch {
|
||||
institutionOptions.value = []
|
||||
} finally {
|
||||
institutionOptionsLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function onInstitutionSelectVisible(visible: boolean) {
|
||||
if (visible) void remoteSearchInstitutions('')
|
||||
}
|
||||
|
||||
// ── 事件 ──────────────────────────────
|
||||
const handleSearch = () => {
|
||||
pagination.page = 1
|
||||
@@ -465,7 +484,7 @@
|
||||
|
||||
onMounted(() => {
|
||||
loadData()
|
||||
loadInstitutions()
|
||||
void remoteSearchInstitutions('')
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user