|
@@ -173,7 +173,7 @@
|
|
|
import { getAllDepartments } from '@/api/auth/dept';
|
|
import { getAllDepartments } from '@/api/auth/dept';
|
|
|
import { onMounted, reactive, ref } from 'vue';
|
|
import { onMounted, reactive, ref } from 'vue';
|
|
|
import { formatDeptTree } from '@/views/disaster/utils/formatDeptTree';
|
|
import { formatDeptTree } from '@/views/disaster/utils/formatDeptTree';
|
|
|
- import type { DeptTree } from '@/types/dept/type';
|
|
|
|
|
|
|
+ import type { DeptTreeItem } from '@/types/dept/type';
|
|
|
import { getDisasterControlCollapseData, getDisasterControlTableData } from '@/api/disaster-control';
|
|
import { getDisasterControlCollapseData, getDisasterControlTableData } from '@/api/disaster-control';
|
|
|
import type { disasterReportTaskInfoListResponse } from '@/types/disaster-control';
|
|
import type { disasterReportTaskInfoListResponse } from '@/types/disaster-control';
|
|
|
import { DEFAULT_PAGE_SIZE, DISASTER_CONTROL_PAGE_SIZE_CONFIG, TASK_STAGE } from './src/constant';
|
|
import { DEFAULT_PAGE_SIZE, DISASTER_CONTROL_PAGE_SIZE_CONFIG, TASK_STAGE } from './src/constant';
|
|
@@ -203,7 +203,7 @@
|
|
|
|
|
|
|
|
const { permissions } = useUserInfoHook();
|
|
const { permissions } = useUserInfoHook();
|
|
|
|
|
|
|
|
- const firstLevelDepts = ref<DeptTree[]>([]);
|
|
|
|
|
|
|
+ const firstLevelDepts = ref<DeptTreeItem[]>([]);
|
|
|
const searchData = reactive({
|
|
const searchData = reactive({
|
|
|
reportDeptIds: [],
|
|
reportDeptIds: [],
|
|
|
status: '',
|
|
status: '',
|
|
@@ -283,10 +283,16 @@
|
|
|
|
|
|
|
|
const getDisposalTableData = async () => {
|
|
const getDisposalTableData = async () => {
|
|
|
tableConfig.loading = true;
|
|
tableConfig.loading = true;
|
|
|
- const res = await getDisasterControlTableData({
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const { reportDeptIds, ...otherSearchData } = searchData;
|
|
|
|
|
+
|
|
|
|
|
+ const params = {
|
|
|
handleTaskIds: taskIds.value,
|
|
handleTaskIds: taskIds.value,
|
|
|
- ...searchData,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ ...otherSearchData,
|
|
|
|
|
+ ...(reportDeptIds.length > 0 ? { reportDeptIds } : {})
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const res = await getDisasterControlTableData(params);
|
|
|
collapseList.value.forEach((item) => {
|
|
collapseList.value.forEach((item) => {
|
|
|
item.tableData = res.filter((tableItem) => tableItem.handleTaskId === item.id);
|
|
item.tableData = res.filter((tableItem) => tableItem.handleTaskId === item.id);
|
|
|
});
|
|
});
|