cnhis-design-vue 3.1.47-beta.20 → 3.1.47-beta.21
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/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/index.js +1 -1
- package/es/components/insurance-sdk/index.d.ts +2 -1
- package/es/components/insurance-sdk/index.js +1 -1
- package/es/components/insurance-sdk/src/constants/index.d.ts +158 -154
- package/es/components/insurance-sdk/src/constants/index.js +1 -1
- package/es/components/insurance-sdk/src/insurance.d.ts +29 -0
- package/es/components/insurance-sdk/src/insurance.js +1 -0
- package/es/components/insurance-sdk/src/types/index.d.ts +27 -0
- package/es/components/insurance-sdk/src/types/index.js +1 -0
- package/es/components/insurance-sdk/src/utils/index.d.ts +9 -1
- package/es/components/insurance-sdk/src/utils/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/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/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/insurance-sdk/src/utils/insurance.d.ts +0 -260
- package/es/components/insurance-sdk/src/utils/insurance.js +0 -1
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { AnyObject, Func } from '../../../../../es/shared/types';
|
|
2
|
-
interface WebviewEvent extends Event {
|
|
3
|
-
data: string;
|
|
4
|
-
}
|
|
5
|
-
declare type IWindow = Window & {
|
|
6
|
-
chrome: AnyObject;
|
|
7
|
-
};
|
|
8
|
-
export declare class Insurance {
|
|
9
|
-
private readonly webview;
|
|
10
|
-
private currentMessageHandler?;
|
|
11
|
-
constructor(params?: {
|
|
12
|
-
selfWindow: IWindow;
|
|
13
|
-
});
|
|
14
|
-
private readonly messageHandlerQueue;
|
|
15
|
-
messageHandler(e: WebviewEvent): false | void;
|
|
16
|
-
postMessage(data: AnyObject): Promise<unknown>;
|
|
17
|
-
destroy(): void;
|
|
18
|
-
_configMap: AnyObject;
|
|
19
|
-
_loading: boolean;
|
|
20
|
-
initParamsMap: Map<string[], (params: AnyObject) => void>;
|
|
21
|
-
onLogin(): Promise<unknown>;
|
|
22
|
-
_HOInterfaceSvr(insuranceParams: AnyObject): Promise<any>;
|
|
23
|
-
_errorMSg(type: string): "打印服务异常" | "身份证读卡接口服务异常" | "会员读卡接口服务异常" | "pos接口服务异常" | "请检查医保服务是否正常";
|
|
24
|
-
_dataMsg(data: AnyObject): any;
|
|
25
|
-
_initConfig(config: AnyObject): void;
|
|
26
|
-
_initParams(): {
|
|
27
|
-
parmsJson: {
|
|
28
|
-
transtime: string;
|
|
29
|
-
serialnumber: string;
|
|
30
|
-
operatorcode: any;
|
|
31
|
-
operatorname: any;
|
|
32
|
-
location: any;
|
|
33
|
-
transchannel: any;
|
|
34
|
-
transsystem: any;
|
|
35
|
-
transtype: "YB0000";
|
|
36
|
-
interfaceid: "0";
|
|
37
|
-
transcmd: "";
|
|
38
|
-
transdata: {
|
|
39
|
-
readonly iar1: {
|
|
40
|
-
readonly acf01: "0";
|
|
41
|
-
readonly iar01: "";
|
|
42
|
-
readonly vaa01: "";
|
|
43
|
-
readonly vaa07: "";
|
|
44
|
-
readonly iaa01: "";
|
|
45
|
-
readonly iab02: "";
|
|
46
|
-
readonly iak04: "";
|
|
47
|
-
readonly iak05: "";
|
|
48
|
-
readonly iak06: "";
|
|
49
|
-
readonly iar10: "";
|
|
50
|
-
readonly iar11: "";
|
|
51
|
-
readonly iar12: "";
|
|
52
|
-
readonly iar13: "";
|
|
53
|
-
readonly iar14: "";
|
|
54
|
-
readonly iar15: "";
|
|
55
|
-
readonly iar16: "";
|
|
56
|
-
readonly iar17: "";
|
|
57
|
-
readonly iar18: "";
|
|
58
|
-
readonly iar19: "";
|
|
59
|
-
readonly iar20: "";
|
|
60
|
-
readonly iar21: "";
|
|
61
|
-
readonly iar22: "";
|
|
62
|
-
readonly iai03: "";
|
|
63
|
-
readonly iar24: "";
|
|
64
|
-
readonly iar25: "";
|
|
65
|
-
readonly iar26: "";
|
|
66
|
-
readonly iar27: "";
|
|
67
|
-
readonly iar28: "";
|
|
68
|
-
readonly iar29: "";
|
|
69
|
-
readonly iar30: "";
|
|
70
|
-
readonly iar31: "";
|
|
71
|
-
readonly iar32: "";
|
|
72
|
-
readonly iar33: "";
|
|
73
|
-
readonly iar34: "";
|
|
74
|
-
readonly iar35: "";
|
|
75
|
-
readonly iac02: "";
|
|
76
|
-
readonly iac03: "";
|
|
77
|
-
readonly iad03: "";
|
|
78
|
-
readonly iad04: "";
|
|
79
|
-
readonly iar40: "";
|
|
80
|
-
readonly iar41: "";
|
|
81
|
-
readonly iak22: "0";
|
|
82
|
-
readonly iar43: "";
|
|
83
|
-
readonly iar44: "";
|
|
84
|
-
readonly iar45: "";
|
|
85
|
-
readonly cli_iai03: "";
|
|
86
|
-
readonly iar46: "";
|
|
87
|
-
readonly iar47: "";
|
|
88
|
-
readonly iar48: "";
|
|
89
|
-
readonly iar49: "";
|
|
90
|
-
readonly iar50: "";
|
|
91
|
-
readonly iar51: "";
|
|
92
|
-
readonly iar52: "";
|
|
93
|
-
readonly iar53: "";
|
|
94
|
-
readonly iar54: "";
|
|
95
|
-
readonly iar55: "";
|
|
96
|
-
readonly iar56: "";
|
|
97
|
-
readonly iar57: "";
|
|
98
|
-
readonly iar58: "";
|
|
99
|
-
readonly iar59: "";
|
|
100
|
-
readonly iar60: "";
|
|
101
|
-
readonly iar61: "";
|
|
102
|
-
readonly iar62: "";
|
|
103
|
-
readonly iar63: "";
|
|
104
|
-
readonly iar64: "";
|
|
105
|
-
readonly iar65: "";
|
|
106
|
-
readonly iar66: "";
|
|
107
|
-
readonly iar67: "";
|
|
108
|
-
readonly iar68: "";
|
|
109
|
-
readonly iar69: "";
|
|
110
|
-
readonly iar70: "";
|
|
111
|
-
readonly iar71: "";
|
|
112
|
-
readonly iar72: "";
|
|
113
|
-
readonly iar73: "";
|
|
114
|
-
readonly iar74: "";
|
|
115
|
-
readonly iar75: "";
|
|
116
|
-
};
|
|
117
|
-
readonly personinfo: {
|
|
118
|
-
readonly location: 0;
|
|
119
|
-
readonly ptname: "";
|
|
120
|
-
readonly sex: "";
|
|
121
|
-
readonly birthday: "";
|
|
122
|
-
readonly age: "";
|
|
123
|
-
readonly idnumber: "";
|
|
124
|
-
readonly folk: "";
|
|
125
|
-
readonly address: "";
|
|
126
|
-
readonly pttype: "";
|
|
127
|
-
readonly ownpay: "0";
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
verifycode: "";
|
|
131
|
-
};
|
|
132
|
-
msgindex: "";
|
|
133
|
-
checkoutinfo: "";
|
|
134
|
-
error: true;
|
|
135
|
-
catch: true;
|
|
136
|
-
loading: false;
|
|
137
|
-
};
|
|
138
|
-
getInsuranceInfo(config: AnyObject, successCallbackFn?: Func, errorCallbackFn?: Func): Promise<false | undefined>;
|
|
139
|
-
_getDhykParams(insuranceParams: AnyObject): void;
|
|
140
|
-
_getSkParams(insuranceParams: AnyObject): void;
|
|
141
|
-
_getSerialnumber(): string;
|
|
142
|
-
_getOperatorcode(): any;
|
|
143
|
-
_getOperatorname(): any;
|
|
144
|
-
_getTranstime(): string;
|
|
145
|
-
_pad2(n: number): string | number;
|
|
146
|
-
_generateTimeReqestNumber(): string;
|
|
147
|
-
_getHisInsuranceParams(): {
|
|
148
|
-
parmsJson: {
|
|
149
|
-
transtime: string;
|
|
150
|
-
serialnumber: string;
|
|
151
|
-
operatorcode: any;
|
|
152
|
-
operatorname: any;
|
|
153
|
-
location: any;
|
|
154
|
-
transchannel: any;
|
|
155
|
-
transsystem: any;
|
|
156
|
-
transtype: "YB0000";
|
|
157
|
-
interfaceid: "0";
|
|
158
|
-
transcmd: "";
|
|
159
|
-
transdata: {
|
|
160
|
-
readonly iar1: {
|
|
161
|
-
readonly acf01: "0";
|
|
162
|
-
readonly iar01: "";
|
|
163
|
-
readonly vaa01: "";
|
|
164
|
-
readonly vaa07: "";
|
|
165
|
-
readonly iaa01: "";
|
|
166
|
-
readonly iab02: "";
|
|
167
|
-
readonly iak04: "";
|
|
168
|
-
readonly iak05: "";
|
|
169
|
-
readonly iak06: "";
|
|
170
|
-
readonly iar10: "";
|
|
171
|
-
readonly iar11: "";
|
|
172
|
-
readonly iar12: "";
|
|
173
|
-
readonly iar13: "";
|
|
174
|
-
readonly iar14: "";
|
|
175
|
-
readonly iar15: "";
|
|
176
|
-
readonly iar16: "";
|
|
177
|
-
readonly iar17: "";
|
|
178
|
-
readonly iar18: "";
|
|
179
|
-
readonly iar19: "";
|
|
180
|
-
readonly iar20: "";
|
|
181
|
-
readonly iar21: "";
|
|
182
|
-
readonly iar22: "";
|
|
183
|
-
readonly iai03: "";
|
|
184
|
-
readonly iar24: "";
|
|
185
|
-
readonly iar25: "";
|
|
186
|
-
readonly iar26: "";
|
|
187
|
-
readonly iar27: "";
|
|
188
|
-
readonly iar28: "";
|
|
189
|
-
readonly iar29: "";
|
|
190
|
-
readonly iar30: "";
|
|
191
|
-
readonly iar31: "";
|
|
192
|
-
readonly iar32: "";
|
|
193
|
-
readonly iar33: "";
|
|
194
|
-
readonly iar34: "";
|
|
195
|
-
readonly iar35: "";
|
|
196
|
-
readonly iac02: "";
|
|
197
|
-
readonly iac03: "";
|
|
198
|
-
readonly iad03: "";
|
|
199
|
-
readonly iad04: "";
|
|
200
|
-
readonly iar40: "";
|
|
201
|
-
readonly iar41: "";
|
|
202
|
-
readonly iak22: "0";
|
|
203
|
-
readonly iar43: "";
|
|
204
|
-
readonly iar44: "";
|
|
205
|
-
readonly iar45: "";
|
|
206
|
-
readonly cli_iai03: "";
|
|
207
|
-
readonly iar46: "";
|
|
208
|
-
readonly iar47: "";
|
|
209
|
-
readonly iar48: "";
|
|
210
|
-
readonly iar49: "";
|
|
211
|
-
readonly iar50: "";
|
|
212
|
-
readonly iar51: "";
|
|
213
|
-
readonly iar52: "";
|
|
214
|
-
readonly iar53: "";
|
|
215
|
-
readonly iar54: "";
|
|
216
|
-
readonly iar55: "";
|
|
217
|
-
readonly iar56: "";
|
|
218
|
-
readonly iar57: "";
|
|
219
|
-
readonly iar58: "";
|
|
220
|
-
readonly iar59: "";
|
|
221
|
-
readonly iar60: "";
|
|
222
|
-
readonly iar61: "";
|
|
223
|
-
readonly iar62: "";
|
|
224
|
-
readonly iar63: "";
|
|
225
|
-
readonly iar64: "";
|
|
226
|
-
readonly iar65: "";
|
|
227
|
-
readonly iar66: "";
|
|
228
|
-
readonly iar67: "";
|
|
229
|
-
readonly iar68: "";
|
|
230
|
-
readonly iar69: "";
|
|
231
|
-
readonly iar70: "";
|
|
232
|
-
readonly iar71: "";
|
|
233
|
-
readonly iar72: "";
|
|
234
|
-
readonly iar73: "";
|
|
235
|
-
readonly iar74: "";
|
|
236
|
-
readonly iar75: "";
|
|
237
|
-
};
|
|
238
|
-
readonly personinfo: {
|
|
239
|
-
readonly location: 0;
|
|
240
|
-
readonly ptname: "";
|
|
241
|
-
readonly sex: "";
|
|
242
|
-
readonly birthday: "";
|
|
243
|
-
readonly age: "";
|
|
244
|
-
readonly idnumber: "";
|
|
245
|
-
readonly folk: "";
|
|
246
|
-
readonly address: "";
|
|
247
|
-
readonly pttype: "";
|
|
248
|
-
readonly ownpay: "0";
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
verifycode: "";
|
|
252
|
-
};
|
|
253
|
-
msgindex: "";
|
|
254
|
-
checkoutinfo: "";
|
|
255
|
-
error: true;
|
|
256
|
-
catch: true;
|
|
257
|
-
loading: false;
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{CONFIG_MAP as e,transcmdMapping as t,HIS_INSURANCE_PARAMS as s}from"../constants/index.js";import a from"axios/dist/axios.min.js";class n{constructor(e){var t,s,a;this.messageHandlerQueue=[],this._configMap={},this._loading=!1,this.initParamsMap=new Map([[["newdhyk","newdsfz"],e=>this._getDhykParams(e)],[["sk"],e=>this._getSkParams(e)]]);const n=window;this.webview=null==(t=n.chrome)?void 0:t.webview,(null==e?void 0:e.selfWindow)&&(this.webview=null==(a=null==(s=null==e?void 0:e.selfWindow)?void 0:s.chrome)?void 0:a.webview),this.webview&&(this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler))}messageHandler(e){const t=this.messageHandlerQueue.pop();if(!t)return console.log("当前回执",e,"没有可用的handler");const{resolve:s,reject:a}=t;try{if(console.log("e------------------",e),null==e?void 0:e.data)return"string"==typeof e.data?s(JSON.parse(e.data)):s(e.data),!1;s(!0)}catch(e){a(e)}}async postMessage(e){return this.webview?new Promise(((t,s)=>{this.messageHandlerQueue.push({resolve:t,reject:s}),this.webview.postMessage(e)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}onLogin(){const{loginCode:e}=this._configMap,t={exec:"login",data:e};return this.postMessage(t)}async _HOInterfaceSvr(e){const{type:t,needLogin:s}=this._configMap,n=JSON.stringify(e.parmsJson);if(this.webview){try{if(s){const e=await this.onLogin();if((null==e?void 0:e.result)&&"login"==(null==e?void 0:e.exec)){const e=await this.postMessage({exec:"hisyb",data:n});if((null==e?void 0:e.result)&&"hisyb"==(null==e?void 0:e.exec))return e.res}}else{const e=await this.postMessage({exec:"hisyb",data:n});if(console.log("hisyb---------------",e,s),(null==e?void 0:e.result)&&"hisyb"==(null==e?void 0:e.exec))return this._dataMsg(e.res)}}catch(e){this._loading=!1;const s=this._errorMSg(t);return Promise.reject(s)}return!1}try{const e=await a.post("http://127.0.0.1:8031/HOInterfaceSvr",n);return this._loading=!1,this._dataMsg(e.data)}catch(e){this._loading=!1;const s=this._errorMSg(t);return Promise.reject(s)}}_errorMSg(e){return"fastReport"==e?"打印服务异常":"newdsfz"==e?"身份证读卡接口服务异常":"newdhyk"==e?"会员读卡接口服务异常":"pos"==e?"pos接口服务异常":"请检查医保服务是否正常"}_dataMsg(e){const{type:t}=this._configMap;if("string"==typeof e&&(e=JSON.parse(e)),"0"==e.returncode||"1"==e.returncode){if("newdhyk"==t){if(e.returndata.cardinfo&&e.returndata.cardinfo.cardno)return e.returndata.cardinfo;{const e="未获取到卡号";return Promise.reject(e)}}if("newdsfz"==t){let t=null,s=null;return"string"==typeof e.returndata?(t=JSON.parse(e.returndata),s=t.cardinfo):s=e.returndata.cardinfo,s={...s,Sex:s.sex,Sex_Code:s.sex_code,Name:s.name,Age:s.age,Age_Code:s.age_code,Age_Name:s.age_name,BirthDate:s.birthdate,Nation_Name:s.nation_name,Nation_Code:s.nation_code,Address:s.address,CardNo:s.cardno,HasPhoto:s.hasphoto},s}return e}{let s=t+"--"+e.returnmsg;return s||(s=this._errorMSg(t)),Promise.reject(s)}}_initConfig(t){Object.assign(this._configMap,e,t)}_initParams(){const{type:e,transtype:s,interfaceid:a,iaa01:n}=this._configMap,r=this._getHisInsuranceParams();Object.assign(r.parmsJson,{transcmd:t[e]||e,interfaceid:a||n,transtype:s||"SYSTEM"});const i=[...this.initParamsMap].find((([t,s])=>t.includes(e)));if(i){const[e,t]=i;t(r)}else Object.assign(r.parmsJson,{transdata:this._configMap.data});return r}async getInsuranceInfo(e,t,s){if(this._loading)return!1;this._loading=!0,this._configMap={},this._initConfig(e);const a=this._initParams();try{const e=await this._HOInterfaceSvr(a);t&&t(e)}catch(e){console.log("error",e),s&&s(e)}}_getDhykParams(e){const{type:t}=this._configMap;e.parmsJson={...e.parmsJson,transtype:"IDCARD",interfaceid:"0",transdata:{...e.parmsJson.transdata,readtype:"newdhyk"==t?"1":"2"}}}_getSkParams(e){const{iar1Json:t,personinfo:s,data:a}=this._configMap;e.parmsJson={...e.parmsJson,transdata:{...e.parmsJson.transdata,iar1:{...e.parmsJson.transdata.iar1,...t},personinfo:{...e.parmsJson.transdata.personinfo,...s}}}}_getSerialnumber(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}_getOperatorcode(){return this._configMap.operatorcode}_getOperatorname(){return this._configMap.operatorname}_getTranstime(){return this._generateTimeReqestNumber()+parseInt((1e3*Math.random()).toString())}_pad2(e){return e<10?"0"+e:e}_generateTimeReqestNumber(){const e=new Date;return e.getFullYear().toString()+this._pad2(e.getMonth()+1)+this._pad2(e.getDate())+this._pad2(e.getHours())+this._pad2(e.getMinutes())+this._pad2(e.getSeconds())}_getHisInsuranceParams(){const{operatorcode:e,operatorname:t,location:a,transchannel:n,transsystem:r}=this._configMap,i=this._getTranstime(),o=this._getSerialnumber();return Object.assign({},{...s,parmsJson:{...s.parmsJson,transtime:i,serialnumber:o,operatorcode:e,operatorname:t,location:a,transchannel:n||s.parmsJson.transchannel,transsystem:r||"12"}})}}export{n as Insurance};
|