Commit 5346c242 authored by Gakki's avatar Gakki

之前更改

parent aee97ab3
......@@ -43,6 +43,7 @@ export default {
openKeys: [],
selectedKeys: [],
menus: [],
isAllPerm: false
}
},
watch: {
......@@ -55,36 +56,70 @@ export default {
},
},
mounted(){
let menus=[]
let tempmenu = []
let isLoadExtendMenu = this.$cookie.get('customKeyEnable')
for(let i=0;i<routes.length;i++){
if(!!routes[i].children){
for(let j=0;j<routes[i].children.length;j++){
if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
let target = routes[i].children[j].children
if(target.length > 0) {
for(let k = 0 ; k < target.length; k++) {
if(target[k].name == 'tbls') {
if(isLoadExtendMenu == 'true') {
tempmenu.push(target[k])
this.$ajax.get({
url: this.$api.GET_USER_INFO,
}).then(res => {
if(res.code == 200) {
this.isAllPerm = res.data.content.isAllPerm
console.log(this.isAllPerm)
let menus=[]
let tempmenu = []
let isLoadExtendMenu = this.$cookie.get('customKeyEnable')
for(let i=0;i<routes.length;i++){
if(!!routes[i].children){
for(let j=0;j<routes[i].children.length;j++){
if(!!this.isAllPerm) { // 超管访问
if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
let target = routes[i].children[j].children
if(target.length > 0) {
for(let k = 0 ; k < target.length; k++) {
if(target[k].name == 'tbls') {
if(isLoadExtendMenu == 'true') {
tempmenu.push(target[k])
}
} else {
tempmenu.push(target[k])
}
}
}
let lusso = routes[i].children[j]
lusso.children = []
lusso.children = tempmenu
menus.push(lusso)
} else if (!!routes[i].children[j].meta.menuIcon) {
menus.push(routes[i].children[j])
}
} else if(!this.isAllPerm) { // 非超管访问
if(routes[i].children[j].meta.requirePerm == false) {
if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
let target = routes[i].children[j].children
if(target.length > 0) {
for(let k = 0 ; k < target.length; k++) {
if(target[k].name == 'tbls') {
if(isLoadExtendMenu == 'true') {
tempmenu.push(target[k])
}
} else {
tempmenu.push(target[k])
}
}
}
let lusso = routes[i].children[j]
lusso.children = []
lusso.children = tempmenu
menus.push(lusso)
} else if (!!routes[i].children[j].meta.menuIcon) {
menus.push(routes[i].children[j])
}
} else {
tempmenu.push(target[k])
}
}
}
let lusso = routes[i].children[j]
lusso.children = []
lusso.children = tempmenu
menus.push(lusso)
} else if (!!routes[i].children[j].meta.menuIcon) {
menus.push(routes[i].children[j])
}
}
this.menus=menus
}
}
this.menus=menus
})
},
methods: {
// 点击菜单,收起其他展开的菜单
......
......@@ -56,6 +56,7 @@ import {
// BackTop,
// Carousel,
Tooltip,
Tree
// Progress,
// CollapsePanel
} from 'ant-design-vue'
......@@ -114,6 +115,7 @@ Vue.use(Divider)
Vue.use(Upload)
Vue.use(Modal)
Vue.use(Progress)
Vue.use(Tree)
// Vue.use(badge)
// Vue.use(skeleton)
// Vue.use(Tree)
......
......@@ -48,7 +48,7 @@ async function GetRoutes(router) {
break
default: // 当前仅可使用pudong / xuhui-sit/uat进行打包
MicRouters = yangpu
MicRouters = xuhui
break
}
......@@ -99,6 +99,8 @@ async function GetRoutes(router) {
}
}
console.log(router)
// for(let key in documents) {
// for (let i = 0; i < documents[key].length; i++) {
// let firstRouter = Object.assign({}, documents[key][i])
......
{
"Layout": [
{
"path": "/documentOne/month", "name": "month",
"meta": { "title": "检查单","menuIcon": "profile", "menuPath":false, "hideInBread":false },
"children":[
{
{
"path": "/documentOne/month", "name": "month",
"meta": { "title": "检查单", "menuIcon": "profile", "menuPath": false, "hideInBread": false },
"children": [
{
"path": "/documentOne/month/monthList", "name": "month",
"meta": { "title": "房办月查列表","menuIcon": "profile", "menuPath":false, "hideInBread":false },
"meta": { "title": "房办月查", "menuIcon": "profile", "menuPath": false, "hideInBread": false },
"children": [
{
"path": "/documentOne/month/monthInfo", "name": "monthInfo",
"meta": { "title": "检查详情", "menuPath":false, "hideInBread":false }
"path": "/documentOne/month/monthList/monthListSect", "name": "monthListSect",
"meta": { "title": "房办月查小区列表", "menuPath": false, "hideInBread": false },
"children": [
{
"path": "/documentOne/month/monthList/monthListSect/monthInfo", "name": "monthInfo",
"meta": { "title": "检查详情", "menuPath": false, "hideInBread": false}
}
]
}
]
}
]
......
......@@ -65,7 +65,7 @@ default: // 默认环境下(开发环境)
// BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
BASE_URL = 'http://pudong.hm.omniview.pro/api/v2'
// BASE_URL = 'http://211.136.105.193/apiv2'
// MOCK_URL = 'https://yapi.omniview.pro/mock/278'
MOCK_URL = 'https://yapi.omniview.pro/mock/283'
break
}
/**
......@@ -199,6 +199,8 @@ export default {
// get_specialInspection: '/service-documents-ddd/statistical/specialInspection', //行业督查数字
get_specialInspection: '/service-documents-ddd/statistical/specialInspection', //行业督查数字
get_month_check: 'service-documents-ddd/dashboard/house/month'
get_month_check: 'service-documents-ddd/dashboard/house/month',
GET_LABEL_LIST: MOCK_URL + '/service-customkey-ddd/labels', // 获取标签列表
}
......@@ -40,23 +40,23 @@
</div>
</div>
</div>
<div class="secBox">
<div class="secBox" v-if="$store.state.userInfos && $store.state.userInfos.isAllPerm">
<IndustrySupervision style="width:35%" />
<ComplaintsTrain moduletitle="投诉直通车" style="width:48%" />
<FileModule style="width:13%;" />
</div>
<div class="thirdBox">
<div class="thirdBox" v-if="$store.state.userInfos && $store.state.userInfos.isAllPerm">
<ManagementModule moduletitle="信用" style="width:32.5%" />
<ManagementModule moduletitle="风险" style="width:32.5%" />
<ManagementModule moduletitle="分类" style="width:32.5%" />
</div>
<div class="fourthBox">
<div class="fourthBox" v-if="$store.state.userInfos && $store.state.userInfos.isAllPerm">
<RiskDisposal style="width:30%" />
<RetrofitElevator style="width:32%" />
<ComplaintsTrain moduletitle="应急报修" style="width:36%" />
</div>
</div>
<div id="home" class="layoutPadding">
<div id="home" class="layoutPadding" v-else>
<!-- <div id="home" class="layoutPadding" v-else> -->
<a-row type="flex" class="align-stretch">
<a-col :span="24">
......@@ -167,7 +167,7 @@
</div>
</a-col> -->
</a-row>
<a-row v-if="$store.state.userInfos&&$store.state.userInfos.isAllPerm" 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">
<div class="month">
<div class="home-card monthTitle">
......@@ -208,7 +208,7 @@
<div class="jiancha">
<div class="home-card jianchaTitle">
<span>专项检查</span>
<img src="@/assets/icon/tp.png" @click="openOutUrl2" style="height:20px;" alt="">
<img src="@/assets/icon/tp.png" style="height:20px;" alt="">
</div>
<div style="height: calc(100% - 55px);">
<a-row class="jianchaBox">
......@@ -713,26 +713,44 @@ export default {
created(){},
mounted(){
this.getConfig()
if (this.$api.BASE_URL.indexOf('xuhui')!=-1 || this.$api.BASE_URL.indexOf('31.0.161.39')!=-1 ) { //徐汇分支
this.getList()
if (this.$store.state.userinfos && this.$store.state.userinfos.isAllPerm) { // 不是全部权限dashboard下方的模块不展示
this.getDisposal()
this.getHouthMonth()
this.getCheckData()
this.getCheckPeople()
this.getSectNum()
this.getReceiptsNum()
this.getRepair()
this.getTousuQuestion('M')
this.getTousuQuestion('Y')
this.getTousuQuestion('S')
this.getTousuDensity('M')
this.getTousuDensity('Y')
this.getTousuDensity('S')
this.getList()
this.$ajax.get({
url: this.$api.GET_USER_INFO,
}).then(res => {
if(res.code == 200) {
if(!!res.data.content.isAllPerm) {
this.getDisposal()
this.getHouthMonth()
this.getCheckData()
this.getCheckPeople()
this.getSectNum()
this.getReceiptsNum()
this.getRepair()
this.getTousuQuestion('M')
this.getTousuQuestion('Y')
this.getTousuQuestion('S')
this.getTousuDensity('M')
this.getTousuDensity('Y')
this.getTousuDensity('S')
}
}
}
})
// })
// if (this.$store.state.userinfos && this.$store.state.userinfos.isAllPerm) { // 不是全部权限dashboard下方的模块不展示
// this.getDisposal()
// this.getHouthMonth()
// this.getCheckData()
// this.getCheckPeople()
// this.getSectNum()
// this.getReceiptsNum()
// this.getRepair()
// this.getTousuQuestion('M')
// this.getTousuQuestion('Y')
// this.getTousuQuestion('S')
// this.getTousuDensity('M')
// this.getTousuDensity('Y')
// this.getTousuDensity('S')
// }
},
methods: {
/**
......@@ -987,7 +1005,6 @@ export default {
if (res.code === '200') {
this.openConfig = this.$com.confirm(res, 'data.content', []).customKeyEnable
console.log(this.openConfig)
// 是否开启自定义字段存入cookie
this.$cookie.set('customKeyEnable', this.openConfig)
let isXuHui = this.$com.confirm(res, 'data.content', [])
......
......@@ -137,6 +137,9 @@ export default {
}
})
},
backPage(){ // 返回按钮
this.$router.back()
},
changeMeaning(type, num) {
console.log(type, num)
if(type == 'changedCosts') {
......
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