sunlupeng vor 1 Jahr
Ursprung
Commit
029ee51156
3 geänderte Dateien mit 98 neuen und 88 gelöschten Zeilen
  1. 1 1
      .env.dev
  2. 67 67
      src/components/AppList/index.vue
  3. 30 20
      src/views/login.vue

+ 1 - 1
.env.dev

@@ -6,7 +6,7 @@ VUE_APP_TITLE = 爱思系统
 
 # 爱思系统/开发环境
 # VUE_APP_BASE_API = 'http://192.168.100.213:48080'
-VUE_APP_BASE_API = 'http://192.168.100.64:48080'
+VUE_APP_BASE_API = 'http://192.168.100.64:48081'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 67 - 67
src/components/AppList/index.vue

@@ -35,80 +35,80 @@ export default {
       activeName: 'OA',
       showContent: null,
       appList: [
-        {
-          name: 'OA',
-          children: [
-            {
-              type: 1,
-              path: 'https://www.baidu.com/',
-              name: '自定义应用',
-              icon: 'zidingyi',
-            },
-            {
-              type: 3,
-              path: '/system/companyInfo',
-              name: '系统管理',
-              icon: 'chuchai',
-            },
-            {
-              type: 99,
-              path: '/oa/universal',
-              name: '通用审批',
-              icon: 'qingjia',
-            },
-            {
-              type: 1,
-              path: '/oa/entry',
-              name: '入职审批',
-              icon: 'qingjia',
-            },
-            {
-              type: 2,
-              path: '/oa/turnJust',
-              name: '转正申请',
-              icon: 'chuchai',
-            },
-            {
-              type: 3,
-              path: '/oa/renewal',
-              name: '续签申请',
-              icon: 'chuchai',
-            },
-            {
-              type: 4,
-              path: '/oa/staffQuit',
-              name: '离职申请',
-              icon: 'chuchai',
-            },
+        // {
+        //   name: 'OA',
+        //   children: [
+        //     {
+        //       type: 1,
+        //       path: 'https://www.baidu.com/',
+        //       name: '自定义应用',
+        //       icon: 'zidingyi',
+        //     },
+        //     {
+        //       type: 3,
+        //       path: '/system/companyInfo',
+        //       name: '系统管理',
+        //       icon: 'chuchai',
+        //     },
+        //     {
+        //       type: 99,
+        //       path: '/oa/universal',
+        //       name: '通用审批',
+        //       icon: 'qingjia',
+        //     },
+        //     {
+        //       type: 1,
+        //       path: '/oa/entry',
+        //       name: '入职审批',
+        //       icon: 'qingjia',
+        //     },
+        //     {
+        //       type: 2,
+        //       path: '/oa/turnJust',
+        //       name: '转正申请',
+        //       icon: 'chuchai',
+        //     },
+        //     {
+        //       type: 3,
+        //       path: '/oa/renewal',
+        //       name: '续签申请',
+        //       icon: 'chuchai',
+        //     },
+        //     {
+        //       type: 4,
+        //       path: '/oa/staffQuit',
+        //       name: '离职申请',
+        //       icon: 'chuchai',
+        //     },
            
-            {
-              type: 4,
-              path: '/meeting/list',
-              name: '会议室管理',
-              icon: 'chuchai',
-            },
-          ],
-        },
-        {
-          name: '人事',
-          children: [],
+        //     {
+        //       type: 4,
+        //       path: '/meeting/list',
+        //       name: '会议室管理',
+        //       icon: 'chuchai',
+        //     },
+        //   ],
+        // },
+        // {
+        //   name: '人事',
+        //   children: [],
 
-        },
-        {
-          name: '财务',
-          children: [],
+        // },
+        // {
+        //   name: '财务',
+        //   children: [],
 
-        },
-        {
-          name: 'CRM',
-          children: [],
+        // },
+        // {
+        //   name: 'CRM',
+        //   children: [],
 
-        },
+        // },
       ]
     };
   },
   created(){
-    // this.getAppList();
+    this.getAppList();
   },
   methods: {
     getAppList() {
@@ -206,7 +206,7 @@ export default {
             })
             setTimeout(() => {
               this.fullscreenLoading = false;
-              this.$router.push({ path: key });
+              this.$router.push({ path: item.component });
             }, 200);
         // });
       }

+ 30 - 20
src/views/login.vue

@@ -123,26 +123,36 @@ export default {
       LoginRules: {
         username: [
           {required: true, trigger: "blur", message: "手机号不能为空"},
-          // {
-          //   validator: (rule, value, callback) => {
-          //     if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
-          //       callback(new Error("手机号格式错误"));
-          //     } else {
-          //       removeTenantId()
-          //       getTenantIdByName(value).then(res => {
-          //         const tenantId = res.data;
-          //         if (tenantId && tenantId >= 0) {
-          //           setTenantId(tenantId)
-          //           callback();
-          //         } else {
-          //           callback('该手机号未创建账号,请重新输入');
-          //         }
-          //       });
-          //     }
+          {
+            validator: (rule, value, callback) => {
+              // if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
+              //   callback(new Error("手机号格式错误"));
+              // } else {
+              //   removeTenantId()
+              //   getTenantIdByName(value).then(res => {
+              //     const tenantId = res.data;
+              //     if (tenantId && tenantId >= 0) {
+              //       setTenantId(tenantId)
+              //       callback();
+              //     } else {
+              //       callback('该手机号未创建账号,请重新输入');
+              //     }
+              //   });
+              // }
+              removeTenantId()
+                getTenantIdByName(value).then(res => {
+                  const tenantId = res.data;
+                  if (tenantId && tenantId >= 0) {
+                    setTenantId(tenantId)
+                    callback();
+                  } else {
+                    callback('该手机号未创建账号,请重新输入');
+                  }
+                });
            
-          //   },
-          //   trigger: 'blur'
-          // }
+            },
+            trigger: 'blur'
+          }
 
         ],
         password: [
@@ -200,7 +210,7 @@ export default {
             removePassword()
             removeRememberMe()
           }
-          setTenantId(1)
+          // setTenantId(1)
           this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => {
             this.$router.push({path: "/"}).catch(() => {
             });