web-core-tcm 0.0.6 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/package.json +20 -3
  2. package/src/{coreApi/api → api}/algorithm/index.ts +6 -0
  3. package/src/api/authorization/alova/implement/index.ts +1 -0
  4. package/src/{coreApi/api → api}/authorization/alova/index.ts +5 -0
  5. package/src/api/authorization/index.ts +2 -0
  6. package/src/api/check/alova/implement/index.ts +1 -0
  7. package/src/{coreApi/api → api}/check/alova/index.ts +5 -0
  8. package/src/{coreApi/api → api}/check/check.ts +1 -1
  9. package/src/api/check/index.ts +2 -0
  10. package/src/{coreApi/api → api}/config/index.ts +2 -0
  11. package/src/api/doctor/alova/implement/index.ts +1 -0
  12. package/src/{coreApi/api → api}/doctor/alova/index.ts +5 -0
  13. package/src/api/doctor/index.ts +2 -0
  14. package/src/api/index.ts +12 -0
  15. package/src/api/metric/implement/index.ts +1 -0
  16. package/src/api/metric/index.ts +2 -0
  17. package/src/api/oauth/alova/implement/index.ts +1 -0
  18. package/src/{coreApi/api → api}/oauth/alova/index.ts +5 -0
  19. package/src/api/oauth/index.ts +2 -0
  20. package/src/api/outpatient/alova/implement/index.ts +1 -0
  21. package/src/{coreApi/api → api}/outpatient/alova/index.ts +5 -0
  22. package/src/api/outpatient/index.ts +2 -0
  23. package/src/api/patient/alova/implement/index.ts +2 -0
  24. package/src/{coreApi/api → api}/patient/alova/index.ts +6 -0
  25. package/src/api/patient/index.ts +4 -0
  26. package/src/api/prescription/alova/implement/index.ts +2 -0
  27. package/src/{coreApi/api → api}/prescription/alova/index.ts +5 -0
  28. package/src/api/prescription/index.ts +3 -0
  29. package/src/api/scientist/alova/implement/index.ts +1 -0
  30. package/src/{coreApi/api → api}/scientist/alova/index.ts +5 -0
  31. package/src/api/scientist/index.ts +2 -0
  32. package/src/index.ts +2 -0
  33. package/src/layouts/UserLayout.vue +106 -0
  34. package/src/pages/LoginPage.vue +32 -0
  35. package/src/proto/Images.proto +7 -0
  36. package/src/proto/WaveMap.proto +10 -0
  37. package/src/proto/index.ts +2 -0
  38. package/src/proto/types/Images_pb.ts +48 -0
  39. package/src/proto/types/WaveMap_pb.ts +59 -0
  40. package/src/router/index.ts +37 -0
  41. package/src/router/routes.ts +14 -0
  42. package/src/util/RichTextUtil.ts +5 -0
  43. package/src/util/datetime.ts +43 -0
  44. package/src/util/export.ts +46 -0
  45. package/src/util/helper.js +58 -0
  46. package/src/util/image.ts +28 -0
  47. package/src/util/number.ts +146 -0
  48. package/src/util/s256.js +30 -0
  49. package/src/util/secret.ts +60 -0
  50. package/src/util/string.ts +121 -0
  51. /package/src/{coreApi/api → api}/algorithm/comprehensiveAlgorithm.ts +0 -0
  52. /package/src/{coreApi/api → api}/algorithm/inquiriesAlgorithm.ts +0 -0
  53. /package/src/{coreApi/api → api}/algorithm/inspectionsAlgorithm.ts +0 -0
  54. /package/src/{coreApi/api → api}/algorithm/lisemsAlgorithm.ts +0 -0
  55. /package/src/{coreApi/api → api}/algorithm/pulsationsAlgorithm.ts +0 -0
  56. /package/src/{coreApi/api → api}/authorization/alova/apiDefinitions.ts +0 -0
  57. /package/src/{coreApi/api → api}/authorization/alova/createApis.ts +0 -0
  58. /package/src/{coreApi/api → api}/authorization/alova/globals.d.ts +0 -0
  59. /package/src/{coreApi/api → api}/authorization/alova/implement/authorization.ts +0 -0
  60. /package/src/{coreApi/api → api}/authorization/authorization.ts +0 -0
  61. /package/src/{coreApi/api → api}/check/alova/apiDefinitions.ts +0 -0
  62. /package/src/{coreApi/api → api}/check/alova/createApis.ts +0 -0
  63. /package/src/{coreApi/api → api}/check/alova/globals.d.ts +0 -0
  64. /package/src/{coreApi/api → api}/check/alova/implement/check.ts +0 -0
  65. /package/src/{coreApi/api → api}/config/alova/index.ts +0 -0
  66. /package/src/{coreApi/api → api}/device/device.js +0 -0
  67. /package/src/{coreApi/api → api}/doctor/alova/apiDefinitions.ts +0 -0
  68. /package/src/{coreApi/api → api}/doctor/alova/createApis.ts +0 -0
  69. /package/src/{coreApi/api → api}/doctor/alova/globals.d.ts +0 -0
  70. /package/src/{coreApi/api → api}/doctor/alova/implement/doctor.ts +0 -0
  71. /package/src/{coreApi/api → api}/doctor/doctor.ts +0 -0
  72. /package/src/{coreApi/api → api}/metric/implement/metric.ts +0 -0
  73. /package/src/{coreApi/api → api}/metric/metric.ts +0 -0
  74. /package/src/{coreApi/api → api}/oauth/alova/apiDefinitions.ts +0 -0
  75. /package/src/{coreApi/api → api}/oauth/alova/createApis.ts +0 -0
  76. /package/src/{coreApi/api → api}/oauth/alova/globals.d.ts +0 -0
  77. /package/src/{coreApi/api → api}/oauth/alova/implement/oauth.ts +0 -0
  78. /package/src/{coreApi/api → api}/oauth/oauth.ts +0 -0
  79. /package/src/{coreApi/api → api}/outpatient/alova/apiDefinitions.ts +0 -0
  80. /package/src/{coreApi/api → api}/outpatient/alova/createApis.ts +0 -0
  81. /package/src/{coreApi/api → api}/outpatient/alova/globals.d.ts +0 -0
  82. /package/src/{coreApi/api → api}/outpatient/alova/implement/outpatient.ts +0 -0
  83. /package/src/{coreApi/api → api}/outpatient/outpatient.ts +0 -0
  84. /package/src/{coreApi/api → api}/patient/alova/apiDefinitions.ts +0 -0
  85. /package/src/{coreApi/api → api}/patient/alova/createApis.ts +0 -0
  86. /package/src/{coreApi/api → api}/patient/alova/globals.d.ts +0 -0
  87. /package/src/{coreApi/api → api}/patient/alova/implement/meta.ts +0 -0
  88. /package/src/{coreApi/api → api}/patient/alova/implement/patient.ts +0 -0
  89. /package/src/{coreApi/api → api}/patient/core.ts +0 -0
  90. /package/src/{coreApi/api → api}/patient/meta.ts +0 -0
  91. /package/src/{coreApi/api → api}/patient/patient.ts +0 -0
  92. /package/src/{coreApi/api → api}/prescription/alova/apiDefinitions.ts +0 -0
  93. /package/src/{coreApi/api → api}/prescription/alova/createApis.ts +0 -0
  94. /package/src/{coreApi/api → api}/prescription/alova/globals.d.ts +0 -0
  95. /package/src/{coreApi/api → api}/prescription/alova/implement/herbal.ts +0 -0
  96. /package/src/{coreApi/api → api}/prescription/alova/implement/prescription.ts +0 -0
  97. /package/src/{coreApi/api → api}/prescription/herbal.ts +0 -0
  98. /package/src/{coreApi/api → api}/prescription/prescription.ts +0 -0
  99. /package/src/{coreApi/api → api}/scientist/alova/apiDefinitions.ts +0 -0
  100. /package/src/{coreApi/api → api}/scientist/alova/createApis.ts +0 -0
  101. /package/src/{coreApi/api → api}/scientist/alova/globals.d.ts +0 -0
  102. /package/src/{coreApi/api → api}/scientist/alova/implement/scientist.ts +0 -0
  103. /package/src/{coreApi/api → api}/scientist/scientist.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-core-tcm",
