Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fcb84d93
authored
Nov 02, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改菜单
1 parent
02f0193c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
23 deletions
src/App.vue
src/components/rule-form/index.vue
src/utils/constants.js
src/views/menuManage/index.vue
src/views/workLog/index.vue
src/App.vue
View file @
fcb84d9
...
@@ -53,7 +53,7 @@ export default {
...
@@ -53,7 +53,7 @@ export default {
/* text-align: center; */
/* text-align: center; */
color
:
#2c3e50
;
color
:
#2c3e50
;
height
:
800px
;
height
:
800px
;
overflow-y
:
auto
;
/* overflow-y: auto; */
}
}
/* .glsx-system-sub #nav {
/* .glsx-system-sub #nav {
...
...
src/components/rule-form/index.vue
View file @
fcb84d9
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
<el-radio-group
<el-radio-group
@
change=
"radioChange($event,item.prop)"
@
change=
"radioChange($event,item.prop)"
v-model=
"ruleForm[item.prop]"
v-model=
"ruleForm[item.prop]"
:disabled=
"item.disabled"
>
>
{{
ruleForm
[
item
.
prop
]
}}
{{
ruleForm
[
item
.
prop
]
}}
<el-radio
<el-radio
...
...
src/utils/constants.js
View file @
fcb84d9
...
@@ -20,9 +20,7 @@ const Constants = {
...
@@ -20,9 +20,7 @@ const Constants = {
},
},
// 菜单类型
// 菜单类型
MENU_TYPE
:
{
MENU_TYPE
:
{
1
:
'目录'
,
1
:
'目录'
2
:
'菜单'
,
3
:
'按钮'
},
},
MENU_OTYPE
:
{
MENU_OTYPE
:
{
2
:
'菜单'
,
2
:
'菜单'
,
...
...
src/views/menuManage/index.vue
View file @
fcb84d9
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
:size=
"btn_size"
:size=
"btn_size"
icon=
"el-icon-plus"
icon=
"el-icon-plus"
@
click=
"btnClick('create')"
@
click=
"btnClick('create')"
>
新增
</el-button>
>
新增
目录
</el-button>
</div>
</div>
<el-table
<el-table
ref=
"menuTable"
ref=
"menuTable"
...
@@ -214,19 +214,19 @@ export default {
...
@@ -214,19 +214,19 @@ export default {
enableStatus
:
true
enableStatus
:
true
},
},
form
:
{
form
:
{
type
:
'2
'
,
// type: '1
',
parentName
:
''
,
parentName
:
''
,
enableStatus
:
true
enableStatus
:
true
},
},
menuData
:
[
menuData
:
[
{
label
:
'菜单类型'
,
prop
:
'type'
,
type
:
'radio'
,
children
:
this
.
$Constants
.
MENU_TYPE
},
{
label
:
'菜单类型'
,
prop
:
'type'
,
type
:
'radio'
,
children
:
this
.
$Constants
.
MENU_TYPE
,
disabled
:
false
},
{
label
:
'上级菜单'
,
prop
:
'parentName'
,
type
:
'input'
,
readonly
:
true
,
clickFunc
:
this
.
selectSuperior
,
hidden
:
fals
e
},
{
label
:
'上级菜单'
,
prop
:
'parentName'
,
type
:
'input'
,
readonly
:
true
,
clickFunc
:
this
.
selectSuperior
,
hidden
:
tru
e
},
{
label
:
'菜单名称'
,
prop
:
'menuName'
,
type
:
'input'
},
{
label
:
'菜单名称'
,
prop
:
'menuName'
,
type
:
'input'
},
{
label
:
'权限标识'
,
prop
:
'permissionTag'
,
type
:
'input'
},
{
label
:
'权限标识'
,
prop
:
'permissionTag'
,
type
:
'input'
},
{
label
:
'前端路由'
,
prop
:
'frontRoute'
,
type
:
'input'
},
{
label
:
'前端路由'
,
prop
:
'frontRoute'
,
type
:
'input'
},
{
label
:
'显示排序'
,
prop
:
'orderNum'
,
type
:
'input'
},
{
label
:
'显示排序'
,
prop
:
'orderNum'
,
type
:
'input'
},
{
label
:
'显示状态'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'显示状态'
,
prop
:
'enableStatus'
,
type
:
'switch'
},
{
label
:
'图标'
,
prop
:
'icon'
,
type
:
'input'
}
{
label
:
'图标'
,
prop
:
'icon'
,
type
:
'input'
,
hidden
:
false
}
],
],
menuRules
:
{
menuRules
:
{
type
:
[{
required
:
true
,
message
:
'请选择菜单类型'
,
trigger
:
'blur'
}],
type
:
[{
required
:
true
,
message
:
'请选择菜单类型'
,
trigger
:
'blur'
}],
...
@@ -317,18 +317,35 @@ export default {
...
@@ -317,18 +317,35 @@ export default {
},
},
// 按钮事件
// 按钮事件
btnClick
(
pType
,
scope
)
{
btnClick
(
pType
,
scope
)
{
console
.
log
(
pType
,
scope
,
scope
.
parentId
==
0
)
switch
(
pType
)
{
switch
(
pType
)
{
case
'create'
:
case
'create'
:
this
.
isOpen
=
true
this
.
isOpen
=
true
this
.
menuDialogTitle
=
'新增菜单'
this
.
menuDialogTitle
=
'新增菜单'
this
.
menuData
[
0
].
children
=
this
.
$Constants
.
MENU_TYPE
this
.
menuData
.
map
(
item
=>
{
if
(
item
.
prop
==
'parentName'
)
{
item
.
hidden
=
true
}
else
if
(
item
.
prop
==
'type'
)
{
item
.
children
=
this
.
$Constants
.
MENU_TYPE
item
.
disabled
=
false
}
else
if
(
item
.
prop
==
'icon'
)
{
item
.
hidden
=
true
}
})
this
.
menuForm
=
_
.
cloneDeep
(
this
.
form
)
this
.
menuForm
=
_
.
cloneDeep
(
this
.
form
)
this
.
handleClose
()
this
.
handleClose
()
break
break
case
'btnCreate'
:
case
'btnCreate'
:
this
.
isOpen
=
true
this
.
isOpen
=
true
this
.
menuDialogTitle
=
'新增菜单'
this
.
menuDialogTitle
=
'新增菜单'
this
.
menuData
[
0
].
children
=
this
.
$Constants
.
MENU_OTYPE
this
.
menuData
.
map
(
item
=>
{
if
(
item
.
prop
==
'type'
)
{
item
.
children
=
this
.
$Constants
.
MENU_OTYPE
item
.
disabled
=
false
}
else
if
(
item
.
prop
==
'icon'
)
{
item
.
hidden
=
scope
.
parentId
==
0
}
})
this
.
menuForm
=
_
.
cloneDeep
(
this
.
form
)
this
.
menuForm
=
_
.
cloneDeep
(
this
.
form
)
this
.
menuForm
.
ppId
=
scope
.
id
this
.
menuForm
.
ppId
=
scope
.
id
console
.
log
(
this
.
menuForm
)
console
.
log
(
this
.
menuForm
)
...
@@ -336,6 +353,13 @@ export default {
...
@@ -336,6 +353,13 @@ export default {
break
break
case
'edit'
:
case
'edit'
:
this
.
menuDialogTitle
=
'编辑菜单'
this
.
menuDialogTitle
=
'编辑菜单'
this
.
menuData
.
map
(
item
=>
{
if
(
item
.
prop
==
'type'
)
{
item
.
disabled
=
true
}
else
if
(
item
.
prop
==
'icon'
)
{
item
.
hidden
=
false
}
})
this
.
isOpen
=
false
this
.
isOpen
=
false
this
.
editEvent
(
scope
)
this
.
editEvent
(
scope
)
break
break
...
...
src/views/workLog/index.vue
View file @
fcb84d9
...
@@ -36,23 +36,13 @@
...
@@ -36,23 +36,13 @@
:searchForm=
"searchDataForm"
:searchForm=
"searchDataForm"
:hasNum=
"false"
:hasNum=
"false"
>
>
<!--
<span
slot=
"status"
slot-scope=
"scope"
>
<span
class=
"statusText"
:class=
"scope.scope.operStatus ? WORKLOGSTATUS[scope.scope.operStatus].split(',')[1] : ''"
>
{{
scope
.
scope
.
operStatus
?
WORKLOGSTATUS
[
scope
.
scope
.
operStatus
].
split
(
','
)[
0
]
:
'--'
}}
</span>
</span>
-->
</basic-table>
</basic-table>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
store
from
'@/store'
;
import
{
WORKLOG_API
}
from
'@/config/config'
import
{
WORKLOG_API
}
from
'@/config/config'
import
{
getWorkLogList
,
exportWorkLog
}
from
'services/worklog'
;
import
{
getWorkLogList
,
exportWorkLog
}
from
'services/worklog'
;
export
default
{
export
default
{
...
@@ -127,7 +117,7 @@ export default {
...
@@ -127,7 +117,7 @@ export default {
exportTable
()
{
exportTable
()
{
const
params
=
this
.
$refs
.
worklogTable
.
page
const
params
=
this
.
$refs
.
worklogTable
.
page
this
.
$Common
.
exportExcel
({
this
.
$Common
.
exportExcel
({
url
:
WORKLOG_API
.
WORKLOG_EXPORT
,
url
:
store
.
state
.
baseURL
+
WORKLOG_API
.
WORKLOG_EXPORT
,
data
:
params
,
data
:
params
,
method
:
'GET'
,
method
:
'GET'
,
fileName
:
'操作日志.xlsx'
fileName
:
'操作日志.xlsx'
...
...
Write
Preview
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