| | |
| | | :rules="loginRules" |
| | | class="login-form" |
| | | > |
| | | <h3 class="title">景宁人民医院智慧随访平台</h3> |
| | | <h3 class="title">智慧随访系统</h3> |
| | | <el-form-item prop="username"> |
| | | <el-input |
| | | v-model="loginForm.username" |
| | |
| | | <el-input |
| | | v-model="loginForm.password" |
| | | type="password" |
| | | show-password |
| | | auto-complete="off" |
| | | placeholder="密码" |
| | | @keyup.enter.native="handleLogin" |
| | |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- 丽===================水 --> |
| | | <el-form-item prop="orgid"> |
| | | <el-select style="width: 100%;" v-model="loginForm.orgid" 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> |
| | |
| | | </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> |
| | | |
| | |
| | | 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", |
| | |
| | | password: "", |
| | | rememberMe: false, |
| | | code: "", |
| | | orgid:'47255004333112711A1001', |
| | | orgid: "H41010500003", |
| | | }, |
| | | options: [ |
| | | { value: "47255004333112711A1001", label: "景宁畲族自治县人民医院" }, |
| | | { value: "2", label: "丽水市中医院" }, |
| | | ], |
| | | options: [], |
| | | loginRules: { |
| | | username: [ |
| | | { required: true, trigger: "blur", message: "请输入您的账号" }, |
| | |
| | | password: [ |
| | | { required: true, trigger: "blur", message: "请输入您的密码" }, |
| | | ], |
| | | orgid: [{ required: true, trigger: "blur", message: "请选择院区" }], |
| | | campusid: [{ required: true, trigger: "blur", message: "请选择院区" }], |
| | | }, |
| | | loading: false, |
| | | // 验证码开关 |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getorganization(); |
| | | this.getCode(); |
| | | this.getCookie(); |
| | | // if (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, |
| | | })); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | 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), { |
| | |
| | | Cookies.remove("password"); |
| | | Cookies.remove("rememberMe"); |
| | | } |
| | | // this.loginForm.orgid = '1', |
| | | |
| | | // 动态设置 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; |
| | |
| | | } |
| | | } |
| | | .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; |
| | | } |