web-core-tcm 0.0.23 → 0.0.25

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 (98) hide show
  1. package/package.json +38 -21
  2. package/quasar.config.ts +28 -15
  3. package/src/api/algorithm/comprehensiveAlgorithm.ts +1 -1
  4. package/src/api/algorithm/index.ts +7 -7
  5. package/src/api/algorithm/inquiriesAlgorithm.ts +4 -7
  6. package/src/api/algorithm/inspectionsAlgorithm.ts +1 -1
  7. package/src/api/algorithm/lisemsAlgorithm.ts +3 -3
  8. package/src/api/algorithm/pulsationsAlgorithm.ts +2 -3
  9. package/src/api/authorization/alova/apiDefinitions.ts +2 -2
  10. package/src/api/authorization/alova/createApis.ts +22 -7
  11. package/src/api/authorization/alova/globals.d.ts +35 -14
  12. package/src/api/authorization/alova/implement/authorization.ts +11 -9
  13. package/src/api/authorization/alova/implement/index.ts +1 -1
  14. package/src/api/authorization/alova/index.ts +4 -5
  15. package/src/api/authorization/authorization.ts +6 -6
  16. package/src/api/authorization/index.ts +1 -1
  17. package/src/api/check/alova/apiDefinitions.ts +2 -2
  18. package/src/api/check/alova/createApis.ts +22 -7
  19. package/src/api/check/alova/globals.d.ts +29 -20
  20. package/src/api/check/alova/implement/check.ts +145 -99
  21. package/src/api/check/alova/implement/index.ts +1 -1
  22. package/src/api/check/alova/index.ts +4 -5
  23. package/src/api/check/check.ts +116 -63
  24. package/src/api/check/index.ts +1 -1
  25. package/src/api/config/alova/index.ts +26 -27
  26. package/src/api/config/index.ts +59 -57
  27. package/src/api/doctor/alova/apiDefinitions.ts +2 -2
  28. package/src/api/doctor/alova/createApis.ts +22 -7
  29. package/src/api/doctor/alova/globals.d.ts +27 -18
  30. package/src/api/doctor/alova/implement/doctor.ts +38 -24
  31. package/src/api/doctor/alova/implement/index.ts +1 -1
  32. package/src/api/doctor/alova/index.ts +4 -4
  33. package/src/api/doctor/doctor.ts +18 -18
  34. package/src/api/doctor/index.ts +1 -1
  35. package/src/api/index.ts +12 -15
  36. package/src/api/metric/implement/index.ts +1 -1
  37. package/src/api/metric/implement/metric.ts +44 -34
  38. package/src/api/metric/index.ts +1 -1
  39. package/src/api/metric/metric.ts +36 -36
  40. package/src/api/oauth/alova/apiDefinitions.ts +2 -2
  41. package/src/api/oauth/alova/createApis.ts +22 -7
  42. package/src/api/oauth/alova/globals.d.ts +25 -16
  43. package/src/api/oauth/alova/implement/index.ts +1 -1
  44. package/src/api/oauth/alova/implement/oauth.ts +20 -15
  45. package/src/api/oauth/alova/index.ts +4 -5
  46. package/src/api/oauth/index.ts +1 -1
  47. package/src/api/oauth/oauth.ts +9 -5
  48. package/src/api/outpatient/alova/apiDefinitions.ts +2 -2
  49. package/src/api/outpatient/alova/createApis.ts +22 -7
  50. package/src/api/outpatient/alova/globals.d.ts +25 -16
  51. package/src/api/outpatient/alova/implement/index.ts +1 -1
  52. package/src/api/outpatient/alova/implement/outpatient.ts +76 -51
  53. package/src/api/outpatient/alova/index.ts +4 -5
  54. package/src/api/outpatient/index.ts +1 -1
  55. package/src/api/outpatient/outpatient.ts +29 -24
  56. package/src/api/patient/alova/apiDefinitions.ts +2 -2
  57. package/src/api/patient/alova/createApis.ts +22 -7
  58. package/src/api/patient/alova/globals.d.ts +56 -43
  59. package/src/api/patient/alova/implement/index.ts +1 -1
  60. package/src/api/patient/alova/implement/meta.ts +253 -224
  61. package/src/api/patient/alova/implement/patient.ts +79 -57
  62. package/src/api/patient/alova/index.ts +3 -5
  63. package/src/api/patient/core.ts +51 -49
  64. package/src/api/patient/index.ts +1 -1
  65. package/src/api/patient/meta.ts +244 -140
  66. package/src/api/patient/patient.ts +25 -25
  67. package/src/api/prescription/alova/apiDefinitions.ts +2 -2
  68. package/src/api/prescription/alova/createApis.ts +22 -7
  69. package/src/api/prescription/alova/globals.d.ts +32 -23
  70. package/src/api/prescription/alova/implement/herbal.ts +59 -39
  71. package/src/api/prescription/alova/implement/index.ts +1 -1
  72. package/src/api/prescription/alova/implement/prescription.ts +50 -33
  73. package/src/api/prescription/alova/index.ts +4 -5
  74. package/src/api/prescription/herbal.ts +17 -10
  75. package/src/api/prescription/index.ts +1 -1
  76. package/src/api/prescription/prescription.ts +35 -27
  77. package/src/api/scientist/alova/apiDefinitions.ts +2 -2
  78. package/src/api/scientist/alova/createApis.ts +22 -7
  79. package/src/api/scientist/alova/globals.d.ts +25 -16
  80. package/src/api/scientist/alova/implement/index.ts +1 -1
  81. package/src/api/scientist/alova/implement/scientist.ts +31 -20
  82. package/src/api/scientist/alova/index.ts +5 -4
  83. package/src/api/scientist/index.ts +1 -1
  84. package/src/api/scientist/scientist.ts +20 -20
  85. package/src/index.ts +3 -4
  86. package/src/layouts/UserLayout.vue +9 -7
  87. package/src/pages/LoginPage.vue +2 -5
  88. package/src/proto/types/Images_pb.ts +13 -13
  89. package/src/proto/types/WaveMap_pb.ts +13 -13
  90. package/src/router/routes.ts +2 -2
  91. package/src/util/export.ts +4 -4
  92. package/src/util/helper.ts +6 -6
  93. package/src/util/image.ts +1 -1
  94. package/src/util/number.ts +4 -4
  95. package/src/util/s256.js +1 -4
  96. package/src/util/secret.ts +1 -1
  97. package/src/util/string.ts +18 -18
  98. package/tsconfig.json +5 -1
