cnhis-design-vue 3.1.43-beta.2 → 3.1.43-beta.20
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 +50 -114
- package/es/components/base-search/src/index.vue.d.ts +50 -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/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 +9 -6
- package/es/components/classification/src/components/search-filter/index.vue.d.ts +3 -0
- package/es/components/classification/src/components/set-classification/index.vue.d.ts +8 -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 +9 -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/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +3 -2
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -1
- package/es/components/form-render/src/components/renderer/dist/levelSearchCascader.d.ts +77 -0
- package/es/components/form-render/src/components/renderer/dist/searchCascade.d.ts +93 -0
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +6 -0
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/guide/index.d.ts +2 -0
- package/es/components/guide/index.js +1 -0
- package/es/components/guide/src/renderer.d.ts +37 -0
- package/es/components/guide/src/renderer.js +1 -0
- package/es/components/guide/src/types/index.d.ts +40 -0
- package/es/components/guide/src/useGuide.d.ts +6 -0
- package/es/components/guide/src/useGuide.js +1 -0
- package/es/components/guide/src/utils/index.d.ts +14 -0
- package/es/components/guide/src/utils/index.js +1 -0
- 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/dist/highLightSetPlugin.d.ts +3 -0
- 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/dist/index.d.ts +3 -0
- 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/keyboardEventPlugin/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/dist/index.d.ts +3 -0
- 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/hooks/useSelectOption.d.ts +2 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js +1 -0
- 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/rendererPlugins/widgets/dist/defaultRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/dist/seqRendererPlugin.d.ts +3 -0
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +4 -1
- package/es/components/iho-table/src/utils/dist/index.d.ts +44 -0
- 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/index.d.ts +1 -0
- package/es/components/index.js +1 -1
- 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/scale-view/src/components/formitem/dist/r-address.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/r-sign.d.ts +36 -0
- package/es/components/scale-view/src/components/formitem/dist/standard-modal.d.ts +82 -0
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
- package/es/components/search-cascader/src/components/dist/SearchMenu.d.ts +57 -0
- package/es/components/search-cascader/src/components/dist/SearchMenu1.d.ts +57 -0
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +3 -0
- package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +3 -0
- package/es/components/table-filter/src/components/render-widget/basicData.d.ts +4 -0
- package/es/components/table-filter/src/components/render-widget/basicData.js +1 -0
- package/es/components/table-filter/src/components/render-widget/components/Date.vue.d.ts +84 -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/DateRange.vue.d.ts +118 -0
- package/es/components/table-filter/src/components/render-widget/components/DateRange.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 +26 -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 +4 -2
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
- package/es/components/table-filter/src/components/render-widget/enums.d.ts +17 -0
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -1
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +5 -0
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.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 +240 -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 +3 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +27 -87
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useTriggerEvent.d.ts +0 -0
- /package/es/components/{iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useTriggerEvent.js → guide/src/types/index.js} +0 -0
|
@@ -4,6 +4,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4
4
|
type: import("vue").PropType<import("..").IsettingsType>;
|
|
5
5
|
default: () => {
|
|
6
6
|
hideQuickSearch: number;
|
|
7
|
+
hideResetBtn: number;
|
|
7
8
|
};
|
|
8
9
|
};
|
|
9
10
|
searchFieldList: {
|
|
@@ -14,6 +15,9 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
14
15
|
type: NumberConstructor;
|
|
15
16
|
default: number;
|
|
16
17
|
};
|
|
18
|
+
filterApiConfig: {
|
|
19
|
+
type: ObjectConstructor;
|
|
20
|
+
};
|
|
17
21
|
}, {
|
|
18
22
|
outQuickSearchFn: {
|
|
19
23
|
handlerInitSearchItem(arr: import("..").ISearchType[]): void;
|
|
@@ -34,15 +38,19 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
34
38
|
setting: string;
|
|
35
39
|
widgetCfg: {
|
|
36
40
|
isRender: boolean;
|
|
41
|
+
isInit: boolean;
|
|
37
42
|
widgetType: string | null;
|
|
38
43
|
valueList: {
|
|
39
44
|
value: any;
|
|
40
|
-
label:
|
|
45
|
+
label: any;
|
|
41
46
|
}[] | undefined;
|
|
42
47
|
defaultValue: any;
|
|
43
48
|
defValueUnit: any;
|
|
44
49
|
multiple: boolean;
|
|
50
|
+
manualMapping: boolean | null | undefined;
|
|
51
|
+
dynamicOptionInfo: import("..").dynamicOptionInfoType | {} | undefined;
|
|
45
52
|
};
|
|
53
|
+
rangeFilter: boolean | undefined;
|
|
46
54
|
title: string;
|
|
47
55
|
alias: string | undefined;
|
|
48
56
|
isShowSearch: number;
|
|
@@ -50,7 +58,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
50
58
|
explicitRequired: number;
|
|
51
59
|
advanceOptionSetting: string;
|
|
52
60
|
placeholder: string | undefined;
|
|
53
|
-
advanceColWidth:
|
|
61
|
+
advanceColWidth: number | null | undefined;
|
|
54
62
|
}[];
|
|
55
63
|
transformParams: (paramsList: any) => {};
|
|
56
64
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -58,6 +66,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
58
66
|
type: import("vue").PropType<import("..").IsettingsType>;
|
|
59
67
|
default: () => {
|
|
60
68
|
hideQuickSearch: number;
|
|
69
|
+
hideResetBtn: number;
|
|
61
70
|
};
|
|
62
71
|
};
|
|
63
72
|
searchFieldList: {
|
|
@@ -68,6 +77,9 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
68
77
|
type: NumberConstructor;
|
|
69
78
|
default: number;
|
|
70
79
|
};
|
|
80
|
+
filterApiConfig: {
|
|
81
|
+
type: ObjectConstructor;
|
|
82
|
+
};
|
|
71
83
|
}>> & {
|
|
72
84
|
onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
|
|
73
85
|
onOnFilterSearch?: ((...args: any[]) => any) | undefined;
|
|
@@ -83,126 +95,36 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
83
95
|
}[]>;
|
|
84
96
|
showResetFilterBtn: import("vue").Ref<boolean>;
|
|
85
97
|
outSearchFieldList: import("vue").Ref<{
|
|
98
|
+
isShowSearch?: number | undefined;
|
|
99
|
+
filterExplicit?: number | undefined;
|
|
100
|
+
explicitRequired?: number | undefined;
|
|
101
|
+
advanceOptionSetting?: string | undefined;
|
|
102
|
+
explicitDefaultVal?: string | undefined;
|
|
103
|
+
advanceColWidth?: string | undefined;
|
|
104
|
+
fieldType?: string | undefined;
|
|
86
105
|
columnName: string;
|
|
87
106
|
title: string;
|
|
88
|
-
fieldType?: string | undefined;
|
|
89
|
-
filterExplicit?: number | undefined;
|
|
90
|
-
isShowSearch?: number | undefined;
|
|
91
|
-
setting?: any;
|
|
92
|
-
settingObj?: any;
|
|
93
107
|
placeholder?: string | undefined;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
EQ?: string | undefined;
|
|
99
|
-
LABELAttr?: boolean | undefined;
|
|
100
|
-
_isBlock?: boolean | undefined;
|
|
108
|
+
settingObj?: any;
|
|
109
|
+
setting?: any;
|
|
110
|
+
widgetCfg?: any;
|
|
111
|
+
rangeFilter?: boolean | undefined;
|
|
101
112
|
_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
113
|
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
114
|
widgetType?: any;
|
|
198
|
-
|
|
199
|
-
|
|
115
|
+
con?: string | undefined;
|
|
116
|
+
_isBlock?: boolean | undefined;
|
|
117
|
+
value?: any;
|
|
118
|
+
sid?: string | undefined;
|
|
119
|
+
alias?: string | undefined;
|
|
200
120
|
}[]>;
|
|
201
121
|
showQuickSearch: import("vue").ComputedRef<boolean>;
|
|
202
|
-
|
|
122
|
+
showResetBtn: import("vue").ComputedRef<boolean>;
|
|
123
|
+
initOutSearchFieldList: () => void;
|
|
203
124
|
isShowSetting: (v: string) => boolean;
|
|
204
125
|
foldQuickSearch: () => void;
|
|
205
126
|
outFilterChange: (config?: {}) => void;
|
|
127
|
+
handleChangeInit: (_frontId: string, bool: boolean) => void;
|
|
206
128
|
getConObjParams: () => any;
|
|
207
129
|
getConObj: (arr: any) => any;
|
|
208
130
|
onFilterSearch: (obj: import("..").ISearchParamsType[], transResult: object, isOutFilter?: boolean, config?: {}) => void;
|
|
@@ -216,19 +138,25 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
216
138
|
modelValue: {
|
|
217
139
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
218
140
|
};
|
|
141
|
+
filterApiConfig: {
|
|
142
|
+
type: ObjectConstructor;
|
|
143
|
+
};
|
|
219
144
|
}, any, {
|
|
220
145
|
initialProps: {};
|
|
221
146
|
}, {
|
|
222
147
|
valueCp(): any;
|
|
223
148
|
}, {
|
|
224
149
|
search(): void;
|
|
225
|
-
getEleWidth(cfg: any):
|
|
150
|
+
getEleWidth(cfg: any): {
|
|
151
|
+
width: string;
|
|
152
|
+
} | undefined;
|
|
226
153
|
initComponentProps(cfg: any): void;
|
|
227
154
|
generateWidget(cfg: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
228
155
|
[key: string]: any;
|
|
229
156
|
}> | null;
|
|
230
|
-
handleUpdate(val: any
|
|
231
|
-
|
|
157
|
+
handleUpdate(val: any): void;
|
|
158
|
+
handleChangeInitState(_frontId: any, bool: any): void;
|
|
159
|
+
}, 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
160
|
cfg: {
|
|
233
161
|
type: ObjectConstructor;
|
|
234
162
|
required: true;
|
|
@@ -236,9 +164,13 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
236
164
|
modelValue: {
|
|
237
165
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
238
166
|
};
|
|
167
|
+
filterApiConfig: {
|
|
168
|
+
type: ObjectConstructor;
|
|
169
|
+
};
|
|
239
170
|
}>> & {
|
|
240
171
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
241
172
|
onOutFilterChange?: ((...args: any[]) => any) | undefined;
|
|
173
|
+
onChangeInit?: ((...args: any[]) => any) | undefined;
|
|
242
174
|
}, {}>;
|
|
243
175
|
NIcon: any;
|
|
244
176
|
NButton: any;
|
|
@@ -248,6 +180,7 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
248
180
|
type: import("vue").PropType<import("..").IsettingsType>;
|
|
249
181
|
default: () => {
|
|
250
182
|
hideQuickSearch: number;
|
|
183
|
+
hideResetBtn: number;
|
|
251
184
|
};
|
|
252
185
|
};
|
|
253
186
|
searchFieldList: {
|
|
@@ -258,6 +191,9 @@ declare const CBaseSearch: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
258
191
|
type: NumberConstructor;
|
|
259
192
|
default: number;
|
|
260
193
|
};
|
|
194
|
+
filterApiConfig: {
|
|
195
|
+
type: ObjectConstructor;
|
|
196
|
+
};
|
|
261
197
|
}>> & {
|
|
262
198
|
onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
|
|
263
199
|
onOnFilterSearch?: ((...args: any[]) => any) | undefined;
|
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
type: PropType<IsettingsType>;
|
|
6
6
|
default: () => {
|
|
7
7
|
hideQuickSearch: number;
|
|
8
|
+
hideResetBtn: number;
|
|
8
9
|
};
|
|
9
10
|
};
|
|
10
11
|
searchFieldList: {
|
|
@@ -15,6 +16,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
16
|
type: NumberConstructor;
|
|
16
17
|
default: number;
|
|
17
18
|
};
|
|
19
|
+
filterApiConfig: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
18
22
|
}, {
|
|
19
23
|
outQuickSearchFn: {
|
|
20
24
|
handlerInitSearchItem(arr: ISearchType[]): void;
|
|
@@ -35,15 +39,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
39
|
setting: string;
|
|
36
40
|
widgetCfg: {
|
|
37
41
|
isRender: boolean;
|
|
42
|
+
isInit: boolean;
|
|
38
43
|
widgetType: string | null;
|
|
39
44
|
valueList: {
|
|
40
45
|
value: any;
|
|
41
|
-
label:
|
|
46
|
+
label: any;
|
|
42
47
|
}[] | undefined;
|
|
43
48
|
defaultValue: any;
|
|
44
49
|
defValueUnit: any;
|
|
45
50
|
multiple: boolean;
|
|
51
|
+
manualMapping: boolean | null | undefined;
|
|
52
|
+
dynamicOptionInfo: import("../../../../es/components/table-filter/src/types").dynamicOptionInfoType | {} | undefined;
|
|
46
53
|
};
|
|
54
|
+
rangeFilter: boolean | undefined;
|
|
47
55
|
title: string;
|
|
48
56
|
alias: string | undefined;
|
|
49
57
|
isShowSearch: number;
|
|
@@ -51,7 +59,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
51
59
|
explicitRequired: number;
|
|
52
60
|
advanceOptionSetting: string;
|
|
53
61
|
placeholder: string | undefined;
|
|
54
|
-
advanceColWidth:
|
|
62
|
+
advanceColWidth: number | null | undefined;
|
|
55
63
|
}[];
|
|
56
64
|
transformParams: (paramsList: any) => {};
|
|
57
65
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -59,6 +67,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
59
67
|
type: PropType<IsettingsType>;
|
|
60
68
|
default: () => {
|
|
61
69
|
hideQuickSearch: number;
|
|
70
|
+
hideResetBtn: number;
|
|
62
71
|
};
|
|
63
72
|
};
|
|
64
73
|
searchFieldList: {
|
|
@@ -69,6 +78,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
78
|
type: NumberConstructor;
|
|
70
79
|
default: number;
|
|
71
80
|
};
|
|
81
|
+
filterApiConfig: {
|
|
82
|
+
type: ObjectConstructor;
|
|
83
|
+
};
|
|
72
84
|
}>> & {
|
|
73
85
|
onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
|
|
74
86
|
onOnFilterSearch?: ((...args: any[]) => any) | undefined;
|
|
@@ -84,126 +96,36 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
96
|
}[]>;
|
|
85
97
|
showResetFilterBtn: import("vue").Ref<boolean>;
|
|
86
98
|
outSearchFieldList: import("vue").Ref<{
|
|
99
|
+
isShowSearch?: number | undefined;
|
|
100
|
+
filterExplicit?: number | undefined;
|
|
101
|
+
explicitRequired?: number | undefined;
|
|
102
|
+
advanceOptionSetting?: string | undefined;
|
|
103
|
+
explicitDefaultVal?: string | undefined;
|
|
104
|
+
advanceColWidth?: string | undefined;
|
|
105
|
+
fieldType?: string | undefined;
|
|
87
106
|
columnName: string;
|
|
88
107
|
title: string;
|
|
89
|
-
fieldType?: string | undefined;
|
|
90
|
-
filterExplicit?: number | undefined;
|
|
91
|
-
isShowSearch?: number | undefined;
|
|
92
|
-
setting?: any;
|
|
93
|
-
settingObj?: any;
|
|
94
108
|
placeholder?: string | undefined;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
EQ?: string | undefined;
|
|
100
|
-
LABELAttr?: boolean | undefined;
|
|
101
|
-
_isBlock?: boolean | undefined;
|
|
109
|
+
settingObj?: any;
|
|
110
|
+
setting?: any;
|
|
111
|
+
widgetCfg?: any;
|
|
112
|
+
rangeFilter?: boolean | undefined;
|
|
102
113
|
_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
114
|
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
115
|
widgetType?: any;
|
|
199
|
-
|
|
200
|
-
|
|
116
|
+
con?: string | undefined;
|
|
117
|
+
_isBlock?: boolean | undefined;
|
|
118
|
+
value?: any;
|
|
119
|
+
sid?: string | undefined;
|
|
120
|
+
alias?: string | undefined;
|
|
201
121
|
}[]>;
|
|
202
122
|
showQuickSearch: import("vue").ComputedRef<boolean>;
|
|
203
|
-
|
|
123
|
+
showResetBtn: import("vue").ComputedRef<boolean>;
|
|
124
|
+
initOutSearchFieldList: () => void;
|
|
204
125
|
isShowSetting: (v: string) => boolean;
|
|
205
126
|
foldQuickSearch: () => void;
|
|
206
127
|
outFilterChange: (config?: {}) => void;
|
|
128
|
+
handleChangeInit: (_frontId: string, bool: boolean) => void;
|
|
207
129
|
getConObjParams: () => any;
|
|
208
130
|
getConObj: (arr: any) => any;
|
|
209
131
|
onFilterSearch: (obj: ISearchParamsType[], transResult: object, isOutFilter?: boolean, config?: {}) => void;
|
|
@@ -217,19 +139,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
217
139
|
modelValue: {
|
|
218
140
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
219
141
|
};
|
|
142
|
+
filterApiConfig: {
|
|
143
|
+
type: ObjectConstructor;
|
|
144
|
+
};
|
|
220
145
|
}, any, {
|
|
221
146
|
initialProps: {};
|
|
222
147
|
}, {
|
|
223
148
|
valueCp(): any;
|
|
224
149
|
}, {
|
|
225
150
|
search(): void;
|
|
226
|
-
getEleWidth(cfg: any):
|
|
151
|
+
getEleWidth(cfg: any): {
|
|
152
|
+
width: string;
|
|
153
|
+
} | undefined;
|
|
227
154
|
initComponentProps(cfg: any): void;
|
|
228
155
|
generateWidget(cfg: any): import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
229
156
|
[key: string]: any;
|
|
230
157
|
}> | null;
|
|
231
|
-
handleUpdate(val: any
|
|
232
|
-
|
|
158
|
+
handleUpdate(val: any): void;
|
|
159
|
+
handleChangeInitState(_frontId: any, bool: any): void;
|
|
160
|
+
}, 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
161
|
cfg: {
|
|
234
162
|
type: ObjectConstructor;
|
|
235
163
|
required: true;
|
|
@@ -237,9 +165,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
237
165
|
modelValue: {
|
|
238
166
|
type: (ArrayConstructor | NumberConstructor | StringConstructor)[];
|
|
239
167
|
};
|
|
168
|
+
filterApiConfig: {
|
|
169
|
+
type: ObjectConstructor;
|
|
170
|
+
};
|
|
240
171
|
}>> & {
|
|
241
172
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
242
173
|
onOutFilterChange?: ((...args: any[]) => any) | undefined;
|
|
174
|
+
onChangeInit?: ((...args: any[]) => any) | undefined;
|
|
243
175
|
}, {}>;
|
|
244
176
|
NIcon: any;
|
|
245
177
|
NButton: any;
|
|
@@ -249,6 +181,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
249
181
|
type: PropType<IsettingsType>;
|
|
250
182
|
default: () => {
|
|
251
183
|
hideQuickSearch: number;
|
|
184
|
+
hideResetBtn: number;
|
|
252
185
|
};
|
|
253
186
|
};
|
|
254
187
|
searchFieldList: {
|
|
@@ -259,6 +192,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
259
192
|
type: NumberConstructor;
|
|
260
193
|
default: number;
|
|
261
194
|
};
|
|
195
|
+
filterApiConfig: {
|
|
196
|
+
type: ObjectConstructor;
|
|
197
|
+
};
|
|
262
198
|
}>> & {
|
|
263
199
|
onFoldQuickSearch?: ((...args: any[]) => any) | undefined;
|
|
264
200
|
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 n,createElementVNode as r,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"},R={class:"base-container"},_={class:"bease-left"},A={class:"base-ul"},O={key:0,class:"baseli showQuickBtn"},F=r("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=r("i",{class:"iconfont-table-filter icon-table-filter-reset",style:{"margin-right":"6px"}},null,-1);var B=x(e({__name:"index",props:{showSettings:{type:Object,default:()=>({hideQuickSearch:0,hideResetBtn:0})},searchFieldList:{type:Array,default:()=>[]},qqConObjCount:{type:Number,default:0},filterApiConfig:{type:Object}},emits:["foldQuickSearch","onFilterSearch","handleReset","getFilterParam"],setup(e,{emit:x}){const B=e,{outQuickSearchFn:E}=g(),{isRender:D,getRenderSearchConObj:L,isExistDefValByRenderWidget:N,resetRenderWidgetValue:P}=C(),{transformData:W,transformParams:U}=b(),$=t([]),z=t(!1),M=t([]),T=i((()=>H("hideQuickSearch"))),G=i((()=>H("hideResetBtn")));function H(e){return 0==B.showSettings[e]}function J(){x("foldQuickSearch",!0)}function K(e={}){const t=Y()||[];!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 X(e,t){M.value.forEach((i=>{i._frontId===e&&(i.widgetCfg.isInit=t)}))}function Y(){return function(e){if(!Array.isArray(e))return[];let t=[];for(let i=0;i<e.length;i++){let l=e[i];const a=L(l);a&&t.push(a)}return t.filter((e=>e.value))}(M.value)}function Z(){!function(e){if(!Array.isArray(e))return;e.forEach((e=>{P(e)})),E.handlerInitSearchItem(e)}(M.value),x("handleReset",{targetType:"outQuickSearchReset"})}return l((()=>B.searchFieldList),(e=>{e&&e.length>0&&function(){M.value=[];let e=j(W(B.searchFieldList)).filter((e=>1==e.isShowSearch&&1==e.filterExplicit));M.value=e,E.handlerInitSearchItem(M.value),M.value.some((e=>D(e)?N(e):!!e.explicitDefaultVal))}()}),{immediate:!0,deep:!0}),l((()=>B.qqConObjCount),(e=>{const t=$.value.length||0;z.value=t+Number(e)>0&&G.value}),{immediate:!0}),l((()=>M),(()=>{$.value=Y()||[];const e=U($.value);z.value=$.value.length+Number(B.qqConObjCount)>0&&G.value,x("getFilterParam",$.value,e)}),{immediate:!0,deep:!0}),(t,i)=>(a(),n("div",q,[r("div",R,[r("div",_,[r("ul",A,[o(" 筛选分类插槽 "),s(t.$slots,"classification"),u(T)?(a(),n("li",O,[c(u(y),{class:"search-default",type:"default",onClick:J},{default:f((()=>[F,d(" 筛选"),e.qqConObjCount?(a(),n("span",I,"("+h(e.qqConObjCount)+")",1)):o("v-if",!0)])),_:1})])):o("v-if",!0),o(" start--筛选外显--start "),(a(!0),n(m,null,p(M.value,(t=>(a(),n(m,null,[t.isRender?(a(),n("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:K,onChangeInit:X},null,8,["cfg","modelValue","onUpdate:modelValue","filterApiConfig"])])):o("v-if",!0)],64)))),256)),o(" end--筛选外显--end "),o(" 查询按钮 "),M.value&&M.value.length>0?(a(),n("li",Q,[c(u(y),{type:"primary",onClick:K},{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(),n("li",V,[c(u(y),{onClick:Z},{default:f((()=>[w,d(" 重置 ")])),_:1})])):o("v-if",!0),o(" 业务按钮插槽 "),s(t.$slots,"buttons")])])])]))}}),[["__file","index.vue"]]);export{B 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 .divider{text-align:center;width:24px}.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}.render-widget-date-range{align-items:center;display:flex;flex-wrap:nowrap;width:100%}.render-widget-date-range .radio-date-group{border:1px solid #d9d9d9;display:flex}.render-widget-date-range .radio-date-group .radio-date-item{border-left:1px solid #d9d9d9;cursor:pointer;height:30px;line-height:30px;padding:0 8px}.render-widget-date-range .radio-date-group .radio-date-item:first-child{border:none}.render-widget-date-range .radio-date-group .radio-date-item.radio-date-item-active{background:#3e65cf;border-color:#3e65cf;color:#fff}.render-widget-date-range .select-date-left{margin-left:16px}.render-widget-date-range .select-date-right{margin-right:16px}.render-widget-date-range .date-detail-range{display:flex;flex-wrap:nowrap}.render-widget-date-range .date-detail-range .divider{text-align:center;width:10px}.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}
|
|
@@ -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};
|