cnhis-design-vue 3.2.10-beta.1 → 3.2.10-beta.18
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/index.d.ts +2 -2
- package/es/components/ai-chat/src/Index.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +2 -2
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/base-search/index.d.ts +3 -0
- package/es/components/base-search/src/index.vue.d.ts +3 -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/src/utils/print.js +1 -1
- package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -1
- package/es/components/card-reader-sdk/src/utils/index.js +1 -1
- package/es/components/classification/index.d.ts +1 -1
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +1 -1
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/classification/src/index.vue.d.ts +1 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/field-set/index.d.ts +13 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +73 -27
- package/es/components/field-set/src/FieldColor.vue2.js +1 -1
- package/es/components/field-set/src/FieldFilter.vue.d.ts +20 -5
- package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +6 -3
- package/es/components/field-set/src/Index.vue.d.ts +13 -0
- package/es/components/field-set/src/Index.vue2.js +1 -1
- package/es/components/field-set/src/components/condition.vue.d.ts +18 -4
- package/es/components/field-set/src/components/condition.vue2.js +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +63 -22
- package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
- package/es/components/field-set/src/components/edit-filter.vue.d.ts +44 -44
- package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
- package/es/components/field-set/src/components/table-row.vue.d.ts +6 -3
- package/es/components/field-set/src/components/table-row.vue2.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +3 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +3 -3
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/components/renderer/combination/combination.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/combination/jsonCombination.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/combination/tableCombination.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/text.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/text.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
- package/es/components/form-render/src/types/index.d.ts +4 -3
- package/es/components/form-render/src/utils/index.d.ts +2 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/iho-chat/index.d.ts +8 -8
- package/es/components/iho-chat/src/Index.vue.d.ts +8 -8
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +3 -3
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +2 -2
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +1 -1
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue.d.ts +30 -0
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue.js +1 -0
- package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -0
- package/es/components/iho-table/src/plugins/filterTextPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterTextPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/utils/index.d.ts +3 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/quick-search/index.d.ts +18 -0
- package/es/components/quick-search/src/index.vue.d.ts +18 -0
- package/es/components/quick-search/src/index.vue2.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-upload.d.ts +4 -4
- package/es/components/scale-view/src/components/formitem/r-upload.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +10 -8
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/bi-filter/helpers/options.d.ts +1 -7
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/SelectTreeDynamic.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +1 -1
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectTreeDynamic.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +5 -5
- package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.d.ts +3 -49
- package/es/components/table-filter/src/components/render-widget/helpers/enums.d.ts +1 -18
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +5 -5
- 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/useMixins.d.ts +1 -1
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +3 -0
- package/es/components/vod-chunk-upload/index.d.ts +2 -0
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.d.ts +18 -4
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue2.js +1 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-data.d.ts +5 -1
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -1
- package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -1
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +2 -0
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- 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/logo.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.js +1 -1
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
@@ -2,7 +2,6 @@ import { PropType } from 'vue';
|
|
2
2
|
import { setStyle } from './utils';
|
3
3
|
import { FilterSetItem, FieldSetColumnItem } from '../../../components/field-set/src/types';
|
4
4
|
import { AnyObject } from '../../../shared/types';
|
5
|
-
import { COLUMNLIST_MAP } from './constants/filter';
|
6
5
|
declare const _default: import("vue").DefineComponent<{
|
7
6
|
footerFlag: {
|
8
7
|
type: BooleanConstructor;
|
@@ -12,6 +11,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
12
11
|
type: PropType<FilterSetItem[]>;
|
13
12
|
default: () => never[];
|
14
13
|
};
|
14
|
+
showFilterColumnNames: {
|
15
|
+
type: PropType<("type" | "title" | "optionType" | "isShowSearch" | "filterExplicit" | "explicitRequired" | "defaultValue" | "customTitle" | "width")[]>;
|
16
|
+
default: () => never[];
|
17
|
+
};
|
15
18
|
}, {
|
16
19
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
17
20
|
footerFlag: {
|
@@ -22,6 +25,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
22
25
|
type: PropType<FilterSetItem[]>;
|
23
26
|
default: () => never[];
|
24
27
|
};
|
28
|
+
showFilterColumnNames: {
|
29
|
+
type: PropType<("type" | "title" | "optionType" | "isShowSearch" | "filterExplicit" | "explicitRequired" | "defaultValue" | "customTitle" | "width")[]>;
|
30
|
+
default: () => never[];
|
31
|
+
};
|
25
32
|
}>> & {
|
26
33
|
onSave?: ((...args: any[]) => any) | undefined;
|
27
34
|
onClose?: ((...args: any[]) => any) | undefined;
|
@@ -92,7 +99,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
92
99
|
checked: boolean;
|
93
100
|
column: AnyObject;
|
94
101
|
}) => void;
|
95
|
-
getType: (field:
|
102
|
+
getType: (field: string) => "text" | "checkbox" | "input" | "select" | "inputNumber";
|
96
103
|
initColumns: () => void;
|
97
104
|
isNoAllCheck: (field: string) => boolean;
|
98
105
|
NButton: any;
|
@@ -373,7 +380,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
373
380
|
}>>;
|
374
381
|
emit: (event: "edit" | "updateChecked", ...args: any[]) => void;
|
375
382
|
onRemove: () => void;
|
376
|
-
onEdit: () => void;
|
383
|
+
onEdit: (param?: AnyObject) => void;
|
377
384
|
isRenderTooltip: (field: string) => any;
|
378
385
|
getTooltipContent: () => any;
|
379
386
|
getTextValue: (field: string) => any;
|
@@ -385,7 +392,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
385
392
|
label: string;
|
386
393
|
value: number;
|
387
394
|
}[];
|
388
|
-
getSelectText: (field: string) =>
|
395
|
+
getSelectText: (field: string) => any;
|
389
396
|
selectProps: (field: string) => {
|
390
397
|
valueField: string;
|
391
398
|
labelField: string;
|
@@ -405,6 +412,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
405
412
|
NPopconfirm: any;
|
406
413
|
NPopover: any;
|
407
414
|
NSpace: any;
|
415
|
+
NButton: any;
|
408
416
|
setStyle: typeof setStyle;
|
409
417
|
setColorInfo: typeof import("./utils").setColorInfo;
|
410
418
|
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<{}>>, {}>;
|
@@ -412,6 +420,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
412
420
|
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<{}>>, {}>;
|
413
421
|
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<{}>>, {}>;
|
414
422
|
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<{}>>, {}>;
|
423
|
+
EyeOutline: 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<{}>>, {}>;
|
424
|
+
CopyOutline: 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<{}>>, {}>;
|
415
425
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
416
426
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
417
427
|
element: {
|
@@ -549,9 +559,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
549
559
|
}>;
|
550
560
|
developMode: boolean;
|
551
561
|
draggable: boolean;
|
562
|
+
isHighlightRow: boolean;
|
552
563
|
idx: number;
|
553
564
|
isHighlight: boolean;
|
554
|
-
isHighlightRow: boolean;
|
555
565
|
isFieldSet: boolean;
|
556
566
|
fieldDescribeMode: "column" | "tooltip";
|
557
567
|
hideExpressionOption: AnyObject[];
|
@@ -566,11 +576,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
566
576
|
type: PropType<FilterSetItem[]>;
|
567
577
|
default: () => never[];
|
568
578
|
};
|
579
|
+
showFilterColumnNames: {
|
580
|
+
type: PropType<("type" | "title" | "optionType" | "isShowSearch" | "filterExplicit" | "explicitRequired" | "defaultValue" | "customTitle" | "width")[]>;
|
581
|
+
default: () => never[];
|
582
|
+
};
|
569
583
|
}>> & {
|
570
584
|
onSave?: ((...args: any[]) => any) | undefined;
|
571
585
|
onClose?: ((...args: any[]) => any) | undefined;
|
572
586
|
onReset?: ((...args: any[]) => any) | undefined;
|
573
587
|
}, {
|
588
|
+
showFilterColumnNames: ("type" | "title" | "optionType" | "isShowSearch" | "filterExplicit" | "explicitRequired" | "defaultValue" | "customTitle" | "width")[];
|
574
589
|
defaultList: FilterSetItem[];
|
575
590
|
footerFlag: boolean;
|
576
591
|
}>;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as
|
1
|
+
import{defineComponent as e,ref as l,reactive as t,watch as i,openBlock as a,createElementBlock as d,createElementVNode as r,Fragment as o,renderList as s,normalizeStyle as n,unref as c,createBlock as u,withCtx as m,createTextVNode as p,toDisplayString as f,createCommentVNode as h,createVNode as v,mergeProps as k,renderSlot as b}from"vue";import{NCheckbox as x,NPopconfirm as y,NButton as g}from"naive-ui";import _ from"../../../shared/components/VueDraggable/src/vuedraggable.js";import w from"./components/table-row.vue.js";import{cloneDeep as F}from"lodash-es";import{isShowExplicitRequired as C,setStyle as A}from"./utils/index.js";import{COLUMNLIST_MAP as j}from"./constants/filter.js";const R={class:"main-wrapper"},q={class:"main-wrapper__table"},N={class:"main-wrapper__table-header"},V={class:"main-wrapper__table-body",ref:"tableBodyRef"},H=["tabindex"],S={key:0,class:"main-wrapper__table-footer"};var U=e({__name:"FieldFilter",props:{footerFlag:{type:Boolean,default:!0},defaultList:{type:Array,default:()=>[]},showFilterColumnNames:{type:Array,default:()=>[]}},emits:["save","close","reset"],setup(e,{expose:U,emit:E}){const L=e,T=l([]),B=l([]),O=t({columns:T,data:B,onUpdateChecked:function({checked:e,column:l}){const t=!e||G(l.field);l.checkedAll=!t}}),D=()=>{E("save")},P=()=>{E("close")};function $(){B.value=F(L.defaultList),z(),E("reset")}function z(){T.value=Object.entries(j).map((([e,l])=>{var t;const i=function(e){return e?["isShowSearch","filterExplicit","explicitRequired"].includes(e)?"checkbox":["optionType","defaultValue"].includes(e)?"select":["customTitle"].includes(e)?"input":["width"].includes(e)?"inputNumber":"text":"text"}(e),a={isShow:!(null==(t=L.showFilterColumnNames)?void 0:t.length)||L.showFilterColumnNames.includes(e),title:l,type:i,field:e};return"checkbox"===i&&Object.assign(a,{checkedAll:!G(e),disabledAll:!1,isHeadCheckHide:["filterExplicit","explicitRequired"].includes(e)}),a}))}function G(e){return B.value.some((l=>("explicitRequired"!==e||C(l))&&!l[e]))}return i([()=>L.defaultList,()=>{var e;return null==(e=L.showFilterColumnNames)?void 0:e.length}],(([e,l])=>{e.length>0&&(B.value=F(e)),z()}),{immediate:!0,deep:!0}),U({getTableFields:()=>B.value}),(l,t)=>(a(),d("div",R,[r("div",q,[r("div",N,[(a(!0),d(o,null,s(T.value,((e,l)=>(a(),d(o,{key:l},[e.isShow?(a(),d("span",{key:0,class:"table-cell",style:n(c(A)(e,l))},[r("span",null,["checkbox"!==e.type||e.isHeadCheckHide?(a(),d(o,{key:1},[p(f(e.title),1)],64)):(a(),u(c(x),{key:0,checked:e.checkedAll,"onUpdate:checked":[l=>e.checkedAll=l,l=>{return t=l,i=e.field,void B.value.forEach((e=>{("explicitRequired"!==i||"explicitRequired"===i&&C(e))&&(e[i]=t)}));var t,i}],disabled:e.disabledAll},{default:m((()=>[p(f(e.title),1)])),_:2},1032,["checked","onUpdate:checked","disabled"]))])],4)):h("v-if",!0)],64)))),128))]),r("div",V,[v(c(_),{modelValue:B.value,"onUpdate:modelValue":t[0]||(t[0]=e=>B.value=e),animation:"150","item-key":"id",draggable:".item"},{item:m((({element:e,index:l})=>[e.hide?h("v-if",!0):(a(),d("div",{key:0,class:"item",tabindex:l},[v(w,k(O,{element:e,idx:l+1}),null,16,["element","idx"])],8,H))])),_:1},8,["modelValue"])],512)]),e.footerFlag?(a(),d("div",S,[h(" 底部按钮插槽 "),b(l.$slots,"fieldFilterFooter",{},(()=>[v(c(y),{onPositiveClick:$},{trigger:m((()=>[v(c(g),{style:{"margin-right":"8px"}},{default:m((()=>[p("恢复默认设置")])),_:1})])),default:m((()=>[p(" 确认要恢复系统默认设置吗? ")])),_:1}),v(c(g),{style:{"margin-right":"8px"},onClick:P},{default:m((()=>[p("取消")])),_:1}),v(c(g),{type:"primary",onClick:D},{default:m((()=>[p("保存")])),_:1})]))])):h("v-if",!0)]))}});export{U as default};
|
@@ -541,7 +541,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
541
541
|
}>>;
|
542
542
|
emit: (event: "edit" | "updateChecked", ...args: any[]) => void;
|
543
543
|
onRemove: () => void;
|
544
|
-
onEdit: () => void;
|
544
|
+
onEdit: (param?: AnyObject) => void;
|
545
545
|
isRenderTooltip: (field: string) => any;
|
546
546
|
getTooltipContent: () => any;
|
547
547
|
getTextValue: (field: string) => any;
|
@@ -553,7 +553,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
553
553
|
label: string;
|
554
554
|
value: number;
|
555
555
|
}[];
|
556
|
-
getSelectText: (field: string) =>
|
556
|
+
getSelectText: (field: string) => any;
|
557
557
|
selectProps: (field: string) => {
|
558
558
|
valueField: string;
|
559
559
|
labelField: string;
|
@@ -573,6 +573,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
573
573
|
NPopconfirm: any;
|
574
574
|
NPopover: any;
|
575
575
|
NSpace: any;
|
576
|
+
NButton: any;
|
576
577
|
setStyle: typeof setStyle;
|
577
578
|
setColorInfo: typeof import("./utils").setColorInfo;
|
578
579
|
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<{}>>, {}>;
|
@@ -580,6 +581,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
580
581
|
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<{}>>, {}>;
|
581
582
|
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<{}>>, {}>;
|
582
583
|
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<{}>>, {}>;
|
584
|
+
EyeOutline: 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<{}>>, {}>;
|
585
|
+
CopyOutline: 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<{}>>, {}>;
|
583
586
|
isFunction: (value: any) => value is (...args: any[]) => any;
|
584
587
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("edit" | "updateChecked")[], "edit" | "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
585
588
|
element: {
|
@@ -717,9 +720,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
717
720
|
}>;
|
718
721
|
developMode: boolean;
|
719
722
|
draggable: boolean;
|
723
|
+
isHighlightRow: boolean;
|
720
724
|
idx: number;
|
721
725
|
isHighlight: boolean;
|
722
|
-
isHighlightRow: boolean;
|
723
726
|
isFieldSet: boolean;
|
724
727
|
fieldDescribeMode: "column" | "tooltip";
|
725
728
|
hideExpressionOption: AnyObject[];
|
@@ -29,6 +29,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
29
29
|
type: PropType<FilterSetItem[]>;
|
30
30
|
default: () => never[];
|
31
31
|
};
|
32
|
+
showFilterColumnNames: {
|
33
|
+
type: PropType<("type" | "title" | "optionType" | "isShowSearch" | "filterExplicit" | "explicitRequired" | "defaultValue" | "customTitle" | "width")[]>;
|
34
|
+
default: () => never[];
|
35
|
+
};
|
32
36
|
}, {
|
33
37
|
attrs: {
|
34
38
|
[x: string]: unknown;
|
@@ -56,6 +60,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
56
60
|
type: PropType<FilterSetItem[]>;
|
57
61
|
default: () => never[];
|
58
62
|
};
|
63
|
+
showFilterColumnNames: {
|
64
|
+
type: PropType<("type" | "title" | "optionType" | "isShowSearch" | "filterExplicit" | "explicitRequired" | "defaultValue" | "customTitle" | "width")[]>;
|
65
|
+
default: () => never[];
|
66
|
+
};
|
59
67
|
}>> & {
|
60
68
|
onSave?: ((...args: any[]) => any) | undefined;
|
61
69
|
}>>;
|
@@ -103,6 +111,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
103
111
|
type: PropType<FilterSetItem[]>;
|
104
112
|
default: () => never[];
|
105
113
|
};
|
114
|
+
showFilterColumnNames: {
|
115
|
+
type: PropType<("type" | "title" | "optionType" | "isShowSearch" | "filterExplicit" | "explicitRequired" | "defaultValue" | "customTitle" | "width")[]>;
|
116
|
+
default: () => never[];
|
117
|
+
};
|
106
118
|
}>> & {
|
107
119
|
onSave?: ((...args: any[]) => any) | undefined;
|
108
120
|
}, {
|
@@ -110,5 +122,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
110
122
|
fieldColorList: ColorSetItem[];
|
111
123
|
highlightRowColorList: ColorSetItem[];
|
112
124
|
fieldFilterList: FilterSetItem[];
|
125
|
+
showFilterColumnNames: ("type" | "title" | "optionType" | "isShowSearch" | "filterExplicit" | "explicitRequired" | "defaultValue" | "customTitle" | "width")[];
|
113
126
|
}>;
|
114
127
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,useAttrs as l,provide as t,reactive as i,ref as r,computed as a,unref as o,openBlock as s,createElementBlock as d,normalizeStyle as n,createBlock as f,withCtx as u,Fragment as m,renderList as h,resolveDynamicComponent as v,mergeProps as b,createSlots as
|
1
|
+
import{defineComponent as e,useAttrs as l,provide as t,reactive as i,ref as r,computed as a,unref as o,openBlock as s,createElementBlock as d,normalizeStyle as n,createBlock as f,withCtx as u,Fragment as m,renderList as h,resolveDynamicComponent as v,mergeProps as b,createSlots as y,renderSlot as p,createCommentVNode as F,h as g}from"vue";import{useThemeVars as c,NTabs as w,NTabPane as C}from"naive-ui";import L from"./FieldSet.vue.js";import T from"./FieldColor.vue.js";import S from"./TableStyle.vue.js";import _ from"./FieldFilter.vue.js";import{InjectionFieldList as k,InjectionQueryWordbookData as x}from"./constants/index.js";import{useElementSize as $}from"@vueuse/core";import{isArray as j}from"lodash-es";var N=e({__name:"Index",props:{showTabNames:{type:Array,default:()=>["field"]},fieldColorList:{type:Array,default:()=>[]},highlightRowColorList:{type:Array,default:()=>[]},fieldList:{type:Object},queryWordbookData:{type:Function},fieldFilterList:{type:Array,default:()=>[]},showFilterColumnNames:{type:Array,default:()=>[]}},emits:["save"],setup(e,{expose:N,emit:R}){const A=e,q=l();t(k,A.fieldList),t(x,A.queryWordbookData);const D=i({}),W=r(),H=r(c().value.primaryColor),{height:I}=$(W),O=a((()=>{const e=A.showTabNames[0];return"field"===e?j(q.fields)?q.fields.length:0:"fieldFilter"===e?j(A.fieldFilterList)?A.fieldFilterList.length:0:1})),z=a((()=>{var e;const l="showSearch"in q&&!1!==q.showSearch||"show-search"in q&&!1!==q["show-search"]?"52px":"auto";let t=(null==(e=q.style)?void 0:e.height)||"100%";if(B.value.length>1){t=`calc(${"100%"===t&&(null==I?void 0:I.value)?I.value+"px":t} - 54px)`}return{"--row-height":l,"--primary-color":H.value,"--main-height":t}})),B=a((()=>[{name:"field",tab:"字段设置",render:()=>g(L)},{name:"fieldColor",tab:"字段颜色",render:()=>g(T,{isFieldColor:!0,defaultList:A.fieldColorList})},{name:"highlightRow",tab:"高亮行",render:()=>g(T,{isFieldColor:!1,defaultList:A.highlightRowColorList})},{name:"tableStyle",tab:"表格样式",render:()=>g(S)},{name:"fieldFilter",tab:"高级筛选",render:()=>g(_,{defaultList:A.fieldFilterList,showFilterColumnNames:A.showFilterColumnNames})}].filter((e=>A.showTabNames.includes(e.name)))));function E(){var e,l,t,i,r;R("save",{tableFields:null==(e=D.field)?void 0:e.getTableFields(),tableFieldColors:null==(l=D.fieldColor)?void 0:l.getTableFields(),tableHighlightRows:null==(t=D.highlightRow)?void 0:t.getTableFields(),tableStyle:null==(i=D.tableStyle)?void 0:i.getTableFields(),tableFilters:null==(r=D.fieldFilter)?void 0:r.getTableFields()})}function G(e,l){D[l]=e}return N({getTableFields:function(e){var l;return null==(l=D[e||"field"])?void 0:l.getTableFields()}}),(e,l)=>o(O)>0?(s(),d("div",{key:0,class:"c-field-set",style:n(o(z)),ref_key:"fieldSetRef",ref:W},[o(B).length>1?(s(),f(o(w),{key:0,type:"line",naimated:""},{default:u((()=>[(s(!0),d(m,null,h(o(B),(l=>(s(),f(o(C),{key:l.name,name:l.name,tab:l.tab,"display-directive":"show"},{default:u((()=>[(s(),f(v(l.render()),b(e.$attrs,{ref_for:!0,ref:e=>G(e,l.name),onSave:E}),y({_:2},[h(e.$slots,((l,t)=>({name:t,fn:u((()=>[p(e.$slots,t)]))})))]),1040))])),_:2},1032,["name","tab"])))),128))])),_:3})):(s(),f(v(o(B)[0].render()),b({key:1},e.$attrs,{ref:e=>G(e,o(B)[0].name),onSave:E}),y({_:2},[h(e.$slots,((l,t)=>({name:t,fn:u((()=>[p(e.$slots,t)]))})))]),1040))],4)):F("v-if",!0)}});export{N as default};
|
@@ -12,18 +12,26 @@ type ColorSetConditionItem2 = ColorSetConditionItem & {
|
|
12
12
|
multiple: boolean;
|
13
13
|
};
|
14
14
|
declare const _default: import("vue").DefineComponent<{
|
15
|
-
|
15
|
+
model: {
|
16
16
|
type: PropType<AnyObject>;
|
17
17
|
default: null;
|
18
18
|
};
|
19
|
+
readonly: {
|
20
|
+
type: BooleanConstructor;
|
21
|
+
default: boolean;
|
22
|
+
};
|
19
23
|
}, {
|
20
24
|
customValue: string;
|
21
25
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
22
26
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
23
|
-
|
27
|
+
model: {
|
24
28
|
type: PropType<AnyObject>;
|
25
29
|
default: null;
|
26
30
|
};
|
31
|
+
readonly: {
|
32
|
+
type: BooleanConstructor;
|
33
|
+
default: boolean;
|
34
|
+
};
|
27
35
|
}>> & {}>>;
|
28
36
|
fieldList: AnyObject[];
|
29
37
|
queryWordbookData: ((params: import("../../../../components/field-set").ColorSetWordbook) => Promise<{
|
@@ -76,6 +84,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
76
84
|
NInputNumber: any;
|
77
85
|
NSelect: any;
|
78
86
|
NIcon: any;
|
87
|
+
NButton: any;
|
79
88
|
AddCircleSharp: 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<{}>>, {}>;
|
80
89
|
RemoveCircle: 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<{}>>, {}>;
|
81
90
|
UNIT_OPTIONS: {
|
@@ -206,11 +215,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
206
215
|
holidays: Date[];
|
207
216
|
}>>;
|
208
217
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
209
|
-
|
218
|
+
model: {
|
210
219
|
type: PropType<AnyObject>;
|
211
220
|
default: null;
|
212
221
|
};
|
222
|
+
readonly: {
|
223
|
+
type: BooleanConstructor;
|
224
|
+
default: boolean;
|
225
|
+
};
|
213
226
|
}>>, {
|
214
|
-
|
227
|
+
model: AnyObject;
|
228
|
+
readonly: boolean;
|
215
229
|
}>;
|
216
230
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,inject as l,ref as n,unref as o,openBlock as
|
1
|
+
import{defineComponent as e,inject as l,ref as n,unref as o,openBlock as a,createElementBlock as i,normalizeStyle as t,createVNode as d,withCtx as u,createTextVNode as s,createElementVNode as c,Fragment as p,renderList as r,toDisplayString as m,createCommentVNode as f,withDirectives as v,vShow as _}from"vue";import{NButton as T,NIcon as E,NSelect as N,NInput as y,NInputNumber as O}from"naive-ui";import{AddCircleSharp as b,RemoveCircle as U}from"@vicons/ionicons5";import{CUSTOM_INPUT_OPTIONS as h,InjectionFieldList as I,InjectionQueryWordbookData as k,BOOLEAN_OPTIONS as Q,UNIT_OPTIONS as S,FIELD_TYPE_LIST as g,SHOWSETTING_OPTIONS as L,WORDBOOK_OPTIONS as V}from"../constants/index.js";import x from"../../../date-picker/index.js";import{useTheme as A}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{cloneDeep as D,isArray as F,isFunction as j}from"lodash-es";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";const w={class:"condition-wrapper"},R={class:"item-index"},H={class:"sql-expression-wrapper"},B=c("span",null,"筛选器逻辑编辑,不设置默认为AND",-1),C=c("br",null,null,-1),M=c("span",null,"例子 (1 AND 2) OR 3",-1);var G=e({__name:"condition",props:{model:{type:Object,default:null},readonly:{type:Boolean,default:!1}},setup(e,{expose:G}){const J=e,P=h[0].columnName,q=A(),z=D(l(I)),W=l(k),X=n([]),K=n("");function Y(e,l=!1){var n,o;l||(e.compareFieldOptions=[],e.con="",$(e));const{field_key:a}=e,i=z.find((e=>e.columnName===a));if(!i)return void(e.conOptions=[]);const{fieldType:t,settingObj:d={}}=i;e.fieldType=t;const u=D((null==(n=g.find((e=>e.name===t)))?void 0:n.conList)||[]),{showSetting:s,wordbook:c}=d;(null==s?void 0:s.length)&&u.unshift(...L),(null==(o=Object.keys(c||{}))?void 0:o.length)&&u.unshift(...V),e.conOptions=u}async function Z(e,l=!1){e.compareFieldOptions=[],l||$(e);const{field_key:n,fieldType:o,con:a}=e,i=z.find((e=>e.columnName===n));if(!i)return void(e.conOptions=[]);const{settingObj:t={}}=i||{},{showSetting:d,wordbook:u}=t,s=[];if(["IN","NEQ","BIG","LESS","BIGEQ","LESSEQ","EQ"].includes(a)){s.push(...h),l||(e.compare_field=P);const a=z.filter((e=>e.fieldType===o&&e.columnName!==n));s.push(...a)}if(V.map((e=>e.name)).includes(a)&&j(W)){const l=await W(u);s.push(...(c=l,p="label",r="value",c.map((e=>({...e,title:e[p],columnName:e[r]}))))),e.multiple=!0}var c,p,r;if(L.map((e=>e.name)).includes(a)&&(null==d?void 0:d.length)){const l=d.map((e=>({...e,title:e.change_text,columnName:JSON.stringify(e.filter||[])})));s.push(...l),e.multiple=!0}e.compareFieldOptions=s}function $(e){e.multiple=!1,e.compare_field=null,e.value="",e.numberValue=null,e.dateValue=null,e.unit=null}function ee(e){const{con:l,fieldType:n}=e;return"BOOLEAN"===n&&l&&["EQ","NEQ"].includes(l)}function le(e){const{compare_field:l,con:n,fieldType:o}=e;return!(!n||["CONVERT","QUOTE","QUOTE_NOT"].includes(n))&&(!(!["TEXT","JSONB"].includes(o)||["NULL","NOT_NULL"].includes(n))&&(!["EQ","NEQ"].includes(n)||l===P))}function ne(e){if(le(e))return!1;const{compare_field:l,con:n,field_key:o,fieldType:a}=e;return!(!n||["CONVERT","QUOTE","QUOTE_NOT"].includes(n))&&("NUMBER"===a?!["NULL","NOT_NULL"].includes(n)&&l===P:!!["DATE","DATETIME","TIME"].includes(a)&&["L_","N_","IN_THE_PAST","IN_THE_FUTURE","IN_THE_PAST_DI","IN_THE_FUTURE_DI"].includes(n))}function oe(e){const{compare_field:l,con:n,field_key:o,fieldType:a}=e;return!!n&&(!!["DATE","DATETIME","TIME"].includes(a)&&["L_","N_","IN_THE_PAST","IN_THE_FUTURE","IN_THE_PAST_DI","IN_THE_FUTURE_DI"].includes(n))}function ae(e){const{compare_field:l,con:n,field_key:o,fieldType:a}=e;return!!n&&(!!["DATE","DATETIME","TIME"].includes(a)&&(["IN","NEQ","BIG","LESS","BIGEQ","LESSEQ"].includes(n)&&l===P))}function ie(e){return["IN","NEQ"].includes(e.con)?"datetimerange":"datetime"}function te(){const e={field_key:z[0].columnName,fieldType:"",con:"",conOptions:[],compare_field:"",compareFieldOptions:[],unit:"",numberValue:null,dateValue:null,multiple:!1};Y(e),e.con="",X.value.push(e)}return function(){const{condition:e=[],sqlExpression:l=""}=J.model||{};e.length&&(X.value=e);l&&(K.value=l);X.value.forEach((e=>{Y(e,!0),Z(e,!0);const{con:l,value:n,start_val:o,end_val:a}=e;"CONVERT"===l&&(e.compare_field=F(n)?n.map((e=>JSON.stringify(e))):n),"QUOTE"!==l&&"QUOTE_NOT"!==l||(e.compare_field=n.split("|#|")),ne(e)&&(e.numberValue=+n),ae(e)&&(ie(e).endsWith("range")?e.dateValue=o&&a?[o,a]:null:e.dateValue=n)}))}(),G({getData:()=>({condition:X.value.map((e=>{const{field_key:l,con:n,value:o,compare_field:a,numberValue:i,dateValue:t,unit:d,fieldType:u,compareFieldOptions:s}=e;let c,p,r,m,f=o,v=a;return"CONVERT"===n&&(f=F(a)?a.map((e=>JSON.parse(e))):a,v=""),"QUOTE"!==n&&"QUOTE_NOT"!==n||(f=F(a)?a.join("|#|"):a,c=s.filter((e=>a.includes(e.columnName))),v=""),ne(e)&&(f=i,v=P),ae(e)&&(ie(e).endsWith("range")?(f="",r=F(t)?t[0]:"",m=F(t)?t[1]:""):f=t),oe(e)&&(p=d),le(e)&&e.compareFieldOptions.length>0&&(v=P),{field_key:l,fieldType:u,con:n,value:f,compare_field:v,is_compare_field:!!v,start_val:r,end_val:m,wordbookValueList:c,unit:p}})),sqlExpression:o(K)})}),(l,n)=>(a(),i("div",{class:"c-field-set__condition",style:t(o(q))},[d(o(T),{text:"",disabled:e.readonly,onClick:te},{icon:u((()=>[d(o(E),{component:o(b),style:{color:"var(--c-primary-color)"},size:"20"},null,8,["component"])])),default:u((()=>[s(" 添加操作 ")])),_:1},8,["disabled"]),c("section",w,[(a(!0),i(p,null,r(X.value,((l,n)=>(a(),i("div",{class:"condition-wrapper__item",key:n},[c("span",R,m(n+1),1),f(" 选择 field_key "),d(o(N),{disabled:e.readonly,value:l.field_key,"onUpdate:value":[e=>l.field_key=e,()=>Y(l)],placeholder:"请选择字段名","label-field":"title","value-field":"columnName",clearable:"",options:o(z)},null,8,["disabled","value","onUpdate:value","options"]),f(" 选择 关系 "),d(o(N),{disabled:e.readonly,value:l.con,"onUpdate:value":[e=>l.con=e,()=>Z(l)],"label-field":"text","value-field":"name",options:l.conOptions},null,8,["disabled","value","onUpdate:value","options"]),f(" 下拉框展示本列表相同数据类型 "),v(d(o(N),{disabled:e.readonly,value:l.compare_field,"onUpdate:value":e=>l.compare_field=e,"label-field":"title","value-field":"columnName",clearable:"",multiple:l.multiple,options:l.compareFieldOptions},null,8,["disabled","value","onUpdate:value","multiple","options"]),[[_,l.compareFieldOptions.length>0]]),f(" 布尔值类型字段选择是否相等的值 "),v(d(o(N),{disabled:e.readonly,value:l.value,"onUpdate:value":e=>l.value=e,options:o(Q)},null,8,["disabled","value","onUpdate:value","options"]),[[_,ee(l)]]),f(" 自定义内容 "),v(d(o(y),{disabled:e.readonly,value:l.value,"onUpdate:value":e=>l.value=e},null,8,["disabled","value","onUpdate:value"]),[[_,le(l)]]),f(" 自定义内容/数字框/日期 "),v(d(o(O),{value:l.numberValue,"onUpdate:value":e=>l.numberValue=e},null,8,["value","onUpdate:value"]),[[_,ne(l)]]),f(" 自定义日期的单位 "),v(d(o(N),{disabled:e.readonly,style:{width:"80px"},value:l.unit,"onUpdate:value":e=>l.unit=e,options:o(S)},null,8,["disabled","value","onUpdate:value","options"]),[[_,oe(l)]]),v(d(o(x),{disabled:e.readonly,type:ie(l),"formatted-value":l.dateValue,"onUpdate:formatted-value":e=>l.dateValue=e},null,8,["disabled","type","formatted-value","onUpdate:formatted-value"]),[[_,ae(l)]]),d(o(T),{text:"",disabled:e.readonly,onClick:()=>function(e){X.value.splice(e,1)}(n)},{default:u((()=>[d(o(E),{component:o(U),size:"20",color:"red"},null,8,["component"])])),_:2},1032,["disabled","onClick"])])))),128))]),v(c("section",H,[B,C,M,d(o(y),{type:"textarea",value:K.value,"onUpdate:value":n[0]||(n[0]=e=>K.value=e)},null,8,["value"])],512),[[_,X.value.length>1]])],4))}});export{G as default};
|
@@ -14,6 +14,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
14
14
|
type: PropType<AnyObject | null>;
|
15
15
|
default: null;
|
16
16
|
};
|
17
|
+
readonly: {
|
18
|
+
type: BooleanConstructor;
|
19
|
+
default: boolean;
|
20
|
+
};
|
21
|
+
isAdd: {
|
22
|
+
type: BooleanConstructor;
|
23
|
+
default: boolean;
|
24
|
+
};
|
17
25
|
}, {
|
18
26
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
19
27
|
message: import("naive-ui").MessageApi;
|
@@ -36,6 +44,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
36
44
|
type: PropType<AnyObject | null>;
|
37
45
|
default: null;
|
38
46
|
};
|
47
|
+
readonly: {
|
48
|
+
type: BooleanConstructor;
|
49
|
+
default: boolean;
|
50
|
+
};
|
51
|
+
isAdd: {
|
52
|
+
type: BooleanConstructor;
|
53
|
+
default: boolean;
|
54
|
+
};
|
39
55
|
}>> & {
|
40
56
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
41
57
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
@@ -44,7 +60,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
44
60
|
formRef: import("vue").Ref<any>;
|
45
61
|
conditionRef: import("vue").Ref<any>;
|
46
62
|
filterVisible: import("vue").Ref<boolean>;
|
47
|
-
title: import("vue").ComputedRef<"新增" | "修改" | "过滤条件">;
|
63
|
+
title: import("vue").ComputedRef<"复制" | "新增" | "修改" | "过滤条件">;
|
48
64
|
model: {
|
49
65
|
name: string;
|
50
66
|
color: string;
|
@@ -71,18 +87,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
71
87
|
NRadio: any;
|
72
88
|
NSpace: any;
|
73
89
|
Condition: import("vue").DefineComponent<{
|
74
|
-
|
90
|
+
model: {
|
75
91
|
type: PropType<AnyObject>;
|
76
92
|
default: null;
|
77
93
|
};
|
94
|
+
readonly: {
|
95
|
+
type: BooleanConstructor;
|
96
|
+
default: boolean;
|
97
|
+
};
|
78
98
|
}, {
|
79
99
|
customValue: string;
|
80
100
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
81
101
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
82
|
-
|
102
|
+
model: {
|
83
103
|
type: PropType<AnyObject>;
|
84
104
|
default: null;
|
85
105
|
};
|
106
|
+
readonly: {
|
107
|
+
type: BooleanConstructor;
|
108
|
+
default: boolean;
|
109
|
+
};
|
86
110
|
}>> & {}>>;
|
87
111
|
fieldList: AnyObject[];
|
88
112
|
queryWordbookData: ((params: import("../types").ColorSetWordbook) => Promise<{
|
@@ -216,6 +240,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
216
240
|
NInputNumber: any;
|
217
241
|
NSelect: any;
|
218
242
|
NIcon: any;
|
243
|
+
NButton: any;
|
219
244
|
AddCircleSharp: 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<{}>>, {}>;
|
220
245
|
RemoveCircle: 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<{}>>, {}>;
|
221
246
|
UNIT_OPTIONS: {
|
@@ -346,32 +371,29 @@ declare const _default: import("vue").DefineComponent<{
|
|
346
371
|
holidays: Date[];
|
347
372
|
}>>;
|
348
373
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
349
|
-
|
374
|
+
model: {
|
350
375
|
type: PropType<AnyObject>;
|
351
376
|
default: null;
|
352
377
|
};
|
378
|
+
readonly: {
|
379
|
+
type: BooleanConstructor;
|
380
|
+
default: boolean;
|
381
|
+
};
|
353
382
|
}>>, {
|
354
|
-
|
383
|
+
model: AnyObject;
|
384
|
+
readonly: boolean;
|
355
385
|
}>;
|
356
386
|
EditFilter: import("vue").DefineComponent<{
|
357
387
|
visible: {
|
358
388
|
type: BooleanConstructor;
|
359
389
|
default: boolean;
|
360
390
|
};
|
361
|
-
model: {
|
362
|
-
type: PropType<AnyObject>;
|
363
|
-
default: null;
|
364
|
-
};
|
365
391
|
}, {
|
366
392
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
367
393
|
visible: {
|
368
394
|
type: BooleanConstructor;
|
369
395
|
default: boolean;
|
370
396
|
};
|
371
|
-
model: {
|
372
|
-
type: PropType<AnyObject>;
|
373
|
-
default: null;
|
374
|
-
};
|
375
397
|
}>> & {
|
376
398
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
377
399
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
@@ -382,18 +404,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
382
404
|
onClose: () => void;
|
383
405
|
NModal: any;
|
384
406
|
Condition: import("vue").DefineComponent<{
|
385
|
-
|
407
|
+
model: {
|
386
408
|
type: PropType<AnyObject>;
|
387
409
|
default: null;
|
388
410
|
};
|
411
|
+
readonly: {
|
412
|
+
type: BooleanConstructor;
|
413
|
+
default: boolean;
|
414
|
+
};
|
389
415
|
}, {
|
390
416
|
customValue: string;
|
391
417
|
cssVars: import("vue").ComputedRef<AnyObject>;
|
392
418
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
393
|
-
|
419
|
+
model: {
|
394
420
|
type: PropType<AnyObject>;
|
395
421
|
default: null;
|
396
422
|
};
|
423
|
+
readonly: {
|
424
|
+
type: BooleanConstructor;
|
425
|
+
default: boolean;
|
426
|
+
};
|
397
427
|
}>> & {}>>;
|
398
428
|
fieldList: AnyObject[];
|
399
429
|
queryWordbookData: ((params: import("../types").ColorSetWordbook) => Promise<{
|
@@ -527,6 +557,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
527
557
|
NInputNumber: any;
|
528
558
|
NSelect: any;
|
529
559
|
NIcon: any;
|
560
|
+
NButton: any;
|
530
561
|
AddCircleSharp: 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<{}>>, {}>;
|
531
562
|
RemoveCircle: 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<{}>>, {}>;
|
532
563
|
UNIT_OPTIONS: {
|
@@ -657,28 +688,28 @@ declare const _default: import("vue").DefineComponent<{
|
|
657
688
|
holidays: Date[];
|
658
689
|
}>>;
|
659
690
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
660
|
-
|
691
|
+
model: {
|
661
692
|
type: PropType<AnyObject>;
|
662
693
|
default: null;
|
663
694
|
};
|
695
|
+
readonly: {
|
696
|
+
type: BooleanConstructor;
|
697
|
+
default: boolean;
|
698
|
+
};
|
664
699
|
}>>, {
|
665
|
-
|
700
|
+
model: AnyObject;
|
701
|
+
readonly: boolean;
|
666
702
|
}>;
|
667
703
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("confirm" | "update:visible")[], "confirm" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
668
704
|
visible: {
|
669
705
|
type: BooleanConstructor;
|
670
706
|
default: boolean;
|
671
707
|
};
|
672
|
-
model: {
|
673
|
-
type: PropType<AnyObject>;
|
674
|
-
default: null;
|
675
|
-
};
|
676
708
|
}>> & {
|
677
709
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
678
710
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
679
711
|
}, {
|
680
712
|
visible: boolean;
|
681
|
-
model: AnyObject;
|
682
713
|
}>;
|
683
714
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("confirm" | "update:visible")[], "confirm" | "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
684
715
|
visible: {
|
@@ -693,12 +724,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
693
724
|
type: PropType<AnyObject | null>;
|
694
725
|
default: null;
|
695
726
|
};
|
727
|
+
readonly: {
|
728
|
+
type: BooleanConstructor;
|
729
|
+
default: boolean;
|
730
|
+
};
|
731
|
+
isAdd: {
|
732
|
+
type: BooleanConstructor;
|
733
|
+
default: boolean;
|
734
|
+
};
|
696
735
|
}>> & {
|
697
736
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
698
737
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
699
738
|
}, {
|
700
739
|
row: AnyObject | null;
|
701
740
|
visible: boolean;
|
741
|
+
isAdd: boolean;
|
742
|
+
readonly: boolean;
|
702
743
|
isFieldColor: boolean;
|
703
744
|
}>;
|
704
745
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,inject as l,ref as o,computed as a,reactive as t,openBlock as i,createBlock as r,unref as s,withCtx as n,createVNode as
|
1
|
+
import{defineComponent as e,inject as l,ref as o,computed as a,reactive as t,openBlock as i,createBlock as r,unref as s,withCtx as n,createVNode as d,normalizeStyle as u,createElementVNode as c,createCommentVNode as m}from"vue";import{useMessage as p,NModal as f,NForm as v,NFormItem as b,NInput as h,NColorPicker as y,NSelect as g,NCheckbox as k,NRadioGroup as _,NSpace as w,NRadio as C}from"naive-ui";import{useTheme as j}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../../../shared/hooks/useScrollLoading.js";import x from"./condition.vue.js";import F from"./edit-filter.vue.js";import{COLOR_MAP as N,InjectionFieldList as U}from"../constants/index.js";var O=e({__name:"edit-dialog",props:{visible:{type:Boolean,default:!1},isFieldColor:{type:Boolean,default:!0},row:{type:Object,default:null},readonly:{type:Boolean,default:!1},isAdd:{type:Boolean,default:!1}},emits:["update:visible","confirm"],setup(e,{emit:O}){const S=e,q=j(),B=p(),A=Object.entries(N).map((([e,l])=>({label:l,value:e}))),E=Object.entries(N).map((([e])=>e)),R=l(U),D=o(),H=o(),L=o(!1),P=a((()=>S.isAdd?S.row?"复制":"新增":S.isFieldColor?"修改":"过滤条件")),T=t({name:"",color:"",status:!0,columnName:"",colorScope:S.isFieldColor?"font":"background",condition:[],sqlExpression:""}),W=t({name:[{required:!0,message:"请输入名称",trigger:["blur"]}],color:[{required:!0,message:"请选择颜色",trigger:["blur"]}],columnName:[{required:!0,validator:(e,l)=>!(!l&&S.isFieldColor)||new Error("请选择字段"),trigger:["blur"]}]});function z(e){return d("span",{style:{"--color":e.value},class:"c-field-set__color-block"},[e.label])}function G(){var e;null==(e=D.value)||e.validate((async e=>{var l,o;if(e){const l=await e;B.warning(l[0][0].message)}else{if(S.isFieldColor||Object.assign(T,H.value.getData()),!(null==(l=T.condition)?void 0:l.length))return void B.warning("请配置过滤条件");const e=S.isFieldColor?{title:null==(o=R.find((e=>e.columnName===T.columnName)))?void 0:o.title}:{};O("confirm",{...T,...e}),I()}}))}function I(){O("update:visible",!1)}function J(e){Object.assign(T,e)}return function(){if(!S.row)return;Object.assign(T,S.row)}(),(l,o)=>(i(),r(s(f),{preset:"dialog",style:{width:"860px"},title:s(P),"close-on-esc":!1,"show-icon":!1,"mask-closable":!1,"positive-text":"确定","negative-text":"取消","trap-focus":!1,show:e.visible,onPositiveClick:G,onNegativeClick:I,onClose:I},{default:n((()=>[d(s(v),{ref_key:"formRef",ref:D,disabled:e.readonly,model:T,rules:W,"label-placement":"left","label-width":"auto","show-feedback":!1,"show-require-mark":!1,style:u({maxWidth:"500px",...s(q)})},{default:n((()=>[d(s(b),{label:"名称:",path:"name",style:{"margin-bottom":"10px"}},{default:n((()=>[d(s(h),{value:T.name,"onUpdate:value":o[0]||(o[0]=e=>T.name=e),placeholder:"请填写名称",clearable:""},null,8,["value"])])),_:1}),e.isFieldColor?(i(),r(s(b),{key:0,label:"颜色:",path:"color"},{default:n((()=>[d(s(y),{clearable:"",placeholder:"请选择颜色",value:T.color,"onUpdate:value":o[1]||(o[1]=e=>T.color=e),swatches:s(E),modes:["hex"],class:"c-field-set__color-picker"},null,8,["value","swatches"])])),_:1})):(i(),r(s(b),{key:1,label:"颜色:",path:"color"},{default:n((()=>[d(s(g),{value:T.color,"onUpdate:value":o[2]||(o[2]=e=>T.color=e),placeholder:"请选择颜色","render-label":z,options:s(A)},null,8,["value","options"])])),_:1})),d(s(b),{label:"显示:",path:"status"},{default:n((()=>[d(s(k),{checked:T.status,"onUpdate:checked":o[3]||(o[3]=e=>T.status=e)},null,8,["checked"])])),_:1}),d(s(b),{label:"颜色应用于:",path:"colorScope"},{default:n((()=>[d(s(_),{value:T.colorScope,"onUpdate:value":o[4]||(o[4]=e=>T.colorScope=e)},{default:n((()=>[d(s(w),null,{default:n((()=>[d(s(C),{label:"字体",value:"font"}),d(s(C),{label:"背景",value:"background"})])),_:1})])),_:1},8,["value"])])),_:1}),e.isFieldColor?(i(),r(s(b),{key:2,label:"字段:",path:"columnName",style:{"margin-bottom":"10px"}},{default:n((()=>[d(s(w),{class:"c-field-set__space",align:"center"},{default:n((()=>[d(s(g),{value:T.columnName,"onUpdate:value":o[5]||(o[5]=e=>T.columnName=e),placeholder:"请选择字段名","label-field":"title","value-field":"columnName",options:s(R)},null,8,["value","options"]),c("span",{class:"filter-btn",onClick:o[6]||(o[6]=()=>L.value=!0)},"筛选")])),_:1})])),_:1})):m("v-if",!0)])),_:1},8,["disabled","model","rules","style"]),e.isFieldColor?(i(),r(F,{key:1,visible:L.value,"onUpdate:visible":o[7]||(o[7]=e=>L.value=e),model:T,readonly:e.readonly,onConfirm:J},null,8,["visible","model","readonly"])):(i(),r(x,{key:0,ref_key:"conditionRef",ref:H,model:T,readonly:e.readonly},null,8,["model","readonly"]))])),_:1},8,["title","show"]))}});export{O as default};
|