Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
288f98d5
authored
2025-08-01 17:36:03 +0800
by
lxs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据定价对接计算接口
1 parent
9e81860c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
65 deletions
src/views/data_pricing/calculateConfig.vue
src/views/data_pricing/calculateConfig.vue
View file @
288f98d
...
...
@@ -967,17 +967,15 @@ const getCalculateParams = (baseConfigFormObj, baseConfigFormInfo) => {
const
getCalculatPrice
=
async
(
params
)
=>
{
try
{
const
res
:
any
=
await
calculatPrice
(
params
);
loading
.
value
=
false
;
if
(
res
.
code
===
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
{};
console
.
log
(
'getCalculatPrice'
,
data
);
return
data
;
// 返回计算结果以便后续使用
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
loading
.
value
=
false
;
throw
new
Error
(
res
.
msg
);
// 抛出错误以便 catch 捕获
}
}
catch
(
error
)
{
console
.
error
(
'计算价格失败:'
,
error
);
loading
.
value
=
false
;
throw
error
;
// 重新抛出错误
}
...
...
@@ -998,65 +996,8 @@ const checkForm = (type) => {
dataTransactionPrice
.
value
=
priceData
.
transactionPrice
.
toFixed
(
2
);
if
(
type
==
'calculate'
)
{
// const { signatoryData, resultInfo } = reporting(baseConfigFormInfo);
// exportData.value = resultInfo;
// calculatePrice(signatoryData);
loading
.
value
=
false
;
}
else
if
(
type
==
'export'
)
{
// const { signatoryData, resultInfo } = reporting(baseConfigFormInfo);
// exportData.value = resultInfo;
// !dataTransactionPrice.value && calculatePrice(signatoryData);
// loading.value = true;
// let exportOut: any = {};
// // 估值对象信息
// const damName = typeMap.value.dataResourceGuid.find(f => f.damGuid == baseConfigFormInfo.dataResourceGuid)?.damName || '';
// exportOut.one = `因${baseConfigFormInfo.belongingEntityGuid}拟了解其所持有的\"${damName}\"相关数据资源的价格,为此需对该行为涉及的数据资源在不同应用场景下,基于数据资源持有单位的性质、信息化程度、数据稀缺性、需求匹配等情况下,为上述经济行为提供定价参考依据。`;
// exportOut.two = `估值对象:${baseConfigFormInfo.belongingEntityGuid}持有的\"${damName}\"`;
// // 估值范围信息
// const damNames = demandTableList.value.map(item => item.menuName)
// let rangStr = `包含${damNames.join('、')}等${damNames.length}张表单,${damNames.length}张表共计${demandTableFieldAllNum.value}个字段`;
// const dataTimeliness = pricingTargetList.value.find(p => p.dictionaryName == '时效性');
// const dataTimelinessStr = dataTimeliness ? typeMap.value[`dict_${dataTimeliness.guid}`].find(f => f.value == baseConfigFormInfo[`dict_${dataTimeliness.guid}`])?.label || '' : '';
// rangStr += dataTimelinessStr ? `,时间跨度为${dataTimelinessStr}的数据` : `的数据`;
// damNames.length && (exportOut.two = `${exportOut.two}\n估值范围:${rangStr}`);
// // 字典
// let dictList: any = [], hasModelScore = false;
// const dictStr = exportData.value.map(e => {
// // 检查是否有质量模型评分
// hasModelScore = hasModelScore || e.pricingTargetRSVOS.some(
// t => t.targetType === '2' && t.functionName === '1'
// );
// // 只有当维度指标数大于1时才处理明细
// if (e.pricingTargetRSVOS.length > 1) {
// const targetStr = e.pricingTargetRSVOS
// .map(t => `${t.targetName}为${changeNum(t.tNum, 2)}`)
// .join('、');
// 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 = [], 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(',')}`);
// }
// dictListStr += `;\n${qualityParts.join('。')}`;
// }
// exportOut.three = `${baseConfigFormInfo.belongingEntityGuid}持有的"${damName}"的数据(患者人次)单价为${changeNum(dataTransactionPrice.value, 2)}元${dictListStr ? `;其中${dictListStr}` : '。'}`;
loading
.
value
=
true
;
const
exportOut
=
{
one
:
priceData
.
one
,
two
:
priceData
.
two
,
...
...
@@ -1081,14 +1022,10 @@ const checkForm = (type) => {
});
})
}
else
{
// const { signatoryData, resultInfo } = reporting(baseConfigFormInfo);
// exportData.value = resultInfo;
// !dataTransactionPrice.value && calculatePrice(signatoryData);
let
params
=
{
...
paramsInfo
,
dataTransactionPrice
:
dataTransactionPrice
.
value
,
}
loading
.
value
=
true
;
savePrice
(
params
).
then
((
res
:
any
)
=>
{
loading
.
value
=
false
;
if
(
res
.
code
==
proxy
.
$passCode
)
{
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment