田源
2023-09-18 da6cc144cc4d60805e4693e4adc5ebdf78b5b37d
Source/UBCS-WEB/src/permission.js
@@ -7,8 +7,7 @@
import {validatenull} from '@/util/validate'
import {getToken} from '@/util/auth'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css'
import Store from "@/store"; // progress bar style
import 'nprogress/nprogress.css' // progress bar style
NProgress.configure({showSpinner: false});
const lockPage = store.getters.website.lockPage; //锁屏页
router.beforeEach((to, from, next) => {
@@ -30,16 +29,15 @@
            next({path: '/login'})
          })
        } else {
          const fullPath = to.fullPath
          const queryString = fullPath.split('?')[1];
          const value = to.query.src || to.fullPath;
          const label = queryString === 'wupin'
            ? '物品主数据'
            : (queryString === 'renyuan'
              ? '人员主数据'
              : (queryString === 'gongyingshang'
                ? '供应商主数据'
                : (to.query.name || to.name)));
          let query=JSON.parse(JSON.stringify(to.query));
         for(var q in to.query) {
           if (to.query[q].indexOf('@name=') != -1) {
             query[q] = to.query[q].split('@name=')[0]
             query['name'] = to.query[q].split('@name=')[1]
           }
         }
          const value = query.src || to.fullPath|| to.path ;
          const label = query.name || to.name;
          const meta = to.meta || router.$avueRouter.meta || {};
          const i18n = to.query.i18n;
          if (to.query.target) {