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
41bf6739
authored
2025-12-01 18:08:28 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改logok,支持用户切换角色
1 parent
93b2de50
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
440 additions
and
33 deletions
.env.product
src/assets/images/logo.png
src/components/Table/index.vue
src/layouts/components/Tools/index.vue
src/views/[...all].vue
src/views/data_asset/dataDelivery.vue
src/views/data_smart_contract/components/strategyTable.vue
.env.product
View file @
41bf673
# 页面标题
VITE_APP_TITLE = 可信数据
空间
VITE_APP_TITLE = 可信数据
服务平台
# 接口域名
VITE_API_BASEURL = https://daop-tds-test.zgsjzc.com/
# VITE_API_BASEURL = http://49.4.26.201:31709/
...
...
src/assets/images/logo.png
View file @
41bf673
9.52 KB
|
W:
|
H:
11.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/components/Table/index.vue
View file @
41bf673
...
...
@@ -286,10 +286,15 @@ onMounted(() => {
<span
v-else
>
{{
props
.
tableInfo
.
sortable
?
(
scope
.
row
.
index
)
:
(
scope
.
$index
+
1
)
}}
</span>
</
template
>
<
template
#
default=
"scope"
v-else-if=
"item.type == 'tag'"
>
<el-tag
v-if=
"scope.row[item.field] !== undefined"
<div
v-if=
"scope.row[item.field] !== undefined"
style=
"position: relative;"
>
<el-tag
:type=
"item.tagType ? item.tagType(scope) : tagType(scope.row, item.field)"
>
{{
item
.
getName
?
item
.
getName
(
scope
)
:
tagMethod
(
scope
.
row
,
item
.
field
)
}}
</el-tag>
<span
v-if=
"item.btn && item.btn?.visible?.(scope) !== false && item.btn?.visible !== false"
class=
"text_btn"
style=
"position: absolute;right: 0;"
@
click=
"(item.btn.click && !item.btn.disabled && !scope.row.disabled) ? item.btn.click(scope, item.btn) : handleClick(scope, item.btn)"
v-preReClick
>
{{
item
.
btn
.
label
}}
</span>
</div>
<span
v-else
>
{{
'--'
}}
</span>
</
template
>
<
template
#
default=
"scope"
v-else-if=
"item.type == 'popover'"
>
...
...
src/layouts/components/Tools/index.vue
View file @
41bf673
...
...
@@ -3,12 +3,23 @@ import { useFullscreen } from '@vueuse/core'
import
eventBus
from
'@/utils/eventBus'
import
useSettingsStore
from
'@/store/modules/settings'
import
useUserStore
from
'@/store/modules/user'
import
{
USERROLE
}
from
'@/utils/enum'
import
{
ElMessage
}
from
'element-plus'
const
router
=
useRouter
()
const
settingsStore
=
useSettingsStore
()
const
userStore
=
useUserStore
()
const
userData
=
JSON
.
parse
(
userStore
.
userData
);
const
mainPage
=
useMainPage
()
const
{
isFullscreen
,
toggle
}
=
useFullscreen
()
function
userCommand
(
command
:
'home'
|
'setting'
|
'updatePwd'
|
'hotkeys'
|
'logout'
)
{
const
dataRole
=
computed
(()
=>
{
return
localStorage
.
getItem
(
'userRole'
);
})
/** 记录用户选择的角色 */
const
selectRole
:
any
=
ref
(
USERROLE
.
USE
);
//TODO,在专区需要默认值是平台运营方。
function
userCommand
(
command
:
'home'
|
'setting'
|
'updatePwd'
|
'hotkeys'
|
'logout'
|
'changeRole'
)
{
switch
(
command
)
{
case
'home'
:
router
.
push
({
...
...
@@ -31,6 +42,10 @@ function userCommand(command: 'home' | 'setting' | 'updatePwd' | 'hotkeys' | 'lo
case
'logout'
:
userStore
.
logout
()
break
case
'changeRole'
:
selectRole
.
value
=
dataRole
.
value
;
verifyDialogInfo
.
value
.
visible
=
true
;
break
;
}
}
function
pro
()
{
...
...
@@ -40,6 +55,46 @@ const loaclStorageInfo: any = localStorage.getItem("userData")
onMounted
(()
=>
{
console
.
log
(
'mounted'
,
JSON
.
parse
(
userStore
.
userData
).
abbreviation
)
})
const
verifyDialogInfo
=
ref
({
visible
:
false
,
size
:
600
,
direction
:
"column"
,
header
:
{
title
:
"角色选择"
,
},
type
:
''
,
contents
:
[],
footer
:
{
btns
:
[
{
type
:
"default"
,
label
:
"取消"
,
value
:
"cancel"
},
{
type
:
"primary"
,
label
:
"确定"
,
value
:
"submit"
,
loading
:
false
},
],
},
})
const
verifyDialogBtnClick
=
(
btn
,
info
)
=>
{
if
(
btn
.
value
==
'submit'
)
{
verifyDialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
true
;
userStore
.
getUserSystemMenuByRole
(
selectRole
.
value
).
then
((
res
)
=>
{
verifyDialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
if
(
res
&&
res
!==
false
)
{
if
(
res
?.
length
===
0
)
{
ElMessage
.
warning
(
'该系统用户暂无可用的菜单,请先配置'
);
return
;
}
localStorage
.
setItem
(
'userRole'
,
selectRole
.
value
);
// 从浏览器缓存中重新加载页面
location
.
reload
();
}
}).
catch
(()
=>
{
verifyDialogInfo
.
value
.
footer
.
btns
[
1
].
loading
=
false
;
});
}
else
if
(
btn
.
value
==
'cancel'
)
{
verifyDialogInfo
.
value
.
visible
=
false
;
}
};
</
script
>
<
template
>
<div
class=
"tools"
>
...
...
@@ -50,7 +105,9 @@ onMounted(() => {
</el-icon>
</span>
</div>
-->
<el-dropdown
class=
"user-container"
size=
"default"
@
command=
"userCommand"
>
<el-popover
class=
"user-container"
:width=
"280"
:show-arrow=
"false"
popper-class=
"user-setting"
>
<template
#
reference
>
<div
class=
"user-container"
>
<div
class=
"user-wrapper"
>
<div
class=
"v-uerinfo"
>
...
...
@@ -68,20 +125,64 @@ onMounted(() => {
</el-icon>
</div>
-->
</div>
<template
#
dropdown
>
<el-dropdown-menu
class=
"user-dropdown"
>
<!--
<el-dropdown-item
command=
"setting"
>
个人设置
</el-dropdown-item>
-->
<el-dropdown-item
command=
"updatePwd"
>
修改密码
</el-dropdown-item>
<el-dropdown-item
divided
command=
"logout"
>
退出登录
</el-dropdown-item>
</el-dropdown-menu>
</div>
</
template
>
<
template
#
default
>
<div
class=
"avatar-info"
>
<div
class=
'flex-row'
>
<el-avatar>
<el-icon>
<svg-icon
name=
"ep:user-filled"
/>
</el-icon>
</el-avatar>
<div
class=
"ml8"
>
<div
class=
"color-21"
>
{{
userStore
.
userName
}}
</div>
<div
class=
"text-left"
>
账号:
{{
userData
.
mobileNo
.
replace
(
/
(\d
{3
}
)\d
{4
}
(\d
{4
}
)
/
,
'$1****$2'
)
}}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"horizontal-line"
><
/div
>
<
div
class
=
"user-setting-menu"
>
<
div
class
=
"menu-wrapper"
@
click
=
"userCommand('changeRole')"
>
<
span
class
=
"color-21"
>
用户角色
<
/span
>
<
span
>
{{
dataRole
==
USERROLE
.
USE
?
'数据使用方'
:
(
dataRole
==
USERROLE
.
OPERATION
?
'平台运营方'
:
'数据提供方'
)
}}
<
el
-
icon
>
<
svg
-
icon
name
=
"ep:arrow-right"
/>
<
/el-icon
>
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"horizontal-line"
><
/div
>
<
div
class
=
"login-out"
>
<
div
class
=
"login-out-btn"
@
click
=
"userCommand('logout')"
>
{{
'退出登录'
}}
<
/div
>
<
/div
>
<
/template
>
</el-dropdown>
<
/el-popover
>
<
Dialog
:
dialogInfo
=
"verifyDialogInfo"
@
btnClick
=
"verifyDialogBtnClick"
>
<
div
class
=
"row-main"
>
<
div
class
=
"per"
:
class
=
"selectRole == USERROLE.USE ? 'selected' : ''"
@
click
=
"selectRole = USERROLE.USE"
>
<
div
class
=
"img-use"
><
/div
>
<
div
class
=
"title"
>
数据使用方
<
/div
>
<
/div
>
<
div
class
=
"per"
:
class
=
"selectRole == USERROLE.PROVIDER ? 'selected' : ''"
@
click
=
"selectRole = USERROLE.PROVIDER"
>
<
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
>
<
/div> --
>
<
/div
>
<
/Dialog
>
<
/div
>
<
/template
>
<
style
lang
=
"scss"
scoped
>
...
...
@@ -158,6 +259,88 @@ onMounted(() => {
}
}
:
deep
(.
el
-
popper
)
{
padding
:
0
;
}
:
deep
(.
user
-
setting
)
{
padding
:
0
!
important
;
}
.
horizontal
-
line
{
border
:
none
;
height
:
1
px
;
background
-
color
:
#
E5E5E5
;
width
:
100
%
;
/* 宽度为容器的100% */
}
.
menu
-
wrapper
{
cursor
:
pointer
;
display
:
flex
;
justify
-
content
:
space
-
between
;
padding
:
10
px
0
;
}
.
menu
-
wrapper
:
hover
{
background
:
#
F5F5F5
;
}
.
login
-
out
{
cursor
:
pointer
;
text
-
align
:
center
;
padding
:
0
10
px
;
}
.
login
-
out
-
btn
{
height
:
32
px
;
line
-
height
:
32
px
;
margin
-
top
:
10
px
;
width
:
100
%
;
background
:
#
FFFFFF
;
border
:
1
px
solid
rgba
(
217
,
217
,
217
,
1
);
}
.
color
-
21
{
color
:
#
212121
;
font
-
size
:
14
px
;
padding
-
right
:
12
px
;
&
.
mark
-
icon
{
padding
:
0
16
px
;
display
:
flex
;
align
-
items
:
center
;
position
:
relative
;
img
{
width
:
24
px
;
height
:
24
px
;
margin
-
right
:
8
px
;
}
&
::
after
{
height
:
40
px
;
content
:
''
;
border
-
right
:
1
px
solid
#
E5E5E5
;
position
:
absolute
;
top
:
50
%
;
right
:
0
;
transform
:
translateY
(
-
50
%
);
}
}
}
.
avatar
-
info
{
padding
-
bottom
:
10
px
;
}
.
flex
-
row
{
display
:
flex
;
flex
-
direction
:
row
;
align
-
items
:
center
;
justify
-
content
:
flex
-
start
;
}
:
deep
(.
user
-
container
)
{
display
:
inline
-
block
;
height
:
24
px
;
...
...
@@ -191,4 +374,80 @@ onMounted(() => {
}
}
}
.
ml8
{
margin
-
left
:
8
px
;
}
.
row
-
main
{
display
:
flex
;
flex
-
direction
:
row
;
column
-
gap
:
40
px
;
margin
:
30
px
20
px
10
px
;
.
per
{
cursor
:
pointer
;
&
.
selected
{
.
img
-
use
{
background
-
image
:
url
(
'@/assets/images/dataUser-select.png'
);
}
.
img
-
provider
{
background
-
image
:
url
(
'@/assets/images/dataProvider-select.png'
);
}
.
img
-
operation
{
background
-
image
:
url
(
'@/assets/images/dataOperation-select.png'
);
}
.
title
{
color
:
#
1478
E9
;
}
}
.
img
-
use
{
width
:
100
px
;
height
:
100
px
;
background
-
image
:
url
(
'@/assets/images/dataUser-default.png'
);
background
-
size
:
cover
;
/* 背景图覆盖整个元素 */
background
-
position
:
center
;
/* 背景图居中 */
background
-
repeat
:
no
-
repeat
;
}
.
img
-
provider
{
width
:
100
px
;
height
:
100
px
;
background
-
image
:
url
(
'@/assets/images/dataProvider-default.png'
);
background
-
size
:
cover
;
/* 背景图覆盖整个元素 */
background
-
position
:
center
;
/* 背景图居中 */
background
-
repeat
:
no
-
repeat
;
}
.
img
-
operation
{
width
:
100
px
;
height
:
100
px
;
background
-
image
:
url
(
'@/assets/images/dataOperation-default.png'
);
background
-
size
:
cover
;
/* 背景图覆盖整个元素 */
background
-
position
:
center
;
/* 背景图居中 */
background
-
repeat
:
no
-
repeat
;
}
.
title
{
margin
-
top
:
8
px
;
font
-
size
:
14
px
;
color
:
#
666666
;
line
-
height
:
21
px
;
font
-
weight
:
400
;
text
-
align
:
center
;
width
:
100
px
;
}
}
}
<
/style
>
...
...
src/views/[...all].vue
View file @
41bf673
...
...
@@ -269,7 +269,6 @@ const beforeLogin = () => {
.title
{
margin-top
:
8px
;
font-family
:
PingFangSC-Regular
;
font-size
:
14px
;
color
:
#666666
;
line-height
:
21px
;
...
...
src/views/data_asset/dataDelivery.vue
View file @
41bf673
<
script
lang=
"ts"
setup
name=
"dataDelivery"
>
import
TableTools
from
"@/components/Tools/table_tools.vue"
;
import
{
commonPageConfig
}
from
'@/utils/enum'
;
import
{
commonPageConfig
,
TableColumnWidth
}
from
'@/utils/enum'
;
import
{
getPageList
,
deleteDeliveryContract
...
...
@@ -114,7 +114,15 @@ const tableFields = ref([
}
},
{
label
:
"核验状态"
,
field
:
"verifySatus"
,
type
:
"tag"
,
width
:
96
,
align
:
'center'
,
label
:
"核验状态"
,
field
:
"verifySatus"
,
type
:
"tag"
,
width
:
148
,
align
:
'center'
,
btn
:
{
label
:
'查看'
,
visible
:
(
scope
)
=>
{
return
scope
.
row
.
verifySatus
!=
1
;
},
click
:
(
scope
)
=>
{
//弹出查看日志框。
dialogInfo
.
value
.
visible
=
true
;
},
},
getName
:
(
scope
)
=>
{
const
verifySatus
=
scope
.
row
.
verifySatus
switch
(
verifySatus
)
{
...
...
@@ -162,7 +170,7 @@ const tableInfo = ref({
rowKey
:
'guid'
,
loading
:
false
,
fields
:
tableFields
.
value
,
data
:
[{
verifySatus
:
4
},
{
}],
data
:
[{
verifySatus
:
2
},
{
verifySatus
:
4
},
{
verifySatus
:
3
,
deliveryStatus
:
2
,
}],
page
:
{
type
:
"normal"
,
rows
:
0
,
...
...
@@ -195,22 +203,29 @@ const tableInfo = ref({
}
});
}
else
{
btns
.
push
({
value
:
'refresh'
,
label
:
'刷新'
,
click
:
(
scope
)
=>
{
}
});
}
// 交付只有核验通过有。
let
verifySatus
=
row
.
verifySatus
;
(
verifySatus
==
1
||
verifySatus
==
4
)
&&
btns
.
push
({
value
:
'refresh'
,
label
:
'刷新'
,
click
:
(
scope
)
=>
{
}
});
if
(
verifySatus
==
2
)
{
btns
.
push
({
value
:
'verify'
,
label
:
'核验'
,
click
:
(
scope
)
=>
{
verifyDialogInfo
.
value
.
visible
=
true
;
}
});
}
//已通过且未交付时,有交付按钮
verifySatus
==
3
&&
deliveryStatus
!=
2
&&
btns
.
push
({
value
:
'delivery'
,
label
:
'交付'
,
click
:
(
scope
)
=>
{
}
});
return
btns
;
}
}
...
...
@@ -266,6 +281,128 @@ onBeforeMount(() => {
toSearch
({});
});
const
dialogInfo
=
ref
({
visible
:
false
,
size
:
700
,
direction
:
"column"
,
header
:
{
title
:
"查看执行内容"
,
},
footer
:
{
visible
:
false
}
});
const
handleDialogCancel
=
()
=>
{
dialogInfo
.
value
.
visible
=
false
;
}
const
execTableInfo
=
ref
({
id
:
"exec-table"
,
height
:
'214px'
,
fields
:
<
any
[]
>
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
TableColumnWidth
.
INDEX
,
align
:
"center"
},
{
label
:
"策略id"
,
field
:
"strategyId"
,
width
:
260
},
{
label
:
"操作行为"
,
field
:
"action"
,
width
:
120
},
{
label
:
"操作行为英文名称"
,
field
:
"actionEnName"
,
width
:
140
},
{
label
:
"约束条件"
,
field
:
"constraintName"
,
width
:
120
},
{
label
:
"约束条件英文名称"
,
field
:
"constraintEnName"
,
width
:
140
},
{
label
:
"约束条件运算符"
,
field
:
"constraintOperatorName"
,
width
:
140
},
{
label
:
"约束条件值"
,
field
:
"constraintValue"
,
width
:
150
},
{
label
:
"检验结果"
,
field
:
"result"
,
width
:
130
},
// { label: "上报时间", field: "reportingTime", width: 170 },
],
data
:
[],
showPage
:
false
,
actionInfo
:
{
show
:
false
},
loading
:
false
});
const
verifyDialogInfo
=
ref
({
visible
:
false
,
size
:
460
,
direction
:
"column"
,
header
:
{
title
:
"核验"
,
},
type
:
''
,
contents
:
[
{
type
:
'form'
,
title
:
''
,
formInfo
:
{
id
:
'batch-pass-form'
,
items
:
[
{
type
:
'radio-group'
,
label
:
' '
,
field
:
'verifySatus '
,
default
:
'TG'
,
required
:
false
,
options
:
[
{
label
:
'通过'
,
value
:
'TG'
},
{
label
:
'未通过'
,
value
:
'NTG'
},
],
},
{
label
:
''
,
type
:
"textarea"
,
placeholder
:
"请填写未通过理由(必填)"
,
field
:
"approveSuggest"
,
clearable
:
true
,
required
:
true
,
visible
:
true
,
block
:
true
,
col
:
'margin_b_0'
,
}
]
}
}
],
footer
:
{
btns
:
[
{
type
:
"default"
,
label
:
"取消"
,
value
:
"cancel"
},
{
type
:
"primary"
,
label
:
"确定"
,
value
:
"submit"
,
loading
:
false
},
],
},
});
const
verifyDialogRadioChange
=
(
val
,
row
,
info
)
=>
{
}
const
verifyDialogBtnClick
=
(
btn
,
info
)
=>
{
if
(
btn
.
value
==
'submit'
)
{
// passDialogInfo.value.footer.btns[1].loading = true;
// let params = {
// guid: currTableData.value.approveVO.approveGuid,
// flowType: currTableData.value.approveVO.flowType,
// approveSuggest: info.approveSuggest,
// approveStaffGuid: userData.staffGuid,
// }
// passFlowData(params, currTableData.value.tenantGuid).then((res: any) => {
// passDialogInfo.value.footer.btns[1].loading = false;
// if (res?.code == proxy.$passCode) {
// if (res.data) {
// ElMessage.success('审批成功');
// passDialogInfo.value.visible = false;
// getTableData();
// } else {
// ElMessage.error('审批失败');
// }
// } else {
// ElMessage.error(res.msg);
// }
// }).catch(() => {
// passDialogInfo.value.footer.btns[1].loading = false;
// });
}
else
if
(
btn
.
value
==
'cancel'
)
{
verifyDialogInfo
.
value
.
visible
=
false
;
}
};
</
script
>
<
template
>
...
...
@@ -276,6 +413,11 @@ onBeforeMount(() => {
<div
class=
"table_panel_wrap"
style=
"height: calc(100% - 44px);"
>
<Table
:tableInfo=
"tableInfo"
@
tablePageChange=
"tablePageChange"
/>
</div>
<el-dialog
v-model=
"dialogInfo.visible"
:title=
"dialogInfo.header.title"
width=
"700"
:modal=
"true"
:close-on-click-modal=
"true"
destroy-on-close
align-center
@
close=
"handleDialogCancel"
>
<Table
ref=
"execTableRef"
:tableInfo=
"execTableInfo"
class=
"exec-table"
/>
</el-dialog>
<Dialog
:dialogInfo=
"verifyDialogInfo"
@
btnClick=
"verifyDialogBtnClick"
@
radio-group-change=
verifyDialogRadioChange
/>
</div>
</
template
>
...
...
src/views/data_smart_contract/components/strategyTable.vue
View file @
41bf673
...
...
@@ -6,9 +6,10 @@
<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"
>
<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>
行为类型
</span>
<span
style=
"color:red;margin-left: 2px;"
>
*
</span>
</
template
>
<
template
#
default=
"scope"
>
...
...
@@ -21,7 +22,8 @@
<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>
...
...
@@ -96,7 +98,7 @@
</el-table-column>
</el-table>
<div
v-if=
"!isLook"
class=
"row-add-btn"
>
<el-button
link
@
click=
"addStrategy"
:icon=
"CirclePlus"
v-preReClick
>
添加
操作行为
</el-button>
<el-button
link
@
click=
"addStrategy"
:icon=
"CirclePlus"
v-preReClick
>
添加
行为类型
</el-button>
</div>
<!-- 选择合约模板对话框 -->
<Dialog
_form
:dialogConfigInfo=
"templateDialogInfo"
/>
...
...
@@ -242,7 +244,7 @@ const handleOperatorSelectChange = (val, scope, field) => {
const
addStrategy
=
()
=>
{
let
len
=
strategyValueInfo
.
value
.
length
;
if
(
len
==
props
.
actionOptionsList
?.
length
)
{
proxy
.
$ElMessage
.
warning
(
'暂无可添加的
操作行为
!'
);
proxy
.
$ElMessage
.
warning
(
'暂无可添加的
行为类型
!'
);
return
;
}
let
lastIndex
=
strategyValueInfo
.
value
.
at
(
-
1
)?.
index
||
0
;
...
...
@@ -283,7 +285,7 @@ const handleConditionDelete = (scope) => {
})
}
else
{
//同步删除操作行为
proxy
.
$openMessageBox
(
"确定要删除该
操作行为
和约束条件吗?"
,
()
=>
{
proxy
.
$openMessageBox
(
"确定要删除该
行为类型
和约束条件吗?"
,
()
=>
{
let
index
=
scope
.
row
.
index
;
strategyValueInfo
.
value
.
splice
(
index
-
1
,
1
);
proxy
.
$ElMessage
.
success
(
'删除成功'
);
...
...
@@ -413,7 +415,7 @@ const templateDialogInfo = ref({
const
validateValue
=
()
=>
{
for
(
const
d
of
strategyData
.
value
)
{
if
(
!
d
.
action
)
{
proxy
.
$ElMessage
.
error
(
'
操作行为
必填,请填写完整'
);
proxy
.
$ElMessage
.
error
(
'
行为类型
必填,请填写完整'
);
return
false
;
}
if
(
!
d
.
constraintName
)
{
...
...
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