diff --git a/code/web/task_schedule/package-lock.json b/code/web/task_schedule/package-lock.json index 16ded2b..7ea0907 100644 --- a/code/web/task_schedule/package-lock.json +++ b/code/web/task_schedule/package-lock.json @@ -21,7 +21,7 @@ "devDependencies": { "@babel/eslint-parser": "^7.22.15", "@rushstack/eslint-patch": "^1.5.1", - "@typescript-eslint/eslint-plugin": "^6.7.5", + "@typescript-eslint/eslint-plugin": "^6.8.0", "@vitejs/plugin-vue": "^4.4.0", "@vue/cli-plugin-eslint": "^5.0.8", "@vue/eslint-config-typescript": "^12.0.0", @@ -1578,16 +1578,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.5.tgz", - "integrity": "sha512-JhtAwTRhOUcP96D0Y6KYnwig/MRQbOoLGXTON2+LlyB/N35SP9j1boai2zzwXb7ypKELXMx3DVk9UTaEq1vHEw==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.8.0.tgz", + "integrity": "sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.7.5", - "@typescript-eslint/type-utils": "6.7.5", - "@typescript-eslint/utils": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5", + "@typescript-eslint/scope-manager": "6.8.0", + "@typescript-eslint/type-utils": "6.8.0", + "@typescript-eslint/utils": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -1609,34 +1609,34 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.5.tgz", - "integrity": "sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz", + "integrity": "sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5" + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.7.5.tgz", - "integrity": "sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.8.0.tgz", + "integrity": "sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.5.tgz", - "integrity": "sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz", + "integrity": "sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", + "@typescript-eslint/types": "6.8.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -1723,13 +1723,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-6.7.5.tgz", - "integrity": "sha512-Gs0qos5wqxnQrvpYv+pf3XfcRXW6jiAn9zE/K+DlmYf6FcpxeNYN0AIETaPR7rHO4K2UY+D0CIbDP9Ut0U4m1g==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-6.8.0.tgz", + "integrity": "sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.7.5", - "@typescript-eslint/utils": "6.7.5", + "@typescript-eslint/typescript-estree": "6.8.0", + "@typescript-eslint/utils": "6.8.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1746,22 +1746,22 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.7.5.tgz", - "integrity": "sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.8.0.tgz", + "integrity": "sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.5.tgz", - "integrity": "sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz", + "integrity": "sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5", + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1778,12 +1778,12 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.5.tgz", - "integrity": "sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz", + "integrity": "sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", + "@typescript-eslint/types": "6.8.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -1898,17 +1898,17 @@ "dev": true }, "node_modules/@typescript-eslint/utils": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-6.7.5.tgz", - "integrity": "sha512-pfRRrH20thJbzPPlPc4j0UNGvH1PjPlhlCMq4Yx7EGjV7lvEeGX0U6MJYe8+SyFutWgSHsdbJ3BXzZccYggezA==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-6.8.0.tgz", + "integrity": "sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.7.5", - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/typescript-estree": "6.7.5", + "@typescript-eslint/scope-manager": "6.8.0", + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/typescript-estree": "6.8.0", "semver": "^7.5.4" }, "engines": { @@ -1919,35 +1919,35 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.5.tgz", - "integrity": "sha512-GAlk3eQIwWOJeb9F7MKQ6Jbah/vx1zETSDw8likab/eFcqkjSD7BI75SDAeC5N2L0MmConMoPvTsmkrg71+B1A==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.8.0.tgz", + "integrity": "sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5" + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.7.5.tgz", - "integrity": "sha512-WboQBlOXtdj1tDFPyIthpKrUb+kZf2VroLZhxKa/VlwLlLyqv/PwUNgL30BlTVZV1Wu4Asu2mMYPqarSO4L5ZQ==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.8.0.tgz", + "integrity": "sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.5.tgz", - "integrity": "sha512-NhJiJ4KdtwBIxrKl0BqG1Ur+uw7FiOnOThcYx9DpOGJ/Abc9z2xNzLeirCG02Ig3vkvrc2qFLmYSSsaITbKjlg==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.8.0.tgz", + "integrity": "sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", - "@typescript-eslint/visitor-keys": "6.7.5", + "@typescript-eslint/types": "6.8.0", + "@typescript-eslint/visitor-keys": "6.8.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1964,12 +1964,12 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "6.7.5", - "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.5.tgz", - "integrity": "sha512-3MaWdDZtLlsexZzDSdQWsFQ9l9nL8B80Z4fImSpyllFC/KLqWQRdEcB+gGGO+N3Q2uL40EsG66wZLsohPxNXvg==", + "version": "6.8.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.8.0.tgz", + "integrity": "sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.7.5", + "@typescript-eslint/types": "6.8.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/code/web/task_schedule/package.json b/code/web/task_schedule/package.json index a52e60b..cfbce28 100644 --- a/code/web/task_schedule/package.json +++ b/code/web/task_schedule/package.json @@ -22,7 +22,7 @@ "devDependencies": { "@babel/eslint-parser": "^7.22.15", "@rushstack/eslint-patch": "^1.5.1", - "@typescript-eslint/eslint-plugin": "^6.7.5", + "@typescript-eslint/eslint-plugin": "^6.8.0", "@vitejs/plugin-vue": "^4.4.0", "@vue/cli-plugin-eslint": "^5.0.8", "@vue/eslint-config-typescript": "^12.0.0", diff --git a/code/web/task_schedule/src/layout/components/Header.vue b/code/web/task_schedule/src/layout/components/Header.vue index a52b204..6b625c2 100644 --- a/code/web/task_schedule/src/layout/components/Header.vue +++ b/code/web/task_schedule/src/layout/components/Header.vue @@ -92,7 +92,7 @@ export default { align-items: start; font: { - size: 0.5rem; + size: 0.75rem; } >*+* { diff --git a/code/web/task_schedule/src/utils/BIReport.ts b/code/web/task_schedule/src/utils/BIReport.ts new file mode 100644 index 0000000..ea88caa --- /dev/null +++ b/code/web/task_schedule/src/utils/BIReport.ts @@ -0,0 +1,76 @@ +/* + * @Author: Kane + * @Date: 2023-10-17 11:18:19 + * @LastEditors: Kane + * @FilePath: /task_schedule/src/utils/api/BIReport.ts + * @Description: BI报表相关的代码 + * + * Copyright (c) ${2023} by Kane, All Rights Reserved. + */ +import { service as instance } from "./api/request.js"; +import { API_URL } from "./api/config.js"; +import { type AxiosResponse } from "axios"; +interface BIReportType +{ + reportTypeCode: number; + reportTypeName: string; +} + +interface ImportBIReportRequest +{ + filePath: string, + reportType: number, + hasCaption: boolean, + sheetIndex: number, +} + +interface ImportBIReportResponse +{ + success: boolean, + message: string, + importedCount: number, +} + +/** + * + * @param request 请求参数 + * @param handler 调用者提供的请求结果处理函数 + */ +function importBIReport( request: ImportBIReportRequest, handler: any ): void +{ + const importResponse: ImportBIReportResponse = { + success: false, + message: "", + importedCount: 0, + }; + + instance.request({ + url: API_URL.URL_IMPORT_REPORT, + method: "post", + data: request, + }) + .then(( response: AxiosResponse ): any => + { + const data: ImportBIReportResponse = response.data; + + importResponse.success = data.success ?? false; + importResponse.message = data.message ?? ""; + importResponse.importedCount = data.importedCount ?? 0; + + handler( importResponse, null ); + }) + .catch(( error: any ): any => + { + importResponse.message = "请求导入报表错误,请查看控制台!"; + console.log( error ); + + handler( importResponse, error ); + }); +} + +export { + type BIReportType, + type ImportBIReportRequest, + type ImportBIReportResponse, + importBIReport +}; diff --git a/code/web/task_schedule/src/utils/api/config.ts b/code/web/task_schedule/src/utils/api/config.ts index cad62b3..7380490 100644 --- a/code/web/task_schedule/src/utils/api/config.ts +++ b/code/web/task_schedule/src/utils/api/config.ts @@ -44,7 +44,12 @@ const API_URL = { // 删除获奖人员 URL_DEL_REWARD_TELSALER: "http://10.39.0.41:8081/desktop_archievement_backend/rewards/delete_telsaler_reward.do", // URL_ADD_REWARD_TELSALER: "http://222.76.244.118:11101/desktop_archievement_backend/rewards/delete_telsaler_reward.do", - + // 上传文件 + URL_UPLOAD_FILE: "http://10.39.0.41:8081/desktop_archievement_backend/file/file-upload.do", + // URL_UPLOAD_FILE: "http://222.76.244.118:11101/desktop_archievement_backend/file/file-upload.do", + // 导入报表 + URL_IMPORT_REPORT: "http://10.39.0.41:8081/desktop_archievement_backend/import_bi_data/excel.do", + // URL_IMPORT_REPORT: "http://222.76.244.118:11101/desktop_archievement_backend/import_bi_data/excel.do", }; export { API_URL }; diff --git a/code/web/task_schedule/src/utils/fileUpload.ts b/code/web/task_schedule/src/utils/fileUpload.ts index e0dbb76..1725899 100644 --- a/code/web/task_schedule/src/utils/fileUpload.ts +++ b/code/web/task_schedule/src/utils/fileUpload.ts @@ -14,3 +14,7 @@ interface FileUploadResponse message: string; fileList: string[]; } + +export { + type FileUploadResponse +}; diff --git a/code/web/task_schedule/src/views/data/DataManagement.vue b/code/web/task_schedule/src/views/data/DataManagement.vue index 6e42d8a..412b808 100644 --- a/code/web/task_schedule/src/views/data/DataManagement.vue +++ b/code/web/task_schedule/src/views/data/DataManagement.vue @@ -9,7 +9,7 @@ --> + diff --git a/code/web/task_schedule/src/views/data/bi/DepartmentArchievementView.vue b/code/web/task_schedule/src/views/data/bi/DepartmentArchievementView.vue new file mode 100644 index 0000000..4a37553 --- /dev/null +++ b/code/web/task_schedule/src/views/data/bi/DepartmentArchievementView.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/code/web/task_schedule/src/views/data/bi/TelsalerAttachingRateView.vue b/code/web/task_schedule/src/views/data/bi/TelsalerAttachingRateView.vue new file mode 100644 index 0000000..485a9d4 --- /dev/null +++ b/code/web/task_schedule/src/views/data/bi/TelsalerAttachingRateView.vue @@ -0,0 +1,139 @@ + + + + diff --git a/code/web/task_schedule/src/views/data/bi/TelsalerRenewalRateView.vue b/code/web/task_schedule/src/views/data/bi/TelsalerRenewalRateView.vue new file mode 100644 index 0000000..1d70cad --- /dev/null +++ b/code/web/task_schedule/src/views/data/bi/TelsalerRenewalRateView.vue @@ -0,0 +1,30 @@ +src/views/data/bi/TelsalerAttachingRateView.vue + + + diff --git a/web.lnk b/web.lnk new file mode 100644 index 0000000..a0d4580 Binary files /dev/null and b/web.lnk differ