开始设计业绩组件。
This commit is contained in:
parent
3afb4ca1ff
commit
19df478f63
@ -10,4 +10,4 @@
|
||||
@import url("./public/reset.scss");
|
||||
@import url("./public/normalize.scss");
|
||||
@import url("../font/fonts.css");
|
||||
@import url("./public/color.scss");
|
||||
// @import url("./public/color.scss");
|
@ -2,14 +2,14 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-15 09:25:52
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-03-03 09:58:49
|
||||
* @LastEditTime: 2023-03-03 15:50:08
|
||||
* @FilePath: /task_schedule/src/main.js
|
||||
* @Description:
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
import { createApp } from 'vue';
|
||||
import { router } from "./router/index.js";
|
||||
import { router } from "./router/index";
|
||||
import store from "@/store/index";
|
||||
|
||||
import App from './App.vue';
|
||||
|
@ -29,6 +29,12 @@ const routes = [
|
||||
hidden: true,
|
||||
component: () => import("@/views/Public.vue"),
|
||||
},
|
||||
{
|
||||
path: "/desktop_archievement",
|
||||
name: "DesktopArchievement",
|
||||
hidden: true,
|
||||
component: () => import("@/views/DesktopArchievement.vue"),
|
||||
},
|
||||
];
|
||||
|
||||
const router = createRouter(
|
||||
@ -39,9 +45,9 @@ const router = createRouter(
|
||||
);
|
||||
|
||||
//路由守卫
|
||||
router.beforeEach((to) =>
|
||||
{
|
||||
// router.beforeEach((to) =>
|
||||
// {
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
export { router };
|
@ -1,9 +1,7 @@
|
||||
html {
|
||||
background-image: url("./assets/img/bg/bg_01.jpg");
|
||||
background-image: url("@/assets/img/bg/bg_01.jpg");
|
||||
background-attachment: fixed;
|
||||
background-size: contain;
|
||||
/* background-position: center; */
|
||||
/* background-repeat: no-repeat; */
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -8,8 +8,8 @@
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
*/
|
||||
|
||||
import { service as instance } from "@/utils/api/request";
|
||||
import { API_URL } from "@/utils/api/config";
|
||||
import { service as instance } from "./api/request";
|
||||
import { API_URL } from "./api/config";
|
||||
interface LoginInfo
|
||||
{
|
||||
p13account: string;
|
||||
|
44
code/web/task_schedule/src/views/DesktopArchievement.vue
Normal file
44
code/web/task_schedule/src/views/DesktopArchievement.vue
Normal file
@ -0,0 +1,44 @@
|
||||
<!--
|
||||
* @Author: Kane
|
||||
* @Date: 2023-03-03 14:38:07
|
||||
* @LastEditors: Kane
|
||||
* @FilePath: /task_schedule/src/views/DesktopArchievement.vue
|
||||
* @Description: 显示在桌面上,展示任务量与业绩的view
|
||||
*
|
||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
||||
-->
|
||||
<template>
|
||||
<div class="view-wrapper"></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { reactive, onBeforeMount } from "vue";
|
||||
import { StaffInfo } from "@/data/cpicxim/StaffInfo";
|
||||
import { loadStaffInfo } from "@/utils/api/localStorage";
|
||||
export default {
|
||||
name: "DesktopArchievement",
|
||||
setup()
|
||||
{
|
||||
const staffInfo: StaffInfo = loadStaffInfo();
|
||||
|
||||
onBeforeMount(() =>
|
||||
{
|
||||
//检查存储的登录信息,不存在则返回登录页面
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.view_wrapper {
|
||||
box-sizing: border-box;
|
||||
height: calc(100vh - 10mm);
|
||||
width: calc(100vw - 10mm);
|
||||
border: 1px solid red;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
body {
|
||||
background-color: $color-bg-01;
|
||||
}
|
||||
</style>
|
@ -36,7 +36,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { reactive, onBeforeMount } from "vue";
|
||||
import { reactive, onBeforeMount, } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { loadStaffInfo, saveStaffInfo } from "@/utils/api/localStorage";
|
||||
import { login } from "@/utils/account";
|
||||
import { ElMessage } from "element-plus";
|
||||
@ -46,6 +47,9 @@ export default {
|
||||
name: "LoginPage",
|
||||
setup()
|
||||
{
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const ui = reactive({
|
||||
account: "",
|
||||
password: "",
|
||||
@ -67,7 +71,7 @@ export default {
|
||||
};
|
||||
|
||||
login(info)
|
||||
.then((response) =>
|
||||
.then((response: any) =>
|
||||
{
|
||||
const data = response.data || { success: false, };
|
||||
|
||||
@ -93,6 +97,7 @@ export default {
|
||||
saveStaffInfo(staffInfo);
|
||||
|
||||
//跳转路由
|
||||
router.push("/desktop_archievement");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -105,7 +110,7 @@ export default {
|
||||
|
||||
console.log(data);
|
||||
})
|
||||
.catch((error) =>
|
||||
.catch((error: any) =>
|
||||
{
|
||||
debugger;
|
||||
console.log(`登录失败,返回信息:${error}`);
|
||||
@ -116,13 +121,17 @@ export default {
|
||||
{
|
||||
const staffInfo = loadStaffInfo();
|
||||
|
||||
if (staffInfo.P13UID)
|
||||
//判断是否已经记录了P13账号,有则提示已登录,然后跳转路由
|
||||
if (staffInfo.P13UID != "")
|
||||
{
|
||||
ElMessage({
|
||||
message: `已登录账号:${staffInfo.stuffName}`,
|
||||
type: "success",
|
||||
center: true,
|
||||
});
|
||||
|
||||
//跳转路由
|
||||
router.push("/desktop_archievement");
|
||||
}
|
||||
});
|
||||
|
||||
@ -157,13 +166,14 @@ export default {
|
||||
box-sizing: border-box;
|
||||
width: 320px;
|
||||
// margin-top: 5cm auto auto auto;
|
||||
margin-top: calc(100vh * 0.05);
|
||||
margin-top: calc(100vh * 0.075);
|
||||
padding: 10mm;
|
||||
background-color: #cac2c27f;
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 5px;
|
||||
// backdrop-filter: ;
|
||||
|
||||
|
||||
h1 {
|
||||
font-family: "FZ-ZHUOHEI";
|
||||
font-size: 70px;
|
||||
@ -200,4 +210,4 @@ export default {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -9,20 +9,21 @@
|
||||
*/
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES6",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"useDefineForClassFields": true,
|
||||
"module": "ES2015",
|
||||
"target": "ES6",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"sourceMap": true,
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"esModuleInterop": false,
|
||||
"baseUrl": "./", // paths 路径解析起点
|
||||
"paths": {
|
||||
"paths": { // 别名路径设置
|
||||
"@/*": [
|
||||
"src/*"
|
||||
] // 别名路径设置
|
||||
],
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
@ -37,5 +38,7 @@
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"*.d.ts",
|
||||
"src/router/index.js",
|
||||
"src/router/index.js",
|
||||
],
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2023-02-15 09:25:52
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2023-03-03 09:44:10
|
||||
* @LastEditTime: 2023-03-03 15:52:58
|
||||
* @FilePath: /task_schedule/vite.config.js
|
||||
* @Description:
|
||||
*
|
||||
@ -36,5 +36,12 @@ export default defineConfig((command, mode) =>
|
||||
define: {
|
||||
__APP_ENV__: env.APP_ENV,
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: `@import "./src/assets/css/public/color.scss";`
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
@ -4,7 +4,6 @@ module.exports = {
|
||||
browser: true,
|
||||
es2021: true,
|
||||
},
|
||||
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
|
87
code/测试/code_test/package-lock.json
generated
87
code/测试/code_test/package-lock.json
generated
@ -8,6 +8,9 @@
|
||||
"name": "code_test",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"axios": "^1.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||
"@typescript-eslint/parser": "^5.54.0",
|
||||
@ -401,6 +404,11 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/available-typed-arrays": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
|
||||
@ -410,6 +418,16 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.3.4.tgz",
|
||||
"integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
@ -497,6 +515,17 @@
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@ -553,6 +582,14 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dir-glob": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/dir-glob/-/dir-glob-3.0.1.tgz",
|
||||
@ -1180,6 +1217,19 @@
|
||||
"integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/for-each": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmmirror.com/for-each/-/for-each-0.3.3.tgz",
|
||||
@ -1189,6 +1239,19 @@
|
||||
"is-callable": "^1.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
|
||||
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
@ -1765,6 +1828,25 @@
|
||||
"node": ">=8.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
|
||||
@ -1967,6 +2049,11 @@
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.0.tgz",
|
||||
|
@ -1,21 +1,26 @@
|
||||
{
|
||||
"name": "code_test",
|
||||
"version": "1.0.0",
|
||||
"description": "用于测试前端的typescript代码",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Kane",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||
"@typescript-eslint/parser": "^5.54.0",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-config-standard-with-typescript": "^34.0.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-n": "^15.6.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"typescript": "^4.9.5"
|
||||
}
|
||||
"name": "code_test",
|
||||
"version": "1.0.0",
|
||||
"description": "用于测试前端的typescript代码",
|
||||
"main": "index.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "ts-node-esm index.ts"
|
||||
},
|
||||
"author": "Kane",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||
"@typescript-eslint/parser": "^5.54.0",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-config-standard-with-typescript": "^34.0.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-n": "^15.6.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.3.4"
|
||||
}
|
||||
}
|
||||
|
||||
|
18
code/测试/code_test/src/utils/api/request.ts
Normal file
18
code/测试/code_test/src/utils/api/request.ts
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
import axios from "axios";
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: "",
|
||||
timeout: 10000,
|
||||
});
|
||||
|
||||
service.interceptors.request.use(
|
||||
(config) =>
|
||||
{
|
||||
return config;
|
||||
},
|
||||
(error) =>
|
||||
{
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
@ -16,6 +16,12 @@
|
||||
"lib": [
|
||||
"ESNext",
|
||||
],
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
],
|
||||
},
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
|
Loading…
x
Reference in New Issue
Block a user