From 70fcf72a21ff6dd8c31b4d7628f87b16a942de80 Mon Sep 17 00:00:00 2001 From: teukkk Date: Wed, 22 May 2024 18:25:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E8=AF=A6=E6=83=85=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1040799 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040799 --bug=1040861 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040861 --bug=1040917 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040917 --bug=1040857 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040857 --bug=1040876 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040876 --bug=1040834 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040834 --- .../components/pure/ms-table/base-table.vue | 11 +++++++++- .../featureCase/components/caseTable.vue | 3 ++- .../featureCase/components/caseTree.vue | 21 +++++++++++-------- .../featureCase/detail/executeSubmit.vue | 16 ++------------ .../detail/featureCase/detail/index.vue | 1 + .../views/test-plan/testPlan/detail/index.vue | 5 ++++- 6 files changed, 31 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index 655ed35aad..a58c0ce709 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -203,7 +203,7 @@ :name="item.slotName" v-bind="{ record, rowIndex, column, dataIndex: item.dataIndex, columnConfig: item }" > - {{ record[item.dataIndex as string] || (attrs.emptyDataShowLine ? '-' : '') }} + {{ getDisplayValue(record[item.dataIndex as string]) }} @@ -374,6 +374,15 @@ const isEnter = ref(false); const { rowKey }: Partial> = attrs; + + // 显示值 (不处理0) + function getDisplayValue(value: any) { + if (value === '' || value === null || value === undefined || Number.isNaN(value)) { + return attrs.emptyDataShowLine ? '-' : ''; + } + return value; + } + // 第一行表格合并 const currentSpanMethod = ({ rowIndex, diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue index 3ffc298c6b..2cfb5bc610 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue @@ -63,7 +63,7 @@ {{ t('caseManagement.caseReview.allCases') }}
({{ allCount }})
+ + + + + @@ -51,6 +58,7 @@ import { useRoute } from 'vue-router'; import { useVModel } from '@vueuse/core'; + import MsButton from '@/components/pure/ms-button/index.vue'; import MsIcon from '@/components/pure/ms-icon-font/index.vue'; import MsTree from '@/components/business/ms-tree/index.vue'; import type { MsTreeNodeData } from '@/components/business/ms-tree/types'; @@ -63,7 +71,6 @@ const props = defineProps<{ modulesCount?: Record; // 模块数量统计对象 - isExpandAll?: boolean; // 是否展开所有节点 selectedKeys: string[]; // 选中的节点 key }>(); const emit = defineEmits<{ @@ -85,14 +92,10 @@ const activeFolder = ref('all'); const allCount = ref(0); - const isExpandAll = ref(props.isExpandAll); - - watch( - () => props.isExpandAll, - (val) => { - isExpandAll.value = val; - } - ); + const isExpandAll = ref(false); + function expandHandler() { + isExpandAll.value = !isExpandAll.value; + } function getFolderClass(id: string) { return activeFolder.value === id ? 'folder-text folder-text--active' : 'folder-text'; diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/executeSubmit.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/executeSubmit.vue index 297b62e010..d46a5838ff 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/executeSubmit.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/executeSubmit.vue @@ -1,12 +1,6 @@