Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-operation-4
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
达摩4.0重构
haoban-operation-4
Commits
2e5e05eb
Commit
2e5e05eb
authored
Aug 04, 2020
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口联调
parent
d89a531b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
menu-list.vue
src/views/permission/menu-config/menu-list.vue
+1
-0
operation-table.vue
src/views/permission/operation-list/operation-table.vue
+23
-7
No files found.
src/views/permission/menu-config/menu-list.vue
View file @
2e5e05eb
...
...
@@ -285,6 +285,7 @@ export default {
this
.
editMenu
.
loading
=
true
;
// 编辑节点
if
(
!
isSubMenu
&&
menuId
)
{
params
.
menuId
=
menuId
;
editMenu
(
params
).
then
(
succ
.
bind
(
this
,
'保存成功!'
)).
finally
(()
=>
this
.
editMenu
.
loading
=
false
);
}
else
{
params
.
appType
=
this
.
appType
;
...
...
src/views/permission/operation-list/operation-table.vue
View file @
2e5e05eb
...
...
@@ -36,7 +36,13 @@
<el-dialog
:visible
.
sync=
"editOperation.show"
:title=
"editOperation.operationItemId ? '编辑操作项' : '新建操作项'"
width=
"590px"
@
closed=
"onEditOperationClose"
>
<el-form
:model=
"editOperation"
:rules=
"editOperationRule"
ref=
"editOperation"
label-width=
"110px"
>
<el-form-item
label=
"节点"
prop=
"menuId"
>
<el-cascader
v-model=
"editOperation.menuId"
:options=
"menuList"
:props=
"{ checkStrictly: true, label: 'menuName', value: 'menuId' }"
style=
"width: 440px"
clearable
></el-cascader>
<el-cascader
v-model=
"editOperation.menuId"
:options=
"menuList"
:props=
"{ checkStrictly: true, label: 'menuName', value: 'menuId' }"
style=
"width: 440px"
clearable
@
change=
"onMenuChange"
></el-cascader>
</el-form-item>
<el-form-item
label=
"节点code"
>
<el-input
:value=
"editOperation.menuCode"
style=
"width:440px"
disabled
></el-input>
...
...
@@ -139,8 +145,7 @@ export default {
operationItemUrl
:
''
,
authItemFlag
:
''
,
// 是否生产权限项1是0否
roleRange
:
'1'
,
// 1使用管理员
version
:
''
,
appType
:
''
version
:
''
},
editOperationRule
:
{
menuId
:
[{
required
:
true
,
message
:
'请选择节点'
,
trigger
:
'change'
}],
...
...
@@ -157,6 +162,7 @@ export default {
initData
()
{
this
.
getOperationList
();
getMenuList
({
appType
:
this
.
appType
}).
then
(
res
=>
{
this
.
flatMenuList
=
res
.
result
||
[];
this
.
menuList
=
this
.
flatDataToTree
(
res
.
result
||
[]);
})
haobanVersionList
().
then
(
res
=>
{
...
...
@@ -176,9 +182,9 @@ export default {
appType
:
this
.
appType
}
getOperationItemList
(
params
).
then
(
res
=>
{
const
{
totalCount
,
lis
t
}
=
res
.
result
||
{};
const
{
totalCount
,
resul
t
}
=
res
.
result
||
{};
this
.
pager
.
total
=
totalCount
||
0
;
this
.
operationList
=
lis
t
||
[];
this
.
operationList
=
resul
t
||
[];
})
},
onSearch
()
{
...
...
@@ -251,11 +257,20 @@ export default {
})
this
.
$nextTick
(
this
.
$refs
.
editOperation
.
clearValidate
);
},
onMenuChange
(
menuIds
)
{
const
menuId
=
menuIds
[
menuIds
.
length
-
1
];
this
.
flatMenuList
.
some
(
el
=>
{
if
(
el
.
menuId
==
menuId
)
{
this
.
editOperation
.
menuCode
=
el
.
code
;
}
return
el
.
menuId
==
menuId
});
},
// 新建、编辑操作项 弹窗保存
onEditOperationSave
()
{
this
.
$refs
.
editOperation
.
validate
(
vali
=>
{
if
(
!
vali
)
return
;
const
{
operationItemId
,
menuId
,
menuCode
,
operationItemName
,
operationItemCode
,
operationItemUrl
,
authItemFlag
,
roleRange
,
version
,
appType
}
=
this
.
editOperation
;
const
{
operationItemId
,
menuId
,
menuCode
,
operationItemName
,
operationItemCode
,
operationItemUrl
,
authItemFlag
,
roleRange
,
version
}
=
this
.
editOperation
;
const
params
=
{
menuId
:
Array
.
isArray
(
menuId
)
&&
menuId
.
length
>
0
?
menuId
[
menuId
.
length
-
1
]
:
''
,
menuCode
,
...
...
@@ -272,11 +287,12 @@ export default {
params
.
operationItemId
=
operationItemId
;
editOperationItem
(
params
).
then
(
succ
.
bind
(
this
,
'保存成功!'
)).
finally
(()
=>
this
.
editOperation
.
loading
=
false
);
}
else
{
params
.
appType
=
appType
;
params
.
appType
=
this
.
appType
;
addOperationItem
(
params
).
then
(
succ
.
bind
(
this
,
'新建成功!'
)).
finally
(()
=>
this
.
editOperation
.
loading
=
false
);
}
function
succ
(
msg
)
{
this
.
$message
.
success
(
msg
);
this
.
editOperation
.
show
=
false
;
this
.
getOperationList
();
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment