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
0c16ed30
authored
2025-08-14 17:47:40 +0800
by
lxs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据定价更新
1 parent
59e44231
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
src/views/data_pricing/calculateConfig.vue
src/views/data_pricing/calculateConfig.vue
View file @
0c16ed3
...
...
@@ -149,7 +149,7 @@ const setFormItems = (info = null) => {
const
builtIndicators
=
datas
.
builtIndicators
||
buildInData
.
value
||
[];
let
buildData
=
{};
builtIndicators
.
map
(
item
=>
{
buildData
[
`build_
${
item
.
guid
}
`
]
=
item
.
targetValue
;
buildData
[
`build_
${
item
.
guid
}
`
]
=
item
.
isInputParameter
!=
'Y'
?
changeNum
(
item
.
targetValue
,
2
)
:
item
.
targetValue
!=
''
&&
item
.
targetValue
!=
null
?
parseFloat
(
item
.
targetValue
).
toFixed
(
2
)
:
''
;
});
datas
=
{
...
datas
,
...
dictData
,
...
buildData
};
baseConfigFormItems
.
value
.
map
(
item
=>
{
...
...
@@ -274,10 +274,8 @@ const getDetail = () => {
typeMap
.
value
.
modelGuid
.
unshift
(
mtem
);
baseConfigFormItems
.
value
[
0
].
options
.
unshift
(
mtem
);
};
setTimeout
(()
=>
{
getModelInfo
(
flowDetail
.
value
.
modelGuid
);
getDataTypeList
()
},
200
)
}
}).
catch
(()
=>
{
loading
.
value
=
false
;
...
...
@@ -374,18 +372,20 @@ const setBuildInFormItems = (buildList) => {
buildInData
.
value
.
push
({
guid
:
b
.
guid
,
targetName
:
buildName
,
targetValue
:
b
.
defaultValue
||
''
targetValue
:
b
.
defaultValue
||
''
,
isInputParameter
:
b
.
isInputParameter
,
})
baseConfigFormItems
.
value
.
push
({
label
:
buildName
,
type
:
'input'
,
placeholder
:
''
,
field
:
buildField
,
default
:
guid
?
''
:
b
.
isInputParameter
!=
'Y'
?
changeNum
(
b
.
defaultValue
,
2
)
:
b
.
defaultValue
!=
''
&&
b
.
defaultValue
!=
null
?
parseFloat
(
b
.
defaultValue
).
toFixed
(
2
)
:
''
,
default
:
''
,
inputType
:
'moneyNumber'
,
maxlength
:
18
,
clearable
:
true
,
disabled
:
b
.
isInputParameter
!=
'Y'
disabled
:
b
.
isInputParameter
!=
'Y'
,
required
:
true
});
baseConfigFormRules
.
value
[
buildField
]
=
[
{
required
:
true
,
message
:
`请填写
${
buildName
}
`
,
trigger
:
'blur'
},
...
...
@@ -660,8 +660,7 @@ const matchTableFields = (rData, tData) => {
},
0
);
}
const
setRowData
=
(
rowData
,
dGuid
)
=>
{
const
detailDataTable
=
(
flowDetail
.
value
.
dataPricingDemandmatchingRQVOS
||
[]).
find
(
f
=>
f
.
dataTableGuid
==
dGuid
);
const
setRowData
=
(
rowData
,
dGuid
,
detailDataTable
)
=>
{
if
(
guid
&&
dGuid
==
rowData
.
dataTableGuid
)
{
const
pricingDemandField
=
detailDataTable
?.
pricingDemandFieldRQVOS
||
[];
rowData
.
dataFields
.
map
(
f
=>
{
...
...
@@ -677,12 +676,13 @@ const setRowData = (rowData, dGuid) => {
return
accumulator
+
Number
(
currentValue
.
dataFieldsNum
);
},
0
);
resourceTableAllNum
.
value
=
tableData
.
value
.
filter
(
item
=>
item
.
dataTableGuid
!=
''
&&
item
.
dataTableGuid
!=
null
).
length
;
return
detailDataTable
.
dataTableGuid
||
''
;
}
const
setTableRowData
=
(
dGuid
,
rIndex
,
setRow
=
true
)
=>
{
let
rowData
=
tableData
.
value
[
rIndex
],
currDataTableGuid
=
""
;
setRow
&&
(
currDataTableGuid
=
setRowData
(
rowData
,
dGuid
));
let
rowData
=
tableData
.
value
[
rIndex
];
const
detailDataTable
=
(
flowDetail
.
value
.
dataPricingDemandmatchingRQVOS
||
[]).
find
(
f
=>
f
.
dataTableGuid
==
dGuid
);
setRow
&&
setRowData
(
rowData
,
dGuid
,
detailDataTable
);
const
currDataTableGuid
=
detailDataTable
?.
dataTableGuid
||
''
;
if
(
dGuid
)
{
tableLoading
.
value
=
true
;
getRegisterCatalogTableDetail
(
dGuid
).
then
((
res
:
any
)
=>
{
...
...
@@ -865,9 +865,15 @@ const getCalculateParams = (baseConfigFormObj, baseConfigFormInfo) => {
}
}
buildInData
.
value
.
map
(
item
=>
{
let
targetValue
=
baseConfigFormInfo
[
`build_
${
item
.
guid
}
`
];
if
(
typeof
targetValue
===
'string'
){
if
(
/^
[
+-
]?\d{1,3}(
,
\d{3})
*
(\.\d{2})?
$/
.
test
(
targetValue
)){
targetValue
=
parseFloat
(
targetValue
.
replace
(
/,/g
,
''
))
}
}
builtInTarget
.
push
({
...
item
,
targetValue
:
baseConfigFormInfo
[
`build_
${
item
.
guid
}
`
],
targetValue
})
})
params
.
dictionaryJson
=
Object
.
keys
(
dictionaryJson
).
length
?
JSON
.
stringify
(
dictionaryJson
)
:
''
;
...
...
@@ -954,7 +960,7 @@ const checkForm = (type) => {
message
:
'下载报告请求失败'
,
});
})
}
else
if
(
type
==
'submit'
)
{
}
else
if
(
type
==
'submit'
)
{
let
params
=
{
...
paramsInfo
,
dataTransactionPrice
:
dataTransactionPrice
.
value
,
...
...
@@ -992,6 +998,11 @@ const btnClick = async (btn, row: any = null) => {
expendTableRef
.
value
.
toggleRowExpansion
(
row
);
}
else
if
(
type
==
'calculate'
||
type
==
'submit'
)
{
if
(
type
==
'submit'
)
{
const
errorMsgText
=
document
.
querySelectorAll
(
'.el-form-item__error'
);
if
(
errorMsgText
.
length
)
{
ElMessage
.
info
(
'请修改错误提示项内容后,再操作'
);
return
}
ElMessageBox
.
confirm
(
dataTransactionPrice
.
value
===
''
?
'是否直接计算价格并提交'
:
'请确认当前数据交易价格是否为最新计算结果'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
...
...
@@ -1055,11 +1066,9 @@ onBeforeMount(() => {
getDetail
();
}
else
{
getDataTypeList
();
getModel
()
}
})
onMounted
(()
=>
{
getModel
()
})
</
script
>
<
template
>
...
...
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