cnhis-design-vue 3.1.42-beta.3 → 3.1.42-beta.4
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/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/field-set/index.d.ts +82 -13
- package/es/components/field-set/src/FieldSet.vue.d.ts +78 -27
- package/es/components/field-set/src/types/index.d.ts +18 -0
- package/es/components/field-set/src/types/index.js +1 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/env.d.ts +24 -24
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import { SFCWithInstall } from '../../../es/shared/types';
|
|
2
|
+
export * from './src/types';
|
|
2
3
|
declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
3
4
|
fields: {
|
|
4
|
-
type: import("vue").PropType<
|
|
5
|
+
type: import("vue").PropType<Partial<{
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
show: boolean;
|
|
10
|
+
sort: boolean;
|
|
11
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
12
|
+
title: string;
|
|
13
|
+
alias: string;
|
|
14
|
+
fixedShow: boolean;
|
|
15
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
16
|
+
columnWidth: number | null;
|
|
17
|
+
editable: boolean;
|
|
18
|
+
editableDisable: boolean;
|
|
19
|
+
required: boolean;
|
|
20
|
+
requiredDisable: boolean;
|
|
21
|
+
hide: boolean;
|
|
22
|
+
}>[]>;
|
|
5
23
|
default: () => never[];
|
|
6
24
|
};
|
|
7
25
|
footerFlag: {
|
|
@@ -27,7 +45,24 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
27
45
|
settingView: any;
|
|
28
46
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
29
47
|
fields: {
|
|
30
|
-
type: import("vue").PropType<
|
|
48
|
+
type: import("vue").PropType<Partial<{
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
show: boolean;
|
|
53
|
+
sort: boolean;
|
|
54
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
55
|
+
title: string;
|
|
56
|
+
alias: string;
|
|
57
|
+
fixedShow: boolean;
|
|
58
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
59
|
+
columnWidth: number | null;
|
|
60
|
+
editable: boolean;
|
|
61
|
+
editableDisable: boolean;
|
|
62
|
+
required: boolean;
|
|
63
|
+
requiredDisable: boolean;
|
|
64
|
+
hide: boolean;
|
|
65
|
+
}>[]>;
|
|
31
66
|
default: () => never[];
|
|
32
67
|
};
|
|
33
68
|
footerFlag: {
|
|
@@ -54,7 +89,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
54
89
|
clickItem: {
|
|
55
90
|
[key: string]: any;
|
|
56
91
|
};
|
|
57
|
-
fields: {
|
|
92
|
+
fields: Partial<{
|
|
58
93
|
[key: string]: any;
|
|
59
94
|
id: string;
|
|
60
95
|
name: string;
|
|
@@ -71,11 +106,11 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
71
106
|
required: boolean;
|
|
72
107
|
requiredDisable: boolean;
|
|
73
108
|
hide: boolean;
|
|
74
|
-
}[];
|
|
109
|
+
}>[];
|
|
75
110
|
widthShow: string;
|
|
76
111
|
widthLarge: string;
|
|
77
112
|
};
|
|
78
|
-
leftStyle: (ele: {
|
|
113
|
+
leftStyle: (ele: Partial<{
|
|
79
114
|
[key: string]: any;
|
|
80
115
|
id: string;
|
|
81
116
|
name: string;
|
|
@@ -92,7 +127,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
92
127
|
required: boolean;
|
|
93
128
|
requiredDisable: boolean;
|
|
94
129
|
hide: boolean;
|
|
95
|
-
}) => {
|
|
130
|
+
}>) => {
|
|
96
131
|
background: string | undefined;
|
|
97
132
|
};
|
|
98
133
|
showCheckBox: (key: string) => boolean;
|
|
@@ -103,7 +138,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
103
138
|
reset: () => void;
|
|
104
139
|
calculateCheck: (key: string) => boolean;
|
|
105
140
|
handleAllCheck: (e: boolean, key: string) => void;
|
|
106
|
-
handleFieldClick: (item: {
|
|
141
|
+
handleFieldClick: (item: Partial<{
|
|
107
142
|
[key: string]: any;
|
|
108
143
|
id: string;
|
|
109
144
|
name: string;
|
|
@@ -120,8 +155,8 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
120
155
|
required: boolean;
|
|
121
156
|
requiredDisable: boolean;
|
|
122
157
|
hide: boolean;
|
|
123
|
-
}) => void;
|
|
124
|
-
isDisable: (item: {
|
|
158
|
+
}>) => void;
|
|
159
|
+
isDisable: (item: Partial<{
|
|
125
160
|
[key: string]: any;
|
|
126
161
|
id: string;
|
|
127
162
|
name: string;
|
|
@@ -138,7 +173,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
138
173
|
required: boolean;
|
|
139
174
|
requiredDisable: boolean;
|
|
140
175
|
hide: boolean;
|
|
141
|
-
}
|
|
176
|
+
}>, key: string) => any;
|
|
142
177
|
setWidth: () => void;
|
|
143
178
|
NButton: any;
|
|
144
179
|
NCheckbox: any;
|
|
@@ -148,7 +183,7 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
148
183
|
NSpin: any;
|
|
149
184
|
NTooltip: any;
|
|
150
185
|
NPopconfirm: any;
|
|
151
|
-
|
|
186
|
+
Draggable: import("vue").DefineComponent<{
|
|
152
187
|
list: {
|
|
153
188
|
type: ArrayConstructor;
|
|
154
189
|
required: boolean;
|
|
@@ -223,7 +258,24 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
223
258
|
}>;
|
|
224
259
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "onSave" | "onClose")[], "reset" | "onSave" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
225
260
|
fields: {
|
|
226
|
-
type: import("vue").PropType<
|
|
261
|
+
type: import("vue").PropType<Partial<{
|
|
262
|
+
[key: string]: any;
|
|
263
|
+
id: string;
|
|
264
|
+
name: string;
|
|
265
|
+
show: boolean;
|
|
266
|
+
sort: boolean;
|
|
267
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
268
|
+
title: string;
|
|
269
|
+
alias: string;
|
|
270
|
+
fixedShow: boolean;
|
|
271
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
272
|
+
columnWidth: number | null;
|
|
273
|
+
editable: boolean;
|
|
274
|
+
editableDisable: boolean;
|
|
275
|
+
required: boolean;
|
|
276
|
+
requiredDisable: boolean;
|
|
277
|
+
hide: boolean;
|
|
278
|
+
}>[]>;
|
|
227
279
|
default: () => never[];
|
|
228
280
|
};
|
|
229
281
|
footerFlag: {
|
|
@@ -244,7 +296,24 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
244
296
|
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
245
297
|
}, {
|
|
246
298
|
type: string;
|
|
247
|
-
fields:
|
|
299
|
+
fields: Partial<{
|
|
300
|
+
[key: string]: any;
|
|
301
|
+
id: string;
|
|
302
|
+
name: string;
|
|
303
|
+
show: boolean;
|
|
304
|
+
sort: boolean;
|
|
305
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
306
|
+
title: string;
|
|
307
|
+
alias: string;
|
|
308
|
+
fixedShow: boolean;
|
|
309
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
310
|
+
columnWidth: number | null;
|
|
311
|
+
editable: boolean;
|
|
312
|
+
editableDisable: boolean;
|
|
313
|
+
required: boolean;
|
|
314
|
+
requiredDisable: boolean;
|
|
315
|
+
hide: boolean;
|
|
316
|
+
}>[];
|
|
248
317
|
footerFlag: boolean;
|
|
249
318
|
isEdit: boolean;
|
|
250
319
|
}>>;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
show: boolean;
|
|
6
|
-
sort: boolean;
|
|
7
|
-
sortDirection: 'NONE' | 'ASC' | 'DESC';
|
|
8
|
-
title: string;
|
|
9
|
-
alias: string;
|
|
10
|
-
fixedShow: boolean;
|
|
11
|
-
fixedWay: 'NONE' | 'LEFT' | 'RIGHT';
|
|
12
|
-
columnWidth: number | null;
|
|
13
|
-
editable: boolean;
|
|
14
|
-
editableDisable: boolean;
|
|
15
|
-
required: boolean;
|
|
16
|
-
requiredDisable: boolean;
|
|
17
|
-
hide: boolean;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
};
|
|
2
|
+
import { FieldSetItem } from '../../../../es/components/field-set/src/types';
|
|
20
3
|
declare type Istate = {
|
|
21
4
|
spinning: boolean;
|
|
22
5
|
isCustomSearch: boolean;
|
|
23
6
|
clickItem: {
|
|
24
7
|
[key: string]: any;
|
|
25
8
|
};
|
|
26
|
-
fields:
|
|
9
|
+
fields: FieldSetItem[];
|
|
27
10
|
widthShow: string;
|
|
28
11
|
widthLarge: string;
|
|
29
12
|
};
|
|
30
13
|
declare const _default: import("vue").DefineComponent<{
|
|
31
14
|
fields: {
|
|
32
|
-
type: PropType<
|
|
15
|
+
type: PropType<Partial<{
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
show: boolean;
|
|
20
|
+
sort: boolean;
|
|
21
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
22
|
+
title: string;
|
|
23
|
+
alias: string;
|
|
24
|
+
fixedShow: boolean;
|
|
25
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
26
|
+
columnWidth: number | null;
|
|
27
|
+
editable: boolean;
|
|
28
|
+
editableDisable: boolean;
|
|
29
|
+
required: boolean;
|
|
30
|
+
requiredDisable: boolean;
|
|
31
|
+
hide: boolean;
|
|
32
|
+
}>[]>;
|
|
33
33
|
default: () => never[];
|
|
34
34
|
};
|
|
35
35
|
footerFlag: {
|
|
@@ -55,7 +55,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
55
55
|
settingView: any;
|
|
56
56
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
57
57
|
fields: {
|
|
58
|
-
type: PropType<
|
|
58
|
+
type: PropType<Partial<{
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
show: boolean;
|
|
63
|
+
sort: boolean;
|
|
64
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
65
|
+
title: string;
|
|
66
|
+
alias: string;
|
|
67
|
+
fixedShow: boolean;
|
|
68
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
69
|
+
columnWidth: number | null;
|
|
70
|
+
editable: boolean;
|
|
71
|
+
editableDisable: boolean;
|
|
72
|
+
required: boolean;
|
|
73
|
+
requiredDisable: boolean;
|
|
74
|
+
hide: boolean;
|
|
75
|
+
}>[]>;
|
|
59
76
|
default: () => never[];
|
|
60
77
|
};
|
|
61
78
|
footerFlag: {
|
|
@@ -77,7 +94,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
77
94
|
}>>;
|
|
78
95
|
initFields: () => any[];
|
|
79
96
|
state: Istate;
|
|
80
|
-
leftStyle: (ele:
|
|
97
|
+
leftStyle: (ele: FieldSetItem) => {
|
|
81
98
|
background: string | undefined;
|
|
82
99
|
};
|
|
83
100
|
showCheckBox: (key: string) => boolean;
|
|
@@ -88,8 +105,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
88
105
|
reset: () => void;
|
|
89
106
|
calculateCheck: (key: string) => boolean;
|
|
90
107
|
handleAllCheck: (e: boolean, key: string) => void;
|
|
91
|
-
handleFieldClick: (item:
|
|
92
|
-
isDisable: (item:
|
|
108
|
+
handleFieldClick: (item: FieldSetItem) => void;
|
|
109
|
+
isDisable: (item: FieldSetItem, key: string) => any;
|
|
93
110
|
setWidth: () => void;
|
|
94
111
|
NButton: any;
|
|
95
112
|
NCheckbox: any;
|
|
@@ -99,7 +116,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
116
|
NSpin: any;
|
|
100
117
|
NTooltip: any;
|
|
101
118
|
NPopconfirm: any;
|
|
102
|
-
|
|
119
|
+
Draggable: import("vue").DefineComponent<{
|
|
103
120
|
list: {
|
|
104
121
|
type: ArrayConstructor;
|
|
105
122
|
required: boolean;
|
|
@@ -174,7 +191,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
174
191
|
}>;
|
|
175
192
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "onSave" | "onClose")[], "reset" | "onSave" | "onClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
176
193
|
fields: {
|
|
177
|
-
type: PropType<
|
|
194
|
+
type: PropType<Partial<{
|
|
195
|
+
[key: string]: any;
|
|
196
|
+
id: string;
|
|
197
|
+
name: string;
|
|
198
|
+
show: boolean;
|
|
199
|
+
sort: boolean;
|
|
200
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
201
|
+
title: string;
|
|
202
|
+
alias: string;
|
|
203
|
+
fixedShow: boolean;
|
|
204
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
205
|
+
columnWidth: number | null;
|
|
206
|
+
editable: boolean;
|
|
207
|
+
editableDisable: boolean;
|
|
208
|
+
required: boolean;
|
|
209
|
+
requiredDisable: boolean;
|
|
210
|
+
hide: boolean;
|
|
211
|
+
}>[]>;
|
|
178
212
|
default: () => never[];
|
|
179
213
|
};
|
|
180
214
|
footerFlag: {
|
|
@@ -195,7 +229,24 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
195
229
|
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
196
230
|
}, {
|
|
197
231
|
type: string;
|
|
198
|
-
fields:
|
|
232
|
+
fields: Partial<{
|
|
233
|
+
[key: string]: any;
|
|
234
|
+
id: string;
|
|
235
|
+
name: string;
|
|
236
|
+
show: boolean;
|
|
237
|
+
sort: boolean;
|
|
238
|
+
sortDirection: "NONE" | "ASC" | "DESC";
|
|
239
|
+
title: string;
|
|
240
|
+
alias: string;
|
|
241
|
+
fixedShow: boolean;
|
|
242
|
+
fixedWay: "NONE" | "LEFT" | "RIGHT";
|
|
243
|
+
columnWidth: number | null;
|
|
244
|
+
editable: boolean;
|
|
245
|
+
editableDisable: boolean;
|
|
246
|
+
required: boolean;
|
|
247
|
+
requiredDisable: boolean;
|
|
248
|
+
hide: boolean;
|
|
249
|
+
}>[];
|
|
199
250
|
footerFlag: boolean;
|
|
200
251
|
isEdit: boolean;
|
|
201
252
|
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare type FieldSetItem = Partial<{
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
show: boolean;
|
|
5
|
+
sort: boolean;
|
|
6
|
+
sortDirection: 'NONE' | 'ASC' | 'DESC';
|
|
7
|
+
title: string;
|
|
8
|
+
alias: string;
|
|
9
|
+
fixedShow: boolean;
|
|
10
|
+
fixedWay: 'NONE' | 'LEFT' | 'RIGHT';
|
|
11
|
+
columnWidth: number | null;
|
|
12
|
+
editable: boolean;
|
|
13
|
+
editableDisable: boolean;
|
|
14
|
+
required: boolean;
|
|
15
|
+
requiredDisable: boolean;
|
|
16
|
+
hide: boolean;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,watch as r,createVNode as n,mergeProps as
|
|
1
|
+
import{defineComponent as e,computed as t,watch as r,createVNode as n,mergeProps as a}from"vue";import{generateTimeFormat as u}from"../../../../../shared/utils/index.js";import{connect as o,mapProps as i}from"@formily/vue";import{isObject as l}from"@vueuse/core";import{format as s}from"date-fns";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import"../../utils/index.js";import d from"../../../../date-picker/index.js";import{assignUpdateValue as v,assignClearBindVisited as c}from"../../utils/schema.js";const f=o(e({props:{onChange:{},value:{type:String},validate:{type:Object},valueFormat:{type:String,default:"yyyy-MM-dd"}},emits:["update:value"],setup(e,{emit:o}){const{injectValueValidate:i,injectValueBindKey:v}=m();function c(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.min_date)}function f(){var t;return"currTime"===(null==(t=e.validate)?void 0:t.max_date)}function p(e){return c()&&e<Date.now()-864e5||f()&&e>Date.now()}function D(e){const t=new Date(e),r=new Date,n=new Date(t);return n.setHours(0),n.setMinutes(0),n.setSeconds(0),{isHourDisabled:function(e){return!i()&&(c()&&e<u()||f()&&e>u())},isMinuteDisabled:function(e){if(i())return!1;if(a()===u())return c()&&e<o()||f()&&e>o();return c()&&a()<u()||f()&&a()>u()}};function a(){return t.getHours()}function u(){return r.getHours()}function o(){return r.getMinutes()}function i(){return n>r}}i((()=>e.value));const y=t((()=>{const t={};if(l(e.validate)){const{min_date:r,max_date:n}=e.validate;(r||n)&&(t.isDateDisabled=p,t.isTimeDisabled=D)}return t})),j=t((()=>({valueFormat:e.valueFormat,format:e.valueFormat,timePickerProps:{format:u(e.valueFormat)}})));function g(t){return t?s(new Date(t),e.valueFormat):t}r((()=>e.value),(e=>{e&&g(e)!==e&&o("update:value",g(e))}));const w=t({get:()=>g(e.value),set:e=>{o("update:value",e)}}),x=v(w);return()=>n(d,a({key:x.value},y.value,j.value,{"formatted-value":w.value,"onUpdate:formatted-value":e=>w.value=e}),null)}}),i(v,c));export{f as DATE};
|
package/es/components/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './form-config';
|
|
|
37
37
|
export * from './insurance-sdk';
|
|
38
38
|
export * from './table-filter';
|
|
39
39
|
export * from './config-provider';
|
|
40
|
+
export * from './field-set';
|
|
40
41
|
declare function install(app: App): void;
|
|
41
42
|
export { CGrid, CBigTable, CFieldSet, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, CScaleView, CMap, CVodChunkUpload, CRadio, CCheckbox, CSelect, CDatetime, CInfoHeader, CTimeLine, CBaseSearch, CQuickSearch, CClassification, CBpmnWorkflow, CStepsWheel, CEditor, CFormRender, CFabricChart, CShortcutProvider, CShortcutSetter, CFormConfig, CIhoTable, CKeyboard, CSearchCascader, CRecommendSearch, CDatePicker, CTimePicker, CConfigProvider };
|
|
42
43
|
declare const _default: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as i,openBlock as n,createElementBlock as s,normalizeClass as l,unref as r,createCommentVNode as u,Fragment as c,createBlock as m,mergeProps as v,createElementVNode as p,normalizeStyle as d,createVNode as f,withCtx as g,renderList as y,toDisplayString as k,createTextVNode as h,resolveDynamicComponent as C,h as w}from"vue";import b from"./hooks/use-noData.js";import{getScaleViewState as S}from"./hooks/scaleview-state.js";import E from"./hooks/scaleview-props.js";import{ScaleViewComputed as _}from"./hooks/scaleview-computed.js";import{ScaleViewInit as A}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as T,isCollection as D,isEvaluation as O}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import x from"./components/NoData.vue.js";import I from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import P from"./components/EvaluateCountdown.vue.js";import N from"./components/EvaluatePage.vue.js";import q from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import{useDialog as B,useMessage as R,NForm as V,NFormItem as F,NButton as K}from"naive-ui";import H from"../../../_virtual/plugin-vue_export-helper.js";const W=["innerHTML"],U={key:0,class:"required-text"},J={key:1,class:"evalute-label"},X=["onClick"],G={key:1,class:"footer"};var Q=H(e({__name:"ScaleView",props:E,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:E,emit:H}){const Q=e,{ScaleViewState:$}=S(),z=o($),Y=B(),Z=R(),ee=a(null),oe=a(null),{noDataState:ae,setNoData:te,resetNodata:ie}=b(),ne=T(),{showEvatip:se,isFormBoldOpen:le,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:me,hasScore:ve,isPreviewScale:pe,showEvaluateEntry:de,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:ke,propsConfig:he,evaluatePageProps:Ce,evaluateCountdownProps:we,skipCover:be,scaleEdit:Se}=_(Q,z,{query:ne}),{initForm:Ee}=A(Q,z,H,{query:ne}),{submitMethod:_e}=j(Q,z,H,{query:ne}),{nextLogicEvent:Ae,handleDynamicDataRelation:je}=L(Q,z);(()=>{let{id:e}=ne;e&&(z.shareId=e)})();const Te=e=>{try{ie(),Ee(e)}catch(e){console.log(e,"--error"),z.spinning=!1,z.hasFrontAddress=!1,te(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>Q.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),t((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;z.form={},z.formArray=[];const o=JSON.parse(JSON.stringify(e));i((()=>{Ee(o)}))}),{immediate:!0});const De=e=>{z.showEvaluateSettingWrap=!1,z.showEvaluateCountdown=!!e,H("startWriteScale")},Oe=()=>{console.log("----closeEvaluateCountdown"),z.showEvaluateCountdown=!1,pe.value||(z.banSubmit=!0,_e(),Y.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>{}}))},Le=e=>{Y.warning({title:"提示",content:()=>w("div",{class:"evatip-container"},[w("span","答案解析:"),w("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},xe=(e,o,a)=>{console.log(e,"--val");let{choiceObj:t,isSetObj:i}=a||{};switch(o.type.includes("SELECT")||(z.form[o.val_key]=e),o.type){case"SELECT":case"EVALUATE_SELECT":let{value:a,list:n=[]}=e;z.form[o.val_key]=a,Ae(e,o,z.formArray),je(n,o,z.formArray);break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(z.choiceComObj[o.val_key]=t),Ae(e,o,z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Ae(e,o,z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":z.submitForm[o.val_key]=e}},Ie=(e,o)=>{console.log(o),z.form[o.val_key]=e},Pe=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const o=e||[],a=[],t=[];return o.forEach((e=>{t.push(e),a.push(e.labelName)})),z.labelSelectedList=o,{labelStr:a.join(","),labels:t}},Ne=()=>{var e;if(!z.formArray.find((e=>O(e.type))))return void qe("确认要提交吗?");let{evaluateResultSetting:o}=z.config;if(!o||!Object.keys(o).length&&!de.value||Se.value)return void qe("确认要结束测评吗?");if("formIframe"==Q.openType&&de.value)return void H("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:o,totalLen:t}=e;o<t?a="存在未作答的题目,确定要提前结束测评吗?":!(null==z?void 0:z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}qe(a)},qe=e=>{Y.warning({title:"温馨提示",content:()=>w("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Me()},onNegativeClick(){}})},Me=()=>{var e;null==(e=oe.value)||e.validate((e=>{var o;if(e){console.log(e);let a=(null==(o=e[0])?void 0:o[0])||{},t=a.field,i=a.message,n=z.formArray.find((e=>e.databaseTitle===t));return n&&(t=n.title),Z.error(t+i),!1}_e()}))},Be=()=>{H("onCloseSetting")};return E({getScaleData:()=>({...z}),onSubmit:Ne,cancel:Be}),(e,o)=>(n(),s("div",{class:l(["c-scale",{"c-scale-nobtn":r(ge)}])},[u(' <template v-if="state.spinning">\
|
|
1
|
+
import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as i,openBlock as n,createElementBlock as s,normalizeClass as l,unref as r,createCommentVNode as u,Fragment as c,createBlock as m,mergeProps as v,createElementVNode as p,normalizeStyle as d,createVNode as f,withCtx as g,renderList as y,toDisplayString as k,createTextVNode as h,resolveDynamicComponent as C,h as w}from"vue";import b from"./hooks/use-noData.js";import{getScaleViewState as S}from"./hooks/scaleview-state.js";import E from"./hooks/scaleview-props.js";import{ScaleViewComputed as _}from"./hooks/scaleview-computed.js";import{ScaleViewInit as A}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{handleQueryParams as T,isCollection as D,isEvaluation as O}from"./utils/judge-types.js";import{useEvent as L}from"./hooks/use-event.js";import x from"./components/NoData.vue.js";import I from"../../../shared/components/SvgIcon/SvgIcon.vue.js";import P from"./components/EvaluateCountdown.vue.js";import N from"./components/EvaluatePage.vue.js";import q from"./components/AnswerParse.vue.js";import M from"./components/ScaleScore.js";import{useDialog as B,useMessage as R,NForm as V,NFormItem as F,NButton as K}from"naive-ui";import H from"../../../_virtual/plugin-vue_export-helper.js";const W=["innerHTML"],U={key:0,class:"required-text"},J={key:1,class:"evalute-label"},X=["onClick"],G={key:1,class:"footer"};var Q=H(e({__name:"ScaleView",props:E,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:E,emit:H}){const Q=e,{ScaleViewState:$}=S(),z=o($),Y=B(),Z=R(),ee=a(null),oe=a(null),{noDataState:ae,setNoData:te,resetNodata:ie}=b(),ne=T(),{showEvatip:se,isFormBoldOpen:le,scaleStyle:re,handlePageClass:ue,isShowItem:ce,handleShowQuestionNumber:me,hasScore:ve,isPreviewScale:pe,showEvaluateEntry:de,showEvaluateCoundownPage:fe,showSaveBtn:ge,showEvaluateLabel:ye,showAnswerParse:ke,propsConfig:he,evaluatePageProps:Ce,evaluateCountdownProps:we,skipCover:be,scaleEdit:Se}=_(Q,z,{query:ne}),{initForm:Ee}=A(Q,z,H,{query:ne}),{submitMethod:_e}=j(Q,z,H,{query:ne}),{nextLogicEvent:Ae,handleDynamicDataRelation:je}=L(Q,z);(()=>{let{id:e}=ne;e&&(z.shareId=e)})();const Te=e=>{try{ie(),Ee(e)}catch(e){console.log(e,"--error"),z.spinning=!1,z.hasFrontAddress=!1,te(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>Q.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Te(e):e.guage_id&&Te(e)}),{immediate:!0}),t((()=>Q.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;z.form={},z.formArray=[];const o=JSON.parse(JSON.stringify(e));i((()=>{Ee(o)}))}),{immediate:!0});const De=e=>{z.showEvaluateSettingWrap=!1,z.showEvaluateCountdown=!!e,H("startWriteScale")},Oe=()=>{console.log("----closeEvaluateCountdown"),z.showEvaluateCountdown=!1,pe.value||(z.banSubmit=!0,_e(),Y.warning({title:"温馨提示",content:"测评时间到了,结束测评!",maskClosable:!1,positiveText:"确定",onPositiveClick:()=>{}}))},Le=e=>{Y.warning({title:"提示",content:()=>w("div",{class:"evatip-container"},[w("span","答案解析:"),w("p",e)]),class:"c-evatip-dialog-wrap",showIcon:!1,positiveText:"确定",negativeText:"关闭",maskClosable:!1,onPositiveClick(){},onNegativeClick(){}})},xe=(e,o,a)=>{console.log(e,"--val");let{choiceObj:t,isSetObj:i}=a||{};switch(o.type.includes("SELECT")||(z.form[o.val_key]=e),o.type){case"SELECT":case"EVALUATE_SELECT":let{value:a,list:n=[]}=e;z.form[o.val_key]=a,Ae(e,o,z.formArray),je(n,o,z.formArray);break;case"RADIO_BLOCK":case"CHECKBOX_BLOCK":i&&(z.choiceComObj[o.val_key]=t),Ae(e,o,z.formArray);break;case"EVALUATE_RADIO_BLOCK":case"EVALUATE_CHECKBOX_BLOCK":Ae(e,o,z.formArray);break;case"DATE":case"TIME":case"DATETIME":case"SEARCH_CASCADE":z.submitForm[o.val_key]=e}},Ie=(e,o)=>{console.log(o),z.form[o.val_key]=e},Pe=e=>{if(!e||!e.length)return{labelStr:"",labels:[]};const o=e||[],a=[],t=[];return o.forEach((e=>{t.push(e),a.push(e.labelName)})),z.labelSelectedList=o,{labelStr:a.join(","),labels:t}},Ne=()=>{var e;if(!z.formArray.find((e=>O(e.type))))return void qe("确认要提交吗?");let{evaluateResultSetting:o}=z.config;if(!o||!Object.keys(o).length&&!de.value||Se.value)return void qe("确认要结束测评吗?");if("formIframe"==Q.openType&&de.value)return void H("submitNoRequest");let a="确定要提前结束测评吗?";if(fe.value&&(null==(e=ee.value)?void 0:e.getCountdownObj)){const e=ee.value.getCountdownObj(),{setAnswered:o,totalLen:t}=e;o<t?a="存在未作答的题目,确定要提前结束测评吗?":!(null==z?void 0:z.showEvaluateCountdown)&&(a="确认要结束测评吗?")}qe(a)},qe=e=>{Y.warning({title:"温馨提示",content:()=>w("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:()=>{Me()},onNegativeClick(){}})},Me=()=>{var e;null==(e=oe.value)||e.validate((e=>{var o;if(e){console.log(e);let a=(null==(o=e[0])?void 0:o[0])||{},t=a.field,i=a.message,n=z.formArray.find((e=>e.databaseTitle===t));return n&&(t=n.title),Z.error(t+i),!1}_e()}))},Be=()=>{H("onCloseSetting")};return E({getScaleData:()=>({...z}),onSubmit:Ne,cancel:Be}),(e,o)=>(n(),s("div",{class:l(["c-scale",{"c-scale-nobtn":r(ge)}])},[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):(n(),s(c,{key:0},[r(ae).noData?(n(),m(x,{key:0,noDataImg:r(ae).noDataImg,noDataTip:r(ae).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),s(c,{key:1},[r(de)&&!r(be)?(n(),m(N,v({key:0},r(Ce),{onWriteGuage:De}),null,16)):(n(),s(c,{key:1},[r(fe)?(n(),m(P,v({key:0,ref_key:"countdownDom",ref:ee},r(we),{onCloseEvaluateCountdown:Oe}),null,16)):u("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ue),"scale-container-hasfooter":r(ge)}]),style:d(r(re))},[r(ve)?(n(),m(r(M),{key:0,config:z.config,maxScore:z.maxScore},null,8,["config","maxScore"])):u("v-if",!0),f(r(V),{ref_key:"formRef",ref:oe,model:z.form,rules:z.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),s(c,null,y(z.formArray,((e,o)=>(n(),s(c,{key:(e.id||e.seq)+o},[r(ce)(e)?(n(),m(r(F),{key:0,path:e.val_key,"show-label":!r(D)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(le)(e)}),innerHTML:r(me)(e)},null,10,W),r(le)(e)?(n(),s("span",U,"(必填)")):u("v-if",!0),r(ye)(e)?(n(),s("span",J,k(r(ye)(e)),1)):u("v-if",!0),r(se)(e)?(n(),s("span",{key:2,class:"evalute-tip",onClick:o=>(async e=>{var o;if(z.evatipMap[e.id])return void Le(z.evatipMap[e.id]);let a="getSubjectAnswer";const t=(null==(o=Q.scaleApiConfig)?void 0:o[a])||null;if(!t||"function"!=typeof t)return void Z.error(`${a} Is not a function`);let i=await t(e.id);i&&(z.evatipMap[e.id]||(z.evatipMap[e.id]=i,Le(i)))})(e)},[f(r(I),{"icon-class":"a-xitongtubiaotishi"}),h(" 查看提示 ")],8,X)):u("v-if",!0)])),default:g((()=>[(n(),m(C(e.renderCom),v(r(he)(e,o),{key:(e.id||e.seq)+o,onScaleChange:xe,onOnChange:o=>((e,o)=>{z.form[o.val_key]=Pe(e)})(o,e),onVodFileList:Ie}),null,16,["onOnChange"])),r(ke)(e)?(n(),m(q,{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(ge)?(n(),s("div",G,[u(" 分享的链接 隐藏取消按钮 "),"guage"!==Q.sourceType?(n(),m(r(K),{key:0,onClick:Be},{default:g((()=>[h("取消")])),_:1})):u("v-if",!0),Q.isLock?u("v-if",!0):(n(),m(r(K),{key:1,onClick:Ne,disabled:z.banSubmit,type:"primary"},{default:g((()=>[h("保存")])),_:1},8,["disabled"]))])):u("v-if",!0)],64))],64))],64))],2))}}),[["__file","ScaleView.vue"]]);export{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as d,createCommentVNode as o,withDirectives as r,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../_virtual/plugin-vue_export-helper.js";import A from"xe-utils";const O={key:0,class:"label-disable-wrap"},K=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],j={style:{height:"100%"}},k={class:"label-wrap"},T=["id"],_={class:"edit-label-type"};var B=x(t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:x,emit:B}){const D=t,F=L(),V=e(null),P=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!P.inited)return!1;let t=P.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(...P.labelSelectedEdit,...D.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(P.labelSelectedEdit=$.value,"object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=P.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await D.saveLabelItem(a,t);i&&(F.success("添加成功!"),B("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let d=(null==(i=P.labelSelectedEdit)?void 0:i.length)&&A.clone(P.labelSelectedEdit,!0)||[];if(t){if(d.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;d=d.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}d.push(e)}else{const t=d.findIndex((t=>t.labelId==e.labelId));-1!=t&&d.splice(t,1)}P.labelSelectedEdit=[...d],N.value++,D.explicit&&B("explicitOnChange",[...P.labelSelectedEdit])},X=async t=>{const{status:e}=await D.deleteLabel(t,D.item);if(e){F.success("删除成功!");for(const e in P.labelConfig){const l=P.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&P.labelConfig[e].itemList.splice(l,1)}const e=P.labelSelectedEdit||[],l=D.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),B("change",[...l],D.item)}B("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=V.value.querySelector("a[href='"+l+"']"),e&&e.click(),P.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);P.cacheAnchorKey=e},et=()=>{var t;return null==(t=V.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>D.labelOptions),(t=>{t&&(()=>{var t;if(D.isLock)return;const e=JSON.parse(JSON.stringify(D.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}P.labelConfig=e,C((()=>{let t;R(),D.explicit&&P.inited&&(t=P.labelAnchorKey),z(P.labelConfig,t),P.inited=!0}))})()}),{immediate:!0,deep:!0}),x({resetShowAdd:()=>{let{labelObj:t}=P.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([...P.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof P.labelConfig){Object.keys(P.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=P.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(P.labelSelectedEdit)){const e=P.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&P.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:V},[d(W)?(n(),s("div",O,K)):o("v-if",!0),r(c("div",j,[c("div",k,[o(" 表单内嵌打开标签组件的样式 "),o(' <div v-if="explicit" class="explicit-continer">\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\n\t\t\t\t\t\t\t\t<span slot="tab">\n\t\t\t\t\t\t\t\t\t{{ i }}\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\n\t\t\t\t\t\t\t\t\t\t<labelClassify\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</n-tab-pane>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</n-tabs>\n\t\t\t\t</div> '),o("\n\t\t\t\t\t普通标签样式\n\t\t\t\t\tv-else\n\t\t\t\t\texplicit\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(d(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(P.labelConfig,((t,e)=>(n(),y(d(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),o(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(P.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",_,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,T),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:d(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!d(W)]])],512))}}),[["__file","LabelFormContent.vue"]]);export{B as default};
|
package/es/env.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
declare const draggableComponent: import('vue').DefineComponent<
|
|
2
|
+
{
|
|
3
|
+
list: {
|
|
4
|
+
type: ArrayConstructor;
|
|
5
|
+
required: boolean;
|
|
6
|
+
default: any;
|
|
7
|
+
};
|
|
8
|
+
modelValue: {
|
|
9
|
+
type: ArrayConstructor;
|
|
10
|
+
required: boolean;
|
|
11
|
+
default: any;
|
|
12
|
+
};
|
|
13
|
+
itemKey: {
|
|
14
|
+
type: (FunctionConstructor | StringConstructor)[];
|
|
15
|
+
required: boolean;
|
|
16
|
+
};
|
|
17
|
+
clone: {
|
|
18
|
+
type: FunctionConstructor;
|
|
19
|
+
default: (original: any) => any;
|
|
20
|
+
};
|
|
21
|
+
tag: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
move: {
|
|
26
|
+
type: FunctionConstructor;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
componentData: {
|
|
30
|
+
type: ObjectConstructor;
|
|
31
|
+
required: boolean;
|
|
32
|
+
default: any;
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
unknown,
|
|
36
|
+
{
|
|
37
|
+
error: boolean;
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
realList(): any;
|
|
41
|
+
getKey(): any;
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
getUnderlyingVm(domElement: any): any;
|
|
45
|
+
getUnderlyingPotencialDraggableComponent(htmElement: any): any;
|
|
46
|
+
emitChanges(evt: any): void;
|
|
47
|
+
alterList(onList: any): void;
|
|
48
|
+
spliceList(): void;
|
|
49
|
+
updatePosition(oldIndex: any, newIndex: any): void;
|
|
50
|
+
getRelatedContextFromMoveEvent({ to, related }: { to: any; related: any }): any;
|
|
51
|
+
getVmIndexFromDomIndex(domIndex: any): any;
|
|
52
|
+
onDragStart(evt: any): void;
|
|
53
|
+
onDragAdd(evt: any): void;
|
|
54
|
+
onDragRemove(evt: any): void;
|
|
55
|
+
onDragUpdate(evt: any): void;
|
|
56
|
+
computeFutureIndex(relatedContext: any, evt: any): any;
|
|
57
|
+
onDragMove(evt: any, originalEvent: any): any;
|
|
58
|
+
onDragEnd(): void;
|
|
59
|
+
},
|
|
60
|
+
import('vue').ComponentOptionsMixin,
|
|
61
|
+
import('vue').ComponentOptionsMixin,
|
|
62
|
+
any[],
|
|
63
|
+
any,
|
|
64
|
+
import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps,
|
|
65
|
+
Readonly<
|
|
66
|
+
{
|
|
67
|
+
move: Function;
|
|
68
|
+
tag: string;
|
|
69
|
+
clone: Function;
|
|
70
|
+
list: unknown[];
|
|
71
|
+
modelValue: unknown[];
|
|
72
|
+
componentData: Record<string, any>;
|
|
73
|
+
} & {
|
|
74
|
+
itemKey?: string | Function;
|
|
75
|
+
}
|
|
76
|
+
>,
|
|
77
|
+
{
|
|
78
|
+
move: Function;
|
|
79
|
+
tag: string;
|
|
80
|
+
clone: Function;
|
|
81
|
+
list: unknown[];
|
|
82
|
+
modelValue: unknown[];
|
|
83
|
+
componentData: Record<string, any>;
|
|
84
|
+
}
|
|
85
|
+
>;
|
|
86
|
+
export default draggableComponent;
|