Commit f2d05d19 authored by 徐一鸣's avatar 徐一鸣

up pages

parent d8e67540
......@@ -14,6 +14,7 @@
<script>
import sideNavBar from "@/components/side-nav-bar";
import { mapState } from "vuex";
export default {
components: {
......@@ -22,6 +23,11 @@ export default {
data: () => ({
navList: [],
}),
computed: {
...mapState({
fwglNav: "fwglNav",
}),
},
watch: {
"$route.fullPath"(path) {
this.initNavList();
......@@ -31,61 +37,10 @@ export default {
initNavList() {
let level = parseInt(this.$route.params.level);
// 普通用户
if (level == 0) {
this.navList = [
{
name: "注册发布的服务",
path: `/fwgl/list/${level}/0`,
},
{
name: "申请的服务",
path: `/fwgl/list/${level}/1`,
},
{
name: "审批的服务",
path: `/fwgl/list/${level}/2`,
},
{
name: "云资源服务",
path: `/fwgl/list/${level}/3`,
},
];
}
// 组织管理员
else if (level == 1) {
this.navList = [
{
name: "组织服务管理",
path: `/fwgl/list/${level}/0`,
},
{
name: "服务审批管理",
path: `/fwgl/list/${level}/1`,
},
{
name: "云资源管理",
path: `/fwgl/list/${level}/2`,
},
];
}
// 超级管理员
else if (level == 2) {
this.navList = [
{
name: "平台服务管理",
path: `/fwgl/list/${level}/0`,
},
{
name: "服务审批管理",
path: `/fwgl/list/${level}/1`,
},
{
name: "云资源管理",
path: `/fwgl/list/${level}/2`,
},
];
}
this.navList = this.fwglNav[level].map((item, index) => ({
name: item,
path: `/fwgl/list/${level}/${index}`,
}));
},
},
mounted() {
......
This diff is collapsed.
import Vuex from 'vuex'
import Vue from 'vue'
import Vuex from "vuex";
import Vue from "vue";
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
role: 1,//0:普通用户,1:组织管理员,2:超级管理员
role: 1, //0:普通用户,1:组织管理员,2:超级管理员
serviceShopMenu: 0, // 服务超市侧边栏
fwglNav: [
["注册发布的服务", "申请的服务", "审批的服务", "云资源服务"], //普通用户
["组织服务管理", "服务审批管理", "云资源管理"], //组织管理员
["平台服务管理", "服务审批管理", "云资源管理"], //超级管理员
], // 服务管理列表,onlyRead
},
modules: {
},
modules: {},
mutations: {
rolefun(state, newValue) {
state.role = newValue;
......@@ -20,4 +23,4 @@ const store = new Vuex.Store({
},
});
export default store
\ No newline at end of file
export default store;
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