2023-02-28 01:16:49 +08:00
|
|
|
|
<!--
|
|
|
|
|
* @Author: Kane
|
|
|
|
|
* @Date: 2023-02-28 00:57:21
|
|
|
|
|
* @LastEditors: Kane
|
2023-03-02 16:59:48 +08:00
|
|
|
|
* @FilePath: /deskop_task_schedule/code/web/task_schedule/src/views/Login.vue
|
2023-02-28 01:16:49 +08:00
|
|
|
|
* @Description:
|
2023-02-28 19:58:03 +08:00
|
|
|
|
* 登录页面,路由默认指向这个页面
|
|
|
|
|
* 1、判断url中的参数,取得用户信息,根据用户的部门改变路由
|
2023-02-28 01:16:49 +08:00
|
|
|
|
*
|
|
|
|
|
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
2023-03-02 16:59:48 +08:00
|
|
|
|
<div class="page-wrapper">
|
|
|
|
|
<div class="login-wrapper">
|
|
|
|
|
<h1>登录</h1>
|
|
|
|
|
<el-form ref="loginForm">
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<label class="form-label">用户名</label>
|
|
|
|
|
<el-input type="text" v-model.trim.lazy="ui.account" placeholder="请输入P13账号或P09工号"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<label class="form-label">密码</label>
|
|
|
|
|
<el-input type="text" v-model.trim.lazy="ui.savedP13uid" placeholder="请输入P13密码"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" class="el-button-block" @click="savedP13uid">
|
|
|
|
|
登录
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<span>{{ ui.savedP13uid }}</span>
|
|
|
|
|
</div>
|
2023-03-01 17:31:20 +08:00
|
|
|
|
</div>
|
2023-02-28 01:16:49 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-02-28 09:30:02 +08:00
|
|
|
|
import { reactive } from "vue";
|
2023-02-28 18:48:14 +08:00
|
|
|
|
import { service as instance } from "@/utils/api/request";
|
2023-03-01 17:31:20 +08:00
|
|
|
|
import { getParamsFromURL } from "@/utils/api/url";
|
2023-03-02 16:59:48 +08:00
|
|
|
|
import { loadStaffInfo, saveStuffInfo } from "@/utils/api/localStorage";
|
2023-03-01 17:31:20 +08:00
|
|
|
|
|
2023-02-28 18:48:14 +08:00
|
|
|
|
|
|
|
|
|
const URL = "http://222.76.244.118:11001/admin-system/account/p13_account_check";
|
2023-02-28 09:30:02 +08:00
|
|
|
|
|
2023-02-28 01:16:49 +08:00
|
|
|
|
export default {
|
2023-02-28 09:30:02 +08:00
|
|
|
|
name: "LoginPage",
|
|
|
|
|
setup()
|
2023-02-28 01:16:49 +08:00
|
|
|
|
{
|
2023-02-28 09:30:02 +08:00
|
|
|
|
const ui = reactive({
|
2023-03-02 16:59:48 +08:00
|
|
|
|
account: "",
|
2023-02-28 18:48:14 +08:00
|
|
|
|
savedP13uid: "",
|
2023-03-01 17:31:20 +08:00
|
|
|
|
showNeedAccountTip: false,
|
2023-03-02 00:35:21 +08:00
|
|
|
|
showAccountErrorTip: false,
|
2023-02-28 09:30:02 +08:00
|
|
|
|
});
|
|
|
|
|
|
2023-03-02 16:59:48 +08:00
|
|
|
|
const savedP13uid = () =>
|
2023-03-01 17:31:20 +08:00
|
|
|
|
{
|
2023-03-02 16:59:48 +08:00
|
|
|
|
window.localStorage.setItem("stuff_account", ui.account);
|
|
|
|
|
|
|
|
|
|
ui.savedP13uid = window.localStorage.getItem("stuff_account") || "";
|
|
|
|
|
|
|
|
|
|
alert(ui.savedP13uid);
|
|
|
|
|
};
|
2023-02-28 01:16:49 +08:00
|
|
|
|
|
2023-03-02 16:59:48 +08:00
|
|
|
|
ui.savedP13uid = window.localStorage.getItem("stuff_account") || "";
|
|
|
|
|
|
|
|
|
|
// setInterval(() =>
|
|
|
|
|
// {
|
|
|
|
|
// window.location.reload();
|
|
|
|
|
// }, 5000);
|
|
|
|
|
|
|
|
|
|
return { ui, savedP13uid, };
|
2023-02-28 01:16:49 +08:00
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
2023-03-02 16:59:48 +08:00
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.page-wrapper {
|
2023-03-01 17:31:20 +08:00
|
|
|
|
box-sizing: border-box;
|
2023-03-02 00:35:21 +08:00
|
|
|
|
height: calc(100vh - 10mm);
|
|
|
|
|
width: calc(100vw - 10mm);
|
|
|
|
|
margin: 5mm;
|
2023-03-01 17:31:20 +08:00
|
|
|
|
border: 1px solid red;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
2023-03-02 16:59:48 +08:00
|
|
|
|
align-items: start;
|
|
|
|
|
padding-top: calc(100vh * 0.1);
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
font-size: 30px;
|
|
|
|
|
color: red;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.login-wrapper {
|
|
|
|
|
width: 320px;
|
|
|
|
|
// margin-top: 5cm auto auto auto;
|
|
|
|
|
padding: 5mm;
|
|
|
|
|
background-color: #cac2c27f;
|
|
|
|
|
backdrop-filter: blur(10px);
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
// backdrop-filter: ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-label {
|
|
|
|
|
display: block;
|
|
|
|
|
/* color: #fff; */
|
|
|
|
|
color: #344a5fef;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
// border: 1px solid red;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-input {
|
|
|
|
|
color: #344a5fef;
|
2023-03-01 17:31:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-03-02 16:59:48 +08:00
|
|
|
|
.el-button-block {
|
|
|
|
|
width: 100%;
|
|
|
|
|
margin-top: 20px;
|
2023-03-01 17:31:20 +08:00
|
|
|
|
}
|
|
|
|
|
</style>
|