diff --git a/frontend/src/components/business/ms-associate-case/apiCaseTable.vue b/frontend/src/components/business/ms-associate-case/apiCaseTable.vue index 3b4fd5db0d..01e1e5bfa3 100644 --- a/frontend/src/components/business/ms-associate-case/apiCaseTable.vue +++ b/frontend/src/components/business/ms-associate-case/apiCaseTable.vue @@ -265,6 +265,7 @@ excludeIds: [...excludeKeys].concat(...(props.associatedIds || [])), selectIds: selectorStatus === 'all' ? [] : [...selectedKeys], selectAll: selectorStatus === 'all', + associateApiType: 'API_CASE', }; } diff --git a/frontend/src/components/business/ms-associate-case/apiTable.vue b/frontend/src/components/business/ms-associate-case/apiTable.vue index c774907d29..ae2476b442 100644 --- a/frontend/src/components/business/ms-associate-case/apiTable.vue +++ b/frontend/src/components/business/ms-associate-case/apiTable.vue @@ -240,6 +240,7 @@ excludeIds: [...excludeKeys].concat(...(props.associatedIds || [])), selectIds: selectorStatus === 'all' ? [] : [...selectedKeys], selectAll: selectorStatus === 'all', + associateApiType: 'API', }; } diff --git a/frontend/src/components/business/ms-associate-case/caseTree.vue b/frontend/src/components/business/ms-associate-case/caseTree.vue index cce35f867a..825821572b 100644 --- a/frontend/src/components/business/ms-associate-case/caseTree.vue +++ b/frontend/src/components/business/ms-associate-case/caseTree.vue @@ -1,22 +1,14 @@ - - (false); const functionalTableRef = ref>(); const apiTableRef = ref>(); const caseTableRef = ref>(); diff --git a/frontend/src/config/caseManagement.ts b/frontend/src/config/caseManagement.ts index 9dc3c61297..f100ef7535 100644 --- a/frontend/src/config/caseManagement.ts +++ b/frontend/src/config/caseManagement.ts @@ -1,4 +1,5 @@ import { ReviewItem, ReviewResult, ReviewStatus } from '@/models/caseManagement/caseReview'; +import type { DetailCase } from '@/models/caseManagement/featureCase'; // 评审结果 export type ReviewResultMap = Record< @@ -106,3 +107,24 @@ export const minderTagMap = { EXPECTED_RESULT: 'minder.tag.expect', DESCRIPTION: 'minder.tag.remark', }; + +export const defaultCaseDetail: DetailCase = { + id: '', + projectId: '', + templateId: '', + name: '', + prerequisite: '', // prerequisite + caseEditType: '', // 编辑模式:步骤模式/文本模式 + steps: '', + textDescription: '', + expectedResult: '', // 预期结果 + description: '', + publicCase: false, // 是否公共用例 + moduleId: '', + versionId: '', + tags: [], + customFields: [], // 自定义字段集合 + relateFileMetaIds: [], // 关联文件ID集合 + functionalPriority: '', + reviewStatus: 'UN_REVIEWED', +}; diff --git a/frontend/src/views/bug-management/components/basicInfo.vue b/frontend/src/views/bug-management/components/basicInfo.vue new file mode 100644 index 0000000000..ee13a4323c --- /dev/null +++ b/frontend/src/views/bug-management/components/basicInfo.vue @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + {{ $t('messageBox.noContent') }} + + + + + + + + diff --git a/frontend/src/views/bug-management/components/bug-detail-drawer.vue b/frontend/src/views/bug-management/components/bug-detail-drawer.vue index ae016f27ec..ecd4712fcc 100644 --- a/frontend/src/views/bug-management/components/bug-detail-drawer.vue +++ b/frontend/src/views/bug-management/components/bug-detail-drawer.vue @@ -2,7 +2,7 @@ - + - - - - - - + + + + + - + - + - - - + - - - - - - - - - - - - - - - {{ t('bugManagement.detail.basicInfo') }} - - - - - - - - - - - - - - - - - - {{ $t('messageBox.noContent') }} - - - - + + ([]); // 通知人ids - const fApi = ref(); const formRules = ref([]); // 表单规则 - const formItem = ref([]); // 表单项 + const currentProjectId = computed(() => appStore.currentProjectId); const showDrawerVisible = defineModel('visible', { default: false }); const bugDetailTabRef = ref(); @@ -463,6 +396,10 @@ } const tabList = [ + { + value: 'basicInfo', + label: t('bugManagement.detail.basicInfo'), + }, { value: 'detail', label: t('bugManagement.detail.detail'), @@ -577,54 +514,6 @@ }); } - /** - * 单独更新字段 - */ - async function updateFieldHandler() { - try { - rightLoading.value = true; - await bugDetailTabRef.value?.handleSave(); - rightLoading.value = false; - } catch (error) { - console.log(error); - } finally { - rightLoading.value = false; - } - } - - const handelFormCreateChange = debounce(() => { - updateFieldHandler(); - }, 300); - - const changeTag = debounce(() => { - detailInfo.value.tags = tags.value; - updateFieldHandler(); - }, 300); - - // 表单配置项 - const options = { - resetBtn: false, // 不展示默认配置的重置和提交 - submitBtn: false, - on: false, // 取消绑定on事件 - form: { - layout: 'horizontal', - labelAlign: 'left', - labelColProps: { - span: 9, - }, - wrapperColProps: { - span: 15, - }, - }, - // 暂时默认 - row: { - gutter: 0, - }, - wrap: { - 'asterisk-position': 'end', - 'validate-trigger': ['change'], - }, - }; const uploadFileIds = ref([]); async function publishHandler(currentContent: string) { try { @@ -794,14 +683,9 @@ justify-content: flex-start !important; } .tab-pane-container { - @apply flex-1 overflow-y-auto px-4; + @apply flex-1 overflow-y-auto p-4; .ms-scroll-bar(); } - //:deep(.w-full .arco-form-item-label) { - // display: inline-block; - // width: 100%; - // word-wrap: break-word; - //} :deep(.arco-form-item-content) { overflow-wrap: anywhere; } diff --git a/frontend/src/views/bug-management/components/bugDetailTab.vue b/frontend/src/views/bug-management/components/bugDetailTab.vue index 6c92135bfd..9dbbb26b2a 100644 --- a/frontend/src/views/bug-management/components/bugDetailTab.vue +++ b/frontend/src/views/bug-management/components/bugDetailTab.vue @@ -202,7 +202,6 @@ import { Message } from '@arco-design/web-vue'; import MsButton from '@/components/pure/ms-button/index.vue'; - import { FormRuleItem } from '@/components/pure/ms-form-create/types'; import MsIconfont from '@/components/pure/ms-icon-font/index.vue'; import MsRichText from '@/components/pure/ms-rich-text/MsRichText.vue'; import MsFileList from '@/components/pure/ms-upload/fileList.vue'; @@ -232,7 +231,6 @@ import { useAppStore } from '@/store'; import { downloadByteFile, sleep } from '@/utils'; import { hasAnyPermission } from '@/utils/permission'; - import { findParents, Option } from '@/utils/recursion'; import { BugEditCustomField, BugEditCustomFieldItem, BugEditFormObject } from '@/models/bug-management'; import { AssociatedList, AttachFileInfo } from '@/models/caseManagement/featureCase'; @@ -248,7 +246,7 @@ const props = defineProps<{ detailInfo: BugEditFormObject; - formItem: FormRuleItem[]; + // formItem: FormRuleItem[]; allowEdit?: boolean; // 是否允许编辑 isPlatformDefaultTemplate: boolean; // 是否是平台默认模板 platformSystemFields: BugEditCustomField[]; // 平台系统字段 @@ -453,26 +451,22 @@ return fileIds; } + function getDetailCustomFields() { + return props.detailInfo.customFields.map((item: any) => { + return { + id: item.id, + name: item.name, + type: item.type, + value: item.value, + }; + }); + } + // 保存操作 async function handleSave() { try { confirmLoading.value = true; - const { formItem } = props; - const customFields: BugEditCustomFieldItem[] = []; - if (formItem && formItem.length) { - formItem.forEach((item: FormRuleItem) => { - let itemVal = item.value; - if (item.sourceType === 'CASCADER') { - itemVal = findParents(item.options as Option[], item.value as string, []) || ''; - } - customFields.push({ - id: item.field as string, - name: item.title as string, - type: item.sourceType as string, - value: Array.isArray(itemVal) ? JSON.stringify(itemVal) : (itemVal as string), - }); - }); - } + const customFields: BugEditCustomFieldItem[] = getDetailCustomFields(); if (props.isPlatformDefaultTemplate) { // 平台系统默认字段插入自定义集合 props.platformSystemFields.forEach((item) => { diff --git a/frontend/src/views/bug-management/utils.ts b/frontend/src/views/bug-management/utils.ts index 97ce717e38..5170873127 100644 --- a/frontend/src/views/bug-management/utils.ts +++ b/frontend/src/views/bug-management/utils.ts @@ -4,9 +4,13 @@ * @param {stafileInfotus} 文件file */ +import { FormRuleItem } from '@/components/pure/ms-form-create/types'; import { getFileEnum } from '@/components/pure/ms-upload/iconMap'; import { MsFileItem } from '@/components/pure/ms-upload/types'; +import { findParents, Option } from '@/utils/recursion'; + +import { BugEditCustomFieldItem } from '@/models/bug-management'; import { AssociatedList } from '@/models/caseManagement/featureCase'; export function convertToFileByBug(fileInfo: AssociatedList): MsFileItem { @@ -68,3 +72,22 @@ export function convertToFileByDetail(fileInfo: AssociatedList): MsFileItem { associateId, }; } + +export function makeCustomFieldsParams(formItem: FormRuleItem[]) { + const customFields: BugEditCustomFieldItem[] = []; + if (formItem && formItem.length) { + formItem.forEach((item: FormRuleItem) => { + let itemVal = item.value; + if (item.sourceType === 'CASCADER') { + itemVal = findParents(item.options as Option[], item.value as string, []) || ''; + } + customFields.push({ + id: item.field as string, + name: item.title as string, + type: item.sourceType as string, + value: Array.isArray(itemVal) ? JSON.stringify(itemVal) : (itemVal as string), + }); + }); + } + return customFields; +} diff --git a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue index 16c19475bf..80063d9532 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/caseDetailDrawer.vue @@ -2,7 +2,7 @@ - {{ + {{ t('caseManagement.featureCase.detailDisplaySetting') }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ t('caseManagement.featureCase.basicInfo') }} - - {{ t('caseManagement.featureCase.tableColumnModule') }} - - - - - {{ node.name }} - - - - - - - - - - {{ t('caseManagement.featureCase.tableColumnCreateUser') }} - - {{ detailInfo?.createUserName }} - - {{ detailInfo?.createUserName }} - - - {{ t('caseManagement.featureCase.tableColumnCreateTime') }} - {{ dayjs(detailInfo?.createTime).format('YYYY-MM-DD HH:mm:ss') }} - - - {{ t('caseManagement.featureCase.tableColumnTag') }} - - {{ item }} - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + import('./tabContent/tabBug/tabDefect.vue')); const TabCaseTable = defineAsyncComponent(() => import('./tabContent/tabCase/tabCaseTable.vue')); @@ -351,26 +259,6 @@ break; } } - const initDetail: DetailCase = { - id: '', - projectId: '', - templateId: '', - name: '', - prerequisite: '', // prerequisite - caseEditType: '', // 编辑模式:步骤模式/文本模式 - steps: '', - textDescription: '', - expectedResult: '', // 预期结果 - description: '', - publicCase: false, // 是否公共用例 - moduleId: '', - versionId: '', - tags: [], - customFields: [], // 自定义字段集合 - relateFileMetaIds: [], // 关联文件ID集合 - functionalPriority: '', - reviewStatus: 'UN_REVIEWED', - }; const caseTree = ref([]); @@ -382,7 +270,7 @@ } } const route = useRoute(); - const detailInfo = ref({ ...initDetail }); + const detailInfo = ref(cloneDeep(defaultCaseDetail)); const customFields = ref([]); const caseLevels = ref('P0'); @@ -451,8 +339,8 @@ } } - const followLoading = ref(false); // 关注 + const followLoading = ref(false); async function followHandler() { followLoading.value = true; try { @@ -506,50 +394,12 @@ const formRules = ref([]); const formItem = ref([]); - // 表单配置项 - const options = { - resetBtn: false, // 不展示默认配置的重置和提交 - submitBtn: false, - on: false, // 取消绑定on事件 - form: { - layout: 'horizontal', - labelAlign: 'left', - labelColProps: { - span: 9, - }, - wrapperColProps: { - span: 15, - }, - contentClass: 'contentClass', - autoLabelWidth: true, - }, - // 暂时默认 - row: { - gutter: 0, - }, - wrap: { - 'asterisk-position': 'end', - 'validate-trigger': ['change'], - 'hide-asterisk': true, - }, - }; - const fApi = ref(null); // 初始化表单 function initForm() { formRules.value = initFormCreate(customFields.value, ['FUNCTIONAL_CASE:READ+UPDATE']); } - const tabDetailRef = ref(); - function handleChangeModule(value: string | number | LabelValue | Array | LabelValue[] | undefined) { - detailInfo.value.moduleId = value as string; - tabDetailRef.value.handleOK(); - } - - function filterTreeNode(searchValue: string, nodeValue: TreeNodeData) { - return (nodeValue as ModuleTreeNode).name.toLowerCase().indexOf(searchValue.toLowerCase()) > -1; - } - function getTotal(key: string) { switch (key) { case 'detail': @@ -568,7 +418,9 @@ }, { deep: true } ); + const settingDrawerRef = ref(); + watch( () => props.visible, (val) => { @@ -621,17 +473,20 @@ isActive.value = !isActive.value; } - const changeHandler = debounce(() => { - tabDetailRef.value.handleOK(); - }, 300); - const tabDefaultSettingList: TabItemType[] = [ + { + value: 'basicInfo', + label: t('caseManagement.featureCase.basicInfo'), + canHide: false, + isShow: true, + }, { value: 'detail', label: t('caseManagement.featureCase.detail'), canHide: false, isShow: true, }, + { value: 'case', label: t('caseManagement.featureCase.case'), @@ -724,6 +579,13 @@ diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugList.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugList.vue index 99080653a2..1d93011cf6 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugList.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugList.vue @@ -4,15 +4,7 @@ {{ record.num }} - - {{ record.name }} - - - {{ t('caseManagement.featureCase.preview') }} - - - - + {{ record.statusName || '-' }} @@ -59,6 +51,7 @@ import MsBaseTable from '@/components/pure/ms-table/base-table.vue'; import type { MsTableColumn } from '@/components/pure/ms-table/type'; import useTable from '@/components/pure/ms-table/useTable'; + import BugNamePopover from '@/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugNamePopover.vue'; import { useI18n } from '@/hooks/useI18n'; import { useAppStore } from '@/store'; @@ -157,7 +150,7 @@ }); - + --> diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugNamePopover.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugNamePopover.vue new file mode 100644 index 0000000000..a8b2d4662e --- /dev/null +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugNamePopover.vue @@ -0,0 +1,32 @@ + + {{ props.name }} + + {{ t('caseManagement.featureCase.preview') }} + + + + + + + + + diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/linkDefectDrawer.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/linkDefectDrawer.vue index f82fe50b03..b0ab4e0789 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/linkDefectDrawer.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/linkDefectDrawer.vue @@ -38,17 +38,7 @@ v-on="propsEvent" > - - {{ characterLimit(record.name) }} - - {{ - t('caseManagement.featureCase.preview') - }} - - - - - + @@ -62,11 +52,11 @@ import MsBaseTable from '@/components/pure/ms-table/base-table.vue'; import type { MsTableColumn } from '@/components/pure/ms-table/type'; import useTable from '@/components/pure/ms-table/useTable'; + import BugNamePopover from '@/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugNamePopover.vue'; import { getDrawerDebugPage } from '@/api/modules/case-management/featureCase'; import { useI18n } from '@/hooks/useI18n'; import { useAppStore } from '@/store'; - import { characterLimit } from '@/utils'; import { TableKeyEnum } from '@/enums/tableEnum'; @@ -104,10 +94,7 @@ title: 'caseManagement.featureCase.defectName', slotName: 'name', dataIndex: 'name', - showInTable: true, - showTooltip: true, width: 300, - ellipsis: true, showDrag: false, }, diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue index 074f4985d0..981ddb517b 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabBug/tabDefect.vue @@ -67,21 +67,14 @@ :load-params="{ caseId: props.caseId, }" + :can-edit="true" @link="linkDefect" @new="createDefect" @cancel-link="cancelLink" /> - - {{ characterLimit(record.name) }} - - {{ t('caseManagement.featureCase.preview') }} - - - - - + @@ -145,6 +138,7 @@ import AddDefectDrawer from './addDefectDrawer.vue'; import BugList from './bugList.vue'; import LinkDefectDrawer from './linkDefectDrawer.vue'; + import BugNamePopover from '@/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugNamePopover.vue'; import TableFilter from '@/views/case-management/caseManagementFeature/components/tableFilter.vue'; import { getBugList, getCustomOptionHeader } from '@/api/modules/bug-management'; @@ -194,20 +188,14 @@ title: 'caseManagement.featureCase.tableColumnID', dataIndex: 'num', width: 100, - showInTable: true, showTooltip: true, - showDrag: false, fixed: 'left', }, { title: 'caseManagement.featureCase.defectName', slotName: 'name', dataIndex: 'name', - showInTable: true, - showTooltip: false, width: 300, - ellipsis: true, - showDrag: false, }, { title: 'caseManagement.featureCase.defectState', @@ -217,19 +205,13 @@ options: [], labelKey: 'text', }, - showInTable: true, width: 150, - ellipsis: true, - showDrag: false, }, { title: 'common.creator', slotName: 'createUserName', dataIndex: 'createUserName', - showInTable: true, - showTooltip: true, width: 200, - ellipsis: true, }, { title: 'caseManagement.featureCase.updateUser', @@ -239,19 +221,14 @@ options: [], labelKey: 'text', }, - showInTable: true, width: 200, - ellipsis: true, }, { title: 'caseManagement.featureCase.defectSource', slotName: 'source', dataIndex: 'source', - showInTable: true, showTooltip: true, width: 100, - ellipsis: true, - showDrag: false, }, { title: 'caseManagement.featureCase.tableColumnActions', @@ -259,8 +236,6 @@ dataIndex: 'operation', fixed: 'right', width: 100, - showInTable: true, - showDrag: false, }, ]); @@ -278,31 +253,21 @@ title: 'caseManagement.featureCase.defectName', slotName: 'name', dataIndex: 'name', - showInTable: true, - showTooltip: true, width: 250, - ellipsis: true, - showDrag: false, }, { title: 'caseManagement.featureCase.planName', slotName: 'testPlanName', dataIndex: 'testPlanName', - showInTable: true, showTooltip: true, width: 200, - ellipsis: true, - showDrag: false, }, { title: 'caseManagement.featureCase.defectState', slotName: 'defectState', dataIndex: 'defectState', - showInTable: true, showTooltip: true, width: 150, - ellipsis: true, - showDrag: false, }, { title: 'caseManagement.featureCase.updateUser', @@ -312,10 +277,8 @@ options: [], labelKey: 'text', }, - showInTable: true, showTooltip: true, width: 200, - ellipsis: true, }, ]; diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/demand.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/demand.vue index 53fcfe1b76..abe3b85ded 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/demand.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDemand/demand.vue @@ -6,13 +6,13 @@ v-if="caseEnable" v-permission="['FUNCTIONAL_CASE:READ+ADD', 'FUNCTIONAL_CASE:READ+UPDATE', 'FUNCTIONAL_CASE:READ+DELETE']" type="primary" + class="mr-2" @click="associatedDemand" > {{ t('caseManagement.featureCase.associatedDemand') }} diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue index a7abe0b05c..13c44986fe 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabDetail.vue @@ -303,7 +303,6 @@ form: DetailCase; allowEdit?: boolean; // 是否允许编辑 formRules?: FormRuleItem[]; // 编辑表单 - formApi?: any; isTestPlan?: boolean; // 测试计划页面的 isDisabledTestPlan?: boolean; // 测试计划页面-已归档 }>(), @@ -485,16 +484,12 @@ caseFormRef.value?.validate().then(async (res: any) => { if (!res) { try { - props.formApi?.validate().then(async (valid: any) => { - if (valid === true) { - confirmLoading.value = true; - await updateCaseRequest(getParams()); - confirmLoading.value = false; - Message.success(t('caseManagement.featureCase.editSuccess')); - isEditPreposition.value = false; - emit('updateSuccess'); - } - }); + confirmLoading.value = true; + await updateCaseRequest(getParams()); + confirmLoading.value = false; + Message.success(t('caseManagement.featureCase.editSuccess')); + isEditPreposition.value = false; + emit('updateSuccess'); } catch (error) { console.log(error); } finally { diff --git a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue index 2fff1de928..bbe7af118b 100644 --- a/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue +++ b/frontend/src/views/case-management/caseManagementFeature/components/tabContent/tabTestPlan.vue @@ -20,8 +20,7 @@ - - - + diff --git a/frontend/src/views/case-management/caseReview/components/index/popConfirm.vue b/frontend/src/views/case-management/caseReview/components/index/popConfirm.vue index 3aca1fa197..ab891ab7fc 100644 --- a/frontend/src/views/case-management/caseReview/components/index/popConfirm.vue +++ b/frontend/src/views/case-management/caseReview/components/index/popConfirm.vue @@ -115,6 +115,13 @@ } ); + function reset(val: boolean) { + if (!val) { + form.value.field = ''; + formRef.value?.resetFields(); + } + } + function beforeConfirm(done?: (closed: boolean) => void) { if (loading.value) return; formRef.value?.validate(async (errors) => { @@ -129,6 +136,7 @@ name: form.value.field, }); Message.success(t('project.fileManagement.addSubModuleSuccess')); + reset(false); emit('addFinish', form.value.field); } else if (props.mode === 'rename') { // 模块重命名 @@ -137,6 +145,7 @@ name: form.value.field, }); Message.success(t('project.fileManagement.renameSuccess')); + reset(false); emit('renameFinish', form.value.field); } if (done) { @@ -164,13 +173,6 @@ callback(t('project.fileManagement.nameExist')); } } - - function reset(val: boolean) { - if (!val) { - form.value.field = ''; - formRef.value?.resetFields(); - } - } diff --git a/frontend/src/views/test-plan/testPlan/detail/bugManagement/index.vue b/frontend/src/views/test-plan/testPlan/detail/bugManagement/index.vue index 539f13f8ff..1bfb243a04 100644 --- a/frontend/src/views/test-plan/testPlan/detail/bugManagement/index.vue +++ b/frontend/src/views/test-plan/testPlan/detail/bugManagement/index.vue @@ -20,15 +20,7 @@ {{ record.num }} - - {{ record.title }} - - - {{ t('caseManagement.featureCase.preview') }} - - - - + @@ -54,6 +46,7 @@ import useTable from '@/components/pure/ms-table/useTable'; import CaseCountPopover from './caseCountPopover.vue'; import BugDetailDrawer from '@/views/bug-management/components/bug-detail-drawer.vue'; + import BugNamePopover from '@/views/case-management/caseManagementFeature/components/tabContent/tabBug/bugNamePopover.vue'; import { getCustomOptionHeader, getPlatform } from '@/api/modules/bug-management'; import { planDetailBugPage } from '@/api/modules/test-plan/testPlan';