3
- "version": "0.0.6",
3
+ "version": "0.0.9",
4
4
  "description": "Core",
5
5
  "productName": "Core",
6
6
  "author": "wywywywywywywywywy <qa123456_0714@qq.com>",
@@ -18,9 +18,24 @@
18
18
  "@quasar/extras": "^1.16.4",
19
19
  "quasar": "^2.16.0",
20
20
  "vue": "^3.5.22",
21
- "vue-router": "^4.0.12"
21
+ "vue-router": "^4.0.12",
22
+ "@alova/adapter-axios": "^1.2.6",
23
+ "@alova/mock": "^1.5.1",
24
+ "@alova/scene-vue": "^1.6.2",
25
+ "@vueuse/core": "^11.0.3",
26
+ "alova": "^3.3.4",
27
+ "pinyin": "^4.0.0",
28
+ "builder-pattern": "^2.2.0",
29
+ "compressorjs": "^1.2.1",
30
+ "dotenv-cli": "^7.4.2",
31
+ "echarts": "^5.5.0",
32
+ "ftdi-d2xx": "^1.3.1",
33
+ "jwt-decode": "^4.0.0",
34
+ "papaparse": "^5.5.3",
35
+ "punycode": "^2.3.1"
22
36
  },
23
37
  "devDependencies": {
38
+ "@alova/wormhole": "^1.2.0",
24
39
  "@eslint/js": "^9.14.0",
25
40
  "eslint": "^9.14.0",
26
41
  "eslint-plugin-vue": "^10.4.0",
@@ -34,7 +49,9 @@
34
49
  "@types/node": "^20.5.9",
35
50
  "@quasar/app-vite": "^2.1.0",
36
51
  "autoprefixer": "^10.4.2",
37
- "typescript": "^5.9.2"
52
+ "typescript": "^5.9.2",
53
+ "@bufbuild/buf": "^1.57.2",
54
+ "@bufbuild/protoc-gen-es": "^2.9.0"
38
55
  },
