cnhis-design-vue 3.2.9-beta.2 → 3.2.9-beta.23
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/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/types/index.d.ts +8 -7
- package/es/components/base-search/index.d.ts +2 -0
- package/es/components/base-search/src/index.vue.d.ts +2 -0
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/index.d.ts +7 -45
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +7 -45
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +6 -35
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1 -5
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +5 -4
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/expand-field/index.d.ts +1 -1
- package/es/components/expand-field/src/components/form.vue.d.ts +1 -1
- package/es/components/expand-field/src/index.vue.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +29 -6
- package/es/components/field-set/src/FieldFilter.vue.d.ts +29 -6
- package/es/components/field-set/src/FieldSet.vue.d.ts +68 -28
- package/es/components/field-set/src/FieldSet.vue2.js +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +28 -1
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/field-set/src/types/index.d.ts +3 -3
- package/es/components/field-set/src/utils/index.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/iho-chat/index.d.ts +270 -2
- package/es/components/iho-chat/src/Index.vue.d.ts +270 -2
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +121 -1
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +131 -2
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +122 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +6 -1
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +2 -1
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/hooks/useState.d.ts +5 -0
- package/es/components/iho-chat/src/hooks/useState.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +1 -0
- package/es/components/iho-chat/src/utils/chatSock.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.d.ts +2 -0
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/hooks/useRowHeight.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/quick-search/index.d.ts +3 -0
- package/es/components/quick-search/src/index.vue.d.ts +3 -0
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +1 -0
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +2 -0
- package/es/shared/assets/img/ai__avatar.png.js +1 -1
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/index.d.ts +1 -0
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
@@ -46,9 +46,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
46
46
|
disabledAll?: boolean | undefined;
|
47
47
|
isHeadCheckHide?: boolean | undefined;
|
48
48
|
isShow?: boolean | undefined;
|
49
|
-
contentRender?: ((column: AnyObject, row: AnyObject) =>
|
50
|
-
[key: string]: any;
|
51
|
-
}>) | undefined;
|
49
|
+
contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
|
52
50
|
}[]>;
|
53
51
|
rowProps: {
|
54
52
|
columns: {
|
@@ -60,9 +58,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
60
58
|
disabledAll?: boolean | undefined;
|
61
59
|
isHeadCheckHide?: boolean | undefined;
|
62
60
|
isShow?: boolean | undefined;
|
63
|
-
contentRender?: ((column: AnyObject, row: AnyObject) =>
|
64
|
-
[key: string]: any;
|
65
|
-
}>) | undefined;
|
61
|
+
contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
|
66
62
|
}[];
|
67
63
|
data: AnyObject[];
|
68
64
|
onEdit: (row: AnyObject) => void;
|
@@ -235,6 +231,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
235
231
|
type: PropType<AnyObject[]>;
|
236
232
|
default: () => never[];
|
237
233
|
};
|
234
|
+
primaryKey: {
|
235
|
+
type: StringConstructor;
|
236
|
+
default: string;
|
237
|
+
};
|
238
|
+
titleRender: {
|
239
|
+
type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
|
240
|
+
};
|
238
241
|
}, {
|
239
242
|
fixedWayOptions: {
|
240
243
|
label: string;
|
@@ -333,6 +336,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
333
336
|
type: PropType<AnyObject[]>;
|
334
337
|
default: () => never[];
|
335
338
|
};
|
339
|
+
primaryKey: {
|
340
|
+
type: StringConstructor;
|
341
|
+
default: string;
|
342
|
+
};
|
343
|
+
titleRender: {
|
344
|
+
type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
|
345
|
+
};
|
336
346
|
}>> & {
|
337
347
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
338
348
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -346,10 +356,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
346
356
|
isMultiple: (field: string) => boolean;
|
347
357
|
isRender: (field: string) => boolean;
|
348
358
|
isShow: (field: string) => any;
|
359
|
+
showRelation: (field: string) => boolean;
|
349
360
|
getSortPriorityOptions: () => {
|
350
361
|
label: string;
|
351
362
|
value: number;
|
352
363
|
}[];
|
364
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
353
365
|
selectProps: (field: string) => {
|
354
366
|
valueField: string;
|
355
367
|
labelField: string;
|
@@ -367,12 +379,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
367
379
|
NIcon: any;
|
368
380
|
NColorPicker: any;
|
369
381
|
NPopconfirm: any;
|
382
|
+
NPopover: any;
|
383
|
+
NSpace: any;
|
370
384
|
setStyle: typeof setStyle;
|
371
385
|
setColorInfo: typeof setColorInfo;
|
372
386
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
373
387
|
TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
374
388
|
CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
375
389
|
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
390
|
+
CaretDownOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
376
391
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
377
392
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
378
393
|
element: {
|
@@ -458,6 +473,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
458
473
|
type: PropType<AnyObject[]>;
|
459
474
|
default: () => never[];
|
460
475
|
};
|
476
|
+
primaryKey: {
|
477
|
+
type: StringConstructor;
|
478
|
+
default: string;
|
479
|
+
};
|
480
|
+
titleRender: {
|
481
|
+
type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
|
482
|
+
};
|
461
483
|
}>> & {
|
462
484
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
463
485
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -480,6 +502,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
480
502
|
requiredDisable: boolean;
|
481
503
|
hide: boolean;
|
482
504
|
}>[];
|
505
|
+
primaryKey: string;
|
483
506
|
index: number;
|
484
507
|
columns: FieldSetColumnItem[];
|
485
508
|
element: Partial<{
|
@@ -37,9 +37,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
37
37
|
disabledAll?: boolean | undefined;
|
38
38
|
isHeadCheckHide?: boolean | undefined;
|
39
39
|
isShow?: boolean | undefined;
|
40
|
-
contentRender?: ((column: AnyObject, row: AnyObject) =>
|
41
|
-
[key: string]: any;
|
42
|
-
}>) | undefined;
|
40
|
+
contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
|
43
41
|
}[]>;
|
44
42
|
data: import("vue").Ref<{
|
45
43
|
[x: string]: any;
|
@@ -64,9 +62,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
64
62
|
disabledAll?: boolean | undefined;
|
65
63
|
isHeadCheckHide?: boolean | undefined;
|
66
64
|
isShow?: boolean | undefined;
|
67
|
-
contentRender?: ((column: AnyObject, row: AnyObject) =>
|
68
|
-
[key: string]: any;
|
69
|
-
}>) | undefined;
|
65
|
+
contentRender?: ((column: AnyObject, row: AnyObject) => import("vue").VNodeChild) | undefined;
|
70
66
|
}[];
|
71
67
|
data: {
|
72
68
|
[x: string]: any;
|
@@ -257,6 +253,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
257
253
|
type: PropType<AnyObject[]>;
|
258
254
|
default: () => never[];
|
259
255
|
};
|
256
|
+
primaryKey: {
|
257
|
+
type: StringConstructor;
|
258
|
+
default: string;
|
259
|
+
};
|
260
|
+
titleRender: {
|
261
|
+
type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
|
262
|
+
};
|
260
263
|
}, {
|
261
264
|
fixedWayOptions: {
|
262
265
|
label: string;
|
@@ -355,6 +358,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
355
358
|
type: PropType<AnyObject[]>;
|
356
359
|
default: () => never[];
|
357
360
|
};
|
361
|
+
primaryKey: {
|
362
|
+
type: StringConstructor;
|
363
|
+
default: string;
|
364
|
+
};
|
365
|
+
titleRender: {
|
366
|
+
type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
|
367
|
+
};
|
358
368
|
}>> & {
|
359
369
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
360
370
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -368,10 +378,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
368
378
|
isMultiple: (field: string) => boolean;
|
369
379
|
isRender: (field: string) => boolean;
|
370
380
|
isShow: (field: string) => any;
|
381
|
+
showRelation: (field: string) => boolean;
|
371
382
|
getSortPriorityOptions: () => {
|
372
383
|
label: string;
|
373
384
|
value: number;
|
374
385
|
}[];
|
386
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
375
387
|
selectProps: (field: string) => {
|
376
388
|
valueField: string;
|
377
389
|
labelField: string;
|
@@ -389,12 +401,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
389
401
|
NIcon: any;
|
390
402
|
NColorPicker: any;
|
391
403
|
NPopconfirm: any;
|
404
|
+
NPopover: any;
|
405
|
+
NSpace: any;
|
392
406
|
setStyle: typeof setStyle;
|
393
407
|
setColorInfo: typeof import("./utils").setColorInfo;
|
394
408
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
395
409
|
TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
396
410
|
CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
397
411
|
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
412
|
+
CaretDownOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
398
413
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
399
414
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
400
415
|
element: {
|
@@ -480,6 +495,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
480
495
|
type: PropType<AnyObject[]>;
|
481
496
|
default: () => never[];
|
482
497
|
};
|
498
|
+
primaryKey: {
|
499
|
+
type: StringConstructor;
|
500
|
+
default: string;
|
501
|
+
};
|
502
|
+
titleRender: {
|
503
|
+
type: PropType<(row: AnyObject) => import("vue").VNodeChild>;
|
504
|
+
};
|
483
505
|
}>> & {
|
484
506
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
485
507
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -502,6 +524,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
502
524
|
requiredDisable: boolean;
|
503
525
|
hide: boolean;
|
504
526
|
}>[];
|
527
|
+
primaryKey: string;
|
505
528
|
index: number;
|
506
529
|
columns: FieldSetColumnItem[];
|
507
530
|
element: Partial<{
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PropType } from 'vue';
|
1
|
+
import { PropType, VNodeChild } from 'vue';
|
2
2
|
import { setStyle, isDraggableItem } from './utils';
|
3
3
|
import { FieldSetItem, FieldSetColumnName, FieldSetColumnItem } from '../../../components/field-set/src/types';
|
4
4
|
import { AnyObject } from '../../../shared/types';
|
@@ -79,18 +79,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
79
|
columnWidthProps: {
|
80
80
|
type: ObjectConstructor;
|
81
81
|
};
|
82
|
-
|
83
|
-
type:
|
82
|
+
hideExpressionConfig: {
|
83
|
+
type: PropType<{
|
84
|
+
show: boolean;
|
85
|
+
option: AnyObject[];
|
86
|
+
}>;
|
84
87
|
};
|
85
|
-
|
86
|
-
type:
|
87
|
-
default:
|
88
|
+
primaryKey: {
|
89
|
+
type: StringConstructor;
|
90
|
+
default: string;
|
91
|
+
};
|
92
|
+
titleRender: {
|
93
|
+
type: PropType<(row: FieldSetItem) => VNodeChild>;
|
88
94
|
};
|
89
95
|
}, {
|
90
96
|
fieldsMapping: Record<string, string>;
|
91
|
-
attrs: {
|
92
|
-
[x: string]: unknown;
|
93
|
-
};
|
94
97
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
95
98
|
fields: {
|
96
99
|
type: PropType<Partial<{
|
@@ -168,12 +171,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
168
171
|
columnWidthProps: {
|
169
172
|
type: ObjectConstructor;
|
170
173
|
};
|
171
|
-
|
172
|
-
type:
|
174
|
+
hideExpressionConfig: {
|
175
|
+
type: PropType<{
|
176
|
+
show: boolean;
|
177
|
+
option: AnyObject[];
|
178
|
+
}>;
|
173
179
|
};
|
174
|
-
|
175
|
-
type:
|
176
|
-
default:
|
180
|
+
primaryKey: {
|
181
|
+
type: StringConstructor;
|
182
|
+
default: string;
|
183
|
+
};
|
184
|
+
titleRender: {
|
185
|
+
type: PropType<(row: FieldSetItem) => VNodeChild>;
|
177
186
|
};
|
178
187
|
}>> & {
|
179
188
|
onSave?: ((...args: any[]) => any) | undefined;
|
@@ -186,6 +195,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
186
195
|
tableBodyRef: import("vue").Ref<HTMLDivElement | undefined>;
|
187
196
|
newFields: import("vue").Ref<AnyObject[]>;
|
188
197
|
defaultColumns: FieldSetColumnItem[];
|
198
|
+
otherColumns: FieldSetColumnItem[];
|
189
199
|
columns: import("vue").Ref<{
|
190
200
|
[x: string]: any;
|
191
201
|
title: string;
|
@@ -195,9 +205,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
195
205
|
disabledAll?: boolean | undefined;
|
196
206
|
isHeadCheckHide?: boolean | undefined;
|
197
207
|
isShow?: boolean | undefined;
|
198
|
-
contentRender?: ((column: AnyObject, row: AnyObject) =>
|
199
|
-
[key: string]: any;
|
200
|
-
}>) | undefined;
|
208
|
+
contentRender?: ((column: AnyObject, row: AnyObject) => VNodeChild) | undefined;
|
201
209
|
}[]>;
|
202
210
|
fieldList: import("vue").ComputedRef<AnyObject[]>;
|
203
211
|
hasFieldDescribe: import("vue").ComputedRef<boolean>;
|
@@ -211,9 +219,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
211
219
|
disabledAll?: boolean | undefined;
|
212
220
|
isHeadCheckHide?: boolean | undefined;
|
213
221
|
isShow?: boolean | undefined;
|
214
|
-
contentRender?: ((column: AnyObject, row: AnyObject) =>
|
215
|
-
[key: string]: any;
|
216
|
-
}>) | undefined;
|
222
|
+
contentRender?: ((column: AnyObject, row: AnyObject) => VNodeChild) | undefined;
|
217
223
|
}[];
|
218
224
|
data: AnyObject[];
|
219
225
|
onUpdateChecked: ({ checked, column }: {
|
@@ -225,7 +231,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
225
231
|
fieldDescribeMode: "column" | "tooltip";
|
226
232
|
developMode: boolean;
|
227
233
|
columnWidthProps: Record<string, any> | undefined;
|
228
|
-
hideExpressionOption: AnyObject[];
|
234
|
+
hideExpressionOption: AnyObject[] | never[];
|
235
|
+
primaryKey: string;
|
236
|
+
titleRender: ((row: FieldSetItem) => VNodeChild) | undefined;
|
229
237
|
};
|
230
238
|
searchData: {
|
231
239
|
keyword: string;
|
@@ -412,6 +420,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
412
420
|
type: PropType<AnyObject[]>;
|
413
421
|
default: () => never[];
|
414
422
|
};
|
423
|
+
primaryKey: {
|
424
|
+
type: StringConstructor;
|
425
|
+
default: string;
|
426
|
+
};
|
427
|
+
titleRender: {
|
428
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
429
|
+
};
|
415
430
|
}, {
|
416
431
|
fixedWayOptions: {
|
417
432
|
label: string;
|
@@ -510,6 +525,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
510
525
|
type: PropType<AnyObject[]>;
|
511
526
|
default: () => never[];
|
512
527
|
};
|
528
|
+
primaryKey: {
|
529
|
+
type: StringConstructor;
|
530
|
+
default: string;
|
531
|
+
};
|
532
|
+
titleRender: {
|
533
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
534
|
+
};
|
513
535
|
}>> & {
|
514
536
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
515
537
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -523,10 +545,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
523
545
|
isMultiple: (field: string) => boolean;
|
524
546
|
isRender: (field: string) => boolean;
|
525
547
|
isShow: (field: string) => any;
|
548
|
+
showRelation: (field: string) => boolean;
|
526
549
|
getSortPriorityOptions: () => {
|
527
550
|
label: string;
|
528
551
|
value: number;
|
529
552
|
}[];
|
553
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
530
554
|
selectProps: (field: string) => {
|
531
555
|
valueField: string;
|
532
556
|
labelField: string;
|
@@ -544,12 +568,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
544
568
|
NIcon: any;
|
545
569
|
NColorPicker: any;
|
546
570
|
NPopconfirm: any;
|
571
|
+
NPopover: any;
|
572
|
+
NSpace: any;
|
547
573
|
setStyle: typeof setStyle;
|
548
574
|
setColorInfo: typeof import("./utils").setColorInfo;
|
549
575
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
550
576
|
TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
551
577
|
CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
552
578
|
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
579
|
+
CaretDownOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
553
580
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
554
581
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
555
582
|
element: {
|
@@ -635,6 +662,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
635
662
|
type: PropType<AnyObject[]>;
|
636
663
|
default: () => never[];
|
637
664
|
};
|
665
|
+
primaryKey: {
|
666
|
+
type: StringConstructor;
|
667
|
+
default: string;
|
668
|
+
};
|
669
|
+
titleRender: {
|
670
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
671
|
+
};
|
638
672
|
}>> & {
|
639
673
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
640
674
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -657,6 +691,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
657
691
|
requiredDisable: boolean;
|
658
692
|
hide: boolean;
|
659
693
|
}>[];
|
694
|
+
primaryKey: string;
|
660
695
|
index: number;
|
661
696
|
columns: FieldSetColumnItem[];
|
662
697
|
element: Partial<{
|
@@ -770,18 +805,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
770
805
|
columnWidthProps: {
|
771
806
|
type: ObjectConstructor;
|
772
807
|
};
|
773
|
-
|
774
|
-
type:
|
808
|
+
hideExpressionConfig: {
|
809
|
+
type: PropType<{
|
810
|
+
show: boolean;
|
811
|
+
option: AnyObject[];
|
812
|
+
}>;
|
775
813
|
};
|
776
|
-
|
777
|
-
type:
|
778
|
-
default:
|
814
|
+
primaryKey: {
|
815
|
+
type: StringConstructor;
|
816
|
+
default: string;
|
817
|
+
};
|
818
|
+
titleRender: {
|
819
|
+
type: PropType<(row: FieldSetItem) => VNodeChild>;
|
779
820
|
};
|
780
821
|
}>> & {
|
781
822
|
onSave?: ((...args: any[]) => any) | undefined;
|
782
823
|
onClose?: ((...args: any[]) => any) | undefined;
|
783
824
|
onReset?: ((...args: any[]) => any) | undefined;
|
784
825
|
}, {
|
826
|
+
primaryKey: string;
|
785
827
|
type: string;
|
786
828
|
isEdit: boolean;
|
787
829
|
fields: Partial<{
|
@@ -807,11 +849,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
807
849
|
developMode: boolean;
|
808
850
|
footerFlag: boolean;
|
809
851
|
fieldDescribeMode: "column" | "tooltip";
|
810
|
-
hideExpressionOption: AnyObject[];
|
811
852
|
showSearch: boolean;
|
812
853
|
customColumns: FieldSetColumnItem[];
|
813
854
|
showSortPriority: boolean;
|
814
855
|
showHeadFilter: boolean;
|
815
|
-
showHideExpression: boolean;
|
816
856
|
}>;
|
817
857
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,
|
1
|
+
import{defineComponent as e,ref as l,computed as i,reactive as t,toRef as o,watch as d,openBlock as a,createElementBlock as r,createBlock as n,unref as s,withKeys as u,withModifiers as c,createCommentVNode as f,createElementVNode as h,Fragment as p,renderList as m,normalizeStyle as y,withCtx as v,createTextVNode as b,toDisplayString as g,createVNode as x,normalizeClass as k,mergeProps as w,renderSlot as S}from"vue";import{NInput as C,NCheckbox as A,NTooltip as _,NIcon as W,NPopconfirm as E,NButton as H}from"naive-ui";import D from"../../../shared/components/VueDraggable/src/vuedraggable.js";import F from"./components/table-row.vue.js";import{isArray as M,cloneDeep as P,isString as N,omit as R}from"lodash-es";import{isDisable as j,setStyle as B,isDraggableItem as V,isDraggable as O,getGroupTree as q}from"./utils/index.js";import{uuidGenerator as I}from"../../../shared/utils/index.js";import{HelpCircleSharp as K}from"@vicons/ionicons5";const U={class:"main-wrapper"},T={class:"main-wrapper__table-header"},L=h("span",null,"数值越小,优先级越高",-1),G=["tabindex"],$={key:1,class:"main-wrapper__table-footer"};var z=e({__name:"FieldSet",props:{fields:{type:Array,default:()=>[]},footerFlag:{type:Boolean,default:!0},type:{type:String,default:"old"},isEdit:{type:Boolean,default:!1},showColumnNames:{type:Array},groupSetting:{type:Object},customColumns:{type:Array,default:()=>[]},showSeq:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!1},showSortPriority:{type:Boolean,default:!1},showHeadFilter:{type:Boolean,default:!1},fieldShowMaxValue:{type:Number},rowDraggable:{type:Boolean,default:!0},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionConfig:{type:Object},primaryKey:{type:String,default:"id"},titleRender:{type:Function}},emits:["save","close","reset"],setup(e,{expose:z,emit:J}){const Q=e,X={sid:"id",columnName:"name",isShow:"show",isSort:"sort",isFixed:"fixedWay",colWidth:"columnWidth"},Y=l(Date.now()),Z=l(""),ee=l(),le=l([]),ie=[{title:"所有字段",type:"text",field:"title"},{title:"显示",type:"checkbox",checkedAll:!1,disabledAll:!!Q.fieldShowMaxValue,field:"show",fieldShowMaxValue:Q.fieldShowMaxValue},{title:"编辑",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"editable"},{title:"必填",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"required"},{title:"排序",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"sort"},{title:"加粗",type:"checkbox",checkedAll:!1,disabledAll:!1,field:"bold"},{title:"默认排序",type:"select",field:"sortDirection"},{title:"排序优先级",type:"select",field:"sortPriority"},{title:"固定",type:"select",field:"fixedWay"},{title:"自定义标题",type:"input",field:"alias"},{title:"列宽",type:"inputNumber",field:"columnWidth"},{title:"表头筛选",type:"checkbox",isHeadCheckHide:!0,field:"isShowHeaderFilter"},{title:"脱敏配置",type:"select",field:"hideExpression"}],te=[{title:"搜索",type:"checkbox",isHeadCheckHide:!0,field:"isSearch"},{title:"求和",type:"checkbox",isHeadCheckHide:!0,field:"isSum"},{title:"平均值",type:"checkbox",isHeadCheckHide:!0,field:"isAvg"}],oe=l([]),de=i((()=>le.value.flat())),ae=i((()=>de.value.some((e=>e.feildDescribe)))),re=t({columns:oe,data:de,onUpdateChecked:function({checked:e,column:l}){const i=!e||ye(l.field);l.checkedAll=!i},draggable:Q.rowDraggable,isFieldSet:!0,fieldDescribeMode:Q.fieldDescribeMode,developMode:Q.developMode,columnWidthProps:Q.columnWidthProps,hideExpressionOption:o(Q.hideExpressionConfig||{option:[]},"option"),primaryKey:o(Q,"primaryKey"),titleRender:Q.titleRender}),ne={keyword:Z.value,idx:0,startIdx:0},se=()=>{J("save")},ue=()=>{J("close")};function ce(){le.value=fe(),me(),Y.value=Date.now(),J("reset")}function fe(){const e=P(Q.fields).map((e=>({...e,uuid:I()})));return Object.keys(X).forEach((l=>{e.forEach((e=>{var i;"old"==Q.type&&Reflect.has(e,l)&&("isFixed"==l?e.fixedWay=1==e[l]?"LEFT":2==e[l]?"RIGHT":"NONE":["isShow","isSort"].includes(l)&&"boolean"!=typeof l?e[X[l]]=1==e[l]:e[X[l]]=e[l],Reflect.deleteProperty(e,l)),e.columnWidth=+e.columnWidth||null,Reflect.has(e,"alias")||(e.alias=""),Reflect.has(e,"bold")||(e.bold=!1),e.draggable=!!O(e),M(null==(i=e.relation)?void 0:i.fieldList)&&e.relation.fieldList.forEach((e=>{1==e.isSearch&&(e.checked=!0)}))}))})),function(e){if(Q.groupSetting){return q(Q.groupSetting,e).reduce(((i,t)=>{const o=N(t)?e.find((e=>e.name===t)):l(t.children);return o&&i.push(o),i}),[])}return e;function l(i){const t=[];return i.forEach((i=>{if(i.children)t.push(...l(i.children));else{const l=e.find((e=>e.name===i));l&&t.push(l)}})),t}}(e)}function he(){const e=ne.keyword!==Z.value;let l=Z.value?de.value.findIndex(((l,i)=>{var t;if(null==(t=l.title)?void 0:t.includes(Z.value))return!!e||i>ne.idx})):0;-1!==l||e||(l=ne.startIdx),ee.value.scrollTop=52*l,Object.assign(ne,{keyword:Z.value,idx:l},e?{startIdx:l}:{})}function pe(e){var l;return!!Z.value&&(null==(l=e.title)?void 0:l.includes(Z.value))}function me(){var e,l;oe.value=P(ie),(null==(e=Q.showColumnNames)?void 0:e.length)&&(oe.value=ie.concat(te).filter((e=>{var l,i;return"title"===e.field||(null==(i=null==(l=Q.showColumnNames)?void 0:l.includes)?void 0:i.call(l,e.field))}))),(null==(l=Q.customColumns)?void 0:l.length)&&oe.value.push(...Q.customColumns),"column"===Q.fieldDescribeMode&&ae.value&&oe.value.push({title:"字段描述",type:"text",field:"feildDescribe"}),Q.showSeq&&oe.value.splice(1,0,{title:"排序",type:"text",field:"seq"}),oe.value.forEach((e=>{if(e.isShow=function(e){var l,i;if(!(null==(l=Q.showColumnNames)?void 0:l.length)&&(["editable","required"].includes(e.field)&&!Q.isEdit||"sortPriority"===e.field&&!Q.showSortPriority||"isShowHeaderFilter"===e.field&&!Q.showHeadFilter||"hideExpression"===e.field&&!(null==(i=Q.hideExpressionConfig)?void 0:i.show)))return!1;return!0}(e),"checkbox"===e.type){const l=le.value.flat().every((l=>!Reflect.has(l,e.field)));e.checkedAll=!ye(e.field)&&!l}}))}function ye(e){return le.value.flat().some((l=>!j(l,e)&&!l[e]&&"0001"!=l.id))}function ve(e){return!!V(e.relatedContext.element)}return d([()=>Q.fields,()=>{var e;return null==(e=Q.showColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(le.value=fe(),me())}),{immediate:!0,deep:!0}),z({getTableFields:function(){let e=[];return e="old"==Q.type?de.value.map(((e,l)=>R({...e,field:e.name,visible:e.show,sequence:l,sortable:e.sort,title:e.alias,fixed:e.fixedWay,minWidth:e.columnWidth},["name","show","sort","alias","fixedWay","columnWidth"]))):de.value,e.map((e=>R(e,["uuid"])))}}),(l,i)=>(a(),r("div",U,[e.showSearch?(a(),n(s(C),{key:0,class:"main-wrapper__search-wrapper",value:Z.value,"onUpdate:value":i[0]||(i[0]=e=>Z.value=e),valueModifiers:{trim:!0},placeholder:"请输入字段标题",onKeydown:u(c(he,["prevent"]),["enter"])},null,8,["value","onKeydown"])):f("v-if",!0),h("div",T,[(a(!0),r(p,null,m(oe.value,((l,i)=>(a(),r(p,{key:i},[l.isShow?(a(),r("span",{key:0,class:"table-cell",style:y(s(B)(l,i,e.columnWidthProps))},["checkbox"!==l.type||l.isHeadCheckHide?(a(),r(p,{key:1},[b(g(l.title),1)],64)):(a(),n(s(A),{key:0,checked:l.checkedAll,"onUpdate:checked":[e=>l.checkedAll=e,e=>{return i=e,t=l.field,void de.value.forEach((e=>{j(e,t)||(e[t]=i)}));var i,t}],disabled:l.disabledAll},{default:v((()=>[b(g(l.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"])),"sortPriority"===l.field?(a(),n(s(_),{key:2,trigger:"hover"},{trigger:v((()=>[x(s(W),{component:s(K),style:{top:"2px"}},null,8,["component"])])),default:v((()=>[L])),_:1})):f("v-if",!0)],4)):f("v-if",!0)],64)))),128))]),h("div",{class:"main-wrapper__table-body",ref_key:"tableBodyRef",ref:ee},[(a(),n(s(D),{modelValue:le.value,"onUpdate:modelValue":i[1]||(i[1]=e=>le.value=e),animation:"150","item-key":"id",filter:".disabled",draggable:".item",move:ve,disabled:!e.rowDraggable,key:Y.value},{item:v((({element:e,index:l})=>[e.hide?f("v-if",!0):(a(),r("div",{key:0,class:k(["item",s(V)(e)?"":"disabled"]),tabindex:l},[s(M)(e)?(a(!0),r(p,{key:0},m(e,((e,i)=>(a(),n(F,w(re,{key:i,element:e,idx:l+1,"is-highlight":pe(e)}),null,16,["element","idx","is-highlight"])))),128)):(a(),n(F,w({key:1},re,{element:e,idx:l+1,"is-highlight":pe(e)}),null,16,["element","idx","is-highlight"]))],10,G))])),_:1},8,["modelValue","disabled"]))],512),e.footerFlag?(a(),r("div",$,[f(" 底部按钮插槽 "),S(l.$slots,"footer",{},(()=>[x(s(E),{onPositiveClick:ce},{trigger:v((()=>[x(s(H),{style:{"margin-right":"8px"}},{default:v((()=>[b("恢复默认设置")])),_:1})])),default:v((()=>[b(" 确认要恢复系统默认设置吗? ")])),_:1}),x(s(H),{style:{"margin-right":"8px"},onClick:ue},{default:v((()=>[b("取消")])),_:1}),x(s(H),{type:"primary",onClick:se},{default:v((()=>[b("保存")])),_:1})]))])):f("v-if",!0)]))}});export{z as default};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PropType, CSSProperties } from 'vue';
|
1
|
+
import { PropType, CSSProperties, VNodeChild } from 'vue';
|
2
2
|
import { AnyObject } from '../../../../shared/types';
|
3
3
|
import { FieldSetColumnItem } from '../../../../components/field-set';
|
4
4
|
import { setStyle, setColorInfo } from '../utils';
|
@@ -86,6 +86,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
86
86
|
type: PropType<AnyObject[]>;
|
87
87
|
default: () => never[];
|
88
88
|
};
|
89
|
+
primaryKey: {
|
90
|
+
type: StringConstructor;
|
91
|
+
default: string;
|
92
|
+
};
|
93
|
+
titleRender: {
|
94
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
95
|
+
};
|
89
96
|
}, {
|
90
97
|
fixedWayOptions: {
|
91
98
|
label: string;
|
@@ -184,6 +191,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
184
191
|
type: PropType<AnyObject[]>;
|
185
192
|
default: () => never[];
|
186
193
|
};
|
194
|
+
primaryKey: {
|
195
|
+
type: StringConstructor;
|
196
|
+
default: string;
|
197
|
+
};
|
198
|
+
titleRender: {
|
199
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
200
|
+
};
|
187
201
|
}>> & {
|
188
202
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
189
203
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -197,10 +211,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
197
211
|
isMultiple: (field: string) => boolean;
|
198
212
|
isRender: (field: string) => boolean;
|
199
213
|
isShow: (field: string) => any;
|
214
|
+
showRelation: (field: string) => boolean;
|
200
215
|
getSortPriorityOptions: () => {
|
201
216
|
label: string;
|
202
217
|
value: number;
|
203
218
|
}[];
|
219
|
+
getSelectText: (field: string) => "密码无需设置" | "主键不可设置" | "不支持脱敏设置" | undefined;
|
204
220
|
selectProps: (field: string) => {
|
205
221
|
valueField: string;
|
206
222
|
labelField: string;
|
@@ -218,12 +234,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
218
234
|
NIcon: any;
|
219
235
|
NColorPicker: any;
|
220
236
|
NPopconfirm: any;
|
237
|
+
NPopover: any;
|
238
|
+
NSpace: any;
|
221
239
|
setStyle: typeof setStyle;
|
222
240
|
setColorInfo: typeof setColorInfo;
|
223
241
|
ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
224
242
|
TrashOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
225
243
|
CreateOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
226
244
|
HelpCircleOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
245
|
+
CaretDownOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
227
246
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
228
247
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
229
248
|
element: {
|
@@ -309,6 +328,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
309
328
|
type: PropType<AnyObject[]>;
|
310
329
|
default: () => never[];
|
311
330
|
};
|
331
|
+
primaryKey: {
|
332
|
+
type: StringConstructor;
|
333
|
+
default: string;
|
334
|
+
};
|
335
|
+
titleRender: {
|
336
|
+
type: PropType<(row: AnyObject) => VNodeChild>;
|
337
|
+
};
|
312
338
|
}>> & {
|
313
339
|
onUpdateChecked?: ((...args: any[]) => any) | undefined;
|
314
340
|
onEdit?: ((...args: any[]) => any) | undefined;
|
@@ -331,6 +357,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
331
357
|
requiredDisable: boolean;
|
332
358
|
hide: boolean;
|
333
359
|
}>[];
|
360
|
+
primaryKey: string;
|
334
361
|
index: number;
|
335
362
|
columns: FieldSetColumnItem[];
|
336
363
|
element: Partial<{
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,openBlock as
|
1
|
+
import{defineComponent as e,openBlock as t,createElementBlock as l,Fragment as i,renderList as n,normalizeStyle as r,unref as a,createBlock as o,withCtx as d,createVNode as u,createCommentVNode as s,createElementVNode as c,toDisplayString as f,resolveDynamicComponent as p,normalizeClass as m,withDirectives as v,vShow as y,mergeProps as h,createTextVNode as g}from"vue";import{NTooltip as b,NIcon as k,NCheckbox as x,NPopover as E,NSpace as S,NSelect as D,NColorPicker as w,NInput as T,NInputNumber as O,NPopconfirm as R}from"naive-ui";import{setStyle as M,setColorInfo as N,isShowExplicitRequired as U,isDisable as P}from"../utils/index.js";import{ReorderTwoOutline as _,HelpCircleOutline as j,CaretDownOutline as A,CreateOutline as C,TrashOutline as F}from"@vicons/ionicons5";import{isFunction as L,isArray as H,range as I}from"lodash-es";import{COLOR_MAP as B}from"../constants/index.js";import{WIDGET_TYPE as V,SELECT_MAP as W,WIDGET_MAP as q,SELECT_TYPE as K,SELECT_DEFAULT_MAP as $,DATE_MAP as z,DATETIME_MAP as G}from"../constants/filter.js";const J={class:"row"},Q=["title"],X=c("span",null,"拖拽调整顺序",-1),Y={key:0};var Z=e({__name:"table-row",props:{element:{type:Object,default:()=>({})},columns:{type:Array,default:()=>[]},idx:{type:Number,default:1},data:{type:Array,default:()=>[]},isHighlight:{type:Boolean},index:{type:Number,default:0},isHighlightRow:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},isFieldSet:{type:Boolean,default:!1},fieldDescribeMode:{type:String,default:"tooltip"},developMode:{type:Boolean},columnWidthProps:{type:Object},hideExpressionOption:{type:Array,default:()=>[]},primaryKey:{type:String,default:"id"},titleRender:{type:Function}},emits:["updateChecked","edit"],setup(e,{emit:Z}){const ee=e,te=[{label:"不固定",value:"NONE"},{label:"左固定",value:"LEFT"},{label:"右固定",value:"RIGHT"}],le=[{label:"不排序",value:"NONE"},{label:"升序",value:"ASC"},{label:"降序",value:"DESC"}],ie=[{label:"字体",value:"font"},{label:"背景",value:"background"}],ne=Object.entries(B).map((([e])=>e));function re(){ee.data.splice(ee.index,1)}function ae(){Z("edit",ee.element)}function oe(){var e;return ee.element.feildDescribe||(null==(e=ee.element.settingObj)?void 0:e.fieldDescDev)}function de(e){return"seq"===e?ee.idx:"optionType"===e?ee.element[e]&&ee.element.type===V.SELECT?W[ee.element[e]]:"":"type"===e?q[ee.element[e]]:ee.element[e]}function ue(e){if("defaultValue"===e){const{optionType:e}=ee.element;return e===K.SELECT_MULTIPLE}return!1}function se(e){if("0001"==ee.element.id&&"fixedWay"!=e)return!1;const{isConfiguredHeaderFilter:t}=ee.element;return"isShowHeaderFilter"===e?!!t:!(["explicitRequired","defaultValue"].includes(e)&&![V.DATE,V.DATETIME,V.SELECT].includes(ee.element.type)||["editable"].includes(e)&&ee.element[`${e}Hide`])}function ce(e){return["explicitRequired","defaultValue"].includes(e)?U(ee.element):!["isSum","isAvg"].includes(e)||"NUMBER"===ee.element.fieldType}function fe(e){const{relation:t}=ee.element;return"isSearch"===e&&H(null==t?void 0:t.fieldList)&&t.fieldList.length>0}function pe(e){if("hideExpression"===e)return"PASSWORD"===ee.element.attrType?"密码无需设置":ee.element.name===ee.primaryKey||ee.element.columnName===ee.primaryKey?"主键不可设置":ee.element.disableDesensitization||ee.element[`${e}Disabled`]?"不支持脱敏设置":void 0}function me(e){const t={valueField:"value",labelField:"label"};return"hideExpression"===e&&(t.valueField="ruleId",t.labelField="name"),t}function ve(e){var t;switch(e.field){case"fixedWay":return te;case"sortDirection":return le;case"sortPriority":return function(){const e=I(1,ee.data.length+1).map((e=>({label:e.toString(),value:e}))),t=ee.data.filter((e=>!!e.sortPriority&&e.uuid!==ee.element.uuid)).map((e=>e.sortPriority));return e.filter((e=>!t.includes(e.value)))}();case"colorScope":return ie;case"hideExpression":return null==(t=ee.hideExpressionOption)?void 0:t.map((e=>({...e,ruleId:`ruleId#${e.code}`})));case"defaultValue":{const{type:e,optionInfo:t}=ee.element;return e===V.SELECT?H(null==t?void 0:t.list)&&t.list.length>0?t.list.map((e=>({...e,label:e.name}))):Object.entries($).map((([e,t])=>({value:e,label:t}))):e===V.DATE?Object.entries(z).map((([e,t])=>({value:e,label:t}))):e===V.DATETIME?Object.entries(G).map((([e,t])=>({value:e,label:t}))):[]}default:return[]}}function ye(e){var t;if(1==ee.element.defaultMark||"color"===e.type&&ee.isHighlightRow)return!0;if("checkbox"===e.type){if("show"===e.field&&e.fieldShowMaxValue)return!ee.element[e.field]&&(null==(t=ee.data.filter((t=>t[e.field])))?void 0:t.length)===e.fieldShowMaxValue;if(["isSearch","isSum","isAvg"].includes(e.field)){if(Reflect.has(ee.element,"isMerge"))return 1==ee.element.isMerge;if("isSearch"===e.field&&Reflect.has(ee.element,"notParticipatingSearch"))return 1==ee.element.notParticipatingSearch}return P(ee.element,e.field)}if("sortPriority"===e.field){const{sortDirection:e}=ee.element;return!e||"NONE"===e}return P(ee.element,e.field)}function he(e){return["title","result"].includes(e.field)&&ee.element.style||{}}return(U,P)=>(t(),l("div",J,[(t(!0),l(i,null,n(e.columns,((U,H)=>{return t(),l(i,{key:H},[U.isShow?(t(),l("span",{key:0,class:"table-cell",title:e.element[U.field],style:r(a(M)(U,H,e.columnWidthProps))},["text"===U.type?(t(),l(i,{key:0},[0===H?(t(),l(i,{key:0},[!e.isFieldSet||e.draggable&&e.isFieldSet?(t(),o(a(b),{key:0,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(_)},null,8,["component"])])),default:d((()=>[X])),_:1})):s("v-if",!0),(I=U.field,"title"===I&&("tooltip"===ee.fieldDescribeMode&&ee.element.feildDescribe||ee.developMode&&(null==(B=ee.element.settingObj)?void 0:B.fieldDescDev))?(t(),o(a(b),{key:1,trigger:"hover"},{trigger:d((()=>[u(a(k),{style:{"margin-right":"5px",top:"2px"},component:a(j)},null,8,["component"])])),default:d((()=>[c("span",null,f(oe()),1)])),_:1})):s("v-if",!0)),a(L)(e.titleRender)?(t(),o(p((()=>e.titleRender(e.element))),{key:2})):s("v-if",!0)],64)):s("v-if",!0),0===H&&a(L)(e.titleRender)?s("v-if",!0):(t(),l("span",{key:1,class:m([e.isHighlight&&"title"===U.field?"highlight":""]),style:r(he(U))},f(de(U.field)),7))],64)):s("v-if",!0),"checkbox"===U.type&&se(U.field)?(t(),l(i,{key:1},[v(u(a(x),{disabled:ye(U),checked:e.element[U.field],"onUpdate:checked":[t=>e.element[U.field]=t,e=>function(e,t){Z("updateChecked",{checked:e,column:t})}(e,U)]},null,8,["disabled","checked","onUpdate:checked"]),[[y,ce(U.field)]]),fe(U.field)?(t(),o(a(E),{key:0,placement:"right-start","show-arrow":!1},{trigger:d((()=>[u(a(k),{style:{"margin-left":"5px",top:"2px"},component:a(A)},null,8,["component"])])),default:d((()=>[c("div",null,[c("span",null,f(e.element.relation.tableName),1),u(a(S),{"wrap-item":!1,vertical:""},{default:d((()=>[(t(!0),l(i,null,n(e.element.relation.fieldList,(e=>v((t(),o(a(x),{key:e.id,checked:e.checked,"onUpdate:checked":t=>e.checked=t,label:e.title},null,8,["checked","onUpdate:checked","label"])),[[y,"0001"!==e.sid]]))),128))])),_:1})])])),_:1})):s("v-if",!0)],64)):s("v-if",!0),"select"===U.type&&se(U.field)?(t(),l(i,{key:2},[pe(U.field)?(t(),l("span",Y,f(pe(U.field)),1)):v((t(),o(a(D),h({key:1},me(U.field),{clearable:"",multiple:ue(U.field),disabled:ye(U),value:e.element[U.field],"onUpdate:value":[t=>e.element[U.field]=t,e=>function(e,t){"sortDirection"!==t.field||"NONE"!==e&&e||(ee.element.sortPriority=null),"colorScope"===t.field&&N(ee.element)}(e,U)],options:ve(U)}),null,16,["multiple","disabled","value","onUpdate:value","options"])),[[y,ce(U.field)]])],64)):s("v-if",!0),"color"===U.type?(t(),o(a(w),{key:3,class:"c-field-set__color-picker",clearable:"",disabled:ye(U),value:e.element[U.field],"onUpdate:value":[t=>e.element[U.field]=t,P[0]||(P[0]=t=>a(N)(e.element))],"show-preview":"",modes:["hex"],swatches:a(ne)},null,8,["disabled","value","onUpdate:value","swatches"])):s("v-if",!0),"input"===U.type?v((t(),o(a(T),{key:4,value:e.element[U.field],"onUpdate:value":t=>e.element[U.field]=t,clearable:""},null,8,["value","onUpdate:value"])),[[y,"0001"!=e.element.id]]):s("v-if",!0),"inputNumber"===U.type?(t(),o(a(O),{key:5,value:e.element[U.field],"onUpdate:value":t=>e.element[U.field]=t},null,8,["value","onUpdate:value"])):s("v-if",!0),"custom"===U.type&&a(L)(U.contentRender)?(t(),o(p((()=>U.contentRender(U,e.element))),{key:6})):s("v-if",!0),"custom"===U.type&&"opt"===U.field&&1!=e.element.defaultMark?(t(),l(i,{key:7},[u(a(b),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(C),onClick:ae},null,8,["component"])])),default:d((()=>[g(" 编辑 ")])),_:1}),u(a(R),{onPositiveClick:re},{trigger:d((()=>[u(a(b),{trigger:"hover"},{trigger:d((()=>[u(a(k),{component:a(F)},null,8,["component"])])),default:d((()=>[g(" 删除 ")])),_:1})])),default:d((()=>[g(" 是否确认删除? ")])),_:1})],64)):s("v-if",!0)],12,Q)):s("v-if",!0)],64);var I,B})),128))]))}});export{Z as default};
|