cnhis-design-vue 3.1.47-release.3 → 3.1.47
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/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/src/utils/dialog.js +1 -1
- package/es/components/card-reader-sdk/index.d.ts +4 -0
- package/es/components/card-reader-sdk/index.js +1 -0
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +23 -0
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -0
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue.d.ts +29 -0
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue.js +1 -0
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -0
- package/es/components/card-reader-sdk/src/constants/index.d.ts +171 -0
- package/es/components/card-reader-sdk/src/constants/index.js +1 -0
- package/es/components/card-reader-sdk/src/insuranceSDK.d.ts +27 -0
- package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -0
- package/es/components/card-reader-sdk/src/types/index.d.ts +53 -0
- package/es/components/card-reader-sdk/src/types/index.js +1 -0
- package/es/components/card-reader-sdk/src/utils/index.d.ts +9 -0
- package/es/components/card-reader-sdk/src/utils/index.js +1 -0
- package/es/components/card-reader-sdk/src/utils/readHealthCard.d.ts +6 -0
- package/es/components/card-reader-sdk/src/utils/readHealthCard.js +1 -0
- package/es/components/fabric-chart/index.d.ts +3 -20
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +3 -20
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +2 -18
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +2 -18
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +2 -4
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +2 -3
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +2 -18
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +12 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/scale-view/index.d.ts +1 -0
- package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -1
- package/es/components/shortcut-provider/src/types/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +12 -0
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +1 -1
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/useDateTime.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.d.ts +2 -1
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/es/shared/utils/tapableLess.d.ts +28 -0
- package/es/shared/utils/tapableLess.js +1 -0
- package/package.json +2 -2
- package/es/components/insurance-sdk/index.d.ts +0 -1
- package/es/components/insurance-sdk/index.js +0 -1
- package/es/components/insurance-sdk/src/constants/index.d.ts +0 -161
- package/es/components/insurance-sdk/src/constants/index.js +0 -1
- package/es/components/insurance-sdk/src/utils/index.d.ts +0 -1
- package/es/components/insurance-sdk/src/utils/index.js +0 -1
- package/es/components/insurance-sdk/src/utils/insurance.d.ts +0 -260
- package/es/components/insurance-sdk/src/utils/insurance.js +0 -1
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
# 安装
|
|
2
|
-
|
|
3
|
-
```shell
|
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
|
5
|
-
# or
|
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## 1.全局引入
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// main.ts
|
|
13
|
-
import { createApp } from 'vue';
|
|
14
|
-
import App from './App.vue';
|
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
-
import cui from 'cnhis-design-vue';
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(cui).mount('#app');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. 按需引入
|
|
23
|
-
|
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
-
|
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
# 安装自动导入样式的插件
|
|
30
|
-
npm i -d vite-plugin-style-import
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// vite.config.ts
|
|
35
|
-
import { defineConfig } from 'vite';
|
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
-
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
plugins: [
|
|
40
|
-
// ...otherPlugins
|
|
41
|
-
createStyleImportPlugin({
|
|
42
|
-
libs: [
|
|
43
|
-
{
|
|
44
|
-
libraryName: 'cnhis-design-vue',
|
|
45
|
-
esModule: true,
|
|
46
|
-
ensureStyleFile: true,
|
|
47
|
-
resolveStyle: name => {
|
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// main.ts
|
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 3.FAQ
|
|
65
|
-
|
|
66
|
-
### 3.1 项目打包后样式丢失
|
|
67
|
-
|
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
// vite.config.ts
|
|
72
|
-
import { defineConfig } from 'vite';
|
|
73
|
-
|
|
74
|
-
export default defineConfig({
|
|
75
|
-
build: {
|
|
76
|
-
rollupOptions: {
|
|
77
|
-
// ..otherOptions
|
|
78
|
-
output: {
|
|
79
|
-
dir: './dist',
|
|
80
|
-
manualChunks: {
|
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
```
|
|
1
|
+
# 安装
|
|
2
|
+
|
|
3
|
+
```shell
|
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
|
5
|
+
# or
|
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1.全局引入
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// main.ts
|
|
13
|
+
import { createApp } from 'vue';
|
|
14
|
+
import App from './App.vue';
|
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
+
import cui from 'cnhis-design-vue';
|
|
17
|
+
|
|
18
|
+
const app = createApp(App);
|
|
19
|
+
app.use(cui).mount('#app');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. 按需引入
|
|
23
|
+
|
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
+
|
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
# 安装自动导入样式的插件
|
|
30
|
+
npm i -d vite-plugin-style-import
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// vite.config.ts
|
|
35
|
+
import { defineConfig } from 'vite';
|
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
plugins: [
|
|
40
|
+
// ...otherPlugins
|
|
41
|
+
createStyleImportPlugin({
|
|
42
|
+
libs: [
|
|
43
|
+
{
|
|
44
|
+
libraryName: 'cnhis-design-vue',
|
|
45
|
+
esModule: true,
|
|
46
|
+
ensureStyleFile: true,
|
|
47
|
+
resolveStyle: name => {
|
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// main.ts
|
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 3.FAQ
|
|
65
|
+
|
|
66
|
+
### 3.1 项目打包后样式丢失
|
|
67
|
+
|
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// vite.config.ts
|
|
72
|
+
import { defineConfig } from 'vite';
|
|
73
|
+
|
|
74
|
+
export default defineConfig({
|
|
75
|
+
build: {
|
|
76
|
+
rollupOptions: {
|
|
77
|
+
// ..otherOptions
|
|
78
|
+
output: {
|
|
79
|
+
dir: './dist',
|
|
80
|
+
manualChunks: {
|
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
```
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e,render as t,createVNode as r,withCtx as n,nextTick as
|
|
1
|
+
import{ref as e,render as t,createVNode as r,withCtx as n,nextTick as i}from"vue";import{createProviderWrapper as o}from"../../../../shared/utils/index.js";import s from"../components/IdentityVerification.vue.js";import d from"../components/Preview.vue.js";class a{constructor(){this.rendered=!1}static createMsg(e){return`[IdentityVerificationDialog] ${e}`}show(d,l,c,u,m){return this.rendered?Promise.reject(a.createMsg("请勿重复打开弹窗")):new Promise(((v,f)=>{this.rendered=!0;const p=document.createElement("div"),h=e(!1),g=o(d);var w;function y(){f(a.createMsg("弹窗关闭"))}function E(e){v(e),h.value=!1}t(r(g,null,{default:n((()=>r(s,{to:p,verifyUser:c,modelValue:h.value,"onUpdate:modelValue":e=>h.value=e,identityVerificationTitle:l,onClose:y,onAfterLeave:()=>function(e){if(!e.parentElement)return;P.rendered=!1,e.parentElement.removeChild(e)}(p),onSuccess:E,formatId:u,templateId:m},null)),d)}),p),w=p,document.body.appendChild(w),i((()=>h.value=!0));const P=this}))}}class l{constructor(){this.rendered=!1}static createMsg(e){return`[PreviewDialog] ${e}`}show(s,a){return this.rendered?Promise.reject(l.createMsg("请勿重复打开弹窗")):new Promise(((l,c)=>{this.rendered=!0;const u=document.createElement("div"),m=e(!1),v=o(s);var f;t(r(v,null,{default:n((()=>r(d,{visible:m.value,"onUpdate:visible":e=>m.value=e,src:a,onAfterLeave:()=>function(e){if(!e.parentElement)return;p.rendered=!1,e.parentElement.removeChild(e)}(u)},null)),s)}),u),f=u,document.body.appendChild(f),i((()=>{m.value=!0,l("success")}));const p=this}))}}export{a as IdentityVerificationDialog,l as PreviewDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{default as CInsuranceSDK}from"./src/insuranceSDK.js";export{default as CCardReaderSDK}from"./src/cardReaderSDK.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentInternalInstance } from 'vue';
|
|
2
|
+
import { InsuranceType } from './types';
|
|
3
|
+
export default class CardReaderSDK {
|
|
4
|
+
private options;
|
|
5
|
+
private loading;
|
|
6
|
+
private readHealthCardDialog;
|
|
7
|
+
private insurance;
|
|
8
|
+
constructor(options: InsuranceType.CardReadOptions);
|
|
9
|
+
private get basicParamsRes();
|
|
10
|
+
static create(options?: InsuranceType.CardReadOptions): CardReaderSDK;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
readHealthCard(instance?: ComponentInternalInstance): Promise<string>;
|
|
13
|
+
readIdCard(params?: InsuranceType.CardReadParams): Promise<InsuranceType.CardReadResult>;
|
|
14
|
+
readVisitCard(params?: InsuranceType.CardReadParams): Promise<InsuranceType.CardReadResult>;
|
|
15
|
+
readHospitalCard(params?: InsuranceType.CardReadParams & {
|
|
16
|
+
iai03?: string;
|
|
17
|
+
bdp02?: string;
|
|
18
|
+
vaa05?: string;
|
|
19
|
+
}): Promise<InsuranceType.CardReadResult>;
|
|
20
|
+
private createBasicParams;
|
|
21
|
+
private checkLoading;
|
|
22
|
+
private checkResCodeAndLoading;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isFunction as a}from"lodash-es";import e from"./insuranceSDK.js";import{CARD_TYPE as s}from"./constants/index.js";import{ReadHealthCard as t}from"./utils/readHealthCard.js";class r{constructor(a){this.options=a,this.loading=!1,this.readHealthCardDialog=new t,this.insurance=new e}get basicParamsRes(){return a(this.options.basicParams)?this.options.basicParams():this.options.basicParams}static create(a={}){return new r(a)}destroy(){this.insurance.destroy()}async readHealthCard(a){return await this.checkLoading(),this.readHealthCardDialog.show(a)}async readIdCard(a={}){await this.checkLoading();const e=this.createBasicParams(s.ID_CARD,a);return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(e))}async readVisitCard(a={}){await this.checkLoading();const e=this.createBasicParams(s.VISIT_CARD,a,{transsystem:"10",transdata:{readtype:1}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(e))}async readHospitalCard(a={}){await this.checkLoading();const e=this.createBasicParams(s.HOSPITAL_CARD,a,{iar1Json:{iaa01:a.interfaceid,iai03:a.iai03||"",bdp02:a.bdp02||""},personinfo:{location:0,ptname:a.vaa05||""},transchannel:"101",interfaceid:a.interfaceid,transtype:"YB0000"});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(e))}createBasicParams(a,e,s){var t,r;const{operatorname:i,operatorcode:n,...o}=this.basicParamsRes||{};return{type:a,operatorname:null!=(t=e.operatorname)?t:i,operatorcode:null!=(r=e.operatorcode)?r:n,...o,...s}}checkLoading(){if(this.loading)return Promise.reject("请勿重复读卡")}async checkResCodeAndLoading(a){try{this.loading=!0;const e=await a;return 3===e.returncode?Promise.reject(`读卡服务提示: ${e.returnmsg||"读卡失败"}`):e}finally{this.loading=!1}}}export{r as default};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
show: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}, {
|
|
7
|
+
props: {
|
|
8
|
+
show: boolean;
|
|
9
|
+
};
|
|
10
|
+
inputRef: import("vue").Ref<{
|
|
11
|
+
focus: () => void;
|
|
12
|
+
} | undefined>;
|
|
13
|
+
valueRef: import("vue").Ref<string>;
|
|
14
|
+
emit: (event: "close" | "update:show" | "confirm", ...args: any[]) => void;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
onConfirm: () => void;
|
|
17
|
+
NInput: any;
|
|
18
|
+
NModal: any;
|
|
19
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:show" | "confirm")[], "close" | "confirm" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
show: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
}>> & {
|
|
25
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
26
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
27
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
28
|
+
}, {}>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./readCardDialog.vue2.js";import e from"../../../../_virtual/_plugin-vue_export-helper.js";var a=e(r,[["__file","readCardDialog.vue"]]);export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,watch as o,nextTick as t,ref as a,openBlock as s,createBlock as l,unref as i,withCtx as n,createVNode as u}from"vue";import{NModal as r,NInput as c}from"naive-ui";var p=e({__name:"readCardDialog",props:{show:{type:Boolean}},emits:["update:show","confirm","close"],setup(e,{emit:p}){const v=e;o((()=>v.show),(async e=>{var o;e&&(await t(),null==(o=f.value)||o.focus())}));const f=a(),m=a("");function w(){p("update:show",!1),p("close")}function d(){p("confirm",m.value)}return(o,t)=>(s(),l(i(r),{preset:"dialog",title:"扫码电子健康卡",show:e.show,"close-on-esc":!1,"show-icon":!1,"positive-text":"确认",onClose:w,onPositiveClick:d},{default:n((()=>[u(i(c),{value:m.value,"onUpdate:value":t[0]||(t[0]=e=>m.value=e),ref_key:"inputRef",ref:f},null,8,["value"])])),_:1},8,["show"]))}});export{p as default};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 交易命令映射
|
|
3
|
+
*/
|
|
4
|
+
export declare const transcmdMapping: Readonly<{
|
|
5
|
+
sk: 100210;
|
|
6
|
+
ghdj: 100401;
|
|
7
|
+
ghqx: 100403;
|
|
8
|
+
mzjs: 100407;
|
|
9
|
+
beforemzjs: 100406;
|
|
10
|
+
mztf: 100408;
|
|
11
|
+
zyjs: 100613;
|
|
12
|
+
qxzyjs: 100614;
|
|
13
|
+
zydj: 100601;
|
|
14
|
+
qxzydj: 100603;
|
|
15
|
+
zydjzzf: 100605;
|
|
16
|
+
mzghconfirm: 100415;
|
|
17
|
+
ghdjcg: 100411;
|
|
18
|
+
ghdjsb: 100412;
|
|
19
|
+
mzjscg: 100409;
|
|
20
|
+
mzjssb: 100410;
|
|
21
|
+
mztfcg: 100413;
|
|
22
|
+
mztfsb: 100414;
|
|
23
|
+
newdhyk: 110021;
|
|
24
|
+
newdsfz: 110041;
|
|
25
|
+
fastReport: 100000;
|
|
26
|
+
pos: 100000;
|
|
27
|
+
yjjrefund: 100622;
|
|
28
|
+
ybxxcx: 100212;
|
|
29
|
+
ybdz: 100209;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const HIS_INSURANCE_PARAMS: Readonly<{
|
|
32
|
+
msgindex: "";
|
|
33
|
+
checkoutinfo: "";
|
|
34
|
+
parmsJson: {
|
|
35
|
+
transtime: string;
|
|
36
|
+
transtype: string;
|
|
37
|
+
interfaceid: string;
|
|
38
|
+
serialnumber: string;
|
|
39
|
+
operatorcode: string;
|
|
40
|
+
operatorname: string;
|
|
41
|
+
transcmd: string;
|
|
42
|
+
transdata: {
|
|
43
|
+
iar1: {
|
|
44
|
+
acf01: string;
|
|
45
|
+
iar01: string;
|
|
46
|
+
vaa01: string;
|
|
47
|
+
vaa07: string;
|
|
48
|
+
iaa01: string;
|
|
49
|
+
iab02: string;
|
|
50
|
+
iak04: string;
|
|
51
|
+
iak05: string;
|
|
52
|
+
iak06: string;
|
|
53
|
+
iar10: string;
|
|
54
|
+
iar11: string;
|
|
55
|
+
iar12: string;
|
|
56
|
+
iar13: string;
|
|
57
|
+
iar14: string;
|
|
58
|
+
iar15: string;
|
|
59
|
+
iar16: string;
|
|
60
|
+
iar17: string;
|
|
61
|
+
iar18: string;
|
|
62
|
+
iar19: string;
|
|
63
|
+
iar20: string;
|
|
64
|
+
iar21: string;
|
|
65
|
+
iar22: string;
|
|
66
|
+
iai03: string;
|
|
67
|
+
iar24: string;
|
|
68
|
+
iar25: string;
|
|
69
|
+
iar26: string;
|
|
70
|
+
iar27: string;
|
|
71
|
+
iar28: string;
|
|
72
|
+
iar29: string;
|
|
73
|
+
iar30: string;
|
|
74
|
+
iar31: string;
|
|
75
|
+
iar32: string;
|
|
76
|
+
iar33: string;
|
|
77
|
+
iar34: string;
|
|
78
|
+
iar35: string;
|
|
79
|
+
iac02: string;
|
|
80
|
+
iac03: string;
|
|
81
|
+
iad03: string;
|
|
82
|
+
iad04: string;
|
|
83
|
+
iar40: string;
|
|
84
|
+
iar41: string;
|
|
85
|
+
iak22: string;
|
|
86
|
+
iar43: string;
|
|
87
|
+
iar44: string;
|
|
88
|
+
iar45: string;
|
|
89
|
+
cli_iai03: string;
|
|
90
|
+
iar46: string;
|
|
91
|
+
iar47: string;
|
|
92
|
+
iar48: string;
|
|
93
|
+
iar49: string;
|
|
94
|
+
iar50: string;
|
|
95
|
+
iar51: string;
|
|
96
|
+
iar52: string;
|
|
97
|
+
iar53: string;
|
|
98
|
+
iar54: string;
|
|
99
|
+
iar55: string;
|
|
100
|
+
iar56: string;
|
|
101
|
+
iar57: string;
|
|
102
|
+
iar58: string;
|
|
103
|
+
iar59: string;
|
|
104
|
+
iar60: string;
|
|
105
|
+
iar61: string;
|
|
106
|
+
iar62: string;
|
|
107
|
+
iar63: string;
|
|
108
|
+
iar64: string;
|
|
109
|
+
iar65: string;
|
|
110
|
+
iar66: string;
|
|
111
|
+
iar67: string;
|
|
112
|
+
iar68: string;
|
|
113
|
+
iar69: string;
|
|
114
|
+
iar70: string;
|
|
115
|
+
iar71: string;
|
|
116
|
+
iar72: string;
|
|
117
|
+
iar73: string;
|
|
118
|
+
iar74: string;
|
|
119
|
+
iar75: string;
|
|
120
|
+
};
|
|
121
|
+
personinfo: {
|
|
122
|
+
location: number;
|
|
123
|
+
ptname: string;
|
|
124
|
+
sex: string;
|
|
125
|
+
birthday: string;
|
|
126
|
+
age: string;
|
|
127
|
+
idnumber: string;
|
|
128
|
+
folk: string;
|
|
129
|
+
address: string;
|
|
130
|
+
pttype: string;
|
|
131
|
+
ownpay: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
transsystem: string;
|
|
135
|
+
transchannel: string;
|
|
136
|
+
verifycode: string;
|
|
137
|
+
};
|
|
138
|
+
error: true;
|
|
139
|
+
catch: true;
|
|
140
|
+
loading: false;
|
|
141
|
+
}>;
|
|
142
|
+
export declare const CONFIG_MAP: Readonly<{
|
|
143
|
+
type: "sk";
|
|
144
|
+
location: null;
|
|
145
|
+
vaa01: "";
|
|
146
|
+
vaa07: "";
|
|
147
|
+
iaa01: null;
|
|
148
|
+
iar1Json: {};
|
|
149
|
+
personinfo: {};
|
|
150
|
+
parmsKey: "VAC01";
|
|
151
|
+
money: "";
|
|
152
|
+
interfaceid: "0";
|
|
153
|
+
operatorname: "";
|
|
154
|
+
operatorcode: "";
|
|
155
|
+
newhoinsurance: "";
|
|
156
|
+
message: "";
|
|
157
|
+
transdata: {};
|
|
158
|
+
transtype: "SYSTEM";
|
|
159
|
+
transchannel: "100";
|
|
160
|
+
transsystem: "12";
|
|
161
|
+
loginCode: "7777";
|
|
162
|
+
needLogin: false;
|
|
163
|
+
returncodes: string[];
|
|
164
|
+
}>;
|
|
165
|
+
export declare const INSURANCE_URL: string;
|
|
166
|
+
export declare enum CARD_TYPE {
|
|
167
|
+
ID_CARD = "newdsfz",
|
|
168
|
+
HOSPITAL_CARD = "sk",
|
|
169
|
+
HEALTH_CARD = "djkk",
|
|
170
|
+
VISIT_CARD = "newdhyk"
|
|
171
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=Object.freeze({sk:100210,ghdj:100401,ghqx:100403,mzjs:100407,beforemzjs:100406,mztf:100408,zyjs:100613,qxzyjs:100614,zydj:100601,qxzydj:100603,zydjzzf:100605,mzghconfirm:100415,ghdjcg:100411,ghdjsb:100412,mzjscg:100409,mzjssb:100410,mztfcg:100413,mztfsb:100414,newdhyk:110021,newdsfz:110041,fastReport:1e5,pos:1e5,yjjrefund:100622,ybxxcx:100212,ybdz:100209}),r=Object.freeze({msgindex:"",checkoutinfo:"",parmsJson:{transtime:"",transtype:"YB0000",interfaceid:"0",serialnumber:"",operatorcode:"10086",operatorname:"赵",transcmd:"",transdata:{iar1:{acf01:"0",iar01:"",vaa01:"",vaa07:"",iaa01:"",iab02:"",iak04:"",iak05:"",iak06:"",iar10:"",iar11:"",iar12:"",iar13:"",iar14:"",iar15:"",iar16:"",iar17:"",iar18:"",iar19:"",iar20:"",iar21:"",iar22:"",iai03:"",iar24:"",iar25:"",iar26:"",iar27:"",iar28:"",iar29:"",iar30:"",iar31:"",iar32:"",iar33:"",iar34:"",iar35:"",iac02:"",iac03:"",iad03:"",iad04:"",iar40:"",iar41:"",iak22:"0",iar43:"",iar44:"",iar45:"",cli_iai03:"",iar46:"",iar47:"",iar48:"",iar49:"",iar50:"",iar51:"",iar52:"",iar53:"",iar54:"",iar55:"",iar56:"",iar57:"",iar58:"",iar59:"",iar60:"",iar61:"",iar62:"",iar63:"",iar64:"",iar65:"",iar66:"",iar67:"",iar68:"",iar69:"",iar70:"",iar71:"",iar72:"",iar73:"",iar74:"",iar75:""},personinfo:{location:0,ptname:"",sex:"",birthday:"",age:"",idnumber:"",folk:"",address:"",pttype:"",ownpay:"0"}},transsystem:"12",transchannel:"100",verifycode:""},error:!0,catch:!0,loading:!1}),i=Object.freeze({type:"sk",location:null,vaa01:"",vaa07:"",iaa01:null,iar1Json:{},personinfo:{},parmsKey:"VAC01",money:"",interfaceid:"0",operatorname:"",operatorcode:"",newhoinsurance:"",message:"",transdata:{},transtype:"SYSTEM",transchannel:"100",transsystem:"12",loginCode:"7777",needLogin:!1,returncodes:["0","1"]}),e="http://127.0.0.1:8031/HOInterfaceSvr";var n=(a=>(a.ID_CARD="newdsfz",a.HOSPITAL_CARD="sk",a.HEALTH_CARD="djkk",a.VISIT_CARD="newdhyk",a))(n||{});export{n as CARD_TYPE,i as CONFIG_MAP,r as HIS_INSURANCE_PARAMS,e as INSURANCE_URL,a as transcmdMapping};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
+
import { InsuranceType } from './types';
|
|
3
|
+
export default class InsuranceSDK {
|
|
4
|
+
private readonly webview;
|
|
5
|
+
private configMap;
|
|
6
|
+
private initParamsMap;
|
|
7
|
+
private currentMessageHandler;
|
|
8
|
+
constructor(params?: {
|
|
9
|
+
selfWindow?: any;
|
|
10
|
+
});
|
|
11
|
+
private readonly messageHandlerQueue;
|
|
12
|
+
private messageHandler;
|
|
13
|
+
postMessage<T extends InsuranceType.ExecType>(data: {
|
|
14
|
+
exec: T;
|
|
15
|
+
data: string;
|
|
16
|
+
}): Promise<InsuranceType.PostMessageResult<T>>;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
private login;
|
|
19
|
+
private HOInterfaceSvr;
|
|
20
|
+
private initConfig;
|
|
21
|
+
private initParams;
|
|
22
|
+
getInsuranceInfoPromise(config: AnyObject): Promise<InsuranceType.CardReadResult>;
|
|
23
|
+
getInsuranceInfo(config: AnyObject, successFn?: (payload: InsuranceType.CardReadResult) => void, failureFn?: (error: any) => void): void;
|
|
24
|
+
private getDhykParams;
|
|
25
|
+
private getSkParams;
|
|
26
|
+
private getHisInsuranceParams;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsonParse as s}from"../../../shared/utils/index.js";import{isString as e}from"lodash-es";import{insuranceLog as t,getDataMessageByData as a,getErrorMessageByType as n,getTranstime as r,getSerialNumber as i}from"./utils/index.js";import{INSURANCE_URL as o,CONFIG_MAP as c,transcmdMapping as d,HIS_INSURANCE_PARAMS as m}from"./constants/index.js";import h from"axios";var l;class p{constructor(s){var e,t;this.webview=null==(l=window.chrome)?void 0:l.webview,this.configMap=null,this.initParamsMap=new Map([[["newdhyk","newdsfz"],s=>this.getDhykParams(s)],[["sk"],s=>this.getSkParams(s)]]),this.currentMessageHandler=null,this.messageHandlerQueue=[],(null==s?void 0:s.selfWindow)&&(this.webview=null==(t=null==(e=null==s?void 0:s.selfWindow)?void 0:e.chrome)?void 0:t.webview),this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler))}messageHandler(a){const n=this.messageHandlerQueue[0];if(!n)return Promise.reject(t("当前回执",a,"没有可用的handler"));const{resolve:r,reject:i,transcmd:o}=n,c=e(a.data)?s(a.data)||{}:a.data;if(!c||!["hisyb","login"].includes(c.exec))return i(t("当前回执不是hisyb消息"));const{transcmd:d}=c.res||{};if(o&&d&&`${o}`!=`${d}`)return i(t("交易命令不相等,当前transcmd",o,"返回transcmd",d));this.messageHandlerQueue.shift(),r(c)}async postMessage(e){return this.webview&&e?new Promise(((t,a)=>{var n;this.messageHandlerQueue.push({resolve:t,reject:a,transcmd:null==(n=s(e.data))?void 0:n.transcmd}),this.webview.postMessage(e)})).then((s=>s&&s.result&&s.exec===e.exec?s:Promise.reject())):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=null)}login(){const{loginCode:s=""}=this.configMap||{};return this.postMessage({exec:"login",data:s})}async HOInterfaceSvr(s){const{type:e,needLogin:t}=this.configMap||{};try{if(this.webview){t&&await this.login();return(await this.postMessage({exec:"hisyb",data:JSON.stringify(s.parmsJson)})).res}const e=await h.post(o,JSON.stringify(s.parmsJson));return a(e.data)}catch(s){return Promise.reject(n(e))}}initConfig(s){this.configMap=Object.assign({},c,s)}initParams(){const{type:s,transtype:e,interfaceid:t}=this.configMap||{},a=this.getHisInsuranceParams();Object.assign(a.parmsJson,{transcmd:s&&d[s]||s,interfaceid:t,transtype:e});const n=[...this.initParamsMap].find((([e])=>e.includes(s)));if(n){const[,s]=n;s(a)}else Object.assign(a.parmsJson,{transdata:this.configMap&&this.configMap.transdata});return a}getInsuranceInfoPromise(s){return this.initConfig(s),this.HOInterfaceSvr(this.initParams())}getInsuranceInfo(s,e,t){this.getInsuranceInfoPromise(s).then((s=>e&&e(s)),(s=>t&&t(s)))}getDhykParams(s){const{type:e}=this.configMap||{};s.parmsJson={...s.parmsJson,transtype:"IDCARD",interfaceid:"0",transdata:{...s.parmsJson.transdata,readtype:"newdhyk"===e?"1":"2"}}}getSkParams(s){const{iar1Json:e,personinfo:t}=this.configMap||{};s.parmsJson={...s.parmsJson,transdata:{...s.parmsJson.transdata,iar1:{...s.parmsJson.transdata.iar1,...e},personinfo:{...s.parmsJson.transdata.personinfo,...t}}}}getHisInsuranceParams(){const{operatorcode:s,operatorname:e,location:t,transchannel:a,transsystem:n}=this.configMap||{};return{...m,parmsJson:{...m.parmsJson,transtime:r(),serialnumber:i(),operatorcode:s,operatorname:e,location:t,transchannel:a,transsystem:n}}}}export{p as default};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { AnyObject, Func } from '../../../../../es/shared/types';
|
|
2
|
+
export declare namespace InsuranceType {
|
|
3
|
+
type ExecType = 'hisyb' | 'login';
|
|
4
|
+
type IHOWindow = Window & {
|
|
5
|
+
chrome: {
|
|
6
|
+
webview: {
|
|
7
|
+
addEventListener: (type: string, handler: Func) => void;
|
|
8
|
+
removeEventListener: (type: string, handler: Func) => void;
|
|
9
|
+
postMessage: (payload: any) => void;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type MessageDataType = {
|
|
14
|
+
exec: ExecType;
|
|
15
|
+
res: {
|
|
16
|
+
transcmd: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type MessageType = {
|
|
20
|
+
data: string | MessageDataType;
|
|
21
|
+
};
|
|
22
|
+
type PostMessageResult<T extends ExecType> = {
|
|
23
|
+
result: any;
|
|
24
|
+
exec: T;
|
|
25
|
+
res: any;
|
|
26
|
+
};
|
|
27
|
+
type CardReadParams = Partial<{
|
|
28
|
+
operatorname: string;
|
|
29
|
+
operatorcode: string;
|
|
30
|
+
location: number;
|
|
31
|
+
needLogin: boolean;
|
|
32
|
+
interfaceid: string;
|
|
33
|
+
iar1Json: AnyObject;
|
|
34
|
+
personinfo: AnyObject;
|
|
35
|
+
transdata: AnyObject;
|
|
36
|
+
loginCode: string;
|
|
37
|
+
transtype: string;
|
|
38
|
+
transchannel: string;
|
|
39
|
+
}>;
|
|
40
|
+
type CardReadResult = {
|
|
41
|
+
returncode: number;
|
|
42
|
+
returnmsg: string;
|
|
43
|
+
} & Partial<{
|
|
44
|
+
returndata: {
|
|
45
|
+
persioninfo?: AnyObject;
|
|
46
|
+
};
|
|
47
|
+
cardid: string;
|
|
48
|
+
cardno: string;
|
|
49
|
+
}>;
|
|
50
|
+
type CardReadOptions = Partial<{
|
|
51
|
+
basicParams: CardReadParams | (() => CardReadParams);
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../es/shared/types';
|
|
2
|
+
import { CONFIG_MAP } from '../constants';
|
|
3
|
+
export declare function getSerialNumber(): string;
|
|
4
|
+
export declare function getTranstime(): string;
|
|
5
|
+
export declare function pad2(n: number): string | number;
|
|
6
|
+
export declare function generateTimeRequestNumber(): string;
|
|
7
|
+
export declare function insuranceLog(...messages: any[]): any;
|
|
8
|
+
export declare function getErrorMessageByType(type?: string): string;
|
|
9
|
+
export declare function getDataMessageByData(_data: string | AnyObject, configMap?: typeof CONFIG_MAP): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isString as e}from"lodash-es";function n(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function t(){return o()+parseInt(1e3*Math.random()+"")}function r(e){return e<10?"0"+e:e}function o(){const e=new Date;return e.getFullYear().toString()+r(e.getMonth()+1)+r(e.getDate())+r(e.getHours())+r(e.getMinutes())+r(e.getSeconds())}function a(...e){return console.log("[INSURANCE-SDK]: ",...e),e.reduce(((e,n)=>e+n))}const d={fastReport:"打印服务异常",newdsfz:"身份证读卡接口服务异常",newdhyk:"会员读卡接口服务异常",pos:"pos接口服务异常"};function u(e){return e&&d[e]||"请检查医保服务是否正常"}function s(n,t){var r;e(n)&&(n=JSON.parse(n));const o=n,{type:a="",returncodes:d=[]}=t||{};if(d.includes(null!=(r=o.returncode)?r:"")){if("newdhyk"===a)return o.returndata.cardinfo&&o.returndata.cardinfo.cardno?o.returndata.cardinfo:Promise.reject("未获取到卡号");if("newdsfz"===a){let n=null,t=null;return e(o.returndata)?(n=JSON.parse(o.returndata),t=n.cardinfo):t=o.returndata.cardinfo,t={...t,Sex:t.sex,Sex_Code:t.sex_code,Name:t.name,Age:t.age,Age_Code:t.age_code,Age_Name:t.age_name,BirthDate:t.birthdate,Nation_Name:t.nation_name,Nation_Code:t.nation_code,Address:t.address,CardNo:t.cardno,HasPhoto:t.hasphoto},t}return o}return Promise.reject(a+"--"+o.returnmsg)}export{o as generateTimeRequestNumber,s as getDataMessageByData,u as getErrorMessageByType,n as getSerialNumber,t as getTranstime,a as insuranceLog,r as pad2};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ref as e,render as r,createVNode as t,withCtx as n,nextTick as o}from"vue";import{createProviderWrapper as a}from"../../../../shared/utils/index.js";import s from"../components/readCardDialog.vue.js";class d{constructor(){this.rendered=!1}static createMsg(e){return`[ReadHealthCardDialog] ${e}`}show(i){return this.rendered?Promise.reject(d.createMsg("请勿重复打开弹窗")):new Promise(((l,u)=>{this.rendered=!0;const c=document.createElement("div"),m=e(!1),h=a(i);var f;function p(){u(d.createMsg("弹窗关闭"))}function v(e){l(e),m.value=!1}r(t(h,null,{default:n((()=>t(s,{show:m.value,"onUpdate:show":e=>m.value=e,onConfirm:v,onClose:p,onAfterLeave:()=>function(e){if(!e.parentElement)return;C.rendered=!1,e.parentElement.removeChild(e)}(c)},null)),i)}),c),f=c,document.body.appendChild(f),o((()=>m.value=!0));const C=this}))}}export{d as ReadHealthCard};
|
|
@@ -34,9 +34,6 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
34
34
|
emits: (event: "select" | "add" | "change" | "remove" | "add:prevent", ...args: any[]) => void;
|
|
35
35
|
canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
|
|
36
36
|
canvas: import("vue").Ref<any>;
|
|
37
|
-
propItems: any;
|
|
38
|
-
redrawPoints: import("vue").Ref<any>;
|
|
39
|
-
select: import("vue").Ref<any>;
|
|
40
37
|
pointTipProps: {
|
|
41
38
|
show: boolean;
|
|
42
39
|
point: {
|
|
@@ -54,28 +51,14 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
54
51
|
list: any[];
|
|
55
52
|
target: any;
|
|
56
53
|
};
|
|
54
|
+
propItems: any;
|
|
55
|
+
redrawPoints: import("vue").Ref<any>;
|
|
56
|
+
select: import("vue").Ref<any>;
|
|
57
57
|
clickMenu: import("vue").Ref<any>;
|
|
58
58
|
init: () => {
|
|
59
59
|
propItems: any;
|
|
60
60
|
redrawPoints: import("vue").Ref<any>;
|
|
61
61
|
select: import("vue").Ref<any>;
|
|
62
|
-
pointTipProps: {
|
|
63
|
-
show: boolean;
|
|
64
|
-
point: {
|
|
65
|
-
x: number;
|
|
66
|
-
y: number;
|
|
67
|
-
};
|
|
68
|
-
list: string[];
|
|
69
|
-
};
|
|
70
|
-
pointMenuProps: {
|
|
71
|
-
show: boolean;
|
|
72
|
-
point: {
|
|
73
|
-
x: number;
|
|
74
|
-
y: number;
|
|
75
|
-
};
|
|
76
|
-
list: any[];
|
|
77
|
-
target: any;
|
|
78
|
-
};
|
|
79
62
|
clickMenu: import("vue").Ref<any>;
|
|
80
63
|
};
|
|
81
64
|
PopupTip: import("vue").DefineComponent<{
|