<!--
 * @Author: Kane
 * @Date: 2023-02-28 00:57:21
 * @LastEditors: Kane
 * @FilePath: /task_schedule/src/views/Login.vue
 * @Description: 
 * 登录页面，路由默认指向这个页面
 * 1、判断url中的参数，取得用户信息，根据用户的部门改变路由
 * 
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
-->
<template>
    <div class="page-wrap">
        <span v-show="ui.showNeedAccountTip">请在链接中提供用户的P13账号或P09工号。</span>
        <span v-show="ui.showAccountErrorTip">P13账号或P09工号错误，请核实！</span>
    </div>
</template>

<script lang="ts">
import { reactive } from "vue";
import { service as instance } from "@/utils/api/request";
import { getParamsFromURL } from "@/utils/api/url";


const URL = "http://222.76.244.118:11001/admin-system/account/p13_account_check";

export default {
    name: "LoginPage",
    setup()
    {
        const ui = reactive({
            p13uid: "",
            savedP13uid: "",
            showNeedAccountTip: false,
            showAccountErrorTip: false,
        });

        //根据url获取用户账号
        const urlParams = getParamsFromURL(window.location.href);

        if (urlParams.account != undefined)
        {
            //根据账号查询员工信息
        }
        else
        {
            ui.showNeedAccountTip = true;
        }

        return { ui, };
    },
};
</script>

<style scoped>
.page-wrap {
    box-sizing: border-box;
    height: calc(100vh - 10mm);
    width: calc(100vw - 10mm);
    margin: 5mm;
    border: 1px solid red;
    display: flex;
    justify-content: center;
    align-items: center;
}

span {
    font-size: 30px;
    color: red;
}
</style>