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
1e1353d7
authored
2025-12-01 11:52:43 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
数据产品选择
1 parent
3036b430
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
23 deletions
src/api/modules/dataSmartContract.ts
src/views/[...all].vue
src/views/data_smart_contract/smartContractCreate.vue
src/api/modules/dataSmartContract.ts
View file @
1e1353d
...
...
@@ -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 @
1e1353d
...
...
@@ -12,6 +12,7 @@ import { USERROLE } from '@/utils/enum';
import
{
ElMessage
}
from
'element-plus'
;
const
userStore
=
useUserStore
()
const
userData
=
JSON
.
parse
(
userStore
.
userData
);
const
router
=
useRouter
()
const
route
=
useRoute
()
...
...
@@ -72,6 +73,7 @@ const beforeLogin = () => {
}
}
</
script
>
<
template
>
...
...
@@ -93,7 +95,7 @@ const beforeLogin = () => {
<div
class=
"title"
>
数据提供方
</div>
</div>
<!-- 只有专区才有 -->
<div
class=
"per"
:class=
"selectRole == USERROLE.OPERATION ? 'selected' : ''"
@
click=
"selectRole = USERROLE.OPERATION"
>
<div
class=
"per"
v-if=
"userData?.superTubeFlag == 'Y'"
:class=
"selectRole == USERROLE.OPERATION ? 'selected' : ''"
@
click=
"selectRole = USERROLE.OPERATION"
>
<div
class=
"img-operation"
></div>
<div
class=
"title"
>
平台运营方
</div>
</div>
...
...
src/views/data_smart_contract/smartContractCreate.vue
View file @
1e1353d
...
...
@@ -67,7 +67,7 @@ const baseInfoFormItems = ref([{
value
:
'value'
,
label
:
'label'
},
disabled
:
fals
e
,
disabled
:
tru
e
,
required
:
true
,
visible
:
true
},
{
...
...
@@ -304,16 +304,18 @@ 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
||
''
;
}
})
if
(
baseInfoFormRef
.
value
?.
formInline
?.
signModeCode
==
'02'
)
{
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
||
''
;
}
})
}
}
}
...
...
@@ -517,8 +519,8 @@ const submit = () => {
handleLeft
(
'product-info'
);
return
;
}
if
(
userData
.
superTubeFlag
==
'Y'
)
{
//只有主平台
模式下需判断
if
(
baseInfoFormRef
.
value
.
formInline
.
signModeCode
==
'02'
&&
index
>
0
&&
productData
.
value
[
index
].
dataProductEntityId
!=
pd
.
dataProductEntityId
)
{
if
(
baseInfoFormRef
.
value
.
formInline
.
signModeCode
==
'02'
)
{
//只有主平台中介
模式下需判断
if
(
index
>
0
&&
productData
.
value
[
index
].
dataProductEntityId
!=
pd
.
dataProductEntityId
)
{
proxy
.
$ElMessage
.
error
(
'合约标的的数据产品不能来自不同的企业主体'
);
expandInfo
.
value
=
true
;
handleLeft
(
'product-info'
);
...
...
@@ -626,13 +628,13 @@ const psLogon = ref();
onBeforeMount
(()
=>
{
let
exec
=
()
=>
{
let
userRole
=
localStorage
.
getItem
(
'userRole'
);
if
(
userRole
==
USERROLE
.
PROVIDER
)
{
baseInfoFormItems
.
value
[
1
].
disabled
=
true
;
if
(
userRole
==
USERROLE
.
PROVIDER
)
{
//数据使用方
//
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
'
;
}
else
{
//
平台运营方可以
选择中介参与
//
baseInfoFormItems.value[1].disabled = !currTenantDetailInfo.value.trustedIdentityCredential;
baseInfoFormItems
.
value
[
1
].
default
=
'02
'
;
productTableInfo
.
value
.
editInfo
.
dataProductId
.
props
.
label
=
'productNameDesc'
;
}
if
(
route
.
query
.
guid
)
{
...
...
@@ -687,11 +689,11 @@ onBeforeMount(() => {
nodeInfoFormItems
.
value
[
1
].
default
=
''
;
//如果是中介的话,不能选择自己吧。
}
}
getContractDataProduct
().
then
((
res
:
any
)
=>
{
getContractDataProduct
(
userData
.
superTubeFlag
==
'Y'
&&
localStorage
.
getItem
(
'userRole'
)
==
USERROLE
.
OPERATION
?
null
:
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
;
//点对点,只能选择自己公司所属产品
//
d.disabled = userData.superTubeFlag == 'Y' && baseInfoFormItems.value[1].default == '01' && d.enterpriseName != userData.tenantName; //点对点,只能选择自己公司所属产品
return
d
;
})
||
[];
productTableInfo
.
value
.
editInfo
.
dataProductId
.
options
=
productList
.
value
;
...
...
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