cnhis-design-vue 3.1.43-beta.1 → 3.1.43-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/base-search/index.d.ts +46 -114
- package/es/components/base-search/src/index.vue.d.ts +46 -114
- package/es/components/base-search/src/index.vue.js +1 -1
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/big-table/src/utils.js +1 -1
- package/es/components/button-print/src/utils/print.d.ts +2 -0
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +7 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +1 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +6 -5
- package/es/components/classification/src/components/set-classification/index.vue.js +1 -1
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +2 -2
- package/es/components/classification/src/index.vue.d.ts +7 -6
- package/es/components/date-picker/index.d.ts +1 -1
- package/es/components/date-picker/src/DatePicker.vue.d.ts +1 -1
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/fabric-chart/index.d.ts +1 -1
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.d.ts +2 -1
- package/es/components/fabric-chart/src/hooks/useCenter.d.ts +4 -4
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
- package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +3 -2
- package/es/components/form-config/index.d.ts +72 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +72 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +43 -0
- package/es/components/form-render/index.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
- package/es/components/form-render/src/hooks/useLowCodeEvent.d.ts +6 -0
- package/es/components/form-render/src/hooks/useLowCodeEvent.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -127
- package/es/components/form-render/src/types/index.d.ts +1 -2
- package/es/components/iho-table/index.d.ts +16 -5
- package/es/components/iho-table/src/IhoTable.vue.d.ts +16 -5
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +2 -2
- package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.d.ts +4 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
- package/es/components/iho-table/src/plugins/fieldConnectionPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +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 +3 -11
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +6 -3
- package/es/components/iho-table/src/types/pluginType.d.ts +18 -21
- package/es/components/iho-table/style/iconfont.ttf +0 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -0
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -1
- package/es/components/quick-search/index.d.ts +54 -224
- package/es/components/quick-search/src/index.vue.d.ts +54 -224
- package/es/components/quick-search/src/index.vue.js +1 -1
- package/es/components/quick-search/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +15 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +15 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +109 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.d.ts +67 -0
- package/es/components/table-filter/src/components/render-widget/components/InputNumberGroup.vue.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +27 -7
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -2
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +13 -3
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +134 -15
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.d.ts +6 -2
- 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/enums.d.ts +1 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +26 -87
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +3 -2
- package/es/shared/utils/business.d.ts +3 -3
- package/package.json +2 -2
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +0 -77
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +0 -93
- package/es/components/iho-table/src/plugins/dist/highLightSetPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/filterRenderPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/dist/index.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +0 -3
- package/es/components/iho-table/src/utils/dist/index.d.ts +0 -44
- package/es/components/scale-view/src/components/formitem/dist/r-address.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +0 -36
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +0 -82
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +0 -57
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +0 -57
|
@@ -14,6 +14,9 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
14
14
|
type: NumberConstructor;
|
|
15
15
|
default: number;
|
|
16
16
|
};
|
|
17
|
+
filterApiConfig: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
};
|
|
17
20
|
}, {
|
|
18
21
|
outQuickSearchFn: {
|
|
19
22
|
handlerInitSearchItem(arr: import("..").ISearchType[]): void;
|
|
@@ -34,15 +37,19 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
34
37
|
setting: string;
|
|
35
38
|
widgetCfg: {
|
|
36
39
|
isRender: boolean;
|
|
40
|
+
isInit: boolean;
|
|
37
41
|
widgetType: string | null;
|
|
38
42
|
valueList: {
|
|
39
43
|
value: any;
|
|
40
|
-
label:
|
|
44
|
+
label: any;
|
|
41
45
|
}[] | undefined;
|
|
42
46
|
defaultValue: any;
|
|
43
47
|
defValueUnit: any;
|
|
44
48
|
multiple: boolean;
|
|
49
|
+
manualMapping: boolean | null | undefined;
|
|
50
|
+
dynamicOptionInfo: import("..").dynamicOptionInfoType | {} | undefined;
|
|
45
51
|
};
|
|
52
|
+
rangeFilter: boolean | undefined;
|
|
46
53
|
title: string;
|
|
47
54
|
alias: string | undefined;
|
|
48
55
|
isShowSearch: number;
|
|
@@ -50,7 +57,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
50
57
|
explicitRequired: number;
|
|
51
58
|
advanceOptionSetting: string;
|
|
52
59
|
placeholder: string | undefined;
|
|
53
|
-
advanceColWidth:
|
|
60
|
+
advanceColWidth: number | null | undefined;
|
|
54
61
|
}[];
|
|
55
62
|
transformParams: (paramsList: any) => {};
|
|
56
63
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -68,6 +75,9 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
68
75
|
type: NumberConstructor;
|
|
69
76
|
default: number;
|
|
70
77
|
};
|
|
78
|
+
filterApiConfig: {
|
|
79
|
+
type: ObjectConstructor;
|
|
80
|
+
};
|
|
71
81
|
}>> & {
|
|
72
82
|
onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
|
|
73
83
|
onOnFilterSearch?: ((...args: any[]) => any) | undefined;
|
|
@@ -83,126 +93,35 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
83
93
|
}[]>;
|
|
84
94
|
showResetFilterBtn: import("vue").Ref<boolean>;
|
|
85
95
|
outSearchFieldList: import("vue").Ref<{
|
|
96
|
+
isShowSearch?: number | undefined;
|
|
97
|
+
filterExplicit?: number | undefined;
|
|
98
|
+
explicitRequired?: number | undefined;
|
|
99
|
+
advanceOptionSetting?: string | undefined;
|
|
100
|
+
explicitDefaultVal?: string | undefined;
|
|
101
|
+
advanceColWidth?: string | undefined;
|
|
102
|
+
fieldType?: string | undefined;
|
|
86
103
|
columnName: string;
|
|
87
104
|
title: string;
|
|
88
|
-
fieldType?: string | undefined;
|
|
89
|
-
filterExplicit?: number | undefined;
|
|
90
|
-
isShowSearch?: number | undefined;
|
|
91
|
-
setting?: any;
|
|
92
|
-
settingObj?: any;
|
|
93
105
|
placeholder?: string | undefined;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
EQ?: string | undefined;
|
|
99
|
-
LABELAttr?: boolean | undefined;
|
|
100
|
-
_isBlock?: boolean | undefined;
|
|
106
|
+
settingObj?: any;
|
|
107
|
+
setting?: any;
|
|
108
|
+
widgetCfg?: any;
|
|
109
|
+
rangeFilter?: boolean | undefined;
|
|
101
110
|
_frontId?: any;
|
|
102
|
-
NUMBERFiled?: boolean | undefined;
|
|
103
|
-
PASSWORDTYPE?: boolean | undefined;
|
|
104
|
-
advanceColWidth?: string | undefined;
|
|
105
|
-
advanceOptionSetting?: string | undefined;
|
|
106
|
-
alias?: string | undefined;
|
|
107
|
-
ageObj?: any;
|
|
108
|
-
attr?: string | undefined;
|
|
109
|
-
bigValue?: string | number | undefined;
|
|
110
|
-
classify?: string | undefined;
|
|
111
|
-
colWidth?: number | undefined;
|
|
112
|
-
columnFullName?: string | undefined;
|
|
113
|
-
com?: string | undefined;
|
|
114
|
-
comType?: string | undefined;
|
|
115
|
-
comAttr?: string | undefined;
|
|
116
|
-
con?: string | undefined;
|
|
117
|
-
dataSource?: any;
|
|
118
|
-
dictionarieObj?: any;
|
|
119
|
-
explicitRequired?: number | undefined;
|
|
120
|
-
explicitDefaultVal?: string | undefined;
|
|
121
|
-
extraField?: boolean | undefined;
|
|
122
|
-
fieldSetting?: string | undefined;
|
|
123
|
-
format?: string | undefined;
|
|
124
|
-
i18n?: string | undefined;
|
|
125
|
-
id?: string | undefined;
|
|
126
|
-
inputVal?: string | undefined;
|
|
127
|
-
inputUnit?: string | undefined;
|
|
128
|
-
isAvg?: number | undefined;
|
|
129
|
-
isEdit?: number | undefined;
|
|
130
|
-
isFixed?: number | undefined;
|
|
131
|
-
isFixedShow?: number | undefined;
|
|
132
|
-
isFontWeight?: number | undefined;
|
|
133
|
-
isMerge?: number | undefined;
|
|
134
|
-
isOrder?: number | undefined;
|
|
135
|
-
isPreciseSearch?: boolean | undefined;
|
|
136
111
|
isRender?: boolean | undefined;
|
|
137
|
-
isSearch?: number | undefined;
|
|
138
|
-
isShow?: number | undefined;
|
|
139
|
-
isSort?: number | undefined;
|
|
140
|
-
isSum?: number | undefined;
|
|
141
|
-
labelObj?: any;
|
|
142
|
-
labelList?: {
|
|
143
|
-
labelId?: string | undefined;
|
|
144
|
-
change_text: string;
|
|
145
|
-
field_key: string;
|
|
146
|
-
filter: {
|
|
147
|
-
con: string;
|
|
148
|
-
conName?: string | undefined;
|
|
149
|
-
field_key: string;
|
|
150
|
-
key?: string | undefined;
|
|
151
|
-
value: string;
|
|
152
|
-
}[];
|
|
153
|
-
label: string;
|
|
154
|
-
labelName: string;
|
|
155
|
-
sqlExpression: string;
|
|
156
|
-
value: string;
|
|
157
|
-
isSelect?: boolean | undefined;
|
|
158
|
-
}[] | undefined;
|
|
159
|
-
labelSelectList?: {
|
|
160
|
-
labelId?: string | undefined;
|
|
161
|
-
change_text: string;
|
|
162
|
-
field_key: string;
|
|
163
|
-
filter: {
|
|
164
|
-
con: string;
|
|
165
|
-
conName?: string | undefined;
|
|
166
|
-
field_key: string;
|
|
167
|
-
key?: string | undefined;
|
|
168
|
-
value: string;
|
|
169
|
-
}[];
|
|
170
|
-
label: string;
|
|
171
|
-
labelName: string;
|
|
172
|
-
sqlExpression: string;
|
|
173
|
-
value: string;
|
|
174
|
-
isSelect?: boolean | undefined;
|
|
175
|
-
}[] | undefined;
|
|
176
|
-
lessValue?: string | number | undefined;
|
|
177
|
-
marginx?: string | undefined;
|
|
178
|
-
notParticipatingSearch?: number | undefined;
|
|
179
|
-
order?: string | undefined;
|
|
180
|
-
QUOTE?: any;
|
|
181
|
-
searchPageConfig?: any;
|
|
182
|
-
selecteds?: any;
|
|
183
|
-
sequence?: number | undefined;
|
|
184
|
-
showDate?: boolean | undefined;
|
|
185
|
-
showFormat?: string | undefined;
|
|
186
|
-
showTime?: boolean | undefined;
|
|
187
|
-
sid?: string | undefined;
|
|
188
|
-
start_val?: number | null | undefined;
|
|
189
|
-
end_val?: number | null | undefined;
|
|
190
|
-
tempCon?: any;
|
|
191
|
-
tableId?: string | undefined;
|
|
192
|
-
value?: any;
|
|
193
|
-
unit?: string | undefined;
|
|
194
|
-
widgetCfg?: any;
|
|
195
|
-
formTitle?: string | undefined;
|
|
196
|
-
random_key?: string | undefined;
|
|
197
112
|
widgetType?: any;
|
|
198
|
-
|
|
199
|
-
|
|
113
|
+
con?: string | undefined;
|
|
114
|
+
_isBlock?: boolean | undefined;
|
|
115
|
+
value?: any;
|
|
116
|
+
sid?: string | undefined;
|
|
117
|
+
alias?: string | undefined;
|
|
200
118
|
}[]>;
|
|
201
119
|
showQuickSearch: import("vue").ComputedRef<boolean>;
|
|
202
|
-
initOutSearchFieldList: (
|
|
120
|
+
initOutSearchFieldList: () => void;
|
|
203
121
|
isShowSetting: (v: string) => boolean;
|
|
204
122
|
foldQuickSearch: () => void;
|
|
205
123
|
outFilterChange: (config?: {}) => void;
|
|
124
|
+
handleChangeInit: (_frontId: string, bool: boolean) => void;
|
|
206
125
|
getConObjParams: () => any;
|
|
207
126
|
getConObj: (arr: any) => any;
|
|
208
127
|
onFilterSearch: (obj: import("..").ISearchParamsType[], transResult: object, isOutFilter?: boolean, config?: {}) => void;
|
|
@@ -216,19 +135,25 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
216
135
|
modelValue: {
|
|
217
136
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
218
137
|
};
|
|
138
|
+
filterApiConfig: {
|
|
139
|
+
type: ObjectConstructor;
|
|
140
|
+
};
|
|
219
141
|
}, any, {
|
|
220
142
|
initialProps: {};
|
|
221
143
|
}, {
|
|
222
144
|
valueCp(): any;
|
|
223
145
|
}, {
|
|
224
146
|
search(): void;
|
|
225
|
-
getEleWidth(cfg: any):
|
|
147
|
+
getEleWidth(cfg: any): {
|
|
148
|
+
width: string;
|
|
149
|
+
} | undefined;
|
|
226
150
|
initComponentProps(cfg: any): void;
|
|
227
151
|
generateWidget(cfg: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
228
152
|
[key: string]: any;
|
|
229
153
|
}> | null;
|
|
230
|
-
handleUpdate(val: any
|
|
231
|
-
|
|
154
|
+
handleUpdate(val: any): void;
|
|
155
|
+
handleChangeInitState(_frontId: any, bool: any): void;
|
|
156
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange" | "changeInit")[], "update:modelValue" | "outFilterChange" | "changeInit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
232
157
|
cfg: {
|
|
233
158
|
type: ObjectConstructor;
|
|
234
159
|
required: true;
|
|
@@ -236,9 +161,13 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
236
161
|
modelValue: {
|
|
237
162
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
238
163
|
};
|
|
164
|
+
filterApiConfig: {
|
|
165
|
+
type: ObjectConstructor;
|
|
166
|
+
};
|
|
239
167
|
}>> & {
|
|
240
168
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
241
169
|
onOutFilterChange?: ((...args: any[]) => any) | undefined;
|
|
170
|
+
onChangeInit?: ((...args: any[]) => any) | undefined;
|
|
242
171
|
}, {}>;
|
|
243
172
|
NIcon: any;
|
|
244
173
|
NButton: any;
|
|
@@ -258,6 +187,9 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
258
187
|
type: NumberConstructor;
|
|
259
188
|
default: number;
|
|
260
189
|
};
|
|
190
|
+
filterApiConfig: {
|
|
191
|
+
type: ObjectConstructor;
|
|
192
|
+
};
|
|
261
193
|
}>> & {
|
|
262
194
|
onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
|
|
263
195
|
onOnFilterSearch?: ((...args: any[]) => any) | undefined;
|
|
@@ -15,6 +15,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: NumberConstructor;
|
|
16
16
|
default: number;
|
|
17
17
|
};
|
|
18
|
+
filterApiConfig: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
};
|
|
18
21
|
}, {
|
|
19
22
|
outQuickSearchFn: {
|
|
20
23
|
handlerInitSearchItem(arr: ISearchType[]): void;
|
|
@@ -35,15 +38,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
38
|
setting: string;
|
|
36
39
|
widgetCfg: {
|
|
37
40
|
isRender: boolean;
|
|
41
|
+
isInit: boolean;
|
|
38
42
|
widgetType: string | null;
|
|
39
43
|
valueList: {
|
|
40
44
|
value: any;
|
|
41
|
-
label:
|
|
45
|
+
label: any;
|
|
42
46
|
}[] | undefined;
|
|
43
47
|
defaultValue: any;
|
|
44
48
|
defValueUnit: any;
|
|
45
49
|
multiple: boolean;
|
|
50
|
+
manualMapping: boolean | null | undefined;
|
|
51
|
+
dynamicOptionInfo: import("../../../../es/components/table-filter/src/types").dynamicOptionInfoType | {} | undefined;
|
|
46
52
|
};
|
|
53
|
+
rangeFilter: boolean | undefined;
|
|
47
54
|
title: string;
|
|
48
55
|
alias: string | undefined;
|
|
49
56
|
isShowSearch: number;
|
|
@@ -51,7 +58,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
58
|
explicitRequired: number;
|
|
52
59
|
advanceOptionSetting: string;
|
|
53
60
|
placeholder: string | undefined;
|
|
54
|
-
advanceColWidth:
|
|
61
|
+
advanceColWidth: number | null | undefined;
|
|
55
62
|
}[];
|
|
56
63
|
transformParams: (paramsList: any) => {};
|
|
57
64
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -69,6 +76,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
76
|
type: NumberConstructor;
|
|
70
77
|
default: number;
|
|
71
78
|
};
|
|
79
|
+
filterApiConfig: {
|
|
80
|
+
type: ObjectConstructor;
|
|
81
|
+
};
|
|
72
82
|
}>> & {
|
|
73
83
|
onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
|
|
74
84
|
onOnFilterSearch?: ((...args: any[]) => any) | undefined;
|
|
@@ -84,126 +94,35 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
94
|
}[]>;
|
|
85
95
|
showResetFilterBtn: import("vue").Ref<boolean>;
|
|
86
96
|
outSearchFieldList: import("vue").Ref<{
|
|
97
|
+
isShowSearch?: number | undefined;
|
|
98
|
+
filterExplicit?: number | undefined;
|
|
99
|
+
explicitRequired?: number | undefined;
|
|
100
|
+
advanceOptionSetting?: string | undefined;
|
|
101
|
+
explicitDefaultVal?: string | undefined;
|
|
102
|
+
advanceColWidth?: string | undefined;
|
|
103
|
+
fieldType?: string | undefined;
|
|
87
104
|
columnName: string;
|
|
88
105
|
title: string;
|
|
89
|
-
fieldType?: string | undefined;
|
|
90
|
-
filterExplicit?: number | undefined;
|
|
91
|
-
isShowSearch?: number | undefined;
|
|
92
|
-
setting?: any;
|
|
93
|
-
settingObj?: any;
|
|
94
106
|
placeholder?: string | undefined;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
EQ?: string | undefined;
|
|
100
|
-
LABELAttr?: boolean | undefined;
|
|
101
|
-
_isBlock?: boolean | undefined;
|
|
107
|
+
settingObj?: any;
|
|
108
|
+
setting?: any;
|
|
109
|
+
widgetCfg?: any;
|
|
110
|
+
rangeFilter?: boolean | undefined;
|
|
102
111
|
_frontId?: any;
|
|
103
|
-
NUMBERFiled?: boolean | undefined;
|
|
104
|
-
PASSWORDTYPE?: boolean | undefined;
|
|
105
|
-
advanceColWidth?: string | undefined;
|
|
106
|
-
advanceOptionSetting?: string | undefined;
|
|
107
|
-
alias?: string | undefined;
|
|
108
|
-
ageObj?: any;
|
|
109
|
-
attr?: string | undefined;
|
|
110
|
-
bigValue?: string | number | undefined;
|
|
111
|
-
classify?: string | undefined;
|
|
112
|
-
colWidth?: number | undefined;
|
|
113
|
-
columnFullName?: string | undefined;
|
|
114
|
-
com?: string | undefined;
|
|
115
|
-
comType?: string | undefined;
|
|
116
|
-
comAttr?: string | undefined;
|
|
117
|
-
con?: string | undefined;
|
|
118
|
-
dataSource?: any;
|
|
119
|
-
dictionarieObj?: any;
|
|
120
|
-
explicitRequired?: number | undefined;
|
|
121
|
-
explicitDefaultVal?: string | undefined;
|
|
122
|
-
extraField?: boolean | undefined;
|
|
123
|
-
fieldSetting?: string | undefined;
|
|
124
|
-
format?: string | undefined;
|
|
125
|
-
i18n?: string | undefined;
|
|
126
|
-
id?: string | undefined;
|
|
127
|
-
inputVal?: string | undefined;
|
|
128
|
-
inputUnit?: string | undefined;
|
|
129
|
-
isAvg?: number | undefined;
|
|
130
|
-
isEdit?: number | undefined;
|
|
131
|
-
isFixed?: number | undefined;
|
|
132
|
-
isFixedShow?: number | undefined;
|
|
133
|
-
isFontWeight?: number | undefined;
|
|
134
|
-
isMerge?: number | undefined;
|
|
135
|
-
isOrder?: number | undefined;
|
|
136
|
-
isPreciseSearch?: boolean | undefined;
|
|
137
112
|
isRender?: boolean | undefined;
|
|
138
|
-
isSearch?: number | undefined;
|
|
139
|
-
isShow?: number | undefined;
|
|
140
|
-
isSort?: number | undefined;
|
|
141
|
-
isSum?: number | undefined;
|
|
142
|
-
labelObj?: any;
|
|
143
|
-
labelList?: {
|
|
144
|
-
labelId?: string | undefined;
|
|
145
|
-
change_text: string;
|
|
146
|
-
field_key: string;
|
|
147
|
-
filter: {
|
|
148
|
-
con: string;
|
|
149
|
-
conName?: string | undefined;
|
|
150
|
-
field_key: string;
|
|
151
|
-
key?: string | undefined;
|
|
152
|
-
value: string;
|
|
153
|
-
}[];
|
|
154
|
-
label: string;
|
|
155
|
-
labelName: string;
|
|
156
|
-
sqlExpression: string;
|
|
157
|
-
value: string;
|
|
158
|
-
isSelect?: boolean | undefined;
|
|
159
|
-
}[] | undefined;
|
|
160
|
-
labelSelectList?: {
|
|
161
|
-
labelId?: string | undefined;
|
|
162
|
-
change_text: string;
|
|
163
|
-
field_key: string;
|
|
164
|
-
filter: {
|
|
165
|
-
con: string;
|
|
166
|
-
conName?: string | undefined;
|
|
167
|
-
field_key: string;
|
|
168
|
-
key?: string | undefined;
|
|
169
|
-
value: string;
|
|
170
|
-
}[];
|
|
171
|
-
label: string;
|
|
172
|
-
labelName: string;
|
|
173
|
-
sqlExpression: string;
|
|
174
|
-
value: string;
|
|
175
|
-
isSelect?: boolean | undefined;
|
|
176
|
-
}[] | undefined;
|
|
177
|
-
lessValue?: string | number | undefined;
|
|
178
|
-
marginx?: string | undefined;
|
|
179
|
-
notParticipatingSearch?: number | undefined;
|
|
180
|
-
order?: string | undefined;
|
|
181
|
-
QUOTE?: any;
|
|
182
|
-
searchPageConfig?: any;
|
|
183
|
-
selecteds?: any;
|
|
184
|
-
sequence?: number | undefined;
|
|
185
|
-
showDate?: boolean | undefined;
|
|
186
|
-
showFormat?: string | undefined;
|
|
187
|
-
showTime?: boolean | undefined;
|
|
188
|
-
sid?: string | undefined;
|
|
189
|
-
start_val?: number | null | undefined;
|
|
190
|
-
end_val?: number | null | undefined;
|
|
191
|
-
tempCon?: any;
|
|
192
|
-
tableId?: string | undefined;
|
|
193
|
-
value?: any;
|
|
194
|
-
unit?: string | undefined;
|
|
195
|
-
widgetCfg?: any;
|
|
196
|
-
formTitle?: string | undefined;
|
|
197
|
-
random_key?: string | undefined;
|
|
198
113
|
widgetType?: any;
|
|
199
|
-
|
|
200
|
-
|
|
114
|
+
con?: string | undefined;
|
|
115
|
+
_isBlock?: boolean | undefined;
|
|
116
|
+
value?: any;
|
|
117
|
+
sid?: string | undefined;
|
|
118
|
+
alias?: string | undefined;
|
|
201
119
|
}[]>;
|
|
202
120
|
showQuickSearch: import("vue").ComputedRef<boolean>;
|
|
203
|
-
initOutSearchFieldList: (
|
|
121
|
+
initOutSearchFieldList: () => void;
|
|
204
122
|
isShowSetting: (v: string) => boolean;
|
|
205
123
|
foldQuickSearch: () => void;
|
|
206
124
|
outFilterChange: (config?: {}) => void;
|
|
125
|
+
handleChangeInit: (_frontId: string, bool: boolean) => void;
|
|
207
126
|
getConObjParams: () => any;
|
|
208
127
|
getConObj: (arr: any) => any;
|
|
209
128
|
onFilterSearch: (obj: ISearchParamsType[], transResult: object, isOutFilter?: boolean, config?: {}) => void;
|
|
@@ -217,19 +136,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
217
136
|
modelValue: {
|
|
218
137
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
219
138
|
};
|
|
139
|
+
filterApiConfig: {
|
|
140
|
+
type: ObjectConstructor;
|
|
141
|
+
};
|
|
220
142
|
}, any, {
|
|
221
143
|
initialProps: {};
|
|
222
144
|
}, {
|
|
223
145
|
valueCp(): any;
|
|
224
146
|
}, {
|
|
225
147
|
search(): void;
|
|
226
|
-
getEleWidth(cfg: any):
|
|
148
|
+
getEleWidth(cfg: any): {
|
|
149
|
+
width: string;
|
|
150
|
+
} | undefined;
|
|
227
151
|
initComponentProps(cfg: any): void;
|
|
228
152
|
generateWidget(cfg: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
229
153
|
[key: string]: any;
|
|
230
154
|
}> | null;
|
|
231
|
-
handleUpdate(val: any
|
|
232
|
-
|
|
155
|
+
handleUpdate(val: any): void;
|
|
156
|
+
handleChangeInitState(_frontId: any, bool: any): void;
|
|
157
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "outFilterChange" | "changeInit")[], "update:modelValue" | "outFilterChange" | "changeInit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
233
158
|
cfg: {
|
|
234
159
|
type: ObjectConstructor;
|
|
235
160
|
required: true;
|
|
@@ -237,9 +162,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
237
162
|
modelValue: {
|
|
238
163
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
239
164
|
};
|
|
165
|
+
filterApiConfig: {
|
|
166
|
+
type: ObjectConstructor;
|
|
167
|
+
};
|
|
240
168
|
}>> & {
|
|
241
169
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
242
170
|
onOutFilterChange?: ((...args: any[]) => any) | undefined;
|
|
171
|
+
onChangeInit?: ((...args: any[]) => any) | undefined;
|
|
243
172
|
}, {}>;
|
|
244
173
|
NIcon: any;
|
|
245
174
|
NButton: any;
|
|
@@ -259,6 +188,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
259
188
|
type: NumberConstructor;
|
|
260
189
|
default: number;
|
|
261
190
|
};
|
|
191
|
+
filterApiConfig: {
|
|
192
|
+
type: ObjectConstructor;
|
|
193
|
+
};
|
|
262
194
|
}>> & {
|
|
263
195
|
onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
|
|
264
196
|
onOnFilterSearch?: ((...args: any[]) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as
|
|
1
|
+
import{defineComponent as e,ref as t,computed as i,watch as l,openBlock as a,createElementBlock as r,createElementVNode as n,createCommentVNode as o,renderSlot as s,unref as u,createVNode as c,withCtx as f,createTextVNode as d,toDisplayString as h,Fragment as m,renderList as p}from"vue";import v from"../../table-filter/src/components/render-widget/index.vue.js";import g from"../../table-filter/src/hooks/useMixins.js";import b from"../../table-filter/src/hooks/useAdvanced.js";import C from"../../table-filter/src/hooks/useRenderWidget.js";import{NButton as y,NIcon as k}from"naive-ui";import{Search as S}from"@vicons/ionicons5";import{cloneDeep as j}from"lodash-es";import x from"../../../_virtual/plugin-vue_export-helper.js";const q={class:"base-search-block"},_={class:"base-container"},A={class:"bease-left"},O={class:"base-ul"},F={key:0,class:"baseli showQuickBtn"},R=n("i",{class:"iconfont-table-filter icon-table-filter-shaixuan",style:{color:"inherit","margin-right":"6px"}},null,-1),I={key:0,class:"qqConObjCount"},Q={key:1,class:"baseli"},V={key:2,class:"baseli"},w=n("i",{class:"iconfont-table-filter icon-table-filter-reset",style:{"margin-right":"6px"}},null,-1);var E=x(e({__name:"index",props:{showSettings:{type:Object,default:()=>({hideQuickSearch:0})},searchFieldList:{type:Array,default:()=>[]},qqConObjCount:{type:Number,default:0},filterApiConfig:{type:Object}},emits:["foldQuickSearch","onFilterSearch","handleReset","getFilterParam"],setup(e,{emit:x}){const E=e,{outQuickSearchFn:D}=g(),{isRender:L,getRenderSearchConObj:N,isExistDefValByRenderWidget:P,resetRenderWidgetValue:W}=C(),{transformData:B,transformParams:U}=b(),$=t([]),z=t(!1),M=t([]),T=i((()=>{var e;return e="hideQuickSearch",0==E.showSettings[e]}));function G(){x("foldQuickSearch",!0)}function H(e={}){const t=K()||[];!function(e,t,i=!1,l={}){let a=[];M.value.length>0&&(a=j(M.value));x("onFilterSearch",e,t,i,a,l)}(t,U(t),!0,e)}function J(e,t){M.value.forEach((i=>{i._frontId===e&&(i.widgetCfg.isInit=t)}))}function K(){return function(e){if(!Array.isArray(e))return[];let t=[];for(let i=0;i<e.length;i++){let l=e[i];const a=N(l);a&&t.push(a)}return t.filter((e=>e.value))}(M.value)}function X(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{W(e)})),D.handlerInitSearchItem(e)}(M.value),x("handleReset",{targetType:"outQuickSearchReset"})}return l((()=>E.searchFieldList),(e=>{e&&e.length>0&&function(){M.value=[];let e=j(B(E.searchFieldList)).filter((e=>1==e.isShowSearch&&1==e.filterExplicit));M.value=e,D.handlerInitSearchItem(M.value),M.value.some((e=>L(e)?P(e):!!e.explicitDefaultVal))}()}),{immediate:!0,deep:!0}),l((()=>E.qqConObjCount),(e=>{const t=$.value.length||0;z.value=t+Number(e)>0}),{immediate:!0}),l((()=>M),(()=>{$.value=K()||[];const e=U($.value);z.value=$.value.length+Number(E.qqConObjCount)>0,x("getFilterParam",$.value,e)}),{immediate:!0,deep:!0}),(t,i)=>(a(),r("div",q,[n("div",_,[n("div",A,[n("ul",O,[o(" 筛选分类插槽 "),s(t.$slots,"classification"),u(T)?(a(),r("li",F,[c(u(y),{class:"search-default",type:"default",onClick:G},{default:f((()=>[R,d(" 筛选"),e.qqConObjCount?(a(),r("span",I,"("+h(e.qqConObjCount)+")",1)):o("v-if",!0)])),_:1})])):o("v-if",!0),o(" start--筛选外显--start "),(a(!0),r(m,null,p(M.value,(t=>(a(),r(m,null,[t.isRender?(a(),r("li",{class:"baseli outQuickSearch-li",key:t._frontId},[c(v,{cfg:t,modelValue:t.value,"onUpdate:modelValue":e=>t.value=e,filterApiConfig:e.filterApiConfig,onOutFilterChange:H,onChangeInit:J},null,8,["cfg","modelValue","onUpdate:modelValue","filterApiConfig"])])):o("v-if",!0)],64)))),256)),o(" end--筛选外显--end "),o(" 查询按钮 "),M.value&&M.value.length>0?(a(),r("li",Q,[c(u(y),{type:"primary",onClick:H},{default:f((()=>[c(u(k),{component:u(S),size:"16",style:{"margin-right":"6px"}},null,8,["component"]),d(" 查询 ")])),_:1})])):o("v-if",!0),o(" 重置按钮 "),z.value?(a(),r("li",V,[c(u(y),{onClick:X},{default:f((()=>[w,d(" 重置 ")])),_:1})])):o("v-if",!0),o(" 业务按钮插槽 "),s(t.$slots,"buttons")])])])]))}}),[["__file","index.vue"]]);export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:base-search-iconfont;src:url(base-search-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:base-search-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.base-search-block .base-container{display:flex;justify-content:space-between;text-align:left}.base-search-block .base-container .bease-left{align-items:flex-start;display:flex;flex:1;justify-content:flex-start}.base-search-block .base-container .bease-left .base-ul{align-items:center;display:flex;flex-wrap:wrap;margin-top:0}.base-search-block .base-container .bease-left .base-ul .baseli{display:flex;margin-bottom:8px;margin-right:8px}.base-search-block .base-container .bease-left .base-ul .baseli .search-default{height:32px;line-height:32px}
|
|
1
|
+
@font-face{font-family:base-search-iconfont;src:url(base-search-iconfont.ttf) format("truetype")}.iconfont-table-filter{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:base-search-iconfont!important;font-size:14px;font-style:normal}.icon-table-filter-menzhenyishengzhananniuqingchu:before{content:"\e74e"}.icon-table-filter-menzhenyishengzhananniushanchu2:before{content:"\e757"}.icon-table-filter-menzhenyishengzhanxitongtubiaoguanbi:before{content:"\e76e"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuixiaohua2:before{content:"\e778"}.icon-table-filter-menzhenyishengzhanxitongtubiaozuidahua:before{content:"\e779"}.icon-table-filter-reset:before{content:"\e611"}.icon-table-filter-shaixuan:before{content:"\e64b"}.render-widget-input-number-group{align-items:center;display:flex}.render-widget-input-number-group .n-input-number{width:136px}.render-widget-input-number-group .divider{text-align:center;width:26px}.n-base-select-option__content{width:100%}.n-base-select-option__content .select-widget-dynamic-option{display:flex;flex-wrap:nowrap;width:100%}.n-base-select-option__content .select-widget-dynamic-option .select-widget-dynamic-item{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.base-search-block .base-container{display:flex;justify-content:space-between;text-align:left}.base-search-block .base-container .bease-left{align-items:flex-start;display:flex;flex:1;justify-content:flex-start}.base-search-block .base-container .bease-left .base-ul{align-items:center;display:flex;flex-wrap:wrap;margin-top:0}.base-search-block .base-container .bease-left .base-ul .baseli{display:flex;margin-bottom:8px;margin-right:8px}.base-search-block .base-container .bease-left .base-ul .baseli .search-default{height:32px;line-height:32px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../../../shared/assets/img/xb_small.png.js";import"xe-utils";import"moment";import t from"../../../shared/utils/vexutilsExpand.js";import{nextTick as i}from"vue";import{groupTraverser as n,createRowGroupList as r}from"../../iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js";const l=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1},s=(e,t)=>{const i=e[t.columnName];if(l(i)){const e=JSON.parse(i);return e.star?`${e.star}星`:""}return i},o=(e,t)=>{const i=e[t.columnName];if(l(i)){return JSON.parse(i).address||""}return i},a=(e,t)=>{const i=e[t.columnName];if(l(i)){const e=JSON.parse(i),t=e.days||0;if(!(t>0))return"";if(t<91)return`${t} 天`;if(90<t&&t<365)return`${Math.floor(t/30)} 个月`;if(365<t&&t<1095)return`${e.year} 岁 ${e.month} 月`;if(1095<t)return`${e.year}岁`}return i||""},d=()=>{const e=document.querySelectorAll(".big-table-filter-wrap"),t=e[e.length-1].querySelector(".js-checkbox-wrap"),n=t.scrollTop;i((()=>{t.scrollTop=n}))},c=(e,t,i,n,r)=>{var l,s,o,a,d,c;if(n.isInlineOperating)return!1;const u=i.target,h=document.body,{left:f,right:g,top:p,width:m}=u.getBoundingClientRect();e.left="initial",e.right="initial",e.top="initial";if(f+400>h.clientWidth){const t=(null==h?void 0:h.getBoundingClientRect().right)||0;e.right=t-g-m/2+"px"}else e.left=f+"px";e.top=p+20+(n.filterTopOffset||0)+"px",e.visible=!e.visible;const v=null==(l=r.filterFields[t])?void 0:l.CONVERT.length;e.checkAll=v===(null==(o=null==(s=r.filterFields[t])?void 0:s.filterItems)?void 0:o.length),e.indeterminate=!!v&&v!==((null==(d=null==(a=e.setting)?void 0:a.showSetting)?void 0:d.length)||(null==(c=e.options)?void 0:c.length)),e.searchFilterText=""},u=(e,t)=>{const{rowGroupSetting:i}=t;return n(r(i,e,(e=>e.columnName||e.type)),((t,i)=>i?{field:t,title:t,align:"center"}:function(e,t){return t.find((t=>(t.columnName||t.type)===e))}(t,e)))},h=e=>{var t;return 1!=(e.notParticipatingSearch||"")&&["search","select","radio","checkbox"].includes(e.formType)&&(null==(t=e.options)?void 0:t.length)},f=(e,i)=>{Array.isArray(e)&&e.forEach((e=>{var n;if(i)e.CONVERT=[];else{if(e.setting){if(e.setting="string"==typeof e.setting?JSON.parse(e.setting):e.setting,!t.isEmpty(e.setting.wordbook))return e.con="QUOTE",e.dataSource=[],void(e.QUOTE=[]);if(e.setting.showSetting&&e.setting.showSetting.length>0)return e.con="CONVERT",e.setting.showSetting.forEach((e=>{e.label=e.change_text,e.value=JSON.stringify(e.filter)})),void(e.CONVERT=[])}(null==(n=e.fieldType)?void 0:n.includes("DATE"))?e.settingObj&&"BIRTHDAY"==e.settingObj.attr?(e.con="BIRTHDAY",e.showDate=!1,e.marginx="ml"):(e.con="DATE",e.showDate=!1,e.marginx="ml",e.DATE={con:null,start_val:null,end_val:null}):"TEXT"==e.fieldType?(e.con="CL",e.CL=""):("NUMBER"==e.fieldType||"JSONB"==e.fieldType)&&(e.con="EQ",e.EQ=""),"LABEL"===e.setting.attr&&(e.con="EQ",e.LABELAttr=!0,e.labelSelectList=[]),"EVALUATE"===e.setting.attr&&(e.con="CL",e.selecteds=[],e.EVALUATEAttr=!0)}}))},g=e=>{if("operatorColumn"!==e.columnName)return{name:"EditInput",enabled:1==e.isEdit}},p=(e,i,n)=>{const{groupCountMap:r}=n,l=[];return n.groupCountFields.forEach((e=>{const s=e.tips,o=e.color||"#000",a=e.unit||"";let d=e.defaultValue||0;if("all"==e.range)d=r[e.key];else if("page"==e.range){const{sum:r=0,count:l=0}=((e,i,n=[],r)=>{let l=0,s=0;const{fieldList:o=[]}=r.columnConfig;return e.forEach((e=>{m(e,(e=>{var a,d;if(!e.childrenList||!e.childrenList.length){let c=!0;if(n.length){const i={table:e,form:{},sys:(null==(d=null==(a=null==r?void 0:r.userInfo)?void 0:a.map)?void 0:d.sysParams)||{}};c=t.parseCondition(n,i,o)}if(c){const t=e[i]||0;l+=Number(t),++s}}}))})),{sum:l,count:s}})(i,e.field,e.conObj,n);d=l,"avg"==e.method?d=r/l||0:"sum"==e.method&&(d=r)}d=t.round(d,4),l.push(`<span style="color: ${o}">${s}:${d}${a}</span>`)})),l.join("、")},m=(e,t)=>{if(!e)return;const i=[e];for(;i.length>0;){const e=i.shift();e&&t(e),e.childrenList&&e.childrenList.reverse().forEach((e=>{i.unshift(e)}))}},v=({row:e})=>!e.forbiddenBatchSelect,y=({row:e})=>!e.$__SEPARATE,T=e=>{const t=[],i=(e,n)=>{e.length>0&&e.forEach((e=>{e.qianduan_id||(e.qianduan_id=e.theUniqueKey||window.crypto.getRandomValues(new Uint32Array(1))[0]),e.qianduan_parent_id=n||null,e.childrenList&&i(e.childrenList,e.qianduan_id),t.push(e)}))};return i(e),t},E=(e,t,i,n)=>{t.push(e),i.push(e[n]),e.childrenList&&e.childrenList.length&&e.childrenList.forEach((e=>{e.childrenList&&e.childrenList.length?E(e,t,i,n):(i.push(e[n]),t.push(e))}))},A=(e,t,i)=>{const n=[];if(!e.length)return 1;if(e.forEach((e=>n.push(e[i]))),!n.length)return 1;if(n.length!==t.length)return 1;return n.filter((e=>{t.includes(e)})).length},b=e=>{1!=e.checkedRows.length||v({row:e.checkedRows[0]})||e.checkedRows.pop()},_=(e,t)=>{if(!e.filterFields||!Object.keys(e.filterFields).length)return;const i=t.quickSearchConfig;if(!i||!i.length){return Object.keys(e.filterFields).forEach((t=>{e.filterFields[t].CONVERT=[]})),!1}for(const t in e.filterFields){const i=e.filterFields[t];i&&(i.CONVERT=[])}i.forEach((t=>{if(t.field_key in e.filterFields){if(!e.filterFields[t.field_key])return e.filterFields[t.field_key].CONVERT=[],!1;const i=t.value;e.filterFields[t.field_key].CONVERT=i}}))},O=({row:e})=>{if(e.rowColor){const i=t.hexToRGBA(e.rowColor,.2);return`background-color:${`rgba(${i.r}, ${i.g}, ${i.b}, ${i.a})`}`}return null},R=(e,t)=>{var i,n;if(!t.isNestTable)return t.height;const r=(null==(i=t.styleSetting)?void 0:i.tableHeight)||"table-simple",l=(null==(n=t.data)?void 0:n.length)||1;return`${e.checkWidth[r]*l+90}px`},N=(e,t="name")=>e.alias||e[t],D=(t,i,n)=>("HEADPORTRAIT"===i&&(t||(t=e)),n(t)),w=(e,t,i)=>{if(!t||!t.length)return e;const n=t.find((e=>e.type===i));if(!n)return e;if(n.suffix)return e+n.suffix;let r=n.h;const l=n.w;"adaptive"===n.h&&"adaptive"!=n.w&&(r=n.w),"adaptive"===n.w&&"adaptive"!=n.h&&(r=n.h);return e+`_${r}x${l}`},L=(e,i,n)=>{if(!e||!e.length)return{display:"inline-block",maxWidth:"100%",maxheight:n};const r=e.find((e=>e.type===i));if(!r)return{display:"inline-block",height:n};return t.handleImageSize(r,n)},C=(e,i)=>{var n;const r=e[i.columnName];if(t.isJSON(r)){const e=r.includes("user_name"),t=JSON.parse(r);if(Array.isArray(t)){const i=t.length;if(i>1)return`已选${i}人`;if(1===i)return e&&(null==(n=t[0])?void 0:n.user_name)||`已选${i}人`}}},B=(e,t)=>{var i,n;const{settingObj:r={},fieldSetting:l={}}=t,{mergedFeildExpression:s}=l;let o=e[t.field];if(s){const t=/#{(.+?)\}/g;o=s.replace(t,((t,i)=>e[i]||""))}const a={content:o};return{btnName:null==(i=null==r?void 0:r.qrCode)?void 0:i.name,trigger_id:null==(n=null==r?void 0:r.qrCode)?void 0:n.id,params:a}},S=(e,t)=>{var i;return(null==(i=e[t])?void 0:i.length)?e[t].filter((e=>"EDIT_ROW"===e.settingObj[0].trigger_type)):[]},k=(e,t)=>t[e.columnName]&&e.fieldSetting&&1==e.fieldSetting.fontContentCopy,I=(e,t,i)=>{if(!e||0===e.length)return document.body.style.setProperty("--table-image-height",i),void document.body.style.setProperty("--table-image-width","auto");const n=e.find((e=>e.type===t));if(!n)return document.body.style.setProperty("--table-image-height",i),void document.body.style.setProperty("--table-image-width","auto");let r=i,l="auto";n.h&&(r="adaptive"===n.h?"auto":n.h+"px"),n.w&&(l="adaptive"===n.w?"auto":n.w+"px"),document.body.style.setProperty("--table-image-height",r),document.body.style.setProperty("--table-image-width",l)},Y=(e,t,i={})=>{const n=i[e];return{[t.name]:(r=n,r&&"string"==typeof r&&r.startsWith("###")&&(r=r.slice(3),r=(r=JSON.parse(r)).tooltip||r.value),r)};var r},H=(e,t)=>{Object.values(e.filterFields).forEach((e=>{e.visible=!1})),_(e,t)},j=(e,i)=>{const n=Object.values(e.filterFields),r=Object.keys(e.filterFields),l=((e,i)=>{var n;if(!Array.isArray(e))return[];const r=[];for(let l=0;l<e.length;l++){const s=e[l];let o=0,a="";if(s.EQ||s.CL)o=s.EQ||s.CL,"PERCENTAGE"===(null==(n=s.settingObj)?void 0:n.attr)&&(o=Number(o)/100),s.EVALUATEAttr&&(o=s.selecteds.join("|#|"));else if(t.isEmpty(s.QUOTE))if(t.isEmpty(s.CONVERT))if(s.DATE)(s.DATE.start_val||s.DATE.end_val)&&(s.DATE.con="IN"),s.tempCon=s.DATE.con,s.start_val=s.DATE.start_val?s.DATE.start_val.format("YYYY-MM-DD HH:mm:ss"):"",s.end_val=s.DATE.end_val?s.DATE.end_val.format("YYYY-MM-DD HH:mm:ss"):"";else if(s.BIRTHDAY){let e=!1;if((s.BIRTHDAY.limit_date.length>0||s.BIRTHDAY.start_val||s.BIRTHDAY.end_val)&&(s.BIRTHDAY.con="IN"),s.tempCon=s.BIRTHDAY.con,e=!(!s.BIRTHDAY.start_val&&!s.BIRTHDAY.end_val),s.BIRTHDAY.start_val&&!t.validateBirthday(s.BIRTHDAY.start_val,s.title,s.BIRTHDAY.unit))return;if(s.BIRTHDAY.end_val&&!t.validateBirthday(s.BIRTHDAY.end_val,s.title,s.BIRTHDAY.unit))return;if(+s.BIRTHDAY.start_val>+s.BIRTHDAY.end_val)return void window.$message.warning(`${s.title}请输入有效范围`,2);a=i.limit_date||"",s.unit=e&&s.BIRTHDAY.unit||"",s.start_val=s.BIRTHDAY.start_val||"",s.end_val=s.BIRTHDAY.end_val||""}else if(s.LABELAttr){const e=[];s.labelSelectList.forEach((t=>{e.push(t.labelName)})),o=e.join("|#|")}else s.EVALUATEAttr&&(o=s.selecteds.join("|#|"));else o=s.CONVERT.map((e=>["string","number"].includes(typeof e)?e:JSON.parse(e)));else o=s.QUOTE.join("|#|");const d={field_key:s.columnName,con:s.DATE||s.BIRTHDAY?s.tempCon:s.con,value:o,limit_date:a||"",start_val:s.start_val||"",end_val:s.end_val||"",unit:s.unit||""};r.push(d)}return r.filter((e=>e.value||e.limit_date||e.start_val||e.end_val))})(n,e),s=[...l];return(i.tableParams.qqConObj?JSON.parse(i.tableParams.qqConObj):[]).forEach((e=>{r.includes(e.field_key)||s.push(e)})),s},x=(e,t,i)=>{var n;return t.clickFieldKey==t.columnName||"field"==e.relatedItems.triggerMethodPc&&t.columnName==e.relatedItems.triggerMethodField||t.isbtnLink&&i.btnLinks&&(null==(n=i.btnLinks)?void 0:n.includes(t.columnName))},$=(e,t)=>{t.showButtonTop=e.showButtonTop,t.isTree=e.isTree,t.openOnly=e.openOnly,t.isExpand=e.spreadAllBtn,t.levelLazyLoadSetting=Object.assign({},e.levelLazyLoadSetting),t.checkWidth=Object.assign({},t.checkWidth,e.checkWidth)},F=(e,i,n)=>{e.forEach((e=>{t.has(e,"childrenList")&&F(e.childrenList,i,n),t.has(e,n)&&(e[i]=e[n])}))},V=(e,t,i)=>{if(t.isNestTable)return;if(1==e.isTree)return e.visibleCheckAllWrap=!1,!1;e.visibleCheckAllWrap=i.length>1;const n=i.length>=e.curAbleCheckedLen,r=t.pageVO.pageSize===t.pageVO.total,l=i.length>e.currentPageSelectedLength;e.visibleCheckAllWrapMore=l||n&&!r};export{v as checkMethod,E as flattenRow,g as generateEditRender,C as getCandidateComponents,s as getEvaluate,p as getFooterGroup,S as getInlineEditBtn,o as getMapVal,O as getRowStyle,a as getageShowType,u as handleGroupColums,D as handleImgArr,w as handleImgSrc,N as handleName,B as handleQrCodeContent,R as handleTableHeight,I as handleTableImageSize,f as handlerInitSearchItem,H as hideFilterWrap,A as intersectRow,k as isCopy,h as isFilterItem,x as isLink,j as mergeConObjFn,L as modalDetailImage,d as reScrollFilterWrap,b as removeCheckedDisabledRows,Y as setDefaultFormData,_ as setFilterStatus,$ as setTableConfig,F as setTreeGroupTitle,V as setVisibleCheckAllWrap,c as showFilter,T as treeToList,y as visibleMethod};
|
|
1
|
+
import e from"../../../shared/assets/img/xb_small.png.js";import"xe-utils";import"moment";import t from"../../../shared/utils/vexutilsExpand.js";import{nextTick as i}from"vue";import{groupTraverser as n,createRowGroupList as r}from"../../iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js";const l=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1},s=(e,t)=>{const i=e[t.columnName];if(l(i)){const e=JSON.parse(i);return e.star?`${e.star}星`:""}return i},o=(e,t)=>{const i=e[t.columnName];if(l(i)){return JSON.parse(i).address||""}return i},a=(e,t)=>{const i=e[t.columnName];if(l(i)){const e=JSON.parse(i),t=e.days||0;if(!(t>0))return"";if(t<91)return`${t} 天`;if(90<t&&t<365)return`${Math.floor(t/30)} 个月`;if(365<t&&t<1095)return`${e.year} 岁 ${e.month} 月`;if(1095<t)return`${e.year}岁`}return i||""},d=()=>{const e=document.querySelectorAll(".big-table-filter-wrap"),t=e[e.length-1].querySelector(".js-checkbox-wrap"),n=t.scrollTop;i((()=>{t.scrollTop=n}))},c=(e,t,i,n,r)=>{var l,s,o,a,d,c;if(n.isInlineOperating)return!1;const u=i.target,h=document.body,{left:f,right:g,top:p,width:m}=u.getBoundingClientRect();e.left="initial",e.right="initial",e.top="initial";if(f+400>h.clientWidth){const t=(null==h?void 0:h.getBoundingClientRect().right)||0;e.right=t-g-m/2+"px"}else e.left=f+"px";e.top=p+20+(n.filterTopOffset||0)+"px",e.visible=!e.visible;const v=null==(l=r.filterFields[t])?void 0:l.CONVERT.length;e.checkAll=v===(null==(o=null==(s=r.filterFields[t])?void 0:s.filterItems)?void 0:o.length),e.indeterminate=!!v&&v!==((null==(d=null==(a=e.setting)?void 0:a.showSetting)?void 0:d.length)||(null==(c=e.options)?void 0:c.length)),e.searchFilterText=""},u=(e,t)=>{const{rowGroupSetting:i}=t;return n(r(i,e,(e=>e.columnName||e.type)),((t,i)=>i?{field:t,title:t,align:"center"}:function(e,t){return t.find((t=>(t.columnName||t.type)===e))}(t,e)))},h=e=>{var t;return 1!=(e.notParticipatingSearch||"")&&["search","select","radio","checkbox"].includes(e.formType)&&(null==(t=e.options)?void 0:t.length)},f=(e,i)=>{Array.isArray(e)&&e.forEach((e=>{var n;if(i)e.CONVERT=[];else{if(e.setting){if(e.setting="string"==typeof e.setting?JSON.parse(e.setting):e.setting,!t.isEmpty(e.setting.wordbook))return e.con="QUOTE",e.dataSource=[],void(e.QUOTE=[]);if(e.setting.showSetting&&e.setting.showSetting.length>0)return e.con="CONVERT",e.setting.showSetting.forEach((e=>{e.label=e.change_text,e.value=JSON.stringify(e.filter)})),void(e.CONVERT=[])}(null==(n=e.fieldType)?void 0:n.includes("DATE"))?e.settingObj&&"BIRTHDAY"==e.settingObj.attr?(e.con="BIRTHDAY",e.showDate=!1,e.marginx="ml"):(e.con="DATE",e.showDate=!1,e.marginx="ml",e.DATE={con:null,start_val:null,end_val:null}):"TEXT"==e.fieldType?(e.con="CL",e.CL=""):("NUMBER"==e.fieldType||"JSONB"==e.fieldType)&&(e.con="EQ",e.EQ=""),"LABEL"===e.setting.attr&&(e.con="EQ",e.LABELAttr=!0,e.labelSelectList=[]),"EVALUATE"===e.setting.attr&&(e.con="CL",e.selecteds=[],e.EVALUATEAttr=!0)}}))},g=e=>{if("operatorColumn"!==e.columnName)return{name:"EditInput",enabled:1==e.isEdit}},p=(e,i,n)=>{const{groupCountMap:r}=n,l=[];return n.groupCountFields.forEach((e=>{const s=e.tips,o=e.color||"#000",a=e.unit||"";let d=e.defaultValue||0;if("all"==e.range)d=r[e.key];else if("page"==e.range){const{sum:r=0,count:l=0}=((e,i,n=[],r)=>{let l=0,s=0;const{fieldList:o=[]}=r.columnConfig;return e.forEach((e=>{m(e,(e=>{var a,d;if(!e.childrenList||!e.childrenList.length){let c=!0;if(n.length){const i={table:e,form:{},sys:(null==(d=null==(a=null==r?void 0:r.userInfo)?void 0:a.map)?void 0:d.sysParams)||{}};c=t.parseCondition(n,i,o)}if(c){const t=e[i]||0;l+=Number(t),++s}}}))})),{sum:l,count:s}})(i,e.field,e.conObj,n);d=l,"avg"==e.method?d=r/l||0:"sum"==e.method&&(d=r)}d=t.round(d,4),l.push(`<span style="color: ${o}">${s}:${d}${a}</span>`)})),l.join("、")},m=(e,t)=>{if(!e)return;const i=[e];for(;i.length>0;){const e=i.shift();e&&t(e),e.childrenList&&e.childrenList.reverse().forEach((e=>{i.unshift(e)}))}},v=({row:e})=>!e.forbiddenBatchSelect,y=({row:e})=>!e.$__SEPARATE,T=e=>{const t=[],i=(e,n)=>{e.length>0&&e.forEach((e=>{e.qianduan_id||(e.qianduan_id=e.theUniqueKey||window.crypto.getRandomValues(new Uint32Array(1))[0]),e.qianduan_parent_id=n||null,e.childrenList&&i(e.childrenList,e.qianduan_id),t.push(e)}))};return i(e),t},E=(e,t,i,n)=>{t.push(e),i.push(e[n]),e.childrenList&&e.childrenList.length&&e.childrenList.forEach((e=>{e.childrenList&&e.childrenList.length?E(e,t,i,n):(i.push(e[n]),t.push(e))}))},A=(e,t,i)=>{const n=[];if(!e.length)return 1;if(e.forEach((e=>n.push(e[i]))),!n.length)return 1;if(n.length!==t.length)return 1;return n.filter((e=>{t.includes(e)})).length},b=e=>{1!=e.checkedRows.length||v({row:e.checkedRows[0]})||e.checkedRows.pop()},_=(e,t)=>{if(!e.filterFields||!Object.keys(e.filterFields).length)return;const i=t.quickSearchConfig;if(!i||!i.length){return Object.keys(e.filterFields).forEach((t=>{e.filterFields[t].CONVERT=[]})),!1}for(const t in e.filterFields){const i=e.filterFields[t];i&&(i.CONVERT=[])}i.forEach((t=>{if(t.field_key in e.filterFields){if(!e.filterFields[t.field_key])return e.filterFields[t.field_key].CONVERT=[],!1;const i=t.value;e.filterFields[t.field_key].CONVERT=i}}))},O=({row:e})=>{if(e.rowColor){const i=t.hexToRGBA(e.rowColor,.2)||{};return`background-color:${`rgba(${i.r}, ${i.g}, ${i.b}, ${i.a})`}`}return null},R=(e,t)=>{var i,n;if(!t.isNestTable)return t.height;const r=(null==(i=t.styleSetting)?void 0:i.tableHeight)||"table-simple",l=(null==(n=t.data)?void 0:n.length)||1;return`${e.checkWidth[r]*l+90}px`},N=(e,t="name")=>e.alias||e[t],D=(t,i,n)=>("HEADPORTRAIT"===i&&(t||(t=e)),n(t)),w=(e,t,i)=>{if(!t||!t.length)return e;const n=t.find((e=>e.type===i));if(!n)return e;if(n.suffix)return e+n.suffix;let r=n.h;const l=n.w;"adaptive"===n.h&&"adaptive"!=n.w&&(r=n.w),"adaptive"===n.w&&"adaptive"!=n.h&&(r=n.h);return e+`_${r}x${l}`},L=(e,i,n)=>{if(!e||!e.length)return{display:"inline-block",maxWidth:"100%",maxheight:n};const r=e.find((e=>e.type===i));if(!r)return{display:"inline-block",height:n};return t.handleImageSize(r,n)},C=(e,i)=>{var n;const r=e[i.columnName];if(t.isJSON(r)){const e=r.includes("user_name"),t=JSON.parse(r);if(Array.isArray(t)){const i=t.length;if(i>1)return`已选${i}人`;if(1===i)return e&&(null==(n=t[0])?void 0:n.user_name)||`已选${i}人`}}},B=(e,t)=>{var i,n;const{settingObj:r={},fieldSetting:l={}}=t,{mergedFeildExpression:s}=l;let o=e[t.field];if(s){const t=/#{(.+?)\}/g;o=s.replace(t,((t,i)=>e[i]||""))}const a={content:o};return{btnName:null==(i=null==r?void 0:r.qrCode)?void 0:i.name,trigger_id:null==(n=null==r?void 0:r.qrCode)?void 0:n.id,params:a}},S=(e,t)=>{var i;return(null==(i=e[t])?void 0:i.length)?e[t].filter((e=>"EDIT_ROW"===e.settingObj[0].trigger_type)):[]},k=(e,t)=>t[e.columnName]&&e.fieldSetting&&1==e.fieldSetting.fontContentCopy,I=(e,t,i)=>{if(!e||0===e.length)return document.body.style.setProperty("--table-image-height",i),void document.body.style.setProperty("--table-image-width","auto");const n=e.find((e=>e.type===t));if(!n)return document.body.style.setProperty("--table-image-height",i),void document.body.style.setProperty("--table-image-width","auto");let r=i,l="auto";n.h&&(r="adaptive"===n.h?"auto":n.h+"px"),n.w&&(l="adaptive"===n.w?"auto":n.w+"px"),document.body.style.setProperty("--table-image-height",r),document.body.style.setProperty("--table-image-width",l)},Y=(e,t,i={})=>{const n=i[e];return{[t.name]:(r=n,r&&"string"==typeof r&&r.startsWith("###")&&(r=r.slice(3),r=(r=JSON.parse(r)).tooltip||r.value),r)};var r},H=(e,t)=>{Object.values(e.filterFields).forEach((e=>{e.visible=!1})),_(e,t)},j=(e,i)=>{const n=Object.values(e.filterFields),r=Object.keys(e.filterFields),l=((e,i)=>{var n;if(!Array.isArray(e))return[];const r=[];for(let l=0;l<e.length;l++){const s=e[l];let o=0,a="";if(s.EQ||s.CL)o=s.EQ||s.CL,"PERCENTAGE"===(null==(n=s.settingObj)?void 0:n.attr)&&(o=Number(o)/100),s.EVALUATEAttr&&(o=s.selecteds.join("|#|"));else if(t.isEmpty(s.QUOTE))if(t.isEmpty(s.CONVERT))if(s.DATE)(s.DATE.start_val||s.DATE.end_val)&&(s.DATE.con="IN"),s.tempCon=s.DATE.con,s.start_val=s.DATE.start_val?s.DATE.start_val.format("YYYY-MM-DD HH:mm:ss"):"",s.end_val=s.DATE.end_val?s.DATE.end_val.format("YYYY-MM-DD HH:mm:ss"):"";else if(s.BIRTHDAY){let e=!1;if((s.BIRTHDAY.limit_date.length>0||s.BIRTHDAY.start_val||s.BIRTHDAY.end_val)&&(s.BIRTHDAY.con="IN"),s.tempCon=s.BIRTHDAY.con,e=!(!s.BIRTHDAY.start_val&&!s.BIRTHDAY.end_val),s.BIRTHDAY.start_val&&!t.validateBirthday(s.BIRTHDAY.start_val,s.title,s.BIRTHDAY.unit))return;if(s.BIRTHDAY.end_val&&!t.validateBirthday(s.BIRTHDAY.end_val,s.title,s.BIRTHDAY.unit))return;if(+s.BIRTHDAY.start_val>+s.BIRTHDAY.end_val)return void window.$message.warning(`${s.title}请输入有效范围`,2);a=i.limit_date||"",s.unit=e&&s.BIRTHDAY.unit||"",s.start_val=s.BIRTHDAY.start_val||"",s.end_val=s.BIRTHDAY.end_val||""}else if(s.LABELAttr){const e=[];s.labelSelectList.forEach((t=>{e.push(t.labelName)})),o=e.join("|#|")}else s.EVALUATEAttr&&(o=s.selecteds.join("|#|"));else o=s.CONVERT.map((e=>["string","number"].includes(typeof e)?e:JSON.parse(e)));else o=s.QUOTE.join("|#|");const d={field_key:s.columnName,con:s.DATE||s.BIRTHDAY?s.tempCon:s.con,value:o,limit_date:a||"",start_val:s.start_val||"",end_val:s.end_val||"",unit:s.unit||""};r.push(d)}return r.filter((e=>e.value||e.limit_date||e.start_val||e.end_val))})(n,e),s=[...l];return(i.tableParams.qqConObj?JSON.parse(i.tableParams.qqConObj):[]).forEach((e=>{r.includes(e.field_key)||s.push(e)})),s},x=(e,t,i)=>{var n;return t.clickFieldKey==t.columnName||"field"==e.relatedItems.triggerMethodPc&&t.columnName==e.relatedItems.triggerMethodField||t.isbtnLink&&i.btnLinks&&(null==(n=i.btnLinks)?void 0:n.includes(t.columnName))},$=(e,t)=>{t.showButtonTop=e.showButtonTop,t.isTree=e.isTree,t.openOnly=e.openOnly,t.isExpand=e.spreadAllBtn,t.levelLazyLoadSetting=Object.assign({},e.levelLazyLoadSetting),t.checkWidth=Object.assign({},t.checkWidth,e.checkWidth)},F=(e,i,n)=>{e.forEach((e=>{t.has(e,"childrenList")&&F(e.childrenList,i,n),t.has(e,n)&&(e[i]=e[n])}))},V=(e,t,i)=>{if(t.isNestTable)return;if(1==e.isTree)return e.visibleCheckAllWrap=!1,!1;e.visibleCheckAllWrap=i.length>1;const n=i.length>=e.curAbleCheckedLen,r=t.pageVO.pageSize===t.pageVO.total,l=i.length>e.currentPageSelectedLength;e.visibleCheckAllWrapMore=l||n&&!r};export{v as checkMethod,E as flattenRow,g as generateEditRender,C as getCandidateComponents,s as getEvaluate,p as getFooterGroup,S as getInlineEditBtn,o as getMapVal,O as getRowStyle,a as getageShowType,u as handleGroupColums,D as handleImgArr,w as handleImgSrc,N as handleName,B as handleQrCodeContent,R as handleTableHeight,I as handleTableImageSize,f as handlerInitSearchItem,H as hideFilterWrap,A as intersectRow,k as isCopy,h as isFilterItem,x as isLink,j as mergeConObjFn,L as modalDetailImage,d as reScrollFilterWrap,b as removeCheckedDisabledRows,Y as setDefaultFormData,_ as setFilterStatus,$ as setTableConfig,F as setTreeGroupTitle,V as setVisibleCheckAllWrap,c as showFilter,T as treeToList,y as visibleMethod};
|
|
@@ -9,6 +9,7 @@ export declare class Print {
|
|
|
9
9
|
private downloadPath;
|
|
10
10
|
private printOrigin;
|
|
11
11
|
private isRemote;
|
|
12
|
+
private CMonitor;
|
|
12
13
|
constructor();
|
|
13
14
|
private readonly messageHandlerQueue;
|
|
14
15
|
private messageHandler;
|
|
@@ -22,6 +23,7 @@ export declare class Print {
|
|
|
22
23
|
_testConnection(): Promise<unknown>;
|
|
23
24
|
_queryServicesPrint(params: AnyObject): Promise<any>;
|
|
24
25
|
_callPrintWithFile(queryParams: AnyObject): Promise<any>;
|
|
26
|
+
_handleMonitorNotify(message: string): void;
|
|
25
27
|
_handleResult(data: AnyObject, errorCallbackFn?: Func): false | AnyObject;
|
|
26
28
|
_handleResultTest(result: unknown, errorCallbackFn?: Func): boolean;
|
|
27
29
|
_handleEventQueryPrintData(templateId: string, formatId: string, params: AnyObject, errorCallbackFn?: Func): Promise<false | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=`${window.location.protocol}//${window.location.host}`,c=`${h}/fdp-api/print/assembly/printIReport`,p=`${h}/bi-api/reprot/print/open/client/getRemote`,u=`${h}/printService/file`;let m=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.messageHandlerQueue=[],m)return m;m=this;const e=window;if(this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.postMessage({exec:"config",data:""})}catch(t){console.log("非封装浏览器或者当前版本不支持获取配置接口")}}}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{console.log(t);const i=JSON.parse(t.data||"{}");"config"===i.exec&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||""),n(i.res||"")}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}}):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleResult(t,e){if(!t)return null==e||e({type:"printError",message:"打印命令未返回信息",result:!1,errinfo:"打印命令未返回信息"}),!1;if("success"!==t.result){const i={type:"printError",message:
|
|
1
|
+
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as n}from"./dialog.js";import{getFileUrl as s,useBrowserPrint as r,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{format as l}from"date-fns";const d=t.create({timeout:1e3,withCredentials:!1}),h=`${window.location.protocol}//${window.location.host}`,c=`${h}/fdp-api/print/assembly/printIReport`,p=`${h}/bi-api/reprot/print/open/client/getRemote`,u=`${h}/printService/file`;let m=null;class w{constructor(){var t;if(this.webview=null,this.dialog=new i,this.dialogPreview=new n,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.messageHandlerQueue=[],m)return m;m=this;const e=window;if(this.CMonitor=e.$CMonitor,this.webview=null==(t=e.chrome)?void 0:t.webview,this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.postMessage({exec:"config",data:""})}catch(t){this._handleMonitorNotify("当前浏览器版本不支持获取配置接口"),console.log("非封装浏览器或者当前版本不支持获取配置接口")}}}messageHandler(t){var e;const i=this.messageHandlerQueue.shift();if(!i)return console.log("当前回执",t,"没有可用的handler");const{resolve:n,reject:s}=i;try{console.log(t);const i=JSON.parse(t.data||"{}");"config"===i.exec&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||""),n(i.res||"")}catch(t){s(t)}}async postMessage(t){return this.webview?new Promise(((e,i)=>{this.messageHandlerQueue.push({resolve:e,reject:i}),this.webview.postMessage(t)})):Promise.reject()}destroy(){this.webview&&this.currentMessageHandler&&(this.webview.removeEventListener("message",this.currentMessageHandler),this.currentMessageHandler=void 0)}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}}):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:n(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[n]}).then((({data:t})=>t));function n(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"打印sdk错误收集",message:t,businessName:"打印sdk"})}_handleResult(t,e){if(!t)return this._handleMonitorNotify("打印命令未返回信息"),null==e||e({type:"printError",message:"打印命令未返回信息",result:!1,errinfo:"打印命令未返回信息"}),!1;if("success"!==t.result){const i=t.message||t.Message;this._handleMonitorNotify(i);const n={type:"printError",message:i,result:t.result,errinfo:t.errinfo};return null==e||e(n),!1}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,n){const s={templateId:t,formatId:e,params:i,cmdid:"7"},r=await this._queryServicesPrint(s);return this._handleQueryPrintDataResult(r,e,n)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,cmdid:n,print:s,printdlgshow:r="1",nobillnode:a="1",btnprint:o="1"}){const d={templateId:t,formatId:e,params:i,cmdid:n,nobillnode:a,printdlgshow:r,btnprint:o};if(s){try{s=JSON.parse(s)}catch(t){}d.print=s}else if(this.isRemote){const t=l(new Date,"yyyyMMddHHmmss");d.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return await this._queryServicesPrint(d)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:n}){const s={};let r={};try{r=Object.assign({},s,JSON.parse(i))}catch(t){r=s}const a={templateId:t,formatId:e,cmdid:"9",token:n,params:JSON.stringify(r)};return await this._queryServicesPrint(a)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await d({method:"get",url:p})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=h+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await d({method:"post",url:c,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,n=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=n[n.length-2],o=n[n.length-1],l=await s(`${u}/${a}/${o}`),d=r(null,e,l);if("preview"===e)return d}}async preview({templateId:t,formatId:e,params:i="",btnprint:n},s,l){if(a(e)){const t=await this._queryPrintFile(e,i);if(!t)return null==l?void 0:l("获取文件失败!");const n=r(t,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,n),void(null==s||s({file:t}))}await this._queryProxyOrigin();const d=await this._testConnection();if(!this._handleResultTest(d,l))return!1;const h=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:this.isRemote?"7":"8",btnprint:n}),c=this._handleResult(h,l);if(!c)return!1;if(this.isRemote){const t=await this._browserPrint(c,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}s&&s(c)}async printDirect({templateId:t,formatId:e,params:i="",print:n,printdlgshow:s,nobillnode:o,isDownloadFile:l=!0},d,h,c="printDirect"){if(a(e)){const t=await this._queryPrintFile(e,i);return t?(r(t,c),void(null==d||d({file:t}))):null==h?void 0:h("获取文件失败!")}await this._queryProxyOrigin();const p=await this._testConnection();if(!this._handleResultTest(p,h))return!1;const u=await this._handleEventDirect({templateId:t,formatId:e,params:i,cmdid:"7",print:n,printdlgshow:s,nobillnode:o}),m=this._handleResult(u,h);if(!m)return!1;l&&["downloadPDF"].includes(c)&&await this._browserPrint(m,c),null==d||d(m)}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):d.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}downloadPDF(t,i,n){this.webview&&this.downloadPath&&(t.print.filename=this.downloadPath.replace(/\\/g,"/")),this.printDirect(t,(async s=>{if(s||n(null),a(t.formatId))return i(s);const r=this,o=await async function(t){const i=[],n=JSON.parse(t);if(!e(n))return await r._downloadPDF("");if(1===n.length)return await r._downloadPDF(n[0]||"");for(let t=0,e=n.length;t<e;t++)i.push(await r._downloadPDF(n[t]||""));return i}(s.filedir);i(o,s)}),(t=>n(t)),"downloadPDF")}async print({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this.queryPrintData({templateId:t,formatId:e,params:i},void 0,s);if(!a)return!1;const o=this.printFileData({formatId:e,file:a.file,printerName:a.printerName},void 0,s);if(!o)return!1;n&&n(o)}async queryPrintData({templateId:t,formatId:e,params:i=""},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventQueryPrintData(t,e,i,s);return!!a&&(n&&n(a),a)}async printFileData({formatId:t,file:e,printerName:i="Default"},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,s);return!!o&&(n&&n(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:n},s,r){const a=await this._testConnection();if(!this._handleResultTest(a,r))return!1;const o=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:n}),l=this._handleResult(o,r);if(!l)return!1;s&&s(l)}async addPrintFormat({templateId:t,params:e,token:i},n,s){const r=await this._testConnection();if(!this._handleResultTest(r,s))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,s);if(!o)return!1;n&&n(o)}}export{w as Print};
|