From db346e6392ee9457ee4e26a7ec9b221fee4b4ed2 Mon Sep 17 00:00:00 2001 From: lijing1 Date: Mon, 13 Apr 2026 14:09:31 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=96=B0=E5=A2=9E=E4=BB=A3=E5=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../newDemand/components/lib.ts | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/views/task/simulationTask/newDemand/components/lib.ts b/src/views/task/simulationTask/newDemand/components/lib.ts index 4c0c5ba2..e49aa019 100644 --- a/src/views/task/simulationTask/newDemand/components/lib.ts +++ b/src/views/task/simulationTask/newDemand/components/lib.ts @@ -8,8 +8,8 @@ import { ElMessage } from 'element-plus'; // 初始化 export const initDetailData = async (initData: any) => { - const { data = {}, ref, hideKeys } = initData; // hideKeys必须传递hideKeys.value,否则hideKeys无法双向绑定 + const { data = {}, ref, hideKeys } = initData; if (data.tMemberList) { data.tMemberList = getMemberListIds(data.tMemberList); } @@ -17,6 +17,7 @@ export const initDetailData = async (initData: any) => { data.aMemberList = getMemberListIds(data.aMemberList); } if (data.pMemberList) { + data.pMemberName = data.pMemberList[0].nickname || ''; data.pMemberList = getMemberListIds(data.pMemberList); } if (data.projectId) { @@ -51,19 +52,20 @@ export const initDetailData = async (initData: any) => { data.produceLine = data.extras[index]?.propertyValue; } } - if (data.projectUndertaker && data.simType) { - const params = { - deptName: data.projectUndertaker, - discipline: data.simType, - }; - const res = await queryByDeptAndDisciplineApi(params); - if (res.code === 200) { - if (res.data[0]) { - data.pMemberName = res.data[0]?.userResp?.nickname || ''; - data.pMemberList = res.data[0]?.userId || ''; - } - } - } + // 暂时废弃,用详情里的默认值 + // if (data.projectUndertaker && data.simType) { + // const params = { + // deptName: data.projectUndertaker, + // discipline: data.simType, + // }; + // const res = await queryByDeptAndDisciplineApi(params); + // if (res.code === 200) { + // if (res.data[0]) { + // data.pMemberName = res.data[0]?.userResp?.nickname || ''; + // data.pMemberList = res.data[0]?.userId || ''; + // } + // } + // } let newKeys: any = [...(hideKeys.value || [])]; data.extras?.forEach((item: any) => { // 更具需求时间,默认展示需求紧急说明