From 3c464ed536a044d93d17efa3ecfbd3df8c3e1bbb Mon Sep 17 00:00:00 2001 From: baiqi Date: Mon, 8 Jul 2024 17:45:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8B=96=E6=8B=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/ms-case-associate/index.vue | 4 -- .../pure/ms-export-drawer/index.vue | 3 +- .../components/pure/ms-table/base-table.vue | 25 ++++----- .../system/authorizedManagement/index.vue | 54 ++++++++++--------- .../testPlan/components/planTable.vue | 35 +----------- 5 files changed, 41 insertions(+), 80 deletions(-) diff --git a/frontend/src/components/business/ms-case-associate/index.vue b/frontend/src/components/business/ms-case-associate/index.vue index c2e8b957e1..0b52d2061d 100644 --- a/frontend/src/components/business/ms-case-associate/index.vue +++ b/frontend/src/components/business/ms-case-associate/index.vue @@ -314,10 +314,6 @@ const protocolOptions = ref(['HTTP']); const modulesCount = ref>({}); const isExpandAll = ref(false); - // 全部展开或折叠 - const expandHandler = () => { - isExpandAll.value = !isExpandAll.value; - }; // 选中用例类型 const caseType = computed({ diff --git a/frontend/src/components/pure/ms-export-drawer/index.vue b/frontend/src/components/pure/ms-export-drawer/index.vue index 2fef8eae51..b86768bee6 100644 --- a/frontend/src/components/pure/ms-export-drawer/index.vue +++ b/frontend/src/components/pure/ms-export-drawer/index.vue @@ -320,9 +320,8 @@ border: 1px dashed rgba(var(--primary-5)); background-color: rgba(var(--primary-1)); } - :deep(.arco-checkbox-group .arco-checkbox) { - margin-right: 20px; margin-top: 10px; + margin-right: 20px; } diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index fbee958cab..0b8cf12933 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -3,7 +3,6 @@
- - - -
item.id === extra.dragTarget?.id); - oldIndex = oldDragData.findIndex((item: any) => item.key === extra.dragTarget?.id); + newIndex = newDragData.findIndex((item: any) => item[rowKey || 'id'] === extra.dragTarget?.[rowKey || 'id']); + oldIndex = oldDragData.findIndex((item: any) => item[rowKey || 'id'] === extra.dragTarget?.[rowKey || 'id']); let position: 'AFTER' | 'BEFORE' = 'BEFORE'; position = newIndex > oldIndex ? 'AFTER' : 'BEFORE'; @@ -661,7 +655,7 @@ projectId: appStore.currentProjectId, targetId: '', // 放置目标id moveMode: position, - moveId: extra.dragTarget.id as string, // 拖拽id + moveId: extra.dragTarget[rowKey || 'id'] as string, // 拖拽id }; let targetIndex; @@ -676,9 +670,10 @@ params.moveMode = 'AFTER'; targetIndex = newIndex - 1; } - params.targetId = newDragData[targetIndex]?.id ?? newDragData[newIndex]?.id; + params.targetId = newDragData[targetIndex]?.[rowKey || 'id'] ?? newDragData[newIndex]?.[rowKey || 'id']; - if (params.targetId !== params.moveId) { + if (oldIndex !== newIndex) { + // 原地移动不触发 emit('dragChange', params); } } diff --git a/frontend/src/views/setting/system/authorizedManagement/index.vue b/frontend/src/views/setting/system/authorizedManagement/index.vue index cc39fa6937..b13e35108f 100644 --- a/frontend/src/views/setting/system/authorizedManagement/index.vue +++ b/frontend/src/views/setting/system/authorizedManagement/index.vue @@ -17,50 +17,52 @@
  • {{ t('system.authorized.authorizationTime') }} -
    {{ licenseInfo?.license?.expired }}
    +
    + {{ licenseInfo?.license?.expired }} +
  • {{ t('system.authorized.productName') }} -
    {{ licenseInfo?.license?.product }}
    +
    + {{ licenseInfo?.license?.product }} +
  • {{ t('system.authorized.productionVersion') }} -
    {{ licenseInfo?.license?.edition }}
    +
    + {{ licenseInfo?.license?.edition }} +
  • {{ t('system.authorized.authorizedVersion') }}
    - {{ licenseInfo?.license?.licenseVersion }}
    + {{ licenseInfo?.license?.licenseVersion }} +
  • {{ t('system.authorized.authorizationsCount') }} -
    {{ addCommasToNumber(licenseInfo?.license?.count || 0) }}
    +
    + {{ addCommasToNumber(licenseInfo?.license?.count || 0) }} +
  • {{ t('system.authorized.authorizationStatus') }} -
    {{ - licenseInfo?.status === 'valid' - ? t('system.authorized.valid') - : licenseInfo?.status === 'expired' - ? t('system.authorized.invalid') - : t('system.authorized.failure') - }}
    +
    + {{ + licenseInfo?.status === 'valid' + ? t('system.authorized.valid') + : licenseInfo?.status === 'expired' + ? t('system.authorized.invalid') + : t('system.authorized.failure') + }} + +
  • - {{ - t('system.authorized.authorityChecking') - }} + + {{ t('system.authorized.authorityChecking') }} +
  • diff --git a/frontend/src/views/test-plan/testPlan/components/planTable.vue b/frontend/src/views/test-plan/testPlan/components/planTable.vue index eadf66f781..f28ae0af0b 100644 --- a/frontend/src/views/test-plan/testPlan/components/planTable.vue +++ b/frontend/src/views/test-plan/testPlan/components/planTable.vue @@ -43,11 +43,11 @@ disabledChildren: true, parentKey: 'parent', }" + :first-column-width="32" v-on="propsEvent" @batch-action="handleTableBatch" @filter-change="filterChange" @drag-change="handleDragChange" - @sorter-change="saveSort" >