snow vor 2 Jahren
Ursprung
Commit
b889df91e6

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/0.js


Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 0
dist/static/js/app.js


+ 45 - 46
src/components/globalComponents/Breadcrumb/main.vue

@@ -4,15 +4,14 @@
       class="el-icon-d-arrow-left fl"
       :class="{ cor: isShow }"
       @click="back_arrow"
-    ></i>
+    />
     <el-breadcrumb class="app-breadcrumb" separator="/">
       <transition-group name="breadcrumb">
         <el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
           <span
             v-if="item.redirect === 'noRedirect' || index > 0"
             class="no-redirect"
-            >{{ item.meta.title }}</span
-          >
+          >{{ item.meta.title }}</span>
           <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
         </el-breadcrumb-item>
       </transition-group>
@@ -21,97 +20,97 @@
 </template>
 
 <script>
-import pathToRegexp from "path-to-regexp";
+import pathToRegexp from 'path-to-regexp'
 
 export default {
-  name: "Breadcrumb",
+  name: 'Breadcrumb',
   data() {
     return {
       levelList: null,
       isShow: false,
-      backOtions: "",
-      backUrl: "",
-    };
+      backOtions: '',
+      backUrl: ''
+    }
   },
   watch: {
     $route(route) {
       // if you go to the redirect page, do not update the breadcrumbs
-      if (route.path.startsWith("/redirect/")) {
-        this.isShow = false;
-        return;
+      if (route.path.startsWith('/redirect/')) {
+        this.isShow = false
+        return
       }
-      this.getBreadcrumb();
-    },
+      this.getBreadcrumb()
+    }
   },
   created() {
-    this.getBreadcrumb();
+    this.getBreadcrumb()
   },
   methods: {
     getBreadcrumb() {
       // only show routes with meta.title
       let matched = this.$route.matched.filter(
         (item) => item.meta && item.meta.title
-      );
-      const first = matched[0];
+      )
+      const first = matched[0]
 
       if (!this.isDashboard(first)) {
         matched = [
-          { path: "/welcome/dashboard", meta: { title: "首页" } },
-        ].concat(matched);
+          { path: '/welcome/dashboard', meta: { title: '首页' }}
+        ].concat(matched)
       }
 
       this.levelList = matched.filter(
         (item) => item.meta && item.meta.title && item.meta.breadcrumb !== false
-      );
-      const { preModel } = this.$route.query;
+      )
+      const { preModel } = this.$route.query
       if (preModel) {
-        let model = JSON.parse(preModel);
-        this.isShow = true;
-        const { options, router } = model;
-        this.backOtions = JSON.stringify(options);
-        this.backUrl = router;
+        const model = JSON.parse(preModel)
+        this.isShow = true
+        const { options, router } = model
+        this.backOtions = JSON.stringify(options)
+        this.backUrl = router
       } else {
-        this.isShow = false;
+        this.isShow = false
         // this.backOtions = "";
       }
-      console.log("active" + this.backOtions);
+      console.log('active' + this.backOtions)
     },
     isDashboard(route) {
-      const name = route && route.name;
+      const name = route && route.name
       if (!name) {
-        return false;
+        return false
       }
       return (
-        name.trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase()
-      );
+        name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
+      )
     },
     pathCompile(path) {
-      const { params } = this.$route;
-      var toPath = pathToRegexp.compile(path);
-      return toPath(params);
+      const { params } = this.$route
+      var toPath = pathToRegexp.compile(path)
+      return toPath(params)
     },
     back_arrow() {
       if (!this.isShow) {
-        return;
+        return
       }
-      console.log("wantto" + this.backOtions);
+      console.log('wantto' + this.backOtions)
       window.vm.$router.push({
         path: this.backUrl,
         query: {
-          back: this.backOtions,
-        },
-      });
+          back: this.backOtions
+        }
+      })
     },
     handleLink(item) {
-      const { redirect, path } = item;
+      const { redirect, path } = item
       if (redirect) {
-        window.vm.$router.push(redirect);
-        return;
+        window.vm.$router.push(redirect)
+        return
       }
-      window.vm.$router.push(this.pathCompile(path));
-    },
-  },
-};
+      window.vm.$router.push(this.pathCompile(path))
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

+ 3 - 1
src/config/env.company.js

@@ -17,7 +17,9 @@ module.exports = {
   },
   // 结算平台url
   // settlementPlatformUrl: 'http://127.0.0.1:8848',
-  settlementPlatformUrl: 'http://newweb.test241.wanyuhengtong.com/',
+  // 结算平台url
+  settlementPlatformUrl: 'http://webcx.test241.wanyuhengtong.com/',
+  // token加密key
   secretKey: 'key123',
   loginTitle: '',
   loginBeian: '京ICP备2022033072号-1',

+ 2 - 1
src/config/env.development.js

@@ -18,7 +18,8 @@ module.exports = {
   loginTitle: '',
   loginBeian: '京ICP备2022033072号-1',
   loginBeianUrl: 'https://beian.miit.gov.cn/',
-  settlementPlatformUrl: 'http://newweb.test241.wanyuhengtong.com/',
+  // 结算平台url
+  settlementPlatformUrl: 'http://webcx.test241.wanyuhengtong.com/',
   // token加密key
   secretKey: 'key123'
 }

+ 2 - 0
src/store/getters.js

@@ -21,7 +21,9 @@ const getters = {
   userInfo: state => state.user.userInfo,
   roleProcess: state => state.user.roleProcess,
   currentLevel: state => state.user.currentLevel,
+  sourceLevel: state => state.user.sourceLevel,
   currentCompany: state => state.user.currentCompany,
+  companyList: state => state.user.companylist,
   private_field: state => {
     if (!state.user.private_field) return []
     if (typeof state.user.private_field === 'string') return JSON.parse(state.user.private_field)

+ 2 - 4
src/store/modules/user.js

@@ -305,7 +305,7 @@ const actions = {
   },
 
   async getMenuList({ commit, that, dispatch }) {
-    return new Promise(async (resolve, reject) => {
+    return new Promise(async (resolve) => {
       if (!getToken()) {
         resolve("noToken");
       } else {
@@ -340,10 +340,8 @@ const actions = {
            let _companylist = []
            if(companyCode === 0) {
             _companylist = isSupertube ? companyData.list : convertCompanylist(companyData.list);
-            
             //超管 + 业务公司 需要将 relation_code 设置为 code
-            // if(isSupertube) _companylist = _companylist.map(item => ({...item, code: item.relation_code}))
-            
+            if(isSupertube) _companylist = _companylist.map(item => ({...item, code: item.relation_code}))
             commit('setCompanylist', _companylist)
            }
            if(companyCode >= 100 && companyCode <= 104){

+ 14 - 1
src/utils/auth.js

@@ -10,12 +10,25 @@ const privateFieldKey = 'Purchase-Console-privateField'
 const actionDataKey = 'Purchase-Console-actionData'
 const roleLevelKey = 'Purchase-Console-roleLevel'
 const companyKey = 'Purchase-Console-company'
+const userLevelkey = 'puchase-Console-level'
 const userKey = 'Purchase-Console-user'
 
 export const TokenKey = 'Purchase-Console-Token'
-
 // 业务公司business 供应商supplier
 const companyTypeKey = 'Purchase-Console-companyType'
+
+export function setUserLevel(type) {
+  return localStorage.setItem(userLevelkey, type)
+}
+
+export function getUserLevel() {
+  return localStorage.getItem(userLevelkey) || ''
+}
+
+export function removeUserLevel() {
+  return localStorage.removeItem(userLevelkey) || ''
+}
+
 export function setCompanyType(type) {
   return localStorage.setItem(companyTypeKey, type)
 }

+ 0 - 1
src/views/purchaseIn/workbench/index.vue

@@ -200,7 +200,6 @@ export default {
   },
   methods: {
     wantTo(infoNo) {
-      console.log(this.powers);
       if (this.powers.some((i) => i == "007")) {
         this.routeGoto("workbenchDetail", { id: infoNo });
       }

+ 1 - 2
src/views/supplierPurchaseIn/supplierWorkbench/index.vue

@@ -201,9 +201,8 @@ export default {
   },
   methods: {
     wantTo(infoNo) {
-      console.log(this.powers);
       if (this.powers.some((i) => i == "007")) {
-        this.routeGoto("workbenchDetail", { id: infoNo });
+        this.routeGoto("supplierWorkbenchDetail", { id: infoNo });
       }
     },
     async well_timer() {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.