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
3703e25a
authored
2025-08-01 17:36:03 +0800
by
lxs
Committed by
lihua
2025-10-13 11:26:37 +0800
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据定价对接计算接口
1 parent
79543f62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
src/views/data_pricing/calculateConfig.vue
src/views/data_pricing/calculateConfig.vue
View file @
3703e25
...
...
@@ -905,16 +905,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
||
{};
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
;
// 重新抛出错误
}
...
...
@@ -933,8 +932,10 @@ const checkForm = (type) => {
const
priceData
=
await
getCalculatPrice
(
paramsInfo
);
// 显示结果
dataTransactionPrice
.
value
=
priceData
.
transactionPrice
.
toFixed
(
2
);
if
(
type
==
'export'
)
{
loading
.
value
=
true
;
if
(
type
==
'calculate'
)
{
loading
.
value
=
false
;
}
else
if
(
type
==
'export'
)
{
const
exportOut
=
{
one
:
priceData
.
one
,
two
:
priceData
.
two
,
...
...
@@ -958,12 +959,11 @@ const checkForm = (type) => {
message
:
'下载报告请求失败'
,
});
})
}
else
if
(
type
==
'submit'
)
{
}
else
{
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