web-core-tcm 0.0.25 → 0.0.26
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.
- package/dist/node_modules/@alova/shared/dist/alova-shared.esm.js +134 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +70 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +14 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +6 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +10 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/create.js +136 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +7 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +164 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +6 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +75 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +8 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +35 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +42 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +17 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +156 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +349 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +39 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +72 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/registry.js +551 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +159 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +58 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +350 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +25 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +145 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +110 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +107 -0
- package/dist/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +24 -0
- package/dist/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +556 -0
- package/dist/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +36 -0
- package/dist/node_modules/@vue/shared/dist/shared.esm-bundler.js +26 -0
- package/dist/node_modules/alova/dist/adapter/fetch.esm.js +55 -0
- package/dist/node_modules/alova/dist/alova.esm.js +414 -0
- package/dist/node_modules/alova/dist/clienthook/index.esm.js +89 -0
- package/dist/node_modules/builder-pattern/dist/index.js +22 -0
- package/dist/node_modules/jwt-decode/build/esm/index.js +52 -0
- package/dist/node_modules/pinyin/lib/esm/pinyin.js +242260 -0
- package/dist/node_modules/punycode/punycode.es6.js +139 -0
- package/dist/node_modules/quasar/src/composables/use-quasar/use-quasar.js +8 -0
- package/dist/node_modules/quasar/src/utils/private.symbols/symbols.js +4 -0
- package/dist/src/api/algorithm/comprehensiveAlgorithm.d.ts +4 -0
- package/dist/src/api/algorithm/comprehensiveAlgorithm.js +16 -0
- package/dist/src/api/algorithm/index.d.ts +10 -0
- package/dist/src/api/algorithm/index.js +62 -0
- package/dist/src/api/algorithm/inquiriesAlgorithm.d.ts +13 -0
- package/dist/src/api/algorithm/inquiriesAlgorithm.js +9 -0
- package/dist/src/api/algorithm/inspectionsAlgorithm.d.ts +2 -0
- package/dist/src/api/algorithm/inspectionsAlgorithm.js +10 -0
- package/dist/src/api/algorithm/lisemsAlgorithm.d.ts +2 -0
- package/dist/src/api/algorithm/lisemsAlgorithm.js +15 -0
- package/dist/src/api/algorithm/pulsationsAlgorithm.d.ts +4 -0
- package/dist/src/api/algorithm/pulsationsAlgorithm.js +8 -0
- package/dist/src/api/authorization/alova/apiDefinitions.d.ts +21 -0
- package/dist/src/api/authorization/alova/apiDefinitions.js +9 -0
- package/dist/src/api/authorization/alova/createApis.d.ts +10 -0
- package/dist/src/api/authorization/alova/createApis.js +51 -0
- package/dist/src/api/authorization/alova/implement/authorization.d.ts +4 -0
- package/dist/src/api/authorization/alova/implement/authorization.js +15 -0
- package/dist/src/api/authorization/alova/index.d.ts +5 -0
- package/dist/src/api/authorization/alova/index.js +18 -0
- package/dist/src/api/authorization/authorization.d.ts +8 -0
- package/dist/src/api/authorization/authorization.js +16 -0
- package/dist/src/api/authorization/index.js +9 -0
- package/dist/src/api/check/alova/apiDefinitions.d.ts +28 -0
- package/dist/src/api/check/alova/apiDefinitions.js +16 -0
- package/dist/src/api/check/alova/createApis.d.ts +10 -0
- package/dist/src/api/check/alova/createApis.js +51 -0
- package/dist/src/api/check/alova/implement/check.d.ts +27 -0
- package/dist/src/api/check/alova/implement/check.js +119 -0
- package/dist/src/api/check/alova/index.d.ts +5 -0
- package/dist/src/api/check/alova/index.js +21 -0
- package/dist/src/api/check/check.d.ts +54 -0
- package/dist/src/api/check/check.js +131 -0
- package/dist/src/api/check/index.js +11 -0
- package/dist/src/api/config/alova/index.d.ts +5 -0
- package/dist/src/api/config/alova/index.js +55 -0
- package/dist/src/api/config/index.d.ts +23 -0
- package/dist/src/api/config/index.js +106 -0
- package/dist/src/api/device/device.d.ts +5 -0
- package/dist/src/api/device/device.js +46 -0
- package/dist/src/api/doctor/alova/apiDefinitions.d.ts +26 -0
- package/dist/src/api/doctor/alova/apiDefinitions.js +14 -0
- package/dist/src/api/doctor/alova/createApis.d.ts +10 -0
- package/dist/src/api/doctor/alova/createApis.js +51 -0
- package/dist/src/api/doctor/alova/implement/doctor.d.ts +7 -0
- package/dist/src/api/doctor/alova/implement/doctor.js +42 -0
- package/dist/src/api/doctor/alova/index.d.ts +5 -0
- package/dist/src/api/doctor/alova/index.js +20 -0
- package/dist/src/api/doctor/doctor.d.ts +22 -0
- package/dist/src/api/doctor/doctor.js +29 -0
- package/dist/src/api/doctor/index.js +9 -0
- package/dist/src/api/metric/implement/metric.d.ts +24 -0
- package/dist/src/api/metric/implement/metric.js +80 -0
- package/dist/src/api/metric/index.js +6 -0
- package/dist/src/api/metric/metric.d.ts +28 -0
- package/dist/src/api/metric/metric.js +75 -0
- package/dist/src/api/oauth/alova/apiDefinitions.d.ts +24 -0
- package/dist/src/api/oauth/alova/apiDefinitions.js +12 -0
- package/dist/src/api/oauth/alova/createApis.d.ts +10 -0
- package/dist/src/api/oauth/alova/createApis.js +51 -0
- package/dist/src/api/oauth/alova/implement/oauth.d.ts +4 -0
- package/dist/src/api/oauth/alova/implement/oauth.js +15 -0
- package/dist/src/api/oauth/alova/index.d.ts +5 -0
- package/dist/src/api/oauth/alova/index.js +17 -0
- package/dist/src/api/oauth/index.js +9 -0
- package/dist/src/api/oauth/oauth.d.ts +7 -0
- package/dist/src/api/oauth/oauth.js +16 -0
- package/dist/src/api/outpatient/alova/apiDefinitions.d.ts +25 -0
- package/dist/src/api/outpatient/alova/apiDefinitions.js +13 -0
- package/dist/src/api/outpatient/alova/createApis.d.ts +10 -0
- package/dist/src/api/outpatient/alova/createApis.js +51 -0
- package/dist/src/api/outpatient/alova/implement/outpatient.d.ts +10 -0
- package/dist/src/api/outpatient/alova/implement/outpatient.js +71 -0
- package/dist/src/api/outpatient/alova/index.d.ts +5 -0
- package/dist/src/api/outpatient/alova/index.js +21 -0
- package/dist/src/api/outpatient/index.js +11 -0
- package/dist/src/api/outpatient/outpatient.d.ts +39 -0
- package/dist/src/api/outpatient/outpatient.js +45 -0
- package/dist/src/api/patient/alova/apiDefinitions.d.ts +39 -0
- package/dist/src/api/patient/alova/apiDefinitions.js +27 -0
- package/dist/src/api/patient/alova/createApis.d.ts +10 -0
- package/dist/src/api/patient/alova/createApis.js +51 -0
- package/dist/src/api/patient/alova/implement/meta.d.ts +113 -0
- package/dist/src/api/patient/alova/implement/meta.js +404 -0
- package/dist/src/api/patient/alova/implement/patient.d.ts +22 -0
- package/dist/src/api/patient/alova/implement/patient.js +72 -0
- package/dist/src/api/patient/alova/index.d.ts +5 -0
- package/dist/src/api/patient/alova/index.js +22 -0
- package/dist/src/api/patient/core.d.ts +50 -0
- package/dist/src/api/patient/core.js +109 -0
- package/dist/src/api/patient/index.js +46 -0
- package/dist/src/api/patient/meta.d.ts +238 -0
- package/dist/src/api/patient/meta.js +454 -0
- package/dist/src/api/patient/patient.d.ts +43 -0
- package/dist/src/api/patient/patient.js +42 -0
- package/dist/src/api/prescription/alova/apiDefinitions.d.ts +27 -0
- package/dist/src/api/prescription/alova/apiDefinitions.js +15 -0
- package/dist/src/api/prescription/alova/createApis.d.ts +10 -0
- package/dist/src/api/prescription/alova/createApis.js +51 -0
- package/dist/src/api/prescription/alova/implement/herbal.d.ts +15 -0
- package/dist/src/api/prescription/alova/implement/herbal.js +54 -0
- package/dist/src/api/prescription/alova/implement/prescription.d.ts +15 -0
- package/dist/src/api/prescription/alova/implement/prescription.js +49 -0
- package/dist/src/api/prescription/alova/index.d.ts +5 -0
- package/dist/src/api/prescription/alova/index.js +20 -0
- package/dist/src/api/prescription/herbal.d.ts +19 -0
- package/dist/src/api/prescription/herbal.js +34 -0
- package/dist/src/api/prescription/index.js +13 -0
- package/dist/src/api/prescription/prescription.d.ts +26 -0
- package/dist/src/api/prescription/prescription.js +49 -0
- package/dist/src/api/scientist/alova/apiDefinitions.d.ts +25 -0
- package/dist/src/api/scientist/alova/apiDefinitions.js +13 -0
- package/dist/src/api/scientist/alova/createApis.d.ts +10 -0
- package/dist/src/api/scientist/alova/createApis.js +51 -0
- package/dist/src/api/scientist/alova/implement/scientist.d.ts +6 -0
- package/dist/src/api/scientist/alova/implement/scientist.js +35 -0
- package/dist/src/api/scientist/alova/index.d.ts +6 -0
- package/dist/src/api/scientist/alova/index.js +21 -0
- package/dist/src/api/scientist/index.js +9 -0
- package/dist/src/api/scientist/scientist.d.ts +20 -0
- package/dist/src/api/scientist/scientist.js +37 -0
- package/dist/src/components/models.d.ts +7 -0
- package/dist/src/index.js +36 -0
- package/dist/src/pages/LoginPage.vue.d.ts +2 -0
- package/dist/src/proto/types/Images_pb.d.ts +34 -0
- package/dist/src/proto/types/Images_pb.js +10 -0
- package/dist/src/proto/types/WaveMap_pb.d.ts +48 -0
- package/dist/src/proto/types/WaveMap_pb.js +10 -0
- package/dist/src/router/index.d.ts +2 -0
- package/dist/src/router/routes.d.ts +3 -0
- package/dist/src/util/RichTextUtil.d.ts +1 -0
- package/dist/src/util/RichTextUtil.js +6 -0
- package/dist/src/util/datetime.d.ts +5 -0
- package/dist/src/util/export.d.ts +4 -0
- package/dist/src/util/helper.d.ts +65 -0
- package/dist/src/util/helper.js +46 -0
- package/dist/src/util/image.d.ts +2 -0
- package/dist/src/util/image.js +17 -0
- package/dist/src/util/number.d.ts +12 -0
- package/dist/src/util/s256.d.ts +2 -0
- package/dist/src/util/secret.d.ts +10 -0
- package/dist/src/util/string.d.ts +21 -0
- package/dist/src/util/string.js +10 -0
- package/package.json +4 -1
- package/.editorconfig +0 -7
- package/.github/workflows/test.yml +0 -29
- package/.prettierrc.json +0 -5
- package/.vscode/extensions.json +0 -15
- package/.vscode/settings.json +0 -9
- package/eslint.config.js +0 -83
- package/index.html +0 -24
- package/postcss.config.js +0 -29
- package/quasar.config.ts +0 -233
- package/src/App.vue +0 -7
- package/src/api/algorithm/comprehensiveAlgorithm.ts +0 -20
- package/src/api/algorithm/index.ts +0 -50
- package/src/api/algorithm/inquiriesAlgorithm.ts +0 -16
- package/src/api/algorithm/inspectionsAlgorithm.ts +0 -11
- package/src/api/algorithm/lisemsAlgorithm.ts +0 -16
- package/src/api/algorithm/pulsationsAlgorithm.ts +0 -8
- package/src/api/authorization/alova/apiDefinitions.ts +0 -23
- package/src/api/authorization/alova/createApis.ts +0 -114
- package/src/api/authorization/alova/globals.d.ts +0 -394
- package/src/api/authorization/alova/implement/authorization.ts +0 -14
- package/src/api/authorization/alova/index.ts +0 -22
- package/src/api/authorization/authorization.ts +0 -16
- package/src/api/check/alova/apiDefinitions.ts +0 -30
- package/src/api/check/alova/createApis.ts +0 -114
- package/src/api/check/alova/globals.d.ts +0 -1257
- package/src/api/check/alova/implement/check.ts +0 -165
- package/src/api/check/alova/index.ts +0 -22
- package/src/api/check/check.ts +0 -217
- package/src/api/config/alova/index.ts +0 -71
- package/src/api/config/index.ts +0 -132
- package/src/api/device/device.js +0 -58
- package/src/api/doctor/alova/apiDefinitions.ts +0 -28
- package/src/api/doctor/alova/createApis.ts +0 -114
- package/src/api/doctor/alova/globals.d.ts +0 -559
- package/src/api/doctor/alova/implement/doctor.ts +0 -51
- package/src/api/doctor/alova/index.ts +0 -23
- package/src/api/doctor/doctor.ts +0 -53
- package/src/api/metric/implement/metric.ts +0 -108
- package/src/api/metric/metric.ts +0 -114
- package/src/api/oauth/alova/apiDefinitions.ts +0 -26
- package/src/api/oauth/alova/createApis.ts +0 -114
- package/src/api/oauth/alova/globals.d.ts +0 -460
- package/src/api/oauth/alova/implement/oauth.ts +0 -24
- package/src/api/oauth/alova/index.ts +0 -21
- package/src/api/oauth/oauth.ts +0 -19
- package/src/api/outpatient/alova/apiDefinitions.ts +0 -27
- package/src/api/outpatient/alova/createApis.ts +0 -114
- package/src/api/outpatient/alova/globals.d.ts +0 -685
- package/src/api/outpatient/alova/implement/outpatient.ts +0 -91
- package/src/api/outpatient/alova/index.ts +0 -22
- package/src/api/outpatient/outpatient.ts +0 -67
- package/src/api/patient/alova/apiDefinitions.ts +0 -41
- package/src/api/patient/alova/createApis.ts +0 -114
- package/src/api/patient/alova/globals.d.ts +0 -1690
- package/src/api/patient/alova/implement/meta.ts +0 -517
- package/src/api/patient/alova/implement/patient.ts +0 -99
- package/src/api/patient/alova/index.ts +0 -22
- package/src/api/patient/core.ts +0 -133
- package/src/api/patient/meta.ts +0 -570
- package/src/api/patient/patient.ts +0 -98
- package/src/api/prescription/alova/apiDefinitions.ts +0 -29
- package/src/api/prescription/alova/createApis.ts +0 -114
- package/src/api/prescription/alova/globals.d.ts +0 -968
- package/src/api/prescription/alova/implement/herbal.ts +0 -68
- package/src/api/prescription/alova/implement/prescription.ts +0 -62
- package/src/api/prescription/alova/index.ts +0 -22
- package/src/api/prescription/herbal.ts +0 -51
- package/src/api/prescription/prescription.ts +0 -76
- package/src/api/scientist/alova/apiDefinitions.ts +0 -27
- package/src/api/scientist/alova/createApis.ts +0 -114
- package/src/api/scientist/alova/globals.d.ts +0 -447
- package/src/api/scientist/alova/implement/scientist.ts +0 -40
- package/src/api/scientist/alova/index.ts +0 -24
- package/src/api/scientist/scientist.ts +0 -49
- package/src/assets/quasar-logo-vertical.svg +0 -15
- package/src/boot/.gitkeep +0 -0
- package/src/components/ExampleComponent.vue +0 -37
- package/src/components/models.ts +0 -8
- package/src/css/app.scss +0 -1
- package/src/css/quasar.variables.scss +0 -25
- package/src/env.d.ts +0 -7
- package/src/layouts/UserLayout.vue +0 -108
- package/src/pages/LoginPage.vue +0 -29
- package/src/proto/Images.proto +0 -7
- package/src/proto/WaveMap.proto +0 -10
- package/src/proto/types/Images_pb.ts +0 -48
- package/src/proto/types/WaveMap_pb.ts +0 -59
- package/src/router/index.ts +0 -37
- package/src/router/routes.ts +0 -14
- package/src/util/RichTextUtil.ts +0 -5
- package/src/util/datetime.ts +0 -43
- package/src/util/export.ts +0 -46
- package/src/util/helper.ts +0 -159
- package/src/util/image.ts +0 -28
- package/src/util/number.ts +0 -146
- package/src/util/s256.js +0 -27
- package/src/util/secret.ts +0 -60
- package/src/util/string.ts +0 -121
- package/tsconfig.json +0 -7
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/icons/favicon-128x128.png +0 -0
- /package/{public → dist}/icons/favicon-16x16.png +0 -0
- /package/{public → dist}/icons/favicon-32x32.png +0 -0
- /package/{public → dist}/icons/favicon-96x96.png +0 -0
- /package/{src/api/authorization/alova/implement/index.ts → dist/src/api/authorization/alova/implement/index.d.ts} +0 -0
- /package/{src/api/authorization/index.ts → dist/src/api/authorization/index.d.ts} +0 -0
- /package/{src/api/check/alova/implement/index.ts → dist/src/api/check/alova/implement/index.d.ts} +0 -0
- /package/{src/api/check/index.ts → dist/src/api/check/index.d.ts} +0 -0
- /package/{src/api/doctor/alova/implement/index.ts → dist/src/api/doctor/alova/implement/index.d.ts} +0 -0
- /package/{src/api/doctor/index.ts → dist/src/api/doctor/index.d.ts} +0 -0
- /package/{src/api/index.ts → dist/src/api/index.d.ts} +0 -0
- /package/{src/api/metric/implement/index.ts → dist/src/api/metric/implement/index.d.ts} +0 -0
- /package/{src/api/metric/index.ts → dist/src/api/metric/index.d.ts} +0 -0
- /package/{src/api/oauth/alova/implement/index.ts → dist/src/api/oauth/alova/implement/index.d.ts} +0 -0
- /package/{src/api/oauth/index.ts → dist/src/api/oauth/index.d.ts} +0 -0
- /package/{src/api/outpatient/alova/implement/index.ts → dist/src/api/outpatient/alova/implement/index.d.ts} +0 -0
- /package/{src/api/outpatient/index.ts → dist/src/api/outpatient/index.d.ts} +0 -0
- /package/{src/api/patient/alova/implement/index.ts → dist/src/api/patient/alova/implement/index.d.ts} +0 -0
- /package/{src/api/patient/index.ts → dist/src/api/patient/index.d.ts} +0 -0
- /package/{src/api/prescription/alova/implement/index.ts → dist/src/api/prescription/alova/implement/index.d.ts} +0 -0
- /package/{src/api/prescription/index.ts → dist/src/api/prescription/index.d.ts} +0 -0
- /package/{src/api/scientist/alova/implement/index.ts → dist/src/api/scientist/alova/implement/index.d.ts} +0 -0
- /package/{src/api/scientist/index.ts → dist/src/api/scientist/index.d.ts} +0 -0
- /package/{src/index.ts → dist/src/index.d.ts} +0 -0
- /package/{src/proto/index.ts → dist/src/proto/index.d.ts} +0 -0
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { Check, Payment } from 'src/api/check/check';
|
|
2
|
-
|
|
3
|
-
export class AlovaCheck extends Check {
|
|
4
|
-
override async get() {
|
|
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
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
override async put() {
|
|
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
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
override async post() {
|
|
33
|
-
return this.of(
|
|
34
|
-
await checkApi.checkStateRestful
|
|
35
|
-
.postCheckState({
|
|
36
|
-
data: this.state(),
|
|
37
|
-
})
|
|
38
|
-
.send(true),
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
override delete() {
|
|
42
|
-
void checkApi.checkStateRestful
|
|
43
|
-
.deleteCheckState({
|
|
44
|
-
pathParams: {
|
|
45
|
-
id: this.id,
|
|
46
|
-
},
|
|
47
|
-
})
|
|
48
|
-
.send();
|
|
49
|
-
return Promise.resolve();
|
|
50
|
-
}
|
|
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();
|
|
94
|
-
}
|
|
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();
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
export class AlovaPayment extends Payment {
|
|
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);
|
|
150
|
-
}
|
|
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);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createAlova } from 'alova';
|
|
2
|
-
import fetchAdapter from 'alova/fetch';
|
|
3
|
-
import { createApis, withConfigType, mountApis } from './createApis';
|
|
4
|
-
import { onAuthRequired, responded } from 'src/api/config/alova';
|
|
5
|
-
import { getServiceEndpoint, ServiceType } from 'src/api/config';
|
|
6
|
-
|
|
7
|
-
export const alovaInstance = createAlova({
|
|
8
|
-
baseURL: getServiceEndpoint(ServiceType.Check),
|
|
9
|
-
requestAdapter: fetchAdapter(),
|
|
10
|
-
beforeRequest: onAuthRequired(),
|
|
11
|
-
cacheFor: null,
|
|
12
|
-
responded: responded,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const $$userConfigMap = withConfigType({});
|
|
16
|
-
|
|
17
|
-
const Apis = createApis(alovaInstance, $$userConfigMap);
|
|
18
|
-
|
|
19
|
-
mountApis(Apis);
|
|
20
|
-
|
|
21
|
-
export default Apis;
|
|
22
|
-
export * from './implement';
|
package/src/api/check/check.ts
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { Patient } from 'src/api/patient/patient';
|
|
2
|
-
import type { Page } from 'src/api/patient/core';
|
|
3
|
-
import { Tag } from 'src/api/patient/core';
|
|
4
|
-
import { NetworkObject, Sequence } from 'src/api/patient/core';
|
|
5
|
-
import type { CheckState, PaymentState } from 'src/api/check/alova/globals';
|
|
6
|
-
import { Metas } from 'src/api/patient/meta';
|
|
7
|
-
import { Prescription } from 'src/api/prescription/prescription';
|
|
8
|
-
import { AlovaPrescription } from 'src/api/prescription/alova/implement/prescription';
|
|
9
|
-
import type { PrescriptionState } from 'src/api/prescription/alova/globals';
|
|
10
|
-
import { extractPlainText } from 'src/util/RichTextUtil';
|
|
11
|
-
import { Doctor } from 'src/api/doctor/doctor';
|
|
12
|
-
import { Herbal } from 'src/api/prescription';
|
|
13
|
-
import type { IBuilder } from 'builder-pattern';
|
|
14
|
-
import { Builder } from 'builder-pattern';
|
|
15
|
-
|
|
16
|
-
export abstract class Check extends NetworkObject {
|
|
17
|
-
static override builder(): IBuilder<Check> {
|
|
18
|
-
return Builder(this._default) as unknown as IBuilder<Check>;
|
|
19
|
-
}
|
|
20
|
-
static override default(): typeof Check {
|
|
21
|
-
return this._default as unknown as typeof Check;
|
|
22
|
-
}
|
|
23
|
-
id: string = '';
|
|
24
|
-
doctor: Doctor = Doctor.builder().build();
|
|
25
|
-
patient: Patient = Patient.builder().build();
|
|
26
|
-
diagnosis: string = '';
|
|
27
|
-
tags: Tag[] = [] as Tag[];
|
|
28
|
-
prescriptions: Sequence<Prescription> = new Sequence<Prescription>();
|
|
29
|
-
createdTimestamp: string = Date.now().toString();
|
|
30
|
-
updatedTimestamp: string = Date.now().toString();
|
|
31
|
-
prescriptionPaymentStatus: number = 0;
|
|
32
|
-
outboundStatus: number = 0;
|
|
33
|
-
//购买类型
|
|
34
|
-
paymentType: string = '医保';
|
|
35
|
-
//就诊方式
|
|
36
|
-
outpatientType: string = '预约';
|
|
37
|
-
draft: boolean = false;
|
|
38
|
-
isEditing: boolean = false;
|
|
39
|
-
metas: Metas = Metas.builder().build();
|
|
40
|
-
constructor() {
|
|
41
|
-
super();
|
|
42
|
-
const prescription = Prescription.builder().build();
|
|
43
|
-
prescription.herbals.push(Herbal.builder().build());
|
|
44
|
-
this.prescriptions.data.push(prescription);
|
|
45
|
-
}
|
|
46
|
-
async of(json: CheckState) {
|
|
47
|
-
if (json.tagsState != undefined)
|
|
48
|
-
this.tags = await Promise.all(
|
|
49
|
-
json.tagsState.map((item) => {
|
|
50
|
-
const clTag = new Tag();
|
|
51
|
-
return clTag.of(item);
|
|
52
|
-
}),
|
|
53
|
-
);
|
|
54
|
-
if (json.id != undefined) this.id = json.id;
|
|
55
|
-
if (json.prescriptionsState != undefined) {
|
|
56
|
-
this.prescriptions = new Sequence<AlovaPrescription>();
|
|
57
|
-
const prescriptionStates = JSON.parse(json.prescriptionsState) as PrescriptionState[];
|
|
58
|
-
const prescription = await Promise.all(
|
|
59
|
-
prescriptionStates.map(async (item) => {
|
|
60
|
-
return new AlovaPrescription().of(item);
|
|
61
|
-
}),
|
|
62
|
-
);
|
|
63
|
-
this.prescriptions.data.push(...prescription);
|
|
64
|
-
}
|
|
65
|
-
if (this.prescriptions.data.length === 0)
|
|
66
|
-
this.prescriptions.data.push(Prescription.builder().build());
|
|
67
|
-
if (json.diagnosis != undefined) {
|
|
68
|
-
if (json.diagnosis.indexOf('脉证') !== 0 && json.diagnosis.indexOf('\n脉证') === -1) {
|
|
69
|
-
json.diagnosis = json.diagnosis.replaceAll('脉证', '\n脉证');
|
|
70
|
-
}
|
|
71
|
-
if (json.diagnosis.indexOf('\n方证') === -1) {
|
|
72
|
-
json.diagnosis = json.diagnosis.replaceAll('方证', '\n方证');
|
|
73
|
-
}
|
|
74
|
-
this.diagnosis = extractPlainText(json.diagnosis);
|
|
75
|
-
}
|
|
76
|
-
if (json.doctorState != undefined) this.doctor = await this.doctor.of(json.doctorState);
|
|
77
|
-
if (json.patientState != undefined) this.patient = await this.patient.of(json.patientState);
|
|
78
|
-
if (json.createdTimestamp != undefined) this.createdTimestamp = json.createdTimestamp!;
|
|
79
|
-
if (json.updatedTimestamp != undefined) this.updatedTimestamp = json.updatedTimestamp!;
|
|
80
|
-
if (json.prescriptionPaymentStatus != undefined)
|
|
81
|
-
this.prescriptionPaymentStatus = json.prescriptionPaymentStatus!;
|
|
82
|
-
if (json.outboundStatus != undefined) this.outboundStatus = json.outboundStatus!;
|
|
83
|
-
if (json.paymentType != undefined) this.paymentType = json.paymentType!;
|
|
84
|
-
if (json.outpatientType != undefined) this.outpatientType = json.outpatientType!;
|
|
85
|
-
if (json.metasState != undefined) {
|
|
86
|
-
this.metas.addMetas(await Promise.all(json.metasState.map((item) => Metas.map(item))));
|
|
87
|
-
}
|
|
88
|
-
return this;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
state() {
|
|
92
|
-
console.log(this);
|
|
93
|
-
const state = {} as CheckState;
|
|
94
|
-
state.id = this.id;
|
|
95
|
-
state.doctorState = this.doctor.state();
|
|
96
|
-
state.patientState = this.patient.state();
|
|
97
|
-
state.outpatientType = this.outpatientType;
|
|
98
|
-
state.paymentType = this.paymentType;
|
|
99
|
-
// Note: We can't populate metaIds here as it would create a circular dependency
|
|
100
|
-
// The metaIds should be populated by the caller if needed
|
|
101
|
-
state.diagnosis = extractPlainText(this.diagnosis.replace('</div>', '\n<div>'));
|
|
102
|
-
state.createdTimestamp = this.createdTimestamp;
|
|
103
|
-
// Note: We'll leave prescriptions handling for the caller due to complexity
|
|
104
|
-
state.diagnosis = this.diagnosis;
|
|
105
|
-
state.tagsState = this.tags.map((item) => item.state());
|
|
106
|
-
state.createdTimestamp = this.createdTimestamp;
|
|
107
|
-
state.updatedTimestamp = this.updatedTimestamp;
|
|
108
|
-
state.prescriptionsState = JSON.stringify(this.prescriptions.data.map((item) => item.state()));
|
|
109
|
-
state.metasState = Metas.standards().flatMap((type) =>
|
|
110
|
-
this.metas[type].data.map((item) => item.state()),
|
|
111
|
-
);
|
|
112
|
-
return state;
|
|
113
|
-
}
|
|
114
|
-
abstract get(): Promise<this>;
|
|
115
|
-
abstract put(): Promise<this>;
|
|
116
|
-
abstract post(): Promise<this>;
|
|
117
|
-
abstract delete(): Promise<void>;
|
|
118
|
-
|
|
119
|
-
static query(
|
|
120
|
-
page: number,
|
|
121
|
-
pageSize: number,
|
|
122
|
-
sort: string,
|
|
123
|
-
patientId?: string,
|
|
124
|
-
doctorId?: string,
|
|
125
|
-
startTime?: string,
|
|
126
|
-
endTime?: string,
|
|
127
|
-
patientName?: string,
|
|
128
|
-
patientGender?: string,
|
|
129
|
-
patientPhoneNumber?: string,
|
|
130
|
-
): Promise<Page<Check>> {
|
|
131
|
-
return Check.default().query(
|
|
132
|
-
page,
|
|
133
|
-
pageSize,
|
|
134
|
-
sort,
|
|
135
|
-
patientId,
|
|
136
|
-
doctorId,
|
|
137
|
-
startTime,
|
|
138
|
-
endTime,
|
|
139
|
-
patientName,
|
|
140
|
-
patientGender,
|
|
141
|
-
patientPhoneNumber,
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
static queryPayment(
|
|
145
|
-
page: number,
|
|
146
|
-
pageSize: number,
|
|
147
|
-
doctorId?: string,
|
|
148
|
-
patientId?: string,
|
|
149
|
-
patientName?: string,
|
|
150
|
-
patientPhone?: string,
|
|
151
|
-
prescriptionPaymentStatus?: number,
|
|
152
|
-
outboundStatus?: number,
|
|
153
|
-
): Promise<Page<Payment>> {
|
|
154
|
-
return Check.default().queryPayment(
|
|
155
|
-
page,
|
|
156
|
-
pageSize,
|
|
157
|
-
doctorId,
|
|
158
|
-
patientId,
|
|
159
|
-
patientName,
|
|
160
|
-
patientPhone,
|
|
161
|
-
prescriptionPaymentStatus,
|
|
162
|
-
outboundStatus,
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
export abstract class Payment extends NetworkObject {
|
|
167
|
-
static override builder(): IBuilder<Payment> {
|
|
168
|
-
return Builder(this._default) as unknown as IBuilder<Payment>;
|
|
169
|
-
}
|
|
170
|
-
static override default(): typeof Payment {
|
|
171
|
-
return this._default as unknown as typeof Payment;
|
|
172
|
-
}
|
|
173
|
-
id: string = '';
|
|
174
|
-
prescription: string = '';
|
|
175
|
-
doctorId: string = '';
|
|
176
|
-
patientId: string = '';
|
|
177
|
-
patientName: string = '';
|
|
178
|
-
patientPhone: string = '';
|
|
179
|
-
patientGender: string = '';
|
|
180
|
-
createdTimestamp: number = 0;
|
|
181
|
-
updatedTimestamp: number = 0;
|
|
182
|
-
prescriptionPaymentStatus: number = 0;
|
|
183
|
-
outboundStatus: number = 0;
|
|
184
|
-
async of(json: PaymentState) {
|
|
185
|
-
this.id = json.id!;
|
|
186
|
-
this.prescription = json.prescription ? json.prescription : '';
|
|
187
|
-
this.doctorId = json.doctorId!;
|
|
188
|
-
this.patientId = json.patientId!;
|
|
189
|
-
this.patientName = json.patientName ? json.patientName : '';
|
|
190
|
-
this.patientPhone = json.patientPhone ? json.patientPhone : '';
|
|
191
|
-
this.patientGender = json.patientGender ? json.patientGender : '';
|
|
192
|
-
this.createdTimestamp = json.createdTimestamp ? json.createdTimestamp : 0;
|
|
193
|
-
this.updatedTimestamp = json.updatedTimestamp ? json.updatedTimestamp : 0;
|
|
194
|
-
this.prescriptionPaymentStatus = json.prescriptionPaymentStatus
|
|
195
|
-
? json.prescriptionPaymentStatus
|
|
196
|
-
: 0;
|
|
197
|
-
this.outboundStatus = json.outboundStatus ? json.outboundStatus : 0;
|
|
198
|
-
return Promise.resolve(this);
|
|
199
|
-
}
|
|
200
|
-
state(): PaymentState {
|
|
201
|
-
return {
|
|
202
|
-
id: this.id,
|
|
203
|
-
prescription: this.prescription,
|
|
204
|
-
doctorId: this.doctorId,
|
|
205
|
-
patientId: this.patientId,
|
|
206
|
-
patientName: this.patientName,
|
|
207
|
-
patientPhone: this.patientPhone,
|
|
208
|
-
patientGender: this.patientGender,
|
|
209
|
-
createdTimestamp: this.createdTimestamp,
|
|
210
|
-
updatedTimestamp: this.updatedTimestamp,
|
|
211
|
-
prescriptionPaymentStatus: this.prescriptionPaymentStatus,
|
|
212
|
-
outboundStatus: this.outboundStatus,
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
abstract putOutboundStatus(status: number): Promise<this>;
|
|
216
|
-
abstract putPrescriptionPaymentStatus(status: number): Promise<this>;
|
|
217
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { createClientTokenAuthentication } from 'alova/client';
|
|
2
|
-
import { storageHelper } from 'src/util/helper';
|
|
3
|
-
import { jwtDecode } from 'jwt-decode';
|
|
4
|
-
import type { Method } from 'alova';
|
|
5
|
-
|
|
6
|
-
export const { onAuthRequired } = createClientTokenAuthentication({
|
|
7
|
-
assignToken: (method) => {
|
|
8
|
-
if (!storageHelper.getItem('token')) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
method.config.headers.Authorization = 'Bearer ' + storageHelper.getItem('token');
|
|
12
|
-
},
|
|
13
|
-
visitorMeta: {
|
|
14
|
-
isVisitor: true,
|
|
15
|
-
},
|
|
16
|
-
login: {
|
|
17
|
-
metaMatches: {
|
|
18
|
-
login: true,
|
|
19
|
-
},
|
|
20
|
-
handler: async (response: Response) => {
|
|
21
|
-
if (response.status != 200) throw new Error('登录失败' + (await response.text()));
|
|
22
|
-
await response.json().then((data) => {
|
|
23
|
-
storageHelper.setItem('token', data.token);
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
refreshToken: {
|
|
28
|
-
// 在请求前触发,将接收到method参数,并返回boolean表示token是否过期
|
|
29
|
-
isExpired: () => {
|
|
30
|
-
if (!storageHelper.getItem('token')) return false;
|
|
31
|
-
const decoded = jwtDecode(storageHelper.getItem('token'));
|
|
32
|
-
// 如果没有 exp 声明,默认永不过期
|
|
33
|
-
if (decoded.exp === undefined) return false;
|
|
34
|
-
|
|
35
|
-
// 获取当前时间(秒)
|
|
36
|
-
const currentTime = Date.now() / 1000;
|
|
37
|
-
|
|
38
|
-
// 检查是否过期
|
|
39
|
-
return decoded.exp < currentTime;
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
// 当token过期时触发,在此函数中触发刷新token
|
|
43
|
-
handler: async () => {
|
|
44
|
-
// token刷新失败,跳转回登录页
|
|
45
|
-
storageHelper.removeItem('token');
|
|
46
|
-
window.location.href = '登录';
|
|
47
|
-
return await Promise.resolve();
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
export const responded = {
|
|
52
|
-
onSuccess: async (response: Response, method: Method) => {
|
|
53
|
-
if (response.status == 401) {
|
|
54
|
-
if (method.meta['Login']) {
|
|
55
|
-
throw new Error(response.status.toString());
|
|
56
|
-
}
|
|
57
|
-
console.log('未登录');
|
|
58
|
-
storageHelper.removeItem('token');
|
|
59
|
-
window.location.href = process.env.APP_URL!;
|
|
60
|
-
}
|
|
61
|
-
if ('application/octet-stream' == response.headers.get('Content-Type')) return response;
|
|
62
|
-
if (response.status == 200 || response.status == 201 || response.status == 204) {
|
|
63
|
-
const raw = await response.text();
|
|
64
|
-
try {
|
|
65
|
-
return JSON.parse(raw);
|
|
66
|
-
} catch {
|
|
67
|
-
return raw;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
};
|
package/src/api/config/index.ts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import punycode from 'punycode';
|
|
2
|
-
//设置服务类型有哪些
|
|
3
|
-
export enum ServiceType {
|
|
4
|
-
OAuth = 'OAuth',
|
|
5
|
-
OAuthRedirect = 'OAuthRedirect',
|
|
6
|
-
Doctor = 'Doctor',
|
|
7
|
-
Patient = 'Patient',
|
|
8
|
-
Scientist = 'Scientist',
|
|
9
|
-
Outpatient = 'Outpatient',
|
|
10
|
-
Check = 'Check',
|
|
11
|
-
Prescription = 'Prescription',
|
|
12
|
-
Authorization = 'Authorization',
|
|
13
|
-
InspectionsAlgorithm = 'InspectionsAlgorithm',
|
|
14
|
-
PulsationsAlgorithm = 'PulsationsAlgorithm',
|
|
15
|
-
InquiriesAlgorithm = 'InquiriesAlgorithm',
|
|
16
|
-
LisemsAlgorithm = 'LisemsAlgorithm',
|
|
17
|
-
ComprehensiveAlgorithm = 'ComprehensiveAlgorithm',
|
|
18
|
-
}
|
|
19
|
-
//设置服务类型有哪些
|
|
20
|
-
export enum EnvironmentType {
|
|
21
|
-
Dev = 'Dev',
|
|
22
|
-
Prod = 'Prod',
|
|
23
|
-
Local = 'Local',
|
|
24
|
-
}
|
|
25
|
-
export const getServiceEndpoint = (serviceType: ServiceType, env?: EnvironmentType) => {
|
|
26
|
-
if (env == undefined) {
|
|
27
|
-
if (punycode.toUnicode(window.location.hostname).includes('测试')) env = EnvironmentType.Dev;
|
|
28
|
-
else if (
|
|
29
|
-
window.location.hostname.includes('localhost') ||
|
|
30
|
-
window.location.hostname.includes('127.0.0.1')
|
|
31
|
-
)
|
|
32
|
-
env = EnvironmentType.Prod;
|
|
33
|
-
else env = EnvironmentType.Prod;
|
|
34
|
-
}
|
|
35
|
-
if (env == EnvironmentType.Prod) {
|
|
36
|
-
switch (serviceType) {
|
|
37
|
-
case ServiceType.OAuth:
|
|
38
|
-
return 'https://用户.仪联中.中国';
|
|
39
|
-
case ServiceType.OAuthRedirect:
|
|
40
|
-
return 'https://用户.仪联中.中国/互联/服务/互联/授权?response_type=code&state=1223&client_id=tcm&scope=profile';
|
|
41
|
-
case ServiceType.Doctor:
|
|
42
|
-
return 'https://中医.仪联中.中国';
|
|
43
|
-
case ServiceType.Patient:
|
|
44
|
-
return 'https://中医.仪联中.中国';
|
|
45
|
-
case ServiceType.Scientist:
|
|
46
|
-
return 'https://中医.仪联中.中国';
|
|
47
|
-
case ServiceType.Outpatient:
|
|
48
|
-
return 'https://中医.仪联中.中国';
|
|
49
|
-
case ServiceType.Check:
|
|
50
|
-
return 'https://中医.仪联中.中国';
|
|
51
|
-
case ServiceType.Prescription:
|
|
52
|
-
return 'https://中医.仪联中.中国';
|
|
53
|
-
case ServiceType.Authorization:
|
|
54
|
-
return 'https://中医.仪联中.中国';
|
|
55
|
-
case ServiceType.InspectionsAlgorithm:
|
|
56
|
-
return 'https://中医.仪联中.中国/望诊/算法';
|
|
57
|
-
case ServiceType.PulsationsAlgorithm:
|
|
58
|
-
return 'https://中医.仪联中.中国/切诊/算法';
|
|
59
|
-
case ServiceType.InquiriesAlgorithm:
|
|
60
|
-
return 'https://中医.仪联中.中国/问诊/算法';
|
|
61
|
-
case ServiceType.LisemsAlgorithm:
|
|
62
|
-
return 'https://中医.仪联中.中国/闻诊/算法';
|
|
63
|
-
case ServiceType.ComprehensiveAlgorithm:
|
|
64
|
-
return 'https://中医.仪联中.中国/四诊合参/算法';
|
|
65
|
-
}
|
|
66
|
-
} else if (env == EnvironmentType.Dev) {
|
|
67
|
-
switch (serviceType) {
|
|
68
|
-
case ServiceType.OAuth:
|
|
69
|
-
return 'https://用户测试.仪联中.中国';
|
|
70
|
-
case ServiceType.OAuthRedirect:
|
|
71
|
-
return 'https://用户测试.仪联中.中国/互联/服务/互联/授权?response_type=code&state=1223&client_id=tcm&scope=profile';
|
|
72
|
-
case ServiceType.Doctor:
|
|
73
|
-
return 'https://中医测试.仪联中.中国';
|
|
74
|
-
case ServiceType.Patient:
|
|
75
|
-
return 'https://中医测试.仪联中.中国';
|
|
76
|
-
case ServiceType.Scientist:
|
|
77
|
-
return 'https://中医测试.仪联中.中国';
|
|
78
|
-
case ServiceType.Outpatient:
|
|
79
|
-
return 'https://中医测试.仪联中.中国';
|
|
80
|
-
case ServiceType.Check:
|
|
81
|
-
return 'https://中医测试.仪联中.中国';
|
|
82
|
-
case ServiceType.Prescription:
|
|
83
|
-
return 'https://中医测试.仪联中.中国';
|
|
84
|
-
case ServiceType.Authorization:
|
|
85
|
-
return 'https://中医测试.仪联中.中国';
|
|
86
|
-
case ServiceType.InspectionsAlgorithm:
|
|
87
|
-
return 'https://中医测试.仪联中.中国/望诊/算法';
|
|
88
|
-
case ServiceType.PulsationsAlgorithm:
|
|
89
|
-
return 'https://中医测试.仪联中.中国/切诊/算法';
|
|
90
|
-
case ServiceType.InquiriesAlgorithm:
|
|
91
|
-
return 'https://中医测试.仪联中.中国/问诊/算法';
|
|
92
|
-
case ServiceType.LisemsAlgorithm:
|
|
93
|
-
return 'https://中医测试.仪联中.中国/闻诊/算法';
|
|
94
|
-
case ServiceType.ComprehensiveAlgorithm:
|
|
95
|
-
return 'https://中医测试.仪联中.中国/四诊合参/算法';
|
|
96
|
-
}
|
|
97
|
-
} else if (env == EnvironmentType.Local) {
|
|
98
|
-
switch (serviceType) {
|
|
99
|
-
case ServiceType.OAuth:
|
|
100
|
-
return 'http://localhost:8080';
|
|
101
|
-
case ServiceType.OAuthRedirect:
|
|
102
|
-
return 'https://用户.仪联中.中国/互联/服务/互联/授权?response_type=code&state=1223&client_id=tcm&scope=profile';
|
|
103
|
-
case ServiceType.Doctor:
|
|
104
|
-
return 'http://localhost:8080';
|
|
105
|
-
case ServiceType.Patient:
|
|
106
|
-
return 'http://localhost:8080';
|
|
107
|
-
case ServiceType.Scientist:
|
|
108
|
-
return 'http://localhost:8080';
|
|
109
|
-
case ServiceType.Outpatient:
|
|
110
|
-
return 'http://localhost:8080';
|
|
111
|
-
case ServiceType.Check:
|
|
112
|
-
return 'http://localhost:8080';
|
|
113
|
-
case ServiceType.Prescription:
|
|
114
|
-
return 'http://localhost:8080';
|
|
115
|
-
case ServiceType.Authorization:
|
|
116
|
-
return 'http://localhost:8080';
|
|
117
|
-
case ServiceType.InspectionsAlgorithm:
|
|
118
|
-
return 'http://localhost:8080';
|
|
119
|
-
case ServiceType.PulsationsAlgorithm:
|
|
120
|
-
return 'http://localhost:8080';
|
|
121
|
-
case ServiceType.InquiriesAlgorithm:
|
|
122
|
-
return 'http://localhost:8080';
|
|
123
|
-
case ServiceType.LisemsAlgorithm:
|
|
124
|
-
return 'http://localhost:8080';
|
|
125
|
-
case ServiceType.ComprehensiveAlgorithm:
|
|
126
|
-
return 'http://localhost:8080';
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
throw new Error('环境错误');
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export * from './alova';
|
package/src/api/device/device.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { ref } from 'vue';
|
|
2
|
-
import { useQuasar } from 'quasar';
|
|
3
|
-
|
|
4
|
-
const $q = useQuasar();
|
|
5
|
-
export const port = ref();
|
|
6
|
-
|
|
7
|
-
export async function connectToSerialPort() {
|
|
8
|
-
try {
|
|
9
|
-
const SerialOptions = {
|
|
10
|
-
baudRate: 115200,
|
|
11
|
-
dataBits: 8,
|
|
12
|
-
stopBits: 1,
|
|
13
|
-
bufferSize: 1024,
|
|
14
|
-
};
|
|
15
|
-
port.value = await navigator.serial.requestPort();
|
|
16
|
-
if (!port.value) {
|
|
17
|
-
$q.dialog({
|
|
18
|
-
title: '错误',
|
|
19
|
-
message: '未选择串口',
|
|
20
|
-
});
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
await port.value.open(SerialOptions);
|
|
24
|
-
console.log('port', port.value.getInfo());
|
|
25
|
-
return true;
|
|
26
|
-
} catch (error) {
|
|
27
|
-
console.error('Error connecting to serial port:', error);
|
|
28
|
-
$q.dialog({
|
|
29
|
-
title: '错误',
|
|
30
|
-
message: '连接串口失败',
|
|
31
|
-
});
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export function getPortInfo() {
|
|
36
|
-
return port.value?.getInfo();
|
|
37
|
-
}
|
|
38
|
-
export async function disconnectToSerialPort() {
|
|
39
|
-
if (!port.value) {
|
|
40
|
-
console.error('Serial port not available');
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
await port.value.close();
|
|
44
|
-
port.value = null;
|
|
45
|
-
console.log('Serial port disconnected');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export async function sendText(text) {
|
|
49
|
-
if (port.value) {
|
|
50
|
-
const writer = port.value.writable.getWriter();
|
|
51
|
-
console.log('text', text);
|
|
52
|
-
|
|
53
|
-
await writer.write(new TextEncoder().encode(text));
|
|
54
|
-
await writer.close();
|
|
55
|
-
} else {
|
|
56
|
-
console.error('Serial port not available');
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/// <reference types='./globals.d.ts' />
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* OpenAPI definition - version v0
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* OpenAPI version: 3.1.0
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* NOTE: This file is auto generated by the alova's vscode plugin.
|
|
13
|
-
*
|
|
14
|
-
* https://alova.js.org/devtools/vscode
|
|
15
|
-
*
|
|
16
|
-
* **Do not edit the file manually.**
|
|
17
|
-
*/
|
|
18
|
-
export default {
|
|
19
|
-
'doctorStateRestful.getDoctorState': ['GET', '/医生/服务/{id}'],
|
|
20
|
-
'doctorStateRestful.putDoctorState': ['PUT', '/医生/服务/{id}'],
|
|
21
|
-
'doctorStateRestful.deleteDoctorState': ['DELETE', '/医生/服务/{id}'],
|
|
22
|
-
'doctorStateRestful.queryDoctorState': ['GET', '/医生/服务'],
|
|
23
|
-
'doctorStateRestful.postDoctorState': ['POST', '/医生/服务'],
|
|
24
|
-
'doctorStateRestful.queryDoctorStateByExactMatch': ['POST', '/医生/服务/精确匹配'],
|
|
25
|
-
'doctorStateRestful.datesOfDoctor': ['GET', '/医生/服务/统计/医生/日期'],
|
|
26
|
-
'doctorStateRestful.totalOfDoctor': ['GET', '/医生/服务/统计/医生/总数'],
|
|
27
|
-
'doctorStateRestful.totalOfDoctorByToday': ['GET', '/医生/服务/统计/医生/今日'],
|
|
28
|
-
};
|