diff --git a/src/service/api/product.ts b/src/service/api/product.ts index bc9bd05..c6b0a47 100644 --- a/src/service/api/product.ts +++ b/src/service/api/product.ts @@ -210,7 +210,7 @@ type RequirementResponse = Omit< | 'proposerId' | 'currentHandlerUserId' | 'implementProjectId' - | 'sourceBizId' + | 'sourceBizCode' | 'attachments' > & { id: string | number; @@ -220,7 +220,7 @@ type RequirementResponse = Omit< currentHandlerUserId?: string | number | null; implementProjectId?: string | number | null; implementProjectName?: string | null; - sourceBizId?: string | number | null; + sourceBizCode?: string | null; attachments?: AttachmentItemResponse[] | null; children?: RequirementResponse[]; }; @@ -292,7 +292,7 @@ function normalizeRequirement(requirement: RequirementResponse): Api.Product.Req currentHandlerUserId: normalizeNullableStringId(requirement.currentHandlerUserId), implementProjectId: normalizeNullableStringId(requirement.implementProjectId), implementProjectName: requirement.implementProjectName ?? null, - sourceBizId: normalizeNullableStringId(requirement.sourceBizId), + sourceBizCode: requirement.sourceBizCode ?? null, attachments: normalizeAttachments(requirement.attachments), children: requirement.children?.map(normalizeRequirement) }; diff --git a/src/service/api/project.ts b/src/service/api/project.ts index 7893462..0e01e02 100644 --- a/src/service/api/project.ts +++ b/src/service/api/project.ts @@ -1026,7 +1026,7 @@ const PROJECT_REQUIREMENT_PREFIX = `${WEB_SERVICE_PREFIX}/project/project/requir type ProjectRequirementResponse = Omit< Api.Project.ProjectRequirement, - 'id' | 'projectId' | 'parentId' | 'moduleId' | 'proposerId' | 'currentHandlerUserId' | 'sourceBizId' | 'attachments' + 'id' | 'projectId' | 'parentId' | 'moduleId' | 'proposerId' | 'currentHandlerUserId' | 'sourceBizCode' | 'attachments' > & { id: string | number; projectId: string | number; @@ -1034,7 +1034,7 @@ type ProjectRequirementResponse = Omit< moduleId: string | number; proposerId: string | number; currentHandlerUserId?: string | number | null; - sourceBizId?: string | number | null; + sourceBizCode?: string | null; attachments?: AttachmentItemResponse[] | null; children?: ProjectRequirementResponse[]; }; @@ -1090,7 +1090,7 @@ function normalizeProjectRequirement(requirement: ProjectRequirementResponse): A moduleId: normalizeStringId(requirement.moduleId), proposerId: normalizeStringId(requirement.proposerId), currentHandlerUserId: normalizeNullableStringId(requirement.currentHandlerUserId), - sourceBizId: normalizeNullableStringId(requirement.sourceBizId), + sourceBizCode: requirement.sourceBizCode ?? null, attachments: normalizeAttachments(requirement.attachments), progressRate: typeof requirement.progressRate === 'number' ? requirement.progressRate : 0, children: requirement.children?.map(normalizeProjectRequirement) diff --git a/src/typings/api/product.d.ts b/src/typings/api/product.d.ts index ff57728..95043d9 100644 --- a/src/typings/api/product.d.ts +++ b/src/typings/api/product.d.ts @@ -332,8 +332,8 @@ declare namespace Api { categoryName?: string | null; /** 需求来源类型 */ sourceType: RequirementSourceType; - /** 需求来源业务ID */ - sourceBizId?: string | null; + /** 来源业务编号 */ + sourceBizCode?: string | null; /** 优先级(0低 1中 2高 3紧急) */ priority: RequirementPriority; /** 优先级名称 */ @@ -508,7 +508,7 @@ declare namespace Api { Pick & Pick< Requirement, - 'moduleId' | 'category' | 'priority' | 'statusCode' | 'currentHandlerUserId' | 'sourceType' + 'moduleId' | 'category' | 'priority' | 'statusCode' | 'currentHandlerUserId' | 'sourceBizCode' > & { productId: string; title?: string; @@ -526,6 +526,7 @@ declare namespace Api { | 'attachments' | 'category' | 'priority' + | 'sourceBizCode' | 'proposerId' | 'proposerNickname' | 'currentHandlerUserId' diff --git a/src/typings/api/project.d.ts b/src/typings/api/project.d.ts index 3a7f2a7..27abf34 100644 --- a/src/typings/api/project.d.ts +++ b/src/typings/api/project.d.ts @@ -1160,8 +1160,8 @@ declare namespace Api { categoryName?: string | null; /** 需求来源类型 */ sourceType: ProjectRequirementSourceType; - /** 来源业务 ID */ - sourceBizId?: string | null; + /** 来源业务编号 */ + sourceBizCode?: string | null; /** 优先级 */ priority: ProjectRequirementPriority; /** 优先级名称 */ @@ -1285,7 +1285,7 @@ declare namespace Api { Pick & Pick< ProjectRequirement, - 'moduleId' | 'parentId' | 'category' | 'priority' | 'statusCode' | 'currentHandlerUserId' | 'sourceType' + 'moduleId' | 'parentId' | 'category' | 'priority' | 'statusCode' | 'currentHandlerUserId' | 'sourceBizCode' > & { projectId: string; title: string; @@ -1303,6 +1303,7 @@ declare namespace Api { | 'attachments' | 'category' | 'priority' + | 'sourceBizCode' | 'proposerId' | 'proposerNickname' | 'currentHandlerUserId' diff --git a/src/views/product/requirement/index.vue b/src/views/product/requirement/index.vue index 9b7bf4d..a12b0c7 100644 --- a/src/views/product/requirement/index.vue +++ b/src/views/product/requirement/index.vue @@ -7,8 +7,7 @@ import dayjs from 'dayjs'; import { RDMS_REQ_CAN_DELETE_STATUS_DICT_CODE, RDMS_REQ_CATEGORY_DICT_CODE, - RDMS_REQ_PRIORITY_DICT_CODE, - RDMS_REQ_SOURCE_TYPE_DICT_CODE + RDMS_REQ_PRIORITY_DICT_CODE } from '@/constants/dict'; import { getStatusTagType } from '@/constants/status-tag'; import { @@ -25,7 +24,6 @@ import { import { useAuth } from '@/hooks/business/auth'; import { useDict } from '@/hooks/business/dict'; import DictTag from '@/components/custom/dict-tag.vue'; -import DictText from '@/components/custom/dict-text.vue'; import { useCurrentProduct } from '../shared/use-current-product'; import { ACTION_ICON_MAP, @@ -181,7 +179,7 @@ const searchParams = reactive({ priority: undefined as Api.Product.RequirementPriority | undefined, statusCode: undefined as Api.Product.RequirementStatusCode | undefined, currentHandlerUserId: undefined as string | undefined, - sourceType: undefined as Api.Product.RequirementSourceType | undefined + sourceBizCode: undefined as string | undefined }); const createVisible = ref(false); @@ -384,15 +382,15 @@ const columns = computed(() => [ minWidth: 80, formatter: (row: Api.Product.Requirement) => row.category }, - { - prop: 'sourceType', - label: '需求来源', - minWidth: 80, - align: 'center', - formatter: (row: Api.Product.Requirement) => ( - - ) - }, + // { + // prop: 'sourceType', + // label: '需求来源', + // minWidth: 80, + // align: 'center', + // formatter: (row: Api.Product.Requirement) => ( + // + // ) + // }, // { // prop: 'description', // label: '内容', @@ -415,19 +413,15 @@ const columns = computed(() => [ formatter: (row: Api.Product.Requirement) => getMemberLabel(row.currentHandlerUserId) }, { - prop: 'sourceBizId', + prop: 'sourceBizCode', label: '来源业务编号', minWidth: 140, formatter: (row: Api.Product.Requirement) => { - if (!row.sourceBizId || row.sourceType === 'manual') { + if (!row.sourceBizCode) { return '--'; } - return ( - - {row.sourceBizId} - - ); + return row.sourceBizCode; } }, { @@ -649,7 +643,7 @@ async function loadTreeData() { priority: searchParams.priority, statusCode: searchParams.statusCode, currentHandlerUserId: searchParams.currentHandlerUserId, - sourceType: searchParams.sourceType + sourceBizCode: searchParams.sourceBizCode?.trim() || undefined }); if (error || !data) { @@ -705,7 +699,7 @@ function handleResetSearch() { searchParams.priority = undefined; searchParams.statusCode = undefined; searchParams.currentHandlerUserId = undefined; - searchParams.sourceType = undefined; + searchParams.sourceBizCode = undefined; pagination.pageNo = 1; reloadTable(); } @@ -1057,10 +1051,6 @@ onMounted(async () => { opacity: 0.6; } -:deep(.requirement-source-link) { - padding: 0; -} - :deep(.el-table__row[class*='el-table__row--level-']:not(.el-table__row--level-0) td:first-child .cell) { color: transparent; } diff --git a/src/views/product/requirement/modules/requirement-create-dialog.vue b/src/views/product/requirement/modules/requirement-create-dialog.vue index 8d9071d..e702829 100644 --- a/src/views/product/requirement/modules/requirement-create-dialog.vue +++ b/src/views/product/requirement/modules/requirement-create-dialog.vue @@ -74,6 +74,7 @@ interface Model { moduleId: string | null; category: string; priority: string | null; + sourceBizCode: string; expectedTime: string | null; proposerId: string; currentHandlerUserId: string; @@ -139,6 +140,7 @@ function createDefaultModel(): Model { moduleId: props.defaultModuleId || null, category: '功能需求', priority: '3', + sourceBizCode: '', expectedTime: null, proposerId: '', currentHandlerUserId: '', @@ -186,6 +188,7 @@ async function handleSubmit() { attachments: [...model.value.attachments], category: model.value.category, priority: Number(model.value.priority) as Api.Product.RequirementPriority, + sourceBizCode: model.value.sourceBizCode.trim() || null, expectedTime: model.value.expectedTime, proposerId: model.value.proposerId, proposerNickname, @@ -315,6 +318,10 @@ watch( /> + + + + diff --git a/src/views/product/requirement/modules/requirement-detail-dialog.vue b/src/views/product/requirement/modules/requirement-detail-dialog.vue index 87fe29b..0d541b3 100644 --- a/src/views/product/requirement/modules/requirement-detail-dialog.vue +++ b/src/views/product/requirement/modules/requirement-detail-dialog.vue @@ -64,6 +64,7 @@ interface Model { moduleId: string | null; category: string; priority: string | null; + sourceBizCode: string; expectedTime: string | null; proposerId: string; proposerNickname: string; @@ -201,6 +202,7 @@ function createDefaultModel(): Model { moduleId: null, category: '', priority: '3', + sourceBizCode: '', expectedTime: null, proposerId: '', proposerNickname: '', @@ -252,6 +254,7 @@ async function handleSubmit() { attachments: [...model.value.attachments], category: model.value.category, priority: Number(model.value.priority) as Api.Product.RequirementPriority, + sourceBizCode: model.value.sourceBizCode.trim() || null, expectedTime: model.value.expectedTime, proposerId: model.value.proposerId, proposerNickname: model.value.proposerNickname, @@ -317,6 +320,7 @@ function transformRequirementData(data: Api.Product.Requirement): typeof model.v moduleId: data.moduleId || null, category: data.category || '', priority: data.priority === null || data.priority === undefined ? null : String(data.priority), + sourceBizCode: data.sourceBizCode || '', expectedTime: formatExpectedTime(data.expectedTime), proposerId: data.proposerId || '', proposerNickname: data.proposerNickname || '', @@ -446,6 +450,17 @@ watch( + + + + + diff --git a/src/views/product/requirement/modules/requirement-search.vue b/src/views/product/requirement/modules/requirement-search.vue index fa03c1e..9c77ddf 100644 --- a/src/views/product/requirement/modules/requirement-search.vue +++ b/src/views/product/requirement/modules/requirement-search.vue @@ -1,8 +1,8 @@