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
92af587b
authored
2025-12-26 16:23:05 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
二期的策略引用
1 parent
eb093500
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
20 deletions
package.json
pnpm-lock.yaml
src/api/modules/dataSmartContract.ts
src/views/data_smart_contract/components/strategyTable.vue
src/views/data_smart_contract/smartContractCreate.vue
src/views/data_smart_contract/smartContractDetail.vue
src/views/data_smart_contract/strategyManagement.vue
package.json
View file @
92af587
...
...
@@ -30,7 +30,7 @@
"crypto-js"
:
"^4.2.0"
,
"dayjs"
:
"^1.11.7"
,
"echarts"
:
"^5.4.3"
,
"element-plus"
:
"^2.
9.0
"
,
"element-plus"
:
"^2.
10.5
"
,
"eruda"
:
"^3.0.0"
,
"file-saver"
:
"^2.0.5"
,
"hotkeys-js"
:
"^3.10.2"
,
...
...
pnpm-lock.yaml
View file @
92af587
...
...
@@ -51,8 +51,8 @@ dependencies:
specifier
:
^5.4.3
version
:
5.5.1
element-plus
:
specifier
:
^2.
9.0
version
:
2.
9.0
(vue@3.5.13)
specifier
:
^2.
10.5
version
:
2.
10.5
(vue@3.5.13)
eruda
:
specifier
:
^3.0.0
version
:
3.4.1
...
...
@@ -4066,8 +4066,8 @@ packages:
resolution
:
{
integrity
:
sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==
}
dev
:
true
/element-plus@2.
9.0
(vue@3.5.13)
:
resolution
:
{
integrity
:
sha512-
ccOFXKsauo2dtokAr4OX7gZsb7TuAoVxA2zGRZo5o2yyDDBLBaZxOoFQPoxITSLcHbBfQuNDGK5Iag5hnyKkZ
A==
}
/element-plus@2.
10.5
(vue@3.5.13)
:
resolution
:
{
integrity
:
sha512-
O9wTDu3Tm51ACVByWrThtBhH4Ygefg1HGY5pyAaxnoIrj8uMN0GtZ4IREwR3Yw/6sM2HyxjrsGI/D46iUVP97
A==
}
peerDependencies
:
vue
:
^3.2.0
dependencies
:
...
...
src/api/modules/dataSmartContract.ts
View file @
92af587
...
...
@@ -155,8 +155,8 @@ export const getContractDataProduct = (tenantGuid) => request({
})
/** 获取下拉数据产品列表的去重字段 */
export
const
getDamFieldsByProductGuid
=
(
productGuid
,
isTds
=
'N'
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/connector-invoke/field-by-dam-guid?damGuid=
${
productGuid
}
&isTds=
${
isTds
}
`
,
export
const
getDamFieldsByProductGuid
=
(
productGuid
,
isTds
=
'N'
,
isAnnon
=
'N'
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/connector-invoke/field-by-dam-guid?damGuid=
${
productGuid
}
&isTds=
${
isTds
}
&isAnnon=
${
isAnnon
}
`
,
method
:
'get'
})
...
...
src/views/data_smart_contract/components/strategyTable.vue
View file @
92af587
This diff is collapsed.
Click to expand it.
src/views/data_smart_contract/smartContractCreate.vue
View file @
92af587
...
...
@@ -314,12 +314,21 @@ const hanldeTableSelectChange = (val, scope, item) => {
if
(
res
?.
code
==
proxy
.
$passCode
)
{
productFieldList
.
value
=
res
.
data
||
initStrategyData
.
value
;
}
else
{
productFieldList
.
value
=
[];
productFieldList
.
value
=
initProductFieldValue
.
value
;
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
getDamFieldsByProductGuid
(
productItem
?.
productGuid
,
isDataUse
.
value
?
'Y'
:
'N'
,
'Y'
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
annonFieldsList
.
value
=
res
.
data
||
initProductFieldValue
.
value
;
}
else
{
annonFieldsList
.
value
=
initProductFieldValue
.
value
;
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
}
else
{
productFieldList
.
value
=
initProductFieldValue
.
value
;
annonFieldsList
.
value
=
initProductFieldValue
.
value
;
}
// 连接器只能选择数据提供方的产品,不需要切换了
// let nodeInfo = nodeInfoFormRef.value.formInline;
...
...
@@ -434,9 +443,15 @@ const constraintOptionsList: any = ref([]);
/** 策略操作行为下拉列表 */
const
actionOptionsList
:
any
=
ref
([]);
/** 限定状态字典下拉列表 */
const
limitedStateOptionsList
:
any
=
ref
([]);
/** 根据选择的数据产品显示限定字段下拉列表 */
const
initProductFieldValue
:
any
=
ref
([]);
/** 策略中选择的限定字段列表 */
const
productFieldList
:
any
=
ref
([]);
/** 匿名化选择的限定字段列表 */
const
annonFieldsList
:
any
=
ref
([]);
/** 初始化的策略值为空数组 */
const
initStrategyData
=
ref
([]);
...
...
@@ -462,15 +477,28 @@ const getSubmitInfo = () => {
let
v
=
Object
.
assign
({},
d
,
{
orderNum
:
index
+
1
,
});
if
(
d
.
constraintEnName
==
'dataField'
&&
d
.
constraintFieldValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintFieldValue
.
join
(
','
);
let
fieldList
=
d
.
actionEnName
==
'anonymize'
?
annonFieldsList
.
value
:
productFieldList
.
value
;
v
.
additionValue
=
d
.
constraintFieldValue
?.
map
(
dv
=>
{
return
{
enName
:
dv
,
chName
:
productFieldList
?.
value
.
find
(
p
=>
p
.
enName
==
dv
)?.
chName
||
dv
chName
:
fieldList
.
find
(
p
=>
p
.
enName
==
dv
)?.
chName
||
dv
}
})
}
else
if
((
d
.
constraintEnName
==
'limitedDeliveryConnector'
||
d
.
constraintEnName
==
'limitedUseConnector'
)
&&
d
.
constraintConnectorValue
?.
length
)
{
}
else
if
(
d
.
constraintEnName
==
'limitedState'
&&
d
.
constraintStateValue
)
{
v
.
constraintValue
=
d
.
constraintStateValue
;
v
.
additionValue
=
[{
value
:
d
.
constraintStateValue
,
label
:
limitedStateOptionsList
.
value
.
find
(
p
=>
p
.
value
==
d
.
constraintStateValue
)?.
label
||
d
.
constraintStateValue
}];
}
else
if
((
d
.
constraintEnName
==
'limitedDeliveryConnector'
||
d
.
constraintEnName
==
'limitedUseConnector'
)
&&
d
.
constraintConnectorValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintConnectorValue
?.
join
(
','
);
v
.
additionValue
=
d
.
additionValue
;
}
else
if
(
d
.
constraintEnName
==
'areaAddress'
&&
d
.
constraintAddressValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintAddressValue
?.
map
(
dd
=>
{
return
dd
.
at
(
-
1
);
})?.
join
(
','
);
v
.
additionValue
=
d
.
additionValue
;
}
return
v
;
})
||
[];
...
...
@@ -710,8 +738,17 @@ onBeforeMount(() => {
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
getDamFieldsByProductGuid
(
productGuid
,
isDataUse
.
value
?
'Y'
:
'N'
,
'Y'
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
annonFieldsList
.
value
=
res
.
data
||
initProductFieldValue
.
value
;
}
else
{
annonFieldsList
.
value
=
initProductFieldValue
.
value
;
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
}
else
{
productFieldList
.
value
=
initProductFieldValue
.
value
;
annonFieldsList
.
value
=
initProductFieldValue
.
value
;
}
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
...
...
@@ -785,6 +822,14 @@ onBeforeMount(() => {
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
}
})
getParamsList
({
dictType
:
'限定状态'
}).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
[];
limitedStateOptionsList
.
value
=
data
;
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
}
})
getActionPolicyList
().
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
[];
...
...
@@ -863,8 +908,8 @@ onActivated(() => {
<Form
ref=
"nodeInfoFormRef"
formId=
"node-info-form"
:itemList=
"nodeInfoFormItems"
:rules=
"nodeInfoFormRules"
@
select-change=
"handleNodeSelectChange"
col=
"col3"
/>
<StrategyTable
ref=
"strategyTableRef"
:show-title=
"true"
:value=
"detailInfo.policys || initStrategyData"
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:productFieldList=
"productFieldList"
:constraintOptionsList=
"constraintOptionsList"
></StrategyTable>
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:limit-state-option-list=
"limitedStateOptionsList"
:productFieldList=
"productFieldList"
:
annon-fields-list=
"annonFieldsList"
:
constraintOptionsList=
"constraintOptionsList"
></StrategyTable>
</ContentWrap>
</div>
<div
class=
"tool_btns"
>
...
...
src/views/data_smart_contract/smartContractDetail.vue
View file @
92af587
...
...
@@ -136,15 +136,27 @@ const btnHandles = ref({
let
v
=
Object
.
assign
({},
d
,
{
orderNum
:
index
+
1
,
});
if
(
d
.
constraintEnName
==
'dataField'
&&
d
.
constraintFieldValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintFieldValue
.
join
(
','
);
let
fieldList
=
d
.
actionEnName
==
'anonymize'
?
annonFieldsList
.
value
:
productFieldList
.
value
;
v
.
additionValue
=
d
.
constraintFieldValue
?.
map
(
dv
=>
{
return
{
enName
:
dv
,
chName
:
productFieldList
?.
value
.
find
(
p
=>
p
.
enName
==
dv
)?.
chName
||
dv
chName
:
fieldList
.
find
(
p
=>
p
.
enName
==
dv
)?.
chName
||
dv
}
})
}
else
if
(
d
.
constraintEnName
==
'limitedState'
&&
d
.
constraintStateValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintStateValue
;
v
.
additionValue
=
[{
value
:
d
.
constraintStateValue
,
label
:
limitedStateOptionsList
.
value
.
find
(
p
=>
p
.
value
==
d
.
constraintStateValue
)?.
label
||
d
.
constraintStateValue
}]
}
else
if
((
d
.
constraintEnName
==
'limitedDeliveryConnector'
||
d
.
constraintEnName
==
'limitedUseConnector'
)
&&
d
.
constraintConnectorValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintConnectorValue
?.
join
(
','
);
v
.
additionValue
=
d
.
additionValue
;
}
else
if
(
d
.
constraintEnName
==
'areaAddress'
&&
d
.
constraintAddressValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintAddressValue
?.
map
(
dd
=>
{
return
dd
.
at
(
-
1
);
})?.
join
(
','
);
v
.
additionValue
=
d
.
additionValue
;
}
return
v
;
})
...
...
@@ -946,12 +958,15 @@ const constraintOptionsList: any = ref([]);
/** 策略操作行为下拉列表 */
const
actionOptionsList
:
any
=
ref
([]);
/** 限定状态字典下拉列表 */
const
limitedStateOptionsList
:
any
=
ref
([]);
/** 根据选择的数据产品显示限定字段下拉列表 */
const
initProductFieldValue
:
any
=
ref
([]);
const
productFieldList
:
any
=
ref
([]);
/**
初始化的策略值为空数组
*/
const
initStrategyData
=
ref
([]);
/**
匿名化选择的限定字段列表
*/
const
annonFieldsList
:
any
=
ref
([]);
/** 获取第二步合约协商信息 */
const
getStepTwoNegotiateInfo
=
(
loading
=
true
)
=>
{
...
...
@@ -1079,8 +1094,17 @@ onBeforeMount(() => {
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
getDamFieldsByProductGuid
(
productGuid
,
provider
.
executionerGuid
!=
userData
.
tenantGuid
?
'Y'
:
'N'
,
'Y'
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
annonFieldsList
.
value
=
res
.
data
||
initProductFieldValue
.
value
;
}
else
{
annonFieldsList
.
value
=
initProductFieldValue
.
value
;
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
}
else
{
productFieldList
.
value
=
initProductFieldValue
.
value
;
annonFieldsList
.
value
=
initProductFieldValue
.
value
;
}
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
...
...
@@ -1097,6 +1121,14 @@ onBeforeMount(() => {
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
}
})
getParamsList
({
dictType
:
'限定状态'
}).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
[];
limitedStateOptionsList
.
value
=
data
;
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
}
})
getActionPolicyList
().
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
[];
...
...
@@ -1318,8 +1350,8 @@ onActivated(() => {
expandSwicth
style=
"margin-top: 15px"
:isExpand=
"expandPolicyConsult"
@
expand=
"(v) => (expandPolicyConsult = v)"
description=
""
>
<StrategyTable
ref=
"strategyTableEditRef"
:show-title=
"true"
:value=
"consultDetailInfo?.policys"
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:productFieldList=
"productFieldList"
:constraintOptionsList=
"constraintOptionsList"
></StrategyTable>
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:productFieldList=
"productFieldList"
:annonFieldsList=
"annonFieldsList"
:
limit-state-option-list=
"limitedStateOptionsList"
:
constraintOptionsList=
"constraintOptionsList"
></StrategyTable>
</ContentWrap>
<ContentWrap
v-show=
"detailType == 'consult' || currentStep == 2"
id=
"history-info-consult"
title=
"协商记录"
expandSwicth
style=
"margin-top: 15px"
:isExpand=
"expandConsultHistory"
...
...
@@ -1328,7 +1360,7 @@ onActivated(() => {
<el-timeline-item
v-for=
"(activity, index) in activities"
:key=
"index"
:timestamp=
"activity.timestamp"
:hollow=
"activity.hollow"
:type=
"activity.type"
placement=
"top"
>
<div
v-for=
"(child, childIndex) of activity.children"
class=
"row-per"
:style=
"
{ 'margin-top': childIndex > 0 ? '8px' : '0px' }">
:style=
"
{ 'margin-top':
<number>
childIndex > 0 ? '8px' : '0px' }">
<div
:class=
"child.negotiateEntityType == '数据提供方' ? 'label' : (child.negotiateEntityType == '数据服务方' ? 'label2' : 'label1')"
>
{{
child
.
negotiateEntityType
}}
...
...
src/views/data_smart_contract/strategyManagement.vue
View file @
92af587
...
...
@@ -241,7 +241,7 @@ const tablePageChange = (info) => {
getTableData
();
};
const
defaultValueInfo
=
ref
({
bizStatus
:
'Y'
});
const
defaultValueInfo
=
ref
({
bizStatus
:
'Y'
,
constraintOperatorCodes
:
[],
});
const
newCreate
=
()
=>
{
drawerInfo
.
value
.
visible
=
true
;
...
...
@@ -338,7 +338,7 @@ const classEditFormItems: any = ref([{
tagsTooltip
:
true
,
placeholder
:
'默认全部'
,
field
:
'constraintOperatorCodes'
,
default
:
''
,
default
:
[]
,
options
:
operatorOptionList
.
value
,
filterable
:
true
,
clearable
:
true
,
...
...
@@ -421,6 +421,8 @@ const drawerBtnClick = async (btn, info) => {
}).
map
(
v
=>
{
return
v
.
value
;
})
}
else
{
info
.
constraintOperatorCodes
=
[];
}
drawerInfo
.
value
.
footer
.
btns
[
1
].
loading
=
true
;
if
(
drawerInfo
.
value
.
type
==
'edit'
)
{
...
...
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