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,161 +1,165 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 交易命令映射
|
|
3
3
|
*/
|
|
4
|
-
export declare const transcmdMapping: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
export declare const HIS_INSURANCE_PARAMS: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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
120
|
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
132
|
};
|
|
133
133
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
transsystem: string;
|
|
135
|
+
transchannel: string;
|
|
136
|
+
verifycode: string;
|
|
137
137
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
export declare const CONFIG_MAP: {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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
|
+
data: {};
|
|
158
|
+
transtype: null;
|
|
159
|
+
transchannel: null;
|
|
160
|
+
transsystem: null;
|
|
161
|
+
loginCode: "7777";
|
|
162
|
+
needLogin: false;
|
|
163
|
+
returncodes: string[];
|
|
164
|
+
}>;
|
|
165
|
+
export declare const INSURANCE_URL: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a={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={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={type:"sk",location:null,vaa01:"",vaa07:"",iar1Json:{},personinfo:{},parmsKey:"VAC01",money:"",interfaceid:"0",operatorname:"",operatorcode:"",newhoinsurance:"",message:"",data:{},transtype:null,transchannel:null,loginCode:"7777",needLogin:!1};export{i as CONFIG_MAP,r as HIS_INSURANCE_PARAMS,a as transcmdMapping};
|
|
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:"",data:{},transtype:null,transchannel:null,transsystem:null,loginCode:"7777",needLogin:!1,returncodes:["0","1"]}),e="http://127.0.0.1:8031/HOInterfaceSvr";export{i as CONFIG_MAP,r as HIS_INSURANCE_PARAMS,e as INSURANCE_URL,a as transcmdMapping};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../es/shared/types';
|
|
2
|
+
import { InsuranceType } from './types';
|
|
3
|
+
export default class Insurance {
|
|
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<any>;
|
|
23
|
+
getInsuranceInfo(config: AnyObject, successFn?: (payload: any) => void, failureFn?: (error: any) => void): void;
|
|
24
|
+
private getDhykParams;
|
|
25
|
+
private getSkParams;
|
|
26
|
+
get operatorCode(): "" | null;
|
|
27
|
+
get operatorName(): "" | null;
|
|
28
|
+
private getHisInsuranceParams;
|
|
29
|
+
}
|
|
@@ -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 h}from"./constants/index.js";import m from"axios";var p;class g{constructor(s){var e,t;this.webview=null==(p=window.chrome)?void 0:p.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=e(a.data)?s(a.data)||{}:a.data;if(!n||["hisyb","login"].includes(n.exec))return t("当前回执不是hisyb消息");const r=this.messageHandlerQueue[0];if(!r)return t("当前回执",a,"没有可用的handler");const{resolve:i,reject:o,transcmd:c}=r,{transcmd:d}=n.res||{};if(c&&d&&c!==d)return t("交易命令不相等,当前transcmd",c,"返回transcmd",d);try{this.messageHandlerQueue.shift(),i(n)}catch(s){o(s)}}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 m.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,iaa01:a}=this.configMap||{},n=this.getHisInsuranceParams();Object.assign(n.parmsJson,{transcmd:s&&d[s]||s,interfaceid:t||a,transtype:e||"SYSTEM"});const r=[...this.initParamsMap].find((([e])=>e.includes(s)));if(r){const[,s]=r;s(n)}else Object.assign(n.parmsJson,{transdata:this.configMap&&this.configMap.data});return n}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}}}}get operatorCode(){return this.configMap&&this.configMap.operatorcode}get operatorName(){return this.configMap&&this.configMap.operatorname}getHisInsuranceParams(){const{operatorcode:s,operatorname:e,location:t,transchannel:a,transsystem:n}=this.configMap||{};return{...h,parmsJson:{...h.parmsJson,transtime:r(),serialnumber:i(),operatorcode:s,operatorname:e,location:t,transchannel:a||h.parmsJson.transchannel,transsystem:n||"12"}}}}export{g as default};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { 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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
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[]): void;
|
|
8
|
+
export declare function getErrorMessageByType(type?: string): string;
|
|
9
|
+
export declare function getDataMessageByData(_data: string | AnyObject, configMap?: typeof CONFIG_MAP): any;
|
|
@@ -1 +1 @@
|
|
|
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)}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};
|
|
@@ -315,6 +315,7 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
315
315
|
labels: any[];
|
|
316
316
|
};
|
|
317
317
|
onSubmitData: () => void;
|
|
318
|
+
onSubmitDataDebounce: (this: unknown, ...args: any[]) => any;
|
|
318
319
|
confirmSubmit: (message: any) => void;
|
|
319
320
|
onSubmitForm: () => Promise<unknown>;
|
|
320
321
|
cancel: () => void;
|
|
@@ -313,6 +313,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
313
313
|
labels: any[];
|
|
314
314
|
};
|
|
315
315
|
onSubmitData: () => void;
|
|
316
|
+
onSubmitDataDebounce: (this: unknown, ...args: any[]) => any;
|
|
316
317
|
confirmSubmit: (message: any) => void;
|
|
317
318
|
onSubmitForm: () => Promise<unknown>;
|
|
318
319
|
cancel: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as
|
|
1
|
+
import{defineComponent as e,reactive as t,ref as a,watch as o,nextTick as i,openBlock as l,createElementBlock as n,normalizeClass as s,unref as r,createCommentVNode as u,Fragment as c,createBlock as p,mergeProps as d,createElementVNode as m,normalizeStyle as v,createVNode as f,withCtx as g,renderList as y,toDisplayString as b,createTextVNode as k,resolveDynamicComponent as C,h as S}from"vue";import h from"./hooks/use-noData.js";import{getScaleViewState as w}from"./hooks/scaleview-state.js";import{ScaleViewComputed as E}from"./hooks/scaleview-computed.js";import{ScaleViewInit as O}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as A,isCollection as _,isEvaluation as T}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import"xe-utils";import"moment";import P from"../../../shared/utils/vexutilsExpand.js";import D from"./components/NoData.vue.js";import x from"./components/EvaluateCountdown.vue.js";import F from"./components/EvaluatePage.vue.js";import B from"./components/AnswerParse.vue.js";import N from"./components/ScaleScore.js";import{useDialog as I,useMessage as q,NForm as M,NFormItem as R,NButton as K}from"naive-ui";const V=["innerHTML"],H={key:0,class:"required-text"},U={key:1,class:"evalute-label"},W=["onClick"],J=m("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),Y={key:1,class:"footer"};var X=e({__name:"ScaleView",props:{guageData:{type:Object,default:()=>({})},styleSetting:{type:Object,default:()=>({})},ids:{type:Object,default:()=>({guage_id:"",db_id:void 0})},params:{default:()=>({}),type:Object},noBtn:{type:[Boolean,String,Number],default:!1},hideBtn:{type:[Boolean,String,Number],default:!1},isLock:{type:[Boolean,String,Number],default:!1},type:{type:String,default:""},openType:{type:String,default:""},scaleApiConfig:{type:Object,default:()=>({})},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},getCascadeOptions:{type:Function,default:()=>Promise.resolve([])},getLabelList:{type:Function,default:()=>Promise.resolve([])},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},uploadPictureUrl:{type:String,default:""},uploadFileUrl:{type:String,default:""},ak:{type:String,default:"KP3BZ-OAC3W-PY6RY-OJ6DV-JYKN3-H6F72"},sourceType:{type:String,default:""},getChunkUploadConfig:{type:Function,default:()=>Promise.resolve({})},fontSizeObj:{type:Object,default:()=>({large:1.25,medium:1.1,small:1,extrasmall:.9})}},emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:X,emit:z}){const G=e,{ScaleViewState:Q}=w(),Z=t(Q),$=I(),ee=q(),te=a(null),ae=a(null),{noDataState:oe,setNoData:ie,resetNodata:le}=h(),ne=A(),{showEvatip:se,isFormBoldOpen:re,scaleStyle:ue,handlePageClass:ce,isShowItem:pe,handleShowQuestionNumber:de,hasScore:me,isPreviewScale:ve,showEvaluateEntry:fe,showEvaluateCoundownPage:ge,showSaveBtn:ye,showEvaluateLabel:be,showAnswerParse:ke,propsConfig:Ce,evaluatePageProps:Se,evaluateCountdownProps:he,skipCover:we,scaleEdit:Ee}=E(G,Z,{query:ne}),{initForm:Oe}=O(G,Z,z,{query:ne}),{submitMethod:je}=j(G,Z,z,{query:ne}),{nextLogicEvent:Ae,handleDynamicDataRelation:_e}=L(G,Z);(()=>{let{id:e}=ne;e&&(Z.shareId=e)})();const Te=e=>{try{le(),Oe(e)}catch(e){console.log(e,"--error"),Z.spinning=!1,Z.hasFrontAddress=!1,ie(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};o((()=>G.ids),((e,t)=>{t?e.guage_id&&e.guage_id!=t.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),o((()=>G.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;Z.form={},Z.formArray=[];const t=JSON.parse(JSON.stringify(e));i((()=>{Oe(t)}))}),{immediate:!0});const Le=e=>{Z.showEvaluateSettingWrap=!1,Z.showEvaluateCountdown=!!e,z("startWriteScale")},Pe=()=>{console.log("----closeEvaluateCountdown"),Z.showEvaluateCountdown=!1,ve.value||(Z.banSubmit=!0,je(),$.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>({})}))},De=e=>{$.warning({title:"提示",content:()=>S("div",{class:"evatip-container"},[S("span","答案解析:"),S("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},xe=(e,t,a)=>{let{choiceObj:o,isSetObj:i}=a||{};switch(t.type.includes("SELECT")||(Z.form[t.val_key]=e),t.type){case"SELECT":case"EVALUATE_SELECT":{let{value:a,list:o=[]}=e;Z.form[t.val_key]=a,Ae(e,t,Z.formArray),_e(o,t,Z.formArray)}break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(Z.choiceComObj[t.val_key]=o),Ae(e,t,Z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Ae(e,t,Z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":Z.submitForm[t.val_key]=e}},Fe=(e,t)=>{console.log(t),Z.form[t.val_key]=e},Be=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const t=e||[],a=[],o=[];return t.forEach((e=>{o.push(e),a.push(e.labelName)})),Z.labelSelectedList=t,{labelStr:a.join(","),labels:o}},Ne=P.debounce((()=>{var e;if(!Z.formArray.find((e=>T(e.type))))return void Ie("确认要提交吗?");let{evaluateResultSetting:t}=Z.config;if(!t||!Object.keys(t).length&&!fe.value||Ee.value)return void Ie("确认要结束测评吗?");if("formIframe"==G.openType&&fe.value)return void z("submitNoRequest");let a="确定要提前结束测评吗?";if(ge.value&&(null==(e=te.value)?void 0:e.getCountdownObj)){const e=te.value.getCountdownObj(),{setAnswered:t,totalLen:o}=e;t<o?a="存在未作答的题目,确定要提前结束测评吗?":!(null==Z?void 0:Z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}we.value&&!(null==Z?void 0:Z.showEvaluateCountdown)&&(a="确认要结束测评吗?"),Ie(a)}),300),Ie=e=>{$.warning({title:"温馨提示",content:()=>S("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const e=await qe();z("onSubmit",e)},onNegativeClick(){}})},qe=()=>new Promise(((e,t)=>{var a;null==(a=ae.value)||a.validate((t=>{var a;if(t){console.log(t);let o=(null==(a=t[0])?void 0:a[0])||{},i=o.field,l=o.message,n=Z.formArray.find((e=>e.databaseTitle===i));return n&&(i=n.title),ee.error(i+l),e(!1),!1}{const t=je();e(t)}}))})),Me=()=>{z("onCloseSetting")};return X({getScaleData:()=>({...Z}),onSubmitForm:qe,cancel:Me}),(e,t)=>(l(),n("div",{class:s(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(ye)}])},[u(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),Z.spinning||Z.hasFrontAddress?u("v-if",!0):(l(),n(c,{key:0},[r(oe).noData?(l(),p(D,{key:0,noDataImg:r(oe).noDataImg,noDataTip:r(oe).noDataTip},null,8,["noDataImg","noDataTip"])):(l(),n(c,{key:1},[r(fe)&&!r(we)?(l(),p(F,d({key:0},r(Se),{onWriteGuage:Le}),null,16)):(l(),n(c,{key:1},[r(ge)?(l(),p(x,d({key:0,ref_key:"countdownDom",ref:te},r(he),{onCloseEvaluateCountdown:Pe}),null,16)):u("v-if",!0),m("div",{class:s(["scale-container",{"scale-container-nopadding":r(ce),"scale-container-hasfooter":r(ye)}]),style:v(r(ue))},[r(me)?(l(),p(r(N),{key:0,config:Z.config,maxScore:Z.maxScore},null,8,["config","maxScore"])):u("v-if",!0),f(r(M),{ref_key:"formRef",ref:ae,model:Z.form,rules:Z.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(l(!0),n(c,null,y(Z.formArray,((e,t)=>(l(),n(c,{key:(e.id||e.seq)+t},[r(pe)(e)?(l(),p(r(R),{key:0,path:e.val_key,"show-label":!r(_)(e.type),class:"c-scle-form-item"},{label:g((()=>[m("span",{class:s({"scale-label-required":r(re)(e)}),innerHTML:r(de)(e)},null,10,V),r(re)(e)?(l(),n("span",H,"(必填)")):u("v-if",!0),r(be)(e)?(l(),n("span",U,b(r(be)(e)),1)):u("v-if",!0),r(se)(e)?(l(),n("span",{key:2,class:"evalute-tip",onClick:t=>(async e=>{var t;if(Z.evatipMap[e.id])return void De(Z.evatipMap[e.id]);let a="getSubjectAnswer";const o=(null==(t=G.scaleApiConfig)?void 0:t[a])||null;if(!o||"function"!=typeof o)return void ee.error(`${a} Is not a function`);let i=await o(e.id);i&&(Z.evatipMap[e.id]||(Z.evatipMap[e.id]=i,De(i)))})(e)},[J,k(" 查看提示 ")],8,W)):u("v-if",!0)])),default:g((()=>[(l(),p(C(e.renderCom),d(r(Ce)(e,t),{key:(e.id||e.seq)+t,onScaleChange:xe,onOnChange:t=>((e,t)=>{Z.form[t.val_key]=Be(e)})(t,e),onVodFileList:Fe}),null,16,["onOnChange"])),r(ke)(e)?(l(),p(B,{key:0,item:e},null,8,["item"])):u("v-if",!0)])),_:2},1032,["path","show-label"])):u("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),r(ye)?(l(),n("div",Y,[u(" 分享的链接 隐藏取消按钮 "),"guage"!==G.sourceType?(l(),p(r(K),{key:0,onClick:Me},{default:g((()=>[k("取消")])),_:1})):u("v-if",!0),G.isLock?u("v-if",!0):(l(),p(r(K),{key:1,onClick:r(Ne),disabled:Z.banSubmit,type:"primary"},{default:g((()=>[k(" 保存 ")])),_:1},8,["onClick","disabled"]))])):u("v-if",!0)],64))],64))],64))],2))}});export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,watch as t,createVNode as i,resolveComponent as l,isVNode as
|
|
1
|
+
import{defineComponent as e,reactive as o,watch as t,createVNode as i,resolveComponent as l,isVNode as a}from"vue";import{NRadioGroup as s,NRadio as r,NInput as u,NIcon as n}from"naive-ui";import{api as c}from"v-viewer";import{SearchOutline as p}from"@vicons/ionicons5";import f from"../composables/choose-common.js";var v=e({name:"RRadio",components:{NRadioGroup:s,NRadio:r,NInput:u,NIcon:n},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},inputLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,r){var u,v;const d=o({curvalue:"",othersText:"",curOptions:[],optionsPreSuffixObj:{}}),{choiceColor:m,showImgWrap:h,handleDefPreSuffix:b,choiceUseKey:x,isRadioItem:O,showPreSuffix:j,handleOptions:y,stopClick:g}=f(e,d),k=(null==(v=null==(u=e.item)?void 0:u.setting)?void 0:v.chooseStyleSetting)||1,S=o=>{var t;let i=o.options||[];const l=e.form[e.item.val_key];"EVALUATE_RADIO_BLOCK"===e.item.type&&(i=(null==(t=o.scoreConfigs)?void 0:t.scoreRules)||[]);((e,o,t)=>{if(d.curOptions=y(t),!t.length||!o)return;if("EVALUATE_RADIO_BLOCK"===e.type)return d.curvalue=o,void P();const i=t.find((e=>e.value===o));if(i)return d.curvalue=i.key,void P();t.find(((e,t)=>{const i=b(e,t,o);return i&&(d.curvalue=i),!!i||!1}))||(d.othersText=o,d.curvalue="other"),P()})(o,o.dbValue||o.setting.defaultValue||l,i)},P=()=>{const o={othersText:d.othersText,optionsPreSuffixObj:d.optionsPreSuffixObj};r.emit("scaleChange",d.curvalue,e.item,{choiceObj:o,isSetObj:O.value})};t((()=>e.item),(e=>{e&&Object.keys(e).length&&S(e)}),{immediate:!0});const C=()=>{const o={othersText:d.othersText,optionsPreSuffixObj:d.optionsPreSuffixObj};d.curvalue="other",r.emit("scaleChange","other",e.item,{choiceObj:o,isSetObj:O.value})},L=e=>i("span",{class:"scale-choice-img-wrap"},[i("img",{class:"show-picture",src:e.imageUrl},null),i("div",{class:"scale-preview-wrap"},[i(n,{size:"24",color:"#fff",component:p,onClick:o=>((e,o)=>{e.preventDefault(),e.stopPropagation();const t=d.curOptions.map((e=>e.imageUrl)).filter(Boolean);if(!t.length)return;const i=t.findIndex((e=>e===o));c({images:t,options:{toolbar:!0,initialViewIndex:i<0?0:i}})})(o,e.imageUrl)},null)])]),T=o=>i("div",{class:"presuffix-wrap"},[o.prefix&&i("span",{class:"prefix-span",style:{color:m.value(o)}},[o.prefix]),i(l("n-input"),{value:d.optionsPreSuffixObj[o.key],"onUpdate:value":e=>d.optionsPreSuffixObj[o.key]=e,disabled:e.isLock||e.inputLock,style:{color:m.value(o)},placeholder:"请输入",bordered:!1,"on-update:value":t=>((o,t)=>{d.optionsPreSuffixObj[t.key]=o,d.curvalue=t.key;const i={othersText:d.othersText,optionsPreSuffixObj:d.optionsPreSuffixObj};console.log(d.optionsPreSuffixObj),r.emit("scaleChange",d.curvalue,e.item,{choiceObj:i,isSetObj:O.value})})(t,o),onClick:g},null),o.suffix&&i("span",{class:"suffix-span",style:{color:m.value(o)}},[o.suffix])]),w=e=>i("span",{style:{color:m.value(e)},class:"other-span"},[e.label]),U=o=>i("div",{class:"choose-other",onClick:g},[i(l("n-input"),{value:d.othersText,"onUpdate:value":[e=>d.othersText=e,C],disabled:e.isLock||e.inputLock,style:{color:m.value(o)},placeholder:"请输入",bordered:!1},null)]),I=e=>O.value&&j.value(e),R=x.value;return()=>{let o;return i(s,{value:d.curvalue,"onUpdate:value":[e=>d.curvalue=e,P],class:["c-choice-wrap","choice-wrap-"+k],disabled:e.isLock},"function"==typeof(t=o=d.curOptions.map((o=>i("div",{class:"c-choice-radio-div"},[i(l("n-radio"),{key:o.value,value:o[R],onClick:t=>((o,t)=>{if(e.isLock)return;o.preventDefault(),o.stopPropagation();const i=t[R];d.curvalue=d.curvalue===i?"":i,P()})(t,o)},{default:()=>[h.value(o)&&L(o),I(o)&&T(o),!I(o)&&w(o),o.importability&&U(o)]})]))))||"[object Object]"===Object.prototype.toString.call(t)&&!a(t)?o:{default:()=>[o]});var t}}});export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as r,watch as o,openBlock as l,createBlock as
|
|
1
|
+
import{defineComponent as e,ref as t,computed as r,watch as o,openBlock as l,createBlock as a,unref as s}from"vue";import{isEqual as i,cloneDeep as u}from"lodash-es";import"../../shortcut-provider/index.js";import{normalizeSignatureInfo as n,isInvalidSignature as c,getDisplaySignature as p}from"../../shortcut-provider/src/utils/index.js";import m from"./ShortcutSetterItem.vue.js";import d from"../../form-render/index.js";import{GlobalShortcutProvider as h,useShortcuts as f}from"../../shortcut-provider/src/hooks/useShortcuts.js";var v=e({__name:"ShortcutSetter",props:{glob:{type:Boolean,default:!1},scope:{type:[String,Symbol]}},emits:["error","update"],setup(e,{expose:v,emit:S}){const y=e,g={SHORTCUT:m},b=t(0),j=r((()=>y.glob?h:y.scope)),k=f(j),x=t([]);let _={};function O(){_={},x.value=k.traverse().map((e=>(_[e.key]=n(e.shortcutSignature),{val_key:e.key,alias:e.label,html_type:"SHORTCUT",componentProps:{scope:j.value,onShortcutChange:T,shortcutKey:e.key,shortcutSignature:e.shortcutSignature,editPlaceholder:e.editPlaceholder,placeholder:e.placeholder,clearable:e.clearable,operation:e.operation},elem_width:6}))),b.value++}function T({key:e,info:t,resolve:r,reject:o}){const l=n(t);return c(l)?(S("error",`非法的快捷键组合=> ${p(l)}`),o()):Object.values(_).some((e=>i(e,l)))?(S("error",`重复的快捷键=> ${p(l)}`),o()):(S("update",{key:e,info:l}),_[e]=l,void r())}return o([j,()=>k.traverse()],O,{immediate:!0,deep:!0}),v({loadSignature(){O()},getSignature:()=>u(_),setSignature(){Object.entries(_).forEach((([e,t])=>{k.update(e,t)}))}}),(e,t)=>(l(),a(s(d),{column:12,key:b.value,"label-placement":"left","field-list":x.value,components:g},null,8,["field-list"]))}});export{v as default};
|
|
@@ -25,6 +25,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
25
|
type: null;
|
|
26
26
|
required: true;
|
|
27
27
|
};
|
|
28
|
+
clearable: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
required: true;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
28
33
|
placeholder: {
|
|
29
34
|
type: StringConstructor;
|
|
30
35
|
required: false;
|
|
@@ -42,11 +47,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
47
|
value: unknown;
|
|
43
48
|
onChange: unknown;
|
|
44
49
|
onFocus: unknown;
|
|
50
|
+
clearable: boolean;
|
|
45
51
|
placeholder: string;
|
|
46
52
|
editPlaceholder: string;
|
|
47
53
|
};
|
|
48
54
|
ShortcutInputState: typeof ShortcutInputState;
|
|
49
55
|
currentSetShortcut: import("vue").Ref<string>;
|
|
56
|
+
onClear: () => void;
|
|
50
57
|
state: import("vue").Ref<ShortcutInputState>;
|
|
51
58
|
isEditState: import("vue").ComputedRef<boolean>;
|
|
52
59
|
currentEditShortcut: import("vue").Ref<string>;
|
|
@@ -80,6 +87,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
87
|
type: null;
|
|
81
88
|
required: true;
|
|
82
89
|
};
|
|
90
|
+
clearable: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
required: true;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
83
95
|
placeholder: {
|
|
84
96
|
type: StringConstructor;
|
|
85
97
|
required: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as
|
|
1
|
+
import{defineComponent as e,ref as t,computed as l,openBlock as o,createElementBlock as r,createVNode as u,unref as a,withModifiers as n}from"vue";import{noop as s}from"lodash-es";import{NInput as c}from"naive-ui";import{getDisplaySignature as i}from"../../shortcut-provider/src/utils/index.js";const p={class:"shortcut-setter-item__wrapper"};var v=e({__name:"ShortcutSetterItem",props:{shortcutKey:null,shortcutSignature:null,value:null,onChange:null,onFocus:null,clearable:{type:Boolean,default:!1},placeholder:{default:"点击设置快捷键"},editPlaceholder:{default:"键盘按下要设置的快捷键组合"}},emits:["shortcutChange"],setup(e,{emit:v}){const h=e,f=t(i(h.shortcutSignature));function d(){f.value="",v("shortcutChange",{key:h.shortcutKey,info:{key:""},resolve:s,reject:s})}const m=t(0),y=l((()=>0===m.value)),K=t(""),g=l((()=>y.value?f.value:K.value)),b=l((()=>y.value?h.placeholder:h.editPlaceholder));function w(){m.value=1}const C=t();function _(){var e;m.value=0,K.value="",null==(e=C.value)||e.blur()}const k=e=>{K.value=i(e)},S=async e=>{try{if(i(e)===f.value)return;await new Promise(((t,l)=>{v("shortcutChange",{key:h.shortcutKey,info:e,resolve:t,reject:l})})),f.value=i(e)}finally{_(),K.value=""}};return(t,l)=>(o(),r("section",p,[u(a(c),{ref_key:"inputRef",ref:C,"input-props":{class:"shortcut-setter-item"},value:a(g),placeholder:a(b),clearable:e.clearable,onClear:d,onFocus:w,onBlur:_,onKeydown:n(k,["prevent","stop"]),onKeyup:n(S,["prevent","stop"])},null,8,["value","placeholder","clearable","onKeydown","onKeyup"])]))}});export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.47-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.47-beta.21",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.47-beta.21",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.47-beta.
|
|
3
|
+
"version": "3.1.47-beta.21",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "0a768f3899ad84d6ad78b4189bff11dd54933470"
|
|
67
67
|
}
|