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
85f91ac2
authored
2025-11-28 17:46:37 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
策略管理添加新的策略页面开发
1 parent
6cfda958
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
10 deletions
src/views/data_smart_contract/components/strategyTable.vue
src/views/data_smart_contract/smartContractCreate.vue
src/views/data_smart_contract/components/strategyTable.vue
View file @
85f91ac
...
...
@@ -4,9 +4,11 @@
<el-button
v-if=
"!isLook"
plain
@
click=
"invokeTemplate"
v-preReClick
>
合约模板调用
</el-button>
</div>
<el-table
class=
"strategyTable"
ref=
"strategyTableRef"
v-loading=
"strategyDataLoading"
:data=
"strategyData"
:height=
"isReport ? 'auto' : '250px'"
:highlight-current-row=
"true"
stripe
tooltip-effect=
"light"
border
:span-method=
"arraySpanMethod"
>
:height=
"isReport ? 'auto' : '250px'"
:highlight-current-row=
"true"
stripe
tooltip-effect=
"light"
border
:span-method=
"arraySpanMethod"
>
<el-table-column
label=
"序号"
width=
"56"
align=
"center"
fixed=
"left"
:formatter=
"formatIndex"
/>
<el-table-column
prop=
"action"
label=
"操作行为"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '100px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<el-table-column
prop=
"action"
label=
"操作行为"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '100px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<template
#
header
>
<span>
操作行为
</span>
<span
style=
"color:red;margin-left: 2px;"
>
*
</span>
...
...
@@ -14,20 +16,23 @@
<
template
#
default=
"scope"
>
<el-select
v-if=
"!isLook"
v-model=
"scope.row['action']"
placeholder=
"请选择"
:disabled=
"isLook"
@
change=
"(val) => selectOperationChange(val, scope)"
clearable
filterable
>
<!-- 合约模板时不可以设置这个属性,只能在合约创建时设置 -->
<el-option
v-for=
"opt in actionOptionsList.filter(a => scope.row.action == a.policyName || !strategyData.some(s => s.action == a.policyName))"
v-for=
"opt in actionOptionsList.filter(a => scope.row.action == a.policyName || !strategyData.some(s => s.action == a.policyName)
|| ((a.policyEnName == 'limitField' || a.policyEnName == 'limitedDeliveryConnector' || a.policyEnName == 'limitedUseConnector') && productFieldList != null)
)"
:key=
"opt['policyName']"
:label=
"opt['policyName']"
:value=
"opt['policyName']"
/>
</el-select>
<span
v-else
>
{{
scope
.
row
[
'action'
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"actionEnName"
label=
"操作行为英文名称"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '120px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<el-table-column
prop=
"actionEnName"
label=
"操作行为英文名称"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '120px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<
template
#
default=
"scope"
>
<el-input
v-if=
"!isLook"
v-model=
"scope.row['actionEnName']"
:disabled=
"true"
placeholder=
"-"
></el-input>
<span
v-else
>
{{
scope
.
row
[
'actionEnName'
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"constraintName"
label=
"约束条件"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '100px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<el-table-column
prop=
"constraintName"
label=
"约束条件"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '100px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<
template
#
header
>
<span>
约束条件
</span>
<span
style=
"color:red;margin-left: 2px;"
>
*
</span>
...
...
@@ -41,13 +46,15 @@
<span
v-else
>
{{
scope
.
row
[
'constraintName'
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"constraintEnName"
label=
"约束条件英文名称"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '120px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<el-table-column
prop=
"constraintEnName"
label=
"约束条件英文名称"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '120px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<
template
#
default=
"scope"
>
<el-input
v-if=
"!isLook"
v-model=
"scope.row['constraintEnName']"
:disabled=
"true"
placeholder=
"-"
></el-input>
<span
v-else
>
{{
scope
.
row
[
'constraintEnName'
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"constraintOperatorCode"
label=
"运算符"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '100px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<el-table-column
prop=
"constraintOperatorCode"
label=
"运算符"
:width=
"isReport ? 'auto' : '150px'"
:min-width=
"isReport ? '100px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<
template
#
header
>
<span>
运算符
</span>
<span
style=
"color:red;margin-left: 2px;"
>
*
</span>
...
...
@@ -61,14 +68,30 @@
<span
v-else
>
{{
scope
.
row
[
'constraintOperatorName'
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"constraintValue"
label=
"约束值"
:width=
"isReport ? 'auto' : '240px'"
:min-width=
"isReport ? '160px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<el-table-column
prop=
"constraintValue"
label=
"约束值"
:width=
"isReport ? 'auto' : '240px'"
:min-width=
"isReport ? '160px' : undefined"
align=
"left"
:show-overflow-tooltip=
"!isReport"
>
<
template
#
header
>
<span>
约束值
</span>
<span
style=
"color:red;margin-left: 2px;"
>
*
</span>
</
template
>
<
template
#
default=
"scope"
>
<el-input
v-if=
"!isLook"
v-model=
"scope.row['constraintValue']"
placeholder=
"请输入"
:maxlength=
"200"
<el-input
v-if=
"!isLook && !( (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector'))"
v-model=
"scope.row['constraintValue']"
placeholder=
"请输入"
:maxlength=
"200"
@
change=
"(val) => handleOperatorSelectChange(val, scope, 'constraintValue')"
clearable
></el-input>
<!-- 限定连接器 -->
<el-select
v-else-if=
"!isLook && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector')"
v-model=
"scope.row['constraintValue']"
:remote=
"true"
:remote-method=
"remoteMethod"
filterable
clearable
placeholder=
"请选择"
>
<el-option
v-for=
"opt in connectorList"
:key=
"opt['guid']"
:label=
"opt['connectorName']"
:value=
"opt['guid']"
/>
</el-select>
<!-- 加密字段 -->
<el-select
v-else-if=
"!isLook && scope.row.constraintEnName == 'limitField'"
v-model=
"scope.row['constraintValue']"
filterable
clearable
placeholder=
"请选择"
>
<el-option
v-for=
"opt in productFieldList"
:key=
"opt['enName']"
:label=
"opt['chName']"
:value=
"opt['guid']"
/>
</el-select>
<span
v-else
>
{{
scope
.
row
[
'constraintValue'
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
...
...
@@ -122,12 +145,19 @@ const props = defineProps({
type
:
Array
<
any
>
,
default
:
[]
},
productFieldList
:
{
//字段列表
type
:
Array
<
any
>
,
default
:
[]
},
isReport
:
{
type
:
Boolean
,
default
:
false
}
})
/** 连接器下拉列表,搜索取得 */
const
connectorList
:
any
=
ref
([]);
const
getActualOperationList
=
(
scope
)
=>
{
let
val
=
scope
.
row
.
constraintName
;
let
conditionItem
=
val
&&
props
.
constraintOptionsList
.
find
(
c
=>
c
.
policyName
==
val
);
...
...
@@ -417,6 +447,20 @@ const validateValue = () => {
return
true
;
}
const
remoteMethod
=
(
query
:
string
)
=>
{
if
(
query
)
{
// loading.value = true
// setTimeout(() => {
// loading.value = false
// options.value = list.value.filter((item) => {
// return item.label.toLowerCase().includes(query.toLowerCase())
// })
// }, 200)
}
else
{
connectorList
.
value
=
[]
}
}
defineExpose
({
strategyData
,
validateValue
...
...
src/views/data_smart_contract/smartContractCreate.vue
View file @
85f91ac
...
...
@@ -822,7 +822,7 @@ 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 || []"
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:operatorOptionList=
"operatorOptionList"
:actionOptionsList=
"actionOptionsList"
:productFieldList=
"[]"
:constraintOptionsList=
"constraintOptionsList"
></StrategyTable>
</ContentWrap>
</div>
...
...
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