This commit is contained in:
parent
14b6f2ba2e
commit
a47c8a608e
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
/** 通讯录路由 */
|
||||
import Layout from '@/views/layout/compliance'
|
||||
const layout = function(meta = {}) {
|
||||
return {
|
||||
path: '/compliance',
|
||||
component: Layout,
|
||||
meta: {
|
||||
requiresAuth: false,
|
||||
...meta
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default [
|
||||
{
|
||||
...layout(true),
|
||||
children: [
|
||||
{
|
||||
path: 'statistics',
|
||||
component: () => import('@/views/compliance/statistics/index'),
|
||||
meta: {
|
||||
title: '申报自检结果统计'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
...layout(false),
|
||||
children: [
|
||||
{
|
||||
path: 'keypoint',
|
||||
component: () => import('@/views/compliance/keypoint/index'),
|
||||
meta: {
|
||||
title: '重点企风险排名统计'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
...layout(false),
|
||||
children: [
|
||||
{
|
||||
path: 'warningStatistics',
|
||||
component: () => import('@/views/compliance/warningStatistics/index'),
|
||||
meta: {
|
||||
title: '指标预警排名统计'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
import {
|
||||
hrmEmployeeQueryLoginEmployeeAPI,
|
||||
hrmEmployeeAllListAPI
|
||||
} from '@/api/hrm/employee'
|
||||
import {
|
||||
hrmDeptQueryTreeListAPI
|
||||
} from '@/api/hrm/dept'
|
||||
|
||||
import { debounce } from 'throttle-debounce'
|
||||
|
||||
const hrm = {
|
||||
state: {
|
||||
hrmUserInfo: null, // 人资用户信息
|
||||
hrmShowType: 1, // 1 管理 2 员工
|
||||
hrmUserList: [], // 人力资源员工和部门
|
||||
hrmDeptList: []
|
||||
},
|
||||
|
||||
mutations: {
|
||||
SET_HRMUSERINFO: (state, hrmUserInfo) => {
|
||||
state.hrmUserInfo = hrmUserInfo
|
||||
},
|
||||
SET_HRMSHOWTYPE: (state, hrmShowType) => {
|
||||
state.hrmShowType = hrmShowType
|
||||
},
|
||||
SET_HRMUSERLIST: (state, data) => {
|
||||
state.hrmUserList = data
|
||||
},
|
||||
SET_HRMDEPTLIST: (state, data) => {
|
||||
state.hrmDeptList = data
|
||||
}
|
||||
},
|
||||
|
||||
actions: {
|
||||
// 获取人资用户信息
|
||||
GetHrmUserInfo({
|
||||
commit
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
hrmEmployeeQueryLoginEmployeeAPI().then(res => {
|
||||
const resData = res.data || {}
|
||||
commit('SET_HRMUSERINFO', resData)
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
debounceGetHrmUserList: debounce(3000, ({ dispatch }) => {
|
||||
dispatch('GetHrmUserList')
|
||||
}),
|
||||
|
||||
// 管理后台员工列表
|
||||
GetHrmUserList({
|
||||
commit
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
hrmEmployeeAllListAPI({
|
||||
pageType: 0
|
||||
}).then(res => {
|
||||
commit('SET_HRMUSERLIST', res.data || [])
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
debounceGetHrmDeptList: debounce(3000, ({ dispatch }) => {
|
||||
dispatch('GetHrmDeptList')
|
||||
}),
|
||||
|
||||
// 管理后台部门列表
|
||||
GetHrmDeptList({
|
||||
commit
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
hrmDeptQueryTreeListAPI({}).then(res => {
|
||||
commit('SET_HRMDEPTLIST', res.data || [])
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default hrm
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div>111111111111111111 1</div>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div>1111111111111111111</div>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<div>222222222222222</div>
|
||||
</template>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header class="nav-container">
|
||||
<navbar
|
||||
nav-index="/compliance"
|
||||
@nav-items-click="navClick"/>
|
||||
</el-header>
|
||||
<el-container>
|
||||
<sidebar
|
||||
:items="complianceRouters"
|
||||
class="sidebar-container" />
|
||||
|
||||
<el-main
|
||||
id="addressBook-main-container"
|
||||
style="padding: 0;">
|
||||
<app-main/>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Navbar, AppMain, Sidebar } from './components'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'AddressBookLayout',
|
||||
|
||||
components: {
|
||||
Navbar,
|
||||
Sidebar,
|
||||
AppMain
|
||||
},
|
||||
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['complianceRouters'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
navClick(index) {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './styles/common.scss';
|
||||
.el-container {
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.nav-container {
|
||||
padding: 0;
|
||||
box-shadow: 0px 1px 2px #dbdbdb;
|
||||
z-index: 100;
|
||||
min-width: 1200px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue