chenjun 1 year ago
parent
commit
3ec9644a55
4 changed files with 32 additions and 29 deletions
  1. 6 6
      public/staticConfig.js
  2. 1 0
      src/App.vue
  3. 24 23
      src/getMenu.js
  4. 1 0
      src/views/login/index.vue

+ 6 - 6
public/staticConfig.js

@@ -51,10 +51,10 @@ switch (baseNewUrl) {
   case 'localhost':
     PLATFROM_CONFIG = {
       ...PLATFROM_CONFIG,
-      baseNewUrl: 'http://120.26.64.82:8085',
-      baseURLCA: 'http://120.26.64.82:8085',
-      fileUrl: 'http://120.26.64.82:8085',
-      expressUrl: 'http://120.26.64.82:8085',
+      baseNewUrl: 'http://192.168.3.79:9500',
+      baseURLCA: 'http://192.168.3.79:9500',
+      fileUrl: 'http://192.168.3.79:9500',
+      expressUrl: 'http://192.168.3.79:9500',
       tempUrl: 'http://10.211.67.163:16300', // 1.0临时地址
       tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
       tempUserId: '1656481036109',
@@ -65,8 +65,8 @@ switch (baseNewUrl) {
   default:
     PLATFROM_CONFIG = {
       ...PLATFROM_CONFIG,
-      baseNewUrl: 'http://10.211.66.23:8082',
-      baseURLCA: 'http://10.211.66.23:8082',
+      baseNewUrl: 'http://192.168.3.79:9500',
+      baseURLCA: 'http://192.168.3.79:9500',
     }
     break
 }

+ 1 - 0
src/App.vue

@@ -1,3 +1,4 @@
+
 <!--
  * @Author: your name
  * @Date: 2021-10-14 17:17:53

+ 24 - 23
src/getMenu.js

@@ -49,13 +49,15 @@ router.beforeEach(async (to, from, next) => {
       } else {
         try {
           const treeData = await store.dispatch('user/getMenuInfo')
-          const nd = treeData.filter(item => item.pageid)
+          const nd = treeData.filter(item => item.pageconfigurationid)
           store.dispatch('auth/changeAuthArrs', nd)
           // const typeData = setType(treeData, 'up_auth_id', 'auth_id')
           const menusArray = parseMenuItem(nd)
-          const treeMenu = listToTree(menusArray, 'superiorid', 'pageid')
-          const dataMenu = _.unionBy(treeMenu, 'pageid')
+          const treeMenu = listToTree(menusArray, 'up_auth_id', 'auth_id')
+          const dataMenu = _.unionBy(treeMenu, 'auth_id')
           const menus = parseMenu(dataMenu)
+          console.log(treeMenu)
+
           store.dispatch('permission/setRoutes', menus)
           router.addRoutes(menus)
           next({ ...to, replace: true })
@@ -83,44 +85,43 @@ router.beforeEach(async (to, from, next) => {
 })
 
 function parseMenuItem (data) {
+  //pagetype 1模块  2页面  3按钮 4表格 5树形  6弹窗
   const menus = []
   data.map(item => {
-    if (item.opentype == 1) {
+    if (item.pagetype == 1) {
       menus.push({
-        auth_id: item.pageid,
+        auth_id: item.pageconfigurationid,
         up_auth_id: item.superiorid,
-        path: item.router,
-        name: item.pagedescribe,
+        path: item.pageroute,
+        name: item.pagename,
         meta: {
           title: item.pagename,
-          elSvgIcon: item.icon ?? 'Fold',
-          show_index: item.defaultindex,
+          elSvgIcon: item.pageicon ?? 'Fold',
+          show_index: item.displayorder,
           qid: item.serviceid,
         },
         component: Layout,
-        hidden: !item.is_show,
+        hidden: !item.isdisplay,
       })
-    } else if (item.opentype == 2) {
+    } else if (item.pagetype == 2) {
       menus.push({
-        auth_id: item.pageid,
+        auth_id: item.pageconfigurationid,
         up_auth_id: item.superiorid,
-        path: item.router,
-        name: item.pagedescribe,
+        path: item.pageroute,
+        name: item.pagename,
         meta: {
           title: item.pagename,
-          elSvgIcon: item.icon ?? 'Fold',
-          show_index: item.defaultindex,
-          qid: item.queryTemplateID,
-          auth_id: item.pageid,
+          elSvgIcon: item.pageicon ?? 'Fold',
+          show_index: item.displayorder,
+          qid: item.serviceid,
+          auth_id: item.pageconfigurationid,
           up_auth_id: item.superiorid,
           pagecode: item.pagecode,
-          superiorcode: item.superiorcode,
-          sort: item.sort,
-          tagetpageid: item.tagetpageid
+          superiorcode: item.pagecode
         },
-        component: resolve => require(['@/views' + item.filepath], resolve),
+        component: resolve => require(['@/views/table/index.vue'], resolve),
         // component: () => import('./views/table/index.vue'),
-        hidden: !item.is_show,
+        hidden: !item.isdisplay,
       })
     }
   })

+ 1 - 0
src/views/login/index.vue

@@ -188,6 +188,7 @@ export default {
       const { code, message, returnData } = await getVCode();
       if (code == 0 && isValue(returnData)) {
         const { verifyCodeImage } = returnData;
+        this.loginForm.identify="";
         this.baseImg = verifyCodeImage;
       } else {
         this.$message.error(message);