imatrix-ui 2.9.0-dw → 2.9.0-dw-tmp2

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 (145) hide show
  1. package/.babelrc +17 -0
  2. package/build/components.json +4 -0
  3. package/build/gen-style.js +32 -0
  4. package/build/webpack.base.js +140 -0
  5. package/build/webpack.component.js +40 -0
  6. package/build/webpack.prod.js +35 -0
  7. package/lib/DepartmentTree.js +8 -0
  8. package/lib/SuperGrid.js +28 -0
  9. package/lib/super-ui.min.js +72 -0
  10. package/package.json +49 -24
  11. package/lib/super-ui.css +0 -1
  12. package/lib/super-ui.umd.min.js +0 -67
  13. package/packages/breadcrumb/index.js +0 -6
  14. package/packages/breadcrumb/src/breadcrumb.vue +0 -71
  15. package/packages/department-tree/index.js +0 -6
  16. package/packages/department-tree/src/department-tree.vue +0 -108
  17. package/packages/department-tree-inline/index.js +0 -6
  18. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -402
  19. package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -284
  20. package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
  21. package/packages/department-tree-inline/src/department-tree-service.js +0 -245
  22. package/packages/department-tree-inline/src/search-result.vue +0 -176
  23. package/packages/department-user-tree/index.js +0 -6
  24. package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
  25. package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
  26. package/packages/department-user-tree/src/department-user-tree.vue +0 -101
  27. package/packages/department-user-tree-inline/index.js +0 -6
  28. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -626
  29. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -269
  30. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
  31. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -230
  32. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -122
  33. package/packages/department-user-tree-inline/src/search-result.vue +0 -197
  34. package/packages/directives/prevent-reclick.js +0 -19
  35. package/packages/dynamic-source-select/index.js +0 -6
  36. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
  37. package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
  38. package/packages/dynamic-source-select/src/events.js +0 -55
  39. package/packages/fs-preview/index.js +0 -6
  40. package/packages/fs-preview/src/fs-preview.vue +0 -226
  41. package/packages/fs-upload/index.js +0 -6
  42. package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
  43. package/packages/fs-upload/src/fs-upload-single.vue +0 -312
  44. package/packages/fs-upload/src/fs-upload.vue +0 -189
  45. package/packages/fs-upload/src/see-big-picture.vue +0 -55
  46. package/packages/fs-upload-list/index.js +0 -6
  47. package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
  48. package/packages/hamburger/index.js +0 -6
  49. package/packages/hamburger/src/hamburger.vue +0 -38
  50. package/packages/index.js +0 -121
  51. package/packages/multipart-upload/index.js +0 -6
  52. package/packages/multipart-upload/src/index.vue +0 -73
  53. package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
  54. package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
  55. package/packages/organization-input/index.js +0 -6
  56. package/packages/organization-input/src/organization-input.vue +0 -542
  57. package/packages/plugins/export-data-new.js +0 -453
  58. package/packages/plugins/export-data.js +0 -361
  59. package/packages/plugins/index.js +0 -15
  60. package/packages/plugins/public-method.js +0 -43
  61. package/packages/remove-department/index.js +0 -6
  62. package/packages/remove-department/src/remove-department.vue +0 -172
  63. package/packages/remove-department/src/remove-dept-service.js +0 -20
  64. package/packages/remove-user/index.js +0 -6
  65. package/packages/remove-user/src/remove-user-service.js +0 -20
  66. package/packages/remove-user/src/remove-user.vue +0 -195
  67. package/packages/remove-workgroup/index.js +0 -6
  68. package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
  69. package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
  70. package/packages/rich-editor/index.js +0 -7
  71. package/packages/rich-editor/index.vue +0 -278
  72. package/packages/rich-editor/langs/zh-Hans.js +0 -1
  73. package/packages/rich-editor/viewer.vue +0 -103
  74. package/packages/scan-code-input/index.js +0 -6
  75. package/packages/scan-code-input/src/events.js +0 -33
  76. package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
  77. package/packages/scan-code-input/src/scan-code-input.vue +0 -116
  78. package/packages/secret-info/index.js +0 -7
  79. package/packages/secret-info/index.vue +0 -90
  80. package/packages/super-grid/index.js +0 -7
  81. package/packages/super-grid/src/apis.js +0 -763
  82. package/packages/super-grid/src/columns-config.vue +0 -335
  83. package/packages/super-grid/src/custom-formatter.js +0 -250
  84. package/packages/super-grid/src/dynamic-input.vue +0 -1279
  85. package/packages/super-grid/src/eventBus.js +0 -2
  86. package/packages/super-grid/src/events.js +0 -55
  87. package/packages/super-grid/src/formValidatorUtil.js +0 -226
  88. package/packages/super-grid/src/formatter.js +0 -181
  89. package/packages/super-grid/src/group-column.vue +0 -100
  90. package/packages/super-grid/src/header-context-menu.vue +0 -87
  91. package/packages/super-grid/src/index-column.vue +0 -51
  92. package/packages/super-grid/src/normal-column.vue +0 -769
  93. package/packages/super-grid/src/public-methods.js +0 -31
  94. package/packages/super-grid/src/row-operation.vue +0 -161
  95. package/packages/super-grid/src/search-button.vue +0 -66
  96. package/packages/super-grid/src/search-condition-input.vue +0 -61
  97. package/packages/super-grid/src/search-condition-list.vue +0 -59
  98. package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
  99. package/packages/super-grid/src/search-form-dialog.vue +0 -79
  100. package/packages/super-grid/src/search-form-item.vue +0 -386
  101. package/packages/super-grid/src/search-form-number.vue +0 -38
  102. package/packages/super-grid/src/search-form-open.vue +0 -162
  103. package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -188
  104. package/packages/super-grid/src/search-form.vue +0 -634
  105. package/packages/super-grid/src/search-methods.js +0 -387
  106. package/packages/super-grid/src/selection-column.vue +0 -43
  107. package/packages/super-grid/src/store.js +0 -3
  108. package/packages/super-grid/src/super-grid-service.js +0 -561
  109. package/packages/super-grid/src/super-grid.vue +0 -2793
  110. package/packages/super-grid/src/utils.js +0 -763
  111. package/packages/super-grid/src/view-image-dialog.vue +0 -130
  112. package/packages/super-nine-grid/index.js +0 -7
  113. package/packages/super-nine-grid/src/apis.js +0 -103
  114. package/packages/super-nine-grid/src/custom-formatter.js +0 -66
  115. package/packages/super-nine-grid/src/formatter.js +0 -132
  116. package/packages/super-nine-grid/src/search-form-number.vue +0 -38
  117. package/packages/super-nine-grid/src/search-form.vue +0 -430
  118. package/packages/super-nine-grid/src/search-methods.js +0 -134
  119. package/packages/super-nine-grid/src/store.js +0 -3
  120. package/packages/super-nine-grid/src/super-grid-service.js +0 -91
  121. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
  122. package/packages/super-nine-grid/src/utils.js +0 -261
  123. package/packages/svg-icon/index.js +0 -6
  124. package/packages/svg-icon/src/svg-icon.vue +0 -43
  125. package/packages/utils/utils.js +0 -152
  126. package/packages/utils/value-set.js +0 -86
  127. package/packages/valid-code/index.js +0 -7
  128. package/packages/valid-code/src/valid-code.vue +0 -95
  129. package/packages/workflow-button/index.js +0 -6
  130. package/packages/workflow-button/src/workflow-button.vue +0 -325
  131. package/packages/workflow-history-list/index.js +0 -6
  132. package/packages/workflow-history-list/src/api.js +0 -7
  133. package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
  134. package/packages/workgroup-tree/index.js +0 -6
  135. package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
  136. package/packages/workgroup-tree-inline/index.js +0 -6
  137. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
  138. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
  139. package/packages/workgroup-user-tree/index.js +0 -6
  140. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
  141. package/packages/workgroup-user-tree-inline/index.js +0 -6
  142. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
  143. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
  144. package/packages/year-range-picker/index.js +0 -6
  145. package/packages/year-range-picker/src/year-range-picker.vue +0 -51
