From 00fa1732904c2accfc8b1917b7a428a630b8cee5 Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Sat, 18 Dec 2021 21:11:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(component):=20:bug:=E4=BF=AE=E5=A4=8Ddynami?= =?UTF-8?q?cTable=20ts=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/log/index.ts | 1 - src/api/system/log/model.d.ts | 2 +- .../table-settings/column-setting.vue | 4 +- .../table-settings/size-setting.vue | 4 +- .../dynamic-table/dynamic-table.vue | 22 ++--- .../dynamic-table/hooks/useTableContext.ts | 11 ++- src/components/dynamic-table/props.ts | 13 ++- src/layout/header/index.vue | 4 +- src/layout/tabs/tabs-view.vue | 2 +- src/views/system/monitor/login-log/index.vue | 4 +- src/views/system/monitor/online/index.vue | 12 ++- src/views/system/monitor/req-log/index.vue | 41 +++------ src/views/system/schedule/log/index.vue | 83 ++++++++++++++++++- 13 files changed, 137 insertions(+), 66 deletions(-) diff --git a/src/api/system/log/index.ts b/src/api/system/log/index.ts index fe28f2ea4..f0916c9bd 100644 --- a/src/api/system/log/index.ts +++ b/src/api/system/log/index.ts @@ -10,7 +10,6 @@ export function getReqLogList(query: API.PageParams) { }, { isMock: true, - isGetDataDirectly: false, }, ); } diff --git a/src/api/system/log/model.d.ts b/src/api/system/log/model.d.ts index addcee94d..4a25a6fc8 100644 --- a/src/api/system/log/model.d.ts +++ b/src/api/system/log/model.d.ts @@ -32,7 +32,7 @@ declare namespace API { id: number; taskId: number; name: string; - createTime: string; + createdAt: string; consumeTime: number; detail: string; status: number; diff --git a/src/components/dynamic-table/components/table-settings/column-setting.vue b/src/components/dynamic-table/components/table-settings/column-setting.vue index e158d31ea..f357f568e 100644 --- a/src/components/dynamic-table/components/table-settings/column-setting.vue +++ b/src/components/dynamic-table/components/table-settings/column-setting.vue @@ -83,6 +83,7 @@ let inited = false; const defaultColumns = cloneDeep(table.columns); const defaultShowIndex = !!table.showIndex; + const defaultBordered = table.bordered; const tableColumns = ref([]); @@ -103,6 +104,7 @@ const initCheckStatus = () => { tableColumns.value = cloneDeep(defaultColumns); checkIndex.value = defaultShowIndex; + checkBordered.value = defaultBordered; tableColumns.value.forEach((item) => (item.hideInTable ??= false)); }; initCheckStatus(); @@ -157,7 +159,7 @@ const reset = () => { initCheckStatus(); - table.setProps({ showIndex: defaultShowIndex }); + table.setProps({ showIndex: defaultShowIndex, bordered: defaultBordered }); }; diff --git a/src/components/dynamic-table/components/table-settings/size-setting.vue b/src/components/dynamic-table/components/table-settings/size-setting.vue index fd266e866..607b69186 100644 --- a/src/components/dynamic-table/components/table-settings/size-setting.vue +++ b/src/components/dynamic-table/components/table-settings/size-setting.vue @@ -8,7 +8,7 @@