Files
ba_web/ab/static/js/chunk-48ee0a14.95469500.js

1 line
6.2 KiB
JavaScript
Raw Normal View History

2025-09-26 17:22:28 +08:00
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-48ee0a14"], { "96c6": function (e, t, a) { }, "9ed6": function (e, t, a) { "use strict"; a.r(t); var c = a("7a23"), o = (a("5d2d"), a("2295")); a("7902"), a("6797"), a("d9e2"); const l = () => (e, t, a) => { t.length < 6 ? a(new Error("密码不能少于6位")) : a() }; var r = a("5502"), n = a("6605"); const s = e => (Object(c["pushScopeId"])("data-v-75963f3f"), e = e(), Object(c["popScopeId"])(), e), d = { class: "login-container" }, p = s(() => Object(c["createElementVNode"])("div", { class: "title-container" }, [Object(c["createElementVNode"])("h3", { class: "title" }, "用户登录")], -1)), u = { class: "svg-container" }, b = { class: "svg-container" }, i = { class: "show-pwd" }, j = { class: "svg-container" }, O = { class: "image-slot" }, m = Object(c["createTextVNode"])("登录"), v = { name: "login" }; var h = Object.assign(v, { setup(e) { const t = Object(r["b"])(), a = Object(c["ref"])(""), s = Object(c["ref"])({ userName: "", password: "", kaptcha: "" }), v = Object(c["ref"])(!1), h = Object(c["ref"])([]), w = Object(c["ref"])(""), V = Object(c["ref"])(""), f = Object(c["ref"])(!1), k = Object(c["ref"])({ userName: [{ required: !0, trigger: "blur", message: "用户名为必填项" }], password: [{ required: !0, trigger: "blur", validator: l() }], kaptcha: [{ required: !0, trigger: "blur", message: "验证码为必填项" }] }), N = e => { t.dispatch("user/refreshToken", { deptId: e, jwtToken: V.value }).then(a => { x.value = !1, t.commit("user/setDeptId", e), _.push("/") }).catch(() => { x.value = !1 }) }, g = Object(c["ref"])("password"), C = () => { "password" === g.value ? g.value = "text" : g.value = "password" }, x = Object(c["ref"])(!1), y = Object(c["ref"])(null), _ = Object(n["d"])(), B = () => { y.value.validate(e => { if (!e) return !1; x.value = !0, t.dispatch("user/login", s.value).then(e => { x.value = !1, 1 === e.deptList.length ? _.push("/") : (h.value = [...e.deptList], v.value = !0, V.value = e.jwtToken, Object(o["a"])({ title: "提示", message: "请选择部门", duration: 3e3 })) }).catch(() => { x.value = !1 }) }) }; Object(c["onMounted"])(() => { }); const E = () => { const e = "http://123.60.67.142/mosty-base/kaptcha?date=" + new Date; a.value = e }; return (e, t) => { const o = Object(c["resolveComponent"])("svg-icon"), l = Object(c["resolveComponent"])("el-input"), r = Object(c["resolveComponent"])("el-form-item"), n = Object(c["resolveComponent"])("el-image"), V = Object(c["resolveComponent"])("el-button"), _ = Object(c["resolveComponent"])("el-option"), I = Object(c["resolveComponent"])("el-select"), T = Object(c["resolveComponent"])("el-form"); return Object(c["openBlock"])(), Object(c["createElementBlock"])("div", d, [Object(c["createVNode"])(T, { class: "login-form", ref_key: "loginFromRef", ref: y, model: s.value, rules: k.value, onSubmit: t[5] || (t[5] = Object(c["withModifiers"])(() => { }, ["prevent"])) }, { default: Object(c["withCtx"])(() => [p, Object(c["createVNode"])(r, { prop: "userName" }, { default: Object(c["withCtx"])(() => [Object(c["createVNode"])(l, { placeholder: "请输入账号", name: "userName", type: "text", modelValue: s.value.userName, "onUpdate:modelValue": t[0] || (t[0] = e => s.value.userName = e) }, { prepend: Object(c["withCtx"])(() => [Object(c["createElementVNode"])("span", u, [Object(c["createVNode"])(o, { icon: "user" })])]), _: 1 }, 8, ["modelValue"])]), _: 1 }), Object(c["createVNode"])(r, { prop: "password1" }, { default: Object(c["withCtx"])(() => [Object(c["createVNode"])(l, { placeholder: "请输入密码", name: "password", type: g.value, modelValue: s.value.password, "onUpdate:modelValue": t[1] || (t[1] = e => s.value.password = e) }, { prepend: Object(c["withCtx"])(() => [Object(c["createElementVNode"])("span", b, [Object(c["createVNode"])(o, { icon: "password" })])]), append: Object(c["withCtx"])(() => [Object(c["createElementVNode"])("span", i, [Object(c["createVNode"])(o, { onClick: C, icon: "password" === g.value ? "eye" : "eye-open" }, null, 8, ["icon"])])]), _: