fix(缺陷管理): 缺陷详情ID展示有误

--bug=1036415 --user=宋昌昌 【缺陷管理】缺陷详情-ID展示错误 https://www.tapd.cn/55049933/s/1469203
This commit is contained in:
song-cc-rock 2024-03-05 11:15:11 +08:00 committed by 刘瑞斌
parent 48a3f76cd7
commit fc4e678645
3 changed files with 43 additions and 39 deletions

View File

@ -17,6 +17,9 @@ public class BugDetailDTO {
@Size(min = 1, max = 50, message = "{bug.id.length_range}", groups = {Created.class, Updated.class})
private String id;
@Schema(description = "业务ID")
private Integer num;
@Schema(description = "缺陷标题")
@Size(min = 1, max = 300, message = "{bug.title.length_range}", groups = {Created.class, Updated.class})
private String title;

View File

@ -252,6 +252,7 @@ public class BugService {
List<BugCustomFieldDTO> allCustomFields = extBugCustomFieldMapper.getBugAllCustomFields(List.of(id), bug.getProjectId());
BugDetailDTO detail = new BugDetailDTO();
detail.setId(id);
detail.setNum(bug.getNum());
detail.setProjectId(bug.getProjectId());
detail.setTemplateId(template.getId());
detail.setPlatformDefault(template.getPlatformDefault());

View File

@ -4,7 +4,7 @@
v-model:visible="showDrawerVisible"
:width="1200"
:footer="false"
:title="t('bugManagement.detail.title', { id: detailInfo?.id, name: detailInfo?.title })"
:title="t('bugManagement.detail.title', { id: detailInfo?.num, name: detailInfo?.title })"
:detail-id="props.detailId"
:detail-index="props.detailIndex"
:get-detail-func="getBugDetail"
@ -159,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();
@ -432,12 +432,12 @@ const router = useRouter();
}
}
watch(
() => showDrawerVisible.value,
(val) => {
if (val) {
activeTab.value = 'detail';
}
() => showDrawerVisible.value,
(val) => {
if (val) {
activeTab.value = 'detail';
}
}
);
</script>