From a5cba9ab040f6f97558046885dce3017f9bab7e9 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 11 八月 2026 14:12:29 +0800
Subject: [PATCH] 提交

---
 src/views/login.vue |  145 +++++++++++++++++++++++++++++++++++++----------
 1 files changed, 113 insertions(+), 32 deletions(-)

diff --git a/src/views/login.vue b/src/views/login.vue
index 23bab52..10cf9d3 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -6,7 +6,7 @@
       :rules="loginRules"
       class="login-form"
     >
-      <h3 class="title">娴欎腑鍖诲ぇ浜岄櫌鏅烘収闅忚骞冲彴</h3>
+      <h3 class="title">鏅烘収闅忚绯荤粺</h3>
       <el-form-item prop="username">
         <el-input
           v-model="loginForm.username"
@@ -25,6 +25,7 @@
         <el-input
           v-model="loginForm.password"
           type="password"
+          show-password
           auto-complete="off"
           placeholder="瀵嗙爜"
           @keyup.enter.native="handleLogin"
@@ -37,18 +38,21 @@
         </el-input>
       </el-form-item>
       <!-- 涓�===================姘� -->
-      <!-- <el-form-item prop="guid">
-        <el-select style="width: 100%;" v-model="loginForm.guid"  placeholder="璇烽�夋嫨闄㈠尯">
+      <el-form-item prop="campusid">
+        <el-select
+          style="width: 100%"
+          v-model="loginForm.campusid"
+          placeholder="璇烽�夋嫨闄㈠尯"
+        >
           <el-option
             v-for="item in options"
-            :key="item.value"
             :label="item.label"
-            :value="item.value"
+            :value="item.campusid"
           >
           </el-option>
           <i slot="prefix" class="el-icon-mobile"></i>
         </el-select>
-      </el-form-item> -->
+      </el-form-item>
       <!-- <el-form-item prop="code" v-if="captchaEnabled">
         <el-input
           v-model="loginForm.code"
@@ -90,10 +94,19 @@
         </div>
       </el-form-item>
     </el-form>
-    <!--  搴曢儴  -->
-    <!-- <div class="el-login-footer">
-      <span style="color: #568FBD; font-size: 25px;">Copyright 漏 2018-2022 ruoyi.vip All Rights Reserved.</span>
-    </div> -->
+    <!-- 搴曢儴淇℃伅 -->
+    <div class="el-login-footer">
+      <div class="footer-content">
+        <div class="footer-row">
+          <span class="tech-label">鎶�鏈敮鎸侊細</span>
+          <img src="@/assets/logo/Hrs.png" class="tech-logo" alt="logo" />
+          <span class="tech-name">娴欐睙浜ュ皵鏃剁鎶�鏈夐檺鍏徃</span>
+        </div>
+        <div class="footer-row">
+          <span class="hotline">鏈嶅姟鐑嚎锛�17778760073</span>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
@@ -101,6 +114,7 @@
 import { getCodeImg } from "@/api/login";
 import Cookies from "js-cookie";
 import { encrypt, decrypt } from "@/utils/jsencrypt";
+import { getorganization } from "@/api/AiCentre/index";
 
 export default {
   name: "Login",
@@ -112,13 +126,9 @@
         password: "",
         rememberMe: false,
         code: "",
-        uuid: "",
-        guid:'',
+        orgid: "H41010500003",
       },
