fix(缺陷管理): 详情更多增加复制
This commit is contained in:
parent
6c5a4470e7
commit
185848ef7d
|
@ -101,6 +101,7 @@ export interface GroupItem {
|
|||
description: string;
|
||||
projectId: string;
|
||||
envGroupProject: EnvGroupProjectItem[];
|
||||
environmentGroupInfo?: EnvGroupProjectItem[];
|
||||
}
|
||||
|
||||
export interface DragParam {
|
||||
|
|
|
@ -60,6 +60,10 @@
|
|||
<span> {{ t('caseManagement.featureCase.more') }}</span>
|
||||
</div>
|
||||
<template #content>
|
||||
<a-doption @click="handleCopy">
|
||||
<MsIcon type="icon-icon_copy_filled" class="font-[16px]" />
|
||||
{{ t('common.copy') }}
|
||||
</a-doption>
|
||||
<a-doption class="error-6 text-[rgb(var(--danger-6))]" @click="deleteHandler">
|
||||
<MsIcon type="icon-icon_delete-trash_outlined" class="font-[16px] text-[rgb(var(--danger-6))]" />
|
||||
{{ t('common.delete') }}
|
||||
|
@ -155,43 +159,43 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {defineModel, ref} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
import {Message} from '@arco-design/web-vue';
|
||||
import {debounce} from 'lodash-es';
|
||||
import { defineModel, ref } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { debounce } from 'lodash-es';
|
||||
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
import MsFormCreate from '@/components/pure/ms-form-create/ms-form-create.vue';
|
||||
import type {FormItem, FormRuleItem} from '@/components/pure/ms-form-create/types';
|
||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||
import MsSplitBox from '@/components/pure/ms-split-box/index.vue';
|
||||
import type {MsPaginationI} from '@/components/pure/ms-table/type';
|
||||
import MsTagsInput from '@/components/pure/ms-tags-input/index.vue';
|
||||
import {CommentInput} from '@/components/business/ms-comment';
|
||||
import {CommentParams} from '@/components/business/ms-comment/types';
|
||||
import MsDetailDrawer from '@/components/business/ms-detail-drawer/index.vue';
|
||||
import BugCaseTab from './bugCaseTab.vue';
|
||||
import BugDetailTab from './bugDetailTab.vue';
|
||||
import BugHistoryTab from './bugHistoryTab.vue';
|
||||
import CommentTab from './commentTab.vue';
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
import MsFormCreate from '@/components/pure/ms-form-create/ms-form-create.vue';
|
||||
import type { FormItem, FormRuleItem } from '@/components/pure/ms-form-create/types';
|
||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||
import MsSplitBox from '@/components/pure/ms-split-box/index.vue';
|
||||
import type { MsPaginationI } from '@/components/pure/ms-table/type';
|
||||
import MsTagsInput from '@/components/pure/ms-tags-input/index.vue';
|
||||
import { CommentInput } from '@/components/business/ms-comment';
|
||||
import { CommentParams } from '@/components/business/ms-comment/types';
|
||||
import MsDetailDrawer from '@/components/business/ms-detail-drawer/index.vue';
|
||||
import BugCaseTab from './bugCaseTab.vue';
|
||||
import BugDetailTab from './bugDetailTab.vue';
|
||||
import BugHistoryTab from './bugHistoryTab.vue';
|
||||
import CommentTab from './commentTab.vue';
|
||||
|
||||
import {
|
||||
createOrUpdateComment,
|
||||
deleteSingleBug,
|
||||
followBug,
|
||||
getBugDetail,
|
||||
getTemplateById,
|
||||
} from '@/api/modules/bug-management/index';
|
||||
import {useI18n} from '@/hooks/useI18n';
|
||||
import useModal from '@/hooks/useModal';
|
||||
import {useAppStore} from '@/store';
|
||||
import {characterLimit} from '@/utils';
|
||||
import {
|
||||
createOrUpdateComment,
|
||||
deleteSingleBug,
|
||||
followBug,
|
||||
getBugDetail,
|
||||
getTemplateById,
|
||||
} from '@/api/modules/bug-management/index';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useModal from '@/hooks/useModal';
|
||||
import { useAppStore } from '@/store';
|
||||
import { characterLimit } from '@/utils';
|
||||
|
||||
import {BugEditCustomField, BugEditFormObject, BugTemplateRequest} from '@/models/bug-management';
|
||||
import {SelectValue} from '@/models/projectManagement/menuManagement';
|
||||
import {RouteEnum} from '@/enums/routeEnum';
|
||||
import { BugEditCustomField, BugEditFormObject, BugTemplateRequest } from '@/models/bug-management';
|
||||
import { SelectValue } from '@/models/projectManagement/menuManagement';
|
||||
import { RouteEnum } from '@/enums/routeEnum';
|
||||
|
||||
const router = useRouter();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const detailDrawerRef = ref<InstanceType<typeof MsDetailDrawer>>();
|
||||
const wrapperRef = ref();
|
||||
|
@ -248,7 +252,12 @@ const router = useRouter();
|
|||
const templateChange = async (v: SelectValue, valueObj: BugEditFormObject, request: BugTemplateRequest) => {
|
||||
if (v) {
|
||||
try {
|
||||
const res = await getTemplateById({ projectId: appStore.currentProjectId, id: v, fromStatusId: request.fromStatusId, platformBugKey: request.platformBugKey});
|
||||
const res = await getTemplateById({
|
||||
projectId: appStore.currentProjectId,
|
||||
id: v,
|
||||
fromStatusId: request.fromStatusId,
|
||||
platformBugKey: request.platformBugKey,
|
||||
});
|
||||
getFormRules(res.customFields, valueObj);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
@ -268,7 +277,7 @@ const router = useRouter();
|
|||
});
|
||||
}
|
||||
// 初始化自定义字段
|
||||
await templateChange(templateId, tmpObj, {platformBugKey: detail.platformBugId, fromStatusId: detail.status});
|
||||
await templateChange(templateId, tmpObj, { platformBugKey: detail.platformBugId, fromStatusId: detail.status });
|
||||
}
|
||||
|
||||
const editLoading = ref<boolean>(false);
|
||||
|
@ -355,6 +364,18 @@ const router = useRouter();
|
|||
},
|
||||
});
|
||||
}
|
||||
// 复制bug
|
||||
function handleCopy() {
|
||||
router.push({
|
||||
name: RouteEnum.BUG_MANAGEMENT_DETAIL,
|
||||
query: {
|
||||
id: detailInfo.value.id,
|
||||
},
|
||||
params: {
|
||||
mode: 'copy',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const handelFormCreateChange = debounce(() => {
|
||||
bugDetailTabRef.value?.handleSave();
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
if (detail) {
|
||||
form.name = detail.name;
|
||||
form.description = detail.description;
|
||||
innerParams.value = detail.envGroupProject;
|
||||
innerParams.value = detail.environmentGroupInfo || [];
|
||||
}
|
||||
};
|
||||
const handleSave = () => {
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
v-model="evnGroupList"
|
||||
ghost-class="ghost"
|
||||
handle=".drag-handle"
|
||||
@end="handleEnvGroupPosChange"
|
||||
@update="handleEnvGroupPosChange"
|
||||
>
|
||||
<div
|
||||
v-for="element in evnGroupList"
|
||||
|
@ -189,7 +189,6 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { number } from 'echarts';
|
||||
import { VueDraggable } from 'vue-draggable-plus';
|
||||
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
|
@ -360,8 +359,8 @@
|
|||
const _newIndex = newIndex as number;
|
||||
const params = {
|
||||
projectId: appStore.currentProjectId,
|
||||
targetId: evnGroupList.value[_newIndex].id,
|
||||
moveId: evnGroupList.value[_oldIndex].id,
|
||||
targetId: evnGroupList.value[_oldIndex].id,
|
||||
moveId: evnGroupList.value[_newIndex].id,
|
||||
moveMode: _oldIndex > _newIndex ? 'BEFORE' : 'AFTER',
|
||||
};
|
||||
await groupEditPosEnv(params);
|
||||
|
|
Loading…
Reference in New Issue