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
24d6d18e
authored
2025-12-03 15:23:25 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增策略接口联调
1 parent
dcc02de8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
145 additions
and
85 deletions
src/api/modules/dataDelivery.ts
src/views/data_asset/dataDelivery.vue
src/views/data_asset/dataUsage.vue
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/smartContractManagement.vue
src/api/modules/dataDelivery.ts
View file @
24d6d18
...
...
@@ -31,4 +31,11 @@ export const verifyStatusChange = (params) => request({
export
const
deliveryContract
=
(
guid
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/contract-delivery/delivery?deliveryGuid=
${
guid
}
`
,
method
:
'post'
})
/** 数据使用 */
export
const
getDataUsePageList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/contract-use/page-list`
,
method
:
'post'
,
data
:
params
})
\ No newline at end of file
...
...
src/views/data_asset/dataDelivery.vue
View file @
24d6d18
...
...
@@ -87,7 +87,11 @@ const tableFields = ref([
});
}
},
{
label
:
"交付方式"
,
field
:
"deliveryMethod"
,
width
:
120
},
{
label
:
"交付方式"
,
field
:
"deliveryMethod"
,
width
:
120
,
getName
:
(
scope
)
=>
{
return
scope
.
row
.
deliveryMethod
==
1
?
'文件'
:
'API'
;
}
},
{
label
:
"交付状态"
,
field
:
"deliveryStatus"
,
type
:
"tag"
,
width
:
96
,
align
:
'center'
,
getName
:
(
scope
)
=>
{
...
...
src/views/data_asset/dataUsage.vue
View file @
24d6d18
...
...
@@ -2,6 +2,7 @@
import
TableTools
from
"@/components/Tools/table_tools.vue"
;
import
{
commonPageConfig
,
TableColumnWidth
}
from
'@/utils/enum'
;
import
{
getDataUsePageList
,
}
from
"@/api/modules/dataDelivery"
;
...
...
@@ -64,35 +65,12 @@ const tableFields = ref([
});
}
},
{
label
:
"交付方式"
,
field
:
"deliveryMethod"
,
width
:
120
},
{
label
:
"交付状态"
,
field
:
"deliveryStatus"
,
type
:
"tag"
,
width
:
96
,
align
:
'center'
,
getName
:
(
scope
)
=>
{
const
deliveryStatus
=
scope
.
row
.
deliveryStatus
switch
(
deliveryStatus
)
{
case
1
:
return
'未交付'
;
case
2
:
return
'已交付'
;
case
3
:
return
'交付中'
;
default
:
return
'--'
;
}
},
tagType
:
(
scope
)
=>
{
const
deliveryStatus
=
scope
.
row
.
deliveryStatus
switch
(
deliveryStatus
)
{
case
3
:
return
'warning'
;
case
2
:
return
'success'
;
case
1
:
return
'info'
;
default
:
return
'info'
;
}
label
:
"交付方式"
,
field
:
"deliveryMethod"
,
width
:
120
,
getName
:
(
scope
)
=>
{
return
scope
.
row
.
deliveryMethod
==
1
?
'文件'
:
'API'
;
}
},
{
label
:
"交付方"
,
field
:
"deliveryPartyName"
,
width
:
240
},
{
label
:
"交付时间"
,
field
:
"deliveryTime"
,
width
:
170
},
]);
...
...
@@ -113,6 +91,10 @@ const tableInfo = ref({
type
:
"btn"
,
width
:
160
,
btns
:
(
scope
)
=>
{
let
btns
:
any
=
[];
//TODO。根据返回值显示按钮
btns
.
push
({
label
:
'日志'
,
value
:
'log'
});
return
btns
;
}
}
});
...
...
@@ -129,6 +111,41 @@ const toSearch = (val: any, clear: boolean = false) => {
getTableData
();
};
const
getTableData
=
()
=>
{
tableInfo
.
value
.
loading
=
true
getDataUsePageList
({
pageIndex
:
page
.
value
.
curr
,
pageSize
:
page
.
value
.
limit
,
dataProductName
:
page
.
value
.
dataProductName
,
contractName
:
page
.
value
.
contractName
}).
then
((
res
:
any
)
=>
{
tableInfo
.
value
.
loading
=
false
if
(
res
?.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
{};
tableInfo
.
value
.
data
=
data
.
records
||
[]
tableInfo
.
value
.
page
.
limit
=
data
.
pageSize
tableInfo
.
value
.
page
.
curr
=
data
.
pageIndex
tableInfo
.
value
.
page
.
rows
=
data
.
totalRows
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
}).
catch
(()
=>
{
tableInfo
.
value
.
loading
=
false
})
};
const
tablePageChange
=
(
info
)
=>
{
page
.
value
.
curr
=
Number
(
info
.
curr
);
page
.
value
.
limit
=
Number
(
info
.
limit
);
tableInfo
.
value
.
page
.
curr
=
page
.
value
.
curr
;
tableInfo
.
value
.
page
.
limit
=
page
.
value
.
limit
;
getTableData
();
};
onBeforeMount
(()
=>
{
toSearch
({});
});
</
script
>
<
template
>
...
...
@@ -142,6 +159,4 @@ const toSearch = (val: any, clear: boolean = false) => {
</div>
</
template
>
<
style
lang=
"scss"
scoped
>
</
style
>
\ No newline at end of file
<
style
lang=
"scss"
scoped
></
style
>
\ No newline at end of file
...
...
src/views/data_smart_contract/components/strategyTable.vue
View file @
24d6d18
...
...
@@ -84,9 +84,9 @@
v-else-if=
"!isLook && productFieldList != null && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector')"
v-model=
"scope.row['constraintConnectorValue']"
:loading=
"loading"
:remote=
"true"
:remote-method=
"remoteMethod"
:max-collapse-tags=
"1"
:collapse-tags=
"true"
:collapse-tags-tooltip=
"true"
multiple
filterable
clearable
:placeholder=
"scope.row.constraintPlaceholderValue || '请输入关键字搜索'"
value-key=
"guid"
>
multiple
filterable
clearable
:placeholder=
"scope.row.constraintPlaceholderValue || '请输入关键字搜索'"
value-key=
"guid"
@
change=
"(val) => handleOperatorSelectChange(val, scope, 'constraintConnectorValue')"
>
<el-option
v-for=
"opt in connectorList"
:key=
"opt['guid']"
:label=
"opt['tenantName']"
:value=
"opt"
/>
:value=
"opt
['guid']
"
/>
</el-select>
<!-- 加密字段 -->
<el-select
v-else-if=
"!isLook && productFieldList != null && scope.row.constraintEnName == 'dataField'"
...
...
@@ -96,7 +96,7 @@
<el-option
v-for=
"opt in productFieldList"
:key=
"opt['enName']"
:label=
"opt['chName']"
:value=
"opt['enName']"
/>
</el-select>
<span
v-else
>
{{
scope
.
row
[
'constraintFieldValue'
]
||
'--'
}}
</span>
<span
v-else
>
{{
(
scope
.
row
.
constraintEnName
==
'dataField'
?
scope
.
row
.
additionValue
?.
map
(
a
=>
a
.
chName
)?.
join
(
','
)
:
((
scope
.
row
.
constraintEnName
==
'limitedDeliveryConnector'
||
scope
.
row
.
constraintEnName
==
'limitedUseConnector'
)
?
scope
.
row
.
additionValue
?.
map
(
a
=>
a
.
tenantName
)?.
join
(
','
)
:
scope
.
row
[
'constraintFieldValue'
]))
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
v-if=
"!isLook"
label=
"操作"
width=
"140px"
align=
"left"
fixed=
"right"
show-overflow-tooltip
>
...
...
@@ -192,6 +192,7 @@ const strategyValueInfo: any = ref([{
/** 将数据库存储的值转化为该组件接收的树形结构 */
const
transferValueToNew
=
(
val
,
isTemplate
=
false
)
=>
{
let
detailPolicyListValue
:
any
[]
=
[]
connectorList
.
value
=
[];
val
?.
forEach
((
p
,
index
)
=>
{
let
lastItem
=
detailPolicyListValue
?.[
detailPolicyListValue
.
length
-
1
];
let
childInfo
=
Object
.
assign
({},
p
);
...
...
@@ -199,7 +200,8 @@ const transferValueToNew = (val, isTemplate = false) => {
childInfo
.
constraintFieldValue
=
childInfo
.
additionValue
.
map
(
a
=>
a
.
enName
);
}
if
((
childInfo
.
constraintEnName
==
'limitedDeliveryConnector'
||
childInfo
.
constraintEnName
==
'limitedUseConnector'
)
&&
childInfo
.
additionValue
?.
length
)
{
childInfo
.
constraintConnectorValue
=
childInfo
.
additionValue
;
childInfo
.
constraintConnectorValue
=
childInfo
.
additionValue
.
map
(
a
=>
a
.
guid
);
connectorList
.
value
.
push
(...
childInfo
.
additionValue
);
}
if
(
isTemplate
&&
(
childInfo
.
constraintEnName
==
'dataField'
||
childInfo
.
constraintEnName
==
'limitedDeliveryConnector'
||
childInfo
.
constraintEnName
==
'limitedUseConnector'
))
{
childInfo
.
constraintPlaceholderValue
=
childInfo
.
constraintValue
;
...
...
@@ -251,6 +253,9 @@ const strategyData = computed(() => {
index
:
s
.
index
,
orderNum
:
s
.
orderNum
},
sc
));
// if (sc.constraintConnectorValue?.length) {
// // connectorList.value.push(...sc.constraintConnectorValue);
// }
})
})
return
v
;
...
...
@@ -271,6 +276,12 @@ const selectConditionChange = (val, scope) => {
let
svChild
=
sv
.
children
?.
find
(
c
=>
c
.
childIndex
==
scope
.
row
.
childIndex
);
svChild
&&
(
svChild
.
constraintEnName
=
props
.
constraintOptionsList
.
find
(
o
=>
o
.
policyName
==
val
)?.
policyEnName
);
svChild
&&
(
svChild
.
constraintName
=
val
);
if
(
svChild
&&
svChild
.
constraintOperatorCode
)
{
let
opList
=
getActualOperationList
(
scope
);
if
(
!
opList
.
some
(
o
=>
o
.
value
==
svChild
.
constraintOperatorCode
))
{
svChild
.
constraintOperatorCode
=
''
;
}
}
}
const
handleOperatorSelectChange
=
(
val
,
scope
,
field
)
=>
{
...
...
@@ -278,6 +289,11 @@ const handleOperatorSelectChange = (val, scope, field) => {
let
sv
=
strategyValueInfo
.
value
.
find
(
s
=>
s
.
index
==
index
);
let
svChild
=
sv
.
children
?.
find
(
c
=>
c
.
childIndex
==
scope
.
row
.
childIndex
);
svChild
&&
(
svChild
[
field
]
=
val
);
if
(
field
==
'constraintConnectorValue'
)
{
svChild
.
additionValue
=
val
?.
map
(
vv
=>
{
return
connectorList
.
value
.
find
(
c
=>
c
.
guid
==
vv
);
})
}
}
/** 添加策略信息的操作行为行 */
...
...
src/views/data_smart_contract/smartContractCreate.vue
View file @
24d6d18
...
...
@@ -23,7 +23,6 @@ import {
getParamsList
,
}
from
"@/api/modules/queryService"
;
import
useDataSmartContract
from
"@/store/modules/dataSmartContract"
;
import
{
getEnterpriseData
}
from
"@/api/modules/dataIdentify"
;
const
{
required
}
=
useValidator
();
const
userStore
=
useUserStore
();
...
...
@@ -461,7 +460,7 @@ const getSubmitInfo = () => {
}];
params
.
policys
=
strategyTableRef
.
value
.
strategyData
?.
map
((
d
,
index
)
=>
{
let
v
=
Object
.
assign
({},
d
,
{
orderNum
:
index
+
1
,
});
if
(
d
.
constraintName
.
includes
(
'字段'
)
&&
d
.
constraintFieldValue
?.
length
)
{
if
(
d
.
constraintName
==
'dataField'
&&
d
.
constraintFieldValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintFieldValue
.
join
(
','
);
v
.
additionValue
=
d
.
constraintFieldValue
?.
map
(
dv
=>
{
return
{
...
...
@@ -469,6 +468,9 @@ const getSubmitInfo = () => {
chName
:
productFieldList
?.
value
.
find
(
p
=>
p
.
enName
==
dv
)?.
chName
||
dv
}
})
}
else
if
((
d
.
constraintEnName
==
'limitedDeliveryConnector'
||
d
.
constraintEnName
==
'limitedUseConnector'
)
&&
d
.
constraintConnectorValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintConnectorValue
?.
join
(
','
);
v
.
additionValue
=
d
.
additionValue
;
}
return
v
;
})
||
[];
...
...
@@ -652,9 +654,6 @@ const cancel = () => {
const
detailInfo
:
any
=
ref
({});
/** 当前会员是否认证信息 */
const
currTenantDetailInfo
:
any
=
ref
({});
const
psLogon
=
ref
();
onBeforeMount
(()
=>
{
...
...
@@ -742,23 +741,25 @@ onBeforeMount(() => {
})
}
fullscreenLoading
.
value
=
true
;
psLogon
.
value
=
getEnterpriseData
({
logonUser
:
userData
.
tenantName
==
"非认证会员"
?
userData
.
logonUser
:
tenantData
.
logonUser
}).
then
((
res
:
any
)
=>
{
psLogon
.
value
=
null
;
fullscreenLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
currTenantDetailInfo
.
value
=
res
.
data
||
{};
exec
();
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
exec
();
}
}).
catch
(()
=>
{
psLogon
.
value
=
null
;
fullscreenLoading
.
value
=
false
;
exec
();
});
// 连接器不需要用到会员认证信息。未认证的没有菜单。
// psLogon.value = getEnterpriseData({
// logonUser: userData.tenantName == "非认证会员" ? userData.logonUser : tenantData.logonUser
// }).then((res: any) => {
// psLogon.value = null;
// fullscreenLoading.value = false;
// if (res?.code == proxy.$passCode) {
// currTenantDetailInfo.value = res.data || {};
// exec();
// } else {
// res?.msg && proxy.$ElMessage.error(res?.msg);
// exec();
// }
// }).catch(() => {
// psLogon.value = null;
// fullscreenLoading.value = false;
// exec();
// });
exec
();
getParamsList
({
dictType
:
'合约签署模式'
}).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
||
[];
...
...
src/views/data_smart_contract/smartContractDetail.vue
View file @
24d6d18
...
...
@@ -17,7 +17,8 @@ import {
getContractExecList
,
terminateContract
,
getTerminateDetailInfo
,
getSignatureFile
getSignatureFile
,
getDamFieldsByProductGuid
}
from
"@/api/modules/dataSmartContract"
;
import
{
tagMethod
,
...
...
@@ -127,7 +128,20 @@ const btnHandles = ref({
continueContractNegotiate
({
contractGuid
:
route
.
query
.
guid
,
policys
:
strategyTableEditRef
.
value
.
strategyData
?.
map
((
d
,
index
)
=>
{
return
Object
.
assign
({},
d
,
{
orderNum
:
index
+
1
})
let
v
=
Object
.
assign
({},
d
,
{
orderNum
:
index
+
1
,
});
if
(
d
.
constraintName
==
'dataField'
&&
d
.
constraintFieldValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintFieldValue
.
join
(
','
);
v
.
additionValue
=
d
.
constraintFieldValue
?.
map
(
dv
=>
{
return
{
enName
:
dv
,
chName
:
productFieldList
?.
value
.
find
(
p
=>
p
.
enName
==
dv
)?.
chName
||
dv
}
})
}
else
if
((
d
.
constraintEnName
==
'limitedDeliveryConnector'
||
d
.
constraintEnName
==
'limitedUseConnector'
)
&&
d
.
constraintConnectorValue
?.
length
)
{
v
.
constraintValue
=
d
.
constraintConnectorValue
?.
join
(
','
);
v
.
additionValue
=
d
.
additionValue
;
}
return
v
;
})
}).
then
((
res
:
any
)
=>
{
fullscreenLoading
.
value
=
false
;
...
...
@@ -244,7 +258,7 @@ const extendTableInfo = ref({
{
label
:
"字段类型"
,
field
:
"fieldTypeName"
,
width
:
140
},
{
label
:
"输入内容"
,
field
:
"content"
,
width
:
300
},
],
data
:
[],
data
:
<
any
>
[],
showPage
:
false
,
actionInfo
:
{
show
:
false
...
...
@@ -283,7 +297,7 @@ const productTableInfo = ref({
{
label
:
"所属主体名称"
,
field
:
"dataProductEntityName"
,
width
:
240
},
{
label
:
"产品简介"
,
field
:
"dataProductAbstract"
,
width
:
240
},
],
data
:
[],
data
:
<
any
>
[],
showPage
:
false
,
actionInfo
:
{
show
:
false
...
...
@@ -921,6 +935,13 @@ const constraintOptionsList: any = ref([]);
/** 策略操作行为下拉列表 */
const
actionOptionsList
:
any
=
ref
([]);
/** 根据选择的数据产品显示限定字段下拉列表 */
const
initProductFieldValue
:
any
=
ref
([]);
const
productFieldList
:
any
=
ref
([]);
/** 初始化的策略值为空数组 */
const
initStrategyData
=
ref
([]);
/** 获取第二步合约协商信息 */
const
getStepTwoNegotiateInfo
=
(
loading
=
true
)
=>
{
fullscreenLoading
.
value
=
true
;
...
...
@@ -1036,6 +1057,19 @@ onBeforeMount(() => {
nodeInfoFormItems
.
value
[
5
].
default
=
user
.
executionerId
;
extendTableInfo
.
value
.
data
=
detailInfo
.
value
.
contractExpansions
||
[];
productTableInfo
.
value
.
data
=
detailInfo
.
value
.
contractSubjects
||
[];
let
productGuid
=
productTableInfo
.
value
.
data
?.[
0
]?.
dataProductGuid
;
if
(
productGuid
)
{
getDamFieldsByProductGuid
(
productGuid
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
productFieldList
.
value
=
res
.
data
||
initProductFieldValue
.
value
;
}
else
{
productFieldList
.
value
=
initProductFieldValue
.
value
;
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
}
else
{
productFieldList
.
value
=
initProductFieldValue
.
value
;
}
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
...
...
@@ -1272,7 +1306,7 @@ 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"
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:productFieldList=
"productFieldList"
:constraintOptionsList=
"constraintOptionsList"
></StrategyTable>
</ContentWrap>
<ContentWrap
v-show=
"detailType == 'consult' || currentStep == 2"
id=
"history-info-consult"
title=
"协商记录"
...
...
src/views/data_smart_contract/smartContractManagement.vue
View file @
24d6d18
...
...
@@ -13,7 +13,6 @@ import {
}
from
"@/api/modules/dataSmartContract"
import
useDataSmartContract
from
"@/store/modules/dataSmartContract"
;
import
{
commonPageConfig
,
USERROLE
}
from
'@/utils/enum'
;
import
{
getEnterpriseData
}
from
"@/api/modules/dataIdentify"
;
const
userData
=
JSON
.
parse
(
localStorage
.
userData
);
const
tenantData
=
JSON
.
parse
(
localStorage
.
tenantInfo
);
...
...
@@ -300,12 +299,13 @@ const newCreate = () => {
return
;
}
let
exec
=
()
=>
{
if
(
tenantData
.
isCertification
!=
'Y'
&&
!
currTenantDetailInfo
.
value
.
trustedIdentityCredential
)
{
//认证过的
if
(
userData
.
superTubeFlag
!=
'Y'
)
{
//平台用户
proxy
.
$ElMessage
.
error
(
'请先完成企业认证后再进行创建'
);
return
;
}
}
// 连接器不需要单独控制,没有认证的都不可以进入此菜单权限
// if (tenantData.isCertification != 'Y' && !currTenantDetailInfo.value.trustedIdentityCredential) { //认证过的
// if (userData.superTubeFlag != 'Y') {//平台用户
// proxy.$ElMessage.error('请先完成企业认证后再进行创建');
// return;
// }
// }
router
.
push
({
name
:
'smartContractCreate'
});
...
...
@@ -327,27 +327,10 @@ onActivated(() => {
}
})
/** 当前会员是否认证信息 */
const
currTenantDetailInfo
:
any
=
ref
({});
const
psLogon
=
ref
();
onBeforeMount
(()
=>
{
!
dataSmartContractStore
.
isRefresh
&&
toSearch
({})
if
(
tenantData
.
isCertification
!=
'Y'
)
{
psLogon
.
value
=
getEnterpriseData
({
logonUser
:
userData
.
tenantName
==
"非认证会员"
?
userData
.
logonUser
:
tenantData
.
logonUser
}).
then
((
res
:
any
)
=>
{
psLogon
.
value
=
null
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
currTenantDetailInfo
.
value
=
res
.
data
||
{};
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
}
}).
catch
(()
=>
{
psLogon
.
value
=
null
;
});
}
})
</
script
>
...
...
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