From 9aae2af6f3937a7d99ec619b51f457002cef969f Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 14:29:37 +0800
Subject: [PATCH] 档案管理-添加导出功能
---
src/views/login.vue | 28 +++++++++++-----------------
1 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/src/views/login.vue b/src/views/login.vue
index a6173d0..5300637 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -10,7 +10,7 @@
size="large"
auto-complete="off"
placeholder="璐﹀彿"
- @input="deptListSearch"
+ @input="getUserLoginFacotryList"
>
<template #prefix><el-icon><User /></el-icon></template>
</el-input>
@@ -77,7 +77,7 @@
import Cookies from "js-cookie"
import { encrypt, decrypt } from "@/utils/jsencrypt"
import useUserStore from '@/store/modules/user'
-import {userDeptList} from "@/api/system/user.js"
+import {userLoginFacotryList} from "@/api/system/user.js"
const title = import.meta.env.VITE_APP_TITLE
const userStore = useUserStore()
@@ -86,8 +86,8 @@
const { proxy } = getCurrentInstance()
const loginForm = ref({
- username: "admin",
- password: "admin123",
+ username: "",
+ password: "",
rememberMe: false,
currentFatoryId:'',
})
@@ -118,16 +118,9 @@
if (valid) {
loading.value = true
// 鍕鹃�変簡闇�瑕佽浣忓瘑鐮佽缃湪 cookie 涓缃浣忕敤鎴峰悕鍜屽瘑鐮�
- if (loginForm.value.rememberMe) {
- Cookies.set("username", loginForm.value.username, { expires: 30 })
- Cookies.set("password", encrypt(loginForm.value.password), { expires: 30 })
- Cookies.set("rememberMe", loginForm.value.rememberMe, { expires: 30 })
- } else {
- // 鍚﹀垯绉婚櫎
- Cookies.remove("username")
- Cookies.remove("password")
- Cookies.remove("rememberMe")
- }
+ Cookies.set("username", loginForm.value.username, { expires: 30 })
+ Cookies.set("password", encrypt(loginForm.value.password), { expires: 30 })
+ Cookies.set("rememberMe", loginForm.value.rememberMe, { expires: 30 })
userStore.loginCheckFactory(loginForm.value).then(res => {
const query = route.query
const otherQueryParams = Object.keys(query).reduce((acc, cur) => {
@@ -169,20 +162,20 @@
}
}
-function deptListSearch() {
+function getUserLoginFacotryList() {
if(loginForm.value.username){
- userDeptList({userName:loginForm.value.username}).then(res => {
+ userLoginFacotryList({userName:loginForm.value.username}).then(res => {
console.log('res', res)
factoryList.value = res.data
})
}else {
factoryList.value = []
}
-
}
getCode()
getCookie()
+getUserLoginFacotryList()
</script>
<style lang='scss' scoped>
@@ -211,6 +204,7 @@
height: 500px;
padding: 40px;
z-index: 1;
+ box-shadow: 0 0 5px 1px #ccc;
.el-input {
height: 40px;
input {
--
Gitblit v1.9.3