heshaofeng
2026-03-09 557f7f6079c30cd6fe8d6005cea3d89468bbcd31
ÏîÄ¿´úÂë/WIDESEA_WMSClient/src/views/Login.vue
@@ -13,63 +13,25 @@
        <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>正在登录...</span>
        </el-button>
@@ -102,15 +64,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();
@@ -145,11 +107,9 @@
    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);
@@ -184,7 +144,7 @@
      userInfo,
      loginPress,
      openUrl,
     stationOptions,
      stationOptions,
      stationValue,
      handleStationChange,
    };
@@ -228,7 +188,7 @@
      &.station-select-item {
        padding-left: 0;
        .input-icon {
          margin-left: 20px;
          min-width: 20px;
@@ -367,9 +327,11 @@
    border: none;
    padding: 0;
    background: transparent;
    // ç§»é™¤æ‰€æœ‰hover、focus效果
    &:hover, &:focus, &.is-focus {
    &:hover,
    &:focus,
    &.is-focus {
      box-shadow: none !important;
      outline: none !important;
      border: none !important;
@@ -383,7 +345,7 @@
    font-size: 16px;
    color: #323233;
    cursor: pointer; // æ·»åŠ æŒ‡é’ˆæ˜¾ç¤ºä¸ºå¯ç‚¹å‡»
    &::placeholder {
      color: #c0c4cc;
    }
@@ -403,7 +365,9 @@
  }
  // ç§»é™¤æ•´ä¸ªç»„件上的任何hover和focus样式
  &:hover, &:focus, &.is-focus {
  &:hover,
  &:focus,
  &.is-focus {
    :deep(.el-input__wrapper) {
      box-shadow: none !important;
      outline: none !important;
@@ -417,35 +381,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 +418,9 @@
// ç§»é™¤æ‰€æœ‰input的focus和hover样式
input {
  &:hover, &:focus {
  &:hover,
  &:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
@@ -532,6 +498,7 @@
<style lang="less" scoped>
@media screen and (max-width: 700px) {
  .login-bg,
  .account-info,
  .app-link,