|
|
@@ -1,19 +1,33 @@
|
|
|
<template>
|
|
|
- <el-menu
|
|
|
- style="height: calc(100vh - 100px)"
|
|
|
- :default-active="activePath"
|
|
|
- class="el-menu-vertical-demo"
|
|
|
- @open="handleOpen"
|
|
|
- @close="handleClose"
|
|
|
- background-color="#F5F5F5"
|
|
|
- text-color="#666"
|
|
|
- active-text-color="#fff"
|
|
|
- router>
|
|
|
- <el-menu-item v-for="item in auth_data" :key="item.systemappid" :index="item.path">
|
|
|
- <span slot="title">{{item.meta.title}}</span>
|
|
|
- </el-menu-item>
|
|
|
- </el-menu>
|
|
|
-
|
|
|
+ <div>
|
|
|
+ <el-menu
|
|
|
+ style="height: calc(100vh - 100px)"
|
|
|
+ :default-active="activePath"
|
|
|
+ class="el-menu-vertical-demo"
|
|
|
+ @open="handleOpen"
|
|
|
+ @close="handleClose"
|
|
|
+ background-color="#F5F5F5"
|
|
|
+ text-color="#666"
|
|
|
+ active-text-color="#fff"
|
|
|
+ router>
|
|
|
+ <el-menu-item v-for="item in auth_data" :key="item.systemappid" :index="item.path" >
|
|
|
+ <span slot="title" @click="clickNow(item)">{{item.meta.title}}</span>
|
|
|
+ </el-menu-item>
|
|
|
+ </el-menu>
|
|
|
+<!-- <el-dialog
|
|
|
+ title="提示"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+
|
|
|
+ width="70%"
|
|
|
+ >
|
|
|
+ <span>这是一段信息</span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>-->
|
|
|
+ </div>
|
|
|
+
|
|
|
</template>
|
|
|
<script>
|
|
|
export default {
|
|
|
@@ -21,6 +35,8 @@ export default {
|
|
|
return {
|
|
|
activePath:null,
|
|
|
auth_data:'',
|
|
|
+ isneedpay:false,
|
|
|
+ dialogVisible:false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -40,18 +56,31 @@ export default {
|
|
|
if (this.activePath) {
|
|
|
this.activePath = active_modules.apps[0].path
|
|
|
} else {
|
|
|
- this.activePath = this.$route.path
|
|
|
+ if (this.auth_data[0].isneedpay){
|
|
|
+ this.activePath = this.$route.path
|
|
|
+ this.$router.push({path:'/mask',meta:{title: '无权限333'},query:{show:true}})
|
|
|
+ }else {
|
|
|
+ this.activePath = this.$route.path
|
|
|
+ }
|
|
|
}
|
|
|
+ },
|
|
|
+ clickNow(val){
|
|
|
+ this.isneedpay = val.isneedpay
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
- mounted () {
|
|
|
+
|
|
|
+ mounted () {
|
|
|
this.getAuthList()
|
|
|
},
|
|
|
watch:{
|
|
|
$route(to,from){
|
|
|
if (!to.meta.keeproute) {
|
|
|
- this.activePath = this.$route.path
|
|
|
+ if (this.isneedpay){
|
|
|
+ this.activePath = this.$route.path
|
|
|
+ this.$router.push({path:'/mask',meta:{title: '无权限333'},query:{show:true}})
|
|
|
+ }else {
|
|
|
+ this.activePath = this.$route.path
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -71,4 +100,4 @@ export default {
|
|
|
border-radius: 4px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|