@@ -36,7 +36,16 @@ type Alova2MethodConfig<Responded> =
36
36
  >
37
37
  ? Omit<
38
38
  AlovaMethodCreateConfig<
39
- AlovaGenerics<Responded, any, RequestConfig, Response, ResponseHeader, L1Cache, L2Cache, SE>,
39
+ AlovaGenerics<
40
+ Responded,
41
+ any,
42
+ RequestConfig,
43
+ Response,
44
+ ResponseHeader,
45
+ L1Cache,
46
+ L2Cache,
47
+ SE
48
+ >,
40
49
  any,
41
50
  Responded
42
51
  >,
@@ -47,7 +56,7 @@ type Alova2MethodConfig<Responded> =
47
56
  // Extract the return type of transform function that define in $$userConfigMap, if it not exists, use the default type.
48
57
  type ExtractUserDefinedTransformed<
49
58
  DefinitionKey extends keyof typeof apiDefinitions,
50
- Default
59
+ Default,
51
60
  > = DefinitionKey extends keyof UserMethodConfigMap
52
61
  ? UserMethodConfigMap[DefinitionKey]['transform'] extends (...args: any[]) => any
53
62
  ? Awaited<ReturnType<UserMethodConfigMap[DefinitionKey]['transform']>>
@@ -56,7 +65,7 @@ type ExtractUserDefinedTransformed<
56
65
  type Alova2Method<
57
66
  Responded,
58
67
  DefinitionKey extends keyof typeof apiDefinitions,
59
- CurrentConfig extends Alova2MethodConfig<any>
68
+ CurrentConfig extends Alova2MethodConfig<any>,
60
69
  > =
61
70
  CollapsedAlova extends Alova<
62
71
  AlovaGenerics<
@@ -345,9 +354,9 @@ declare global {
345
354
  pathParams: {
346
355
  id: string;
347
356
  };
348
- }
357
+ },
349
358
  >(
350
- config: Config
359
+ config: Config,
351
360
  ): Alova2Method<CheckState, 'checkStateRestful.getCheckState', Config>;