39
56
  "engines": {
40
57
  "node": "^28 || ^26 || ^24 || ^22 || ^20",
@@ -42,3 +42,9 @@ export const comprehensiveAlgorithmService = createAlova({
42
42
  requestAdapter: adapterFetch(),
43
43
  responded: responded
44
44
  });
45
+
46
+ export * from './comprehensiveAlgorithm';
47
+ export * from './inquiriesAlgorithm';
48
+ export * from './inspectionsAlgorithm';
49
+ export * from './lisemsAlgorithm';
50
+ export * from './pulsationsAlgorithm';
@@ -0,0 +1 @@
1
+ export * from './authorization';
@@ -19,3 +19,8 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
19
19
  mountApis(Apis);
20
20
 
21
21
  export default Apis;
22
+
23
+ export * from './apiDefinitions';
24
+ export * from './createApis';
25
+ export * from './globals';
26
+ export * from './implement/index';
@@ -0,0 +1,2 @@
1
+ export * from './authorization';
2
+ export * from './alova/index';
@@ -0,0 +1 @@
1
+ export * from './check';
@@ -19,3 +19,8 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
19
19
  mountApis(Apis);
20
20
 
21
21
  export default Apis;
22
+
23
+ export * from './apiDefinitions';
24
+ export * from './createApis';
25
+ export * from './globals.d';
26
+ export * from './implement/index';
@@ -9,7 +9,7 @@ import { AlovaPrescription } from 'src/api/prescription/alova/implement/prescrip
9
9
  import type { PrescriptionState } from 'src/api/prescription/alova/globals';
10
10
  import { extractPlainText } from 'src/util/RichTextUtil';
11
11
  import { Doctor } from 'src/api/doctor/doctor';
12
- import { Herbal } from '../prescription/herbal';
12
+ import { Herbal } from 'src/api/prescription';
13
13
  import type { IBuilder } from 'builder-pattern';
14
14
  import { Builder } from 'builder-pattern';
15
15
 
@@ -0,0 +1,2 @@
1
+ export * from './check';
2
+ export * from './alova/index';
@@ -126,3 +126,5 @@ export const getServiceEndpoint = (serviceType: ServiceType,env?: EnvironmentTyp
126
126
  }
127
127
  throw new Error('环境错误')
128
128
  }
