Commit 7266d10d authored by 程卓's avatar 程卓

徐汇的判断是否为超管,不是则隐藏dashboard部分模块,隐藏投诉信息和处置单列表

parent 27307011
...@@ -3,6 +3,7 @@ import pudong from '@/router/pudongRoutes.json' ...@@ -3,6 +3,7 @@ import pudong from '@/router/pudongRoutes.json'
import xuhui from '@/router/xuhuiRoutes.json' import xuhui from '@/router/xuhuiRoutes.json'
import huangpu from '@/router/huangpuRoutes.json' import huangpu from '@/router/huangpuRoutes.json'
import yangpu from '@/router/yangpuRoutes.json' import yangpu from '@/router/yangpuRoutes.json'
import Store from '@/store/index'
async function GetRoutes(router) { async function GetRoutes(router) {
let env = process.env.NODE_ENV let env = process.env.NODE_ENV
...@@ -44,11 +45,21 @@ async function GetRoutes(router) { ...@@ -44,11 +45,21 @@ async function GetRoutes(router) {
break break
default: // 当前仅可使用pudong / xuhui-sit/uat进行打包 default: // 当前仅可使用pudong / xuhui-sit/uat进行打包
MicRouters = pudong MicRouters = xuhui
break break
} }
console.log(MicRouters) // 徐汇区的子项目要看当前用户是否是超管,否则不展示 处置单和投诉
// console.log(env)
if (env.indexOf('xuhui') != -1) {
let newArr= []
MicRouters.Layout.forEach((item) => {
if (item.name != 'tousu' && item.name != 'Disposal' ) {
newArr.push(item)
}
})
MicRouters.Layout = newArr
}
const micSystemRoutersConfigs = Object.assign({}, MicRouters) const micSystemRoutersConfigs = Object.assign({}, MicRouters)
const { routes } = router.options const { routes } = router.options
......
...@@ -62,9 +62,9 @@ case 'huangpu-prod': ...@@ -62,9 +62,9 @@ case 'huangpu-prod':
default: // 默认环境下(开发环境) default: // 默认环境下(开发环境)
// BASE_URL = 'http://31.0.161.39/apiv2' // BASE_URL = 'http://31.0.161.39/apiv2'
// BASE_URL = 'http://211.136.105.193/apiv2' // BASE_URL = 'http://211.136.105.193/apiv2'
// BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2' BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
// BASE_URL = 'http://pudong.hm.omniview.pro/api/v2' // BASE_URL = 'http://pudong.hm.omniview.pro/api/v2'
BASE_URL = 'http://211.136.105.193/apiv2' // BASE_URL = 'http://211.136.105.193/apiv2'
// MOCK_URL = 'https://yapi.omniview.pro/mock/278' // MOCK_URL = 'https://yapi.omniview.pro/mock/278'
break break
......
<template> <template>
<div>
<!-- 浦东 -->
<div id="home" class="layoutPadding" v-if="(this.$api.BASE_URL).indexOf('pudong') > -1 || (this.$api.BASE_URL).indexOf('211.136.105.193') > -1"> <div id="home" class="layoutPadding" v-if="(this.$api.BASE_URL).indexOf('pudong') > -1 || (this.$api.BASE_URL).indexOf('211.136.105.193') > -1">
<div class="topBox-l"> <div class="topBox-l">
<div class="inner" style=""> <div class="inner" style="">
...@@ -53,10 +55,9 @@ ...@@ -53,10 +55,9 @@
<RetrofitElevator style="width:32%" /> <RetrofitElevator style="width:32%" />
<ComplaintsTrain moduletitle="应急报修" style="width:36%" /> <ComplaintsTrain moduletitle="应急报修" style="width:36%" />
</div> </div>
</div> </div>
<!-- <div id="home" class="layoutPadding" v-if="(this.$api.BASE_URL).indexOf('xuhui') > -1 || (this.$api.BASE_URL).indexOf('31.0.161.39') > -1"> --> <div id="home" class="layoutPadding" v-if="(this.$api.BASE_URL).indexOf('xuhui') > -1 || (this.$api.BASE_URL).indexOf('31.0.161.39') > -1">
<div id="home" class="layoutPadding" v-else> <!-- <div id="home" class="layoutPadding" v-else> -->
<a-row type="flex" class="align-stretch"> <a-row type="flex" class="align-stretch">
<a-col :span="24"> <a-col :span="24">
<a-row type="flex" style="height:100%;"> <a-row type="flex" style="height:100%;">
...@@ -166,7 +167,7 @@ ...@@ -166,7 +167,7 @@
</div> </div>
</a-col> --> </a-col> -->
</a-row> </a-row>
<a-row class="align-stretch" style="margin-top:20px;"> <a-row v-if="$store.state.userInfos&&$store.state.userInfos.isAllPerm" class="align-stretch" style="margin-top:20px;">
<a-col :span="8"> <a-col :span="8">
<div class="month"> <div class="month">
<div class="home-card monthTitle"> <div class="home-card monthTitle">
...@@ -308,7 +309,7 @@ ...@@ -308,7 +309,7 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row class="align-stretch" style="margin-top:20px;"> <a-row v-if="$store.state.userInfos&&$store.state.userInfos.isAllPerm" class="align-stretch" style="margin-top:20px;">
<a-col :span="8"> <a-col :span="8">
<div class="fengxian"> <div class="fengxian">
<div class="home-card fengxianTitle"> <div class="home-card fengxianTitle">
...@@ -625,6 +626,8 @@ ...@@ -625,6 +626,8 @@
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
</div>
</template> </template>
<script> <script>
...@@ -714,19 +717,22 @@ export default { ...@@ -714,19 +717,22 @@ export default {
console.log('徐汇') console.log('徐汇')
this.getList() this.getList()
this.getConfig() this.getConfig()
this.getDisposal() if (this.$store.state.userinfos && this.$store.state.userinfos.isAllPerm) { // 不是全部权限dashboard下方的模块不展示
this.getHouthMonth() this.getDisposal()
this.getCheckData() this.getHouthMonth()
this.getCheckPeople() this.getCheckData()
this.getSectNum() this.getCheckPeople()
this.getReceiptsNum() this.getSectNum()
this.getRepair() this.getReceiptsNum()
this.getTousuQuestion('M') this.getRepair()
this.getTousuQuestion('Y') this.getTousuQuestion('M')
this.getTousuQuestion('S') this.getTousuQuestion('Y')
this.getTousuDensity('M') this.getTousuQuestion('S')
this.getTousuDensity('Y') this.getTousuDensity('M')
this.getTousuDensity('S') this.getTousuDensity('Y')
this.getTousuDensity('S')
}
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment