Эх сурвалжийг харах

Revert "暂存"

This reverts commit fb8373e6592c76b0e3a19d1f10a898caf8f39182.
xiaodai2022 2 жил өмнө
parent
commit
3209016106

+ 0 - 43
src/App.vue

@@ -15,52 +15,9 @@ export default {
     };
     };
   },
   },
   async created() {
   async created() {
-<<<<<<< HEAD
-    if (JudgeEnvironment() === "isDingDing") {
-      await this.testing();
-    } else {
-      await this.getMenu();
-      await this.getCompany();
-    }
-  },
-  methods: {
-    async testing() {
-      await getCode(async (code) => {
-        this.code = code;
-        if (this.code != null && this.code != "") {
-          await this.setcode(this.code);
-        } else {
-          await this.logout();
-        }
-      });
-    },
-    async getCompany(){
-      const result =  await this.$store.dispatch("user/getCompanyList");
-      if(result === "noToken"){
-        await this.logout();
-      }
-    },
-    async setcode(code) {
-      let model = { code: code };
-      this.$store
-        .dispatch("user/dingUserInfor", model)
-        .then(async (res) => {
-          if (res === "success") {
-            await this.getMenu();
-            await this.getCompany();
-          } else {
-            await this.logout();
-          }
-        })
-        .catch(async (err) => {
-          await this.logout();
-        });
-    },
-=======
     await this.getMenu();
     await this.getMenu();
   },
   },
   methods: {
   methods: {
->>>>>>> master
     async getMenu() {
     async getMenu() {
       this.$store
       this.$store
         .dispatch("user/getMenuList", this)
         .dispatch("user/getMenuList", this)

+ 5 - 10
src/layout/components/Navbar.vue

@@ -10,9 +10,9 @@
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
 
 
     <div class="right-menu">
     <div class="right-menu">
-        <div class="right-menu-item">
-          <comapny-select />
-        </div>
+      <div class="right-menu-item">
+        <comapny-select />
+      </div>
 
 
       <template v-if="device !== 'mobile'">
       <template v-if="device !== 'mobile'">
         <i
         <i
@@ -147,17 +147,12 @@ import { mapGetters } from "vuex";
 
 
 import asyncRequest from "@/apis/service/system/updates";
 import asyncRequest from "@/apis/service/system/updates";
 import resToken from "@/mixins/resToken";
 import resToken from "@/mixins/resToken";
-<<<<<<< HEAD
-import { getNotice, setNotice } from "@/utils/auth";
-import ComapnySelect from "./company-select";
-=======
 import {
 import {
   getNotice,
   getNotice,
   setNotice,
   setNotice,
   get_business_companyNo,
   get_business_companyNo,
   get_business_company,
   get_business_company,
 } from "@/utils/auth";
 } from "@/utils/auth";
->>>>>>> master
 
 
 export default {
 export default {
   computed: {
   computed: {
@@ -183,8 +178,8 @@ export default {
       activeMsg: null, //消息展示对象
       activeMsg: null, //消息展示对象
     };
     };
   },
   },
-  components:{
-    ComapnySelect
+  components: {
+    ComapnySelect,
   },
   },
   mounted() {
   mounted() {
     this.companyNo = get_business_companyNo() || "";
     this.companyNo = get_business_companyNo() || "";

+ 1 - 180
src/store/modules/user.js

@@ -73,24 +73,6 @@ const mutations = {
   SET_ROLES: (state, roles) => {
   SET_ROLES: (state, roles) => {
     state.roles = roles;
     state.roles = roles;
   },
   },
-<<<<<<< HEAD
-  SET_COMPANY_LIST: (state, companyList) => {
-    state.companyList = companyList;
-    //设置当前公司
-    state.currentCompany = companyList[0].companyNo;
-  },
-  // mainListFn(state, val) {
-  //   if (!val) {
-  //     val = [];
-  //   }
-  //   state.mainList = val;
-  //   setMainList(val)
-  // },
-  setCurrentCompany(state, currentCompany) {
-    state.currentCompany = currentCompany;
-  },
-=======
->>>>>>> master
   navListFn(state, val) {
   navListFn(state, val) {
     if (!val) {
     if (!val) {
       val = [];
       val = [];
@@ -273,16 +255,11 @@ async function getUserInfo() {
 }
 }
 
 
 async function initalUserInfo() {
 async function initalUserInfo() {
-<<<<<<< HEAD
-  const { data } = await usergetinfo({});
-  console.log(data.nickname)
-  store.commit('user/SET_NAME', data.nickname);
-=======
+
   const { code, data } = await usergetinfo({});
   const { code, data } = await usergetinfo({});
   if (code === 0) {
   if (code === 0) {
     store.commit("user/SET_NAME", data.nickname);
     store.commit("user/SET_NAME", data.nickname);
   }
   }
->>>>>>> master
 }
 }
 
 
 async function getRoleProcess(roleid) {
 async function getRoleProcess(roleid) {
@@ -291,159 +268,3 @@ async function getRoleProcess(roleid) {
   list.map((si) => {
   list.map((si) => {
     si.action = [];
     si.action = [];
     if (si.child && si.child.length > 0) {
     if (si.child && si.child.length > 0) {
-      si.child.map((sii) => {
-        si.action.push(sii.order_process + "");
-        return sii;
-      });
-    }
-
-    return si;
-  });
-  return {
-    pcode: code,
-    pdata: list,
-    pmsg: meaasge,
-  };
-}
-async function getRoleMenuList() {
-  const { code, data, meaasge } = await menuList({});
-  let arrag = [];
-  let btnList = [];
-  let list = [];
-  let isok = false;
-  if (code === 0) {
-    list = data ?? [];
-    list = list.filter((item) => item.child && item.child.length > 0);
-    list.forEach((v1) => {
-      const { menu_route, child } = v1;
-      if (menu_route === "bigScreen" && child.length) {
-        isok = true;
-      }
-      let pItem = {
-        name: v1.menu_route,
-        path: `/${v1.menu_route}`,
-        meta: {
-          title: v1.menu_name,
-          icon: v1.menu_img,
-        },
-        children: [],
-      };
-      v1.child.forEach((v2) => {
-        let item = {
-          path: v2.menu_route,
-          name: v2.menu_route,
-          hidden: parseInt(v2.is_display + "") === 0,
-          meta: {
-            title: v2.menu_name,
-            icon: v2.menu_img,
-          },
-          url: v2.menu_url,
-        };
-        let model = {
-          menu_route: v2.menu_route,
-          action: v2.action,
-        };
-        btnList.push(model);
-        pItem.children.push(item);
-      });
-      arrag.push(pItem);
-    });
-  }
-  return {
-    mcode: code,
-    mdata: {
-      isok,
-      arrag,
-      btnList,
-    },
-    mmsg: meaasge,
-  };
-}
-
-function initRouter(arr) {
-  const IndexRoute = [
-    // 个人信息
-    {
-      path: "/person",
-      component: () => import("@/layout/index"),
-      redirect: "/person/my-message",
-      hidden: true,
-      alwaysShow: true,
-      meta: {
-        title: "个人中心",
-        icon: "user",
-      },
-      children: [
-        {
-          path: "my-message",
-          component: () => import("@/views/person-infor/my-message"),
-          name: "MyMessage",
-          alwaysShow: true,
-          meta: { title: "我的信息", noCache: true, breadcrumb: true },
-        },
-        {
-          path: "change-phone",
-          component: () => import("@/views/person-infor/change-phone"),
-          name: "ChangePhone",
-          alwaysShow: true,
-          meta: { title: "更换手机号", noCache: true, breadcrumb: true },
-        },
-        {
-          path: "change-password",
-          component: () => import("@/views/person-infor/change-password"),
-          name: "ChangePassword",
-          alwaysShow: true,
-          meta: { title: "修改密码", noCache: true, breadcrumb: true },
-        },
-      ],
-    },
-    //欢迎页
-    {
-      path: "/welcome",
-      component: () => import("@/layout/index"),
-      redirect: "/welcome/dashboard",
-      children: [
-        {
-          path: "dashboard",
-          component: () => import("@/views/dashboard/index"),
-          name: "Dashboard",
-          meta: { title: "首页", icon: "dashboard", affix: true },
-        },
-      ],
-    },
-  ];
-
-  arr.map((v1) => {
-    v1.component = (resolve) => require([`@/layout/index.vue`], resolve);
-    if (v1.children && v1.children.length > 0) {
-      v1.redirect = `/${v1.name}/${v1.children[0].name}`;
-      v1.children.map((v2) => {
-        v2.component = (resolve) => require([`@/views/${v2.url}.vue`], resolve);
-        return v2;
-      });
-    }
-    return v1;
-  });
-  IndexRoute.push(...arr);
-  IndexRoute.push({
-    path: "404",
-    component: () => import("@/views/error-page/404"),
-    hidden: false,
-    noCache: true,
-  });
-
-  IndexRoute.push({
-    path: "*",
-    redirect: "/404",
-  });
-  window.vm.$router.addRoutes(IndexRoute);
-}
-
-initalUserInfo();
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};