|
|
@@ -159,13 +159,13 @@
|
|
|
const { tableConfig, pagination } = useTableConfig(DRAW_LESSONS_TABLE_COLUMNS_TOW, TABLE_OPTIONS, true);
|
|
|
const basicTableRef = ref<InstanceType<typeof BasicTable>>();
|
|
|
const rawTableData = ref<any[]>([]);
|
|
|
- const detailData = ref<{
|
|
|
- problem?: string;
|
|
|
- creatorName?: string;
|
|
|
- createdAt?: string;
|
|
|
- } | null>(null);
|
|
|
+ const detailData = ref({
|
|
|
+ problem: route.query.problem as string,
|
|
|
+ creatorName: route.query.creatorName as string,
|
|
|
+ createdAt: route.query.createdAt as string,
|
|
|
+ });
|
|
|
|
|
|
- const activeTab = ref<string>('ALL');
|
|
|
+ const activeTab = ref<string>(route.query.statusId as string);
|
|
|
const searchStatus = ref<string>('');
|
|
|
const searchDeptName = ref<string>('');
|
|
|
const searchDateRange = ref<string[] | null>(null);
|
|
|
@@ -231,7 +231,7 @@
|
|
|
obligationDeptName: searchDeptName.value,
|
|
|
planStartDate: searchDateRange.value?.[0],
|
|
|
planEndDate: searchDateRange.value?.[1],
|
|
|
- statusId: searchStatus.value ? Number(searchStatus.value) : undefined,
|
|
|
+ statusId: activeTab.value ? Number(activeTab.value) : undefined,
|
|
|
problem: searchKeyword.value,
|
|
|
},
|
|
|
};
|
|
|
@@ -241,27 +241,27 @@
|
|
|
if (id.value) {
|
|
|
const current = list;
|
|
|
rawTableData.value = current;
|
|
|
- if (current.length) {
|
|
|
- const row = current[0] as { problem?: string; creatorName?: string; createdAt?: string };
|
|
|
- detailData.value = {
|
|
|
- problem: row.problem,
|
|
|
- creatorName: row.creatorName,
|
|
|
- createdAt: row.createdAt,
|
|
|
- };
|
|
|
- } else {
|
|
|
- detailData.value = null;
|
|
|
- }
|
|
|
+ // if (current.length) {
|
|
|
+ // const row = current[0] as { problem?: string; creatorName?: string; createdAt?: string };
|
|
|
+ // detailData.value = {
|
|
|
+ // problem: row.problem,
|
|
|
+ // creatorName: row.creatorName,
|
|
|
+ // createdAt: row.createdAt,
|
|
|
+ // };
|
|
|
+ // } else {
|
|
|
+ // detailData.value = null;
|
|
|
+ // }
|
|
|
} else {
|
|
|
rawTableData.value = list;
|
|
|
const first = list[0] as { problem?: string; creatorName?: string; createdAt?: string } | undefined;
|
|
|
- detailData.value = first
|
|
|
- ? { problem: first.problem, creatorName: first.creatorName, createdAt: first.createdAt }
|
|
|
- : null;
|
|
|
+ // detailData.value = first
|
|
|
+ // ? { problem: first.problem, creatorName: first.creatorName, createdAt: first.createdAt }
|
|
|
+ // : null;
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.error('获取举一反三列表失败:', e);
|
|
|
rawTableData.value = [];
|
|
|
- detailData.value = null;
|
|
|
+ // detailData.value = null;
|
|
|
} finally {
|
|
|
tableConfig.loading = false;
|
|
|
}
|