Browse Source

问题修复

master
huxinglu 4 years ago
parent
commit
a9cbf268ce
2 changed files with 8 additions and 5 deletions
  1. +7
    -5
      src/views/main/main.vue
  2. +1
    -0
      src/vuex/getters.js

+ 7
- 5
src/views/main/main.vue View File

@@ -91,7 +91,7 @@
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>报警信息</span>
<el-button v-if="menuList.some(item=>item.type==2&&item.name=='/waterAlarm')" @click="waterAlarmOpen" style="float: right; padding: 3px 0" type="text">更多</el-button>
<el-button v-if="roles.some(item=>item.type==2&&item.name=='/waterAlarm')" @click="waterAlarmOpen" style="float: right; padding: 3px 0" type="text">更多</el-button>
</div>
<div class="right-waterAlarm">
<div
@@ -114,7 +114,7 @@
<el-card style="margin-top: 10px" class="box-card">
<div slot="header" class="clearfix">
<span>预警信息</span>
<el-button v-if="menuList.some(item=>item.type==2&&item.name=='/warn')" @click="waterWarnOpen" style="float: right; padding: 3px 0" type="text">更多</el-button>
<el-button v-if="roles.some(item=>item.type==2&&item.name=='/warn')" @click="waterWarnOpen" style="float: right; padding: 3px 0" type="text">更多</el-button>
</div>
<div class="right-waterWarn">
<div :key="index" v-for="(item,index) in waterWarnList">
@@ -134,7 +134,7 @@
<el-card style="margin-top: 10px" class="box-card">
<div slot="header" class="clearfix">
<span>通知公告</span>
<el-button v-if="menuList.some(item=>item.type==2&&item.name=='/notice')" @click="noticeOpen" style="float: right; padding: 3px 0" type="text">更多</el-button>
<el-button v-if="roles.some(item=>item.type==2&&item.name=='/notice')" @click="noticeOpen" style="float: right; padding: 3px 0" type="text">更多</el-button>
</div>
<el-tabs v-model="noticeType" @tab-click="noticeTypeClick">
<el-tab-pane label="水务新闻" :name="1">
@@ -206,13 +206,15 @@ export default {
noticeList: []
};
},
created() {},
created() {
console.log(this.roles)
},
mounted() {
this.getDetail();
this.getNoticeMainList();
},
computed: {
...mapGetters(["menuList"])
...mapGetters(["roles"])
},
components: { mainCake, waterAlarmInfo, noticeDetial },
methods: {

+ 1
- 0
src/vuex/getters.js View File

@@ -3,5 +3,6 @@ const getters = {
btnRule: state => state.user.btnRule,
info:state => state.user.info,
menuList:state => state.user.menuList,
roles:state => state.user.roles
}
export default getters

Loading…
Cancel
Save