77ed6a52 by lxs Committed by lihua

数据定价更新

1 parent ce3bab79
...@@ -904,32 +904,41 @@ const checkForm = (type) => { ...@@ -904,32 +904,41 @@ const checkForm = (type) => {
904 // 字典 904 // 字典
905 let dictList: any = [], hasModelScore = false; 905 let dictList: any = [], hasModelScore = false;
906 const dictStr = exportData.value.map(e => { 906 const dictStr = exportData.value.map(e => {
907 const targetList: any = []; 907 // 检查是否有质量模型评分
908 e.pricingTargetRSVOS.map(t => { 908 hasModelScore = hasModelScore || e.pricingTargetRSVOS.some(
909 if (t.targetType == '2' && t.functionName == '1') { 909 t => t.targetType === '2' && t.functionName === '1'
910 hasModelScore = true; 910 );
911 } 911
912 // 维度指标数大于1显示明细 912 // 只有当维度指标数大于1时才处理明细
913 if (e.pricingTargetRSVOS.length > 1) { 913 if (e.pricingTargetRSVOS.length > 1) {
914 targetList.push({ 914 const targetStr = e.pricingTargetRSVOS
915 targetName: t.targetName, 915 .map(t => `${t.targetName}为${changeNum(t.tNum, 2)}`)
916 tNum: t.tNum, 916 .join('、');
917 }) 917
918 dictList.push(`${e.dimensionalityName}为${changeNum(e.sNum, 2)},其中${targetStr}`);
918 } 919 }
919 }) 920
920 const targetStr = targetList.length ? targetList.map(t => `${t.targetName}为${changeNum(t.tNum, 2)}`).join('、') : '';
921 targetStr && dictList.push(`${e.dimensionalityName}为${changeNum(e.sNum, 2)},其中${targetStr}`);
922 return `${e.dimensionalityName}为${changeNum(e.sNum, 2)}`; 921 return `${e.dimensionalityName}为${changeNum(e.sNum, 2)}`;
923 }) 922 })
924 let dictListStr = `${dictStr.join(',')}。\n${dictList.join(';\n')}` 923 let dictListStr = `${dictStr.join(',')}。\n${dictList.join(';\n')}`
925 // 质量模型 924 // 质量模型
926 if (hasModelScore) { 925 if (hasModelScore) {
927 const largeCategoryScoreList = qualityScoreData.value.largeCategoryScoreList || []; 926 const { largeCategoryScoreList = [], qualityScore = 0 } = qualityScoreData.value;
928 const largeCategoryScore = largeCategoryScoreList.map(q => `${q.largeCategoryName}方面得分为${changeNum(q.largeCategoryScore || 0, 2)}`); 927 const qualityParts = [
929 dictListStr += largeCategoryScore.length ? `;\n数据的总体质量得分为${changeNum(qualityScoreData.value.qualityScore || 0, 2)}。其中${largeCategoryScore.join(',')}` : `;\n数据的总体质量得分为${changeNum(qualityScoreData.value.qualityScore || 0, 2)}。` 928 `数据的总体质量得分为${changeNum(qualityScore, 2)}`
929 ];
930
931 if (largeCategoryScoreList.length) {
932 const categoryScores = largeCategoryScoreList.map(
933 q => `${q.largeCategoryName}方面得分为${changeNum(q.largeCategoryScore || 0, 2)}`
934 );
935 qualityParts.push(`其中${categoryScores.join(',')}`);
930 } 936 }
931 exportOut.three = `${baseConfigFormInfo.belongingEntityGuid}持有的\"${damName}\"的数据(患者人次)单价为${changeNum(dataTransactionPrice.value, 2)}元`; 937
932 exportOut.three = dictListStr ? `${exportOut.three};其中${dictListStr}` : `${exportOut.three}。` 938 dictListStr += `;\n${qualityParts.join('。')}`;
939 }
940 exportOut.three = `${baseConfigFormInfo.belongingEntityGuid}持有的"${damName}"的数据(患者人次)单价为${changeNum(dataTransactionPrice.value, 2)}元${dictListStr ? `;其中${dictListStr}` : '。'}`;
941
933 exportModelScore(exportOut).then((res: any) => { 942 exportModelScore(exportOut).then((res: any) => {
934 loading.value = false; 943 loading.value = false;
935 if (res && !res.msg) { 944 if (res && !res.msg) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!