sohelp-eleplus 1.1.13

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 (191) hide show
  1. package/README.md +7 -0
  2. package/cache/DictCache.js +58 -0
  3. package/cache/ModuleCache.js +352 -0
  4. package/components.js +45 -0
  5. package/core-export.js +4 -0
  6. package/http/CrudHttp.js +115 -0
  7. package/http/DictHttp.js +12 -0
  8. package/http/ModuleHttp.js +68 -0
  9. package/http/SohelpHttp.js +125 -0
  10. package/index.js +6 -0
  11. package/installer.js +8 -0
  12. package/lang/en_US.js +4 -0
  13. package/lang/zh_CN.js +4 -0
  14. package/lang/zh_TW.js +4 -0
  15. package/package.json +9 -0
  16. package/sohelp-ace-editor/index.vue +198 -0
  17. package/sohelp-application-select/index.vue +15 -0
  18. package/sohelp-autocode/index.vue +53 -0
  19. package/sohelp-calendar-view/index.vue +11 -0
  20. package/sohelp-card-view/index.vue +11 -0
  21. package/sohelp-condition/index.vue +210 -0
  22. package/sohelp-cry-input/index.vue +64 -0
  23. package/sohelp-date/index.vue +27 -0
  24. package/sohelp-datetime/index.vue +44 -0
  25. package/sohelp-datetime-picker/index.vue +86 -0
  26. package/sohelp-datetime-range/index.vue +59 -0
  27. package/sohelp-dict/index.vue +207 -0
  28. package/sohelp-dict/props.js +68 -0
  29. package/sohelp-drawer/index.vue +31 -0
  30. package/sohelp-drop-card/index.vue +94 -0
  31. package/sohelp-drop-card/props.js +68 -0
  32. package/sohelp-dyn-select/index.vue +99 -0
  33. package/sohelp-dyn-select/props.js +67 -0
  34. package/sohelp-dyn-tree/index.vue +82 -0
  35. package/sohelp-dyn-tree-select/index.vue +114 -0
  36. package/sohelp-entity-form/index.vue +524 -0
  37. package/sohelp-entity-grid/index.vue +30 -0
  38. package/sohelp-file-upload/index.vue +218 -0
  39. package/sohelp-filter-scheme/components/condition.vue +102 -0
  40. package/sohelp-filter-scheme/components/filter.vue +45 -0
  41. package/sohelp-filter-scheme/components/keywords.vue +15 -0
  42. package/sohelp-filter-scheme/components/scheme.vue +49 -0
  43. package/sohelp-filter-scheme/index.vue +113 -0
  44. package/sohelp-grid/SohelpGridConfig.js~ +408 -0
  45. package/sohelp-grid/components/filter-condition-item.vue +298 -0
  46. package/sohelp-grid/index.vue +1886 -0
  47. package/sohelp-grid/js/ConditionType.js +101 -0
  48. package/sohelp-grid/js/DefaultGridOptions.js +141 -0
  49. package/sohelp-grid/js/DefaultProps.js +27 -0
  50. package/sohelp-grid/js/SohelpConfigFunction.js +0 -0
  51. package/sohelp-grid/js/SohelpGridConfig.js +101 -0
  52. package/sohelp-grid/js/useSohelpGridConfig.js +519 -0
  53. package/sohelp-grid-select/index.vue +245 -0
  54. package/sohelp-grid-view/filter/config/grid-filter-condition.vue +221 -0
  55. package/sohelp-grid-view/filter/config/grid-filter-config.vue +27 -0
  56. package/sohelp-grid-view/filter/config/grid-filter-field.vue +378 -0
  57. package/sohelp-grid-view/filter/config/grid-filter-keywords.vue +310 -0
  58. package/sohelp-grid-view/filter/config/grid-filter-list.vue +313 -0
  59. package/sohelp-grid-view/filter/config/grid-filter-scheme.vue +264 -0
  60. package/sohelp-grid-view/filter/config/grid-filter-sort.vue +310 -0
  61. package/sohelp-grid-view/filter/config/index.vue +206 -0
  62. package/sohelp-grid-view/filter/filter-form.vue +427 -0
  63. package/sohelp-grid-view/filter/filter-toolbar.vue +110 -0
  64. package/sohelp-grid-view/filter/index.vue +160 -0
  65. package/sohelp-grid-view/index.vue +379 -0
  66. package/sohelp-grid-view-select/index.vue +141 -0
  67. package/sohelp-group-view/index.vue +11 -0
  68. package/sohelp-icon-select/index.vue +96 -0
  69. package/sohelp-icon-select/vxeui-icon.js +90 -0
  70. package/sohelp-image-upload/index.vue +286 -0
  71. package/sohelp-input/index.vue +39 -0
  72. package/sohelp-modal/index.vue +49 -0
  73. package/sohelp-module/index.vue +54 -0
  74. package/sohelp-module/useModalManager.js +89 -0
  75. package/sohelp-module/useSohelpModule.js +66 -0
  76. package/sohelp-number-input/index.vue +32 -0
  77. package/sohelp-number-range/index.vue +135 -0
  78. package/sohelp-org-select/index.vue +30 -0
  79. package/sohelp-org-tree/index.vue +18 -0
  80. package/sohelp-org-tree-select/index.vue +93 -0
  81. package/sohelp-org-user-tree/index.vue +26 -0
  82. package/sohelp-org-user-tree-select/index.vue +11 -0
  83. package/sohelp-pagination/index.vue +11 -0
  84. package/sohelp-power/index.vue +105 -0
  85. package/sohelp-pro-form/components/pro-form-footer.vue +44 -0
  86. package/sohelp-pro-form/components/pro-form-item.vue +1133 -0
  87. package/sohelp-pro-form/index.vue +257 -0
  88. package/sohelp-pro-form/util.js +140 -0
  89. package/sohelp-pro-layout/index.vue +11 -0
  90. package/sohelp-pro-table/index.vue +14 -0
  91. package/sohelp-process/index.vue +216 -0
  92. package/sohelp-rate/index.vue +56 -0
  93. package/sohelp-rate/props.js +71 -0
  94. package/sohelp-relation/index.vue +11 -0
  95. package/sohelp-rich-text/index.vue +242 -0
  96. package/sohelp-rich-text/util.js +231 -0
  97. package/sohelp-richtext/index.vue +10 -0
  98. package/sohelp-role-select/index.vue +33 -0
  99. package/sohelp-search/components/search-config.vue +0 -0
  100. package/sohelp-search/index.vue +49 -0
  101. package/sohelp-search-pro-form/index.vue +11 -0
  102. package/sohelp-select/index.vue +120 -0
  103. package/sohelp-split-panel/index.vue +15 -0
  104. package/sohelp-switch/index.vue +56 -0
  105. package/sohelp-table/index.vue +151 -0
  106. package/sohelp-tenant-select/index.vue +128 -0
  107. package/sohelp-text/index.vue +14 -0
  108. package/sohelp-textarea-input/index.vue +36 -0
  109. package/sohelp-time/index.vue +10 -0
  110. package/sohelp-tree/index.vue +37 -0
  111. package/sohelp-tree-select/index.vue +18 -0
  112. package/sohelp-user-select/index.vue +44 -0
  113. package/sohelp-user-select/index.vue~ +53 -0
  114. package/sohelp-user-select/props.js +71 -0
  115. package/sohelp-user-tag/index.vue +12 -0
  116. package/sohelp-user-tree/index.vue +11 -0
  117. package/sohelp-vform-drawer/index.vue +40 -0
  118. package/sohelp-vform-eleplus/favicon.ico +0 -0
  119. package/sohelp-vform-eleplus/index.vue +297 -0
  120. package/sohelp-vform-eleplus/preview.html +91 -0
  121. package/sohelp-vform-eleplus/render.es.js +72433 -0
  122. package/sohelp-vform-eleplus/render.style.css +16 -0
  123. package/sohelp-vform-eleplus/render.umd.js +57 -0
  124. package/sohelp-vform-eleplus/tinymce/langs/zh_CN.js +462 -0
  125. package/sohelp-vform-eleplus/tinymce/langs/zh_TW.js +419 -0
  126. package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.css +72 -0
  127. package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.min.css +7 -0
  128. package/sohelp-vform-eleplus/tinymce/skins/content/default/content.css +67 -0
  129. package/sohelp-vform-eleplus/tinymce/skins/content/default/content.min.css +7 -0
  130. package/sohelp-vform-eleplus/tinymce/skins/content/document/content.css +72 -0
  131. package/sohelp-vform-eleplus/tinymce/skins/content/document/content.min.css +7 -0
  132. package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.css +68 -0
  133. package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.min.css +7 -0
  134. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.css +732 -0
  135. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.css +726 -0
  136. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
  137. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.min.css +7 -0
  138. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.css +29 -0
  139. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.min.css +7 -0
  140. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  141. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.css +3047 -0
  142. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.min.css +7 -0
  143. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
  144. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -0
  145. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
  146. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  147. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.css +714 -0
  148. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
  149. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
  150. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
  151. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
  152. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -0
  153. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  154. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.css +3047 -0
  155. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
  156. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
  157. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -0
  158. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
  159. package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  160. package/sohelp-vform-modal/index.vue +41 -0
  161. package/sohelp-vform-select/index.vue +11 -0
  162. package/sohelp-vform-vant/favicon.ico +0 -0
  163. package/sohelp-vform-vant/render.es.js +14608 -0
  164. package/sohelp-vform-vant/render.style.css +1 -0
  165. package/sohelp-vform-vant/render.umd.js +22 -0
  166. package/sohelp-vxe-grid/DefaultGridOptions.js +102 -0
  167. package/sohelp-vxe-grid/DefaultProps.js +37 -0
  168. package/sohelp-vxe-grid/SohelpGridConfig.js +142 -0
  169. package/sohelp-vxe-grid/index.vue +518 -0
  170. package/sohelp-vxe-grid-select/index.vue +148 -0
  171. package/sohelp-vxe-table/index.vue +184 -0
  172. package/sohelp-workflow/index.vue +495 -0
  173. package/sohelp-workflow/nodeWrap.vue +53 -0
  174. package/sohelp-workflow/nodes/addNode.vue +27 -0
  175. package/sohelp-workflow/nodes/approver.vue +125 -0
  176. package/sohelp-workflow/nodes/branch.vue +434 -0
  177. package/sohelp-workflow/nodes/promoter.vue +80 -0
  178. package/sohelp-workflow/nodes/send.vue +95 -0
  179. package/sohelp-workflow-drawer/components/approval-modal.vue +182 -0
  180. package/sohelp-workflow-drawer/components/draw-box.vue +141 -0
  181. package/sohelp-workflow-drawer/components/form.vue +79 -0
  182. package/sohelp-workflow-drawer/components/table.vue +153 -0
  183. package/sohelp-workflow-drawer/components/timeline.vue +189 -0
  184. package/sohelp-workflow-drawer/components/workflow.vue +68 -0
  185. package/sohelp-workflow-drawer/index.vue +311 -0
  186. package/sohelp-workflow-drawer/js/index.js +119 -0
  187. package/style/index.scss +0 -0
  188. package/utils/ProFormConvertUtil.js +76 -0
  189. package/utils/core.js +310 -0
  190. package/utils/use-form-data.js +48 -0
  191. package/utils/use-mobile.js +43 -0
