Commit d6f0f5e5 authored by 李苏's avatar 李苏 💬

appInit&&csIndex 更具请求结束初始判定的index来展示部门

parent fb5ebec6
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 动态单位标题--> <!-- 动态单位标题-->
<div class="bigTitle"> <div class="bigTitle">
<div class="menus"> <div class="menus">
<div v-for="(item,index) in menusItems" :key="index" @click="changeItem(index)" class="menusItem" :class="{ <div v-for="(item,index) in menusItems" v-if="appInit&&csIndex==0||appInit&&csIndex==index" :key="index" @click="changeItem(index)" class="menusItem" :class="{
'menusItemActive':index==active, 'menusItemActive':index==active,
'gsIndex':index==0, 'gsIndex':index==0,
'nogsIndex':index!=0 'nogsIndex':index!=0
...@@ -440,6 +440,7 @@ ...@@ -440,6 +440,7 @@
if (this.superuser) { if (this.superuser) {
this.changeItem(0) this.changeItem(0)
this.appInit=true
} else { } else {
/* 选中个人orgName*/ /* 选中个人orgName*/
let index = 0 let index = 0
...@@ -453,10 +454,12 @@ ...@@ -453,10 +454,12 @@
this.menusItems.forEach((item, itemIndex) => { this.menusItems.forEach((item, itemIndex) => {
if (item.name == bmmc) { if (item.name == bmmc) {
index = itemIndex index = itemIndex
console.log('存在部门') this.csIndex=itemIndex
} }
}) })
this.changeItem(index) this.changeItem(index)
this.appInit=true
}) })
...@@ -582,7 +585,9 @@ ...@@ -582,7 +585,9 @@
}, },
data() { data() {
return { return {
fxgkListSx:['加油站','采矿作业区','第一选矿车间','第二焙烧车间','质量计量控制中心'], appInit:false,
csIndex:0,//如果初始index不=0那么只显示csIndex的数据s
fxgkListSx:['采矿作业区','第二焙烧车间','第一选矿车间','质量计量控制中心','加油站'],
yhpcKsrq: '', yhpcKsrq: '',
yhpcJsrq: '', yhpcJsrq: '',
lzglKsrq:'', lzglKsrq:'',
......
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