@@ -1,79 +0,0 @@
1
- <template>
2
- <el-dialog
3
- :show-close="true"
4
- :append-to-body="true"
5
- title="查询条件"
6
- visible
7
- @close="$emit('close')"
8
- >
9
- <search-form
10
- ref="sf"
11
- :columns="columns"
12
- :code="code"
13
- :url="url"
14
- :pagination="pagination"
15
- :query="query"
16
- :search-param="searchParam"
17
- :init-search-props="initSearchProps"
18
- @search="doSearch"
19
- @reset="resetSearch"
20
- />
21
- </el-dialog>
22
- </template>
23
- <script>
24
- import SearchForm from './search-form'
25
- export default {
26
- name: 'SearchFormDialog',
27
- components: {
28
- SearchForm
29
- },
30
- props: {
31
- columns: {
32
- type: Array,
33
- default: null
34
- },
35
- code: {
36
- type: String,
37
- default: null
38
- },
39
- url: {
40
- type: String,
41
- default: null
42
- },
43
- pagination: {
44
- type: Object,
45
- default: null
46
- },
47
- query: {
48
- type: Object,
49
- default: null
50
- },
51
- searchParam: {
52
- type: Object,
53
- default: null
54
- },
55
- initSearchProps: {
56
- type: Array,
57
- default: null
58
- }
59
-
60
- },
61
- data() {
62
- return {}
63
- },
64
- computed: {
65
-
66
- },
67
- created() {
68
-
69
- },
70
- methods: {
71
- doSearch(searchForm) {
72
- this.$emit('search', searchForm)
73
- },
74
- resetSearch() {
75
- this.$emit('reset')
76
- }
77
- }
78
- }
79
- </script>
@@ -1,386 +0,0 @@
1
- <template>
2
- <el-form-item :prop="column.prop" :label-width="'112px'">
3
- <template v-slot:label>
4
- <span v-if="column.searchLabel && column.searchLabel !== ''" :title="column.searchLabel.replace(/\\n/g, '</br>')" v-html="column.searchLabel.replace(/\\n/g, '</br>')" />
5
- <span v-else :title="column.label.replace(/\\n/g, '</br>')" v-html="column.label.replace(/\\n/g, '</br>')" />
6
- </template>
7
- <span v-if="customComponent(column) === true">
8
- <component
9
- :is="column.componentName"
10
- :ref="column.componentName"
11
- class="customComponent"
12
- :select-options="column.valueSet"
13
- :prop="column.prop"
14
- :value="getFormItemValue(column.prop)"
15
- :row="searchForm"
16
- :entity="searchForm"
17
- @input="setValueToModelProp(column.prop,$event,column.componentName)"
18
- />
19
- </span>
20
- <!-- 日期区间-两个输入框方式 -->
21
- <span v-else-if="column.componentType ==='dateSection'">
22
- <el-date-picker
23
- :value="getFormItemValue(column.prop,0)"
24
- :style="column.searchControlWidth"
25
- type="date"
26
- :placeholder="$t('imatrixUIMessage.startDate')"
27
- @input="setValueToModelProp(column.prop,$event,null,0)"
28
- />
29
- <el-date-picker
30
- :value="getFormItemValue(column.prop,1)"
31
- :style="column.searchControlWidth"
32
- type="date"
33
- :placeholder="$t('imatrixUIMessage.endDate')"
34
- @input="setValueToModelProp(column.prop,$event,null,1)"
35
- />
36
- </span>
37
- <!--后面再优化年份及年份区间控件--->
38
- <year-range-picker
39
- v-else-if="column.componentType === 'yearRange' "
40
- :value="getFormItemValue(column.prop)"
41
- type="yearRange"
42
- @change="setYearRangeValue(column.prop,$event)"
43
- />
44
- <el-g-date-picker
45
- v-else-if="column.componentType==='dateTimePicker'"
46
- :value="getFormItemValue(column.prop)"
47
- :default-time="getDefaultTime(column)"
48
- type="datetimerange"
49
- :range-separator="$t('imatrixUIPublicModel.to')"
50
- unlink-panels
51
- :style="column.searchControlWidth"
52
- :start-placeholder="$t('imatrixUIMessage.startDate')"
53
- :end-placeholder="$t('imatrixUIMessage.endDate')"
54
- value-format="yyyy-MM-dd HH:mm:ss"
55
- @input="setValueToModelProp(column.prop,$event)"
56
- />
57
-
58
- <el-date-picker
59
- v-else-if="column.dataType === 'DATE' || column.componentType==='date' "
60
- :value="getFormItemValue(column.prop)"
61
- type="daterange"
62
- :style="column.searchControlWidth"
63
- :range-separator="$t('imatrixUIPublicModel.to')"
64
- unlink-panels
65
- :start-placeholder="$t('imatrixUIMessage.startDate')"
66
- :end-placeholder="$t('imatrixUIMessage.endDate')"
67
- value-format="yyyy-MM-dd"
68
- @input="setValueToModelProp(column.prop,$event)"
69
- />
70
- <el-date-picker
71
- v-else-if="column.dataType === 'TIME' && column.componentType==='timepicker'"
72
- :value="getFormItemValue(column.prop)"
73
- type="datetimerange"
74
- :range-separator="$t('imatrixUIPublicModel.to')"
75
- unlink-panels
76
- :style="column.searchControlWidth"
77
- :start-placeholder="$t('imatrixUIMessage.startDate')"
78
- :end-placeholder="$t('imatrixUIMessage.endDate')"
79
- value-format="HH:mm:ss"
80
- @input="setValueToModelProp(column.prop,$event)"
81
- />
82
-
83
- <el-time-picker
84
- v-else-if="column.componentType==='timepicker' && column.dataType !== 'TIME' && column.dataType !== 'DATE' "
85
- type="fixed-time"
86
- :placeholder="$t('imatrixUIMessage.selectTime')"
87
- style="width: 100%;"
88
- value-format="HH:mm:ss"
89
- :value="getFormItemValue(column.prop)"
90
- @input="setValueToModelProp(column.prop,$event)"
91
- />
92
-
93
- <organization-input
94
- v-else-if="componentTypeTypeIsTree(column.componentType)"
95
- :value="getFormItemValue(column.prop)"
96
- :fields="getTreeFields(column.orgTreeSet)"
97
- :models="searchForm"
98
- :multiple="getTreeIsMultiTree(column.componentType)"
99
- :tree-type="getTreeType(column.componentType)"
100
- @setValue="organizationInputEvent"
101
- @clear="clearOrganizationInputEvent"
102
- />
103
-
104
- <el-select
105
- v-else-if="((column.componentType && column.componentType==='select') || column.dataType === 'BOOLEAN') && !isDynamicDataSourceSource(column)"
106
- clearable
107
- :style="column.searchControlWidth"
108
- :placeholder="$t('imatrixUIMessage.pleaseSelect')"
109
- :value="getFormItemValue(column.prop)"
110
- @input="setValueToModelProp(column.prop,$event)"
111
- >
112
- <el-option
113
- v-for="item in column.valueSet"
114
- :key="item.value"
115
- :label="item.label"
116
- :value="item.value"
117
- />
118
- </el-select>
119
- <el-select
120
- v-else-if="column.componentType && column.componentType==='multiselect' && !isDynamicDataSourceSource(column)"
121
- clearable
122
- multiple
123
- :style="column.searchControlWidth"
124
- collapse-tags
125
- :placeholder="$t('imatrixUIMessage.pleaseSelect')"
126
- :value="getFormItemValue(column.prop)"
127
- @input="setValueToModelProp(column.prop,$event)"
128
- >
129
- <el-option
130
- v-for="item in column.valueSet"
131
- :key="item.value"
132
- :label="item.label"
133
- :value="item.value"
134
- />
135
- </el-select>
136
- <dynamic-source-select
137
- v-else-if="column.componentType && (column.componentType==='multiselect' || column.componentType==='select') && isDynamicDataSourceSource(column)"
138
- :value="getFormItemValue(column.prop)"
139
- :base-props="{
140
- multiple: column.componentType==='multiselect'?true:false
141
- }"
142
- :entity="searchForm"
143
- :options="getDynamicDataSourceOptions(column)"
144
- :table-name="tableName"
145
- :is-join-table="isJoinTable"
146
- :list-code="code"
147
- @input="setValueToModelProp(column.prop,$event)"
148
- />
149
- <!--
150
- <el-input-number
151
- v-else-if="column.componentType && column.componentType==='inputNumber'"
152
- :value="getFormItemValue(column.prop)"
153
- @input="setValueToModelProp(column.prop,$event)"
154
- /> -->
155
-
156
- <search-form-number
157
- v-else-if="column.componentType && column.componentType==='inputNumber'"
158
- @setValue="setNumberValue"
159
- />
160
-
161
- <el-switch
162
- v-else-if="column.componentType && column.componentType==='switch'"
163
- active-color="#13ce66"
164
- inactive-color="#ff4949"
165
- :style="column.searchControlWidth"
166
- :value="getFormItemValue(column.prop)"
167
- @input="setValueToModelProp(column.prop,$event)"
168
- />
169
- <el-slider
170
- v-else-if="column.componentType && column.componentType==='slider'"
171
- :value="getFormItemValue(column.prop)"
172
- :style="column.searchControlWidth"
173
- @input="setValueToModelProp(column.prop,$event)"
174
- />
175
-
176
- <el-rate
177
- v-else-if="column.componentType && column.componentType==='rate'"
178
- :value="getFormItemValue(column.prop)"
179
- :style="column.searchControlWidth"
180
- @input="setValueToModelProp(column.prop,$event)"
181
- />
182
- <el-input v-else :value="getFormItemValue(column.prop)" :style="column.searchControlWidth" @keyup.enter.native="submitForm('searchForm')" @input="setValueToModelProp(column.prop,$event)" />
183
- </el-form-item>
184
- </template>
185
-
186
- <script>
187
- import searchMethods from './search-methods'
188
- import searchFormNumber from './search-form-number'
189
- import store from './store'
190
- import { getDynamicDataSourceOptions, isDynamicDataSourceSource } from './utils'
191
- import Vue from 'vue'
192
- export default {
193
- name: 'SearchFormItem',
194
- components: {
195
- searchFormNumber
196
- },
197
- props: {
198
- column: {
199
- type: Object,
200
- default: null
201
- },
202
- code: {
203
- type: String,
204
- default: null
205
- },
206
- isSql: {
207
- type: Boolean,
208
- default: false
209
- },
210
- tableName: {
211
- type: String,
212
- default: null
213
- },
214
- isJoinTable: {
215
- type: Boolean,
216
- default: false
217
- },
218
- // 查询表单信息
219
- searchForm: {
220
- type: Object,
221
- default: null
222
- }
223
- },
224
- data() {
225
- const customComponentNames = new Set()
226
- return {
227
- customComponentNames: customComponentNames,
228
- dateOne: null,
229
- dataTwo: null
230
- }
231
- },
232
- methods: {
233
- ...searchMethods,
234
- getDynamicDataSourceOptions(column) {
235
- return getDynamicDataSourceOptions(column, this.isSql)
236
- },
237
- // 值设置是否是动态数据源类型的数据源
238
- isDynamicDataSourceSource(column) {
239
- return isDynamicDataSourceSource(column)
240
- },
241
- setValueToModelProp(prop, value, componentName, index) {
242
- if (prop && prop.indexOf('.') > 0) {
243
- const parentOjbect = this.getParentObject(prop)
244
- // 嵌套属性中的最后一个属性是属于这个中间父对象的,所有要通过中间父对象来赋值
245
- if (index != null && index !== undefined) {
246
- // parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)][index] = value
247
- this.$set(parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)], index, value)
248
- } else {
249
- parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)] = value
250
- }
251
- } else {
252
- if (index != null && index !== undefined) {
253
- this.$set(this.searchForm[prop], index, value)
254
- } else {
255
- this.searchForm[prop] = value
256
- }
257
- }
258
- },
259
- componentTypeTypeIsTree(componentType) {
260
- if (componentType) {
261
- if (componentType.indexOf('DeptManTree') > 0) {
262
- // 说明是部门人员树
263
- return true
264
- }
265
- if (componentType.indexOf('DeptTree') > 0) {
266
- // 说明是部门树
267
- return true
268
- }
269
- if (componentType.indexOf('WgManTree') > 0) {
270
- // 说明是工作组人员树
271
- return true
272
- }
273
- if (componentType.indexOf('WgManTree') > 0) {
274
- // 说明是工作组树
275
- return true
276
- }
277
- }
278
- return false
279
- },
280
- getTreeFields(orgTreeSetJson) {
281
- if (orgTreeSetJson && orgTreeSetJson !== '') {
282
- const orgTreeSet = JSON.parse(orgTreeSetJson)
283
- if (orgTreeSet.length) {
284
- return orgTreeSet
285
- } else {
286
- if (orgTreeSet.orgTreeSetArr) {
287
- return orgTreeSet.orgTreeSetArr
288
- }
289
- }
290
- }
291
- },
292
- getTreeIsMultiTree(componentType) {
293
- if (componentType && componentType.indexOf('single') >= 0 && componentType.indexOf('Tree') > 0) {
294
- return false
295
- } else {
296
- return true
297
- }
298
- },
299
- getTreeType(componentType) {
300
- if (componentType) {
301
- if (componentType.indexOf('DeptManTree') > 0) {
302
- // 说明是部门人员树
303
- return 'DeptUserTree'
304
- }
305
- if (componentType.indexOf('DeptTree') > 0) {
306
- // 说明是部门树
307
- return 'DeptTree'
308
- }
309
- if (componentType.indexOf('WgTree') > 0) {
310
- // 说明是工作组人员树
311
- return 'WgTree'
312
- }
313
- if (componentType.indexOf('WgManTree') > 0) {
314
- // 说明是工作组树
315
- return 'WgUserTree'
316
- }
317
- }
318
- },
319
- // 组织结构树文本框值改变事件
320
- organizationInputEvent(prop, value) {
321
- if (prop) {
322
- // 必须手动调用一下input事件,否则不会更新组件的值
323
- this.$set(this.searchForm, prop, value)
324
- }
325
- },
326
- // 组织结构树文本框值清空事件
327
- clearOrganizationInputEvent(prop) {
328
- if (prop) {
329
- // 必须手动调用一下input事件,否则不会更新组件的值
330
- this.$set(this.searchForm, prop, null)
331
- }
332
- },
333
- customComponent(column) {
334
- const gridParams = store.get(this.code)
335
- if (column.componentName && column.componentName !== '') {
336
- this.customComponentNames.add(column.componentName)
337
- return true
338
- }
339
- if ((!column.componentName || column.componentName === '') &&
340
- gridParams.options &&
341
- gridParams.options.search &&
342
- gridParams.options.search.customSearchElements) {
343
- // 定义了自定义查询组件
344
- const propSearchEle = gridParams.options.search.customSearchElements[column.prop]
345
- // console.log('customComponent-customSearchElements-propSearchEle-', column.prop)
346
- if (propSearchEle) {
347
- column.componentName = 'custom-' + column.prop
348
- const component = propSearchEle.call(this, column)
349
- // console.log('customComponent-customSearchElements-')
350
- if (component) {
351
- this.customComponentNames.add(column.componentName)
352
- Vue.component(column.componentName, component)
353
- return true
354
- }
355
- }
356
- }
357
- return false
358
- },
359
- setNumberValue(value, r, n) {
360
- let itemValue = this.getFormItemValue(this.column.prop)
361
- itemValue = value
362
- this.setValueToModelProp(this.column.prop, itemValue)
363
- },
364
- setYearRangeValue(prop, value) {
365
- this.$set(this.searchForm[prop], 0, value[0])
366
- this.$set(this.searchForm[prop], 1, value[1])
367
- },
368
- getDefaultTime(column) {
369
- if (column['valueSetOptions']) {
370
- const valueSetOptions = JSON.parse(column['valueSetOptions'])
371
- if (valueSetOptions.defaultTime) {
372
- return [valueSetOptions.defaultTime, valueSetOptions.defaultTime]
373
- } else {
374
- return ['00:00:00']
375
- }
376
- } else {
377
- return ['00:00:00']
378
- }
379
- }
380
- }
381
- }
382
- </script>
383
-
384
- <style lang="scss" scoped>
385
-
386
- </style>
@@ -1,38 +0,0 @@
1
- <template>
2
- <div>
3
- <el-input-number
4
- v-model="number1"
5
- @change="setValue()"
6
- />
7
- <span>---</span>
8
- <el-input-number
9
- v-model="number2"
10
- @change="setValue()"
11
- />
12
- </div>
13
- </template>
14
- <script>
15
- export default {
16
- props: {
17
- r: {
18
- type: Number,
19
- default: null
20
- },
21
- n: {
22
- type: Number,
23
- default: null
24
- }
25
- },
26
- data() {
27
- return {
28
- number1: null,
29
- number2: null
30
- }
31
- },
32
- methods: {
33
- setValue() {
34
- this.$emit('setValue', [this.number1, this.number2], this.r, this.n)
35
- }
36
- }
37
- }
38
- </script>
@@ -1,162 +0,0 @@
1
- <template>
2
- <div>
3
- <div class="grid-search-row">
4
- <el-row v-for="r of rowNum" v-show="myOpen || r === 1" :key="r">
5
- <el-col v-for="n of fieldNum" :key="n" :xs="spanNum" :sm="spanNum" :md="spanNum" :lg="spanNum" :xl="spanNum">
6
- <template v-if="fieldNum*(r-1)+(n-1) < searchableColumns.length">
7
- <!--初始进入台账页面时 或 展开时显示按钮--->
8
- <search-form-item
9
- v-show="(!myOpen && r===1 && n < fieldNum) || (myOpen)"
10
- :search-form="searchForm"
11
- :column="searchableColumns[fieldNum*(r-1)+(n-1)]"
12
- :code="code"
13
- :is-sql="isSql"
14
- :table-name="tableName"
15
- :is-join-table="isJoinTable"
16
- />
17
- </template>
18
- <!--初始进入台账页面时 或 展开时显示按钮--->
19
- <search-button
20
- v-if="(!myOpen && r===1 && n === fieldNum) || (myOpen && !isButtonNewRow && r === rowNum && n === fieldNum)"
21
- ref="searchBtnOpen"
22
- :is-open="myOpen"
23
- @submit-form="$emit('submit-form')"
24
- @reset-form="$emit('reset-form')"
25
- @save-condition="$emit('save-condition')"
26
- @open-fold="openFold"
27
- />
28
- </el-col>
29
- </el-row>
30
- </div>
31
- <!--按钮单独一行放置时--->
32
- <el-row v-if="isShowNewBtnRow">
33
- <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
34
- <search-button
35
- ref="searchBtnOpen"
36
- :is-open="myOpen"
37
- @submit-form="$emit('submit-form')"
38
- @reset-form="$emit('reset-form')"
39
- @save-condition="$emit('save-condition')"
40
- @open-fold="openFold"
41
- />
42
- </el-col>
43
- </el-row>
44
- </div>
45
- </template>
46
- <script>
47
- import searchMethods from './search-methods'
48
- import SearchFormItem from './search-form-item.vue'
49
- import SearchButton from './search-button.vue'
50
- export default {
51
- name: 'SearchFormOpen',
52
- components: {
53
- SearchFormItem,
54
- SearchButton
55
- },
56
- props: {
57
- // 第一行的字段集合
58
- searchableColumns: {
59
- type: Array,
60
- default: null
61
- },
62
- // 查询表单信息
63
- searchForm: {
64
- type: Object,
65
- default: null
66
- },
67
- code: {
68
- type: String,
69
- default: null
70
- },
71
- isSql: {
72
- type: Boolean,
73
- default: false
74
- },
75
- tableName: {
76
- type: String,
77
- default: null
78
- },
79
- isJoinTable: {
80
- type: Boolean,
81
- default: false
82
- },
83
- spanNum: {
84
- type: Number,
85
- default: 8
86
- },
87
- // 每行几个字段
88
- fieldNum: {
89
- type: Number,
90
- default: null
91
- },
92
- // 一共多少行
93
- rowNum: {
94
- type: Number,
95
- default: null
96
- },
97
- // 查询条件是否展开
98
- isOpen: {
99
- type: Boolean,
100
- default: false
101
- }
102
- },
103
- data() {
104
- let isButtonNewRow = false
105
- let isShowNewBtnRow = false
106
- if (this.searchableColumns.length % this.fieldNum === 0 || this.rowNum > 6) {
107
- // 表示查询字段正好占满行,或行数大于6时,需要另起一行放查询按钮
108
- isButtonNewRow = true
109
- isShowNewBtnRow = true
110
- }
111
- if (isButtonNewRow && !myOpen) {
112
- // 需要另起一行,但是当前是收起状态,暂不显示最后一行按钮
113
- isShowNewBtnRow = false
114
- }
115
- const myOpen = this.isOpen
116
- return {
117
- isButtonNewRow,
118
- isShowNewBtnRow,
119
- myOpen
120
- }
121
- },
122
- watch: {
123
- myOpen() {
124
- if (this.isButtonNewRow) {
125
- if (!this.myOpen) {
126
- // 需要另起一行,但是当前是收起状态,暂不显示最后一行按钮
127
- this.isShowNewBtnRow = false
128
- } else {
129
- // 需要另起一行,当前是展开状态,显示最后一行按钮
130
- this.isShowNewBtnRow = true
131
- }
132
- }
133
- }
134
- },
135
- methods: {
136
- ...searchMethods,
137
- openFold(isOpen) {
138
- this.myOpen = isOpen
139
- this.$emit('open-fold', isOpen)
140
- },
141
- // 查询完毕
142
- searchComplete() {
143
- if (this.$refs.searchBtnOpen) {
144
- if (Array.isArray(this.$refs.searchBtnOpen)) {
145
- if (this.$refs.searchBtnOpen.length > 0) {
146
- this.$refs.searchBtnOpen[0].searchComplete()
147
- }
148
- } else {
149
- this.$refs.searchBtnOpen.searchComplete()
150
- }
151
- }
152
- }
153
- }
154
- }
155
- </script>
156
-
157
- <style scoped>
158
- .grid-search-row{
159
- overflow: auto;
160
- max-height: 320px;
161
- }
162
- </style>