@@ -0,0 +1,245 @@
1
+ <template>
2
+ <div class="sohelp-grid-select" :class="{ 'hide-placeholder': originValue.length }">
3
+ <el-select
4
+ v-model="selectedLabel"
5
+ :placeholder="originValue.length > 0 ? '' : '请选择列表数据'"
6
+ :teleported="true"
7
+ popper-class="grid-select-popper"
8
+ ref="selectRef"
9
+ @visible-change="handleVisibleChange"
10
+ >
11
+ <template #prefix>
12
+ <el-tag type="info" v-for="tag in originValue" :key="tag" closable @close="tagClose(tag)">{{
13
+ getTag(tag)
14
+ }}</el-tag>
15
+ </template>
16
+
17
+ <el-option style="height: auto; padding: 0; height: 262px; overflow: hidden; align-items: flex-start">
18
+ <sohelp-vxe-grid
19
+ :refid="refid"
20
+ ref="tableRef"
21
+ class="vxe-grid-main"
22
+ @click.stop="() => {}"
23
+ :multiple="multiple"
24
+ v-model:value="selectedValue"
25
+ v-model:data="selectedData"
26
+ :url="url"
27
+ >
28
+ </sohelp-vxe-grid>
29
+ </el-option>
30
+
31
+ <template #footer>
32
+ <div class="footer">
33
+ <el-button size="small" @click="close">取消</el-button>
34
+ <el-button size="small" type="primary" @click="confirm">确定</el-button>
35
+ </div>
36
+ </template>
37
+ </el-select>
38
+ </div>
39
+ </template>
40
+ <script setup>
41
+ import { nextTick, ref, watch } from 'vue';
42
+
43
+ const props = defineProps({
44
+ modelValue: {
45
+ type: [String, Array],
46
+ default: () => {
47
+ return [];
48
+ }
49
+ },
50
+ data: {
51
+ type: Array,
52
+ default: () => {
53
+ return [];
54
+ }
55
+ },
56
+ refid: {
57
+ type: String,
58
+ required: true
59
+ },
60
+ labelField: {
61
+ type: String,
62
+ default: 'label',
63
+ required: true
64
+ },
65
+ valueField: {
66
+ type: String,
67
+ default: 'id',
68
+ required: true
69
+ },
70
+ multiple: {
71
+ type: Boolean,
72
+ default: false
73
+ },
74
+ url: String
75
+ });
76
+
77
+ const emit = defineEmits(['update:value', 'update:data']);
78
+
79
+ const selectRef = ref(null);
80
+ const tableRef = ref(null);
81
+ const selectedValue = ref([]);
82
+ const selectedData = ref([]);
83
+ const selectedLabel = ref('');
84
+ /** value转换为数组,用于渲然tag */
85
+ const originValue = ref([]);
86
+
87
+ /**
88
+ * 格式化数据
89
+ * @param row
90
+ */
91
+ const mappingField = (row) => {
92
+ return {
93
+ [props.labelField]: row[props.labelField] || '',
94
+ [props.valueField]: row[props.valueField] || ''
95
+ };
96
+ };
97
+
98
+ /**
99
+ *
100
+ * @param id 获取标签
101
+ */
102
+ const getTag = (id) => {
103
+ if (selectedData.value?.length > 0) {
104
+ return selectedData.value.find((item) => item[props.valueField] === id)?.[props.labelField] || id;
105
+ }
106
+ };
107
+
108
+ /**
109
+ * vxe-grid显示时回显数据
110
+ */
111
+ const handleVisibleChange = (visible) => {
112
+ if (visible) {
113
+ tableRef.value?.initValue();
114
+ }
115
+ };
116
+
117
+ /**
118
+ * 删除标签
119
+ * @param id
120
+ */
121
+ const tagClose = (id) => {
122
+ close();
123
+ clear();
124
+ selectedValue.value = selectedValue.value.filter((item) => item != id);
125
+ originValue.value = [...selectedValue.value];
126
+ updateValue();
127
+ };
128
+
129
+ /**
130
+ * 清空
131
+ */
132
+ const clear = () => {
133
+ selectedValue.value = [];
134
+ tableRef.value?.clearRadioRow();
135
+ emit('update:value', []);
136
+ close();
137
+ };
138
+
139
+ /**
140
+ * 关闭下拉表格
141
+ */
142
+ const close = () => {
143
+ selectRef.value?.blur();
144
+ };
145
+
146
+ /**
147
+ * 确定
148
+ */
149
+ const confirm = () => {
150
+ updateValue();
151
+ close();
152
+ };
153
+
154
+ /**
155
+ * 更新数据
156
+ * @param val
157
+ */
158
+ const updateValue = () => {
159
+ emit(
160
+ 'update:data',
161
+ selectedData.value
162
+ .map((item) => {
163
+ return mappingField(item);
164
+ })
165
+ .filter((item) => item[props.valueField])
166
+ );
167
+ emit('update:modelValue', props.multiple ? [...selectedValue.value] : selectedValue.value[0] || '');
168
+ };
169
+
170
+ watch(
171
+ () => props.modelValue,
172
+ (val) => {
173
+ if (val && val != 0) {
174
+ let arr = Array.isArray(val) ? val : val ? [val] : [];
175
+ originValue.value = [...arr];
176
+ selectedValue.value = [...arr];
177
+ }
178
+ }
179
+ );
180
+
181
+ watch(
182
+ () => props.data,
183
+ (val) => {
184
+ if (val) {
185
+ if (!Array.isArray(val)) {
186
+ selectedData.value = [val];
187
+ } else {
188
+ selectedData.value = [...val];
189
+ }
190
+ }
191
+ },
192
+ {
193
+ immediate: true,
194
+ deep: true
195
+ }
196
+ );
197
+ </script>
198
+ <script>
199
+ export default {
200
+ name: 'SohelpGrkdSelect'
201
+ };
202
+ </script>
203
+ <style lang="scss" scoped>
204
+ .sohelp-grid-select {
205
+ width: 100%;
206
+ min-width: 160px;
207
+ box-sizing: border-box;
208
+
209
+ :deep(.el-select) {
210
+ .el-select__prefix {
211
+ flex: 1 1 0;
212
+ max-width: calc(100% - 15px);
213
+ flex-wrap: wrap;
214
+ max-height: 90px;
215
+ overflow-y: auto;
216
+
217
+ .el-tag {
218
+ max-width: 100%;
219
+ height: auto;
220
+ padding: 0 10px 0 6px;
221
+ //换行
222
+ white-space: normal;
223
+ }
224
+ }
225
+ .el-select__selection {
226
+ flex: 1 1 100%;
227
+ }
228
+ }
229
+ }
230
+
231
+ .sohelp-table-select.hide-placeholder {
232
+ :deep(.el-select) {
233
+ .el-select__prefix {
234
+ flex: 1 1 100%;
235
+ }
236
+ .el-select__selection {
237
+ flex: 1 1 0;
238
+ }
239
+ }
240
+ }
241
+
242
+ .footer {
243
+ text-align: right;
244
+ }
245
+ </style>
@@ -0,0 +1,221 @@
1
+ <template>
2
+ <div>
3
+ <div style="display: flex; align-items: center">
4
+ <el-select
5
+ v-model="obj.type"
6
+ :style="{ backgroundColor: obj.type === 'and' ? '#38c10b' : '#c59d0a' }"
7
+ class="mySelectStyle"
8
+ >
9
+ <el-option label="满足所有条件" value="and" />
10
+ <el-option label="满足任一条件" value="or" />
11
+ </el-select>
12
+ <el-icon
13
+ @click="addSubCondition(0)"
14
+ style="margin-left: 10px; cursor: pointer"
15
+ size="24"
16
+ >
17
+ <Fold />
18
+ </el-icon>
19
+ <el-dropdown trigger="click">
20
+ <el-icon style="margin-left: 10px; cursor: pointer" size="24">
21
+ <CirclePlus />
22
+ </el-icon>
23
+ <template #dropdown>
24
+ <el-dropdown-menu>
25
+ <el-dropdown-item
26
+ @click="addCondition(item)"
27
+ v-for="item in fields"
28
+ >{{ item.label }}</el-dropdown-item
29
+ >
30
+ </el-dropdown-menu>
31
+ </template>
32
+ </el-dropdown>
33
+ </div>
34
+ <div
35
+ v-if="obj.children && obj.children.length"
36
+ v-for="(item, index) in obj.children"
37
+ :style="{
38
+ borderLeft:
39
+ obj.type === 'and' ? '4px solid #38c10b' : '4px solid #c59d0a'
40
+ }"
41
+ >
42
+ <div
43
+ v-if="!item.type"
44
+ style="
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: space-between;
48
+ padding: 10px;
49
+ "
50
+ >
51
+ <div style="display: flex; align-items: center; width: 240px">
52
+ <div style="font-size: 16px; margin-right: 10px">{{
53
+ item.label
54
+ }}</div>
55
+ <select
56
+ v-model="item.comparison"
57
+ style="border: none; width: auto; background-color: #dedede"
58
+ >
59
+ <option v-for="op in options" :value="op.value">{{
60
+ op.label
61
+ }}</option>
62
+ </select>
63
+ </div>
64
+ <div style="display: flex; align-items: center">
65
+ <el-input v-model="item.value" placeholder="请输入" />
66
+ <el-icon
67
+ @click="removeCondition(index)"
68
+ style="margin-left: 8px"
69
+ size="20"
70
+ >
71
+ <Delete />
72
+ </el-icon>
73
+ </div>
74
+ </div>
75
+ <div v-else style="padding: 10px 0 0 10px">
76
+ <GridFilterCondition :value="item" :fields="fields" />
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </template>
81
+
82
+ <script>
83
+ import { Fold, CirclePlus, Delete } from '@element-plus/icons-vue';
84
+ export default {
85
+ name: 'GridFilterCondition',
86
+ components: {
87
+ GridFilterCondition: import('./grid-filter-condition.vue'),
88
+ Delete,
89
+ Fold,
90
+ CirclePlus
91
+ },
92
+ props: {
93
+ fields: {
94
+ type: Array,
95
+ required: true
96
+ },
97
+ modelValue: {
98
+ type: Object,
99
+ required: true
100
+ },
101
+ value: {
102
+ type: Object,
103
+ required: true
104
+ }
105
+ },
106
+ data() {
107
+ return {
108
+ mainConditionType: 'and', // 主条件类型
109
+ conditions: [],
110
+ options: [
111
+ {
112
+ label: '包含',
113
+ value: 'LIKE'
114
+ },
115
+ {
116
+ label: '不包含',
117
+ value: 'NOT_LIKE'
118
+ },
119
+
120
+ {
121
+ label: '等于',
122
+ value: 'EQ'
123
+ },
124
+ {
125
+ label: '不等于',
126
+ value: 'NE'
127
+ },
128
+ {
129
+ label: '大于',
130
+ value: 'GT'
131
+ },
132
+ {
133
+ label: '小于',
134
+ value: 'LT'
135
+ },
136
+ {
137
+ label: '大于等于',
138
+ value: 'GTE'
139
+ },
140
+ {
141
+ label: '小于等于',
142
+ value: 'LTE'
143
+ },
144
+ {
145
+ label: '左包含',
146
+ value: 'LEFT_LIKE'
147
+ },
148
+ {
149
+ label: '右包含',
150
+ value: 'RIGHT_LIKE'
151
+ },
152
+ {
153
+ label: '为空',
154
+ value: 'EMPTY'
155
+ },
156
+ {
157
+ label: '不为空',
158
+ value: 'NOT_EMPTY'
159
+ }
160
+ ],
161
+ obj: this.value
162
+ };
163
+ },
164
+ watch: {
165
+ conditions: {
166
+ handler(newConditions) {
167
+ this.$emit('update:modelValue', {
168
+ [this.mainConditionType]: newConditions
169
+ });
170
+ },
171
+ deep: true
172
+ }
173
+ },
174
+ methods: {
175
+ addCondition(row) {
176
+ let data = [];
177
+ let datato = [];
178
+ if (this.obj.children.length) {
179
+ this.obj.children.forEach((e) => {
180
+ if (!e.type) {
181
+ data.push(e);
182
+ } else {
183
+ datato.push(e);
184
+ }
185
+ });
186
+ }
187
+
188
+
189
+ data.push(row);
190
+ this.obj.children = data.concat(datato);
191
+ },
192
+ removeCondition(index) {
193
+ this.obj.children.splice(index, 1);
194
+ },
195
+ addSubCondition() {
196
+ // 确保 children 数组存在
197
+ // if (!this.conditions[index].children) {
198
+ // this.$set(this.conditions[index], 'children', []);
199
+ // }
200
+ this.obj.children.push({
201
+ type: 'and',
202
+ children: []
203
+ });
204
+ }
205
+ }
206
+ };
207
+ </script>
208
+
209
+ <style scoped>
210
+ /* 添加样式 */
211
+ .mySelectStyle {
212
+ border-radius: 5px;
213
+ border: none !important;
214
+ width: 130px;
215
+ }
216
+
217
+ :deep(.el-select__placeholder) {
218
+ color: #ffffff !important;
219
+ /* 自定义占位符颜色 */
220
+ }
221
+ </style>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <el-form>
3
+ <el-form-item label="高级搜索默认显示方式">
4
+ <el-select v-model="form.filter.config.filterPosition" style="width:200px;">
5
+ <el-option label="不显示" value="NONE"></el-option>
6
+ <el-option label="顶部显示" value="TOP"></el-option>
7
+ <el-option label="右边显示" value="RIGHT"></el-option>
8
+ <el-option label="弹窗显示" value="MODAL"></el-option>
9
+ </el-select>
10
+ </el-form-item>
11
+ <el-form-item label="显示查询范围条件">
12
+ <sohelp-switch v-model="form.isPower" ></sohelp-switch>
13
+ </el-form-item>
14
+ <el-form-item label="显示查询条件超过行数将隐藏">
15
+ <sohelp-input v-model="form.filter.config.maxRows" style="width:200px;"></sohelp-input>
16
+ </el-form-item>
17
+ <el-form-item label="默认一页显示多少行">
18
+ <sohelp-number-input v-model="form.limit" :min="10"></sohelp-number-input>
19
+ </el-form-item>
20
+ </el-form>
21
+ </template>
22
+
23
+ <script setup>
24
+ const form = defineModel("modelValue",{type:Object,default:()=>({})});
25
+ </script>
26
+
27
+ <style lang="scss" scoped></style>