-      options: [
-        { value: "1", label: "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�" },
-        { value: "2", label: "涓芥按甯備腑鍖婚櫌" },
-       ],
+      options: [],
       loginRules: {
         username: [
           { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" },
@@ -126,7 +136,7 @@
         password: [
           { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勫瘑鐮�" },
         ],
-        // guid: [{ required: true, trigger: "blur", message: "璇烽�夋嫨闄㈠尯" }],
+        campusid: [{ required: true, trigger: "blur", message: "璇烽�夋嫨闄㈠尯" }],
       },
       loading: false,
       // 楠岃瘉鐮佸紑鍏�
@@ -145,21 +155,32 @@
     },
   },
   created() {
+    this.getorganization();
     this.getCode();
     this.getCookie();
-    if (localStorage.getItem('guid')) {
-      this.loginForm.guid = localStorage.getItem('guid');
-    }
+    // if (localStorage.getItem('orgid')) {
+    //   this.loginForm.orgid = localStorage.getItem('orgid');
+    // }
   },
   methods: {
     getCode() {
       getCodeImg().then((res) => {
-        console.log(res);
         this.captchaEnabled =
           res.captchaEnabled === undefined ? true : res.captchaEnabled;
         if (this.captchaEnabled) {
           this.codeUrl = "data:image/gif;base64," + res.img;
           this.loginForm.uuid = res.uuid;
+        }
+      });
+    },
+    getorganization() {
+      getorganization({ pageSize: 30 }).then((res) => {
+        if (res.code == 200) {
+          this.options = res.rows.map((item) => ({
+            value: item.orgid,
+            label: item.organizationName,
+            campusid: item.organizationID,
+          }));
         }
       });
     },
@@ -178,6 +199,7 @@
       this.$refs.loginForm.validate((valid) => {
         if (valid) {
           this.loading = true;
+
           if (this.loginForm.rememberMe) {
             Cookies.set("username", this.loginForm.username, { expires: 30 });
             Cookies.set("password", encrypt(this.loginForm.password), {
@@ -191,12 +213,35 @@
             Cookies.remove("password");
             Cookies.remove("rememberMe");
           }
-          localStorage.removeItem('guid');
+
+          // 鍔ㄦ�佽缃� campusid 鍙傛暟
+          const selectedOrg = this.options.find(
+            (item) => item.campusid === this.loginForm.campusid
+          );
+          this.loginForm.campusid = selectedOrg.campusid || 1;
+          this.loginForm.orgid = selectedOrg.value || 1;
+          this.loginForm.orgname = selectedOrg.label || "";
+          // 甯備竴澶勭悊-----------------
+          // if (selectedOrg) {
+          //   if (selectedOrg.label.includes("婀栨花")) {
+          //     this.loginForm.campusid = 1;
+          //   } else if (selectedOrg.label.includes("鍚村北")) {
+          //     this.loginForm.campusid = 2;
+          //   } else {
+          //     this.loginForm.campusid = 1; // 榛樿鍊兼垨鍏朵粬澶勭悊
+          //   }
+          // }
+          // --------------------------------
           this.$store
             .dispatch("Login", this.loginForm)
-            .then(() => {
-              // this.$router.push({ path: this.redirect || "/" }).catch(() => {});
-              this.$router.push({ path:"/patient/patient" }).catch(() => {});
+            .then((res) => {
+              if (this.loginForm.username == "admin") {
+                this.$router.push({ path: "/index" }).catch(() => {});
+              } else {
+                this.$router
+                  .push({ path: "/followvisit/discharge" })
+                  .catch(() => {});
+              }
             })
             .catch(() => {
               this.loading = false;
@@ -269,18 +314,54 @@
   }
 }
 .el-login-footer {
-  height: 40px;
-  line-height: 40px;
   position: fixed;
-  bottom: 0;
+  bottom: 20px;
+  left: 0;
+  right: 0;
   width: 100%;
   text-align: center;
-  color: #fff;
-  font-family: Arial;
-  font-size: 12px;
-  letter-spacing: 1px;
+  font-size: 13px;
+  color: #3664D9;
+  z-index: 10;
 }
 
+.footer-content {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  gap: 4px;
+}
+
+.footer-row {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.tech-logo {
+  width: 28px;
+  height: 28px;
+  margin: 0 6px;
+  vertical-align: middle;
+}
+
+.tech-label,
+.tech-name,
+.hotline {
+  color: #3664D9;;
+  font-size: 13px;
+}
+
+.tech-name {
+  color: #3664D9;;
+  font-weight: 500;
+}
+
+.hotline {
+  font-size: 12px;
+  color: #3664D9;;
+}
 .login-code-img {
   height: 38px;
 }

--
Gitblit v1.9.3