From 6f0ffcf4a6e75ac3a76c6cfd75e02de3a17d46e3 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 31 三月 2026 10:05:32 +0800
Subject: [PATCH] 同库区移库
---
项目代码/WIDESEA_WMSClient/src/views/Login.vue | 133 +++++++++++++++++++++-----------------------
1 files changed, 63 insertions(+), 70 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Login.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Login.vue"
index d810f15..527ecfe 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Login.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/views/Login.vue"
@@ -13,65 +13,30 @@
<div class="login-text-small">WELCOME TO LOGIN</div>
<div class="item">
<div class="input-icon el-icon-user"></div>
- <input
- type="text"
- v-focus
- v-model="userInfo.userName"
- placeholder="璇疯緭鍏ヨ处鍙�"
- />
+ <input type="text" v-focus v-model="userInfo.userName" placeholder="璇疯緭鍏ヨ处鍙�" />
</div>
<div class="item">
<div class="input-icon el-icon-lock"></div>
- <input
- type="password"
- v-focus
- v-model="userInfo.password"
- placeholder="璇疯緭鍏ュ瘑鐮�"
- />
+ <input type="password" v-focus v-model="userInfo.password" placeholder="璇疯緭鍏ュ瘑鐮�" />
</div>
- <div class="item station-select-item">
+ <div class="item station-select-item">
<div class="input-icon el-icon-lock"></div>
- <el-select
- v-model="stationValue"
- placeholder="閫夋嫨绔欏彴"
- class="station-select"
- @change="handleStationChange"
- >
- <el-option
- v-for="item in stationOptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
+ <el-select v-model="stationValue" placeholder="閫夋嫨绔欏彴" class="station-select" @change="handleStationChange">
+ <el-option v-for="item in stationOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
- </div>
-
-
- <div class="item">
- <div class="input-icon el-icon-mobile"></div>
- <input
- v-focus
- type="text"
- v-model="userInfo.verificationCode"
- placeholder="杈撳叆楠岃瘉鐮�"
- />
- <div class="code" @click="getVierificationCode">
- <img v-show="codeImgSrc != ''" :src="codeImgSrc" />
- </div>
</div>
</div>
<div class="loging-btn">
- <el-button
- size="large"
- :loading="loading"
- color="#3a6cd1"
- :dark="true"
- @click="login"
- long
- >
+ <el-button size="large" :loading="loading" color="#3a6cd1" :dark="true" @click="login" long>
<span v-if="!loading">鐧诲綍</span>
<span v-else>姝e湪鐧诲綍...</span>
+ </el-button>
+ </div>
+ <!-- 鏂板锛氫慨鏀瑰瘑鐮佹寜閽紙鏍峰紡涓庣櫥褰曢〉缁熶竴锛� -->
+ <div class="change-pwd-btn">
+ <el-button size="large" type="text" @click="goChangePassword" long>
+ <span style="color: #3a6cd1; font-size: 13px;">淇敼瀵嗙爜</span>
</el-button>
</div>
</div>
@@ -102,15 +67,15 @@
const userInfo = reactive({
userName: "",
password: "",
- verificationCode: "",
+ verificationCode: "1234",
UUID: undefined,
});
- const stationValue = ref("");
- const stationOptions = reactive([
+ const stationValue = ref("");
+ const stationOptions = reactive([
{ label: "绔欏彴2", value: "2-1" },
{ label: "绔欏彴3", value: "3-1" },
]);
- // 鍒濆鍖栫珯鍙板��
+ // 鍒濆鍖栫珯鍙板��
onMounted(() => {
// 浠庢湰鍦板瓨鍌ㄥ姞杞戒繚瀛樼殑绔欏彴鍊�
const savedStation = stationManager.getStation();
@@ -142,14 +107,17 @@
let $message = appContext.config.globalProperties.$message;
let router = useRouter();
+ // 鏂板锛氳烦杞埌淇敼瀵嗙爜椤甸潰
+ const goChangePassword = () => {
+ router.push({ path: "/change-password" });
+ };
+
const login = () => {
if (!userInfo.userName) return $message.error("璇疯緭鍏ョ敤鎴峰悕");
if (!userInfo.password) return $message.error("璇疯緭鍏ュ瘑鐮�");
- if (!userInfo.verificationCode) {
- return $message.error("璇疯緭鍏ラ獙璇佺爜");
- }
+
- // 纭繚绔欏彴鍊煎凡淇濆瓨
+ // 纭繚绔欏彴鍊煎凡淇濆瓨
if (stationValue.value) {
stationManager.saveStation(stationValue.value);
store.commit("setStation", stationValue.value);
@@ -162,7 +130,7 @@
getVierificationCode();
return $message.error(result.message);
}
- $message.success("鐧诲綍鎴愬姛,姝e湪璺宠浆!");
+ $message.success(result.message);
store.commit("setUserInfo", result.data);
router.push({ path: "/" });
@@ -184,9 +152,10 @@
userInfo,
loginPress,
openUrl,
- stationOptions,
+ stationOptions,
stationValue,
handleStationChange,
+ goChangePassword // 鏂板锛氭毚闇茶烦杞柟娉�
};
},
directives: {
@@ -228,7 +197,7 @@
&.station-select-item {
padding-left: 0;
-
+
.input-icon {
margin-left: 20px;
min-width: 20px;
@@ -307,6 +276,22 @@
}
}
+// 鏂板锛氫慨鏀瑰瘑鐮佹寜閽牱寮忥紙涓庣櫥褰曢〉椋庢牸缁熶竴锛�
+.change-pwd-btn {
+ width: 400px;
+ margin-top: 15px;
+ text-align: center;
+
+ button {
+ font-size: 13px;
+ padding: 0;
+
+ &:hover {
+ color: #1850c1 !important;
+ }
+ }
+}
+
.login-text {
font-weight: bolder;
font-size: 20px;
@@ -367,9 +352,11 @@
border: none;
padding: 0;
background: transparent;
-
+
// 绉婚櫎鎵�鏈塰over銆乫ocus鏁堟灉
- &:hover, &:focus, &.is-focus {
+ &:hover,
+ &:focus,
+ &.is-focus {
box-shadow: none !important;
outline: none !important;
border: none !important;
@@ -383,7 +370,7 @@
font-size: 16px;
color: #323233;
cursor: pointer; // 娣诲姞鎸囬拡鏄剧ず涓哄彲鐐瑰嚮
-
+
&::placeholder {
color: #c0c4cc;
}
@@ -403,7 +390,9 @@
}
// 绉婚櫎鏁翠釜缁勪欢涓婄殑浠讳綍hover鍜宖ocus鏍峰紡
- &:hover, &:focus, &.is-focus {
+ &:hover,
+ &:focus,
+ &.is-focus {
:deep(.el-input__wrapper) {
box-shadow: none !important;
outline: none !important;
@@ -417,35 +406,35 @@
border: 1px solid #ececec;
border-radius: 5px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-
+
.el-select-dropdown__item {
height: 45px;
line-height: 45px;
font-size: 16px;
color: #323233;
padding: 0 20px;
-
+
&:hover {
background-color: #f5f7fa;
}
-
+
&.selected {
color: #3a6cd1;
font-weight: normal;
background-color: #f0f7ff;
}
}
-
+
// 闅愯棌婊氬姩鏉℃垨璋冩暣婊氬姩鏉℃牱寮�
&::-webkit-scrollbar {
width: 6px;
}
-
+
&::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
-
+
&::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
@@ -454,7 +443,9 @@
// 绉婚櫎鎵�鏈塱nput鐨刦ocus鍜宧over鏍峰紡
input {
- &:hover, &:focus {
+
+ &:hover,
+ &:focus {
border: none !important;
outline: none !important;
box-shadow: none !important;
@@ -532,6 +523,7 @@
<style lang="less" scoped>
@media screen and (max-width: 700px) {
+
.login-bg,
.account-info,
.app-link,
@@ -550,7 +542,8 @@
}
.form-user,
- .loging-btn {
+ .loging-btn,
+ .change-pwd-btn { // 鏂板锛氬搷搴斿紡閫傞厤淇敼瀵嗙爜鎸夐挳
width: 100%;
}
}
--
Gitblit v1.9.3