diff --git a/code/web/task_schedule/src/data/cpicxim/StaffInfo.ts b/code/web/task_schedule/src/data/cpicxim/StaffInfo.ts new file mode 100644 index 0000000..067a313 --- /dev/null +++ b/code/web/task_schedule/src/data/cpicxim/StaffInfo.ts @@ -0,0 +1,92 @@ +/* + * @Author: Kane + * @Date: 2023-02-28 14:48:30 + * @LastEditors: Kane + * @FilePath: /task_schedule/src/data/cpicxim/StuffInfo.ts + * @Description: + * + * Copyright (c) ${2022} by Kane, All Rights Reserved. + */ + +class StaffInfo +{ + constructor( + p13uid: string, + staff_code: string, + staff_name: string, + department_code: string, + department_name: string, + section_office_code: string, + section_office_name: string + ) + { + this._stuffCode = staff_code; + this._stuffName = staff_name; + this._p13uid = p13uid; + this._department_code = department_code; + this._department_name = department_name; + this._section_office_code = section_office_code; + this._section_office_name = section_office_name; + } + + public get stuffCode(): string + { + return this._stuffCode; + } + + public set stuffCode(stuff_code: string) + { + this._stuffCode = stuff_code; + } + + public get stuffName(): string + { + return this._stuffName; + } + + public set stuffName(stuff_name: string) + { + this._stuffName = stuff_name; + } + + public get P13UID(): string + { + return this._p13uid; + } + + public set P13UID(p13uid: string) + { + this._p13uid = p13uid; + } + + public set departmentCode(department_code: string) + { + this._department_code = department_code; + } + + public get departmentCode() + { + return this._department_code; + } + + public set departmentName(department_name: string) + { + this._department_name = department_name; + } + + public get departmentName() + { + return this._department_name; + } + + private _stuffCode: string; + private _stuffName: string; + private _p13uid: string; + private _department_code: string; + private _department_name: string; + private _section_office_code: string; + private _section_office_name: string; +} + +export { StaffInfo }; + diff --git a/code/web/task_schedule/src/data/cpicxim/StuffInfo.ts b/code/web/task_schedule/src/data/cpicxim/StuffInfo.ts deleted file mode 100644 index c9dda9c..0000000 --- a/code/web/task_schedule/src/data/cpicxim/StuffInfo.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * @Author: Kane - * @Date: 2023-02-28 14:48:30 - * @LastEditors: Kane - * @FilePath: /deskop_task_schedule/code/web/task_schedule/src/data/cpicxim/StuffInfo.ts - * @Description: - * - * Copyright (c) ${2022} by Kane, All Rights Reserved. - */ - -class StuffInfo -{ - StuffInfo( - stuff_code: string = "", - stuff_name: string = "", - p13uid: string = "", - department_code: string = "", - department_name: string = "" - ) - { - this._stuffCode = stuff_code; - this._stuffName = stuff_name; - this._p13uid = p13uid; - this._department_code = department_code; - this._department_name = department_name; - } - - public get StuffCode(): string - { - return this._stuffCode; - } - - public set StuffCode(stuff_code: string) - { - this._stuffCode = stuff_code; - } - - public get StuffName(): string - { - return this._stuffName; - } - - public set StuffName(stuff_name: string) - { - this._stuffName = stuff_name; - } - - public get P13UID(): string - { - return this._p13uid; - } - - public set P13UID(p13uid: string) - { - this._p13uid = p13uid; - } - - private _stuffCode: string; - private _stuffName: string; - private _p13uid: string; - private _department_code: string; - private _department_name: string; -} - -export { StuffInfo }; - diff --git a/code/web/task_schedule/src/style.css b/code/web/task_schedule/src/style.css index 4bad796..03e0759 100644 --- a/code/web/task_schedule/src/style.css +++ b/code/web/task_schedule/src/style.css @@ -1,5 +1,4 @@ html { - /* background-color: #8796a6; */ background-image: url("./assets/img/bg/bg_01.jpg"); background-attachment: fixed; background-size: contain; @@ -8,11 +7,8 @@ html { } body { - /* background-color: #8796a6; */ width: 100vw; height: 100vh; - border: 1px solid green; - /* overflow: hidden; */ padding: 0px; margin: 0px; overflow: hidden; diff --git a/code/web/task_schedule/src/utils/account.ts b/code/web/task_schedule/src/utils/account.ts index 7c0b259..685e05e 100644 --- a/code/web/task_schedule/src/utils/account.ts +++ b/code/web/task_schedule/src/utils/account.ts @@ -12,7 +12,7 @@ import { service as instance } from "@/utils/api/request"; import { API_URL } from "@/utils/api/config"; interface LoginInfo { - account: string; + p13account: string; password: string; } diff --git a/code/web/task_schedule/src/utils/api/localStorage.ts b/code/web/task_schedule/src/utils/api/localStorage.ts index 4030266..39995f9 100644 --- a/code/web/task_schedule/src/utils/api/localStorage.ts +++ b/code/web/task_schedule/src/utils/api/localStorage.ts @@ -2,19 +2,17 @@ * @Author: Kane * @Date: 2023-02-28 09:26:45 * @LastEditors: Kane - * @FilePath: /deskop_task_schedule/code/web/task_schedule/src/utils/localStorage/localStorage.ts + * @FilePath: /task_schedule/src/utils/api/localStorage.ts * @Description: * * Copyright (c) ${2022} by Kane, All Rights Reserved. */ -import { StuffInfo } from "@/data/cpicxim/StuffInfo"; +import { StaffInfo } from "@/data/cpicxim/StaffInfo"; -const STUFF_ITEM = "STUFF_INFO"; +const STUFF_ITEM = "stuff_info"; -function loadStaffInfo(): StuffInfo +function loadStaffInfo(): StaffInfo { - const stuff = new StuffInfo(); - let obj = null; try @@ -26,18 +24,24 @@ function loadStaffInfo(): StuffInfo obj = {}; } - stuff.StuffCode = obj._stuffCode || ""; - stuff.StuffName = obj._stuffName || ""; - stuff.P13UID = obj._p13uid || ""; + const stuff = new StaffInfo( + obj._p13uid || "", + obj._stuffCode || "", + obj._stuffName || "", + obj._department_code || "", + obj._department_name || "", + obj._section_office_code || "", + obj._section_office_name || ""); + return stuff; } -function saveStuffInfo(stuff: StuffInfo) +function saveStaffInfo(stuff: StaffInfo) { const json = JSON.stringify(stuff); window.localStorage.setItem(STUFF_ITEM, json); }; -export { loadStaffInfo, saveStuffInfo }; \ No newline at end of file +export { loadStaffInfo, saveStaffInfo }; \ No newline at end of file diff --git a/code/web/task_schedule/src/views/Login.vue b/code/web/task_schedule/src/views/Login.vue index 56006eb..b68701d 100644 --- a/code/web/task_schedule/src/views/Login.vue +++ b/code/web/task_schedule/src/views/Login.vue @@ -2,7 +2,7 @@ * @Author: Kane * @Date: 2023-02-28 00:57:21 * @LastEditors: Kane - * @FilePath: /deskop_task_schedule/code/web/task_schedule/src/views/Login.vue + * @FilePath: /task_schedule/src/views/Login.vue * @Description: * 登录页面,路由默认指向这个页面 * 1、判断url中的参数,取得用户信息,根据用户的部门改变路由 @@ -12,7 +12,7 @@ @@ -81,12 +141,12 @@ export default { box-sizing: border-box; height: calc(100vh - 10mm); width: calc(100vw - 10mm); - margin: 5mm; - border: 1px solid red; + // border: 1px solid red; display: flex; - justify-content: center; - align-items: start; - padding-top: calc(100vh * 0.1); + flex-direction: column; + justify-content: start; + align-items: center; + span { font-size: 30px; @@ -95,9 +155,11 @@ export default { } .login-wrapper { + box-sizing: border-box; width: 320px; // margin-top: 5cm auto auto auto; - padding: 5mm; + margin-top: calc(100vh * 0.05); + padding: 10mm; background-color: #cac2c27f; backdrop-filter: blur(10px); border-radius: 5px;