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
47db0e59
authored
2025-12-01 11:44:13 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加合约创建时选择数据产品
1 parent
32b085d5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
31 deletions
src/api/modules/dataSmartContract.ts
src/views/[...all].vue
src/views/data_smart_contract/smartContractCreate.vue
src/api/modules/dataSmartContract.ts
View file @
47db0e5
...
...
@@ -149,8 +149,8 @@ export const getContractOverviewTenantList = () => request({
});
/** 获取下拉数据产品列表 */
export
const
getContractDataProduct
=
()
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_AP
P_DIGITAL_CONTRACT_URL
}
/contract/get-data-product
`
,
export
const
getContractDataProduct
=
(
tenantGuid
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_AP
I_NEW_PORTAL
}
/dam-catalog-table/get-data-product?tenantGuid=
${
tenantGuid
}
`
,
method
:
'post'
})
...
...
src/views/[...all].vue
View file @
47db0e5
...
...
@@ -92,7 +92,7 @@ const beforeLogin = () => {
<div
class=
"img-provider"
></div>
<div
class=
"title"
>
数据提供方
</div>
</div>
<!-- 只有专区才有 -->
<!-- 只有专区
的超级管理员
才有 -->
<!--
<div
class=
"per"
:class=
"selectRole == USERROLE.OPERATION ? 'selected' : ''"
@
click=
"selectRole = USERROLE.OPERATION"
>
<div
class=
"img-operation"
></div>
<div
class=
"title"
>
平台运营方
</div>
...
...
src/views/data_smart_contract/smartContractCreate.vue
View file @
47db0e5
...
...
@@ -67,7 +67,7 @@ const baseInfoFormItems = ref([{
value
:
'value'
,
label
:
'label'
},
disabled
:
fals
e
,
disabled
:
tru
e
,
required
:
true
,
visible
:
true
},
{
...
...
@@ -250,7 +250,7 @@ const productTableInfo = ref({
default
:
''
,
options
:
productList
.
value
,
props
:
{
label
:
'productName
Desc
'
,
label
:
'productName'
,
value
:
'productId'
,
disabled
:
'disabled'
},
...
...
@@ -304,17 +304,16 @@ const hanldeTableSelectChange = (val, scope, item) => {
scope
.
row
.
dataProductEntityId
=
productItem
?.
enterpriseCode
;
scope
.
row
.
dataProductAbstract
=
productItem
?.
description
;
scope
.
row
.
dataProductEntityName
=
productItem
?.
enterpriseName
;
let
nodeInfo
=
nodeInfoFormRef
.
value
.
formInline
;
if
(
scope
.
$index
==
0
)
{
nodeInfoFormItems
.
value
.
forEach
((
item
,
index
)
=>
{
item
.
default
=
nodeInfo
[
item
.
field
];
if
(
index
==
1
)
{
item
.
default
=
tenantList
.
value
.
find
(
t
=>
t
.
socialCreditCode
==
scope
.
row
.
dataProductEntityId
)?.
guid
||
scope
.
row
.
dataProductEntityName
;
}
else
if
(
index
==
2
)
{
item
.
default
=
scope
.
row
.
dataProductEntityId
||
''
;
}
})
}
// 连接器只能选择数据提供方的产品,不需要切换了
// let nodeInfo = nodeInfoFormRef.value.formInline;
// nodeInfoFormItems.value.forEach((item, index) => {
// item.default = nodeInfo[item.field];
// if (index == 1) {
// item.default = tenantList.value.find(t => t.socialCreditCode == scope.row.dataProductEntityId)?.guid || scope.row.dataProductEntityName;
// } else if (index == 2) {
// item.default = scope.row.dataProductEntityId || '';
// }
// })
}
/** ---------------- 合约策略执行者相关表单信息 ----------------------------------- */
...
...
@@ -627,14 +626,15 @@ onBeforeMount(() => {
let
exec
=
()
=>
{
let
userRole
=
localStorage
.
getItem
(
'userRole'
);
if
(
userRole
==
USERROLE
.
PROVIDER
)
{
baseInfoFormItems
.
value
[
1
].
disabled
=
true
;
//
baseInfoFormItems.value[1].disabled = true;
baseInfoFormItems
.
value
[
1
].
default
=
'01'
;
productTableInfo
.
value
.
editInfo
.
dataProductId
.
props
.
label
=
'productName'
;
}
else
{
//可以选点对点。未认证时只能选择中介参与
baseInfoFormItems
.
value
[
1
].
disabled
=
!
currTenantDetailInfo
.
value
.
trustedIdentityCredential
;
baseInfoFormItems
.
value
[
1
].
default
=
!
currTenantDetailInfo
.
value
.
trustedIdentityCredential
?
'02'
:
'01'
;
productTableInfo
.
value
.
editInfo
.
dataProductId
.
props
.
label
=
'productNameDesc'
;
}
// else { //可以选点对点。未认证时只能选择中介参与
// baseInfoFormItems.value[1].disabled = !currTenantDetailInfo.value.trustedIdentityCredential;
// baseInfoFormItems.value[1].default = !currTenantDetailInfo.value.trustedIdentityCredential ? '02' : '01';
// productTableInfo.value.editInfo.dataProductId.props.label = 'productNameDesc';
// }
if
(
route
.
query
.
guid
)
{
fullscreenLoading
.
value
=
true
;
getContractDetail
(
route
.
query
.
guid
).
then
((
res
:
any
)
=>
{
...
...
@@ -659,10 +659,7 @@ onBeforeMount(() => {
nodeInfoFormItems
.
value
[
4
].
default
=
user
.
executionerGuid
;
nodeInfoFormItems
.
value
[
5
].
default
=
user
.
executionerId
;
if
(
baseInfoFormItems
.
value
[
1
].
default
==
'01'
&&
userData
.
superTubeFlag
==
'Y'
)
{
productList
.
value
=
res
.
data
?.
map
(
d
=>
{
d
.
disabled
=
d
.
enterpriseName
!=
userData
.
tenantName
;
//点对点,只能选择自己公司所属产品
return
d
;
})
||
[];
productList
.
value
=
res
.
data
||
[];
}
productTableInfo
.
value
.
editInfo
.
dataProductId
.
options
=
productList
.
value
;
extendData
.
value
=
detailInfo
.
value
.
contractExpansions
||
[];
...
...
@@ -687,13 +684,9 @@ onBeforeMount(() => {
nodeInfoFormItems
.
value
[
1
].
default
=
''
;
//如果是中介的话,不能选择自己吧。
}
}
getContractDataProduct
().
then
((
res
:
any
)
=>
{
getContractDataProduct
(
userData
.
tenantGuid
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
productList
.
value
=
res
.
data
?.
map
(
d
=>
{
d
.
productNameDesc
=
d
.
productName
+
'('
+
d
.
enterpriseName
+
')'
;
d
.
disabled
=
userData
.
superTubeFlag
==
'Y'
&&
baseInfoFormItems
.
value
[
1
].
default
==
'01'
&&
d
.
enterpriseName
!=
userData
.
tenantName
;
//点对点,只能选择自己公司所属产品
return
d
;
})
||
[];
productList
.
value
=
res
.
data
||
[];
productTableInfo
.
value
.
editInfo
.
dataProductId
.
options
=
productList
.
value
;
}
else
{
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
);
...
...
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