71 lines
1.7 KiB
Vue
Raw Normal View History

2023-02-28 01:16:49 +08:00
<!--
* @Author: Kane
* @Date: 2023-02-28 00:57:21
* @LastEditors: Kane
2023-03-02 00:35:21 +08:00
* @FilePath: /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-01 17:31:20 +08:00
<div class="page-wrap">
<span v-show="ui.showNeedAccountTip">请在链接中提供用户的P13账号或P09工号</span>
2023-03-02 00:35:21 +08:00
<span v-show="ui.showAccountErrorTip">P13账号或P09工号错误请核实</span>
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-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({
p13uid: "",
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-01 17:31:20 +08:00
//根据url获取用户账号
const urlParams = getParamsFromURL(window.location.href);
2023-02-28 18:48:14 +08:00
2023-03-01 18:47:16 +08:00
if (urlParams.account != undefined)
{
//根据账号查询员工信息
}
else
2023-03-01 17:31:20 +08:00
{
ui.showNeedAccountTip = true;
}
2023-02-28 01:16:49 +08:00
2023-02-28 19:58:03 +08:00
return { ui, };
2023-02-28 01:16:49 +08:00
},
};
</script>
2023-03-01 17:31:20 +08:00
<style scoped>
.page-wrap {
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;
align-items: center;
}
span {
font-size: 30px;
color: red;
}
</style>