diff --git a/src/components/menu-copy.vue b/src/components/menu-copy.vue deleted file mode 100644 index e9a2454b1aae6c094bb50cce5f25d95b353e4a1f..0000000000000000000000000000000000000000 --- a/src/components/menu-copy.vue +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/components/menu.vue b/src/components/menu.vue index dcb5821026adde2bc40fed009a3d8ff5755efa2f..1da649c10548c9181783ef66dc708717d2c7acff 100644 --- a/src/components/menu.vue +++ b/src/components/menu.vue @@ -78,18 +78,18 @@ v-for="(item, index) in menu_arr" :key="index + 200" class="menu_box user_hover" - @click="navAction(index, item.path)" + @click="navAction(index, item.visit_url)" :style="{ color: now_menu == index ? '#fff' : '' }" > - {{ item.name }} -
- + @@ -100,70 +100,13 @@ export default { data() { return { - menu_arr: [ - { - name: "工作台", - path: "/workplace", - children: [ - { - name: "服务注册", - path: "/fwzc/fwcs" - }, - { - name: "服务管理", - path: "/fwgl/" - }, - { - name: "应用管理", - path: "/yygl/" - } - ] - }, - { - name: "技术支持", - path: "/xxx" - }, - { - name: "服务超市", - path: "/services_shop", - children: [ - { - name: "数据服务", - path: "/shop/data_service_list/5" - }, - { - name: "时空服务", - path: "/shop/space_time_service_list/6" - }, - { - name: "视频服务", - path: "/shop/video_service_list/7" - }, - { - name: "感知服务", - path: "/shop/perception_service_list/10" - }, - { - name: "综合应用", - path: "/shop/comprehensive_app_list/11" - }, - { - name: "云资源服务", - path: "/shop/cloud" - }, - { - name: "应用商店", - path: "/shop/app_store_list/12" - } - ] - } - ], + menu_arr: [], now_menu: 2, user_arr: [ { name: "个人档案", path: "/user/user_info" }, { name: "消息通知", path: "/user/message" }, - { name: "收银中心", path: "/authority" }, - { name: "关于BD-aPaaS", path: "/data_analysis" }, + { name: "收银中心", path: "" }, + { name: "关于BD-aPaaS", path: "" }, { name: "退出登录", path: "logout" } ], shopping_list: [], @@ -171,7 +114,7 @@ export default { }; }, mounted() { - this.getMenuIndex(); + this.getNowMenu(); this.getList(); }, computed: { @@ -218,14 +161,14 @@ export default { window.sessionStorage.setItem("menuIndex", index); }, gotoChildPage(v, parent) { - if (v.path) { - if (v.path == "/fwgl/" || v.path == "/yygl/") { - this.$router.push(v.path + this.$store.getters.level); + if (v.visit_url) { + if (v.visit_url == "/fwgl/" || v.visit_url == "/yygl/") { + this.$router.push(v.visit_url + this.$store.getters.level); } else if (parent == 2) { - this.$router.push(v.path); - this.$store.commit("serviceShopMenuAct", v.path); + this.$router.push(v.visit_url); + this.$store.commit("serviceShopMenuAct", v.visit_url); } else { - this.$router.push(v.path); + this.$router.push(v.visit_url); } this.now_menu = parent; window.sessionStorage.setItem("menuIndex", parent); @@ -249,6 +192,14 @@ export default { let index = window.sessionStorage.getItem("menuIndex"); console.log(index); this.now_menu = index ? index : 2; + }, + getNowMenu() { + this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => { + if (response.data.success == 1) { + this.menu_arr = response.data.data[0].Child; + this.getMenuIndex(); + } + }); } } }; diff --git a/src/components/service_shop_menu.vue b/src/components/service_shop_menu.vue index 184e354580b331d2b6dcd30230612690e178cf71..003123c8dfd5a51c0cef7819da57e105ce234121 100644 --- a/src/components/service_shop_menu.vue +++ b/src/components/service_shop_menu.vue @@ -1,14 +1,16 @@ @@ -20,57 +22,7 @@ export default { data() { return { actives: "", - menuList: [ - { - id: 0, - label: "数据服务", - router: "/shop/data_service_list/5", - active: "tool_ic_shujufw_sel", - default: "tool_ic_shujufw" - }, - { - id: 1, - label: "时空服务", - router: "/shop/space_time_service_list/6", - active: "tool_ic_shikongfw_sel", - default: "tool_ic_shikongfw" - }, - { - id: 2, - label: "视频服务", - router: "/shop/video_service_list/7", - active: "tool_ic_shipinfw_sel", - default: "tool_ic_shipinfw" - }, - { - id: 3, - label: "感知服务", - router: "/shop/perception_service_list/10", - active: "tool_ic_ganzhifw_sel", - default: "tool_ic_ganzhifw" - }, - { - id: 4, - label: "综合服务", - router: "/shop/comprehensive_app_list/11", - active: "tool_ic_zongheyyfw_sel", - default: "tool_ic_zongheyyfw" - }, - { - id: 5, - label: "云资源服务", - router: "/shop/cloud", - active: "tool_ic_yunziyuanfw_sel", - default: "tool_ic_yunziyuanfw" - }, - { - id: 6, - label: "应用商店", - router: "/shop/app_store_list/12", - active: "tool_ic_yingyongsd_sel", - default: "tool_ic_yingyongsd" - } - ] + menuList: [] }; }, computed: { @@ -84,6 +36,7 @@ export default { } }, mounted() { + this.getShopMenu(); this.$store.commit("serviceShopMenuAct", this.$route.path); this.actives = this.$store.state.serviceShopMenu; }, @@ -94,6 +47,60 @@ export default { getActiveMenu(val) { this.actives = val; this.$router.push(val); + }, + getShopMenu() { + this.$api.general.getNowMenu({ teamName: "APAAS3" }).then(response => { + if (response.data.success == 1) { + let arr = response.data.data[0].Child; + let shopArr = []; + arr.forEach(item => { + if (item.visit_url == "/services_shop") { + shopArr = item.Child; + } + }); + shopArr.forEach(item => { + let uri = item.visit_url.substring(6); + if (uri.indexOf("/") != -1) { + uri = uri.substring(0, uri.indexOf("/")); + } + switch (uri) { + case "data_service_list": + item.active = "tool_ic_shujufw_sel"; + item.default = "tool_ic_shujufw"; + break; + case "space_time_service_list": + item.active = "tool_ic_shikongfw_sel"; + item.default = "tool_ic_shikongfw"; + break; + case "video_service_list": + item.active = "tool_ic_shipinfw_sel"; + item.default = "tool_ic_shipinfw"; + break; + case "perception_service_list": + item.active = "tool_ic_ganzhifw_sel"; + item.default = "tool_ic_ganzhifw"; + break; + case "comprehensive_app_list": + item.active = "tool_ic_zongheyyfw_sel"; + item.default = "tool_ic_zongheyyfw"; + break; + case "cloud": + item.active = "tool_ic_yunziyuanfw_sel"; + item.default = "tool_ic_yunziyuanfw"; + break; + case "app_store_list": + item.active = "tool_ic_yingyongsd_sel"; + item.default = "tool_ic_yingyongsd"; + break; + default: + item.active = "1"; + item.default = "1"; + break; + } + }); + this.menuList = shopArr; + } + }); } } }; diff --git a/src/pages/authority/menu/menus.vue b/src/pages/authority/menu/menus.vue index 9fb067ba4457d757224424a8299be2946a0a7cfe..71f23d30c1cfc5b2d700e9a109c9521c8ea2b8f3 100644 --- a/src/pages/authority/menu/menus.vue +++ b/src/pages/authority/menu/menus.vue @@ -149,8 +149,8 @@ export default { { required: true, message: "请填写菜单访问地址", trigger: "blur" }, { min: 0, - max: 30, - message: "访问地址长度不超过30个字", + max: 50, + message: "访问地址长度不超过50个字", trigger: "blur" } ], diff --git a/src/pages/service_shop/shop_list.vue b/src/pages/service_shop/shop_list.vue index 707ec260e311730e62c989336b54732810a14e65..09d71530046575d5872fd4f01060a808c227332e 100644 --- a/src/pages/service_shop/shop_list.vue +++ b/src/pages/service_shop/shop_list.vue @@ -32,7 +32,6 @@ export default { getVal(val) { let uri = val.substring(6); uri = uri.substring(0, uri.indexOf("/")); - console.log(uri); switch (uri) { case "data_service_list": this.name = "数据服务";