352
361
  /**
353
362
  * ---
@@ -597,9 +606,9 @@ declare global {
597
606
  id: string;
598
607
  };
599
608
  data: CheckState;
600
- }
609
+ },
601
610
  >(
602
- config: Config
611
+ config: Config,
603
612
  ): Alova2Method<CheckState, 'checkStateRestful.putCheckState', Config>;
604
613
  /**
605
614
  * ---
@@ -629,9 +638,9 @@ declare global {
629
638
  pathParams: {
630
639
  id: string;
631
640
  };
632
- }
641
+ },
633
642
  >(
634
- config: Config
643
+ config: Config,
635
644
  ): Alova2Method<null, 'checkStateRestful.deleteCheckState', Config>;
636
645
  /**
637
646
  * ---
@@ -814,9 +823,9 @@ declare global {
814
823
  page: number;
815
824
  sort: string;
816
825
  };
817
- }
826
+ },
818
827
  >(
819
- config: Config
828
+ config: Config,
820
829
  ): Alova2Method<PageCheckState, 'checkStateRestful.queryCheckState', Config>;
821
830
  /**
822
831
  * ---
@@ -1054,9 +1063,9 @@ declare global {
1054
1063
  postCheckState<
1055
1064
  Config extends Alova2MethodConfig<CheckState> & {
1056
1065
  data: CheckState;
1057
- }
1066
+ },
1058
1067
  >(
1059
- config: Config
1068
+ config: Config,
1060
1069
  ): Alova2Method<CheckState, 'checkStateRestful.postCheckState', Config>;
1061
1070
  /**
1062
1071
  * ---
@@ -1143,9 +1152,9 @@ declare global {
1143
1152
  pageSize?: number;
1144
1153
  page?: number;
1145
1154
  };
1146
- }
1155
+ },
1147
1156
  >(
1148
- config: Config
1157
+ config: Config,
1149
1158
  ): Alova2Method<PagePaymentState, 'checkStateRestful.queryPaymentState', Config>;
1150
1159
  /**
1151
1160
  * ---
@@ -1165,7 +1174,7 @@ declare global {
1165
1174
  * ```
1166
1175
  */
1167
1176
  datesOfCheckState<Config extends Alova2MethodConfig<DateDistribute[]>>(
1168
- config?: Config
1177
+ config?: Config,
1169
1178
  ): Alova2Method<DateDistribute[], 'checkStateRestful.datesOfCheckState', Config>;
1170
1179
  /**
1171
1180
  * ---
@@ -1182,7 +1191,7 @@ declare global {
1182
1191
  * ```
1183
1192
  */
1184
1193
  totalOfCheckState<Config extends Alova2MethodConfig<number>>(
1185
- config?: Config
1194
+ config?: Config,
1186
1195
  ): Alova2Method<number, 'checkStateRestful.totalOfCheckState', Config>;
1187
1196
  /**
1188
1197
  * ---
@@ -1202,7 +1211,7 @@ declare global {
1202
1211
  * ```
1203
1212
  */
1204
1213
  genderDistributeOfCheckState<Config extends Alova2MethodConfig<GenderDistribute[]>>(
1205
- config?: Config
1214
+ config?: Config,
1206
1215
  ): Alova2Method<GenderDistribute[], 'checkStateRestful.genderDistributeOfCheckState', Config>;
1207
1216
  /**
1208
1217
  * ---
@@ -1222,7 +1231,7 @@ declare global {
1222
1231
  * ```
1223
1232
  */
1224
1233
  ageDistributeOfCheckState<Config extends Alova2MethodConfig<AgeDistribute[]>>(
1225
- config?: Config
1234
+ config?: Config,
1226
1235
  ): Alova2Method<AgeDistribute[], 'checkStateRestful.ageDistributeOfCheckState', Config>;
1227
1236
  /**
1228
1237
  * ---
@@ -1239,7 +1248,7 @@ declare global {
1239
1248
  * ```
1240
1249
  */
1241
1250
  totalOfCheckByTodayState<Config extends Alova2MethodConfig<number>>(
1242
- config?: Config
1251
+ config?: Config,
1243
1252
  ): Alova2Method<number, 'checkStateRestful.totalOfCheckByTodayState', Config>;
1244
1253
  };
1245
1254
  }
@@ -1,119 +1,165 @@
1
- import { Check, Payment } from '@core/api/check/check';
1
+ import { Check, Payment } from 'src/api/check/check';
2
2
 
