From 8be3182372eb774dce8f9c97a0b51c03bda165c7 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期一, 08 四月 2024 15:33:11 +0800
Subject: [PATCH] UI展示

---
 Source/ProjectWeb/src/page/login/userlogin.vue |   66 ++++++++++++++++----------------
 1 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/Source/ProjectWeb/src/page/login/userlogin.vue b/Source/ProjectWeb/src/page/login/userlogin.vue
index f753498..6ef68e3 100644
--- a/Source/ProjectWeb/src/page/login/userlogin.vue
+++ b/Source/ProjectWeb/src/page/login/userlogin.vue
@@ -109,15 +109,15 @@
       };
     },
     created() {
-      this.getTenant();
+     // this.getTenant();
     },
     mounted() {
       //鍦╩ounted鑾峰彇棣栭〉涓嬫媺鑿滃崟鏁版嵁
-      this.$axios.get('/api/blade-system/tenant/tenant-map').then(res=>{
+      /*this.$axios.get('/api/blade-system/tenant/tenant-map').then(res=>{
         if(res.data.code == 200){
           this.loginForm.region=res.data.data
         }
-      })
+      })*/
     },
     watch: {
       'loginForm.deptId'() {
@@ -165,36 +165,36 @@
         done();
       },
       handleLogin() {
-        // this.$router.push({path: this.tagWel.value});
-        // this.$refs.loginForm.validate(valid => {
-        //   if (valid) {
-        //     const loading = this.$loading({
-        //       lock: true,
-        //       text: '鐧诲綍涓�,璇风◢鍚庛�傘�傘��',
-        //       spinner: "el-icon-loading"
-        //     });
-        //     this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
-        //       if (this.website.switchMode) {
-        //         const deptId = this.userInfo.dept_id;
-        //         const roleId = this.userInfo.role_id;
-        //         if (deptId.includes(",") || roleId.includes(",")) {
-        //           this.loginForm.deptId = deptId;
-        //           this.loginForm.roleId = roleId;
-        //           this.userBox = true;
-        //           this.$store.dispatch("LogOut").then(() => {
-        //             loading.close();
-        //           });
-        //           return false;
-        //         }
-        //       }
-        //       this.$router.push({path: this.tagWel.value});
-        //       loading.close();
-        //     }).catch(() => {
-        //       loading.close();
-        //
-        //     });
-        //   }
-        // });
+        this.$router.push({path: this.tagWel.value});
+        this.$refs.loginForm.validate(valid => {
+          if (valid) {
+            const loading = this.$loading({
+              lock: true,
+              text: '鐧诲綍涓�,璇风◢鍚庛�傘�傘��',
+              spinner: "el-icon-loading"
+            });
+            this.$store.dispatch("LoginByUsername", this.loginForm).then(() => {
+              if (this.website.switchMode) {
+                const deptId = this.userInfo.deptOid;
+                const roleId = this.userInfo.userOid;
+                if (deptId.includes(",") || roleId.includes(",")) {
+                  this.loginForm.deptId = deptId;
+                  this.loginForm.roleId = roleId;
+                  this.userBox = true;
+                  this.$store.dispatch("LogOut").then(() => {
+                    loading.close();
+                  });
+                  return false;
+                }
+              }
+              this.$router.push({path: this.tagWel.value});
+              loading.close();
+            }).catch(() => {
+              loading.close();
+
+            });
+          }
+        });
       },
       getTenant() {
         let domain = getTopUrl();

--
Gitblit v1.9.3