commit 86a383e7196bbb293da3d046367fb8938b34b215 Author: qubiaobiao <3294694717@qq.com> Date: Fri Mar 27 17:33:34 2026 +0800 北斗启航科技教育平台管理系统 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8ee54e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +*.tsbuildinfo diff --git a/README.md b/README.md new file mode 100644 index 0000000..47c2b36 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# account-manager + +This template should help get you started developing with Vue 3 in Vite. + +## Recommended IDE Setup + +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur). + +## Customize configuration + +See [Vite Configuration Reference](https://vitejs.dev/config/). + +## Project Setup + +```sh +npm install +``` + +### Compile and Hot-Reload for Development + +```sh +npm run dev +``` + +### Compile and Minify for Production + +```sh +npm run build +``` diff --git a/index.html b/index.html new file mode 100644 index 0000000..be6a8ce --- /dev/null +++ b/index.html @@ -0,0 +1,49 @@ + + + + + + + 北斗启航科技教育平台管理系统 + + + +
+ + + diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..5a1f2d2 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "paths": { + "@/*": ["./src/*"] + } + }, + "exclude": ["node_modules", "dist"] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..84262f9 --- /dev/null +++ b/package.json @@ -0,0 +1,47 @@ +{ + "name": "account-manager", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "dev": "vite --port=7012", + "build": "vite build", + "preview": "vite preview --port=7012" + }, + "dependencies": { + "@element-plus/icons-vue": "^2.3.1", + "axios": "^1.7.7", + "core-js": "^3.39.0", + "crypto-js": "^4.2.0", + "echarts": "^5.5.1", + "element-plus": "^2.8.8", + "file-saver": "^2.0.5", + "fingerprintjs2": "^2.1.4", + "jsencrypt": "^3.3.2", + "moment": "^2.30.1", + "node-xlsx": "^0.24.0", + "pinia": "^2.2.6", + "pinia-plugin-persist": "^1.0.0", + "terser": "^5.36.0", + "vue": "^3.5.13", + "vue-echarts": "^7.0.3", + "vue-quill-editor": "^3.0.6", + "vue-router": "^4.5.0", + "vue-vercode": "^1.0.6", + "vue3-slide-verify": "^1.1.5", + "watermark-dom": "^2.3.0", + "xlsx": "^0.18.5", + "zipson": "^0.2.12" + }, + "devDependencies": { + "@vitejs/plugin-legacy": "^5.4.3", + "@vitejs/plugin-vue": "^5.2.0", + "autoprefixer": "^10.4.20", + "postcss": "^8.4.49", + "tailwindcss": "^3.4.15", + "unplugin-auto-import": "^0.18.5", + "unplugin-vue-components": "^0.27.4", + "vite": "^5.4.11", + "vite-plugin-components": "^0.13.3" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..6ef5c58 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {} + } +} \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..1b51f8f Binary files /dev/null and b/public/favicon.ico differ diff --git a/src/App.vue b/src/App.vue new file mode 100644 index 0000000..100a7ee --- /dev/null +++ b/src/App.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/api/index.js b/src/api/index.js new file mode 100644 index 0000000..3febf58 --- /dev/null +++ b/src/api/index.js @@ -0,0 +1,130 @@ +import axios from "axios"; +import $url from "./url"; +import router from "../router"; +import { encrypt } from "../utils/aes"; + +// 添加请求拦截器 +axios.interceptors.request.use(function (config) { + // 在发送请求之前做些什么 + if (localStorage.access_token && localStorage.access_token !== "" && localStorage.access_token !== null && localStorage.access_token !== undefined && localStorage.access_token !== NaN) { + if (config.headers) { + config.headers.authorization = localStorage.access_token; + } + } + return config; +}, function (error) { + // 对请求错误做些什么 + return Promise.reject(error); +}); + +// 转到登录页面 +const toLogin = () => { + // localStorage.clear(); + router.push({ path: '/mlogin' }); +}; + +// 添加响应拦截器 +let result = true; +axios.interceptors.response.use(function (response) { + // 2xx 范围内的状态码都会触发该函数。 + // 对响应数据做点什么 + if (response.data.code === 200) { + if ("access_token" in response.data) { + localStorage.setItem("access_token", response.data.access_token); + } + if ("refresh_token" in response.data) { + localStorage.setItem("refresh_token", response.data.refresh_token); + } + if ("data" in response.data) { + localStorage.setItem("data", response.data.data); + } + } + // if (response.data.code === 404) { + // localStorage.clear(); + // //转到404页面 + // router.push({ path: '/404page' }); + // } + // if (response.data.code === 402) { + // toLogin(); + // } + if (response.data.code === 401 && result) { + result = false; + setTimeout(() => { + result = true; + }, 1000); + let getCode = window.location.href.indexOf('?'); + if (getCode != '-1') { + let code = window.location.href.substring(getCode + 1); + const data = { + code: code, + type: encrypt('code') + }; + axios.post($url.getToken, data).then((res) => { + if (res.data.code === 200) { + localStorage.setItem("data", res.data.data); + localStorage.setItem("access_token", res.data.access_token); + localStorage.setItem("refresh_token", res.data.refresh_token); + window.location.href = res.data.redirect; + } else { + toLogin(); + } + }); + } else if(localStorage.loginCode && localStorage.loginCode !== "" && localStorage.loginCode !== null && localStorage.loginCode !== undefined && localStorage.loginCode !== NaN) { + const data = { + code: localStorage.loginCode, + type: encrypt('code') + }; + axios.post($url.getToken, data).then((res) => { + if (res.data.code === 200) { + localStorage.setItem("data", res.data.data); + localStorage.setItem("access_token", res.data.access_token); + localStorage.setItem("refresh_token", res.data.refresh_token); + localStorage.removeItem('loginCode'); + window.location.href = res.data.redirect; + } else { + toLogin(); + } + }); + } else if (localStorage.refresh_token && localStorage.refresh_token !== "" && localStorage.refresh_token !== null && localStorage.refresh_token !== undefined && localStorage.refresh_token !== NaN) { + const data = { + code: localStorage.refresh_token, + type: localStorage.data + }; + axios.post($url.getToken, data).then((res) => { + console.log(res); + if (res.data.code === 200) { + localStorage.setItem("data", res.data.data); + localStorage.setItem("access_token", res.data.access_token); + localStorage.setItem("refresh_token", res.data.refresh_token); + window.location.reload(); + } else { + toLogin(); + } + }); + } else { + toLogin(); + } + } + return response; +}, function (error) { + // 超出 2xx 范围的状态码都会触发该函数。 + // 对响应错误做点什么 + return Promise.reject(error); +}); + +export default { + get(url, query = {}) { + return axios.get(url, { + params: query + }); + }, + post(url, body) { + return axios.post(url, body); + }, + put(url, body) { + return axios.put(url, body); + }, + del(url) { + return axios.delete(url); + }, +} \ No newline at end of file diff --git a/src/api/url.js b/src/api/url.js new file mode 100644 index 0000000..3742d38 --- /dev/null +++ b/src/api/url.js @@ -0,0 +1,163 @@ +export default { + // 退出登录 + unLogin: "/authentication/unLogin", + // 获取登录状态 + loginStatus: "/authentication/loginStatus", + // 登录请求接口 + mlogin: "/authentication/mlogin", + // 用于获取token + getToken: "/authentication/getToken", + // 用于验证token + verify: "/authentication/verify", + // 获取用户基本信息 + getUser: "/authentication/getUser", + // 修改用户基本信息 + editUser: "/authentication/editUser", + // 修改密码 + changePassword: "/authentication/changePassword", + + // 获取资源 + main: "/accountManager/main", + home: "/accountManager/main/home", + bside: "/accountManager/main/bside", + cside: "/accountManager/main/cside", + contest: "/accountManager/main/contest", + manager: "/accountManager/main/manager", + system: "/accountManager/main/system", + + // 注册北斗卡 + addBdCard: "/accountManager/addBdCard", + // 查看北斗卡 + showBdCard: "/accountManager/showBdCard", + // 编辑北斗卡 + editBdCard: "/accountManager/editBdCard", + // 删除北斗卡 + deleteBdCard: "/accountManager/deleteBdCard", + + // 查看绑定记录 + showBindRecord: "/accountManager/showBindRecord", + // 删除绑定记录 + deleteBindRecord: "/accountManager/deleteBindRecord", + + // 注册公司业务 + addBusiness: "/accountManager/addBusiness", + // 查看公司业务 + showBusiness: "/accountManager/showBusiness", + // 远程搜索公司业务 + SearchBusiness: "/accountManager/SearchBusiness", + // 编辑公司业务 + editBusiness: "/accountManager/editBusiness", + // 删除公司业务 + deleteBusiness: "/accountManager/deleteBusiness", + + // 注册B端用户 + addBSide: "/accountManager/addBSide", + // 查看B端用户 + showBSide: "/accountManager/showBSide", + // 编辑B端用户 + editBSide: "/accountManager/editBSide", + // 删除B端用户 + deleteBSide: "/accountManager/deleteBSide", + + // 查看C端用户 + showCSide: "/accountManager/showCSide", + // 编辑C端用户 + editCSide: "/accountManager/editCSide", + // 删除C端用户 + deleteCSide: "/accountManager/deleteCSide", + + // 注册管理系统用户 + addInsiders: "/accountManager/addInsiders", + // 查看管理系统用户 + showInsiders: "/accountManager/showInsiders", + // 编辑管理系统用户 + editInsiders: "/accountManager/editInsiders", + // 删除管理系统用户 + deleteInsiders: "/accountManager/deleteInsiders", + + // 注册B端用户单位 + addOrganization: "/accountManager/addOrganization", + // 查看B端用户单位 + showOrganization: "/accountManager/showOrganization", + // 远程搜索B端用户单位 + SearchOrganization: "/accountManager/SearchOrganization", + // 编辑B端用户单位 + editOrganization: "/accountManager/editOrganization", + // 删除B端用户单位 + deleteOrganization: "/accountManager/deleteOrganization", + + // 查看监控记录 + showMonitoring: "/accountManager/showMonitoring", + // 删除监控记录 + deleteMonitoring: "/accountManager/deleteMonitoring", + + // 管理系统检索竞赛 uid + searchContestUid: "/accountManager/searchContestUid", + // 管理系统创建竞赛信息 + addContest: "/accountManager/addContest", + // 管理系统查看竞赛信息 + showContest: "/accountManager/showContest", + // 管理系统编辑竞赛信息 + editContest: "/accountManager/editContest", + // 管理系统删除竞赛信息 + delContest: "/accountManager/delContest", + + // 管理系统导入选择题 + importChoiceTopic: "/accountManager/importChoiceTopic", + // 管理系统创建选择题 + addChoiceTopic: "/accountManager/addChoiceTopic", + // 管理系统查看选择题 + showChoiceTopic: "/accountManager/showChoiceTopic", + // 管理系统编辑选择题 + editChoiceTopic: "/accountManager/editChoiceTopic", + // 管理系统删除选择题 + delChoiceTopic: "/accountManager/delChoiceTopic", + + // 管理系统导入竞赛账号信息 + importAccount: "/accountManager/importAccount", + // 管理系统创建竞赛账号信息 + addAccount: "/accountManager/addAccount", + // 管理系统查看竞赛账号信息 + showAccount: "/accountManager/showAccount", + // 管理系统编辑竞赛账号信息 + editAccount: "/accountManager/editAccount", + // 管理系统删除竞赛账号信息 + delAccount: "/accountManager/delAccount", + + // 管理系统重置竞赛账号密码 + resetAccount: "/accountManager/resetAccount", + + // 管理系统查看账号成绩排名 + showExamination: "/accountManager/showExamination", + // 管理系统编辑账号成绩排名 + editExamination: "/accountManager/editExamination", + // 管理系统删除账号成绩排名 + delExamination: "/accountManager/delExamination", + // 管理系统导出账号成绩排名 + downloadExamination: "/accountManager/downloadExamination", + + // 注册SN号 + addSN: "/accountManager/addSN", + // 查看SN号 + showSN: "/accountManager/showSN", + // 编辑SN号 + editSN: "/accountManager/editSN", + // 删除SN号 + deleteSN: "/accountManager/deleteSN", + + // 查看SN号绑定记录 + showBindSNRecord: "/accountManager/showBindSNRecord", + // 删除SN号绑定记录 + deleteBindSNRecord: "/accountManager/deleteBindSNRecord", + + // 搜索可分配的SN号 + searchAllocationSN: "/accountManager/searchAllocationSN", + // 搜索可分配的单位用户 + searchAllocationUser: "/accountManager/searchAllocationUser", + // B端分配SN号 + allocationSN: "/accountManager/allocationSN", + // 查看B端SN号分配记录 + showAllocationSNRecord: "/accountManager/showAllocationSNRecord", + // 删除B端SN号分配记录 + deleteAllocationSNRecord: "/accountManager/deleteAllocationSNRecord", +} \ No newline at end of file diff --git a/src/assets/favicon.ico b/src/assets/favicon.ico new file mode 100644 index 0000000..1b51f8f Binary files /dev/null and b/src/assets/favicon.ico differ diff --git a/src/assets/img/BDThemeLesson.jpg b/src/assets/img/BDThemeLesson.jpg new file mode 100644 index 0000000..4e02fc1 Binary files /dev/null and b/src/assets/img/BDThemeLesson.jpg differ diff --git a/src/assets/img/comprehensivePracticalActivities.jpg b/src/assets/img/comprehensivePracticalActivities.jpg new file mode 100644 index 0000000..f141db6 Binary files /dev/null and b/src/assets/img/comprehensivePracticalActivities.jpg differ diff --git a/src/assets/img/correctExample.png b/src/assets/img/correctExample.png new file mode 100644 index 0000000..9af852d Binary files /dev/null and b/src/assets/img/correctExample.png differ diff --git a/src/assets/img/ephemeris_search.jpg b/src/assets/img/ephemeris_search.jpg new file mode 100644 index 0000000..97b31de Binary files /dev/null and b/src/assets/img/ephemeris_search.jpg differ diff --git a/src/assets/img/errorsExample.png b/src/assets/img/errorsExample.png new file mode 100644 index 0000000..8fdfd6a Binary files /dev/null and b/src/assets/img/errorsExample.png differ diff --git a/src/assets/img/interferenceSimulation.png b/src/assets/img/interferenceSimulation.png new file mode 100644 index 0000000..ef4d111 Binary files /dev/null and b/src/assets/img/interferenceSimulation.png differ diff --git a/src/assets/img/mapTheCampus.jpg b/src/assets/img/mapTheCampus.jpg new file mode 100644 index 0000000..060d3ea Binary files /dev/null and b/src/assets/img/mapTheCampus.jpg differ diff --git a/src/assets/img/nmea0183-thumbnail.jpg b/src/assets/img/nmea0183-thumbnail.jpg new file mode 100644 index 0000000..336d2e9 Binary files /dev/null and b/src/assets/img/nmea0183-thumbnail.jpg differ diff --git a/src/assets/img/tdt-thumbnail.jpg b/src/assets/img/tdt-thumbnail.jpg new file mode 100644 index 0000000..4ab3dcd Binary files /dev/null and b/src/assets/img/tdt-thumbnail.jpg differ diff --git a/src/assets/img/trajectory.jpg b/src/assets/img/trajectory.jpg new file mode 100644 index 0000000..ab682d4 Binary files /dev/null and b/src/assets/img/trajectory.jpg differ diff --git a/src/assets/logo.png b/src/assets/logo.png new file mode 100644 index 0000000..ee9c6bd Binary files /dev/null and b/src/assets/logo.png differ diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 0000000..7565660 --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1 @@ + diff --git a/src/assets/main.css b/src/assets/main.css new file mode 100644 index 0000000..2c350cf --- /dev/null +++ b/src/assets/main.css @@ -0,0 +1,9 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer components { + .w-h-full { + @apply w-full h-full m-0 p-0 overflow-hidden; + } +} \ No newline at end of file diff --git a/src/assets/qrcode.jpg b/src/assets/qrcode.jpg new file mode 100644 index 0000000..1ca11ac Binary files /dev/null and b/src/assets/qrcode.jpg differ diff --git a/src/components/addNewData/SNForm/SNForm.vue b/src/components/addNewData/SNForm/SNForm.vue new file mode 100644 index 0000000..5c668c9 --- /dev/null +++ b/src/components/addNewData/SNForm/SNForm.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/components/addNewData/SNForm/excleAdd.vue b/src/components/addNewData/SNForm/excleAdd.vue new file mode 100644 index 0000000..3e39f87 --- /dev/null +++ b/src/components/addNewData/SNForm/excleAdd.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/components/addNewData/SNForm/multipleAdd.vue b/src/components/addNewData/SNForm/multipleAdd.vue new file mode 100644 index 0000000..038e6a8 --- /dev/null +++ b/src/components/addNewData/SNForm/multipleAdd.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/components/addNewData/SNForm/singleAdd.vue b/src/components/addNewData/SNForm/singleAdd.vue new file mode 100644 index 0000000..623e2fe --- /dev/null +++ b/src/components/addNewData/SNForm/singleAdd.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/src/components/addNewData/bdCardForm/bdCardForm.vue b/src/components/addNewData/bdCardForm/bdCardForm.vue new file mode 100644 index 0000000..34fd957 --- /dev/null +++ b/src/components/addNewData/bdCardForm/bdCardForm.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/components/addNewData/bdCardForm/excleAdd.vue b/src/components/addNewData/bdCardForm/excleAdd.vue new file mode 100644 index 0000000..5fd6bf0 --- /dev/null +++ b/src/components/addNewData/bdCardForm/excleAdd.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/components/addNewData/bdCardForm/multipleAdd.vue b/src/components/addNewData/bdCardForm/multipleAdd.vue new file mode 100644 index 0000000..0afb063 --- /dev/null +++ b/src/components/addNewData/bdCardForm/multipleAdd.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/components/addNewData/bdCardForm/singleAdd.vue b/src/components/addNewData/bdCardForm/singleAdd.vue new file mode 100644 index 0000000..c5feb39 --- /dev/null +++ b/src/components/addNewData/bdCardForm/singleAdd.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/src/components/addNewData/bsideForm/bsideForm.vue b/src/components/addNewData/bsideForm/bsideForm.vue new file mode 100644 index 0000000..c25b966 --- /dev/null +++ b/src/components/addNewData/bsideForm/bsideForm.vue @@ -0,0 +1,177 @@ + + + + + diff --git a/src/components/addNewData/bsideForm/excleAdd.vue b/src/components/addNewData/bsideForm/excleAdd.vue new file mode 100644 index 0000000..45adcc5 --- /dev/null +++ b/src/components/addNewData/bsideForm/excleAdd.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/src/components/addNewData/bsideForm/multipleAdd.vue b/src/components/addNewData/bsideForm/multipleAdd.vue new file mode 100644 index 0000000..b95c786 --- /dev/null +++ b/src/components/addNewData/bsideForm/multipleAdd.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/components/addNewData/bsideForm/singleAdd.vue b/src/components/addNewData/bsideForm/singleAdd.vue new file mode 100644 index 0000000..7c4a0ec --- /dev/null +++ b/src/components/addNewData/bsideForm/singleAdd.vue @@ -0,0 +1,165 @@ + + + + + diff --git a/src/components/addNewData/businessForm/businessForm.vue b/src/components/addNewData/businessForm/businessForm.vue new file mode 100644 index 0000000..c53e847 --- /dev/null +++ b/src/components/addNewData/businessForm/businessForm.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/src/components/addNewData/businessForm/excleAdd.vue b/src/components/addNewData/businessForm/excleAdd.vue new file mode 100644 index 0000000..23a308d --- /dev/null +++ b/src/components/addNewData/businessForm/excleAdd.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/src/components/addNewData/businessForm/multipleAdd.vue b/src/components/addNewData/businessForm/multipleAdd.vue new file mode 100644 index 0000000..55a783a --- /dev/null +++ b/src/components/addNewData/businessForm/multipleAdd.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/components/addNewData/businessForm/singleAdd.vue b/src/components/addNewData/businessForm/singleAdd.vue new file mode 100644 index 0000000..b1e1128 --- /dev/null +++ b/src/components/addNewData/businessForm/singleAdd.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/src/components/addNewData/contest/accountForm/accountForm.vue b/src/components/addNewData/contest/accountForm/accountForm.vue new file mode 100644 index 0000000..a2a5e2b --- /dev/null +++ b/src/components/addNewData/contest/accountForm/accountForm.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/components/addNewData/contest/accountForm/excleAdd.vue b/src/components/addNewData/contest/accountForm/excleAdd.vue new file mode 100644 index 0000000..a07eda2 --- /dev/null +++ b/src/components/addNewData/contest/accountForm/excleAdd.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/components/addNewData/contest/accountForm/multipleAdd.vue b/src/components/addNewData/contest/accountForm/multipleAdd.vue new file mode 100644 index 0000000..b146151 --- /dev/null +++ b/src/components/addNewData/contest/accountForm/multipleAdd.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/components/addNewData/contest/accountForm/singleAdd.vue b/src/components/addNewData/contest/accountForm/singleAdd.vue new file mode 100644 index 0000000..6ce5483 --- /dev/null +++ b/src/components/addNewData/contest/accountForm/singleAdd.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/src/components/addNewData/contest/choiceTopicForm/choiceTopicForm.vue b/src/components/addNewData/contest/choiceTopicForm/choiceTopicForm.vue new file mode 100644 index 0000000..e02d3be --- /dev/null +++ b/src/components/addNewData/contest/choiceTopicForm/choiceTopicForm.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/src/components/addNewData/contest/choiceTopicForm/excleAdd.vue b/src/components/addNewData/contest/choiceTopicForm/excleAdd.vue new file mode 100644 index 0000000..8f15dc2 --- /dev/null +++ b/src/components/addNewData/contest/choiceTopicForm/excleAdd.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/src/components/addNewData/contest/choiceTopicForm/multipleAdd.vue b/src/components/addNewData/contest/choiceTopicForm/multipleAdd.vue new file mode 100644 index 0000000..56890b7 --- /dev/null +++ b/src/components/addNewData/contest/choiceTopicForm/multipleAdd.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/components/addNewData/contest/choiceTopicForm/singleAdd.vue b/src/components/addNewData/contest/choiceTopicForm/singleAdd.vue new file mode 100644 index 0000000..b8356d0 --- /dev/null +++ b/src/components/addNewData/contest/choiceTopicForm/singleAdd.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/src/components/addNewData/contest/contestForm/contestForm.vue b/src/components/addNewData/contest/contestForm/contestForm.vue new file mode 100644 index 0000000..c83c1cf --- /dev/null +++ b/src/components/addNewData/contest/contestForm/contestForm.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/src/components/addNewData/contest/contestForm/excleAdd.vue b/src/components/addNewData/contest/contestForm/excleAdd.vue new file mode 100644 index 0000000..a31fca3 --- /dev/null +++ b/src/components/addNewData/contest/contestForm/excleAdd.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/components/addNewData/contest/contestForm/multipleAdd.vue b/src/components/addNewData/contest/contestForm/multipleAdd.vue new file mode 100644 index 0000000..523253b --- /dev/null +++ b/src/components/addNewData/contest/contestForm/multipleAdd.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/components/addNewData/contest/contestForm/singleAdd.vue b/src/components/addNewData/contest/contestForm/singleAdd.vue new file mode 100644 index 0000000..3eb3704 --- /dev/null +++ b/src/components/addNewData/contest/contestForm/singleAdd.vue @@ -0,0 +1,227 @@ + + + + + diff --git a/src/components/addNewData/insidersForm/excleAdd.vue b/src/components/addNewData/insidersForm/excleAdd.vue new file mode 100644 index 0000000..f39e986 --- /dev/null +++ b/src/components/addNewData/insidersForm/excleAdd.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/src/components/addNewData/insidersForm/insidersForm.vue b/src/components/addNewData/insidersForm/insidersForm.vue new file mode 100644 index 0000000..3e292b5 --- /dev/null +++ b/src/components/addNewData/insidersForm/insidersForm.vue @@ -0,0 +1,166 @@ + + + + + diff --git a/src/components/addNewData/insidersForm/multipleAdd.vue b/src/components/addNewData/insidersForm/multipleAdd.vue new file mode 100644 index 0000000..441d580 --- /dev/null +++ b/src/components/addNewData/insidersForm/multipleAdd.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/src/components/addNewData/insidersForm/singleAdd.vue b/src/components/addNewData/insidersForm/singleAdd.vue new file mode 100644 index 0000000..874fd1d --- /dev/null +++ b/src/components/addNewData/insidersForm/singleAdd.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/src/components/addNewData/organizationForm/excleAdd.vue b/src/components/addNewData/organizationForm/excleAdd.vue new file mode 100644 index 0000000..24a9620 --- /dev/null +++ b/src/components/addNewData/organizationForm/excleAdd.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/components/addNewData/organizationForm/multipleAdd.vue b/src/components/addNewData/organizationForm/multipleAdd.vue new file mode 100644 index 0000000..e940e34 --- /dev/null +++ b/src/components/addNewData/organizationForm/multipleAdd.vue @@ -0,0 +1,111 @@ + + + + + diff --git a/src/components/addNewData/organizationForm/organizationForm.vue b/src/components/addNewData/organizationForm/organizationForm.vue new file mode 100644 index 0000000..79279ca --- /dev/null +++ b/src/components/addNewData/organizationForm/organizationForm.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/src/components/addNewData/organizationForm/singleAdd.vue b/src/components/addNewData/organizationForm/singleAdd.vue new file mode 100644 index 0000000..94cef63 --- /dev/null +++ b/src/components/addNewData/organizationForm/singleAdd.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/components/aside/Menu.vue b/src/components/aside/Menu.vue new file mode 100644 index 0000000..c779672 --- /dev/null +++ b/src/components/aside/Menu.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/components/editData/SNForm.vue b/src/components/editData/SNForm.vue new file mode 100644 index 0000000..4662fbd --- /dev/null +++ b/src/components/editData/SNForm.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/components/editData/bdCardForm.vue b/src/components/editData/bdCardForm.vue new file mode 100644 index 0000000..a47e686 --- /dev/null +++ b/src/components/editData/bdCardForm.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/components/editData/bsideForm.vue b/src/components/editData/bsideForm.vue new file mode 100644 index 0000000..54cbf4c --- /dev/null +++ b/src/components/editData/bsideForm.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/src/components/editData/businessForm.vue b/src/components/editData/businessForm.vue new file mode 100644 index 0000000..864fe58 --- /dev/null +++ b/src/components/editData/businessForm.vue @@ -0,0 +1,407 @@ + + + + + diff --git a/src/components/editData/contest/accountForm.vue b/src/components/editData/contest/accountForm.vue new file mode 100644 index 0000000..326bab6 --- /dev/null +++ b/src/components/editData/contest/accountForm.vue @@ -0,0 +1,202 @@ + + + + + diff --git a/src/components/editData/contest/choiceTopicForm.vue b/src/components/editData/contest/choiceTopicForm.vue new file mode 100644 index 0000000..a8bc0cb --- /dev/null +++ b/src/components/editData/contest/choiceTopicForm.vue @@ -0,0 +1,206 @@ + + + + + diff --git a/src/components/editData/contest/contestForm.vue b/src/components/editData/contest/contestForm.vue new file mode 100644 index 0000000..4310317 --- /dev/null +++ b/src/components/editData/contest/contestForm.vue @@ -0,0 +1,322 @@ + + + + + diff --git a/src/components/editData/contest/examinationForm.vue b/src/components/editData/contest/examinationForm.vue new file mode 100644 index 0000000..b553cd0 --- /dev/null +++ b/src/components/editData/contest/examinationForm.vue @@ -0,0 +1,151 @@ + + + + + diff --git a/src/components/editData/csideForm.vue b/src/components/editData/csideForm.vue new file mode 100644 index 0000000..c5aa506 --- /dev/null +++ b/src/components/editData/csideForm.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/components/editData/insidersForm.vue b/src/components/editData/insidersForm.vue new file mode 100644 index 0000000..c5aa506 --- /dev/null +++ b/src/components/editData/insidersForm.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/src/components/editData/organizationForm.vue b/src/components/editData/organizationForm.vue new file mode 100644 index 0000000..9cb5e7e --- /dev/null +++ b/src/components/editData/organizationForm.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/src/components/header/Exit.vue b/src/components/header/Exit.vue new file mode 100644 index 0000000..65be7e1 --- /dev/null +++ b/src/components/header/Exit.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/components/header/Logo.vue b/src/components/header/Logo.vue new file mode 100644 index 0000000..94a7322 --- /dev/null +++ b/src/components/header/Logo.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/header/Navigation.vue b/src/components/header/Navigation.vue new file mode 100644 index 0000000..c9e978a --- /dev/null +++ b/src/components/header/Navigation.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/src/components/main/Charts.vue b/src/components/main/Charts.vue new file mode 100644 index 0000000..6efee0d --- /dev/null +++ b/src/components/main/Charts.vue @@ -0,0 +1,8 @@ + + + + + diff --git a/src/components/main/Form.vue b/src/components/main/Form.vue new file mode 100644 index 0000000..f3c1a39 --- /dev/null +++ b/src/components/main/Form.vue @@ -0,0 +1,8 @@ + + + + + diff --git a/src/components/main/Table.vue b/src/components/main/Table.vue new file mode 100644 index 0000000..10921cb --- /dev/null +++ b/src/components/main/Table.vue @@ -0,0 +1,8 @@ + + + + + diff --git a/src/components/mainPage/SN.vue b/src/components/mainPage/SN.vue new file mode 100644 index 0000000..ab534a0 --- /dev/null +++ b/src/components/mainPage/SN.vue @@ -0,0 +1,584 @@ + + + + + diff --git a/src/components/mainPage/SNAdmin.vue b/src/components/mainPage/SNAdmin.vue new file mode 100644 index 0000000..d6a2c96 --- /dev/null +++ b/src/components/mainPage/SNAdmin.vue @@ -0,0 +1,329 @@ + + + + + diff --git a/src/components/mainPage/allocationSNRecord.vue b/src/components/mainPage/allocationSNRecord.vue new file mode 100644 index 0000000..aeee5e4 --- /dev/null +++ b/src/components/mainPage/allocationSNRecord.vue @@ -0,0 +1,384 @@ + + + + + diff --git a/src/components/mainPage/bdCard.vue b/src/components/mainPage/bdCard.vue new file mode 100644 index 0000000..9d646fb --- /dev/null +++ b/src/components/mainPage/bdCard.vue @@ -0,0 +1,658 @@ + + + + + diff --git a/src/components/mainPage/bindRecord.vue b/src/components/mainPage/bindRecord.vue new file mode 100644 index 0000000..7b07639 --- /dev/null +++ b/src/components/mainPage/bindRecord.vue @@ -0,0 +1,510 @@ + + + + + diff --git a/src/components/mainPage/bindSNRecord.vue b/src/components/mainPage/bindSNRecord.vue new file mode 100644 index 0000000..0616403 --- /dev/null +++ b/src/components/mainPage/bindSNRecord.vue @@ -0,0 +1,515 @@ + + + + + diff --git a/src/components/mainPage/bside.vue b/src/components/mainPage/bside.vue new file mode 100644 index 0000000..7cc8ea3 --- /dev/null +++ b/src/components/mainPage/bside.vue @@ -0,0 +1,817 @@ + + + + + diff --git a/src/components/mainPage/business.vue b/src/components/mainPage/business.vue new file mode 100644 index 0000000..fd6f176 --- /dev/null +++ b/src/components/mainPage/business.vue @@ -0,0 +1,824 @@ + + + + + diff --git a/src/components/mainPage/contest/account.vue b/src/components/mainPage/contest/account.vue new file mode 100644 index 0000000..812e83a --- /dev/null +++ b/src/components/mainPage/contest/account.vue @@ -0,0 +1,648 @@ + + + + + diff --git a/src/components/mainPage/contest/choiceTopic.vue b/src/components/mainPage/contest/choiceTopic.vue new file mode 100644 index 0000000..6601f96 --- /dev/null +++ b/src/components/mainPage/contest/choiceTopic.vue @@ -0,0 +1,538 @@ + + + + + diff --git a/src/components/mainPage/contest/contest.vue b/src/components/mainPage/contest/contest.vue new file mode 100644 index 0000000..3f423ed --- /dev/null +++ b/src/components/mainPage/contest/contest.vue @@ -0,0 +1,928 @@ + + + + + diff --git a/src/components/mainPage/contest/examination.vue b/src/components/mainPage/contest/examination.vue new file mode 100644 index 0000000..dfd31e7 --- /dev/null +++ b/src/components/mainPage/contest/examination.vue @@ -0,0 +1,643 @@ + + + + + diff --git a/src/components/mainPage/cside.vue b/src/components/mainPage/cside.vue new file mode 100644 index 0000000..7d9c5d8 --- /dev/null +++ b/src/components/mainPage/cside.vue @@ -0,0 +1,850 @@ + + + + + diff --git a/src/components/mainPage/insiders.vue b/src/components/mainPage/insiders.vue new file mode 100644 index 0000000..026e12e --- /dev/null +++ b/src/components/mainPage/insiders.vue @@ -0,0 +1,750 @@ + + + + + diff --git a/src/components/mainPage/monitoring.vue b/src/components/mainPage/monitoring.vue new file mode 100644 index 0000000..ea5f2a1 --- /dev/null +++ b/src/components/mainPage/monitoring.vue @@ -0,0 +1,594 @@ + + + + + diff --git a/src/components/mainPage/organization.vue b/src/components/mainPage/organization.vue new file mode 100644 index 0000000..0ed30f5 --- /dev/null +++ b/src/components/mainPage/organization.vue @@ -0,0 +1,655 @@ + + + + + diff --git a/src/components/manager/changePassword.vue b/src/components/manager/changePassword.vue new file mode 100644 index 0000000..9a05edf --- /dev/null +++ b/src/components/manager/changePassword.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/src/components/manager/userManager.vue b/src/components/manager/userManager.vue new file mode 100644 index 0000000..aa858e1 --- /dev/null +++ b/src/components/manager/userManager.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/components/operate/addNewData.vue b/src/components/operate/addNewData.vue new file mode 100644 index 0000000..f0b257f --- /dev/null +++ b/src/components/operate/addNewData.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/components/operate/dataShow.vue b/src/components/operate/dataShow.vue new file mode 100644 index 0000000..22d6ce5 --- /dev/null +++ b/src/components/operate/dataShow.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/src/components/operate/formTools.vue b/src/components/operate/formTools.vue new file mode 100644 index 0000000..6af19c3 --- /dev/null +++ b/src/components/operate/formTools.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/components/operate/passwordOauth.vue b/src/components/operate/passwordOauth.vue new file mode 100644 index 0000000..3d640aa --- /dev/null +++ b/src/components/operate/passwordOauth.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/components/operate/selectRelatedItems.vue b/src/components/operate/selectRelatedItems.vue new file mode 100644 index 0000000..7b90126 --- /dev/null +++ b/src/components/operate/selectRelatedItems.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/src/components/operate/tabelSelect.vue b/src/components/operate/tabelSelect.vue new file mode 100644 index 0000000..b804d89 --- /dev/null +++ b/src/components/operate/tabelSelect.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/components/operate/tabelTools.vue b/src/components/operate/tabelTools.vue new file mode 100644 index 0000000..606e513 --- /dev/null +++ b/src/components/operate/tabelTools.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/components/operate/uploadFile.vue b/src/components/operate/uploadFile.vue new file mode 100644 index 0000000..00059ec --- /dev/null +++ b/src/components/operate/uploadFile.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/src/components/search/dateTimePicker.vue b/src/components/search/dateTimePicker.vue new file mode 100644 index 0000000..d3f5c9a --- /dev/null +++ b/src/components/search/dateTimePicker.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/components/search/pagination.vue b/src/components/search/pagination.vue new file mode 100644 index 0000000..deb287c --- /dev/null +++ b/src/components/search/pagination.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/components/search/remoteSearch.vue b/src/components/search/remoteSearch.vue new file mode 100644 index 0000000..1d82a03 --- /dev/null +++ b/src/components/search/remoteSearch.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/components/search/searchKey.vue b/src/components/search/searchKey.vue new file mode 100644 index 0000000..17744b2 --- /dev/null +++ b/src/components/search/searchKey.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/components/search/selectSearch.vue b/src/components/search/selectSearch.vue new file mode 100644 index 0000000..e52bf33 --- /dev/null +++ b/src/components/search/selectSearch.vue @@ -0,0 +1,40 @@ + + + + + diff --git a/src/components/search/sortSearch.vue b/src/components/search/sortSearch.vue new file mode 100644 index 0000000..dcf6a09 --- /dev/null +++ b/src/components/search/sortSearch.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..8b2c974 --- /dev/null +++ b/src/main.js @@ -0,0 +1,23 @@ +import './assets/main.css'; + +import { createApp } from 'vue'; +import { createPinia } from 'pinia'; +import piniaPersist from 'pinia-plugin-persist'; +import ElementPlus from 'element-plus'; +import zhCn from 'element-plus/es/locale/lang/zh-cn'; +import 'element-plus/dist/index.css'; +import { AES_Encrypt } from '@/utils/aes.js'; + +import App from './App.vue'; +import router from './router'; + +const pinia = createPinia(); +pinia.use(piniaPersist); + +const app = createApp(App); +app.config.globalProperties.$AES_Encrypt = AES_Encrypt //全局加密 +app.use(pinia); +app.use(ElementPlus, { locale: zhCn }); +app.use(router); + +app.mount('#app'); diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..cee21e6 --- /dev/null +++ b/src/router/index.js @@ -0,0 +1,256 @@ +import { createRouter, createWebHistory } from 'vue-router' + +const router = createRouter({ + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ + { + path: '/404page', + name: '404page', + meta: { label: "404页面" }, + component: () => import('../views/404page.vue') + }, + { + path: '/mlogin', + name: 'mlogin', + meta: { label: "登录页面" }, + component: () => import('../views/Login.vue') + }, + { + path: '/main', + name: 'main', + meta: { label: "主页" }, + redirect: "/main/home", + component: () => import('../views/Main.vue'), + children: [ + { + path: "home", + name: "home", + meta: { label: "首页" }, + redirect: "/main/home/webSiteData", + component: () => import('../views/header/Home.vue'), + children: [ + { + path: "webSiteData", + name: "webSiteData", + meta: { label: "数据统计" }, + component: () => import('../views/aside/Data.vue') + } + ] + }, + { + path: "workspace", + name: "workspace", + meta: { label: "工作区" }, + redirect: "/main/workspace/bdCardData", + component: () => import('../views/header/Workspace.vue'), + children: [ + { + path: "bdCardData", + name: "bdCardData", + meta: { label: "数据统计" }, + component: () => import('../views/aside/Data.vue') + }, + { + path: "bdCard", + name: "bdCard", + meta: { label: "北斗卡管理" }, + component: () => import('../components/mainPage/bdCard.vue') + }, + { + path: "bindRecord", + name: "bindRecord", + meta: { label: "北斗卡绑定记录" }, + component: () => import('../components/mainPage/bindRecord.vue') + }, + { + path: "SNData", + name: "SNData", + meta: { label: "SN号数据统计" }, + component: () => import('../views/aside/Data.vue') + }, + { + path: "SN", + name: "SN", + meta: { label: "SN号管理" }, + component: () => import('../components/mainPage/SN.vue') + }, + { + path: "bindSNRecord", + name: "bindSNRecord", + meta: { label: "SN号绑定记录" }, + component: () => import('../components/mainPage/bindSNRecord.vue') + }, + ] + }, + { + path: "bside", + name: "bside", + meta: { label: "B端管理" }, + redirect: "/main/bside/bsideData", + component: () => import('../views/header/BSide.vue'), + children: [ + { + path: "bsideData", + name: "bsideData", + meta: { label: "数据统计" }, + component: () => import('../views/aside/Data.vue') + }, + { + path: "bsideOrganization", + name: "bsideOrganization", + meta: { label: "单位管理" }, + component: () => import('../components/mainPage/organization.vue') + }, + { + path: "bsideAccount", + name: "bsideAccount", + meta: { label: "账号管理" }, + component: () => import('../components/mainPage/bside.vue') + }, + { + path: "SNAdmin", + name: "SNAdmin", + meta: { label: "SN号管理" }, + component: () => import('../components/mainPage/SNAdmin.vue') + }, + { + path: "allocationSNRecord", + name: "allocationSNRecord", + meta: { label: "SN号分配记录" }, + component: () => import('../components/mainPage/allocationSNRecord.vue') + } + ] + }, + { + path: "cside", + name: "cside", + meta: { label: "C端管理" }, + redirect: "/main/cside/csideData", + component: () => import('../views/header/CSide.vue'), + children: [ + { + path: "csideData", + name: "csideData", + meta: { label: "数据统计" }, + component: () => import('../views/aside/Data.vue') + }, + { + path: "csideAccount", + name: "csideAccount", + meta: { label: "账号管理" }, + component: () => import('../components/mainPage/cside.vue') + } + ] + }, + { + path: "contest", + name: "contest", + meta: { label: "竞赛管理" }, + redirect: "/main/contest/contestData", + component: () => import('../views/header/Contest.vue'), + children: [ + { + path: "contestData", + name: "contestData", + meta: { label: "数据统计" }, + component: () => import('../views/aside/Data.vue') + }, + { + path: "choiceTopic", + name: "choiceTopic", + meta: { label: "选择题题库管理" }, + component: () => import('../components/mainPage/contest/choiceTopic.vue') + }, + { + path: "contestMsg", + name: "contestMsg", + meta: { label: "竞赛信息管理" }, + component: () => import('../components/mainPage/contest/contest.vue') + }, + { + path: "contestAccount", + name: "contestAccount", + meta: { label: "竞赛账号管理" }, + component: () => import('../components/mainPage/contest/account.vue') + }, + { + path: "contestGrades", + name: "contestGrades", + meta: { label: "竞赛成绩管理" }, + component: () => import('../components/mainPage/contest/examination.vue') + } + ] + }, + { + path: "insiders", + name: "insiders", + meta: { label: "内部管理" }, + redirect: "/main/insiders/insidersData", + component: () => import('../views/header/Insiders.vue'), + children: [ + { + path: "insidersData", + name: "insidersData", + meta: { label: "数据统计" }, + component: () => import('../views/aside/Data.vue') + }, + { + path: "insidersAccount", + name: "insidersAccount", + meta: { label: "账号管理" }, + component: () => import('../components/mainPage/insiders.vue') + }, + ] + }, + { + path: "system", + name: "system", + meta: { label: "系统管理" }, + redirect: "/main/system/businessData", + component: () => import('../views/header/System.vue'), + children: [ + { + path: "businessData", + name: "businessData", + meta: { label: "业务数据统计" }, + component: () => import('../views/aside/Data.vue') + }, + { + path: "business", + name: "business", + meta: { label: "业务管理" }, + component: () => import('../components/mainPage/business.vue') + }, + { + path: "monitoring", + name: "monitoring", + meta: { label: "系统监控" }, + component: () => import('../components/mainPage/monitoring.vue') + }, + ] + } + ] + }, + ] +}); + +router.beforeEach((to, from, next) => { + if (to.matched.length === 0) { + if (to.path == "/") { + router.push({ path: '/main/home' }); + } else if (to.path == "/mlogin") { + router.push({ path: '/mlogin' }); + } else { + router.push({ path: '/404page' }); + } + } else { + next(); + if(localStorage.length == 0) { + setTimeout(() => { + router.push({ path: '/mlogin' }); + }, 1000); + } + } +}); + +export default router; \ No newline at end of file diff --git a/src/stores/SN.js b/src/stores/SN.js new file mode 100644 index 0000000..26b7da9 --- /dev/null +++ b/src/stores/SN.js @@ -0,0 +1,46 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const SNActiveStore = defineStore('SN', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + sn_number: "", + status: "", + created_at: "", + updated_at: "", + }, + sortOptions: { + sn_number: false, + created_at: false, + updated_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'SNActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default SNActiveStore; \ No newline at end of file diff --git a/src/stores/SNAdmin.js b/src/stores/SNAdmin.js new file mode 100644 index 0000000..dfe7d0d --- /dev/null +++ b/src/stores/SNAdmin.js @@ -0,0 +1,28 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const SNAdminActiveStore = defineStore('SNAdmin', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + selectedUser: "", + selectedSNs: [], + snCount: 0, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'SNAdminActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "selectedUser", "selectedSNs", "snCount"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default SNAdminActiveStore; \ No newline at end of file diff --git a/src/stores/activeIndex.js b/src/stores/activeIndex.js new file mode 100644 index 0000000..6a43d8c --- /dev/null +++ b/src/stores/activeIndex.js @@ -0,0 +1,26 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const activeIndexActiveStore = defineStore('activeIndex', { + state: () => ({ + // 持久化数据 + headerActive: 0, + asideActive: 0 + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'activeIndex', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["headerActive", "asideActive"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default activeIndexActiveStore; \ No newline at end of file diff --git a/src/stores/allocationSNRecord.js b/src/stores/allocationSNRecord.js new file mode 100644 index 0000000..4c8ab6e --- /dev/null +++ b/src/stores/allocationSNRecord.js @@ -0,0 +1,42 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const allocationSNRecordActiveStore = defineStore('allocationSNRecord', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + account_name: "", + user_uid: "", + length: "", + sn_set: "", + }, + sortOptions: {}, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'allocationSNRecordActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSortVisible", "dialogSearchVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default allocationSNRecordActiveStore; \ No newline at end of file diff --git a/src/stores/bdCard.js b/src/stores/bdCard.js new file mode 100644 index 0000000..413d977 --- /dev/null +++ b/src/stores/bdCard.js @@ -0,0 +1,50 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const bdCardActiveStore = defineStore('bdCard', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + card_id: "", + card_imsi: "", + type: "", + status: "", + account_name: "", + created_at: "", + updated_at: "", + }, + sortOptions: { + card_id: false, + card_imsi: false, + created_at: false, + updated_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'bdCardActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default bdCardActiveStore; \ No newline at end of file diff --git a/src/stores/bindRecord.js b/src/stores/bindRecord.js new file mode 100644 index 0000000..c4cc654 --- /dev/null +++ b/src/stores/bindRecord.js @@ -0,0 +1,46 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const bindRecordActiveStore = defineStore('bindRecord', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + account_name: "", + side: "", + user_uid: "", + card_id: "", + type: "", + created_at: "", + }, + sortOptions: { + created_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'bindRecordActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default bindRecordActiveStore; \ No newline at end of file diff --git a/src/stores/bindSNRecord.js b/src/stores/bindSNRecord.js new file mode 100644 index 0000000..d28e7a7 --- /dev/null +++ b/src/stores/bindSNRecord.js @@ -0,0 +1,46 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const bindSNRecordActiveStore = defineStore('bindSNRecord', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + account_name: "", + side: "", + user_uid: "", + sn_number: "", + type: "", + created_at: "", + }, + sortOptions: { + created_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'bindSNRecordActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default bindSNRecordActiveStore; \ No newline at end of file diff --git a/src/stores/bside.js b/src/stores/bside.js new file mode 100644 index 0000000..3937056 --- /dev/null +++ b/src/stores/bside.js @@ -0,0 +1,53 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const bsideActiveStore = defineStore('bside', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + status: "", + role: "", + account_name: "", + organization: "", + user_name: "", + phone: "", + msg: "", + created_at: "", + updated_at: "", + login_at: "", + login_status: "", + }, + sortOptions: { + created_at: false, + updated_at: false, + login_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'bsideActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default bsideActiveStore; \ No newline at end of file diff --git a/src/stores/business.js b/src/stores/business.js new file mode 100644 index 0000000..6bfd92d --- /dev/null +++ b/src/stores/business.js @@ -0,0 +1,53 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const businessActiveStore = defineStore('business', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + salt: "", + login_url: "", + client_url: "", + temporary_id: "", + client_id: "", + client_secret: "", + name: "", + type: "", + level: "", + status: "", + created_at: "", + updated_at: "", + }, + sortOptions: { + created_at: false, + updated_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'businessActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default businessActiveStore; \ No newline at end of file diff --git a/src/stores/contest/account.js b/src/stores/contest/account.js new file mode 100644 index 0000000..6f61d87 --- /dev/null +++ b/src/stores/contest/account.js @@ -0,0 +1,46 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const accountActiveStore = defineStore('account', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + uid: "", + contest_uid: "", + account_name: "", + status: "", + created_at: "", + login_status: "", + }, + sortOptions: { + created_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'accountActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default accountActiveStore; \ No newline at end of file diff --git a/src/stores/contest/choiceTopic.js b/src/stores/contest/choiceTopic.js new file mode 100644 index 0000000..73efdd2 --- /dev/null +++ b/src/stores/contest/choiceTopic.js @@ -0,0 +1,45 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const choiceTopicActiveStore = defineStore('choiceTopic', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + topic: "", + options_a: "", + options_b: "", + options_c: "", + options_d: "", + answer: "", + }, + sortOptions: { + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'choiceTopicActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default choiceTopicActiveStore; \ No newline at end of file diff --git a/src/stores/contest/contest.js b/src/stores/contest/contest.js new file mode 100644 index 0000000..9b97e5d --- /dev/null +++ b/src/stores/contest/contest.js @@ -0,0 +1,59 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const contestActiveStore = defineStore('contest', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + uid: "", + contest_name: "", + contest_organizers: "", + contest_term: "", + type: "", + status: "", + online_start: "", + online_end: "", + offline_start: "", + offline_end: "", + contest_start: "", + contest_end: "", + created_at: "", + }, + sortOptions: { + online_start: false, + online_end: false, + offline_start: false, + offline_end: false, + contest_start: false, + contest_end: false, + created_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'contestActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default contestActiveStore; \ No newline at end of file diff --git a/src/stores/contest/examination.js b/src/stores/contest/examination.js new file mode 100644 index 0000000..b0de742 --- /dev/null +++ b/src/stores/contest/examination.js @@ -0,0 +1,49 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const examinationActiveStore = defineStore('examination', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + user_uid: "", + contest_uid: "", + exam_type: "", + topic_type: "", + score: "", + created_at: "", + updated_at: "", + }, + sortOptions: { + score: false, + created_at: false, + updated_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'examinationActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default examinationActiveStore; \ No newline at end of file diff --git a/src/stores/counter.js b/src/stores/counter.js new file mode 100644 index 0000000..b6757ba --- /dev/null +++ b/src/stores/counter.js @@ -0,0 +1,12 @@ +import { ref, computed } from 'vue' +import { defineStore } from 'pinia' + +export const useCounterStore = defineStore('counter', () => { + const count = ref(0) + const doubleCount = computed(() => count.value * 2) + function increment() { + count.value++ + } + + return { count, doubleCount, increment } +}) diff --git a/src/stores/cside.js b/src/stores/cside.js new file mode 100644 index 0000000..b6f583c --- /dev/null +++ b/src/stores/cside.js @@ -0,0 +1,57 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const csideActiveStore = defineStore('cside', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + status: "", + role: "", + account_name: "", + user_name: "", + phone: "", + gender: "", + age: "", + email: "", + address: "", + post_code: "", + created_at: "", + updated_at: "", + login_at: "", + login_status: "", + }, + sortOptions: { + age: false, + created_at: false, + updated_at: false, + login_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'csideActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default csideActiveStore; \ No newline at end of file diff --git a/src/stores/index.js b/src/stores/index.js new file mode 100644 index 0000000..7dfba2d --- /dev/null +++ b/src/stores/index.js @@ -0,0 +1,22 @@ +import { createApp } from 'vue'; // 拿过来 +import app from '../App.vue'; // 拿过来 +import { createPinia } from 'pinia'; +import piniaPersist from 'pinia-plugin-persist'; +import { ref } from 'vue'; +import { defineStore } from 'pinia'; + +const store = createPinia(); // 创建pinia实例 +store.use(piniaPersist); +createApp(app).use(store); // 直接给他挂上边,就解决啦 + +const useStatusStore = defineStore('status', () => { + const status = ref(false) + return { status } +}, +{ + persist: { + enabled: false, //Store中数据持久化生效 + }, +}); + +export default useStatusStore; \ No newline at end of file diff --git a/src/stores/insiders.js b/src/stores/insiders.js new file mode 100644 index 0000000..9d7f1c9 --- /dev/null +++ b/src/stores/insiders.js @@ -0,0 +1,52 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const insidersActiveStore = defineStore('insiders', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + uid: "", + status: "", + role: "", + name: "", + department: "", + change: "", + created_at: "", + updated_at: "", + login_at: "", + login_status: "", + }, + sortOptions: { + created_at: false, + updated_at: false, + login_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'insidersActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default insidersActiveStore; \ No newline at end of file diff --git a/src/stores/monitoring.js b/src/stores/monitoring.js new file mode 100644 index 0000000..7766e9b --- /dev/null +++ b/src/stores/monitoring.js @@ -0,0 +1,47 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const monitoringActiveStore = defineStore('monitoring', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + operate: "", + operate_msg: "", + type: "", + status: "", + user: "", + name: "", + created_at: "", + }, + sortOptions: { + created_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'monitoringActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default monitoringActiveStore; \ No newline at end of file diff --git a/src/stores/organization.js b/src/stores/organization.js new file mode 100644 index 0000000..eefafdf --- /dev/null +++ b/src/stores/organization.js @@ -0,0 +1,51 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const organizationActiveStore = defineStore('organization', { + state: () => ({ + // 持久化数据 + activeIndex: "1", + offset: 1, + limit: 10, + dataCount: 0, + pageCount: 0, + searchOptions: { + uid: "", + organization_name: "", + address: "", + liaison_name: "", + phone: "", + email: "", + other_information: "", + post_code: "", + created_at: "", + updated_at: "", + }, + sortOptions: { + created_at: false, + updated_at: false, + }, + dialogSearchVisible: false, + dialogSortVisible: false, + dialogOperationVisible: false, + dialogSingleVisible: true, + dialogMultipleVisible: false, + dialogExcleVisible: false, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'organizationActiveStore', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["activeIndex", "offset", "limit", "dataCount", "pageCount", "searchOptions", "sortOptions", "dialogSearchVisible", "dialogSortVisible", "dialogOperationVisible"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default organizationActiveStore; \ No newline at end of file diff --git a/src/stores/userManager.js b/src/stores/userManager.js new file mode 100644 index 0000000..cb7a037 --- /dev/null +++ b/src/stores/userManager.js @@ -0,0 +1,29 @@ +import { defineStore } from 'pinia'; +import { parse, stringify } from 'zipson'; + +const userManagerActiveStore = defineStore('userManager', { + state: () => ({ + // 持久化数据 + dialogVisible: false, + ruleForm: { + name: "", + department: "", + }, + }), + persist: { + enabled: true, // Store 中数据持久化生效 + strategies: [ + { + key: 'userManagerActive', // 存储的 key + storage: localStorage, // 存储位置 + paths: ["dialogVisible", "ruleForm"], // 需要持久化的字段 + serializer: { + deserialize: parse, + serialize: stringify, + }, + } + ] + }, +}); + +export default userManagerActiveStore; \ No newline at end of file diff --git a/src/utils/aes.js b/src/utils/aes.js new file mode 100644 index 0000000..074611a --- /dev/null +++ b/src/utils/aes.js @@ -0,0 +1,29 @@ +import CryptoJS from 'crypto-js' + +const KEY = CryptoJS.enc.Utf8.parse('BDQH'); + +export const AES_Encrypt = (plaintext) => { + let ciphertext = CryptoJS.AES.encrypt(plaintext, KEY, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }).toString(); + return ciphertext; +} + +export const encrypt = (plaintext) => { + if(plaintext !== null && plaintext !== undefined && plaintext !== "") { + return CryptoJS.AES.encrypt(plaintext, KEY, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }).toString(); + } +} + +export const decrypt = (plaintext) => { + if(plaintext !== null && plaintext !== undefined && !plaintext == "") { + return CryptoJS.AES.decrypt(plaintext, KEY, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }).toString(CryptoJS.enc.Utf8); + } +} \ No newline at end of file diff --git a/src/utils/hasNullOrEmptyPropertyWithTypeof.js b/src/utils/hasNullOrEmptyPropertyWithTypeof.js new file mode 100644 index 0000000..6af4b89 --- /dev/null +++ b/src/utils/hasNullOrEmptyPropertyWithTypeof.js @@ -0,0 +1,9 @@ +export const hasNullOrEmptyPropertyWithTypeof = (obj) => { + let hasNullOrEmpty = false; + for (const prop in obj) { + if (!(obj.hasOwnProperty(prop) && ((obj[prop] === null) || obj[prop] === undefined || (typeof obj[prop] === 'string' && obj[prop] === '')))) { + hasNullOrEmpty = true; + } + } + return hasNullOrEmpty; +} \ No newline at end of file diff --git a/src/utils/judgment.js b/src/utils/judgment.js new file mode 100644 index 0000000..9e23ea5 --- /dev/null +++ b/src/utils/judgment.js @@ -0,0 +1,5 @@ +export const judgment = (keyWord, key, value, val) => { + if (value !== null) { + keyWord[key] = value[val]; + } +} \ No newline at end of file diff --git a/src/views/404page.vue b/src/views/404page.vue new file mode 100644 index 0000000..ed1437f --- /dev/null +++ b/src/views/404page.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/src/views/Login.vue b/src/views/Login.vue new file mode 100644 index 0000000..b24164c --- /dev/null +++ b/src/views/Login.vue @@ -0,0 +1,254 @@ + + + + + diff --git a/src/views/Main.vue b/src/views/Main.vue new file mode 100644 index 0000000..7f4bb1e --- /dev/null +++ b/src/views/Main.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/src/views/aside/Data.vue b/src/views/aside/Data.vue new file mode 100644 index 0000000..ed63a93 --- /dev/null +++ b/src/views/aside/Data.vue @@ -0,0 +1,12 @@ + + + + + diff --git a/src/views/aside/Manager.vue b/src/views/aside/Manager.vue new file mode 100644 index 0000000..c96e887 --- /dev/null +++ b/src/views/aside/Manager.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/src/views/header/BSide.vue b/src/views/header/BSide.vue new file mode 100644 index 0000000..0dc1225 --- /dev/null +++ b/src/views/header/BSide.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/views/header/CSide.vue b/src/views/header/CSide.vue new file mode 100644 index 0000000..6a3088e --- /dev/null +++ b/src/views/header/CSide.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/views/header/Contest.vue b/src/views/header/Contest.vue new file mode 100644 index 0000000..03af6e2 --- /dev/null +++ b/src/views/header/Contest.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/src/views/header/Home.vue b/src/views/header/Home.vue new file mode 100644 index 0000000..0c9d66e --- /dev/null +++ b/src/views/header/Home.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/views/header/Insiders.vue b/src/views/header/Insiders.vue new file mode 100644 index 0000000..729a8ec --- /dev/null +++ b/src/views/header/Insiders.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/views/header/System.vue b/src/views/header/System.vue new file mode 100644 index 0000000..862ae9c --- /dev/null +++ b/src/views/header/System.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/src/views/header/Workspace.vue b/src/views/header/Workspace.vue new file mode 100644 index 0000000..a966d1b --- /dev/null +++ b/src/views/header/Workspace.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..1f9ce20 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,13 @@ +/** @type {import('tailwindcss').Config} */ +export default { + purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], + darkMode: false, // or 'media' or 'class' + content: [], + theme: { + extend: {}, + }, + variants: { + extend: {}, + }, + plugins: [], +} \ No newline at end of file diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..9b391a5 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,50 @@ +import { fileURLToPath, URL } from 'node:url' + +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' +import AutoImport from 'unplugin-auto-import/vite' +import Components from 'unplugin-vue-components/vite' +import { ElementPlusResolver } from 'unplugin-vue-components/resolvers' +import legacy from '@vitejs/plugin-legacy' + +// https://vitejs.dev/config/ +export default defineConfig({ + base: './', + publicPath: './', + plugins: [ + vue(), + AutoImport({ + resolvers: [ElementPlusResolver()], + }), + Components({ + resolvers: [ElementPlusResolver()], + directoryAsNamespace: true, + }), + legacy({ + target: ['ie>=11'], + additionalLegacyPolyfills: ['regenerator-runtime/runtime'], + }), + ], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + }, + server: { + //用来配置跨域 + host: '127.0.0.1', + port: 7002, + proxy: { + '/authentication': { + target: 'http://127.0.0.1:8011',//鉴权服务器地址 + changeOrigin: true, + rewrite: (path) => path.replace(/^\/authentication/, '') + }, + '/accountManager': { + target: 'http://127.0.0.1:8012',//资源服务器地址 + changeOrigin: true, + rewrite: (path) => path.replace(/^\/accountManager/, '') + }, + } + } +})