129
+
130
+ export * from './alova/index';
@@ -0,0 +1 @@
1
+ export * from './doctor';
@@ -19,3 +19,8 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
19
19
  mountApis(Apis);
20
20
 
21
21
  export default Apis;
22
+
23
+ export * from './apiDefinitions';
24
+ export * from './createApis';
25
+ export * from './globals';
26
+ export * from './implement/index';
@@ -0,0 +1,2 @@
1
+ export * from './doctor';
2
+ export * from './alova';
@@ -0,0 +1,12 @@
1
+ export * as Algorithm from './algorithm/index'
2
+ export * as Authorization from './authorization/index'
3
+ export * as Check from './check/index'
4
+ export * as Config from './config/index'
5
+ export * as Doctor from './doctor/index'
6
+ export * as Metric from './metric/index'
7
+ export * as OAuth from './oauth/index'
8
+ export * as OutPatient from './outpatient/index'
9
+ export * as Patient from './patient/index'
10
+ export * as Prescription from './prescription/index'
11
+ export * as Scientist from './scientist/index'
12
+ export * from './device/device'
@@ -0,0 +1 @@
1
+ export * from './metric';
@@ -0,0 +1,2 @@
1
+ export * from './implement/index';
2
+ export * from './metric';
@@ -0,0 +1 @@
1
+ export * from './oauth';
@@ -18,3 +18,8 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
18
18
  mountApis(Apis);
19
19
 
20
20
  export default Apis;
21
+
22
+ export * from './apiDefinitions';
23
+ export * from './createApis';
24
+ export * from './globals';
25
+ export * from './implement/index';
@@ -0,0 +1,2 @@
1
+ export * from './oauth';
2
+ export * from './alova/index';
@@ -0,0 +1 @@
1
+ export * from './outpatient';
@@ -19,3 +19,8 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
19
19
  mountApis(Apis);
20
20
 
21
21
  export default Apis;
22
+
23
+ export * from './apiDefinitions';
24
+ export * from './createApis';
25
+ export * from './globals';
26
+ export * from './implement/index';
@@ -0,0 +1,2 @@
1
+ export * from './outpatient';
2
+ export * from './alova/index';
@@ -0,0 +1,2 @@
1
+ export * from './meta';
2
+ export * from './patient';
@@ -19,3 +19,9 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
19
19
  mountApis(Apis);
20
20
 
21
21
  export default Apis;
22
+
23
+ export * from './apiDefinitions';
24
+ export * from './createApis';
25
+ export * from './globals.d';
26
+ export * from './implement/index';
27
+
@@ -0,0 +1,4 @@
1
+ export * from './core';
2
+ export * from './meta';
3
+ export * from './patient';
4
+ export * from './alova/index';
@@ -0,0 +1,2 @@
1
+ export * from './herbal';
2
+ export * from './prescription';
@@ -19,3 +19,8 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
19
19
  mountApis(Apis);
20
20
 
21
21
  export default Apis;
22
+
23
+ export * from './apiDefinitions';
24
+ export * from './createApis';
25
+ export * from './globals.d';
26
+ export * from './implement/index';
@@ -0,0 +1,3 @@
1
+ export * from './herbal';
2
+ export * from './prescription';
3
+ export * from './alova/index';
@@ -0,0 +1 @@
1
+ export * from './scientist';
@@ -19,3 +19,8 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
19
19
  mountApis(Apis);
20
20
 
21
21
  export default Apis;
