From 21deb676625eef63caed1caafb2b93cb09e153af Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 09 Feb 2026 15:57:36 +0800
Subject: [PATCH] feat: 免密登陆

---
 applications/drone-command/src/page/login/userlogin.vue |   76 ++-----------------------------------
 1 files changed, 5 insertions(+), 71 deletions(-)

diff --git a/applications/drone-command/src/page/login/userlogin.vue b/applications/drone-command/src/page/login/userlogin.vue
index ddeaf20..5759c1d 100644
--- a/applications/drone-command/src/page/login/userlogin.vue
+++ b/applications/drone-command/src/page/login/userlogin.vue
@@ -7,24 +7,12 @@
     :model="loginForm"
     label-width="0"
   >
-    <!-- <el-form-item v-if="tenantMode" prop="tenantId">
-      <el-input
-        @keyup.enter="handleLogin"
-        v-model="loginForm.tenantId"
-        auto-complete="off"
-        :placeholder="$t('login.tenantId')"
-      >
-        <template #prefix>
-          <i class="icon-quanxian" />
-        </template>
-      </el-input>
-    </el-form-item> -->
     <el-form-item prop="username">
       <el-input
         @keyup.enter="handleLogin"
         v-model="loginForm.username"
         auto-complete="off"
-        :placeholder="$t('login.username')"
+        placeholder="请输入账号"
       >
         <template #prefix>
           <i class="icon-yonghu" />
@@ -37,7 +25,7 @@
         :type="passwordType"
         v-model="loginForm.password"
         auto-complete="off"
-        :placeholder="$t('login.password')"
+        placeholder="请输入密码"
       >
         <template #suffix>
           <i class="el-icon-view el-input__icon" @click="showPassword" />
@@ -47,49 +35,15 @@
         </template>
       </el-input>
     </el-form-item>
-    <!-- <el-form-item v-if="this.website.captchaMode" prop="code">
-      <el-row :span="24">
-        <el-col :span="16">
-          <el-input
-            @keyup.enter="handleLogin"
-            v-model="loginForm.code"
-            auto-complete="off"
-            :placeholder="$t('login.code')"
-          >
-            <template #prefix>
-              <i class="icon-yanzhengma" />
-            </template>
-          </el-input>
-        </el-col>
-        <el-col :span="8">
-          <div class="login-code">
-            <img :src="loginForm.image" class="login-code-img" @click="refreshCode" />
-          </div>
-        </el-col>
-      </el-row>
-    </el-form-item> -->
     <el-form-item>
       <el-button
         style="width: 100%;"
         type="primary"
         @click.prevent="handleLogin"
         :class="this.registerMode ? 'login-submit' : 'btn-submit'"
-        >{{ $t('login.submit') }}
+        >登 录
       </el-button>
-      <!-- <el-button
-        v-if="this.registerMode"
-        type="danger"
-        @click.prevent="handleRegister"
-        class="register-submit"
-        >{{ $t('login.register') }}
-      </el-button> -->
     </el-form-item>
-    <!-- <el-dialog title="用户信息选择" append-to-body v-model="userBox" width="350px">
-      <avue-form :option="userOption" v-model="userForm" @submit="submitLogin" />
-    </el-dialog>
-    <el-dialog title="用户信息注册" append-to-body v-model="registerBox" width="350px">
-      <avue-form :option="registerOption" v-model="registerForm" @submit="submitRegister" />
-    </el-dialog> -->
   </el-form>
 </template>
 
@@ -338,30 +292,10 @@
     handleLogin() {
       this.$refs.loginForm.validate(valid => {
         if (valid) {
-          const loading = this.$loading({
-            lock: true,
-            text: '登录中,请稍后',
-            background: 'rgba(0, 0, 0, 0.7)',
-          });
-          this.$store
-            .dispatch('LoginByUsername', this.loginForm)
+          const loading = this.$loading({ lock: true, text: '登录中,请稍后', background: 'rgba(0, 0, 0, 0.7)' });
+          this.$store.dispatch('LoginByUsername', this.loginForm)
             .then(() => {
-              if (this.website.switchMode) {
-                const deptId = this.userInfo.dept_id;
-                const roleId = this.userInfo.role_id;
-                if (deptId.includes(',') || roleId.includes(',')) {
-                  this.loginForm.deptId = deptId;
-                  this.loginForm.roleId = roleId;
-                  this.userBox = true;
-                  this.$store.dispatch('LogOut').then(() => {
-                    loading.close();
-                  });
-                  return false;
-                }
-              }
               loading.close();
-              //加载工作流路由集
-              this.loadFlowRoutes();
               this.$router.push(this.tagWel);
             })
             .catch(err => {

--
Gitblit v1.9.3