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
b8a54598
authored
2025-12-01 18:14:19 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
策略管理修改
1 parent
41bf6739
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
6 deletions
src/views/data_smart_contract/components/strategyTable.vue
src/views/data_smart_contract/components/strategyTable.vue
View file @
b8a5459
...
...
@@ -4,7 +4,8 @@
<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"
>
...
...
@@ -15,8 +16,9 @@
<
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>
...
...
@@ -29,7 +31,8 @@
<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>
...
...
@@ -43,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>
...
...
@@ -63,7 +68,8 @@
<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>
...
...
@@ -139,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
);
...
...
@@ -434,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
...
...
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