|
@@ -19,7 +19,7 @@
|
|
|
<el-menu-item v-for="(threeItem,i) in subItem.children" :key="i" :index="threeItem.path">
|
|
|
{{ threeItem.title }}</el-menu-item>
|
|
|
</el-submenu>
|
|
|
- <el-menu-item v-else :index="subItem.path" :key="subItem.path">{{ subItem.title }}</el-menu-item>
|
|
|
+ <el-menu-item v-show="['pictureManagement'].includes(subItem.name) ? memberType === 1 ? false : true : true" v-else :index="subItem.path" :key="subItem.path">{{ subItem.title }}</el-menu-item>
|
|
|
</template>
|
|
|
</el-submenu>
|
|
|
</template>
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
collapse: false,
|
|
|
- //items: []
|
|
|
+ memberType: this.$store.state.userInfo.memberType,
|
|
|
items: [
|
|
|
{
|
|
|
path: "/",
|
|
@@ -116,9 +116,9 @@ export default {
|
|
|
icon: require("../../static/image/help-icon.png"),
|
|
|
},
|
|
|
{
|
|
|
- path: '/download',
|
|
|
- name: 'download',
|
|
|
- title: '下载中心',
|
|
|
+ path: "/download",
|
|
|
+ name: "download",
|
|
|
+ title: "下载中心",
|
|
|
icon: require("../../static/image/download-icon.png"),
|
|
|
},
|
|
|
{
|
|
@@ -130,6 +130,14 @@ export default {
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ "$store.state.userInfo": {
|
|
|
+ handler(newVal, oldVal) {
|
|
|
+ this.memberType = newVal.memberType;
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {
|
|
|
// console.log(router.options.routes);
|
|
|
//this.items = [...router.options.routes];
|
|
@@ -139,6 +147,16 @@ export default {
|
|
|
bus.$emit("collapse-content", msg);
|
|
|
});
|
|
|
},
|
|
|
+ methods: {
|
|
|
+ showTitle(name) {
|
|
|
+ if (name === "c") {
|
|
|
+ if (this.memberType === 1) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -200,5 +218,6 @@ export default {
|
|
|
|
|
|
.sidebar > ul {
|
|
|
height: 100%;
|
|
|
+ overflow-y: auto;
|
|
|
}
|
|
|
</style>
|