cnhis-design-vue 3.1.40-beta.0 → 3.1.40-beta.10

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.
Files changed (200) hide show
  1. package/README.md +12 -48
  2. package/es/components/big-table/style/index.css +1 -1
  3. package/es/components/button-print/src/utils/print.js +6 -1
  4. package/es/components/form-config/index.d.ts +66 -148
  5. package/es/components/form-config/src/FormConfig.vue.d.ts +66 -148
  6. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +33 -74
  7. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +33 -74
  8. package/es/components/form-render/index.d.ts +33 -74
  9. package/es/components/form-render/index.js +1 -1
  10. package/es/components/form-render/src/FormRender.vue.d.ts +33 -74
  11. package/es/components/form-render/src/FormRender.vue.js +37 -20
  12. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +33 -74
  13. package/es/components/form-render/src/components/renderer/searchCascade.js +2 -0
  14. package/es/components/form-render/src/components/renderer/select.js +5 -2
  15. package/es/components/form-render/src/hooks/index.js +1 -1
  16. package/es/components/form-render/src/hooks/useAnchor.d.ts +6 -3
  17. package/es/components/form-render/src/hooks/useAnchor.js +26 -26
  18. package/es/components/form-render/src/hooks/useAutoHidden.d.ts +4 -0
  19. package/es/components/form-render/src/hooks/useAutoHidden.js +43 -0
  20. package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +7 -10
  21. package/es/components/form-render/src/hooks/useBusinessBinding.js +38 -36
  22. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +2 -6
  23. package/es/components/form-render/src/hooks/useFormContext.d.ts +1 -2
  24. package/es/components/form-render/src/hooks/useFormContext.js +2 -2
  25. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
  26. package/es/components/form-render/src/hooks/useFormRenderOptions.js +25 -21
  27. package/es/components/form-render/src/types/fieldItem.d.ts +1 -1
  28. package/es/components/form-render/style/index.css +1 -1
  29. package/es/components/form-render/test/basic-config.spec.d.ts +1 -0
  30. package/es/components/form-render/test/renderer.spec.d.ts +1 -0
  31. package/es/components/iho-table/index.d.ts +121 -121
  32. package/es/components/iho-table/src/IhoTable.vue.d.ts +121 -121
  33. package/es/components/iho-table/src/IhoTable.vue.js +2 -1
  34. package/es/components/iho-table/src/constants/index.d.ts +2 -2
  35. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +59 -59
  36. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
  37. package/es/components/index.css +1 -1
  38. package/es/components/index.d.ts +3 -1
  39. package/es/components/index.js +7 -1
  40. package/es/components/info-header/index.d.ts +18 -3
  41. package/es/components/info-header/src/HiddenContent.vue.d.ts +2 -2
  42. package/es/components/info-header/src/InfoEllipsis.vue.d.ts +1 -1
  43. package/es/components/info-header/src/InfoHeader.vue.d.ts +18 -3
  44. package/es/components/info-header/src/InfoHeader.vue.js +40 -19
  45. package/es/components/keyboard/index.d.ts +20 -2
  46. package/es/components/keyboard/src/Keyboard.vue.d.ts +20 -2
  47. package/es/components/keyboard/src/components/InputNumber.vue.d.ts +19 -2
  48. package/es/components/keyboard/src/components/InputNumber.vue.js +15 -5
  49. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +20 -2
  50. package/es/components/keyboard/src/components/NumberPanel.vue.js +14 -10
  51. package/es/components/recommend-search/index.d.ts +14 -14
  52. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +14 -14
  53. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +2 -2
  54. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +4 -4
  55. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -4
  56. package/es/components/scale-view/index.d.ts +5 -2
  57. package/es/components/scale-view/src/ScaleView.vue.d.ts +8 -2
  58. package/es/components/scale-view/src/ScaleView.vue.js +4 -3
  59. package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +1 -1
  60. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  61. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
  62. package/es/components/scale-view/src/hooks/scaleview-computed.js +76 -31
  63. package/es/components/scale-view/src/hooks/use-evaluate.js +13 -13
  64. package/es/components/shortcut-provider/index.d.ts +15 -1
  65. package/es/components/shortcut-provider/src/ShortcutProvider.vue.d.ts +15 -1
  66. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +8 -2
  67. package/es/components/shortcut-setter/index.d.ts +33 -74
  68. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +33 -74
  69. package/es/components/steps-wheel/index.d.ts +1 -1
  70. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
  71. package/es/components/table-filter/index.d.ts +8933 -0
  72. package/es/components/table-filter/index.js +21 -0
  73. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +3841 -0
  74. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +2272 -0
  75. package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +3198 -0
  76. package/es/components/table-filter/src/classification/Classification-com.vue.js +1315 -0
  77. package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +71 -0
  78. package/es/components/table-filter/src/classification/search-class-name.vue.js +195 -0
  79. package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +1119 -0
  80. package/es/components/table-filter/src/classification/search-professional-model.vue.js +594 -0
  81. package/es/components/table-filter/src/components/age-com/index.vue.d.ts +119 -0
  82. package/es/components/table-filter/src/components/age-com/index.vue.js +185 -0
  83. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.d.ts +199 -0
  84. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +86 -0
  85. package/es/components/table-filter/src/components/button-icon/getBtnIcon.d.ts +2 -0
  86. package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +30 -0
  87. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.d.ts +90 -0
  88. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +253 -0
  89. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +112 -0
  90. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +114 -0
  91. package/es/components/table-filter/src/components/classify-filter/helpers/options.d.ts +4 -0
  92. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +14 -0
  93. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.d.ts +20 -0
  94. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +87 -0
  95. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +59 -0
  96. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +147 -0
  97. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +278 -0
  98. package/es/components/table-filter/src/components/classify-filter/index.vue.js +304 -0
  99. package/es/components/table-filter/src/components/multi-select/multi-select.vue.d.ts +113 -0
  100. package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +153 -0
  101. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.d.ts +266 -0
  102. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +310 -0
  103. package/es/components/table-filter/src/components/range-age/index.vue.d.ts +248 -0
  104. package/es/components/table-filter/src/components/range-age/index.vue.js +137 -0
  105. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +104 -0
  106. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +64 -0
  107. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +34 -0
  108. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +45 -0
  109. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +3 -0
  110. package/es/components/table-filter/src/components/render-widget/components/index.js +2 -0
  111. package/es/components/table-filter/src/components/render-widget/enums.d.ts +25 -0
  112. package/es/components/table-filter/src/components/render-widget/enums.js +27 -0
  113. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.d.ts +1 -0
  114. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +70 -0
  115. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +32 -0
  116. package/es/components/table-filter/src/components/render-widget/index.vue.js +107 -0
  117. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +199 -0
  118. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +152 -0
  119. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.d.ts +789 -0
  120. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1520 -0
  121. package/es/components/table-filter/src/components/search-condition/fieldTypeList.d.ts +18 -0
  122. package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +171 -0
  123. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.d.ts +1217 -0
  124. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +199 -0
  125. package/es/components/table-filter/src/components/search-modal/set-classification.vue.d.ts +1624 -0
  126. package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +241 -0
  127. package/es/components/table-filter/src/components/table-modal/TableModal.vue.d.ts +292 -0
  128. package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +526 -0
  129. package/es/components/table-filter/src/const/dataOptions.d.ts +36 -0
  130. package/es/components/table-filter/src/const/dataOptions.js +107 -0
  131. package/es/components/table-filter/src/const/index.d.ts +5 -0
  132. package/es/components/table-filter/src/const/index.js +5 -0
  133. package/es/components/table-filter/src/directive/flexibleResize.d.ts +28 -0
  134. package/es/components/table-filter/src/directive/flexibleResize.js +157 -0
  135. package/es/components/table-filter/src/directive/preventReClick.d.ts +4 -0
  136. package/es/components/table-filter/src/directive/preventReClick.js +14 -0
  137. package/es/components/table-filter/src/directive/resize.d.ts +4 -0
  138. package/es/components/table-filter/src/directive/resize.js +12 -0
  139. package/es/components/table-filter/src/hooks/export.d.ts +1 -0
  140. package/es/components/table-filter/src/hooks/export.js +1 -0
  141. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +28 -0
  142. package/es/components/table-filter/src/hooks/useAdvanced.js +64 -0
  143. package/es/components/table-filter/src/hooks/useMixins.d.ts +60 -0
  144. package/es/components/table-filter/src/hooks/useMixins.js +532 -0
  145. package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +15 -0
  146. package/es/components/table-filter/src/hooks/useRenderWidget.js +94 -0
  147. package/es/components/table-filter/src/hooks/useTableSearchCon.d.ts +8 -0
  148. package/es/components/table-filter/src/hooks/useTableSearchCon.js +131 -0
  149. package/es/components/table-filter/src/hooks/useWordBookutils.d.ts +12 -0
  150. package/es/components/table-filter/src/hooks/useWordBookutils.js +91 -0
  151. package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +1942 -0
  152. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +2038 -0
  153. package/es/components/table-filter/src/tool/generateDefOptions.d.ts +14 -0
  154. package/es/components/table-filter/src/tool/generateDefOptions.js +65 -0
  155. package/es/components/table-filter/src/tool/getWidgetType.d.ts +1 -0
  156. package/es/components/table-filter/src/tool/getWidgetType.js +27 -0
  157. package/es/components/table-filter/src/tool/options.d.ts +18 -0
  158. package/es/components/table-filter/src/tool/options.js +200 -0
  159. package/es/components/table-filter/src/tool/resizeSensor.d.ts +16 -0
  160. package/es/components/table-filter/src/tool/resizeSensor.js +123 -0
  161. package/es/components/table-filter/src/tool/time-domain.d.ts +39 -0
  162. package/es/components/table-filter/src/tool/time-domain.js +100 -0
  163. package/es/components/table-filter/src/tool/transformData.d.ts +92 -0
  164. package/es/components/table-filter/src/tool/transformData.js +169 -0
  165. package/es/components/table-filter/src/tool/utils.d.ts +4 -0
  166. package/es/components/table-filter/src/tool/utils.js +29 -0
  167. package/es/components/table-filter/src/types/enums.d.ts +65 -0
  168. package/es/components/table-filter/src/types/enums.js +67 -0
  169. package/es/components/table-filter/src/types/index.d.ts +483 -0
  170. package/es/components/table-filter/src/types/index.js +1 -0
  171. package/es/components/table-filter/src/types/tool.d.ts +7 -0
  172. package/es/components/table-filter/src/types/tool.js +1 -0
  173. package/es/components/table-filter/style/index.css +1 -0
  174. package/es/shared/assets/img/failure.js +1 -1
  175. package/es/shared/assets/img/failure.png.js +1 -1
  176. package/es/shared/assets/img/icon-asc.js +1 -1
  177. package/es/shared/assets/img/icon-desc.js +1 -1
  178. package/es/shared/assets/img/no-permission.js +1 -1
  179. package/es/shared/assets/img/no-permission.png.js +1 -1
  180. package/es/shared/assets/img/nodata.js +1 -1
  181. package/es/shared/assets/img/nodata.png.js +1 -1
  182. package/es/shared/assets/img/notfound.js +1 -1
  183. package/es/shared/assets/img/notfound.png.js +1 -1
  184. package/es/shared/assets/img/qr.js +1 -1
  185. package/es/shared/assets/img/qr.png.js +1 -1
  186. package/es/shared/assets/img/success.js +1 -1
  187. package/es/shared/assets/img/success.png.js +1 -1
  188. package/es/shared/assets/img/video.js +1 -1
  189. package/es/shared/assets/img/video.png.js +1 -1
  190. package/es/shared/assets/img/video_default_cover.js +1 -1
  191. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  192. package/es/shared/assets/img/video_hover.js +1 -1
  193. package/es/shared/assets/img/video_play_hover.js +1 -1
  194. package/es/shared/assets/img/xb_big.js +1 -1
  195. package/es/shared/assets/img/xb_big.png.js +1 -1
  196. package/es/shared/assets/img/xb_small.js +1 -1
  197. package/es/shared/assets/img/xb_small.png.js +1 -1
  198. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  199. package/es/shared/utils/utilExpand.js +66 -0
  200. package/package.json +3 -3
