diff --git a/index.html b/index.html index b8fd5c0..fd58313 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - + diff --git a/package.json b/package.json index 3ce9130..462237a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", + "dev": "vite --host 0.0.0.0", "build": "vue-tsc -b && vite build", "upload": "bash ./upload.sh", "build-and-upload": "pnpm run build && pnpm run upload", @@ -36,6 +36,7 @@ "@unocss/preset-wind": "^0.65.2", "@vitejs/plugin-basic-ssl": "^1.2.0", "@vitejs/plugin-vue": "^5.2.1", + "@vueuse/core": "^13.4.0", "prettier": "3.4.2", "sass-embedded": "^1.86.0", "svg-sprite-loader": "^6.0.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 42c9648..72c39a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -75,6 +75,9 @@ importers: '@vitejs/plugin-vue': specifier: ^5.2.1 version: 5.2.1(vite@6.0.3(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.86.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.6.3)) + '@vueuse/core': + specifier: ^13.4.0 + version: 13.4.0(vue@3.5.13(typescript@5.6.3)) prettier: specifier: 3.4.2 version: 3.4.2 @@ -92,7 +95,7 @@ importers: version: 0.65.2(postcss@5.2.18)(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.86.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.6.3)) unplugin-auto-import: specifier: ^0.19.0 - version: 0.19.0(@nuxt/kit@3.14.1592(rollup@4.28.1))(rollup@4.28.1) + version: 0.19.0(@nuxt/kit@3.14.1592(rollup@4.28.1))(@vueuse/core@13.4.0(vue@3.5.13(typescript@5.6.3)))(rollup@4.28.1) vite: specifier: ^6.0.1 version: 6.0.3(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.86.0)(tsx@4.19.2) @@ -653,6 +656,9 @@ packages: '@types/qs@6.9.17': resolution: {integrity: sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ==} + '@types/web-bluetooth@0.0.21': + resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} + '@unocss/astro@0.65.2': resolution: {integrity: sha512-lpGoleJToxaYeN5LTGrNbvbXATNWswgoQwlljIJ9kWOjx4NbGC71pXRvDQSb9yRFDTCr5S2hMtupna4ulrHisA==} peerDependencies: @@ -801,6 +807,19 @@ packages: '@vue/shared@3.5.13': resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} + '@vueuse/core@13.4.0': + resolution: {integrity: sha512-OnK7zW3bTq/QclEk17+vDFN3tuAm8ONb9zQUIHrYQkkFesu3WeGUx/3YzpEp+ly53IfDAT9rsYXgGW6piNZC5w==} + peerDependencies: + vue: ^3.5.0 + + '@vueuse/metadata@13.4.0': + resolution: {integrity: sha512-CPDQ/IgOeWbqItg1c/pS+Ulum63MNbpJ4eecjFJqgD/JUCJ822zLfpw6M9HzSvL6wbzMieOtIAW/H8deQASKHg==} + + '@vueuse/shared@13.4.0': + resolution: {integrity: sha512-+AxuKbw8R1gYy5T21V5yhadeNM7rJqb4cPaRI9DdGnnNl3uqXh+unvQ3uCaA2DjYLbNr1+l7ht/B4qEsRegX6A==} + peerDependencies: + vue: ^3.5.0 + acorn@8.14.0: resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} @@ -3058,6 +3077,8 @@ snapshots: '@types/qs@6.9.17': {} + '@types/web-bluetooth@0.0.21': {} + '@unocss/astro@0.65.2(rollup@4.28.1)(vite@6.0.3(@types/node@22.10.1)(jiti@2.4.1)(sass-embedded@1.86.0)(tsx@4.19.2))(vue@3.5.13(typescript@5.6.3))': dependencies: '@unocss/core': 0.65.2 @@ -3306,6 +3327,19 @@ snapshots: '@vue/shared@3.5.13': {} + '@vueuse/core@13.4.0(vue@3.5.13(typescript@5.6.3))': + dependencies: + '@types/web-bluetooth': 0.0.21 + '@vueuse/metadata': 13.4.0 + '@vueuse/shared': 13.4.0(vue@3.5.13(typescript@5.6.3)) + vue: 3.5.13(typescript@5.6.3) + + '@vueuse/metadata@13.4.0': {} + + '@vueuse/shared@13.4.0(vue@3.5.13(typescript@5.6.3))': + dependencies: + vue: 3.5.13(typescript@5.6.3) + acorn@8.14.0: {} alien-signals@0.2.2: {} @@ -5161,7 +5195,7 @@ snapshots: - supports-color - vue - unplugin-auto-import@0.19.0(@nuxt/kit@3.14.1592(rollup@4.28.1))(rollup@4.28.1): + unplugin-auto-import@0.19.0(@nuxt/kit@3.14.1592(rollup@4.28.1))(@vueuse/core@13.4.0(vue@3.5.13(typescript@5.6.3)))(rollup@4.28.1): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.3(rollup@4.28.1) @@ -5172,6 +5206,7 @@ snapshots: unplugin: 2.1.0 optionalDependencies: '@nuxt/kit': 3.14.1592(rollup@4.28.1) + '@vueuse/core': 13.4.0(vue@3.5.13(typescript@5.6.3)) transitivePeerDependencies: - rollup diff --git a/public/images/close-clip.png b/public/images/close-clip.png new file mode 100644 index 0000000..21663e5 Binary files /dev/null and b/public/images/close-clip.png differ diff --git a/public/images/close.png b/public/images/close.png new file mode 100644 index 0000000..c720740 Binary files /dev/null and b/public/images/close.png differ diff --git a/public/images/drawer-header.png b/public/images/drawer-header.png new file mode 100644 index 0000000..4a186a1 Binary files /dev/null and b/public/images/drawer-header.png differ diff --git a/public/images/ranking-border.png b/public/images/ranking-border.png new file mode 100644 index 0000000..459f099 Binary files /dev/null and b/public/images/ranking-border.png differ diff --git a/public/images/ranking-right-icon.png b/public/images/ranking-right-icon.png new file mode 100644 index 0000000..04fe1ea Binary files /dev/null and b/public/images/ranking-right-icon.png differ diff --git a/public/images/tab-border-choose.png b/public/images/tab-border-choose.png new file mode 100644 index 0000000..be73f4c Binary files /dev/null and b/public/images/tab-border-choose.png differ diff --git a/public/images/tab-border.png b/public/images/tab-border.png new file mode 100644 index 0000000..93dc78d Binary files /dev/null and b/public/images/tab-border.png differ diff --git a/public/images/top-bg.png b/public/images/top-bg.png new file mode 100644 index 0000000..b7da46d Binary files /dev/null and b/public/images/top-bg.png differ diff --git a/src/components/modal/Modal.vue b/src/components/modal/Modal.vue new file mode 100644 index 0000000..fad473b --- /dev/null +++ b/src/components/modal/Modal.vue @@ -0,0 +1,45 @@ + + + + + \ No newline at end of file diff --git a/src/components/pagination/index.vue b/src/components/pagination/index.vue new file mode 100644 index 0000000..6543a9c --- /dev/null +++ b/src/components/pagination/index.vue @@ -0,0 +1,101 @@ + + + diff --git a/src/composables/useLazyLoad.ts b/src/composables/useLazyLoad.ts new file mode 100644 index 0000000..36c71ef --- /dev/null +++ b/src/composables/useLazyLoad.ts @@ -0,0 +1,15 @@ +import LoadingComponent from "@/components/LoadingComponent.vue"; +import ErrorComponent from "@/components/ErrorComponent.vue"; + + +export const asyncComponentConfig = { + loadingComponent: LoadingComponent, + errorComponent: ErrorComponent, + onError: (_error: Error, retry: () => void, fail: () => void, attempts: number) => { + if (attempts <= 3) { + retry(); + } else { + fail(); + } + } + }; \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 8596b9b..33ec1a2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,6 @@ import { createApp } from 'vue' import '@unocss/reset/tailwind-compat.css' -// import './style.css' +import './style.css' import 'uno.css'; import App from './App.vue' // Pinia 持久化 diff --git a/src/router/privateRoutes.ts b/src/router/privateRoutes.ts index 1fe1248..25f5a87 100644 --- a/src/router/privateRoutes.ts +++ b/src/router/privateRoutes.ts @@ -8,4 +8,13 @@ export const privateRoutes = [ }, component:()=>import('../views/home.vue') }, + { + path:"/app", + name:'app', + meta:{ + title:`${new Date().getFullYear()}深泉教育招生数据可视化`, + role:['admin'] + }, + component:()=>import('../views/app.vue') + } ]; diff --git a/src/style.css b/src/style.css index 506721f..f0dd03c 100644 --- a/src/style.css +++ b/src/style.css @@ -1,156 +1,5 @@ -* { - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - touch-action: manipulation; - -webkit-touch-callout: none; - box-sizing: border-box; -} - -html { - line-height: 1; - -webkit-text-size-adjust: 100%; -} -body { - margin: 0; -} -main { - display: block; -} -h1 { - font-size: 2em; - margin: 0.67em 0; -} -hr { - box-sizing: content-box; - height: 0; - overflow: visible; -} -pre { - font-family: monospace, monospace; - font-size: 1em; -} -a { - background-color: transparent; -} -abbr[title] { - border-bottom: none; - text-decoration: underline; - text-decoration: underline dotted; -} -b, -strong { - font-weight: bolder; -} -code, -kbd, -samp { - font-family: monospace, monospace; - font-size: 1em; -} -small { - font-size: 80%; -} -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sub { - bottom: -0.25em; -} -sup { - top: -0.5em; -} -img { - border-style: none; -} -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; -} -button, -input { - overflow: visible; -} -button, -select { - text-transform: none; -} -[type="button"], -[type="reset"], -[type="submit"], -button { - -webkit-appearance: button; -} -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner, -button::-moz-focus-inner { - border-style: none; - padding: 0; -} -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring, -button:-moz-focusring { - outline: 1px dotted ButtonText; -} -fieldset { - padding: 0.35em 0.75em 0.625em; -} -legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; -} -progress { - vertical-align: baseline; -} -textarea { - overflow: auto; -} -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; - padding: 0; -} -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} -[type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; -} -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; -} -details { - display: block; -} -summary { - display: list-item; -} -template { - display: none; -} -[hidden] { - display: none; -} +@media (max-width: 1919px){ + html{ + font-size: calc(100vw / 93.75); + } +} \ No newline at end of file diff --git a/src/styles/text-color.scss b/src/styles/text-color.scss index d371f92..186f8be 100644 --- a/src/styles/text-color.scss +++ b/src/styles/text-color.scss @@ -8,7 +8,7 @@ left: 0; z-index: auto; color: #fff; - -webkit-mask: linear-gradient(to bottom, transparent, #000); + -webkit-mask: var(--mask-gradient, linear-gradient(to bottom, transparent, #000)); white-space: nowrap; padding-right: 4px; } diff --git a/src/utils/device.ts b/src/utils/device.ts new file mode 100644 index 0000000..860fd73 --- /dev/null +++ b/src/utils/device.ts @@ -0,0 +1,15 @@ +export const usePlatformType = () => { + const userAgent = navigator.userAgent.toLowerCase(); + + // 判断是否为移动设备 + const isMobile = /mobile|android|iphone|ipad|ipod|windows phone/i.test(userAgent); + + // 判断是否为 APP 环境(这里假设 APP 环境会在 userAgent 中包含特定标识) + const isApp = /myapp|appname/i.test(userAgent); // 请根据实际 APP 的标识修改 + + return { + isMobile, + isApp, + isPC: !isMobile + }; +} \ No newline at end of file diff --git a/src/views/app.vue b/src/views/app.vue new file mode 100644 index 0000000..a9a2d83 --- /dev/null +++ b/src/views/app.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/views/appComponents/ChargingRanking.vue b/src/views/appComponents/ChargingRanking.vue new file mode 100644 index 0000000..827f217 --- /dev/null +++ b/src/views/appComponents/ChargingRanking.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/views/appComponents/HeaderStatic.vue b/src/views/appComponents/HeaderStatic.vue new file mode 100644 index 0000000..256c36b --- /dev/null +++ b/src/views/appComponents/HeaderStatic.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/views/appComponents/MobileDrawer.vue b/src/views/appComponents/MobileDrawer.vue new file mode 100644 index 0000000..504b59e --- /dev/null +++ b/src/views/appComponents/MobileDrawer.vue @@ -0,0 +1,95 @@ + + + + + \ No newline at end of file diff --git a/src/views/appComponents/OfflineStatic.vue b/src/views/appComponents/OfflineStatic.vue new file mode 100644 index 0000000..3d489f2 --- /dev/null +++ b/src/views/appComponents/OfflineStatic.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/src/views/appComponents/OnlineStatic.vue b/src/views/appComponents/OnlineStatic.vue new file mode 100644 index 0000000..4aec1e7 --- /dev/null +++ b/src/views/appComponents/OnlineStatic.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/views/appComponents/SixStatistics.vue b/src/views/appComponents/SixStatistics.vue new file mode 100644 index 0000000..1195e51 --- /dev/null +++ b/src/views/appComponents/SixStatistics.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/src/views/appComponents/TabStatic.vue b/src/views/appComponents/TabStatic.vue new file mode 100644 index 0000000..a4dfd00 --- /dev/null +++ b/src/views/appComponents/TabStatic.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/views/appComponents/WinCustomer.vue b/src/views/appComponents/WinCustomer.vue new file mode 100644 index 0000000..431cdc8 --- /dev/null +++ b/src/views/appComponents/WinCustomer.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/src/views/appComponents/appEchart/PaymentChart.vue b/src/views/appComponents/appEchart/PaymentChart.vue new file mode 100644 index 0000000..73a10b0 --- /dev/null +++ b/src/views/appComponents/appEchart/PaymentChart.vue @@ -0,0 +1,64 @@ + + + + + diff --git a/src/views/appComponents/appEchart/StudentStatus.vue b/src/views/appComponents/appEchart/StudentStatus.vue new file mode 100644 index 0000000..28a9218 --- /dev/null +++ b/src/views/appComponents/appEchart/StudentStatus.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/views/components/ChargingRanking.vue b/src/views/components/ChargingRanking.vue index 16b561d..1673571 100644 --- a/src/views/components/ChargingRanking.vue +++ b/src/views/components/ChargingRanking.vue @@ -9,12 +9,12 @@
-