Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
73e4b98c
Commit
73e4b98c
authored
Apr 09, 2023
by
dll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
a4d296ed
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
656 additions
and
330 deletions
+656
-330
attendance-performance-manager-ui/admin/public/index.html
attendance-performance-manager-ui/admin/public/index.html
+1
-1
attendance-performance-manager-ui/admin/src/assets/mixins/table.js
...e-performance-manager-ui/admin/src/assets/mixins/table.js
+17
-1
attendance-performance-manager-ui/admin/src/assets/utils/common.js
...e-performance-manager-ui/admin/src/assets/utils/common.js
+177
-0
attendance-performance-manager-ui/admin/src/assets/utils/globalComponents.js
...nce-manager-ui/admin/src/assets/utils/globalComponents.js
+0
-1
attendance-performance-manager-ui/admin/src/components/Breadcrumb.vue
...erformance-manager-ui/admin/src/components/Breadcrumb.vue
+1
-1
attendance-performance-manager-ui/admin/src/components/Header.vue
...ce-performance-manager-ui/admin/src/components/Header.vue
+45
-114
attendance-performance-manager-ui/admin/src/components/HeaderLeft.vue
...erformance-manager-ui/admin/src/components/HeaderLeft.vue
+24
-29
attendance-performance-manager-ui/admin/src/components/tabPane.vue
...e-performance-manager-ui/admin/src/components/tabPane.vue
+31
-0
attendance-performance-manager-ui/admin/src/router.js
attendance-performance-manager-ui/admin/src/router.js
+6
-3
attendance-performance-manager-ui/admin/src/store.js
attendance-performance-manager-ui/admin/src/store.js
+40
-5
attendance-performance-manager-ui/admin/src/views/Home.vue
attendance-performance-manager-ui/admin/src/views/Home.vue
+28
-25
attendance-performance-manager-ui/admin/src/views/Layout.vue
attendance-performance-manager-ui/admin/src/views/Layout.vue
+32
-7
attendance-performance-manager-ui/admin/src/views/staff/adjust/log/dialogshow.vue
...anager-ui/admin/src/views/staff/adjust/log/dialogshow.vue
+1
-1
attendance-performance-manager-ui/admin/src/views/staff/black/list.vue
...rformance-manager-ui/admin/src/views/staff/black/list.vue
+2
-5
attendance-performance-manager-ui/admin/src/views/staff/dialogshow.vue
...rformance-manager-ui/admin/src/views/staff/dialogshow.vue
+19
-19
attendance-performance-manager-ui/admin/src/views/staff/drawershow.vue
...rformance-manager-ui/admin/src/views/staff/drawershow.vue
+20
-21
attendance-performance-manager-ui/admin/src/views/staff/homepage.vue
...performance-manager-ui/admin/src/views/staff/homepage.vue
+27
-0
attendance-performance-manager-ui/admin/src/views/staff/list.vue
...nce-performance-manager-ui/admin/src/views/staff/list.vue
+159
-87
attendance-performance-manager-ui/admin/src/views/staff/view.vue
...nce-performance-manager-ui/admin/src/views/staff/view.vue
+2
-2
attendance-performance-manager-ui/admin/src/views/system/menu/list.vue
...rformance-manager-ui/admin/src/views/system/menu/list.vue
+11
-5
attendance-performance-manager-ui/admin/src/views/system/menu/show.vue
...rformance-manager-ui/admin/src/views/system/menu/show.vue
+13
-3
No files found.
attendance-performance-manager-ui/admin/public/index.html
View file @
73e4b98c
...
...
@@ -5,7 +5,7 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
考勤绩效管理平台
</title>
<title>
智慧政务绩效管理系统
</title>
<link
rel=
"stylesheet"
href=
"https://unpkg.com/element-ui@2.15.5/lib/theme-chalk/index.css"
>
</head>
<body>
...
...
attendance-performance-manager-ui/admin/src/assets/mixins/table.js
View file @
73e4b98c
...
...
@@ -57,7 +57,8 @@ export default {
.
then
(({
data
})
=>
{
this
.
tableData
=
this
.
beforeRender
(
Object
.
assign
({},
this
.
tableData
,
data
)
);
)
console
.
log
(
this
.
tableData
,
''
)
this
.
afterRender
(
this
.
tableData
);
})
.
catch
(
error
=>
{
...
...
@@ -245,6 +246,21 @@ export default {
}
return
info
},
// 格式化员工类型
formatterStatus
(
row
,
column
,
val
){
const
content
=
formatter
(
this
.
tableData
,
column
,
val
);
if
(
content
)
{
if
(
val
==
'
1
'
)
{
return
<
el
-
tag
size
=
'
mini
'
>
全职
<
/el-tag
>
}
else
if
(
val
==
'
2
'
)
{
return
<
el
-
tag
size
=
'
mini
'
>
兼职
<
/el-tag
>
}
else
if
(
val
==
'
3
'
)
{
return
<
el
-
tag
size
=
'
mini
'
>
实习
<
/el-tag
>
}
}
else
{
return
val
}
},
// 多选表格行
handleSelectionChange
(
val
)
{
this
.
selection
=
val
.
map
(
i
=>
i
.
id
);
...
...
attendance-performance-manager-ui/admin/src/assets/utils/common.js
0 → 100644
View file @
73e4b98c
/**
* @desc 克隆
* @param obj 克隆源
*/
export
const
deepClone
=
(
obj
)
=>
{
let
newObj
=
Array
.
isArray
(
obj
)
?
[]
:
{};
if
(
obj
&&
typeof
obj
===
"
object
"
)
{
for
(
let
key
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
key
))
{
newObj
[
key
]
=
obj
&&
typeof
obj
[
key
]
===
"
object
"
?
deepClone
(
obj
[
key
])
:
obj
[
key
];
}
}
}
return
newObj
;
}
/**
* @desc 建立树型
* @param data 数据源
* @param parentId 根节点
* @param id id 匹配项
* @param pid parentId匹配项
*/
export
const
toTreeData
=
(
data
,
parentId
,
id
,
pid
)
=>
{
// 建立个树形结构,需要定义个最顶层的父节点,pId是-1
let
parent
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
if
(
data
[
i
][
pid
]
!=
parentId
)
{
}
else
{
let
obj
=
{};
for
(
let
key
in
data
[
i
])
{
obj
[
key
]
=
data
[
i
][
key
]
}
obj
[
'
children
'
]
=
[];
parent
.
push
(
obj
);
}
}
fnChildren
(
parent
);
function
fnChildren
(
parent
)
{
if
(
data
.
length
!==
0
)
{
for
(
let
i
=
0
;
i
<
parent
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
data
.
length
;
j
++
)
{
if
(
parent
[
i
].
id
==
data
[
j
][
pid
])
{
let
obj
=
{};
for
(
let
k
in
data
[
j
])
{
obj
[
k
]
=
data
[
j
][
k
]
}
obj
[
"
children
"
]
=
[];
parent
[
i
].
children
.
push
(
obj
);
}
}
fnChildren
(
parent
[
i
].
children
);
}
}
}
return
deleteEmptyChildren
(
parent
);
}
export
const
deleteEmptyChildren
=
(
arr
)
=>
{
if
(
arr
.
length
)
{
for
(
let
i
in
arr
)
{
if
(
arr
[
i
].
children
.
length
)
{
deleteEmptyChildren
(
arr
[
i
].
children
)
}
else
{
delete
arr
[
i
].
children
;
}
}
}
return
arr
}
export
const
parentTreeNode
=
(
treeList
,
parentKEY
,
id
)
=>
{
let
temp
=
[]
let
searchFn
=
function
(
treeList
,
id
)
{
for
(
let
i
=
0
;
i
<
treeList
.
length
;
i
++
)
{
let
item
=
treeList
[
i
]
if
(
item
.
id
===
id
)
{
temp
.
push
(
item
)
searchFn
(
treeList
,
item
[
parentKEY
])
break
}
else
{
if
(
item
.
children
)
{
searchFn
(
item
.
children
,
id
)
}
}
}
}
searchFn
(
treeList
,
id
)
return
temp
}
export
const
childrenTreeNode
=
(
treeList
,
parentKEY
,
id
)
=>
{
let
temp
=
[{
id
:
id
}];
let
searchFn
=
function
(
treeList
,
id
)
{
for
(
let
i
=
0
;
i
<
treeList
.
length
;
i
++
)
{
let
item
=
treeList
[
i
];
if
(
item
[
parentKEY
]
===
id
)
{
temp
.
push
(
item
);
searchFn
(
treeList
,
item
.
id
);
// break;
}
else
{
if
(
item
.
children
)
{
searchFn
(
item
.
children
,
id
);
}
}
// console.log("run");
}
};
searchFn
(
treeList
,
id
);
return
temp
;
}
export
const
getItemData
=
(
list
,
key
,
value
)
=>
{
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
let
item
=
list
[
i
];
if
(
item
[
key
]
===
value
)
{
return
item
;
}
else
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
let
res
=
getItemData
(
item
.
children
,
key
,
value
);
if
(
res
)
{
return
res
;
}
}
}
}
}
/**
* @desc 叶子节点查询根节点
* @param tree 数据源
* @param parentId 根节点
* @param config id children 匹配项
*/
export
const
getTreeIds
=
(
tree
,
nodeId
,
config
)
=>
{
const
{
children
=
'
children
'
,
id
=
'
id
'
}
=
config
||
{}
const
toFlatArray
=
(
tree
,
parentId
)
=>
{
return
tree
.
reduce
((
t
,
_
)
=>
{
const
child
=
_
[
children
]
return
[
...
t
,
parentId
?
{
...
_
,
parentId
}
:
_
,
...(
child
&&
child
.
length
?
toFlatArray
(
child
,
_
[
id
])
:
[])]
},
[])
}
const
getIds
=
flatArray
=>
{
let
ids
=
[
nodeId
]
let
child
=
flatArray
.
find
(
_
=>
_
[
id
]
===
nodeId
)
while
(
child
&&
child
.
parentId
)
{
ids
=
[
child
.
parentId
,
...
ids
]
child
=
flatArray
.
find
(
_
=>
_
[
id
]
===
child
.
parentId
)
}
return
ids
}
return
getIds
(
toFlatArray
(
tree
))
}
attendance-performance-manager-ui/admin/src/assets/utils/globalComponents.js
View file @
73e4b98c
...
...
@@ -15,7 +15,6 @@ import FileUpload from '@/components/FileUpload';
import
Editor
from
'
@/components/Editor
'
;
import
Map
from
'
@/components/Map
'
;
import
MapDetail
from
'
@/components/MapDetail
'
;
const
Prototype
=
function
()
{};
Prototype
.
install
=
(
Vue
,
options
)
=>
{
...
...
attendance-performance-manager-ui/admin/src/components/Breadcrumb.vue
View file @
73e4b98c
...
...
@@ -70,7 +70,7 @@ export default {
const
type
=
urlArray
.
pop
();
group
.
unshift
({
name
:
"
考勤
绩效管理系统
"
name
:
"
智慧政务
绩效管理系统
"
})
if
(
types
[
type
])
{
group
.
push
({
...
...
attendance-performance-manager-ui/admin/src/components/Header.vue
View file @
73e4b98c
...
...
@@ -8,26 +8,27 @@
<div
class=
"layout-logo flex"
>
<i
class=
"el-icon-menu"
@
click=
'showMobileMenu=!showMobileMenu'
>
</i>
<router-link
to=
"/"
>
<
img
src=
"../assets/images/logo.png"
style=
"margin-bottom:5px"
height=
"40"
alt=
""
>
<b
style=
"color:white;font-size:
18px;"
>
考勤
绩效管理系统
</b>
<
!--
<img
src=
"../assets/images/logo.png"
style=
"margin-bottom:5px"
height=
"40"
alt=
""
>
--
>
<b
style=
"color:white;font-size:
20px;"
>
智慧政务
绩效管理系统
</b>
</router-link>
</div>
<!-- 一级菜单 -->
<ul
class=
"menu-list flex"
>
<li
v-for=
'item in menu'
:key=
'item.id'
>
<!-- :active='submenu.path === item.path' -->
<router-link
:to=
"item.path"
:title=
"item.name"
replace
>
<span
@
click=
"RouterTo(item.path)"
:class=
"
{active:activePath === item.path}">
<i
:class=
"'el-icon-'+item.icon"
></i>
{{
item
.
name
}}
</
router-link
>
</
span
>
</li>
</ul>
</div>
<div
class=
"controllBar"
>
<el-badge
:value=
"12"
class=
"item"
>
<i
class=
"el-icon-bell"
style=
"font-size: 15px;margin-right: 10px"
>
消息
</i>
</el-badge>
</div>
<div
class=
"controllBar"
@
click=
"returnHome"
>
<i
class=
"el-icon-s-home"
style=
"font-size: 15px;margin-right: 10px"
>
首页
</i>
...
...
@@ -48,35 +49,33 @@
</div>
</div>
<!-- 一级菜单 -->
<ul
class=
"mobile-menu-list flex flex-pack-justify"
v-if=
'showMobileMenu'
>
<li
v-for=
'item in menu'
:key=
'item.id'
>
<
router-link
:to=
"item.path"
:active=
'submenu.path === item.path'
:title=
"item.name
"
>
<li
v-for=
'item in menu'
:key=
'item.id'
@
click=
"RouterTo(item.path)"
>
<
span
:class=
"
{active:activePath === item.path}
">
<i
:class=
"'el-icon-'+item.icon"
></i>
{{
item
.
name
}}
</router-link>
</li>
</ul>
<!-- 二级菜单 -->
<!--
<div
class=
"layout-submenu-wrapper flex"
v-if=
'submenu.children && submenu.children.length'
>
<div
class=
"layout-submenu"
>
<ul
class=
"submenu-list flex"
>
<li
v-for=
'item in submenu.children'
:key=
'item.id'
>
<a
:href=
"item.path"
target=
"blank"
v-if=
'item.isOut'
>
{{
item
.
name
}}
</a>
<router-link
:to=
"item.path"
:active=
'group === item.path'
v-else
>
{{
item
.
name
}}
</router-link>
</span>
</li>
</ul>
</div>
</div>
-->
</div>
</
template
>
<
script
>
export
default
{
name
:
"
Header
"
,
methods
:
{
// 导航栏路由跳转
RouterTo
(
path
){
window
.
sessionStorage
.
CurrentSecondPath
=
path
this
.
$store
.
commit
(
'
setCurrentSecondPath
'
,
path
)
this
.
$store
.
commit
(
'
setThirdPath
'
,
path
)
this
.
$router
.
push
({
path
})
let
thirdArr
=
this
.
headBar
.
children
.
find
(
item
=>
item
.
path
===
path
)
this
.
$store
.
commit
(
'
setCurrentThirdArr
'
,
thirdArr
.
children
)
this
.
$emit
(
'
changePath
'
,
path
)
//触发点击事件
},
returnHome
(){
this
.
$router
.
replace
({
path
:
'
/
'
})
},
...
...
@@ -99,44 +98,8 @@ export default {
},
beforeDestroy
()
{
console
.
log
(
"
beforeDestroy
"
);
//window.removeEventListener("message", this.getsocketData, false);
},
mounted
()
{
// console.log("mounted");
// this.$nextTick(function () {
// console.log("login websocket:"+"ws://"+process.env.VUE_APP_WEBSOCKET_API +"/ws?accessToken="+ this.$store.state.userData.id)
// createSocket(
// "ws://" +
// process.env.VUE_APP_WEBSOCKET_API +
// "/ws?accessToken=" +
// this.$store.state.userData.id
// );
// });
// let _this = this;
// const getsocketData = (e) => {i
// // 创建接收消息函数
// const data = e && e.detail.data;
// let obj = JSON.parse(data);
// if (obj.type == "SEND_TO_ALL_REQUEST") {
// vm.refreshData();
// let content = JSON.parse(obj.body.content);
// _this.$notify({
// title: "警告",
// message: content,
// type: "warning",
// duration: 8000,
// });
// }
// };
// this.getsocketData = getsocketData;
// // 注册监听事件
// window.addEventListener("onmessageWS", getsocketData,false);
// console.log(this.menu,'菜单数据')
},
mounted
()
{},
computed
:
{
group
()
{
const
relativeGroup
=
this
.
$store
.
state
.
group
;
...
...
@@ -164,39 +127,6 @@ export default {
}
else
{
return
this
.
headBar
.
children
}
// return this.userData.children.map(item=>{
// const url = item.path ? item.url : (item.childList[0] ? (item.childList[0].url || '') : '');
// return {
// name: item.name,
// path: url,
// id: item.id,
// icon: item.imgPath,
// children: item.childList.map(sub=>{
// return {
// name: sub.name,
// path: sub.url ? sub.url : (sub.childList[0] ? (sub.childList[0].url || 0) : ''),
// id: sub.id,
// parentId: sub.parentId,
// icon: sub.imgPath,
// isOut: /^https?\:\/\//.test(sub.url)
// }
// })
// }
// })
},
submenu
()
{
if
(
!
this
.
menu
.
length
)
return
{};
let
matchMenu
=
{};
this
.
menu
.
forEach
(
item
=>
{
const
menu
=
item
;
item
.
children
.
forEach
(
item
=>
{
if
(
item
.
path
===
this
.
group
)
{
matchMenu
=
menu
;
return
;
}
})
})
return
matchMenu
},
// 二级菜单数据
headBar
()
{
...
...
@@ -205,6 +135,10 @@ export default {
userData
(){
return
this
.
$store
.
state
.
userData
},
// 二级路径
activePath
(){
return
this
.
$store
.
state
.
CurrentSecondPath
}
},
data
()
{
return
{
...
...
@@ -212,8 +146,7 @@ export default {
}
},
created
(){
console
.
log
(
this
.
userData
,
'
用户数据
'
)
console
.
log
(
this
.
menu
,
'
导航栏数据
'
)
}
}
</
script
>
...
...
@@ -241,21 +174,21 @@ export default {
.menu-list{
li{
a
{
span
{
display: block;
padding: 0 1
2
px;
padding: 0 1
6
px;
height: 100%;
color: #eee;
&.router-link-active,
&[active]{
//background: #1890ff;
cursor: pointer;
margin-right: 20px;
}
.active{
color: #fff;
list-style-type:none;
border-bottom:3px solid #fff;
padding-bottom: 2px;
}
}
}
}
.layout-profile{
...
...
@@ -313,19 +246,17 @@ export default {
.mobile-menu-list{
display: flex;
background: #222333;
padding:
0
10px;
padding: 10px;
li{
padding: 8px 5px;
a{
width: 1em;
span{
display: block;
padding: 0 12px;
height: 100%;
color: #eee;
font-size: 14px;
word-break: break-all;
&.router-link-active,
&[active]{
color: #1890ff;
cursor: pointer;
}
.active{
color: #1890ff;
}
}
}
...
...
attendance-performance-manager-ui/admin/src/components/HeaderLeft.vue
View file @
73e4b98c
...
...
@@ -72,7 +72,26 @@ export default {
this
.
$message
.
success
(
"
已退出登录
"
);
this
.
$store
.
commit
(
"
logout
"
);
this
.
$router
.
replace
(
"
/login
"
);
});
})
},
// 处理返回导航栏
mapMenu
(
arr
){
if
(
arr
.
length
===
0
)
return
[]
let
result
=
arr
.
map
(
item
=>
{
const
url
=
item
.
url
?
item
.
url
:
item
.
childList
[
0
]
?
item
.
childList
[
0
].
url
||
""
:
""
;
return
{
name
:
item
.
name
,
path
:
url
,
id
:
item
.
id
,
icon
:
item
.
imgPath
,
children
:
item
.
childList
.
length
===
0
?
[]:
this
.
mapMenu
(
item
.
childList
)
}
})
return
result
},
},
computed
:
{
...
...
@@ -101,34 +120,7 @@ export default {
return
this
.
userData
.
flat
;
},
menu
()
{
if
(
!
this
.
userData
.
barList
)
return
[];
return
this
.
userData
.
barList
.
map
((
item
)
=>
{
const
url
=
item
.
url
?
item
.
url
:
item
.
childList
[
0
]
?
item
.
childList
[
0
].
url
||
""
:
""
;
return
{
name
:
item
.
name
,
path
:
url
,
id
:
item
.
id
,
icon
:
item
.
imgPath
,
children
:
item
.
childList
.
map
((
sub
)
=>
{
return
{
name
:
sub
.
name
,
path
:
sub
.
url
?
sub
.
url
:
sub
.
childList
[
0
]
?
sub
.
childList
[
0
].
url
||
0
:
""
,
id
:
sub
.
id
,
parentId
:
sub
.
parentId
,
icon
:
sub
.
imgPath
,
isOut
:
/^https
?\:\/\/
/
.
test
(
sub
.
url
),
};
}),
};
});
return
this
.
mapMenu
(
this
.
userData
.
barList
)
},
defaultActive
()
{
this
.
search
=
""
;
...
...
@@ -156,6 +148,9 @@ export default {
data
()
{
return
{};
},
created
(){
console
.
log
(
this
.
menu
,
'
菜单
'
)
}
};
</
script
>
...
...
attendance-performance-manager-ui/admin/src/components/tabPane.vue
0 → 100644
View file @
73e4b98c
<
template
>
<div>
<el-menu
:default-active=
"activeName"
class=
"el-menu-demo"
mode=
"horizontal"
@
select=
"handleClick"
v-if=
"thirdList.length>0"
>
<el-menu-item
:index=
"item.path"
v-for=
"(item,index) in thirdList"
:key=
"index"
>
{{
item
.
name
}}
</el-menu-item>
</el-menu>
</div>
</
template
>
<
script
>
export
default
{
props
:{
thirdList
:{
type
:
Boolean
,
default
:[]
},
activeName
:{
type
:
String
,
default
:
''
}
},
methods
:{
handleClick
(
key
,
keyPath
){
this
.
$emit
(
'
handleClick
'
,
key
)
}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
attendance-performance-manager-ui/admin/src/router.js
View file @
73e4b98c
...
...
@@ -39,12 +39,15 @@ const router = new Router({
...
restBuilder
(
'
task
'
,
'
system/task
'
),
// 系统管理--任务管理
//部门
...
restBuilder
(
'
dept
'
,
'
dept
'
),
...
restBuilder
(
'
dept
'
,
'
dept
'
),
//部门
...
restBuilder
(
'
staff
'
,
'
staff
'
),
//花名册 员工信息
...
restBuilder
(
'
staff/care
'
,
'
staff/care
'
),
// 员工关怀信息
...
restBuilder
(
'
care/template
'
,
'
care/template
'
),
// 关怀问候信息
...
restBuilder
(
'
job
'
,
'
job
'
),
// 职位信息
...
restBuilder
(
'
staff/black
'
,
'
staff/black
'
),
// 员工黑名单信息
...
restBuilder
(
'
job
'
,
'
job
'
),
// 职位信息
...
restBuilder
(
'
staff/adjust/log
'
,
'
staff/adjust/log
'
),
// 员工调岗信息
...
restBuilder
(
'
staff/regular
'
,
'
staff/regular
'
),
// 员工转正信息
...
restBuilder
(
'
staff/leave
'
,
'
staff/leave
'
),
// 员工离职信息
...
...
@@ -108,7 +111,7 @@ function builder(path, component = path, requiresAuth = false) {
component
:
getComponent
(
component
),
meta
:
{
requiresAuth
:
requiresAuth
}
}
,
}
}
...
...
attendance-performance-manager-ui/admin/src/store.js
View file @
73e4b98c
...
...
@@ -7,14 +7,25 @@ Vue.use(Vuex)
let
userData
=
{};
let
currentParentName
=
''
let
headBar
=
[]
let
CurrentThirdArr
=
[]
let
ThirdPath
=
''
let
CurrentSecondPath
=
''
try
{
userData
=
JSON
.
parse
(
window
.
sessionStorage
.
userData
||
'
{}
'
);
currentParentName
=
window
.
sessionStorage
.
currentParentName
||
''
headBar
=
JSON
.
parse
(
window
.
sessionStorage
.
headBar
||
'
{}
'
)
CurrentThirdArr
=
JSON
.
parse
(
window
.
sessionStorage
.
CurrentThirdArr
||
'
{}
'
)
ThirdPath
=
window
.
sessionStorage
.
ThirdPath
||
''
CurrentSecondPath
=
window
.
sessionStorage
.
CurrentSecondPath
||
''
}
catch
(
error
)
{
console
.
log
(
'
未从session中获取到userData
'
)
console
.
log
(
'
未从session中获取到currentParentName
'
)
console
.
log
(
'
未从session中获取到headBar
'
)
console
.
log
(
'
未从session中获取到CurrentThirdArr
'
)
console
.
log
(
'
未从session中获取到ThirdPath
'
)
console
.
log
(
'
未从session中获取到CurrentSecondPath
'
)
}
function
convertTreeToList
(
root
,
array
)
{
...
...
@@ -54,7 +65,10 @@ export default new Vuex.Store({
userData
,
//用户数据
group
:
''
,
headBar
,
currentParentName
//当前选择菜单
currentParentName
,
//当前选择一级菜单
CurrentSecondPath
,
//当前二级菜单路径
CurrentThirdArr
,
ThirdPath
},
// 同步存储数据
mutations
:
{
...
...
@@ -65,6 +79,7 @@ export default new Vuex.Store({
window
.
sessionStorage
.
userData
=
JSON
.
stringify
(
data
);
window
.
sessionStorage
.
token
=
data
.
token
;
},
// 头部导航栏数据
setHeadBar
(
state
,
data
){
state
.
headBar
=
data
window
.
sessionStorage
.
headBar
=
JSON
.
stringify
(
data
)
...
...
@@ -72,16 +87,36 @@ export default new Vuex.Store({
logout
(
state
)
{
state
.
userData
=
{};
state
.
isLogin
=
false
;
window
.
sessionStorage
.
userData
=
''
;
window
.
sessionStorage
.
token
=
''
;
// window.sessionStorage.userData = '';
// window.sessionStorage.token = '';
// window.sessionStorage.headBar = ''
// window.sessionStorage.currentParentName = ''
// window.sessionStorage.CurrentSecondPath = ''
// window.sessionStorage.CurrentThirdArr = ''
window
.
sessionStorage
.
clear
()
},
setGroup
(
state
,
data
)
{
state
.
group
=
data
;
},
// 当前以及导航名
setCurrentParentName
(
state
,
data
){
state
.
currentParentName
=
data
window
.
sessionStorage
.
currentParentName
=
data
}
},
setCurrentSecondPath
(
state
,
data
){
state
.
CurrentSecondPath
=
data
window
.
sessionStorage
.
CurrentSecondPath
=
data
},
// 当前三级导航栏
setCurrentThirdArr
(
state
,
data
){
state
.
CurrentThirdArr
=
data
window
.
sessionStorage
.
CurrentThirdArr
=
JSON
.
stringify
(
data
)
},
// 当前三级导航栏路径
setThirdPath
(
state
,
data
){
state
.
ThirdPath
=
data
window
.
sessionStorage
.
ThirdPath
=
data
},
},
// 异步任务
actions
:
{
...
...
attendance-performance-manager-ui/admin/src/views/Home.vue
View file @
73e4b98c
...
...
@@ -2,7 +2,7 @@
<div
class=
"page page-home"
>
<!-- 欢迎你,
{{
userData
}}
-->
<el-row
type=
"flex"
align=
"top"
justify=
"space-between"
:gutter=
"40"
>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
:xs=
"12"
>
<el-card>
<div
class=
"data_left"
>
<div
class=
"title"
>
今日数据洞察
</div>
...
...
@@ -38,9 +38,8 @@
</div>
</div>
</el-card>
</el-col>
<el-col
:span=
"18"
>
<el-col
:span=
"18"
:xs=
"12"
>
<el-card
class=
"right_card"
>
<div
class=
"data_right"
>
<div
class=
"title"
>
科学化、精细化、以人为本知行合一的管理理念
</div>
...
...
@@ -71,26 +70,7 @@ export default {
return
this
.
$store
.
state
.
userData
;
},
menu
()
{
if
(
!
this
.
userData
.
barList
)
return
[]
return
this
.
userData
.
barList
.
map
(
item
=>
{
const
url
=
item
.
url
?
item
.
url
:
(
item
.
childList
[
0
]
?
(
item
.
childList
[
0
].
url
||
''
)
:
''
);
return
{
name
:
item
.
name
,
path
:
url
,
id
:
item
.
id
,
icon
:
item
.
imgPath
,
children
:
item
.
childList
.
map
(
sub
=>
{
return
{
name
:
sub
.
name
,
path
:
sub
.
url
?
sub
.
url
:
(
sub
.
childList
[
0
]
?
(
sub
.
childList
[
0
].
url
||
0
)
:
''
),
id
:
sub
.
id
,
parentId
:
sub
.
parentId
,
icon
:
sub
.
imgPath
,
isOut
:
/^https
?\:\/\/
/
.
test
(
sub
.
url
)
}
})
}
})
return
this
.
mapMenu
(
this
.
userData
.
barList
)
}
},
data
(){
...
...
@@ -138,6 +118,8 @@ export default {
created
(){
this
.
$store
.
commit
(
'
setHeadBar
'
,[])
this
.
$store
.
commit
(
"
setCurrentParentName
"
,
''
)
this
.
$store
.
commit
(
'
setCurrentThirdArr
'
,[])
console
.
log
(
this
.
menu
,
'
菜单
'
)
},
methods
:{
tabChildren
(
name
){
...
...
@@ -147,20 +129,41 @@ export default {
// 路由跳转
if
(
result
.
children
.
length
>
0
){
this
.
$router
.
push
({
path
:
result
.
children
[
0
].
path
})
this
.
$store
.
commit
(
'
CurrentSecondPath
'
,
result
.
children
[
0
].
path
)
this
.
$store
.
commit
(
'
setCurrentThirdArr
'
,
result
.
children
[
0
].
children
)
}
else
{
this
.
$message
.
error
(
'
暂未完成添加
'
);
}
},
mapMenu
(
arr
){
if
(
arr
.
length
===
0
)
return
[]
let
result
=
arr
.
map
(
item
=>
{
const
url
=
item
.
url
?
item
.
url
:
item
.
childList
[
0
]
?
item
.
childList
[
0
].
url
||
""
:
""
;
return
{
name
:
item
.
name
,
path
:
url
,
id
:
item
.
id
,
icon
:
item
.
imgPath
,
children
:
item
.
childList
.
length
===
0
?
[]:
this
.
mapMenu
(
item
.
childList
)
}
})
return
result
},
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.page-home{
width: 100%;
min-width: 1400px;
height: 100vh;
box-sizing: border-box;
padding: 2% 5%;
//
padding: 2% 5%;
background-color: #f3f2f2;
.data_left{
.cell1{
...
...
attendance-performance-manager-ui/admin/src/views/Layout.vue
View file @
73e4b98c
<
template
>
<div
:style=
"menuPageCss"
class=
"pages page-layout"
>
<LayoutHeader
v-if=
"menuPage!=='left'"
></LayoutHeader>
<LayoutHeader
v-if=
"menuPage!=='left'"
@
changePath=
"changePath"
></LayoutHeader>
<LayoutHeaderLeft
@
toggle=
"toggle"
:isOpen=
"isOpen"
v-if=
"menuPage==='left'"
/>
<div
style=
"padding:20px"
>
<el-card>
<TabPane
:thirdList=
"thirdList"
:activeName=
"activeName"
@
handleClick=
"handleClick"
></TabPane>
<router-view
:class=
"
{'active': !isOpen}" />
</el-card>
</div>
</div>
</
template
>
<
script
>
import
LayoutHeader
from
"
../components/Header
"
;
import
LayoutHeaderLeft
from
"
../components/HeaderLeft
"
;
import
TabPane
from
'
../components/tabPane.vue
'
const
isPC
=
/
(
iPhone|iPad|iPod|iOS|Android
)
/i
.
test
(
navigator
.
userAgent
);
//菜单位置:取值: left :菜单在左面, top :菜单在上面
const
MenuPage
=
"
top
"
;
...
...
@@ -16,12 +22,15 @@ export default {
components
:
{
LayoutHeader
,
LayoutHeaderLeft
,
TabPane
},
data
()
{
return
{
isOpen
:
isPC
,
menuPage
:
MenuPage
,
};
isfresh
:
true
,
path
:
''
}
},
computed
:
{
menuPageCss
()
{
...
...
@@ -29,13 +38,29 @@ export default {
return
{
"
--padding-top
"
:
this
.
menuPage
===
"
left
"
?
"
60px
"
:
"
0px
"
,
"
--margin-left
"
:
this
.
menuPage
===
"
left
"
?
"
200px
"
:
"
0px
"
,
};
}
},
thirdList
(){
if
(
!
this
.
$store
.
state
.
CurrentThirdArr
)
return
[]
return
this
.
$store
.
state
.
CurrentThirdArr
},
activeName
(){
return
this
.
$store
.
state
.
ThirdPath
}
},
methods
:
{
toggle
()
{
this
.
isOpen
=
!
this
.
isOpen
;
},
changePath
(
e
){
this
.
path
=
e
},
handleClick
(
key
){
this
.
$store
.
commit
(
'
setThirdPath
'
,
key
)
this
.
$router
.
push
({
path
:
key
})
}
},
};
</
script
>
...
...
@@ -44,11 +69,11 @@ export default {
.page {
min-height: calc(100vh - 100px);
width: 100%;
position: relative;
background: #fff;
padding: var(--padding-top) 5px 5px 5px;
margin-left: 60px;
// var(--padding-top) 5px 5px 5px;
padding: 20px;
// margin-left: 60px;
&.active {
margin-left: var(--margin-left);
}
...
...
attendance-performance-manager-ui/admin/src/views/staff/adjust/log/dialogshow.vue
View file @
73e4b98c
attendance-performance-manager-ui/admin/src/views/staff/black/list.vue
View file @
73e4b98c
<
template
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
</LayoutTable>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
></LayoutTable>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
</div>
</
template
>
...
...
@@ -16,7 +13,7 @@
name
:
"
StaffBlackList
"
,
components
:
{
drawerShow
},
},
mixins
:
[
table
],
created
()
{
},
...
...
attendance-performance-manager-ui/admin/src/views/staff/dialogshow.vue
View file @
73e4b98c
attendance-performance-manager-ui/admin/src/views/staff/drawershow.vue
View file @
73e4b98c
...
...
@@ -26,7 +26,6 @@
<Field
label=
"转正时间"
prop=
"regularDate"
v-model=
"form.regularDate"
type=
"date"
/>
<Field
label=
"离职时间"
prop=
"leaveDate"
v-model=
"form.leaveDate"
type=
"date"
/>
<Field
label=
"备注"
prop=
"remark"
v-model=
"form.remark"
type=
"textarea"
placeholder=
"请输入备注"
/>
</el-row>
<form-buttons
@
submit=
'submitForm'
noCancelBtn
/>
...
...
@@ -51,7 +50,7 @@
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
员工基本信息
"
,
title
:
"
个人主页
"
,
// 是否显示弹出层
open
:
false
,
direction
:
"
rtl
"
,
...
...
attendance-performance-manager-ui/admin/src/views/staff/homepage.vue
0 → 100644
View file @
73e4b98c
<
template
>
<div
class=
"personal"
>
<el-drawer
title=
"个人主页"
:visible.sync=
"open"
>
{{
data
}}
</el-drawer>
</div>
</
template
>
<
script
>
export
default
{
props
:{
data
:{
type
:
Object
,
default
:{}
}
},
data
(){
return
{
open
:
true
}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
attendance-performance-manager-ui/admin/src/views/staff/list.vue
View file @
73e4b98c
<
template
>
<div
class=
"page"
>
<div
class=
"totalNum flex"
>
<div
class=
"item"
>
在职员工
<span
class=
"num"
>
66
</span></div>
<div
class=
"item flex"
>
<div>
全职
<span
class=
"num"
>
66
</span></div>
<div>
实习
<span
class=
"num"
>
66
</span></div>
<div>
兼职
<span
class=
"num"
>
66
</span></div>
</div>
<div
class=
"item flex"
>
<div>
试用
<span
class=
"num"
>
66
</span></div>
<div>
正式
<span
class=
"num"
>
66
</span></div>
<div>
待离职
<span
class=
"num"
>
66
</span></div>
</div>
</div>
<el-row
:gutter=
"20"
>
<el-col
:span=
"6"
:xs=
"12"
class=
"mytree"
>
<el-card>
<div
class=
"titles"
>
选择部门
</div>
<el-scrollbar
style=
"height: 100%"
>
<el-tree
size=
"mini"
...
...
@@ -22,21 +35,36 @@
>
</el-tree>
</el-scrollbar>
</el-card>
</el-col>
<el-col
:span=
"18"
:xs=
"12"
>
<el-card>
<el-row>
<LayoutTable
notAdd
notDel
:data=
"tableData"
:config=
"tableConfig"
>
<div
class=
"controllList"
>
<!--
<el-button
type=
"primary"
>
新增员工
</el-button>
-->
<el-button
type=
"primary"
>
导出数据
</el-button>
<el-dropdown
class=
"moreControll"
>
<el-button
type=
"primary"
>
更多操作
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item>
同步数据
</el-dropdown-item>
<el-dropdown-item>
导入花名册
</el-dropdown-item>
<el-dropdown-item>
历史花名册
</el-dropdown-item>
<el-dropdown-item>
自定义列表字段
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<span
class=
"freshTime"
>
<i
class=
"el-icon-refresh"
></i>
<span>
上次同步时间:2023-04-09 09:00:00
</span>
</span>
</div>
<LayoutTable
notDel
:data=
"tableData"
:config=
"tableConfig"
>
</LayoutTable>
</el-row>
</el-card>
</el-col>
</el-row>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/
>
<!--
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
-->
<home-page
v-if=
"isshowHome"
:data=
"personData"
></home-page
>
</div>
</
template
>
...
...
@@ -45,16 +73,18 @@
import
drawerShow
from
"
./drawershow
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
tree
from
"
@/assets/mixins/tree
"
;
import
homePage
from
'
./homepage.vue
'
export
default
{
name
:
"
StaffList
"
,
components
:
{
drawerShow
},
drawerShow
,
homePage
},
mixins
:
[
table
,
tree
],
created
()
{
this
.
$post
(
"
/dept/treeselect
"
,
{}).
then
(({
data
})
=>
{
this
.
areaData
=
data
.
result
;
});
this
.
areaData
=
data
.
result
})
},
methods
:
{
/** 重写新增方法 */
...
...
@@ -67,7 +97,10 @@
},
/** 重写查看方法 */
toView
(
row
)
{
this
.
$refs
.
drawerform
.
view
(
row
);
// this.$refs.drawerform.view(row);
// console.log(row)
this
.
personData
=
row
this
.
isshowHome
=
true
},
handleNodeClick
(
node
)
{
...
...
@@ -75,7 +108,10 @@
this
.
query
=
{
deptId
:
node
.
id
};
this
.
getData
();
},
// 切换标签页
handleClick
(
e
){
console
.
log
(
this
.
activeName
)
}
},
data
()
{
return
{
...
...
@@ -87,58 +123,51 @@
label
:
"
员工姓名
"
,
fuzzy
:
true
},
{
name
:
"
politicalstatus
"
,
type
:
"
select
"
,
label
:
"
政治面貌
"
,
fuzzy
:
true
},
{
name
:
"
staffType
"
,
type
:
"
select
"
,
label
:
"
员工类型
"
,
fuzzy
:
true
},
{
name
:
"
status
"
,
type
:
"
select
"
,
label
:
"
员工状态
"
,
fuzzy
:
true
},
//
{
//
name: "politicalstatus",
//
type: "select",
//
label: "政治面貌 ",
//
fuzzy: true
//
},
//
{
//
name: "staffType",
//
type: "select",
//
label: "员工类型",
//
fuzzy: true
//
},
//
{
//
name: "status",
//
type: "select",
//
label: "员工状态",
//
fuzzy: true
//
},
],
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
员工姓名
"
,
prop
:
"
name
"
},
{
label
:
"
性别
"
,
prop
:
"
gender
"
,
formatter
:
this
.
formatter
},
{
label
:
"
政治面貌
"
,
prop
:
"
politicalstatus
"
,
formatter
:
this
.
formatter
},
{
label
:
"
员工类型
"
,
prop
:
"
staffType
"
,
formatter
:
this
.
formatter
},
{
label
:
"
工号
"
,
prop
:
"
workNum
"
},
{
label
:
"
部门
"
,
prop
:
"
deptName
"
},
{
label
:
"
职位
"
,
prop
:
"
positionName
"
},
{
label
:
"
员工类型
"
,
prop
:
"
staffType
"
,
formatter
:
this
.
formatterStatus
},
{
label
:
"
员工状态
"
,
prop
:
"
status
"
,
formatter
:
this
.
formatter
},
{
label
:
"
入职时间
"
,
prop
:
"
entryDate
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
转正时间
"
,
prop
:
"
regularDate
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
离职时间
"
,
prop
:
"
leaveDate
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
创建用户
"
,
prop
:
"
createUserId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
是否在政务中心
"
,
prop
:
"
status
"
,
formatter
:
this
.
formatter
},
//未对
{
label
:
"
手机号
"
,
prop
:
"
phoneNumber
"
,
formatter
:
this
.
formatter
},
{
label
:
"
操作
"
,
width
:
240
,
formatter
:
row
=>
{
return
(
<
table
-
buttons
noAdd
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
)
;
<
table
-
buttons
noAdd
noDel
noEdit
row
=
{
row
}
onView
=
{
this
.
toView
}
/
>
)
}
}
]
},
activeName
:
'
first
'
,
isshowHome
:
false
,
personData
:[]
}
};
}
};
</
script
>
...
...
@@ -157,6 +186,34 @@
</
style
>
<
style
lang=
"scss"
scoped
>
.totalNum
{
background
:
rgba
(
64
,
158
,
255
,
0
.2
);
padding
:
15px
;
border-left
:
4px
solid
rgb
(
20
,
134
,
248
);
color
:
rgb
(
100
,
100
,
100
);
.item
{
padding
:
0
10px
;
border-right
:
1px
solid
gray
;
}
.item
:last-child
{
border
:
none
;
}
.num
{
color
:
#409EFF
;
margin-left
:
10px
;
margin-right
:
20px
;
}
}
.controllList
{
margin-top
:
20px
;
.moreControll
{
margin-left
:
20px
;
}
}
.freshTime
{
color
:
#999
;
margin-left
:
20px
;
}
.cardTitle
{
font-size
:
16px
;
color
:
rgb
(
20
,
134
,
248
);
...
...
@@ -165,6 +222,7 @@
padding-bottom
:
2px
;
}
.
mytree
:
:
v-deep
{
padding
:
10px
;
.
el-tree--highlight-current
:
:
v-deep
.
el-tree-node
.
is-checked
...
...
@@ -237,4 +295,18 @@
width
:
24px
;
}
}
.titles
{
color
:
#409EFF
;
font-size
:
16px
;
display
:
flex
;
align-items
:
center
;
}
.
titles
:
:
before
{
content
:
''
;
width
:
6px
;
height
:
16px
;
background-color
:
#409EFF
;
display
:
inline-block
;
margin-right
:
10px
;
}
</
style
>
attendance-performance-manager-ui/admin/src/views/staff/view.vue
View file @
73e4b98c
...
...
@@ -3,7 +3,7 @@
<el-descriptions
:title=
"title"
:column=
"column"
:size=
"size"
:colon=
"false"
border
>
<template
slot=
"title"
>
<i
class=
"el-icon-tickets"
></i>
基本详细信息
qqq
基本详细信息
</
template
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
...
...
attendance-performance-manager-ui/admin/src/views/system/menu/list.vue
View file @
73e4b98c
...
...
@@ -15,6 +15,7 @@ export default {
methods
:
{
beforeRender
(
data
)
{
this
.
allMenu
=
this
.
sortByGroup
(
this
.
util_copy
(
data
.
data
));
console
.
log
(
this
.
allMenu
,
'
菜单数据
'
)
// 存在查询条件,展开全部
if
(
Object
.
keys
(
this
.
$route
.
query
).
length
)
{
this
.
select
=
this
.
allMenu
.
filter
(
i
=>!
i
.
parentId
).
map
(
i
=>
i
.
id
);
...
...
@@ -27,9 +28,15 @@ export default {
// 按parentId排序分组
sortByGroup
(
data
)
{
return
data
.
filter
(
i
=>!
i
.
parentId
).
reduce
((
prev
,
item
)
=>
{
return
prev
.
concat
([
item
],
data
.
filter
(
i
=>
i
.
parentId
==
item
.
id
))
;
return
prev
.
concat
([
item
],
data
.
filter
(
i
=>
i
.
parentId
==
item
.
id
))
},
[])
},
//重排table
resetTable
(
arr
){
// 一级父级
},
// 查看下级菜单
selectHandler
({
id
})
{
// 如果已展开,则关闭
...
...
@@ -44,7 +51,7 @@ export default {
showChild
()
{
this
.
tableData
.
data
=
this
.
allMenu
.
filter
(
item
=>
{
return
!
item
.
parentId
||
this
.
select
.
indexOf
(
item
.
parentId
)
>
-
1
})
;
})
},
// 展示菜单图标
showIcon
(
row
,
column
)
{
...
...
@@ -92,7 +99,6 @@ export default {
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
this
.
getData
()
this
.
loading
=
false
;
this
.
$message
.
success
(
"
更新排序成功!
"
);
}
})
...
...
@@ -137,7 +143,7 @@ export default {
formatter
:
row
=>
{
const
icon
=
this
.
select
.
indexOf
(
row
.
id
)
===
-
1
?
'
right
'
:
'
down
'
;
return
(
!
row
.
parentId
!
row
.
parentId
||
row
.
childList
.
length
>
0
?
<
div
onClick
=
{()
=>
{
this
.
selectHandler
(
row
)}}
>
<
i
class
=
{
'
el-icon-arrow-
'
+
icon
}
><
/i
>
<
/div
>
...
...
attendance-performance-manager-ui/admin/src/views/system/menu/show.vue
View file @
73e4b98c
...
...
@@ -40,13 +40,23 @@ export default {
this
.
$store
.
dispatch
(
'
login
'
);
this
.
$router
.
go
(
-
1
);
},
// 合并父子数组
combineArr
(
Array
,
menu
){
Array
.
forEach
(
item
=>
{
if
(
item
.
childList
.
length
>
0
){
menu
[
item
.
id
+
''
]
=
item
.
name
this
.
combineArr
(
item
.
childList
,
menu
)
}
else
{
menu
[
item
.
id
+
''
]
=
item
.
name
}
})
}
},
computed
:
{
menu
()
{
let
menu
=
{
'
0
'
:
'
无
'
};
this
.
$store
.
state
.
userData
.
barList
.
forEach
(
item
=>
{
menu
[
item
.
id
+
''
]
=
item
.
name
});
this
.
combineArr
(
this
.
$store
.
state
.
userData
.
barList
,
menu
)
console
.
log
(
menu
)
return
menu
;
}
},
...
...
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