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
59e7815d
authored
2026-04-02 16:45:27 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
合约添加逻辑空间接口联调
1 parent
4d5113b7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
5 deletions
src/api/modules/dataSmartContract.ts
src/components/Form/index.vue
src/views/data_smart_contract/components/strategyTable.vue
src/views/data_smart_contract/smartContractCreate.vue
src/views/data_smart_contract/smartContractDetail.vue
src/api/modules/dataSmartContract.ts
View file @
59e7815
...
...
@@ -222,6 +222,18 @@ export const getContractTenantList = (tenantName = '') => request({
method
:
'get'
})
/** 根据逻辑空间guid获取可选的企业下拉列表,认证过后带标识的 */
export
const
getContractTenantListBySpaceGuid
=
(
spaceGuid
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/connector-invoke/logic/user-member-by-space-guid?spaceGuid=
${
spaceGuid
}
`
,
method
:
'get'
})
/** 根据逻辑空间guid获取策略模板 */
export
const
getContractPolicyTemplateListBySpaceGuid
=
(
spaceGuid
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/connector-invoke/logic/policy-by-space-guid?spaceGuid=
${
spaceGuid
}
`
,
method
:
'get'
})
/** 撤回合约 */
export
const
cancelContract
=
(
guid
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/contract/canal?guid=
${
guid
}
`
,
...
...
src/components/Form/index.vue
View file @
59e7815
...
...
@@ -40,6 +40,7 @@ const userStore = useUserStore()
const
emits
=
defineEmits
([
"radioGroupChange"
,
"selectChange"
,
"selectFocus"
,
"inputChange"
,
"treeSelectLoad"
,
"treeSelectNodeChange"
,
...
...
@@ -134,6 +135,10 @@ const richTextChange = (val, item) => {
formInline
.
value
[
item
.
field
]
=
val
;
ruleFormRef
.
value
?.
validateField
([
item
.
field
]);
}
/** 下拉选择框聚焦事件 */
const
selectFocus
=
(
item
)
=>
{
emits
(
"selectFocus"
,
item
);
}
const
selectChange
=
(
val
,
row
)
=>
{
const
info
=
formInline
.
value
;
...
...
@@ -938,7 +943,7 @@ const panelChange = (scope, row) => {
:collapse-tags=
"item.collapse ?? false"
:collapse-tags-tooltip=
"item.tagsTooltip ?? false"
:max-collapse-tags=
"item.maxTags ?? 1"
:teleported=
"item.teleported ?? true"
:allow-create=
"item.allowCreate ?? false"
:default-first-option=
"item.allowCreate ?? false"
:maxlength=
"item.maxlength ?? 50"
@
change=
"(val) => selectChange(val, item)"
>
:maxlength=
"item.maxlength ?? 50"
@
change=
"(val) => selectChange(val, item)"
@
focus=
"selectFocus(item)"
>
<el-option
v-for=
"opt in item.options"
:label=
"item.props?.label ? opt[item.props.label] : opt.label"
:value=
"item.props?.value ? opt[item.props.value] : opt.value"
:disabled=
"opt.disabled"
/>
</el-select>
...
...
src/views/data_smart_contract/components/strategyTable.vue
View file @
59e7815
...
...
@@ -646,8 +646,16 @@ const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
/** 弹出模板选择对话框 */
const
invokeTemplate
=
()
=>
{
// TODO,判断是否有策略模板信息。
if
(
props
.
templateJson
?.
length
)
{
proxy
.
$openMessageBox
(
"使用模板会覆盖现有策略信息,确定要使用产品所在逻辑空间的模板配置吗?"
,
()
=>
{
if
(
props
.
templateJson
)
{
if
(
!
props
.
templateJson
?.
length
)
{
proxy
.
$ElMessage
.
warning
(
'当前逻辑空间中未设置策略配置信息'
);
return
;
}
if
(
!
strategyValueInfo
.
value
?.
length
)
{
strategyValueInfo
.
value
=
transferValueToNew
(
props
.
templateJson
,
true
);
return
;
}
proxy
.
$openMessageBox
(
"该操作会覆盖现有策略信息,确定要使用产品所在逻辑空间的策略配置吗?"
,
()
=>
{
strategyValueInfo
.
value
=
transferValueToNew
(
props
.
templateJson
,
true
);
},
()
=>
{
proxy
.
$ElMessage
.
info
(
"已取消"
);
...
...
src/views/data_smart_contract/smartContractCreate.vue
View file @
59e7815
This diff is collapsed.
Click to expand it.
src/views/data_smart_contract/smartContractDetail.vue
View file @
59e7815
...
...
@@ -18,7 +18,8 @@ import {
terminateContract
,
getTerminateDetailInfo
,
getSignatureFile
,
getDamFieldsByProductGuid
getDamFieldsByProductGuid
,
getContractPolicyTemplateListBySpaceGuid
}
from
"@/api/modules/dataSmartContract"
;
import
{
tagMethod
,
...
...
@@ -973,6 +974,9 @@ const constraintOptionsList: any = ref([]);
/** 策略操作行为下拉列表 */
const
actionOptionsList
:
any
=
ref
([]);
/** 逻辑空间的策略模板信息,若是逻辑空间不存在,则值为null,若是逻辑空间中未设置模板,则值为[] */
const
templateJson
:
any
=
ref
(
null
);
/** 限定状态字典下拉列表 */
const
limitedStateOptionsList
:
any
=
ref
([]);
...
...
@@ -1117,6 +1121,19 @@ onBeforeMount(() => {
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
let
logicSpaceGuid
=
productTableInfo
.
value
.
data
?.[
0
]?.
logicSpaceGuid
;
if
(
logicSpaceGuid
)
{
getContractPolicyTemplateListBySpaceGuid
(
logicSpaceGuid
).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
templateJson
.
value
=
res
.
data
||
[];
}
else
{
templateJson
.
value
=
[];
res
?.
msg
&&
proxy
.
$ElMessage
.
error
(
res
?.
msg
)
}
})
}
else
{
templateJson
.
value
=
null
;
}
}
else
{
productFieldList
.
value
=
initProductFieldValue
.
value
;
annonFieldsList
.
value
=
initProductFieldValue
.
value
;
...
...
@@ -1364,7 +1381,7 @@ onActivated(() => {
<ContentWrap
v-show=
"detailType == 'consult' && currentStep != 1"
id=
"policy-info-consult"
title=
"合约策略"
expandSwicth
style=
"margin-top: 15px"
:isExpand=
"expandPolicyConsult"
@
expand=
"(v) => (expandPolicyConsult = v)"
description=
""
>
<StrategyTable
ref=
"strategyTableEditRef"
:show-title=
"true"
:value=
"consultDetailInfo?.policys"
<StrategyTable
ref=
"strategyTableEditRef"
:show-title=
"true"
:value=
"consultDetailInfo?.policys"
:template-json=
"templateJson"
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:productFieldList=
"productFieldList"
:annonFieldsList=
"annonFieldsList"
:limit-state-option-list=
"limitedStateOptionsList"
:constraintOptionsList=
"constraintOptionsList"
></StrategyTable>
</ContentWrap>
...
...
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