fix(测试计划): 修改测试计划模块树bug和p3颜色值替换错误纠正

This commit is contained in:
xinxin.wu 2024-05-22 18:33:30 +08:00 committed by Craftsman
parent 9a97825ea8
commit 93af7780c2
12 changed files with 32 additions and 24 deletions

View File

@ -40,7 +40,7 @@
label: 'BLOCKED', label: 'BLOCKED',
icon: StatusType.BLOCKED, icon: StatusType.BLOCKED,
statusText: t('common.block'), statusText: t('common.block'),
color: 'rgb(var(--primary-3))', color: 'var(--color-fill-p-3)',
}, },
ERROR: { ERROR: {
label: 'ERROR', label: 'ERROR',

View File

@ -113,7 +113,7 @@ export const statusConfig: StatusListType[] = [
label: 'common.block', label: 'common.block',
value: 'block', value: 'block',
color: '#B379C8', color: '#B379C8',
class: 'bg-[rgb(var(--primary-3))]', class: 'bg-[var(--color-fill-p-3)]',
rateKey: 'requestPendingRate', rateKey: 'requestPendingRate',
key: 'BLOCK', key: 'BLOCK',
}, },

View File

@ -28,8 +28,8 @@ export default {
'common.updateSuccess': 'Update success', 'common.updateSuccess': 'Update success',
'common.updateFailed': 'Update failed', 'common.updateFailed': 'Update failed',
'common.deleteConfirm': 'Delete confirm', 'common.deleteConfirm': 'Delete confirm',
'common.deleteConfirmTitle': 'Delete confirm {name} 吗', 'common.deleteConfirmTitle': 'Are you sure to delete {name}?',
'common.archiveConfirmTitle': 'Archive confirm {name} 吗', 'common.archiveConfirmTitle': 'Confirm archive {name}?',
'common.deleteSuccess': 'Delete success', 'common.deleteSuccess': 'Delete success',
'common.deleteFailed': 'Delete failed', 'common.deleteFailed': 'Delete failed',
'common.addSuccess': 'Added successfully', 'common.addSuccess': 'Added successfully',

View File

@ -29,8 +29,8 @@ export default {
'common.updateSuccess': '更新成功', 'common.updateSuccess': '更新成功',
'common.updateFailed': '更新失败', 'common.updateFailed': '更新失败',
'common.deleteConfirm': '确认删除?', 'common.deleteConfirm': '确认删除?',
'common.deleteConfirmTitle': '确认删除 {name} 吗', 'common.deleteConfirmTitle': '确认删除 {name} 吗',
'common.archiveConfirmTitle': '确认归档 {name} 吗', 'common.archiveConfirmTitle': '确认归档 {name} 吗',
'common.deleteSuccess': '删除成功', 'common.deleteSuccess': '删除成功',
'common.deleteFailed': '删除失败', 'common.deleteFailed': '删除失败',
'common.addSuccess': '添加成功', 'common.addSuccess': '添加成功',

View File

@ -30,7 +30,7 @@
{{ t('common.success') }} {{ t('common.success') }}
</div> </div>
<div v-if="item.status === 'BLOCKED'" class="flex items-center"> <div v-if="item.status === 'BLOCKED'" class="flex items-center">
<MsIcon type="icon-icon_succeed_filled" class="mr-[4px] text-[rgb(var(--primary-3))]" /> <MsIcon type="icon-icon_succeed_filled" class="mr-[4px] text-[var(--color-fill-p-3)]" />
{{ t('common.block') }} {{ t('common.block') }}
</div> </div>
<div v-if="item.status === 'ERROR'" class="flex items-center"> <div v-if="item.status === 'ERROR'" class="flex items-center">

View File

@ -72,7 +72,7 @@ export const executionResultMap: Record<string, any> = {
key: 'BLOCKED', key: 'BLOCKED',
icon: StatusType.BLOCKED, icon: StatusType.BLOCKED,
statusText: t('common.block'), statusText: t('common.block'),
color: 'text-[rgb(var(--primary-3))]', color: 'text-[var(--color-fill-p-3)]',
}, },
ERROR: { ERROR: {
key: 'ERROR', key: 'ERROR',

View File

@ -55,7 +55,7 @@
</tr> --> </tr> -->
<tr class="popover-tr"> <tr class="popover-tr">
<td class="popover-label-td"> <td class="popover-label-td">
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[rgb(var(--primary-3))]"></div> <div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[var(--color-fill-p-3)]"></div>
<div>{{ t('common.block') }}</div> <div>{{ t('common.block') }}</div>
</td> </td>
<td class="popover-value-td-count"> <td class="popover-value-td-count">

View File

@ -133,14 +133,22 @@
</div> </div>
<MsCard class="mb-[16px]" simple auto-height> <MsCard class="mb-[16px]" simple auto-height>
<div class="font-medium">{{ t('report.detail.reportSummary') }}</div> <div class="font-medium">{{ t('report.detail.reportSummary') }}</div>
<div
:class="`${hasAnyPermission(['PROJECT_TEST_PLAN_REPORT:READ+UPDATE']) && !shareId ? '' : 'cursor-not-allowed'}`"
>
<MsRichText <MsRichText
v-model:raw="richText.summary" v-model:raw="richText.summary"
v-model:filedIds="richText.richTextTmpFileIds" v-model:filedIds="richText.richTextTmpFileIds"
:upload-image="handleUploadImage" :upload-image="handleUploadImage"
:preview-url="PreviewEditorImageUrl" :preview-url="PreviewEditorImageUrl"
class="mt-[8px] w-full" class="mt-[8px] w-full"
/> :disabled="true"
<div v-show="showButton" class="mt-[16px] flex items-center gap-[12px]"> /></div>
<div
v-show="showButton && hasAnyPermission(['PROJECT_TEST_PLAN_REPORT:READ+UPDATE']) && !shareId"
class="mt-[16px] flex items-center gap-[12px]"
>
<a-button type="primary" @click="handleUpdateReportDetail">{{ t('common.save') }}</a-button> <a-button type="primary" @click="handleUpdateReportDetail">{{ t('common.save') }}</a-button>
<a-button type="secondary" @click="handleCancel">{{ t('common.cancel') }}</a-button> <a-button type="secondary" @click="handleCancel">{{ t('common.cancel') }}</a-button>
</div> </div>

View File

@ -44,7 +44,7 @@
</tr> --> </tr> -->
<tr> <tr>
<td class="popover-label-td"> <td class="popover-label-td">
<div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[rgb(var(--primary-3))]"></div> <div class="mb-[2px] mr-[4px] h-[6px] w-[6px] rounded-full bg-[var(--color-fill-p-3)]"></div>
<div>{{ t('common.block') }}</div> <div>{{ t('common.block') }}</div>
</td> </td>
<td class="popover-value-td"> <td class="popover-value-td">
@ -111,7 +111,7 @@
}, },
{ {
percentage: (blockCount / caseTotal) * 100, percentage: (blockCount / caseTotal) * 100,
color: 'rgb(var(--primary-3))', color: 'var(--color-fill-p-3)',
}, },
{ {
percentage: (fakeErrorCount / caseTotal) * 100, percentage: (fakeErrorCount / caseTotal) * 100,

View File

@ -89,7 +89,7 @@
import { useI18n } from '@/hooks/useI18n'; import { useI18n } from '@/hooks/useI18n';
import useModal from '@/hooks/useModal'; import useModal from '@/hooks/useModal';
import useAppStore from '@/store/modules/app'; import useAppStore from '@/store/modules/app';
import { mapTree } from '@/utils'; import { characterLimit, mapTree } from '@/utils';
import { hasAnyPermission } from '@/utils/permission'; import { hasAnyPermission } from '@/utils/permission';
import type { CreateOrUpdateModule, UpdateModule } from '@/models/caseManagement/featureCase'; import type { CreateOrUpdateModule, UpdateModule } from '@/models/caseManagement/featureCase';
@ -188,7 +188,7 @@
const deleteHandler = (node: MsTreeNodeData) => { const deleteHandler = (node: MsTreeNodeData) => {
openModal({ openModal({
type: 'error', type: 'error',
title: t('caseManagement.featureCase.deleteTipTitle', { name: node.name }), title: t('common.deleteConfirmTitle', { name: characterLimit(node.name) }),
content: t('caseManagement.featureCase.deleteCaseTipContent'), content: t('caseManagement.featureCase.deleteCaseTipContent'),
okText: t('caseManagement.featureCase.deleteConfirm'), okText: t('caseManagement.featureCase.deleteConfirm'),
okButtonProps: { okButtonProps: {

View File

@ -14,7 +14,7 @@
{{ t('common.success') }} {{ t('common.success') }}
</div> </div>
<div v-if="item.status === 'BLOCKED'" class="flex items-center"> <div v-if="item.status === 'BLOCKED'" class="flex items-center">
<MsIcon type="icon-icon_block_filled" class="mr-[4px] text-[rgb(var(--primary-3))]" /> <MsIcon type="icon-icon_block_filled" class="mr-[4px] text-[var(--color-fill-p-3)]" />
{{ t('common.block') }} {{ t('common.block') }}
</div> </div>
<div v-if="item.status === 'ERROR'" class="flex items-center"> <div v-if="item.status === 'ERROR'" class="flex items-center">

View File

@ -2,7 +2,7 @@
<MsCard simple no-content-padding> <MsCard simple no-content-padding>
<MsSplitBox> <MsSplitBox>
<template #first> <template #first>
<div class="p-[16px] pb-0"> <div class="min-w-[300px] p-[16px]">
<div class="mb-[16px] flex justify-between"> <div class="mb-[16px] flex justify-between">
<a-input-search <a-input-search
v-model:model-value="groupKeyword" v-model:model-value="groupKeyword"
@ -255,7 +255,7 @@
<style scoped lang="less"> <style scoped lang="less">
.case { .case {
padding: 8px 4px; padding: 8px 0;
border-radius: var(--border-radius-small); border-radius: var(--border-radius-small);
@apply flex cursor-pointer items-center justify-between; @apply flex cursor-pointer items-center justify-between;
&:hover { &:hover {