22
+
23
+ export * from './apiDefinitions';
24
+ export * from './createApis';
25
+ export * from './globals.d';
26
+ export * from './implement/index';
@@ -0,0 +1,2 @@
1
+ export * from './scientist';
2
+ export * from './alova/index';
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './api'
2
+ export * from './proto/index'
@@ -0,0 +1,106 @@
1
+ <template>
2
+ <q-layout view="hHh lpR fFf">
3
+ <!-- 顶部导航栏 -->
4
+ <q-header elevated class="bg-primary text-white">
5
+ <q-toolbar>
6
+ <q-toolbar-title>用户中心</q-toolbar-title>
7
+
8
+ <!-- 顶部导航菜单 -->
9
+ <q-tabs
10
+ v-model="currentTab"
11
+ inline-label
12
+ class="bg-primary text-white"
13
+ active-color="white"
14
+ indicator-color="white"
15
+ >
16
+ <q-tab
17
+ v-for="tab in userTabs"
18
+ :key="tab.path"
19
+ :name="tab.path"
20
+ :icon="tab.icon"
21
+ :label="tab.label"
22
+ @click="navigateTo(tab.path)"
23
+ />
24
+ </q-tabs>
25
+
26
+ <q-space />
27
+
28
+ <!-- 用户菜单 -->
29
+ <q-btn-dropdown flat :label="username">
30
+ <q-list>
31
+ <q-item clickable v-close-popup @click="navigateTo('/user/profile')">
32
+ <q-item-section avatar>
33
+ <q-icon name="person" />
34
+ </q-item-section>
35
+ <q-item-section>个人资料</q-item-section>
36
+ </q-item>
37
+
38
+
39
+ <q-separator />
40
+
41
+ <q-item clickable v-close-popup @click="logout">
42
+ <q-item-section avatar>
43
+ <q-icon name="logout" color="negative" />
44
+ </q-item-section>
45
+ <q-item-section class="text-negative">退出登录</q-item-section>
46
+ </q-item>
47
+ </q-list>
48
+ </q-btn-dropdown>
49
+ </q-toolbar>
50
+ </q-header>
51
+
52
+ <!-- 页面内容区域 -->
53
+ <q-page-container>
54
+ <router-view />
55
+ </q-page-container>
56
+ </q-layout>
57
+ </template>
58
+
59
+ <script setup lang="ts">
60
+ import {computed,ref } from 'vue';
61
+ import { useRouter, useRoute } from 'vue-router';
62
+
63
+ const router = useRouter();
64
+ const route = useRoute();
65
+
66
+
67
+ const currentTab = computed(() => route.path);
68
+ setInterval(() => {
69
+ username.value = localStorage.getItem('user') ? JSON.parse(localStorage.getItem('user') || '{}').username : '用户';
70
+ }, 100);
71
+ const username = ref(localStorage.getItem('user') ? JSON.parse(localStorage.getItem('user') || '{}').username : '用户');
72
+ const userTabs = [
73
+ {
74
+ label: '首页',
75
+ icon: 'home',
76
+ path: '/user/home'
77
+ }
78
+ ];
79
+
80
+ async function navigateTo(path: string) {
81
+ await router.push(path);
82
+ }
83
+
84
+ async function logout() {
85
+ await router.push('/login');
86
+ }
87
+ </script>
88
+
89
+ <style scoped>
90
+ .q-toolbar {
91
+ min-height: 60px;
92
+ }
93
+
94
+ .q-tabs {
95
+ background: transparent !important;
96
+ }
97
+
98
+ .q-tab {
99
+ margin: 0 4px;
100
+ border-radius: 8px 8px 0 0;
101
+ }
102
+
103
+ .q-tab--active {
104
+ background: rgba(255, 255, 255, 0.2);
105
+ }
106
+ </style>
@@ -0,0 +1,32 @@
1
+ <script setup lang="ts">
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <div class="auth-container">
7
+ </div>
8
+ </template>
9
+
10
+ <style scoped>
11
+ .auth-container {
12
+ min-height: 100vh;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
17
+ padding: 20px;
18
+ }
19
+
20
+ .auth-card {
21
+ width: 100%;
22
+ max-width: 400px;
23
+ background: rgba(255, 255, 255, 0.95);
24
+ backdrop-filter: blur(10px);
25
+ }
26
+
27
+ @media (max-width: 480px) {
28
+ .auth-card {
29
+ max-width: 100%;
30
+ }
31
+ }
32
+ </style>
@@ -0,0 +1,7 @@
1
+ syntax = "proto3";
2
+ message Image {
3
+ bytes bytes = 1;
4
+ }
5
+ message Images {
6
+ repeated Image images = 1;
7
+ }
@@ -0,0 +1,10 @@
1
+ syntax = "proto3";
2
+
3
+ message Wave {
4
+ repeated double values = 1; // 单个数组(对应 number[])
5
+ }
6
+
7
+ message WaveMap {
8
+ map<string, Wave> origin = 1; // 对应 origin: {[key: string]: number[]}
9
+ map<string, Wave> smooth = 2; // 对应 smooth: {[key: string]: number[]}
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './types/WaveMap_pb';
2
+ export * from './types/Images_pb';
@@ -0,0 +1,48 @@
1
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
+ // @generated from file Images.proto (syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { Message } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * Describes the file Images.proto.
11
+ */
12
+ export const file_Images: GenFile = /*@__PURE__*/
13
+ fileDesc("CgxJbWFnZXMucHJvdG8iFgoFSW1hZ2USDQoFYnl0ZXMYASABKAwiIAoGSW1hZ2VzEhYKBmltYWdlcxgBIAMoCzIGLkltYWdlYgZwcm90bzM");
14
+
15
+ /**
16
+ * @generated from message Image
17
+ */
18
+ export type Image = Message<"Image"> & {
19
+ /**
20
+ * @generated from field: bytes bytes = 1;
21
+ */
22
+ bytes: Uint8Array;
23
+ };
24
+
25
+ /**
26
+ * Describes the message Image.
27
+ * Use `create(ImageSchema)` to create a new message.
28
+ */
29
+ export const ImageSchema: GenMessage<Image> = /*@__PURE__*/
30
+ messageDesc(file_Images, 0);
31
+
32
+ /**
33
+ * @generated from message Images
34
+ */
35
+ export type Images = Message<"Images"> & {
36
+ /**
37
+ * @generated from field: repeated Image images = 1;
38
+ */
39
+ images: Image[];
40
+ };
41
+
42
+ /**
43
+ * Describes the message Images.
44
+ * Use `create(ImagesSchema)` to create a new message.
45
+ */
46
+ export const ImagesSchema: GenMessage<Images> = /*@__PURE__*/
47
+ messageDesc(file_Images, 1);
48
+
@@ -0,0 +1,59 @@
1
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
+ // @generated from file WaveMap.proto (syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
6
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { Message } from "@bufbuild/protobuf";
8
+
9
+ /**
10
+ * Describes the file WaveMap.proto.
11
+ */
12
+ export const file_WaveMap: GenFile = /*@__PURE__*/
13
+ fileDesc("Cg1XYXZlTWFwLnByb3RvIhYKBFdhdmUSDgoGdmFsdWVzGAEgAygBIsEBCgdXYXZlTWFwEiQKBm9yaWdpbhgBIAMoCzIULldhdmVNYXAuT3JpZ2luRW50cnkSJAoGc21vb3RoGAIgAygLMhQuV2F2ZU1hcC5TbW9vdGhFbnRyeRo0CgtPcmlnaW5FbnRyeRILCgNrZXkYASABKAkSFAoFdmFsdWUYAiABKAsyBS5XYXZlOgI4ARo0CgtTbW9vdGhFbnRyeRILCgNrZXkYASABKAkSFAoFdmFsdWUYAiABKAsyBS5XYXZlOgI4AWIGcHJvdG8z");
14
+
15
+ /**
16
+ * @generated from message Wave
17
+ */
18
+ export type Wave = Message<"Wave"> & {
19
+ /**
20
+ * 单个数组(对应 number[])
21
+ *
22
+ * @generated from field: repeated double values = 1;
23
+ */
24
+ values: number[];
25
+ };
26
+
27
+ /**
28
+ * Describes the message Wave.
29
+ * Use `create(WaveSchema)` to create a new message.
30
+ */
31
+ export const WaveSchema: GenMessage<Wave> = /*@__PURE__*/
32
+ messageDesc(file_WaveMap, 0);
33
+
34
+ /**
35
+ * @generated from message WaveMap
36
+ */
37
+ export type WaveMap = Message<"WaveMap"> & {
38
+ /**
39
+ * 对应 origin: {[key: string]: number[]}
40
+ *
41
+ * @generated from field: map<string, Wave> origin = 1;
42
+ */
43
+ origin: { [key: string]: Wave };
44
+
45
+ /**
46
+ * 对应 smooth: {[key: string]: number[]}
47
+ *
48
+ * @generated from field: map<string, Wave> smooth = 2;
49
+ */
50
+ smooth: { [key: string]: Wave };
51
+ };
52
+
53
+ /**
54
+ * Describes the message WaveMap.
55
+ * Use `create(WaveMapSchema)` to create a new message.
56
+ */
57
+ export const WaveMapSchema: GenMessage<WaveMap> = /*@__PURE__*/
58
+ messageDesc(file_WaveMap, 1);
59
+
@@ -0,0 +1,37 @@
1
+ import { defineRouter } from '#q-app/wrappers';
2
+ import {
3
+ createMemoryHistory,
4
+ createRouter,
5
+ createWebHashHistory,
6
+ createWebHistory,
7
+ } from 'vue-router';
8
+ import routes from './routes';
9
+
10
+ /*
11
+ * If not building with SSR mode, you can
12
+ * directly export the Router instantiation;
13
+ *
14
+ * The function below can be async too; either use
15
+ * async/await or return a Promise which resolves
16
+ * with the Router instance.
17
+ */
18
+
19
+ export default defineRouter(function (/* { store, ssrContext } */) {
20
+ const createHistory = process.env.SERVER
21
+ ? createMemoryHistory
22
+ : process.env.VUE_ROUTER_MODE === 'history'
23
+ ? createWebHistory
24
+ : createWebHashHistory;
25
+
26
+ const Router = createRouter({
27
+ scrollBehavior: () => ({ left: 0, top: 0 }),
28
+ routes,
29
+
30
+ // Leave this as is and make changes in quasar.conf.js instead!
31
+ // quasar.conf.js -> build -> vueRouterMode
32
+ // quasar.conf.js -> build -> publicPath
33
+ history: createHistory(process.env.VUE_ROUTER_BASE),
34
+ });
35
+
36
+ return Router;
37
+ });
@@ -0,0 +1,14 @@
1
+ import type { RouteRecordRaw } from 'vue-router';
2
+
3
+ const routes: RouteRecordRaw[] = [
4
+ {
5
+ path: '/',
6
+ redirect: '/login'
7
+ },
8
+ {
9
+ path: '/login',
10
+ component: () => import('pages/LoginPage.vue')
11
+ },
12
+ ];
13
+
14
+ export default routes;
@@ -0,0 +1,5 @@
1
+ export function extractPlainText(text: string) {
2
+ const parser = new DOMParser();
3
+ const doc = parser.parseFromString(text, 'text/html');
4
+ return doc.body.textContent || '';
5
+ }
@@ -0,0 +1,43 @@
1
+ export function getStartOfDay(daysAgo: number = 0): number {
2
+ const startOfDay = new Date();
3
+ startOfDay.setHours(0, 0, 0, 0);
4
+ return startOfDay.getTime() - daysAgo * 24 * 60 * 60 * 1000;
5
+ }
6
+ export function getTimestamp(value: string) {
7
+ if (value === '') return '-1';
8
+ const date = new Date(value);
9
+ return date.getTime().toString();
10
+ }
11
+ export function getDateTimeStr(timestamp: string) {
12
+ const date = new Date(Number.parseInt(timestamp));
13
+ // 获取年、月、日、时、分、秒
14
+ const year = date.getFullYear();
15
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要加1
16
+ const day = String(date.getDate()).padStart(2, '0');
17
+ const hours = String(date.getHours()).padStart(2, '0');
18
+ const minutes = String(date.getMinutes()).padStart(2, '0');
19
+ const seconds = String(date.getSeconds()).padStart(2, '0');
20
+
21
+ // 格式化输出
22
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
23
+ }
24
+ export function getDateStr(timestamp: string) {
25
+ const date = new Date(Number.parseInt(timestamp));
26
+ // 获取年、月、日、时、分、秒
27
+ const year = date.getFullYear();
28
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,所以需要加1
29
+ const day = String(date.getDate()).padStart(2, '0');
30
+
31
+ // 格式化输出
32
+ return `${year}-${month}-${day}`;
33
+ }
34
+ export function getTimeStr(timestamp: string) {
35
+ const date = new Date(timestamp);
36
+ // 获取年、月、日、时、分、秒
37
+ const hours = String(date.getHours()).padStart(2, '0');
38
+ const minutes = String(date.getMinutes()).padStart(2, '0');
39
+ const seconds = String(date.getSeconds()).padStart(2, '0');
40
+
41
+ // 格式化输出
42
+ return `${hours}:${minutes}:${seconds}`;
43
+ }