Skip to content

Commit

Permalink
添加一些业务模块
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Feb 17, 2019
1 parent faf5d16 commit 1ce22ce
Show file tree
Hide file tree
Showing 6 changed files with 357 additions and 77 deletions.
8 changes: 8 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ export const asyncRouterMap = [
title: '廉政档案统计',
},
},
{
path: 'person_count2',
name: 'person_count2',
component: () => import('@/views/Archive/person_count2'),
meta: {
title: '统计分析',
},
},

],
},
Expand Down
14 changes: 11 additions & 3 deletions src/store/modules/permission.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
asyncRouterMap,
constantRouterMap,
} from '@/router/index'
import store from '@/store/index'
import { deepClone } from '@/utils/index'
/**
* 判断是否有路由权限
Expand Down Expand Up @@ -57,10 +58,17 @@ const permission = {
const {
roleauthname,
} = data
const routermap = deepClone(asyncRouterMap)
let accessedRouters = []
const username = store.getters.name
// /如果是admin账号的话 跳过路由校验
if (username === 'admin') {
accessedRouters = asyncRouterMap
} else {
const routermap = deepClone(asyncRouterMap)

accessedRouters = filterAsyncRouter(routermap, roleauthname)
}

console.log(routermap);
const accessedRouters = filterAsyncRouter(routermap, roleauthname)

commit('SET_ROUTERS', accessedRouters)
resolve()
Expand Down
4 changes: 4 additions & 0 deletions src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,8 @@ code {

.no-margin-top{
margin-top:0px;
}

.no-bg{
background: unset!important;
}
2 changes: 1 addition & 1 deletion src/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
font-size: 0px;
top: 96px;
left: 24px;
z-index: 1001;
z-index: 100;
overflow: hidden;
//reset element-ui css
.horizontal-collapse-transition {
Expand Down
112 changes: 112 additions & 0 deletions src/views/Archive/person_count2.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<template>


<div style="overflow:hidden">

<el-row :gutter="32">

<el-col :xs="8" :sm="8" :lg="8">
<el-card class="box-card widget-box no-padding">
<div slot="header" class="clearfix">
<span>江苏省地图</span>
</div>
<map-chart width="100%" id="chart5" height="800px"></map-chart>

</el-card>


</el-col>

<el-col :xs="16" :sm="16" :lg="16">

<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="24">
<lineChart :data="lineChartData" :date="chartData.Month" class="widget-box" height="400px" width="100%" id="chart0"
/>
</el-col>


</el-row>


<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="12">
<pieChart title="线索来源" :data="chartData.ClueSource" class="widget-box" width="100%" id="chart1"
/>
</el-col>

<el-col :xs="24" :sm="24" :lg="12">
<pieChart class="widget-box" title="职务违法犯罪" :data="chartData.FilingChartData" width="100%" id="chart2"
/>
</el-col>


</el-row>


<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="12">
<pieChart title="违反六大纪律" :data="chartData.six" class="widget-box" width="100%" id="chart3"
/>
</el-col>

<el-col :xs="24" :sm="24" :lg="12">
<pieChart class="widget-box" title="党纪处分" :data="chartData.PartyPunish" width="100%" id="chart4"
/>
</el-col>


</el-row>
</el-col>
</el-row>


</div>
</template>

<script>
import chartData from '@/components/Charts/data/Charts_Fake'
import pieChart from '@/components/Charts/pieChart'
import lineChart from '@/components/Charts/lineChart'
import mapChart from '@/components/Charts/mapChart'
export default {
name: 'person_count2',
data() {
const lineChartData = [chartData.ClueData, chartData.FilingData]
return {
chartData,
lineChartData,
}
},
methods: {
},
components: {
pieChart,
lineChart,
mapChart,
},
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard-editor-container {
padding: 32px;
height:100%;
background-color: #fff;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
.widget-box{
border-radius: 8px!important;
}
.el-main{
padding:0px 0px 0px 30px;
}
</style>
Loading

0 comments on commit 1ce22ce

Please sign in to comment.