ec686ab2 by lxs

数据定价更新

1 parent 4015cb8f
......@@ -904,32 +904,41 @@ const checkForm = (type) => {
// 字典
let dictList: any = [], hasModelScore = false;
const dictStr = exportData.value.map(e => {
const targetList: any = [];
e.pricingTargetRSVOS.map(t => {
if (t.targetType == '2' && t.functionName == '1') {
hasModelScore = true;
}
// 维度指标数大于1显示明细
// 检查是否有质量模型评分
hasModelScore = hasModelScore || e.pricingTargetRSVOS.some(
t => t.targetType === '2' && t.functionName === '1'
);
// 只有当维度指标数大于1时才处理明细
if (e.pricingTargetRSVOS.length > 1) {
targetList.push({
targetName: t.targetName,
tNum: t.tNum,
})
const targetStr = e.pricingTargetRSVOS
.map(t => `${t.targetName}为${changeNum(t.tNum, 2)}`)
.join('、');
dictList.push(`${e.dimensionalityName}为${changeNum(e.sNum, 2)},其中${targetStr}`);
}
})
const targetStr = targetList.length ? targetList.map(t => `${t.targetName}为${changeNum(t.tNum, 2)}`).join('、') : '';
targetStr && dictList.push(`${e.dimensionalityName}为${changeNum(e.sNum, 2)},其中${targetStr}`);
return `${e.dimensionalityName}为${changeNum(e.sNum, 2)}`;
})
let dictListStr = `${dictStr.join(',')}。\n${dictList.join(';\n')}`
// 质量模型
if (hasModelScore) {
const largeCategoryScoreList = qualityScoreData.value.largeCategoryScoreList || [];
const largeCategoryScore = largeCategoryScoreList.map(q => `${q.largeCategoryName}方面得分为${changeNum(q.largeCategoryScore || 0, 2)}`);
dictListStr += largeCategoryScore.length ? `;\n数据的总体质量得分为${changeNum(qualityScoreData.value.qualityScore || 0, 2)}。其中${largeCategoryScore.join(',')}` : `;\n数据的总体质量得分为${changeNum(qualityScoreData.value.qualityScore || 0, 2)}。`
const { largeCategoryScoreList = [], qualityScore = 0 } = qualityScoreData.value;
const qualityParts = [
`数据的总体质量得分为${changeNum(qualityScore, 2)}`
];
if (largeCategoryScoreList.length) {
const categoryScores = largeCategoryScoreList.map(
q => `${q.largeCategoryName}方面得分为${changeNum(q.largeCategoryScore || 0, 2)}`
);
qualityParts.push(`其中${categoryScores.join(',')}`);
}
exportOut.three = `${baseConfigFormInfo.belongingEntityGuid}持有的\"${damName}\"的数据(患者人次)单价为${changeNum(dataTransactionPrice.value, 2)}元`;
exportOut.three = dictListStr ? `${exportOut.three};其中${dictListStr}` : `${exportOut.three}。`
dictListStr += `;\n${qualityParts.join('。')}`;
}
exportOut.three = `${baseConfigFormInfo.belongingEntityGuid}持有的"${damName}"的数据(患者人次)单价为${changeNum(dataTransactionPrice.value, 2)}元${dictListStr ? `;其中${dictListStr}` : '。'}`;
exportModelScore(exportOut).then((res: any) => {
loading.value = false;
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!