@@ -0,0 +1,2272 @@
1
+ import { defineComponent, useAttrs, useSlots, ref, inject, computed, onMounted, watch, nextTick, openBlock, createElementBlock, createElementVNode, withDirectives, createCommentVNode, createBlock, unref, normalizeStyle, withCtx, createTextVNode, createVNode, vShow, renderSlot, toDisplayString, Fragment, renderList, withKeys, normalizeClass, withModifiers, mergeProps } from 'vue';
2
+ import moment from 'moment';
3
+ import 'moment/locale/zh-cn';
4
+ import XEUtils from 'xe-utils';
5
+ import Resize from '../directive/resize.js';
6
+ import PreventReClick from '../directive/preventReClick.js';
7
+ import { InjecteditTableWrapper, GROUP_TITLE_KEY } from '../const/index.js';
8
+ import ButtonPrint from '../../../button-print/index.js';
9
+ import outQuickSearch from '../components/out-quick-search/out-quick-search.vue.js';
10
+ import getBtnIcon from '../components/button-icon/getBtnIcon.js';
11
+ import ButtonGroup from '../components/button-group/ButtonGroup.vue.js';
12
+ import RenderWidget from '../components/render-widget/index.vue.js';
13
+ import useMixins from '../hooks/useMixins.js';
14
+ import useTableSearchCon from '../hooks/useTableSearchCon.js';
15
+ import useRenderWidget from '../hooks/useRenderWidget.js';
16
+ import { useDialog, useMessage, NButton, NDropdown, NInputGroup, NInput, NTooltip, NIcon, NUpload } from 'naive-ui';
17
+ import { InformationCircleOutline, Search, ChevronDownOutline, CloudUploadOutline } from '@vicons/ionicons5';
18
+ import script from '../../../../shared/components/SvgIcon/SvgIcon.vue.js';
19
+ import axios from 'axios';
20
+ import { cloneDeep } from 'lodash-es';
21
+ import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.js';
22
+
23
+ const _hoisted_1 = { class: "base-search-block" };
24
+ const _hoisted_2 = { class: "base-container" };
25
+ const _hoisted_3 = {
26
+ key: 0,
27
+ class: "btn-custom-wrap"
28
+ };
29
+ const _hoisted_4 = { key: 1 };
30
+ const _hoisted_5 = { key: 3 };
31
+ const _hoisted_6 = { key: 4 };
32
+ const _hoisted_7 = { key: 5 };
33
+ const _hoisted_8 = { key: 6 };
34
+ const _hoisted_9 = {
35
+ key: 0,
36
+ class: "allBtn",
37
+ ref: "allBtnLi"
38
+ };
39
+ const _hoisted_10 = ["data-key"];
40
+ const _hoisted_11 = ["data-key"];
41
+ const _hoisted_12 = ["data-key"];
42
+ const _hoisted_13 = {
43
+ key: 1,
44
+ class: "rowFoldBtn"
45
+ };
46
+ const _hoisted_14 = {
47
+ key: 0,
48
+ class: "base-tabs"
49
+ };
50
+ const _hoisted_15 = ["onClick"];
51
+ const _sfc_main = /* @__PURE__ */ defineComponent({
52
+ __name: "BaseSearch",
53
+ props: {
54
+ width: {
55
+ type: String,
56
+ default: "400px"
57
+ },
58
+ searchInputWidth: {
59
+ type: Number,
60
+ default: 0
61
+ },
62
+ searchInputPlaceHolder: {
63
+ type: String
64
+ },
65
+ onSearch: {
66
+ type: Function
67
+ },
68
+ rowBtnList: {
69
+ type: Array,
70
+ default: () => []
71
+ },
72
+ paramsData: {
73
+ type: Object
74
+ },
75
+ showButtonTop: {
76
+ type: [String, Number]
77
+ },
78
+ showSettings: {
79
+ type: Object,
80
+ default: () => ({})
81
+ },
82
+ clickRowData: {
83
+ type: Object
84
+ },
85
+ value: {
86
+ type: String
87
+ },
88
+ searchFieldList: {
89
+ type: Array,
90
+ default: () => []
91
+ },
92
+ searchFieldLimit: {
93
+ type: Object,
94
+ default: () => ({})
95
+ },
96
+ viewList: {
97
+ type: Array,
98
+ default: () => []
99
+ },
100
+ TypeOfDisplay: {
101
+ type: String,
102
+ default: ""
103
+ },
104
+ tableAllCheck: {
105
+ type: Boolean
106
+ },
107
+ classificationIndex: {
108
+ type: Number
109
+ },
110
+ editTableSource: {
111
+ type: String,
112
+ default: ""
113
+ },
114
+ showRelatedTreeBtn: {
115
+ type: Boolean
116
+ },
117
+ relatedBaseInfo: {
118
+ type: Object
119
+ },
120
+ onRelatedSearch: {
121
+ type: Function
122
+ },
123
+ showResetFilterBtn: {
124
+ type: Boolean,
125
+ default: false
126
+ },
127
+ qqConObjCount: {
128
+ type: Number,
129
+ default: 0
130
+ },
131
+ conditionType: {
132
+ type: String
133
+ },
134
+ countCondition: {
135
+ type: [Number, String]
136
+ },
137
+ countTabCondition: {
138
+ type: Number
139
+ },
140
+ tabConditionNumObj: {
141
+ type: Object,
142
+ default: () => {
143
+ }
144
+ },
145
+ isRelatedSearchFold: {
146
+ type: Boolean,
147
+ default: true
148
+ },
149
+ tableId: {
150
+ type: String,
151
+ default: ""
152
+ },
153
+ conditionMap: {
154
+ type: Object,
155
+ default: () => {
156
+ }
157
+ },
158
+ getFilterData: {
159
+ type: Function
160
+ },
161
+ oldtableData: {
162
+ type: Array
163
+ },
164
+ isNestTableClick: {
165
+ type: Boolean
166
+ },
167
+ isAdmin: {
168
+ type: Boolean,
169
+ default: false
170
+ },
171
+ importGuageConfig: {
172
+ type: Object,
173
+ default: () => ({
174
+ action: ""
175
+ })
176
+ },
177
+ printConfig: {
178
+ type: Object,
179
+ default: () => ({
180
+ printBaseUrl: "/print/assembly",
181
+ postStepRule: () => Promise.resolve({})
182
+ })
183
+ },
184
+ gettersConfig: {
185
+ type: Object,
186
+ default: () => ({
187
+ getIsTile: false,
188
+ selectRowObj: [],
189
+ isInlineOperating: false,
190
+ printNumberCache: {}
191
+ })
192
+ },
193
+ visibleInlineOperateBtn: {
194
+ type: Boolean,
195
+ default: false
196
+ },
197
+ tabConditionList: {
198
+ type: Array,
199
+ default: () => []
200
+ },
201
+ lastOutSearchFieldList: {
202
+ type: Array,
203
+ default: () => []
204
+ },
205
+ lastOutRelationQuickSearch: {
206
+ type: Array,
207
+ default: () => []
208
+ },
209
+ relationTableList: {
210
+ type: Array,
211
+ default: () => []
212
+ },
213
+ filterApiConfigOutSearch: {
214
+ type: Object,
215
+ default: () => ({})
216
+ },
217
+ useFieldList: {
218
+ type: Array,
219
+ default: () => []
220
+ },
221
+ editTableUid: [String, Number],
222
+ preventReTime: {
223
+ type: Number,
224
+ default: 1e3
225
+ },
226
+ isCardNewBatch: {
227
+ type: Boolean,
228
+ deafult: false
229
+ },
230
+ isBatchSelect: {
231
+ type: [Number, Boolean, String],
232
+ default: ""
233
+ },
234
+ filterApiConfig: {
235
+ type: Object
236
+ }
237
+ },
238
+ emits: [
239
+ "input",
240
+ "tabClick",
241
+ "setIsTile",
242
+ "getQuickSearchListObj",
243
+ "setConditionMap",
244
+ "foldQuickSearch",
245
+ "onSave",
246
+ "clearTeamTitleName",
247
+ "btnEvent",
248
+ "getClassification",
249
+ "changeSearch",
250
+ "reloadList",
251
+ "clickBtn",
252
+ "handlerSetting",
253
+ "handlerChangeView",
254
+ "pubResetCheckStatus",
255
+ "handleReset",
256
+ "changeCardNewBatch",
257
+ "importUpdate",
258
+ "btnEventTree",
259
+ "outSearchInit",
260
+ "setBatchSaveRowStatus",
261
+ "setBatchCancelRowStatus",
262
+ "setPrintNumberCache",
263
+ "input"
264
+ ],
265
+ setup(__props, { emit }) {
266
+ const props = __props;
267
+ const attrs = useAttrs();
268
+ const slots = useSlots();
269
+ const $dialog = useDialog();
270
+ const $message = useMessage();
271
+ const { handleGetConfigApi, $utils, outQuickSearchFn } = useMixins();
272
+ const { validConObj } = useTableSearchCon();
273
+ const { isRender, getRenderSearchConObj, isExistDefValByRenderWidget } = useRenderWidget();
274
+ const BTNOBJ = {
275
+ copy: "copy",
276
+ pencil: "edit",
277
+ delete: "delete",
278
+ add: "plus-circle",
279
+ download: "download",
280
+ label: "tag",
281
+ queding: "check",
282
+ del: "close"
283
+ };
284
+ const baseLeft = ref(null);
285
+ const btnRow = ref(null);
286
+ const inputSearchLi = ref(null);
287
+ const quickSearchLi = ref(null);
288
+ ref(null);
289
+ ref(null);
290
+ const rowTileBtnItem = ref([]);
291
+ const relatedSearchInput = ref(null);
292
+ const baseSearchPlaceholderSpan = ref(null);
293
+ ref(null);
294
+ const editTableWrapper = inject(InjecteditTableWrapper, ref({ options: {} }));
295
+ const modalVisible = ref(false);
296
+ const currentTempId = ref("0");
297
+ ref([]);
298
+ const isTile = ref(false);
299
+ ref([]);
300
+ ref([]);
301
+ ref("");
302
+ ref("");
303
+ const rowTileBtnList = ref([]);
304
+ const rowFoldBtnList = ref([]);
305
+ const rowPrintBtnList = ref([]);
306
+ const rowFoldHideBtnList = ref([]);
307
+ const rowFoldHideBtnListObj = ref();
308
+ const batchRelationBtnIds = ref([]);
309
+ const relationBtnBatchBtnIds = ref([]);
310
+ const nobutton1 = ref(false);
311
+ const noSetting1 = ref(false);
312
+ ref(false);
313
+ ref("700px");
314
+ ref("60vh");
315
+ ref(8);
316
+ const baseLeftWidth = ref(0);
317
+ const btnRowWidth = ref(0);
318
+ const classificationWidth = ref(0);
319
+ const inputSearchWidth = ref(0);
320
+ const quickSearchWidth = ref(0);
321
+ ref(0);
322
+ const diffWidth = ref(0);
323
+ const resizeFlag = ref(false);
324
+ const rowTileBtnListTree = ref([]);
325
+ const outSearchFieldList = ref([]);
326
+ const tabIndex = ref(-1);
327
+ const printBtnPrevFnWatch = ref({});
328
+ const printPrevFinish = ref(false);
329
+ const printBtnPrevFnWatchTimeoutTimer = ref(null);
330
+ const printBtn = ref({});
331
+ const groupBtnObj = ref({});
332
+ const btnObj = ref(BTNOBJ);
333
+ const printBtnStrategys = ref([]);
334
+ const outRelationQuickSearch = ref([]);
335
+ const inputSearchW = ref(200);
336
+ const showPlaceholderPrefix = ref(false);
337
+ const isOrgAdmin = computed(() => props.isAdmin);
338
+ const currentValue = computed(() => props.value);
339
+ const allBtn = computed(() => {
340
+ let allBtnVal = [];
341
+ allBtnVal.push(...rowTileBtnList.value, ...rowFoldBtnList.value);
342
+ return allBtnVal;
343
+ });
344
+ const isButtonFolding = computed(() => {
345
+ var _a, _b;
346
+ return ((_b = (_a = editTableWrapper.value) == null ? void 0 : _a.options) == null ? void 0 : _b.isButtonFolding) || false;
347
+ });
348
+ const isShowSettingBtn = computed(() => {
349
+ if (props.showRelatedTreeBtn)
350
+ return;
351
+ return attrs.isTree != 1 && props.viewList.length > 0 && !noSetting1.value;
352
+ });
353
+ const showDownCurSelectData = computed(() => {
354
+ var _a;
355
+ return (_a = selectRowObj.value.filter((item) => !(GROUP_TITLE_KEY in (item || {})))) == null ? void 0 : _a.length;
356
+ });
357
+ const showRowFoldBtnList = computed(() => {
358
+ return function(list, key) {
359
+ if (key === "rowFoldBtnList" && !isShowSetting("buttonAdaption"))
360
+ return false;
361
+ if (!list || !list.length)
362
+ return false;
363
+ let hasGroupBtnList = list.filter((item) => item.buttonGroup);
364
+ if (hasGroupBtnList.length) {
365
+ let showGroup = hasGroupBtnList.some((item) => item.isShowFoldGroupBtn);
366
+ if (showGroup)
367
+ return true;
368
+ }
369
+ if (list.length === 1 && list[0].buttonGroup && list[0].isButtonGroup && !list[0].isShowFoldGroupBtn)
370
+ return false;
371
+ let visibleList = list.filter((item) => item.isVisible && !item.buttonGroup);
372
+ if (!visibleList || !visibleList.length)
373
+ return false;
374
+ let hasAdd = visibleList.some((item) => item.type === "ADD");
375
+ if (hasAdd) {
376
+ return true;
377
+ } else {
378
+ if (currentTempId.value != "0")
379
+ return false;
380
+ let notLinkArr = visibleList.filter((item) => item.type !== "LINK");
381
+ if (!notLinkArr || !notLinkArr.length)
382
+ return false;
383
+ }
384
+ return true;
385
+ };
386
+ });
387
+ const initPageResize = computed(() => {
388
+ return {
389
+ showSettings: props.showSettings,
390
+ TypeOfDisplay: props.TypeOfDisplay,
391
+ classificationIndex: props.classificationIndex
392
+ };
393
+ });
394
+ const isShowRowTileBtnItem = computed(() => {
395
+ return function(item) {
396
+ return props.showButtonTop == 1 && item.type != "LINK" && currentTempId.value == "0";
397
+ };
398
+ });
399
+ computed(() => {
400
+ if (!isShowSettingBtn.value && !isShowSetting("hideQuickSearch") && outSearchFieldList.value.length == 0 && outRelationQuickSearch.value.length == 0 && !props.showResetFilterBtn && !slots.classification) {
401
+ return false;
402
+ } else {
403
+ return props.isRelatedSearchFold;
404
+ }
405
+ });
406
+ computed(() => {
407
+ return function(item) {
408
+ if (!item.showTime)
409
+ return false;
410
+ return {
411
+ defaultValue: [moment("00:00:00", "HH:mm:ss"), moment("23:59:59", "HH:mm:ss")]
412
+ };
413
+ };
414
+ });
415
+ const isShowGroupBtn = computed(() => {
416
+ if (!groupBtnObj.value || !Object.keys(groupBtnObj.value).length)
417
+ return false;
418
+ return true;
419
+ });
420
+ const showLi = computed(() => {
421
+ return function(item) {
422
+ if (item.buttonGroup) {
423
+ return item.isShow == 1 && item.buttonGroup && !item.isButtonGroup;
424
+ }
425
+ return item.isShow == 1;
426
+ };
427
+ });
428
+ const showLiAdd = computed(() => {
429
+ return function(b) {
430
+ if (b.buttonGroup) {
431
+ return b.type == "ADD" && b.buttonGroup && !b.isButtonGroup;
432
+ }
433
+ return b.type == "ADD";
434
+ };
435
+ });
436
+ const showLiFold = computed(() => {
437
+ return function(b) {
438
+ if (b.buttonGroup) {
439
+ return b.type != "LINK" && currentTempId.value == "0" && b.buttonGroup && !b.isButtonGroup;
440
+ }
441
+ return b.type != "LINK" && currentTempId.value == "0";
442
+ };
443
+ });
444
+ const getIsTile = computed(() => {
445
+ var _a;
446
+ return ((_a = props == null ? void 0 : props.gettersConfig) == null ? void 0 : _a.getIsTile) || false;
447
+ });
448
+ const selectRowObj = computed(() => {
449
+ var _a;
450
+ return ((_a = props == null ? void 0 : props.gettersConfig) == null ? void 0 : _a.selectRowObj) || "";
451
+ });
452
+ const isInlineOperating = computed(() => {
453
+ var _a;
454
+ return ((_a = props == null ? void 0 : props.gettersConfig) == null ? void 0 : _a.isInlineOperating) || false;
455
+ });
456
+ const printNumberCache = computed(() => {
457
+ var _a;
458
+ return ((_a = props == null ? void 0 : props.gettersConfig) == null ? void 0 : _a.printNumberCache) || false;
459
+ });
460
+ computed(() => {
461
+ var _a;
462
+ return ((_a = props == null ? void 0 : props.gettersConfig) == null ? void 0 : _a.isBatchEditing) || false;
463
+ });
464
+ const curBatchBtnData = computed(() => {
465
+ var _a;
466
+ return ((_a = props == null ? void 0 : props.gettersConfig) == null ? void 0 : _a.curBatchBtnData) || {};
467
+ });
468
+ const isRowEditing = computed(() => {
469
+ var _a;
470
+ return ((_a = props == null ? void 0 : props.gettersConfig) == null ? void 0 : _a.isRowEditing) || false;
471
+ });
472
+ const showOutSearch = computed(() => {
473
+ var _a, _b;
474
+ return ((_a = outSearchFieldList.value) == null ? void 0 : _a.length) || ((_b = outRelationQuickSearch.value) == null ? void 0 : _b.length);
475
+ });
476
+ const showViewList = computed(() => {
477
+ var _a;
478
+ if (props.editTableSource === "relatedComponent") {
479
+ return ((_a = props.relatedBaseInfo) == null ? void 0 : _a.showType) != "TREE";
480
+ }
481
+ return !optionsValue.value("hideViewList");
482
+ });
483
+ const optionsValue = computed(() => {
484
+ return function(key) {
485
+ var _a;
486
+ return (_a = attrs.tableOptions) == null ? void 0 : _a[key];
487
+ };
488
+ });
489
+ const searchPlaceHolder = computed(() => {
490
+ var _a, _b;
491
+ if (props.searchInputPlaceHolder)
492
+ return props.searchInputPlaceHolder;
493
+ if (!((_a = props.useFieldList) == null ? void 0 : _a.length) || props.showRelatedTreeBtn)
494
+ return "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22";
495
+ let str = "";
496
+ let strList = (_b = props.useFieldList) == null ? void 0 : _b.map((item) => {
497
+ if (item.isSearch != 1)
498
+ return "";
499
+ return (item == null ? void 0 : item.formTitle) || item.alias || item.title;
500
+ }).filter(Boolean);
501
+ if (!(strList == null ? void 0 : strList.length))
502
+ return "";
503
+ str = "\u8F93\u5165" + strList.join("/");
504
+ return str || "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22";
505
+ });
506
+ const showRelatedSearch = computed(() => {
507
+ return props.showRelatedTreeBtn && isShowSetting("hideSearch");
508
+ });
509
+ const showQuickSearch = computed(() => {
510
+ var _a;
511
+ let showQuick = isShowSetting("hideQuickSearch");
512
+ if (props.editTableSource == "relatedComponent" && ((_a = props.relatedBaseInfo) == null ? void 0 : _a.showType) != "TREE")
513
+ return showQuick;
514
+ return showQuick && props.isRelatedSearchFold;
515
+ });
516
+ const showBaseTabs = computed(() => {
517
+ var _a;
518
+ return props.conditionType === "keyword" && ((_a = props.tabConditionList) == null ? void 0 : _a.length) && !props.visibleInlineOperateBtn && !isRowEditing.value;
519
+ });
520
+ const isCard = computed(() => {
521
+ return props.TypeOfDisplay === "cardNew" && props.isBatchSelect == 1;
522
+ });
523
+ onMounted(() => {
524
+ if (getIsTile.value !== void 0) {
525
+ isTile.value = getIsTile.value;
526
+ }
527
+ });
528
+ function setRowTileBtnItem(el) {
529
+ rowTileBtnItem.value.push(el);
530
+ }
531
+ function tabClick(index) {
532
+ if (tabIndex.value === index)
533
+ return false;
534
+ tabIndex.value = index;
535
+ if (index !== -1)
536
+ emit("tabClick", props.tabConditionList[index]);
537
+ }
538
+ function pageResize(obj) {
539
+ var _a, _b, _c;
540
+ if (resizeFlag.value || props.visibleInlineOperateBtn || isRowEditing.value)
541
+ return;
542
+ let baseLeftRef = baseLeft.value;
543
+ if (!baseLeftRef)
544
+ return;
545
+ resizeFlag.value = true;
546
+ baseLeftWidth.value = baseLeftRef.clientWidth;
547
+ classificationWidth.value = props.classificationIndex === 2 ? 160 : 0;
548
+ btnRowWidth.value = ((_a = btnRow.value) == null ? void 0 : _a.clientWidth) || 0;
549
+ inputSearchWidth.value = ((_b = inputSearchLi.value) == null ? void 0 : _b.clientWidth) || 0;
550
+ quickSearchWidth.value = ((_c = quickSearchLi.value) == null ? void 0 : _c.clientWidth) || 0;
551
+ let defaultTotal = btnRowWidth.value + classificationWidth.value + inputSearchWidth.value + quickSearchWidth.value;
552
+ let diffWidthVal = baseLeftWidth.value - defaultTotal;
553
+ if (props.editTableSource === "relatedComponent") {
554
+ diffWidthVal += baseLeftWidth.value;
555
+ }
556
+ diffWidth.value = diffWidthVal;
557
+ if (!obj.type)
558
+ return;
559
+ if (obj.type === "resize") {
560
+ handleTileBtnWidth();
561
+ }
562
+ }
563
+ function onResize() {
564
+ if (isButtonFolding.value || isShowSetting("buttonAdaption") || props.visibleInlineOperateBtn || isRowEditing.value)
565
+ return;
566
+ XEUtils.debounce(pageResize({ type: "resize" }), 300);
567
+ }
568
+ function foldQuickSearch() {
569
+ emit("foldQuickSearch", true);
570
+ }
571
+ function onSave(obj, isOutFilter = false, config = {}) {
572
+ if (!validConObj(obj, props.searchFieldList, props.searchFieldLimit))
573
+ return false;
574
+ let copy = [];
575
+ if (outSearchFieldList.value.length) {
576
+ copy = cloneDeep(outSearchFieldList.value);
577
+ }
578
+ let copyRelation = [];
579
+ if (outRelationQuickSearch.value.length) {
580
+ copyRelation = cloneDeep(outRelationQuickSearch.value);
581
+ }
582
+ emit("onSave", obj, isOutFilter, copy, copyRelation, config);
583
+ modalVisible.value = false;
584
+ }
585
+ function showDrawer(btn, j) {
586
+ let hasSelectRows = props.paramsData.form.selectRows && props.paramsData.form.selectRows.length > 0;
587
+ let isMultiSelect = hasSelectRows || props.tableAllCheck;
588
+ if (btn.name.includes("\u6279\u91CF") && btn.type == "ADD" || btn.type == "BATCH") {
589
+ let settingObj = {};
590
+ let settingList = btn.setting || "{}";
591
+ if ($utils.isJSON(settingList)) {
592
+ let btnSetting = JSON.parse(settingList);
593
+ if (Array.isArray(btnSetting)) {
594
+ settingObj = btnSetting[0] || {};
595
+ } else {
596
+ settingObj = btnSetting;
597
+ }
598
+ }
599
+ let trigger_type = settingObj == null ? void 0 : settingObj.trigger_type;
600
+ if (trigger_type == "EDIT_ROW" || (settingObj == null ? void 0 : settingObj.editAllRow) == 1) {
601
+ handleBtnEvent(btn, j);
602
+ return;
603
+ }
604
+ if (trigger_type == "SCAN" && btn.type == "ADD") {
605
+ handleBtnEvent(btn, j);
606
+ return;
607
+ }
608
+ if (isMultiSelect) {
609
+ if (settingObj.isTips && settingObj.isTips == "0") {
610
+ handleBtnEvent(btn, j);
611
+ return;
612
+ }
613
+ let params = { ...props.paramsData };
614
+ params.table = {};
615
+ if (settingObj.tipsMsg) {
616
+ if (settingObj.tipsMsg.includes("form.selectRows")) {
617
+ settingObj.tipsMsg = XEUtils.handleMultiTips(settingObj.tipsMsg, [...params.form.selectRows]);
618
+ } else {
619
+ settingObj.tipsMsg = XEUtils.handleSysParams(settingObj.tipsMsg, {
620
+ ...params
621
+ });
622
+ }
623
+ }
624
+ $dialog.info({
625
+ title: settingObj.tipsMsg || `\u662F\u5426\u786E\u8BA4${btn.name}`,
626
+ positiveText: "\u786E\u5B9A",
627
+ negativeText: "\u53D6\u6D88",
628
+ maskClosable: false,
629
+ onPositiveClick: () => {
630
+ handleBtnEvent(btn, j);
631
+ },
632
+ onNegativeClick: () => {
633
+ console.log("Cancel");
634
+ },
635
+ class: "test"
636
+ });
637
+ } else {
638
+ if (!btn.canHandleUniline) {
639
+ $message.warning(`\u8BF7\u52FE\u9009\u9700\u8981${btn.name}\u7684\u6570\u636E`);
640
+ return;
641
+ }
642
+ clickBtn(
643
+ props.clickRowData,
644
+ getUnilineBtn(btn),
645
+ props.clickRowData.my_index,
646
+ true,
647
+ j
648
+ );
649
+ }
650
+ } else {
651
+ if (btn.type == "ADD" || btn.type == "BATCH") {
652
+ handleBtnEvent(btn, j);
653
+ return;
654
+ }
655
+ clickBtn(props.clickRowData, btn, props.clickRowData.my_index, false, j);
656
+ }
657
+ }
658
+ function getUnilineBtn(BatchBtn) {
659
+ let unilineBtnId = batchRelationBtnIds.value[relationBtnBatchBtnIds.value.indexOf(BatchBtn.id)];
660
+ let unilineBtnObj = null;
661
+ allBtn.value.forEach((i) => {
662
+ if (i.id == unilineBtnId) {
663
+ unilineBtnObj = i;
664
+ }
665
+ });
666
+ return unilineBtnObj;
667
+ }
668
+ function handleBtnEvent(btn, j) {
669
+ let indexList = [];
670
+ emit("clearTeamTitleName");
671
+ if (props.paramsData.form.selectRows && props.paramsData.form.selectRows.length > 0) {
672
+ indexList = props.paramsData.form.selectRows.map((item) => {
673
+ if (btn.type == "BATCH") {
674
+ delete item.SHOW_BUTTON_IDS;
675
+ delete item.operatorColumn;
676
+ }
677
+ return item.my_index;
678
+ });
679
+ }
680
+ let setData = JSON.parse(btn.setting);
681
+ let settingList = JSON.parse(btn.setting);
682
+ if (btn.type === "ADD" || btn.type == "BATCH") {
683
+ if (Array.isArray(settingList)) {
684
+ setData = settingList[0] || {};
685
+ } else {
686
+ setData = settingList;
687
+ }
688
+ props.paramsData.table = {};
689
+ }
690
+ if (setData.trigger_type == "ABOUT_ITEM") {
691
+ $message.error("\u6309\u94AE\u4E8B\u4EF6\u914D\u7F6E\u6709\u8BEF");
692
+ return;
693
+ }
694
+ let params = setData.params || [];
695
+ if (setData.trigger_type == "QR_CODE") {
696
+ params.forEach((item) => {
697
+ var _a;
698
+ item.p_value = (_a = item.p_value) == null ? void 0 : _a.replace(/\$\{([^}]+)\}/g, (_v, $1) => {
699
+ return $1 || _v;
700
+ });
701
+ });
702
+ }
703
+ let paramsDataVal = XEUtils.setParamsValue(params, props.paramsData);
704
+ Object.assign(btn, {
705
+ _index_: j
706
+ });
707
+ let btnData = {
708
+ btnData: Object.assign(setData, {
709
+ paramsData: paramsDataVal,
710
+ btnName: btn.name,
711
+ _params_data: props.paramsData,
712
+ _type_: btn.type
713
+ }),
714
+ indexList,
715
+ btnConfig: JSON.parse(JSON.stringify(btn)),
716
+ _params_data: props.paramsData,
717
+ _type_: btn.type
718
+ };
719
+ emit("btnEvent", btnData);
720
+ }
721
+ function clickBtn(data, item, index, skip, j) {
722
+ emit("clearTeamTitleName");
723
+ if (item.name.includes("\u6279\u91CF") && item.type == "ADD" && !skip || item.type == "BATCH" && !skip) {
724
+ showDrawer(item, j);
725
+ return;
726
+ }
727
+ if (Object.keys(data || {}).length === 0 && !isPrintBtn(item)) {
728
+ $message.info("\u8BF7\u70B9\u51FB\u8981\u64CD\u4F5C\u7684\u6570\u636E");
729
+ return;
730
+ }
731
+ Object.assign(item, {
732
+ _index_: j
733
+ });
734
+ emit("clickBtn", data, item, index);
735
+ }
736
+ function handleDropdown(key, item) {
737
+ const index = allBtn.value.findIndex((btn) => btn.sid == item.sid);
738
+ if (item.type == "ADD") {
739
+ showDrawer(item, index);
740
+ } else if (props.showButtonTop == 1 && item.type != "LINK" && currentTempId.value == "0") {
741
+ clickBtn(props.clickRowData, item, props.clickRowData.my_index, false, index);
742
+ }
743
+ }
744
+ function handlerOperate(key, item) {
745
+ const index = rowFoldBtnList.value.findIndex((btn) => btn.sid == item.sid);
746
+ if (showLiAdd.value(item) && visibleBtn(item)) {
747
+ showDrawer(item, index);
748
+ } else if (showLiFold.value(item) && visibleBtn(item)) {
749
+ clickBtn(props.clickRowData, item, props.clickRowData.my_index, false, index);
750
+ }
751
+ }
752
+ function handlerBtnlist(key, item, list) {
753
+ const innerIndex = list.findIndex((result) => result.sid == item.sid);
754
+ if (item.type == "ADD" && visibleBtn(item)) {
755
+ showDrawer(item, innerIndex);
756
+ } else if (item.type != "LINK" && currentTempId.value == "0" && visibleBtn(item)) {
757
+ clickBtn(props.clickRowData, item, props.clickRowData.my_index, false, innerIndex);
758
+ }
759
+ }
760
+ function clickGroupBtn(btn, j) {
761
+ clickBtn(props.clickRowData, btn, props.clickRowData.my_index, false, j);
762
+ }
763
+ function handlerSetting() {
764
+ emit("handlerSetting");
765
+ }
766
+ function handlerSelectTemp(e, item) {
767
+ if (currentTempId.value === e)
768
+ return;
769
+ currentTempId.value = e;
770
+ const tab = e == "0" ? "bigTable" : null;
771
+ emit("handlerChangeView", e, tab);
772
+ props.viewList.findIndex((v) => v.id == e);
773
+ resetCheckStatus();
774
+ nextTick(() => {
775
+ formatRowBtnList();
776
+ });
777
+ }
778
+ function isShowSetting(v) {
779
+ var _a;
780
+ if (v == "hideSettingBtn") {
781
+ return isOrgAdmin.value || props.showSettings[v] == 0;
782
+ } else {
783
+ if (props.showRelatedTreeBtn) {
784
+ return ((_a = props.relatedBaseInfo) == null ? void 0 : _a[v]) == 0;
785
+ }
786
+ return props.showSettings[v] == 0;
787
+ }
788
+ }
789
+ function setBatchRelationBtnIds(list) {
790
+ let showButtonTopVal = !!props.showButtonTop;
791
+ if (!showButtonTopVal)
792
+ return false;
793
+ list.forEach((item) => {
794
+ var _a;
795
+ let relationBtnId = item.setting && ((_a = JSON.parse(item.setting)) == null ? void 0 : _a.relationBtnId);
796
+ if (item.type === "BATCH" && relationBtnId) {
797
+ relationBtnBatchBtnIds.value.push(item.id);
798
+ batchRelationBtnIds.value.push(relationBtnId);
799
+ }
800
+ });
801
+ }
802
+ function setBtnStatus(btn) {
803
+ const btnObjVal = $utils.getRowOperatorIdSetting({}, btn);
804
+ const { settingObj = {} } = btnObjVal || {};
805
+ let isAllSelect = props.tableAllCheck;
806
+ let isMultiSelect = !!props.paramsData.form.selectIds;
807
+ let isBatchBtn = btn.type === "BATCH";
808
+ let isAddBtn = btn.type === "ADD";
809
+ let isSQLSAVEBtn = settingObj.trigger_type === "SQLSAVE";
810
+ let isLineBtn = btn.type === "EDIT" || btn.type === "DELETE";
811
+ let isImportGuage = settingObj.trigger_type === "GUAGE" && settingObj.guage_type == "importGuage";
812
+ let isEditRow = settingObj.trigger_type === "EDIT_ROW";
813
+ let editAllRow = settingObj.editAllRow == 1;
814
+ if (isBatchBtn && isEditRow && editAllRow) {
815
+ btn.isVisible = true;
816
+ return;
817
+ }
818
+ if (!showDownCurSelectData.value) {
819
+ btn.isVisible = isAddBtn ? true : false;
820
+ if (!isImportGuage)
821
+ return;
822
+ }
823
+ if (isBatchBtn && isAllSelect) {
824
+ btn.isVisible = isSQLSAVEBtn;
825
+ return;
826
+ }
827
+ let relationBtnId = JSON.parse(btn.setting).relationBtnId;
828
+ if (isBatchBtn && relationBtnId) {
829
+ btn.canHandleUniline = true;
830
+ }
831
+ if (showDownCurSelectData.value > 1 && isLineBtn) {
832
+ btn.isVisible = false;
833
+ } else {
834
+ if (isBatchBtn && btn.chooseTwoData == "1") {
835
+ btn.isVisible = !batchRelationBtnIds.value.includes(btn.id) && showDownCurSelectData.value > 1;
836
+ } else {
837
+ btn.isVisible = !batchRelationBtnIds.value.includes(btn.id);
838
+ }
839
+ }
840
+ if (isBatchBtn && !relationBtnId && showDownCurSelectData.value > 1) {
841
+ btn.isVisible = isMultiSelect;
842
+ }
843
+ if (isImportGuage) {
844
+ btn.isImportGuage = true;
845
+ btn.isVisible = false;
846
+ }
847
+ }
848
+ function handleButtonGroup(buttonList) {
849
+ let useBttonList = buttonList.map((v) => {
850
+ v.isButtonGroup = false;
851
+ if (!v.buttonGroup || !v.isVisible || v.isShow != 1)
852
+ return null;
853
+ if (v.type === "ADD" || v.type == "BATCH")
854
+ return v;
855
+ if (props.showButtonTop != 1)
856
+ return null;
857
+ return v;
858
+ }).filter(Boolean);
859
+ if (!useBttonList.length)
860
+ return;
861
+ let groupRes = XEUtils.groupBy(useBttonList, "buttonGroup");
862
+ if (!groupRes || !Object.keys(groupRes).length)
863
+ return;
864
+ let resObj = {};
865
+ Object.keys(groupRes).forEach((item) => {
866
+ let list = groupRes[item];
867
+ if (item && (list == null ? void 0 : list.length) > 1) {
868
+ resObj[item] = {
869
+ key: item,
870
+ isHide: false,
871
+ list,
872
+ clientWidth: 0,
873
+ isVisible: true
874
+ };
875
+ list.forEach((v) => v.isButtonGroup = true);
876
+ }
877
+ });
878
+ groupBtnObj.value = resObj;
879
+ }
880
+ async function formatRowBtnList() {
881
+ let rowFoldBtnListVal = [];
882
+ let rowTileBtnListVal = [];
883
+ let rowPrintBtnListVal = [];
884
+ rowFoldBtnList.value = [];
885
+ rowTileBtnList.value = [];
886
+ rowPrintBtnList.value = [];
887
+ rowFoldHideBtnList.value = [];
888
+ batchRelationBtnIds.value = [];
889
+ relationBtnBatchBtnIds.value = [];
890
+ groupBtnObj.value = {};
891
+ let useButton = [];
892
+ let rowBtnListVal = props.rowBtnList;
893
+ if (isCard.value) {
894
+ if (props.isCardNewBatch) {
895
+ rowBtnListVal = rowBtnListVal.map((v) => {
896
+ if (v.type == "BATCH")
897
+ return v;
898
+ return null;
899
+ }).filter(Boolean);
900
+ } else {
901
+ rowBtnListVal = rowBtnListVal.map((v) => {
902
+ if (v.type != "BATCH")
903
+ return v;
904
+ return null;
905
+ }).filter(Boolean);
906
+ }
907
+ }
908
+ if (!(rowBtnListVal == null ? void 0 : rowBtnListVal.length))
909
+ return;
910
+ setBatchRelationBtnIds(rowBtnListVal);
911
+ rowBtnListVal.forEach((btn) => {
912
+ if (!(btn.isShow == 1 && btn.type != "LINK"))
913
+ return;
914
+ btn.isHide = false;
915
+ btn.isButtonGroup = false;
916
+ let cloneBtn = cloneDeep(btn);
917
+ setBtnStatus(cloneBtn);
918
+ if (isShowSetting("buttonAdaption")) {
919
+ if (btn.toggle == "fold") {
920
+ if (btn.type != "ADD" && btn.type != "BATCH" && props.showButtonTop == 0)
921
+ return;
922
+ if (!isPrintBtn(btn)) {
923
+ rowFoldBtnListVal.push(cloneBtn);
924
+ }
925
+ } else {
926
+ rowTileBtnListVal.push(cloneBtn);
927
+ }
928
+ } else {
929
+ rowTileBtnListVal.push(cloneBtn);
930
+ }
931
+ useButton.push(cloneBtn);
932
+ });
933
+ if (isShowSetting("buttonAdaption")) {
934
+ rowFoldBtnList.value = rowFoldBtnListVal;
935
+ }
936
+ rowTileBtnList.value = rowTileBtnListVal.filter((i) => {
937
+ if (isPrintBtn(i)) {
938
+ rowPrintBtnListVal.push(i);
939
+ } else {
940
+ return i;
941
+ }
942
+ });
943
+ let printNumberList = await getPrintNumber(rowPrintBtnListVal) || [];
944
+ rowPrintBtnListVal = setPrintNumberToBtnList(printNumberList, rowPrintBtnListVal);
945
+ rowPrintBtnList.value = rowPrintBtnListVal.map((item) => {
946
+ const obj = printBtnStrategys.value.find((v) => v.id === item.settingObj[0].trigger_id);
947
+ item.strategy = (obj == null ? void 0 : obj.setting) ? JSON.parse(obj.setting).strategy : "MULTI";
948
+ return item;
949
+ });
950
+ hideInlineOperationBtn();
951
+ handleButtonGroup(useButton);
952
+ if (isShowSetting("buttonAdaption"))
953
+ return;
954
+ nextTick(() => {
955
+ handleTileBtnWidth();
956
+ dealOutFilterHideBtn();
957
+ });
958
+ }
959
+ function hideInlineOperationBtn() {
960
+ if (props.TypeOfDisplay === "table")
961
+ return;
962
+ rowFoldBtnList.value = rowFoldBtnList.value.filter((item) => {
963
+ return item.settingObj[0].trigger_type !== "EDIT_ROW";
964
+ });
965
+ rowTileBtnList.value = rowTileBtnList.value.filter((item) => {
966
+ return item.settingObj[0].trigger_type !== "EDIT_ROW";
967
+ });
968
+ }
969
+ function isPrintBtn(btn) {
970
+ const copySettingObj = btn.settingObj;
971
+ let settingObj = {};
972
+ if (Array.isArray(copySettingObj)) {
973
+ settingObj = copySettingObj[0];
974
+ } else {
975
+ settingObj = copySettingObj;
976
+ }
977
+ if (!settingObj)
978
+ return false;
979
+ return settingObj.trigger_type === "PRINT";
980
+ }
981
+ function handleTileBtnWidth() {
982
+ if (outSearchFieldList.value.length > 0)
983
+ return;
984
+ let rowTileBtnRef = rowTileBtnItem.value;
985
+ if (!rowTileBtnRef || !rowTileBtnRef.length)
986
+ return;
987
+ let rowTileBtnListVal = JSON.parse(JSON.stringify(rowTileBtnList.value));
988
+ let groupBtnObjVal = JSON.parse(JSON.stringify(groupBtnObj.value));
989
+ let btnTotalWidth = 90;
990
+ let hasHideBtn = false;
991
+ let rowFoldHideBtnWidth = 90;
992
+ let diffWidthVal = diffWidth.value;
993
+ rowTileBtnRef.forEach((e, index) => {
994
+ let dataKey = e.getAttribute("data-key");
995
+ let dateSource = e.getAttribute("data-source");
996
+ let clientWidth = e.clientWidth;
997
+ let item;
998
+ if (dateSource == "groupBtn") {
999
+ item = groupBtnObjVal[dataKey];
1000
+ } else {
1001
+ item = rowTileBtnListVal.find((v) => v.sid === dataKey);
1002
+ }
1003
+ if (!item)
1004
+ return;
1005
+ if (clientWidth) {
1006
+ item.clientWidth = clientWidth;
1007
+ }
1008
+ if (item.clientWidth) {
1009
+ clientWidth = item.clientWidth;
1010
+ }
1011
+ if (diffWidthVal <= 0) {
1012
+ item.isHide = true;
1013
+ } else if (diffWidthVal > 0 && item.isVisible) {
1014
+ btnTotalWidth += clientWidth;
1015
+ if (btnTotalWidth > diffWidthVal) {
1016
+ item.isHide = true;
1017
+ if (!hasHideBtn) {
1018
+ hasHideBtn = true;
1019
+ diffWidthVal -= rowFoldHideBtnWidth;
1020
+ btnTotalWidth -= rowFoldHideBtnWidth;
1021
+ }
1022
+ } else {
1023
+ item.isHide = true;
1024
+ }
1025
+ }
1026
+ });
1027
+ let hideBtn = rowTileBtnListVal.filter((item) => item.isVisible && item.isHide);
1028
+ groupBtnObj.value = groupBtnObjVal;
1029
+ rowTileBtnList.value = rowTileBtnListVal;
1030
+ let rowFoldHideBtnListObjVal = {
1031
+ ADD: { name: "\u65B0\u589E\u6309\u94AE", children: [] },
1032
+ INLINE: { name: "\u884C\u7EA7\u6309\u94AE", children: [] },
1033
+ BATCH: { name: "\u6279\u91CF\u6309\u94AE", children: [] }
1034
+ };
1035
+ hideBtn.forEach((item) => {
1036
+ item.isShowFoldGroupBtn = false;
1037
+ if (item.type === "ADD") {
1038
+ rowFoldHideBtnListObjVal.ADD.children.push(item);
1039
+ } else if (item.type == "BATCH") {
1040
+ rowFoldHideBtnListObjVal.BATCH.children.push(item);
1041
+ } else {
1042
+ rowFoldHideBtnListObjVal.INLINE.children.push(item);
1043
+ }
1044
+ });
1045
+ let hideGroupBtnObj = {};
1046
+ for (let key in groupBtnObjVal) {
1047
+ if (groupBtnObjVal[key].isHide) {
1048
+ let list = groupBtnObjVal[key].list;
1049
+ hideGroupBtnObj[key] = {
1050
+ name: key,
1051
+ list
1052
+ };
1053
+ list.forEach((item) => {
1054
+ let matchItem = hideBtn.find((v) => v.sid === item.sid);
1055
+ if (!matchItem) {
1056
+ item.isShowFoldGroupBtn = true;
1057
+ hideBtn.push(item);
1058
+ } else {
1059
+ matchItem.isShowFoldGroupBtn = true;
1060
+ }
1061
+ });
1062
+ }
1063
+ }
1064
+ if (Object.keys(hideGroupBtnObj).length) {
1065
+ Object.assign(rowFoldHideBtnListObjVal, hideGroupBtnObj);
1066
+ }
1067
+ rowFoldHideBtnListObj.value = rowFoldHideBtnListObjVal;
1068
+ rowFoldHideBtnList.value = hideBtn;
1069
+ resizeFlag.value = false;
1070
+ }
1071
+ function resetCheckStatus() {
1072
+ emit("pubResetCheckStatus");
1073
+ }
1074
+ function handleReset() {
1075
+ emit("handleReset", { targetType: "outQuickSearchReset" });
1076
+ }
1077
+ function changeCardNewBatch(val) {
1078
+ emit("changeCardNewBatch", val);
1079
+ }
1080
+ function handleUploadChange(info) {
1081
+ var _a;
1082
+ const { file, fileList } = info;
1083
+ if (file.status !== "uploading") {
1084
+ console.log(file, fileList);
1085
+ }
1086
+ if (file.status === "done") {
1087
+ if (((_a = file.response) == null ? void 0 : _a.result) == "SUCCESS") {
1088
+ $message.success(`${file.name} \u5BFC\u5165\u6210\u529F`);
1089
+ emit("importUpdate");
1090
+ } else {
1091
+ $message.error(`${file.name} \u5BFC\u5165\u5931\u8D25`);
1092
+ }
1093
+ } else if (file.status === "error") {
1094
+ $message.error(`${file.name} \u5BFC\u5165\u5931\u8D25`);
1095
+ }
1096
+ }
1097
+ function handleOtherConfigInit() {
1098
+ setTimeout(() => {
1099
+ var _a;
1100
+ let tableOptions = (attrs == null ? void 0 : attrs.tableOptions) || {};
1101
+ const { nobutton = false, TypeOfDisplay = "", noSetting = false } = (tableOptions == null ? void 0 : tableOptions.config) || {};
1102
+ nobutton1.value = nobutton || false;
1103
+ if (((_a = tableOptions == null ? void 0 : tableOptions.config) == null ? void 0 : _a.TypeOfDisplay) === "table") {
1104
+ currentTempId.value = "0";
1105
+ }
1106
+ if (noSetting) {
1107
+ noSetting1.value = true;
1108
+ }
1109
+ }, 16);
1110
+ }
1111
+ function handleAddType(key, btn) {
1112
+ var _a, _b, _c, _d, _e;
1113
+ const btnObjVal = $utils.getRowOperatorIdSetting({}, btn);
1114
+ let setData = JSON.parse(btnObjVal.setting);
1115
+ const tableParams = JSON.parse(JSON.stringify(props.paramsData));
1116
+ if (((_a = editTableWrapper.value) == null ? void 0 : _a.options) && XEUtils.isPlainObject((_b = editTableWrapper.value) == null ? void 0 : _b.options.extendParams)) {
1117
+ ((_d = (_c = editTableWrapper.value) == null ? void 0 : _c.options) == null ? void 0 : _d.extendParams) && Object.assign(tableParams.form, (_e = editTableWrapper.value) == null ? void 0 : _e.options.extendParams);
1118
+ }
1119
+ const paramsDataVal = Object.assign(tableParams, {
1120
+ table: btn
1121
+ });
1122
+ const params = XEUtils.setParamsValue(setData.params, paramsDataVal);
1123
+ Object.assign(setData, { params, _params_data: paramsDataVal });
1124
+ emit("btnEventTree", setData);
1125
+ }
1126
+ function getRowTileBtnList(btnList) {
1127
+ rowTileBtnListTree.value = btnList.filter((btn) => btn.isShow == 1 && btn.type == "ADD");
1128
+ }
1129
+ function initOutSearchFieldList(config = {}) {
1130
+ outSearchFieldList.value = [];
1131
+ outRelationQuickSearch.value = [];
1132
+ let mySearchFieldList = JSON.parse(JSON.stringify(props.searchFieldList)).filter((i) => (i.random_key = getFiledRandom_key(i), i.isShowSearch == 1 && i.filterExplicit == 1));
1133
+ outSearchFieldList.value = mySearchFieldList;
1134
+ let outRelationQuickSearchVal = props.relationTableList.map((item) => {
1135
+ return {
1136
+ fieldList: item.fieldList.fieldList.filter((item2) => item2.isShowSearch == 1 && item2.filterExplicit == 1) || [],
1137
+ tableName: item.tableName,
1138
+ primaryField: item.primaryField,
1139
+ parameterConversionId: item.parameterConversionId,
1140
+ tableId: item.tableId,
1141
+ relationField: item.relationField,
1142
+ converFun: item.converFun,
1143
+ relationOrgId: item.relationOrgId,
1144
+ preConObj: item.preConObj,
1145
+ preSqlExpression: item.preSqlExpression
1146
+ };
1147
+ });
1148
+ outRelationQuickSearchVal = outRelationQuickSearchVal.filter((item) => item.fieldList.length);
1149
+ outRelationQuickSearch.value = outRelationQuickSearchVal;
1150
+ dealOutFilterHideBtn();
1151
+ outQuickSearchFn.handlerInitSearchItem(outSearchFieldList.value);
1152
+ outRelationQuickSearch.value.forEach((item) => {
1153
+ outQuickSearchFn.handlerInitSearchItem(item.fieldList);
1154
+ });
1155
+ if (props.lastOutSearchFieldList.length > 0) {
1156
+ outSearchFieldList.value = cloneDeep(props.lastOutSearchFieldList);
1157
+ }
1158
+ if (props.lastOutRelationQuickSearch.length) {
1159
+ outRelationQuickSearch.value = XEUtils.clone(props.lastOutRelationQuickSearch, true);
1160
+ }
1161
+ const isSetDefVal = outSearchFieldList.value.some((v) => {
1162
+ if (isRender(v)) {
1163
+ return isExistDefValByRenderWidget(v);
1164
+ }
1165
+ return !!v.explicitDefaultVal;
1166
+ });
1167
+ if (isSetDefVal) {
1168
+ emit("outSearchInit");
1169
+ if ("reset" != (config == null ? void 0 : config.type)) {
1170
+ outFilterChange({ type: "outSearchInit" });
1171
+ }
1172
+ }
1173
+ }
1174
+ function dealOutFilterHideBtn() {
1175
+ if (!isShowSetting("buttonAdaption") && outSearchFieldList.value.length > 0) {
1176
+ let rowTileBtnListVal = JSON.parse(JSON.stringify(rowTileBtnList.value));
1177
+ let hideBtn = rowTileBtnListVal.filter((item) => {
1178
+ if (!item.isVisible)
1179
+ return false;
1180
+ if (!item.buttonGroup)
1181
+ return true;
1182
+ if (groupBtnObj.value && groupBtnObj.value[item.buttonGroup])
1183
+ return false;
1184
+ return true;
1185
+ });
1186
+ rowTileBtnList.value = rowTileBtnListVal.map((i) => {
1187
+ i["isHide"] = true;
1188
+ return i;
1189
+ });
1190
+ let rowFoldHideBtnListObjVal = {
1191
+ ADD: { name: "\u65B0\u589E\u6309\u94AE", children: [] },
1192
+ INLINE: { name: "\u884C\u7EA7\u6309\u94AE", children: [] },
1193
+ BATCH: { name: "\u6279\u91CF\u6309\u94AE", children: [] }
1194
+ };
1195
+ hideBtn.forEach((item) => {
1196
+ item.isHide = true;
1197
+ if (item.type === "ADD") {
1198
+ rowFoldHideBtnListObjVal.ADD.children.push(item);
1199
+ } else if (item.type == "BATCH") {
1200
+ rowFoldHideBtnListObjVal.BATCH.children.push(item);
1201
+ } else {
1202
+ rowFoldHideBtnListObjVal.INLINE.children.push(item);
1203
+ }
1204
+ });
1205
+ rowFoldHideBtnListObj.value = rowFoldHideBtnListObjVal;
1206
+ rowFoldHideBtnList.value = hideBtn;
1207
+ }
1208
+ }
1209
+ function outFilterChange(config = {}) {
1210
+ let conObj = getConObjParams() || [];
1211
+ onSave(conObj, true, config);
1212
+ }
1213
+ function getConObj(arr) {
1214
+ if (!Array.isArray(arr)) {
1215
+ return [];
1216
+ }
1217
+ let conObj = [];
1218
+ arr.forEach((item) => {
1219
+ var _a, _b, _c;
1220
+ const renderConObj = getRenderSearchConObj(item);
1221
+ if (renderConObj) {
1222
+ conObj.push(renderConObj);
1223
+ return;
1224
+ }
1225
+ let temp = {
1226
+ field_key: item.columnName,
1227
+ con: item.con,
1228
+ value: "",
1229
+ limit_date: "",
1230
+ start_val: item.start_val || "",
1231
+ end_val: item.end_val || "",
1232
+ unit: item.unit || "",
1233
+ id: item.id
1234
+ };
1235
+ if (item.com === "Text" && item.value) {
1236
+ temp.value = item.value;
1237
+ conObj.push(temp);
1238
+ }
1239
+ let advanceOptionSetting = item.advanceOptionSetting;
1240
+ if (item.com === "SelectMui" && XEUtils.anyNotEmpty(item.value)) {
1241
+ let single = String(advanceOptionSetting) === "0";
1242
+ if (single) {
1243
+ if (!Array.isArray(item.value)) {
1244
+ item.value = [item.value];
1245
+ }
1246
+ }
1247
+ let hasArr = Array.isArray(item.value) && item.value.length > 0;
1248
+ if (item.comType == "SelectMuiWordBook" && hasArr) {
1249
+ temp.value = item.value.join("|#|");
1250
+ } else if (item.comType == "treeSelect") {
1251
+ let value = item.value;
1252
+ if (typeof value === "string") {
1253
+ [value] = value.split("<&=&>");
1254
+ } else if (Array.isArray(value)) {
1255
+ value = value.map((v) => {
1256
+ let [k] = typeof v === "string" ? v.split("<&=&>") : [];
1257
+ return k;
1258
+ });
1259
+ value = value.join("|#|");
1260
+ }
1261
+ temp.value = value;
1262
+ } else {
1263
+ if (hasArr) {
1264
+ if (item.con == "CONVERT") {
1265
+ let value = [];
1266
+ value = item.value.map((i) => {
1267
+ return item.labelList[i].filter;
1268
+ });
1269
+ temp.value = value;
1270
+ } else {
1271
+ let value = [];
1272
+ value = item.value.map((i) => {
1273
+ return item.labelList[i].labelName;
1274
+ });
1275
+ temp.value = value.join("|#|");
1276
+ }
1277
+ }
1278
+ }
1279
+ conObj.push(temp);
1280
+ }
1281
+ if (item.com === "DatePicker" && item.value.length) {
1282
+ const start_val = item.value[0].format(item.showFormat);
1283
+ const end_val = item.value[1].format(item.showFormat);
1284
+ if (item.settingObj.attr === "BIRTHDAY") {
1285
+ temp.limit_date = `${start_val}~${end_val}`;
1286
+ } else {
1287
+ temp.start_val = start_val;
1288
+ temp.end_val = end_val;
1289
+ }
1290
+ conObj.push(temp);
1291
+ }
1292
+ if (item.com === "DayPicker" && item.value) {
1293
+ const start_val = item.value.startOf("day").format("YYYY-MM-DD HH:mm:ss");
1294
+ const end_val = item.value.endOf("day").format("YYYY-MM-DD HH:mm:ss");
1295
+ if (item.settingObj.attr === "BIRTHDAY") {
1296
+ temp.limit_date = `${start_val}~${end_val}`;
1297
+ } else {
1298
+ temp.start_val = start_val;
1299
+ temp.end_val = end_val;
1300
+ }
1301
+ conObj.push(temp);
1302
+ }
1303
+ if (item.AGEAttr) {
1304
+ temp.value = "";
1305
+ temp.con = "IN";
1306
+ let start_val = Number(item.lessValue) * 365;
1307
+ let end_val = Number(item.bigValue) * 365;
1308
+ if ((start_val || start_val === 0) && end_val) {
1309
+ temp.start_val = start_val;
1310
+ temp.end_val = end_val;
1311
+ conObj.push(JSON.parse(JSON.stringify(temp)));
1312
+ }
1313
+ } else if (item.com === "Number") {
1314
+ let lessValue = (_a = item.lessValue) != null ? _a : "";
1315
+ let bigValue = (_b = item.bigValue) != null ? _b : "";
1316
+ if (lessValue || bigValue) {
1317
+ if (((_c = item.settingObj) == null ? void 0 : _c.attr) === "PERCENTAGE") {
1318
+ lessValue = (lessValue || lessValue === 0) && Number(lessValue) / 100 || "";
1319
+ bigValue = (bigValue || bigValue === 0) && Number(bigValue) / 100;
1320
+ }
1321
+ temp.value = `${lessValue}~${bigValue}`;
1322
+ }
1323
+ temp.con = "EQ";
1324
+ conObj.push(JSON.parse(JSON.stringify(temp)));
1325
+ }
1326
+ if (item.com === "SelectQuote" && item.value.length) {
1327
+ temp.value = item.value.join("|#|");
1328
+ conObj.push(temp);
1329
+ }
1330
+ });
1331
+ let res = conObj.filter(
1332
+ (item) => item.value || item.limit_date || item.start_val || item.end_val
1333
+ );
1334
+ return res;
1335
+ }
1336
+ function getConObjParams() {
1337
+ let conObj = getConObj(outSearchFieldList.value);
1338
+ let realation = [];
1339
+ outRelationQuickSearch.value.forEach((item) => {
1340
+ let curQuote = getConObj(item.fieldList);
1341
+ if (curQuote && curQuote.length) {
1342
+ realation.push({
1343
+ field_key: item.primaryField,
1344
+ valueField: item.relationField,
1345
+ con: "QUOTE_IN",
1346
+ tableId: item.tableId,
1347
+ parameterConversionId: item.parameterConversionId,
1348
+ converFun: item.converFun,
1349
+ preConObj: item.preConObj,
1350
+ relationOrgId: item.relationOrgId,
1351
+ preSqlExpression: item.preSqlExpression,
1352
+ quote_con: {
1353
+ conObj: getConObj(item.fieldList),
1354
+ sqlExpression: ""
1355
+ }
1356
+ });
1357
+ }
1358
+ });
1359
+ conObj.push(...realation);
1360
+ return conObj || [];
1361
+ }
1362
+ function visibleBtn(btn) {
1363
+ if (!btn.isVisible)
1364
+ return false;
1365
+ if (isInlineOperating.value)
1366
+ return false;
1367
+ return true;
1368
+ }
1369
+ function getPrintBtnParams(btn) {
1370
+ const paramsDataVal = JSON.parse(JSON.stringify(props.paramsData));
1371
+ const setData = JSON.parse(btn.setting);
1372
+ let paramsArray = [];
1373
+ paramsDataVal.form.selectRows.forEach((i) => {
1374
+ const obj = {
1375
+ table: i
1376
+ };
1377
+ paramsArray.push(XEUtils.setParamsValue(setData[0].params, Object.assign(paramsDataVal, { obj, table: i })));
1378
+ });
1379
+ return paramsArray;
1380
+ }
1381
+ function setPrintNumberToBtnList(printNumberList = [], btnList = []) {
1382
+ let cloneList = cloneDeep(btnList);
1383
+ printNumberList.forEach((item, index) => {
1384
+ const i = cloneList.findIndex((v) => v.settingObj[0].trigger_id == item.id);
1385
+ if (i > -1) {
1386
+ cloneList[i].__printConfig = {
1387
+ number: item.number,
1388
+ authorizationKey: item.authorizationKey,
1389
+ port: item.port,
1390
+ versionType: item.versionType,
1391
+ hisParams: { reportid: item.number }
1392
+ };
1393
+ }
1394
+ });
1395
+ return cloneList;
1396
+ }
1397
+ async function getPrintNumber(list) {
1398
+ if (!(list == null ? void 0 : list.length))
1399
+ return;
1400
+ let ids = list.map((item) => item.settingObj[0].trigger_id).join(",");
1401
+ let printNumberCacheKeys = Object.keys(printNumberCache.value);
1402
+ let haveCache = printNumberCacheKeys.includes(ids);
1403
+ if (haveCache) {
1404
+ let printNumberList = printNumberCache.value[ids];
1405
+ printBtnStrategys.value = printNumberList;
1406
+ return Promise.resolve(printNumberList);
1407
+ }
1408
+ let res = await handleGetConfigApi({ ids }, "requestGetByIds", {}, props.filterApiConfig);
1409
+ const { status, data } = res;
1410
+ if (status) {
1411
+ let resList = (data == null ? void 0 : data.list) || [];
1412
+ printBtnStrategys.value = resList;
1413
+ list = resList.map((item) => {
1414
+ return {
1415
+ number: item.number,
1416
+ authorizationKey: data.authorizationKey,
1417
+ versionType: data.versionType,
1418
+ port: data.port,
1419
+ id: item.id,
1420
+ ...item
1421
+ };
1422
+ });
1423
+ let len = (list == null ? void 0 : list.length) || 0;
1424
+ if (len > 0) {
1425
+ setPrintNumberCache({
1426
+ ids,
1427
+ list
1428
+ });
1429
+ }
1430
+ return list;
1431
+ }
1432
+ return list;
1433
+ }
1434
+ async function receivePrintSuccessAboutPrint(res, info) {
1435
+ var _a;
1436
+ const printBtnVal = printBtn.value;
1437
+ info.templateId;
1438
+ const formatId = info.formatId;
1439
+ const number = printBtnVal == null ? void 0 : printBtnVal.__printConfig.number;
1440
+ try {
1441
+ const print = { formatId, number };
1442
+ const result = await props.printConfig.postStepRule(printBtnVal == null ? void 0 : printBtnVal.settingObj, {
1443
+ result: res,
1444
+ print
1445
+ });
1446
+ if (result.method !== "sync")
1447
+ return;
1448
+ (_a = editTableWrapper.value) == null ? void 0 : _a.getTableList("", false, true, true);
1449
+ } catch (error) {
1450
+ console.log("error", error);
1451
+ }
1452
+ }
1453
+ async function receivePrintSuccess(res, info) {
1454
+ if (info.type === "print") {
1455
+ await receivePrintSuccessAboutPrint(res, info);
1456
+ }
1457
+ setTimeout(() => {
1458
+ $message.success(res.message);
1459
+ }, 3500);
1460
+ }
1461
+ function receivePrintError(res) {
1462
+ let errorMsg = res.message;
1463
+ res.errinfo && (errorMsg += `\uFF1A${res.errinfo}`);
1464
+ $message.error(errorMsg);
1465
+ }
1466
+ function resetAllPrintFnWatch() {
1467
+ let keys = Object.keys(printBtnPrevFnWatch.value);
1468
+ keys.forEach((key) => {
1469
+ if (!printBtnPrevFnWatch.value[key])
1470
+ return false;
1471
+ printBtnPrevFnWatch.value[key]();
1472
+ printBtnPrevFnWatch.value[key] = null;
1473
+ delete printBtnPrevFnWatch.value[key];
1474
+ });
1475
+ }
1476
+ function printBtnPrevFnWatchSetTimeout(reject) {
1477
+ if (printBtnPrevFnWatchTimeoutTimer.value) {
1478
+ clearTimeout(printBtnPrevFnWatchTimeoutTimer.value);
1479
+ printBtnPrevFnWatchTimeoutTimer.value = null;
1480
+ }
1481
+ printBtnPrevFnWatchTimeoutTimer.value = setTimeout(() => {
1482
+ resetAllPrintFnWatch();
1483
+ reject();
1484
+ }, 1e4);
1485
+ }
1486
+ function printBtnPrevFn(clickBtn2, btn, type, j) {
1487
+ return new Promise((resolve, reject) => {
1488
+ clickBtn2(clickBtn2, btn, clickBtn2.my_index, true, j);
1489
+ const timestamp = Date.now();
1490
+ resetAllPrintFnWatch();
1491
+ printPrevFinish.value = false;
1492
+ printBtnPrevFnWatch.value[timestamp] = watch(() => printPrevFinish.value, (val) => {
1493
+ if (!printBtnPrevFnWatch.value[timestamp])
1494
+ return false;
1495
+ resetAllPrintFnWatch();
1496
+ resolve(true);
1497
+ });
1498
+ printBtnPrevFnWatchSetTimeout(reject);
1499
+ });
1500
+ }
1501
+ function inlineEditClick() {
1502
+ let { btnName, tipsMsg, isTips } = curBatchBtnData.value || {};
1503
+ if (isTips != 1) {
1504
+ setBatchSaveRowStatus(true);
1505
+ return;
1506
+ }
1507
+ $dialog.info({
1508
+ title: tipsMsg || `\u662F\u5426\u786E\u8BA4${btnName}`,
1509
+ positiveText: "\u786E\u5B9A",
1510
+ negativeText: "\u53D6\u6D88",
1511
+ maskClosable: false,
1512
+ onPositiveClick: () => {
1513
+ setBatchSaveRowStatus(true);
1514
+ },
1515
+ onNegativeClick: () => {
1516
+ }
1517
+ });
1518
+ }
1519
+ function getFiledRandom_key(el) {
1520
+ var _a, _b;
1521
+ const showSetting = ((_a = el == null ? void 0 : el.settingObj) == null ? void 0 : _a.showSetting) || [];
1522
+ let f = !$utils.isEmpty((_b = el == null ? void 0 : el.settingObj) == null ? void 0 : _b.wordbook);
1523
+ if (!(showSetting == null ? void 0 : showSetting.length) && f) {
1524
+ return Math.random().toString();
1525
+ }
1526
+ return "11";
1527
+ }
1528
+ function inlineEditCancel() {
1529
+ setBatchCancelRowStatus(true);
1530
+ }
1531
+ function setBatchSaveRowStatus(f) {
1532
+ emit("setBatchSaveRowStatus", f);
1533
+ }
1534
+ function setBatchCancelRowStatus(f) {
1535
+ emit("setBatchCancelRowStatus", f);
1536
+ }
1537
+ function setPrintNumberCache(obj) {
1538
+ emit("setPrintNumberCache", obj);
1539
+ }
1540
+ watch(
1541
+ () => props.viewList,
1542
+ () => {
1543
+ if (props.viewList.length > 0) {
1544
+ let curItem;
1545
+ let hasListType = true;
1546
+ props.viewList.forEach((v) => {
1547
+ if (v.mark == 1) {
1548
+ curItem = v.id;
1549
+ }
1550
+ if (v.id == "0") {
1551
+ hasListType = false;
1552
+ }
1553
+ });
1554
+ hasListType && props.viewList.push({
1555
+ id: "0",
1556
+ name: "\u5217\u8868\u6A21\u5F0F"
1557
+ });
1558
+ currentTempId.value = curItem || "0";
1559
+ let tableViewId = optionsValue.value("tableViewId");
1560
+ let onlyOpenView = optionsValue.value("hideViewList") && tableViewId;
1561
+ if (onlyOpenView) {
1562
+ currentTempId.value = tableViewId;
1563
+ }
1564
+ emit("handlerChangeView", currentTempId.value);
1565
+ } else {
1566
+ currentTempId.value = "0";
1567
+ props.editTableSource != "relatedComponent" && emit("handlerChangeView", currentTempId.value);
1568
+ }
1569
+ },
1570
+ { immediate: true, deep: true }
1571
+ );
1572
+ watch(
1573
+ () => getIsTile,
1574
+ (val) => {
1575
+ if (val === void 0)
1576
+ return;
1577
+ isTile.value = val;
1578
+ },
1579
+ { immediate: true }
1580
+ );
1581
+ watch(
1582
+ () => props.rowBtnList,
1583
+ () => {
1584
+ formatRowBtnList();
1585
+ handleOtherConfigInit();
1586
+ },
1587
+ { immediate: true, deep: true }
1588
+ );
1589
+ watch(
1590
+ () => initPageResize,
1591
+ (val) => {
1592
+ if (!val || !Object.keys(val).length)
1593
+ return;
1594
+ if (isButtonFolding.value || isShowSetting("buttonAdaption"))
1595
+ return;
1596
+ if (val.classificationIndex < 0)
1597
+ return;
1598
+ pageResize({});
1599
+ },
1600
+ { immediate: true, deep: true }
1601
+ );
1602
+ watch(
1603
+ () => props.relatedBaseInfo,
1604
+ (val) => {
1605
+ if (!val || !Object.keys(val).length)
1606
+ return;
1607
+ let { buttonList } = val;
1608
+ if (!buttonList || !buttonList.length)
1609
+ return;
1610
+ getRowTileBtnList(buttonList);
1611
+ },
1612
+ { immediate: true, deep: true }
1613
+ );
1614
+ watch(
1615
+ () => props.searchFieldList,
1616
+ (val) => {
1617
+ if (val && val.length > 0) {
1618
+ initOutSearchFieldList();
1619
+ }
1620
+ },
1621
+ { immediate: true, deep: true }
1622
+ );
1623
+ watch(
1624
+ () => props.tabConditionNumObj,
1625
+ (val) => {
1626
+ if (props.conditionType === "keyword" && val && Object.keys(val).length > 0) {
1627
+ props.tabConditionList.length > 0 && props.tabConditionList.forEach((item) => {
1628
+ if (val[item.sid] !== void 0)
1629
+ item.digital = val[item.sid];
1630
+ });
1631
+ }
1632
+ },
1633
+ { immediate: true, deep: true }
1634
+ );
1635
+ watch(
1636
+ () => searchPlaceHolder,
1637
+ (val) => {
1638
+ if (!val || props.showRelatedTreeBtn)
1639
+ return;
1640
+ nextTick(() => {
1641
+ showPlaceholderPrefix.value = false;
1642
+ let dom = baseSearchPlaceholderSpan.value;
1643
+ if (!dom)
1644
+ return;
1645
+ let w = dom.offsetWidth + 45;
1646
+ if (!showOutSearch.value) {
1647
+ w += 45;
1648
+ }
1649
+ let maxW = 300;
1650
+ inputSearchW.value = w > maxW ? maxW : w < 200 ? 200 : w;
1651
+ if (w > maxW) {
1652
+ showPlaceholderPrefix.value = true;
1653
+ }
1654
+ onResize();
1655
+ });
1656
+ },
1657
+ { immediate: true }
1658
+ );
1659
+ return (_ctx, _cache) => {
1660
+ return openBlock(), createElementBlock("div", _hoisted_1, [
1661
+ createElementVNode("div", _hoisted_2, [
1662
+ withDirectives((openBlock(), createElementBlock("div", {
1663
+ class: "bease-left",
1664
+ ref_key: "baseLeft",
1665
+ ref: baseLeft
1666
+ }, [
1667
+ createCommentVNode(" \u884C\u5185\u7F16\u8F91\u5BF9\u5E94\u751F\u6210\u7684\uFF08\u4FDD\u5B58\u3001\u53D6\u6D88\uFF09\u6309\u94AE "),
1668
+ __props.visibleInlineOperateBtn ? (openBlock(), createElementBlock("div", _hoisted_3, [
1669
+ withDirectives((openBlock(), createBlock(unref(NButton), {
1670
+ style: normalizeStyle([{ display: unref(isInlineOperating) ? "inline-block" : "none" }, { "margin": "8px 8px 8px 0" }]),
1671
+ onClick: inlineEditClick,
1672
+ class: "btn-custom-class",
1673
+ type: "primary"
1674
+ }, {
1675
+ default: withCtx(() => [
1676
+ createTextVNode(" \u4FDD\u5B58 ")
1677
+ ]),
1678
+ _: 1
1679
+ }, 8, ["style"])), [
1680
+ [unref(PreventReClick), __props.preventReTime]
1681
+ ]),
1682
+ withDirectives((openBlock(), createBlock(unref(NButton), {
1683
+ style: normalizeStyle([{ display: unref(isInlineOperating) ? "inline-block" : "none" }, { "margin": "8px 8px 8px 0" }]),
1684
+ onClick: inlineEditCancel,
1685
+ class: "btn-custom-class"
1686
+ }, {
1687
+ default: withCtx(() => [
1688
+ createTextVNode(" \u53D6\u6D88 ")
1689
+ ]),
1690
+ _: 1
1691
+ }, 8, ["style"])), [
1692
+ [unref(PreventReClick), __props.preventReTime]
1693
+ ])
1694
+ ])) : createCommentVNode("v-if", true),
1695
+ !__props.visibleInlineOperateBtn && !unref(isRowEditing) ? (openBlock(), createElementBlock("ul", _hoisted_4, [
1696
+ unref(isShowSettingBtn) ? (openBlock(), createElementBlock("div", {
1697
+ key: 0,
1698
+ ref_key: "btnRow",
1699
+ ref: btnRow,
1700
+ class: "btn-row"
1701
+ }, [
1702
+ withDirectives(createVNode(unref(NButton), {
1703
+ class: "btn-setting",
1704
+ icon: "setting",
1705
+ onClick: handlerSetting
1706
+ }, {
1707
+ default: withCtx(() => [
1708
+ createTextVNode(" \u8BBE\u7F6E ")
1709
+ ]),
1710
+ _: 1
1711
+ }, 512), [
1712
+ [vShow, currentTempId.value != "0" && isShowSetting("hideSettingBtn")]
1713
+ ]),
1714
+ unref(showViewList) ? (openBlock(), createBlock(unref(NDropdown), {
1715
+ key: 0,
1716
+ overlayClassName: "viewList-dropdown",
1717
+ options: __props.viewList,
1718
+ "key-field": "id",
1719
+ "label-field": "name",
1720
+ onSelect: handlerSelectTemp
1721
+ }, {
1722
+ default: withCtx(() => [
1723
+ createVNode(unref(NButton), { class: "viewList-button" }, {
1724
+ default: withCtx(() => [
1725
+ createVNode(unref(script), {
1726
+ "icon-class": "anniuqiehuanmoshi",
1727
+ style: { "font-size": "22px" }
1728
+ })
1729
+ ]),
1730
+ _: 1
1731
+ })
1732
+ ]),
1733
+ _: 1
1734
+ }, 8, ["options"])) : createCommentVNode("v-if", true)
1735
+ ], 512)) : createCommentVNode("v-if", true),
1736
+ renderSlot(_ctx.$slots, "classification"),
1737
+ unref(showQuickSearch) ? (openBlock(), createElementBlock("li", {
1738
+ key: 1,
1739
+ ref_key: "quickSearchLi",
1740
+ ref: quickSearchLi
1741
+ }, [
1742
+ createVNode(unref(NButton), {
1743
+ class: "search-default",
1744
+ type: "default",
1745
+ onClick: foldQuickSearch
1746
+ }, {
1747
+ default: withCtx(() => [
1748
+ createVNode(unref(script), {
1749
+ "icon-class": "anniushaixuan",
1750
+ style: { "color": "inherit", "margin-right": "6px" }
1751
+ }),
1752
+ createTextVNode(" \u7B5B\u9009 " + toDisplayString(__props.qqConObjCount ? `(${__props.qqConObjCount})` : ""), 1)
1753
+ ]),
1754
+ _: 1
1755
+ })
1756
+ ], 512)) : createCommentVNode("v-if", true),
1757
+ createCommentVNode(" start--\u7B5B\u9009\u5916\u663E--start "),
1758
+ (openBlock(true), createElementBlock(Fragment, null, renderList(outSearchFieldList.value, (item) => {
1759
+ return openBlock(), createElementBlock(Fragment, null, [
1760
+ item.isRender ? (openBlock(), createElementBlock("li", {
1761
+ class: "outQuickSearch-li",
1762
+ key: item._frontId
1763
+ }, [
1764
+ createVNode(RenderWidget, {
1765
+ style: { "margin": "0 8px 8px 0" },
1766
+ cfg: item,
1767
+ modelValue: item.value,
1768
+ "onUpdate:modelValue": ($event) => item.value = $event,
1769
+ onOutFilterChange: outFilterChange
1770
+ }, null, 8, ["cfg", "modelValue", "onUpdate:modelValue"])
1771
+ ])) : item.id ? (openBlock(), createBlock(outQuickSearch, {
1772
+ key: (item == null ? void 0 : item.id) + (item == null ? void 0 : item.random_key),
1773
+ item,
1774
+ ref_for: true,
1775
+ ref: item.columnName + item.random_key,
1776
+ filterApiConfig: __props.filterApiConfigOutSearch,
1777
+ onOutFilterChange: outFilterChange
1778
+ }, null, 8, ["item", "filterApiConfig"])) : createCommentVNode("v-if", true)
1779
+ ], 64);
1780
+ }), 256)),
1781
+ createCommentVNode(" end--\u7B5B\u9009\u5916\u663E--end "),
1782
+ createCommentVNode(" start--\u7B5B\u9009\u5916\u663E \u8DE8\u8868--start "),
1783
+ (openBlock(true), createElementBlock(Fragment, null, renderList(outRelationQuickSearch.value, (relationItem) => {
1784
+ return openBlock(), createElementBlock(Fragment, null, [
1785
+ (openBlock(true), createElementBlock(Fragment, null, renderList(relationItem.fieldList, (item) => {
1786
+ return openBlock(), createBlock(outQuickSearch, {
1787
+ key: item.id,
1788
+ item,
1789
+ filterApiConfig: __props.filterApiConfigOutSearch,
1790
+ onOutFilterChange: outFilterChange
1791
+ }, null, 8, ["item", "filterApiConfig"]);
1792
+ }), 128))
1793
+ ], 64);
1794
+ }), 256)),
1795
+ createCommentVNode(" end--\u7B5B\u9009\u5916\u663E \u8DE8\u8868--end "),
1796
+ isShowSetting("hideSearch") && !__props.showRelatedTreeBtn ? (openBlock(), createElementBlock("li", {
1797
+ key: 2,
1798
+ ref_key: "inputSearchLi",
1799
+ ref: inputSearchLi,
1800
+ class: "baseSearch-input-search"
1801
+ }, [
1802
+ outSearchFieldList.value && outSearchFieldList.value.length ? renderSlot(_ctx.$slots, "searchInput", {
1803
+ key: 0,
1804
+ width: __props.searchInputWidth || inputSearchW.value,
1805
+ searchPlaceHolder: unref(searchPlaceHolder),
1806
+ showPlaceholderPrefix: showPlaceholderPrefix.value,
1807
+ type: "outSearch"
1808
+ }, () => [
1809
+ createVNode(unref(NInputGroup), null, {
1810
+ default: withCtx(() => [
1811
+ createVNode(unref(NInput), {
1812
+ style: normalizeStyle({ width: (__props.searchInputWidth || inputSearchW.value) + "px", margin: "0 8px 8px 0" }),
1813
+ clearable: "",
1814
+ placeholder: unref(searchPlaceHolder),
1815
+ value: unref(currentValue),
1816
+ onInput: _cache[0] || (_cache[0] = ($event) => emit("input", $event.target.value)),
1817
+ onKeyup: withKeys(outFilterChange, ["enter"]),
1818
+ class: "input-search-com"
1819
+ }, null, 8, ["style", "placeholder", "value", "onKeyup"])
1820
+ ]),
1821
+ _: 1
1822
+ })
1823
+ ]) : renderSlot(_ctx.$slots, "searchInput", {
1824
+ key: 1,
1825
+ width: __props.searchInputWidth || inputSearchW.value,
1826
+ searchPlaceHolder: unref(searchPlaceHolder),
1827
+ showPlaceholderPrefix: showPlaceholderPrefix.value,
1828
+ type: "default"
1829
+ }, () => [
1830
+ createVNode(unref(NInputGroup), null, {
1831
+ default: withCtx(() => [
1832
+ createVNode(unref(NTooltip), { trigger: "hover" }, {
1833
+ trigger: withCtx(() => [
1834
+ createVNode(unref(NIcon), {
1835
+ component: unref(InformationCircleOutline),
1836
+ size: "16",
1837
+ class: "search-placeholder-icon"
1838
+ }, null, 8, ["component"])
1839
+ ]),
1840
+ default: withCtx(() => [
1841
+ createTextVNode(" " + toDisplayString(unref(searchPlaceHolder)), 1)
1842
+ ]),
1843
+ _: 1
1844
+ }),
1845
+ createVNode(unref(NInput), {
1846
+ class: "my-input-search input-search-com",
1847
+ style: normalizeStyle({ width: (__props.searchInputWidth || inputSearchW.value) + "px" }),
1848
+ clearable: "",
1849
+ placeholder: unref(searchPlaceHolder),
1850
+ value: unref(currentValue),
1851
+ onKeyup: withKeys(__props.onSearch, ["enter"]),
1852
+ onInput: _cache[1] || (_cache[1] = ($event) => emit("input", $event.target.value))
1853
+ }, null, 8, ["style", "placeholder", "value", "onKeyup"]),
1854
+ createVNode(unref(NButton), {
1855
+ slot: "enterButton",
1856
+ type: "primary",
1857
+ onClick: __props.onSearch
1858
+ }, {
1859
+ default: withCtx(() => [
1860
+ createVNode(unref(script), { "icon-class": "xitongtubiaosousuo" })
1861
+ ]),
1862
+ _: 1
1863
+ }, 8, ["onClick"])
1864
+ ]),
1865
+ _: 1
1866
+ })
1867
+ ])
1868
+ ], 512)) : createCommentVNode("v-if", true),
1869
+ outSearchFieldList.value && outSearchFieldList.value.length ? (openBlock(), createElementBlock("li", _hoisted_5, [
1870
+ createVNode(unref(NButton), {
1871
+ type: "primary",
1872
+ onClick: outFilterChange,
1873
+ style: { "margin": "0 8px 8px 0" }
1874
+ }, {
1875
+ default: withCtx(() => [
1876
+ createVNode(unref(NIcon), {
1877
+ component: unref(Search),
1878
+ size: "16",
1879
+ style: { "margin-right": "6px" }
1880
+ }, null, 8, ["component"]),
1881
+ createTextVNode(" \u67E5\u8BE2 ")
1882
+ ]),
1883
+ _: 1
1884
+ })
1885
+ ])) : createCommentVNode("v-if", true),
1886
+ createCommentVNode(" \u65E0\u5916\u663E\u5B57\u6BB5\u67E5\u8BE2\uFF0C\u4E14\u9690\u85CF\u6A21\u7CCA\u641C\u7D22 "),
1887
+ outSearchFieldList.value && outSearchFieldList.value.length === 0 && !isShowSetting("hideSearch") ? (openBlock(), createElementBlock("li", _hoisted_6, [
1888
+ createVNode(unref(NButton), {
1889
+ type: "primary",
1890
+ onClick: __props.onSearch,
1891
+ style: { "margin": "0 8px 8px 0" }
1892
+ }, {
1893
+ default: withCtx(() => [
1894
+ createVNode(unref(NIcon), {
1895
+ component: unref(Search),
1896
+ size: "16",
1897
+ style: { "margin-right": "6px" }
1898
+ }, null, 8, ["component"]),
1899
+ createTextVNode(" \u67E5\u8BE2 ")
1900
+ ]),
1901
+ _: 1
1902
+ }, 8, ["onClick"])
1903
+ ])) : createCommentVNode("v-if", true),
1904
+ __props.showResetFilterBtn ? (openBlock(), createElementBlock("li", _hoisted_7, [
1905
+ createVNode(unref(NButton), {
1906
+ onClick: handleReset,
1907
+ style: { "margin": "0 8px 8px 0" }
1908
+ }, {
1909
+ default: withCtx(() => [
1910
+ createVNode(unref(script), {
1911
+ "icon-class": "xitongtubiaoliebiaocaozuoanniushanchu",
1912
+ style: { "margin-right": "6px" }
1913
+ }),
1914
+ createTextVNode(" \u91CD\u7F6E ")
1915
+ ]),
1916
+ _: 1
1917
+ })
1918
+ ])) : createCommentVNode("v-if", true),
1919
+ createCommentVNode(" \u6279\u91CF\u9009\u62E9 "),
1920
+ unref(isCard) ? (openBlock(), createElementBlock("li", _hoisted_8, [
1921
+ __props.isCardNewBatch ? (openBlock(), createBlock(unref(NButton), {
1922
+ key: 0,
1923
+ type: "primary",
1924
+ onClick: _cache[2] || (_cache[2] = () => changeCardNewBatch(false)),
1925
+ style: { "margin": "0 8px 8px 0" }
1926
+ }, {
1927
+ default: withCtx(() => [
1928
+ createTextVNode(" \u53D6\u6D88\u6279\u91CF\u9009\u62E9 ")
1929
+ ]),
1930
+ _: 1
1931
+ })) : (openBlock(), createBlock(unref(NButton), {
1932
+ key: 1,
1933
+ type: "primary",
1934
+ onClick: _cache[3] || (_cache[3] = () => changeCardNewBatch(true)),
1935
+ style: { "margin": "0 8px 8px 0" }
1936
+ }, {
1937
+ default: withCtx(() => [
1938
+ createTextVNode(" \u6279\u91CF\u9009\u62E9 ")
1939
+ ]),
1940
+ _: 1
1941
+ }))
1942
+ ])) : createCommentVNode("v-if", true),
1943
+ createCommentVNode(" \u5E73\u94FA\u5217\u8868 tree "),
1944
+ __props.showRelatedTreeBtn ? (openBlock(), createElementBlock(Fragment, { key: 7 }, [
1945
+ unref(showRelatedSearch) ? (openBlock(), createElementBlock("li", {
1946
+ key: 0,
1947
+ class: normalizeClass([__props.isRelatedSearchFold ? "related-search-input" : "related-search-input-expand"])
1948
+ }, [
1949
+ renderSlot(_ctx.$slots, "searchInput", {
1950
+ searchPlaceHolder: unref(searchPlaceHolder),
1951
+ showPlaceholderPrefix: showPlaceholderPrefix.value,
1952
+ type: "relatedTreeSearch",
1953
+ isRelatedSearchFold: __props.isRelatedSearchFold
1954
+ }, () => [
1955
+ createVNode(unref(NInputGroup), null, {
1956
+ default: withCtx(() => [
1957
+ createVNode(unref(NInput), {
1958
+ ref_key: "relatedSearchInput",
1959
+ ref: relatedSearchInput,
1960
+ class: "my-input-search my-input-search-related",
1961
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
1962
+ clearable: "",
1963
+ value: unref(currentValue),
1964
+ onKeyup: withKeys(__props.onRelatedSearch, ["enter"]),
1965
+ onInput: _cache[4] || (_cache[4] = ($event) => emit("input", $event.target.value))
1966
+ }, null, 8, ["value", "onKeyup"]),
1967
+ createVNode(unref(NButton), {
1968
+ slot: "enterButton",
1969
+ type: "primary",
1970
+ onClick: __props.onRelatedSearch
1971
+ }, {
1972
+ default: withCtx(() => [
1973
+ createVNode(unref(NIcon), {
1974
+ component: unref(Search),
1975
+ size: "16"
1976
+ }, null, 8, ["component"])
1977
+ ]),
1978
+ _: 1
1979
+ }, 8, ["onClick"])
1980
+ ]),
1981
+ _: 1
1982
+ })
1983
+ ])
1984
+ ], 2)) : createCommentVNode("v-if", true),
1985
+ rowTileBtnListTree.value && rowTileBtnListTree.value.length === 1 ? (openBlock(), createBlock(unref(NButton), {
1986
+ key: 1,
1987
+ type: "primary",
1988
+ style: { "margin-right": "8px", "margin-bottom": "8px" },
1989
+ onClick: _cache[5] || (_cache[5] = ($event) => handleAddType("key", rowTileBtnListTree.value[0]))
1990
+ }, {
1991
+ default: withCtx(() => [
1992
+ createTextVNode(toDisplayString(rowTileBtnListTree.value[0].alias || rowTileBtnListTree.value[0].name), 1)
1993
+ ]),
1994
+ _: 1
1995
+ })) : createCommentVNode("v-if", true),
1996
+ rowTileBtnListTree.value.length > 1 && !unref(isInlineOperating) ? (openBlock(), createBlock(unref(NDropdown), {
1997
+ key: 2,
1998
+ options: rowTileBtnListTree.value,
1999
+ "key-field": "sid",
2000
+ "label-field": "alias",
2001
+ onSelect: handleAddType
2002
+ }, {
2003
+ default: withCtx(() => [
2004
+ createVNode(unref(NButton), {
2005
+ type: "primary",
2006
+ ghost: "",
2007
+ style: { "margin-left": "8px", "margin-bottom": "8px" }
2008
+ }, {
2009
+ default: withCtx(() => [
2010
+ createTextVNode("\u66F4\u591A ...")
2011
+ ]),
2012
+ _: 1
2013
+ })
2014
+ ]),
2015
+ _: 1
2016
+ }, 8, ["options"])) : createCommentVNode("v-if", true)
2017
+ ], 64)) : createCommentVNode("v-if", true),
2018
+ !nobutton1.value && !__props.showRelatedTreeBtn ? (openBlock(), createElementBlock(Fragment, { key: 8 }, [
2019
+ unref(isButtonFolding) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2020
+ unref(allBtn) && unref(allBtn).length ? (openBlock(), createElementBlock("li", _hoisted_9, [
2021
+ !unref(isInlineOperating) ? (openBlock(), createBlock(unref(NDropdown), {
2022
+ key: 0,
2023
+ options: unref(allBtn),
2024
+ "key-field": "sid",
2025
+ "label-field": "alias",
2026
+ onSelect: handleDropdown
2027
+ }, {
2028
+ default: withCtx(() => [
2029
+ createVNode(unref(NButton), { class: "ml12 dropdown-button" }, {
2030
+ default: withCtx(() => [
2031
+ createTextVNode(toDisplayString("\u66F4\u591A") + " "),
2032
+ createVNode(unref(NIcon), {
2033
+ component: unref(ChevronDownOutline),
2034
+ size: "16"
2035
+ }, null, 8, ["component"])
2036
+ ]),
2037
+ _: 1
2038
+ })
2039
+ ]),
2040
+ _: 1
2041
+ }, 8, ["options"])) : createCommentVNode("v-if", true)
2042
+ ], 512)) : createCommentVNode("v-if", true)
2043
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2044
+ createCommentVNode(" start--\u6309\u94AE\u5206\u7EC4--start "),
2045
+ unref(isShowGroupBtn) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(groupBtnObj.value, (key, i) => {
2046
+ return openBlock(), createElementBlock(Fragment, null, [
2047
+ key.list && key.list.length > 1 ? (openBlock(), createElementBlock("li", {
2048
+ key: i,
2049
+ ref_for: true,
2050
+ ref_key: "setRowTileBtnItem",
2051
+ ref: setRowTileBtnItem,
2052
+ "data-key": i,
2053
+ "data-source": "groupBtn"
2054
+ }, [
2055
+ withDirectives(createVNode(ButtonGroup, {
2056
+ title: i,
2057
+ list: key.list,
2058
+ currentTempId: currentTempId.value,
2059
+ onShowDrawer: showDrawer,
2060
+ onClickGroupBtn: clickGroupBtn
2061
+ }, null, 8, ["title", "list", "currentTempId"]), [
2062
+ [vShow, !key.isHide]
2063
+ ])
2064
+ ], 8, _hoisted_10)) : createCommentVNode("v-if", true)
2065
+ ], 64);
2066
+ }), 256)) : createCommentVNode("v-if", true),
2067
+ createCommentVNode(" end--\u6309\u94AE\u5206\u7EC4--end "),
2068
+ createCommentVNode(" \u5E73\u94FA\u6309\u94AE\u5217\u8868 "),
2069
+ (openBlock(true), createElementBlock(Fragment, null, renderList(rowTileBtnList.value, (item, j) => {
2070
+ return openBlock(), createElementBlock(Fragment, null, [
2071
+ createCommentVNode(` v-if="item.type == 'ADD'" `),
2072
+ unref(showLi)(item) ? (openBlock(), createElementBlock("li", {
2073
+ ref_for: true,
2074
+ ref_key: "setRowTileBtnItem",
2075
+ ref: setRowTileBtnItem,
2076
+ class: "rowTileBtn-item 123",
2077
+ key: item.sid,
2078
+ "data-key": item.sid,
2079
+ "data-source": "rowTile"
2080
+ }, [
2081
+ item.type == "ADD" || item.type == "BATCH" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2082
+ withDirectives((openBlock(), createBlock(unref(NButton), {
2083
+ onClick: withModifiers(($event) => showDrawer(item, j), ["prevent", "stop"]),
2084
+ class: "btn-custom-class",
2085
+ style: normalizeStyle([{ "margin": "0 8px 8px 0" }, unref($utils).getBtnStyle(item)]),
2086
+ type: item.showStyle == "none_bg" || item.showStyle === "only_icon" ? "link" : "primary",
2087
+ ghost: item.showStyle == "white_bg"
2088
+ }, {
2089
+ default: withCtx(() => [
2090
+ createVNode(unref(getBtnIcon), {
2091
+ data: item,
2092
+ btnObj: btnObj.value
2093
+ }, null, 8, ["data", "btnObj"]),
2094
+ item.showStyle !== "only_icon" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2095
+ createTextVNode(toDisplayString(item.alias || item.name), 1)
2096
+ ], 64)) : createCommentVNode("v-if", true)
2097
+ ]),
2098
+ _: 2
2099
+ }, 1032, ["onClick", "style", "type", "ghost"])), [
2100
+ [unref(PreventReClick), __props.preventReTime],
2101
+ [vShow, visibleBtn(item) && !item.isHide]
2102
+ ]),
2103
+ item.isImportGuage ? (openBlock(), createBlock(unref(NUpload), {
2104
+ key: 0,
2105
+ method: "post",
2106
+ "show-file-list": false,
2107
+ action: `${unref(axios).defaults.baseURL}/guage/importGuage`,
2108
+ onChange: handleUploadChange
2109
+ }, {
2110
+ default: withCtx(() => [
2111
+ createCommentVNode(" \u4E0A\u4F20\u914D\u7F6E\u6587\u4EF6 "),
2112
+ createVNode(unref(NButton), {
2113
+ class: "btn-custom-class",
2114
+ style: normalizeStyle([{ "margin": "0 8px 8px 0" }, unref($utils).getBtnStyle(item)]),
2115
+ type: item.showStyle == "none_bg" || item.showStyle === "only_icon" ? "link" : "primary",
2116
+ ghost: item.showStyle == "white_bg"
2117
+ }, {
2118
+ default: withCtx(() => [
2119
+ createVNode(unref(NIcon), {
2120
+ component: unref(CloudUploadOutline),
2121
+ size: "16"
2122
+ }, null, 8, ["component"]),
2123
+ item.showStyle !== "only_icon" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2124
+ createTextVNode(toDisplayString(item.alias || item.name), 1)
2125
+ ], 64)) : createCommentVNode("v-if", true)
2126
+ ]),
2127
+ _: 2
2128
+ }, 1032, ["style", "type", "ghost"])
2129
+ ]),
2130
+ _: 2
2131
+ }, 1032, ["action"])) : createCommentVNode("v-if", true)
2132
+ ], 64)) : unref(isShowRowTileBtnItem)(item) ? withDirectives((openBlock(), createBlock(unref(NButton), {
2133
+ key: 1,
2134
+ onClick: withModifiers(($event) => clickBtn(__props.clickRowData, item, __props.clickRowData.my_index, false, j), ["prevent", "stop"]),
2135
+ class: "btn-custom-class",
2136
+ style: normalizeStyle([{ "margin": "0 8px 8px 0" }, unref($utils).getBtnStyle(item)]),
2137
+ type: item.showStyle == "none_bg" ? "link" : "primary",
2138
+ ghost: item.showStyle == "white_bg"
2139
+ }, {
2140
+ default: withCtx(() => [
2141
+ createVNode(unref(getBtnIcon), {
2142
+ data: item,
2143
+ btnObj: btnObj.value
2144
+ }, null, 8, ["data", "btnObj"]),
2145
+ item.showStyle !== "only_icon" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
2146
+ createTextVNode(toDisplayString(item.alias || item.name), 1)
2147
+ ], 64)) : createCommentVNode("v-if", true)
2148
+ ]),
2149
+ _: 2
2150
+ }, 1032, ["onClick", "style", "type", "ghost"])), [
2151
+ [unref(PreventReClick), __props.preventReTime],
2152
+ [vShow, visibleBtn(item) && !item.isHide]
2153
+ ]) : createCommentVNode("v-if", true)
2154
+ ], 8, _hoisted_11)) : createCommentVNode("v-if", true)
2155
+ ], 64);
2156
+ }), 256)),
2157
+ createCommentVNode(" \u6253\u5370\u5217\u8868"),
2158
+ (openBlock(true), createElementBlock(Fragment, null, renderList(rowPrintBtnList.value, (item, j) => {
2159
+ return openBlock(), createElementBlock(Fragment, null, [
2160
+ unref(showLi)(item) ? (openBlock(), createElementBlock("li", {
2161
+ ref_for: true,
2162
+ ref_key: "setRowTileBtnItem",
2163
+ ref: setRowTileBtnItem,
2164
+ class: "rowTileBtn-item rowPrintBtn-btn",
2165
+ key: item.sid,
2166
+ "data-key": item.sid,
2167
+ "data-source": "rowTile"
2168
+ }, [
2169
+ item.isVisible && !item.isHide ? (openBlock(), createBlock(unref(ButtonPrint), mergeProps({ key: 0 }, _ctx.$attrs, {
2170
+ printConfig: __props.printConfig,
2171
+ baseUrl: __props.printConfig.printBaseUrl,
2172
+ strategy: item.strategy,
2173
+ btnText: item.name,
2174
+ versionType: item.__printConfig && item.__printConfig.versionType,
2175
+ port: item.__printConfig && item.__printConfig.port,
2176
+ authorizationKey: item.__printConfig && item.__printConfig.authorizationKey,
2177
+ templateNumber: item.__printConfig && item.__printConfig.number,
2178
+ hisParams: item.__printConfig && item.__printConfig.hisParams,
2179
+ params: getPrintBtnParams(item),
2180
+ prevFn: () => printBtnPrevFn(__props.clickRowData, item, 2, j),
2181
+ onSuccess: receivePrintSuccess,
2182
+ onError: receivePrintError
2183
+ }), null, 16, ["printConfig", "baseUrl", "strategy", "btnText", "versionType", "port", "authorizationKey", "templateNumber", "hisParams", "params", "prevFn"])) : createCommentVNode("v-if", true)
2184
+ ], 8, _hoisted_12)) : createCommentVNode("v-if", true)
2185
+ ], 64);
2186
+ }), 256)),
2187
+ createCommentVNode(" \u6298\u53E0\u6309\u94AE\u5217\u8868 "),
2188
+ unref(showRowFoldBtnList)(rowFoldBtnList.value, "rowFoldBtnList") ? (openBlock(), createElementBlock("li", _hoisted_13, [
2189
+ !unref(isInlineOperating) ? (openBlock(), createBlock(unref(NDropdown), {
2190
+ key: 0,
2191
+ options: rowFoldBtnList.value,
2192
+ "key-field": "sid",
2193
+ "label-field": "alias",
2194
+ onSelect: handlerOperate
2195
+ }, {
2196
+ default: withCtx(() => [
2197
+ createVNode(unref(NButton), {
2198
+ class: "dropdown-button",
2199
+ style: { "margin": "0 8px 8px 0" }
2200
+ }, {
2201
+ default: withCtx(() => [
2202
+ createTextVNode(toDisplayString("\u66F4\u591A") + " "),
2203
+ createVNode(unref(NIcon), {
2204
+ component: unref(ChevronDownOutline),
2205
+ size: "16"
2206
+ }, null, 8, ["component"])
2207
+ ]),
2208
+ _: 1
2209
+ })
2210
+ ]),
2211
+ _: 1
2212
+ }, 8, ["options"])) : createCommentVNode("v-if", true)
2213
+ ])) : createCommentVNode("v-if", true),
2214
+ createCommentVNode(" \u81EA\u9002\u5E94\u6298\u53E0 "),
2215
+ unref(showRowFoldBtnList)(rowFoldHideBtnList.value) ? (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(rowFoldHideBtnListObj.value, (value, key) => {
2216
+ return openBlock(), createElementBlock(Fragment, null, [
2217
+ !unref(isInlineOperating) ? (openBlock(), createBlock(unref(NDropdown), {
2218
+ key: 0,
2219
+ overlayClassName: "rowFoldHideBtnList-dropdown",
2220
+ options: value.children,
2221
+ "key-field": "sid",
2222
+ "label-field": "alias",
2223
+ onSelect: (key2, btnItem) => handlerBtnlist(key2, btnItem, value.children)
2224
+ }, {
2225
+ default: withCtx(() => [
2226
+ createVNode(unref(NButton), {
2227
+ class: "dropdown-button",
2228
+ style: { "margin": "0 8px 8px 0" }
2229
+ }, {
2230
+ default: withCtx(() => [
2231
+ createTextVNode(toDisplayString("\u66F4\u591A") + " "),
2232
+ createVNode(unref(NIcon), {
2233
+ component: unref(ChevronDownOutline),
2234
+ size: "16"
2235
+ }, null, 8, ["component"])
2236
+ ]),
2237
+ _: 1
2238
+ })
2239
+ ]),
2240
+ _: 2
2241
+ }, 1032, ["options", "onSelect"])) : createCommentVNode("v-if", true)
2242
+ ], 64);
2243
+ }), 256)) : createCommentVNode("v-if", true)
2244
+ ], 64))
2245
+ ], 64)) : createCommentVNode("v-if", true)
2246
+ ])) : createCommentVNode("v-if", true)
2247
+ ])), [
2248
+ [unref(Resize), onResize]
2249
+ ])
2250
+ ]),
2251
+ unref(showBaseTabs) ? (openBlock(), createElementBlock("div", _hoisted_14, [
2252
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabConditionList, (item, index) => {
2253
+ return openBlock(), createElementBlock("div", {
2254
+ key: index,
2255
+ class: normalizeClass(tabIndex.value === index ? "base-tabs-item base-tabs-item-active" : "base-tabs-item"),
2256
+ onClick: ($event) => tabClick(index)
2257
+ }, toDisplayString(item.name) + " " + toDisplayString(__props.countTabCondition == 1 && (item.digital || item.digital === 0) ? "(" + (item.digital || 0) + ")" : ""), 11, _hoisted_15);
2258
+ }), 128))
2259
+ ])) : createCommentVNode("v-if", true),
2260
+ createCommentVNode(" palceholder \u6587\u5B57\u5BBD\u5EA6\u8BA1\u7B97 "),
2261
+ createElementVNode("span", {
2262
+ class: "baseSearchPlaceholderSpan",
2263
+ ref_key: "baseSearchPlaceholderSpan",
2264
+ ref: baseSearchPlaceholderSpan
2265
+ }, toDisplayString(unref(searchPlaceHolder)), 513)
2266
+ ]);
2267
+ };
2268
+ }
2269
+ });
2270
+ var scriptBaseSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "BaseSearch.vue"]]);
2271
+
2272
+ export { scriptBaseSearch as default };