3
3
  export class AlovaCheck extends Check {
4
4
  override async get() {
5
- return this.of(await checkApi.checkStateRestful.getCheckState({
6
- pathParams: {
7
- id: this.id,
8
- },
9
- async transform(res) {
10
- return new AlovaCheck().of(res);
11
- },
12
- }).send());
5
+ return this.of(
6
+ await checkApi.checkStateRestful
7
+ .getCheckState({
8
+ pathParams: {
9
+ id: this.id,
10
+ },
11
+ async transform(res) {
12
+ return new AlovaCheck().of(res);
13
+ },
14
+ })
15
+ .send(),
16
+ );
13
17
  }
14
18
 
15
19
  override async put() {
16
- return this.of(await checkApi.checkStateRestful.putCheckState({
17
- pathParams: {
18
- id: this.id,
19
- },
20
- data: this.state()
21
- }).send(true));
20
+ return this.of(
21
+ await checkApi.checkStateRestful
22
+ .putCheckState({
23
+ pathParams: {
24
+ id: this.id,
25
+ },
26
+ data: this.state(),
27
+ })
28
+ .send(true),
29
+ );
22
30
  }
23
31
 
24
32
  override async post() {
25
- return this.of(await checkApi.checkStateRestful.postCheckState({
26
- data: this.state(),
27
- }).send(true));
33
+ return this.of(
34
+ await checkApi.checkStateRestful
35
+ .postCheckState({
36
+ data: this.state(),
37
+ })
38
+ .send(true),
39
+ );
28
40
  }
29
41
  override delete() {
30
- void checkApi.checkStateRestful.deleteCheckState({
31
- pathParams: {
32
- id: this.id,
33
- },
34
- }).send();
42
+ void checkApi.checkStateRestful
43
+ .deleteCheckState({
44
+ pathParams: {
45
+ id: this.id,
46
+ },
47
+ })
48
+ .send();
35
49
  return Promise.resolve();
36
50
  }
37
- static override query(page: number, pageSize: number, sort: string, patientId?: string, doctorId?: string, startTime?: string, endTime?: string, patientName?: string, patientGender?: string, patientPhoneNumber?: string) {
38
- return checkApi.checkStateRestful.queryCheckState({
39
- params: {
40
- ... {... patientId && {patientId}},
41
- ... {... doctorId && {doctorId}},
42
- ... {... startTime && {startTime}},
43
- ... {... endTime && {endTime}},
44
- ... {... patientName && {patientName}},
45
- ... {... patientGender && {patientGender}},
46
- ... {... patientPhoneNumber && {patientPhoneNumber}},
47
- pageSize,
48
- page,
49
- sort,
50
- },
51
- async transform(res) {
52
- const data = await Promise.all(res.content!.map((item) => {
53
- return new AlovaCheck().of(item);
54
- }))
55
- return {
56
- data: data,
57
- total: res.totalElements!,
58
- page: res.number!,
59
- pageSize: res.size!,
60
- pageCount: res.totalPages!,
61
- isLastPage: res.last!
62
- };
63
- },
64
- }).send();
51
+ static override query(
52
+ page: number,
53
+ pageSize: number,
54
+ sort: string,
55
+ patientId?: string,
56
+ doctorId?: string,
57
+ startTime?: string,
58
+ endTime?: string,
59
+ patientName?: string,
60
+ patientGender?: string,
61
+ patientPhoneNumber?: string,
62
+ ) {
63
+ return checkApi.checkStateRestful
64
+ .queryCheckState({
65
+ params: {
66
+ ...{ ...(patientId && { patientId }) },
67
+ ...{ ...(doctorId && { doctorId }) },
68
+ ...{ ...(startTime && { startTime }) },
69
+ ...{ ...(endTime && { endTime }) },
70
+ ...{ ...(patientName && { patientName }) },
71
+ ...{ ...(patientGender && { patientGender }) },
72
+ ...{ ...(patientPhoneNumber && { patientPhoneNumber }) },
73
+ pageSize,
74
+ page,
75
+ sort,
76
+ },
77
+ async transform(res) {
78
+ const data = await Promise.all(
79
+ res.content.map((item) => {
80
+ return new AlovaCheck().of(item);
81
+ }),
82
+ );
83
+ return {
84
+ data: data,
85
+ total: res.totalElements,
86
+ page: res.number,
87
+ pageSize: res.size,
88
+ pageCount: res.totalPages,
89
+ isLastPage: res.last,
90
+ };
91
+ },
92
+ })
93
+ .send();
65
94
  }
66
- static override queryPayment(page: number, pageSize: number, doctorId?: string, patientId?: string, patientName?: string, patientPhone?: string, prescriptionPaymentStatus?: number, outboundStatus?: number) {
67
- return checkApi.checkStateRestful.queryPaymentState({
68
- params: {
69
- ... {... doctorId && {doctorId}},
70
- ... {... patientId && {patientId}},
71
- ... {... patientName && {patientName}},
72
- ... {... patientPhone && {patientPhone}},
73
- ... {... prescriptionPaymentStatus && {prescriptionPaymentStatus}},
74
- ... {... outboundStatus && {outboundStatus}},
75
- pageSize: pageSize,
76
- page: page,
77
- },
78
- async transform(res) {
79
- const data = await Promise.all(res.content!.map((item) => {
80
- return new AlovaPayment().of(item);
81
- }))
82
- return {
83
- data: data,
84
- total: res.totalElements!,
85
- page: res.number!,
86
- pageSize: res.size!,
87
- pageCount: res.totalPages!,
88
- isLastPage: res.last!
89
- }
90
- },
91
- }).send();
95
+ static override queryPayment(
96
+ page: number,
97
+ pageSize: number,
98
+ doctorId?: string,
99
+ patientId?: string,
100
+ patientName?: string,
101
+ patientPhone?: string,
102
+ prescriptionPaymentStatus?: number,
103
+ outboundStatus?: number,
104
+ ) {
105
+ return checkApi.checkStateRestful
106
+ .queryPaymentState({
107
+ params: {
108
+ ...{ ...(doctorId && { doctorId }) },
109
+ ...{ ...(patientId && { patientId }) },
110
+ ...{ ...(patientName && { patientName }) },
111
+ ...{ ...(patientPhone && { patientPhone }) },
112
+ ...{ ...(prescriptionPaymentStatus && { prescriptionPaymentStatus }) },
113
+ ...{ ...(outboundStatus && { outboundStatus }) },
114
+ pageSize: pageSize,
115
+ page: page,
116
+ },
117
+ async transform(res) {
118
+ const data = await Promise.all(
119
+ res.content.map((item) => {
120
+ return new AlovaPayment().of(item);
121
+ }),
122
+ );
123
+ return {
124
+ data: data,
125
+ total: res.totalElements,
126
+ page: res.number,
127
+ pageSize: res.size,
128
+ pageCount: res.totalPages,
129
+ isLastPage: res.last,
130
+ };
131
+ },
132
+ })
133
+ .send();
92
134
  }
93
135
  }
94
136
  export class AlovaPayment extends Payment {
95
- override async putOutboundStatus(status: number){
96
- this.outboundStatus = status
97
- await checkApi.checkStateRestful.putCheckState({
98
- pathParams: {
99
- id: this.id,
100
- },
101
- data: {
102
- outboundStatus: status,
103
- }
104
- }).send(true)
105
- return Promise.resolve(this)
137
+ override async putOutboundStatus(status: number) {
138
+ this.outboundStatus = status;
139
+ await checkApi.checkStateRestful
140
+ .putCheckState({
141
+ pathParams: {
142
+ id: this.id,
143
+ },
144
+ data: {
145
+ outboundStatus: status,
146
+ },
147
+ })
148
+ .send(true);
149
+ return Promise.resolve(this);
106
150
  }
107
- override async putPrescriptionPaymentStatus(status: number){
108
- this.prescriptionPaymentStatus = status
109
- await checkApi.checkStateRestful.putCheckState({
110
- pathParams: {
111
- id: this.id,
112
- },
113
- data: {
114
- prescriptionPaymentStatus: status,
115
- }
116
- }).send(true)
117
- return Promise.resolve(this)
151
+ override async putPrescriptionPaymentStatus(status: number) {
152
+ this.prescriptionPaymentStatus = status;
153
+ await checkApi.checkStateRestful
154
+ .putCheckState({
155
+ pathParams: {
156
+ id: this.id,
157
+ },
158
+ data: {
159
+ prescriptionPaymentStatus: status,
160
+ },
161
+ })
162
+ .send(true);
163
+ return Promise.resolve(this);
118
164
  }
119
165
  }
@@ -1 +1 @@
1
- export * from './check';
1
+ export * from './check';
@@ -1,15 +1,15 @@
1
1
  import { createAlova } from 'alova';
2
2
  import fetchAdapter from 'alova/fetch';
3
3
  import { createApis, withConfigType, mountApis } from './createApis';
4
- import { onAuthRequired, responded } from '@core/api/config/alova';
5
- import { getServiceEndpoint, ServiceType } from '@core/api/config';
4
+ import { onAuthRequired, responded } from 'src/api/config/alova';
5
+ import { getServiceEndpoint, ServiceType } from 'src/api/config';
6
6
 
7
7
  export const alovaInstance = createAlova({
8
8
  baseURL: getServiceEndpoint(ServiceType.Check),
9
9
  requestAdapter: fetchAdapter(),
10
10
  beforeRequest: onAuthRequired(),
11
11
  cacheFor: null,
12
- responded: responded
12
+ responded: responded,
13
13
  });
14
14
 
15
15
  export const $$userConfigMap = withConfigType({});
@@ -19,5 +19,4 @@ const Apis = createApis(alovaInstance, $$userConfigMap);
19
19
  mountApis(Apis);
20
20
 
21
21
  export default Apis;
22
-
23
-
22
+ export * from './implement';