|
@@ -28,7 +28,7 @@
|
|
|
<a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXls"> 导出 </a-button>
|
|
<a-button type="default" class="ml-8px" preIcon="mdi:download" @click="onExportXls"> 导出 </a-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template #form-goaf-select>
|
|
<template #form-goaf-select>
|
|
|
- <a-select v-model:value="goafId" :options="goafOptions" placeholder="请选择" />
|
|
|
|
|
|
|
+ <a-select v-model:value="goafId" :options="goafOptions" placeholder="请选择" @change="reloadHistory" />
|
|
|
</template>
|
|
</template>
|
|
|
<template #action="{ record }">
|
|
<template #action="{ record }">
|
|
|
<div class="action-buttons">
|
|
<div class="action-buttons">
|
|
@@ -120,8 +120,9 @@
|
|
|
const { tableContext: ctxHistory, onExportXls } = useListPage({
|
|
const { tableContext: ctxHistory, onExportXls } = useListPage({
|
|
|
tableProps: {
|
|
tableProps: {
|
|
|
api: async (params) => {
|
|
api: async (params) => {
|
|
|
|
|
+ await initGoafOptions(params.deptId);
|
|
|
if (!goafId.value) {
|
|
if (!goafId.value) {
|
|
|
- await initGoafOptions(departId);
|
|
|
|
|
|
|
+ return Promise.resolve([]);
|
|
|
}
|
|
}
|
|
|
params.goafId = goafId.value;
|
|
params.goafId = goafId.value;
|
|
|
return getGoafHistory(params);
|
|
return getGoafHistory(params);
|
|
@@ -142,12 +143,12 @@
|
|
|
initFromStore: false,
|
|
initFromStore: false,
|
|
|
syncToStore: false,
|
|
syncToStore: false,
|
|
|
rootId: departId,
|
|
rootId: departId,
|
|
|
- onChange(v) {
|
|
|
|
|
- historyTable.setLoading(true);
|
|
|
|
|
- initGoafOptions(v).finally(() => {
|
|
|
|
|
- historyTable.setLoading(false);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // onChange(v) {
|
|
|
|
|
+ // historyTable.setLoading(true);
|
|
|
|
|
+ // initGoafOptions(v).finally(() => {
|
|
|
|
|
+ // historyTable.setLoading(false);
|
|
|
|
|
+ // });
|
|
|
|
|
+ // },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
...historicalFormSchema,
|
|
...historicalFormSchema,
|
|
@@ -169,7 +170,7 @@
|
|
|
},
|
|
},
|
|
|
pagination: true,
|
|
pagination: true,
|
|
|
});
|
|
});
|
|
|
- const [registerHistoryTable, historyTable] = ctxHistory;
|
|
|
|
|
|
|
+ const [registerHistoryTable, { reload: reloadHistory }] = ctxHistory;
|
|
|
|
|
|
|
|
// 弹窗引用
|
|
// 弹窗引用
|
|
|
const [registerRealtimeModal, { openModal: openRealtimeModal }] = useModal();
|
|
const [registerRealtimeModal, { openModal: openRealtimeModal }] = useModal();
|