imatrix-ui 2.8.21-dw → 2.8.21

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 (181) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +4 -2
  4. package/packages/breadcrumb/index.js +6 -0
  5. package/packages/breadcrumb/src/breadcrumb.vue +71 -0
  6. package/packages/department-tree/index.js +6 -0
  7. package/packages/department-tree/src/department-tree.vue +108 -0
  8. package/packages/department-tree-inline/index.js +6 -0
  9. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +402 -0
  10. package/packages/department-tree-inline/src/department-single-tree-inline.vue +284 -0
  11. package/packages/department-tree-inline/src/department-tree-inline.vue +86 -0
  12. package/packages/department-tree-inline/src/department-tree-service.js +245 -0
  13. package/packages/department-tree-inline/src/search-result.vue +176 -0
  14. package/packages/department-user-tree/index.js +6 -0
  15. package/packages/department-user-tree/src/department-user-multiple-tree.vue +116 -0
  16. package/packages/department-user-tree/src/department-user-single-tree.vue +76 -0
  17. package/packages/department-user-tree/src/department-user-tree.vue +101 -0
  18. package/packages/department-user-tree-inline/index.js +6 -0
  19. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +626 -0
  20. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +269 -0
  21. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +79 -0
  22. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +230 -0
  23. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +122 -0
  24. package/packages/department-user-tree-inline/src/search-result.vue +197 -0
  25. package/packages/directives/prevent-reclick.js +19 -0
  26. package/packages/dynamic-source-select/index.js +6 -0
  27. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +70 -0
  28. package/packages/dynamic-source-select/src/dynamic-source-select.vue +440 -0
  29. package/packages/dynamic-source-select/src/events.js +55 -0
  30. package/packages/fs-preview/index.js +6 -0
  31. package/packages/fs-preview/src/fs-preview.vue +226 -0
  32. package/packages/fs-upload/index.js +6 -0
  33. package/packages/fs-upload/src/fs-upload-multi.vue +420 -0
  34. package/packages/fs-upload/src/fs-upload-single.vue +312 -0
  35. package/packages/fs-upload/src/fs-upload.vue +189 -0
  36. package/packages/fs-upload/src/see-big-picture.vue +55 -0
  37. package/packages/fs-upload-list/index.js +6 -0
  38. package/packages/fs-upload-list/src/fs-upload-list.vue +287 -0
  39. package/packages/hamburger/index.js +6 -0
  40. package/packages/hamburger/src/hamburger.vue +38 -0
  41. package/packages/index.js +121 -0
  42. package/packages/multipart-upload/index.js +6 -0
  43. package/packages/multipart-upload/src/index.vue +73 -0
  44. package/packages/multipart-upload/src/multipart-upload-form.vue +297 -0
  45. package/packages/multipart-upload/src/multipart-upload-list.vue +378 -0
  46. package/packages/organization-input/index.js +6 -0
  47. package/packages/organization-input/src/organization-input.vue +542 -0
  48. package/packages/plugins/export-data-new.js +453 -0
  49. package/packages/plugins/export-data.js +361 -0
  50. package/packages/plugins/index.js +15 -0
  51. package/packages/plugins/public-method.js +43 -0
  52. package/packages/remove-department/index.js +6 -0
  53. package/packages/remove-department/src/remove-department.vue +172 -0
  54. package/packages/remove-department/src/remove-dept-service.js +20 -0
  55. package/packages/remove-user/index.js +6 -0
  56. package/packages/remove-user/src/remove-user-service.js +20 -0
  57. package/packages/remove-user/src/remove-user.vue +195 -0
  58. package/packages/remove-workgroup/index.js +6 -0
  59. package/packages/remove-workgroup/src/remove-workgroup-service.js +20 -0
  60. package/packages/remove-workgroup/src/remove-workgroup.vue +159 -0
  61. package/packages/rich-editor/index.js +7 -0
  62. package/packages/rich-editor/index.vue +278 -0
  63. package/packages/rich-editor/langs/zh-Hans.js +1 -0
  64. package/packages/rich-editor/viewer.vue +103 -0
  65. package/packages/scan-code-input/index.js +6 -0
  66. package/packages/scan-code-input/src/events.js +33 -0
  67. package/packages/scan-code-input/src/scan-code-input-colse.vue +131 -0
  68. package/packages/scan-code-input/src/scan-code-input.vue +116 -0
  69. package/packages/secret-info/index.js +7 -0
  70. package/packages/secret-info/index.vue +90 -0
  71. package/packages/super-grid/index.js +7 -0
  72. package/packages/super-grid/src/apis.js +763 -0
  73. package/packages/super-grid/src/columns-config.vue +335 -0
  74. package/packages/super-grid/src/custom-formatter.js +250 -0
  75. package/packages/super-grid/src/dynamic-input.vue +1279 -0
  76. package/packages/super-grid/src/eventBus.js +2 -0
  77. package/packages/super-grid/src/events.js +55 -0
  78. package/packages/super-grid/src/formValidatorUtil.js +226 -0
  79. package/packages/super-grid/src/formatter.js +181 -0
  80. package/packages/super-grid/src/group-column.vue +100 -0
  81. package/packages/super-grid/src/header-context-menu.vue +87 -0
  82. package/packages/super-grid/src/index-column.vue +51 -0
  83. package/packages/super-grid/src/normal-column.vue +769 -0
  84. package/packages/super-grid/src/public-methods.js +31 -0
  85. package/packages/super-grid/src/row-operation.vue +161 -0
  86. package/packages/super-grid/src/search-button.vue +66 -0
  87. package/packages/super-grid/src/search-condition-input.vue +61 -0
  88. package/packages/super-grid/src/search-condition-list.vue +59 -0
  89. package/packages/super-grid/src/search-form-advancedQuery.vue +653 -0
  90. package/packages/super-grid/src/search-form-dialog.vue +79 -0
  91. package/packages/super-grid/src/search-form-item.vue +386 -0
  92. package/packages/super-grid/src/search-form-number.vue +38 -0
  93. package/packages/super-grid/src/search-form-open.vue +162 -0
  94. package/packages/super-grid/src/search-form-ordinarySearch.vue +188 -0
  95. package/packages/super-grid/src/search-form.vue +634 -0
  96. package/packages/super-grid/src/search-methods.js +387 -0
  97. package/packages/super-grid/src/selection-column.vue +43 -0
  98. package/packages/super-grid/src/store.js +3 -0
  99. package/packages/super-grid/src/super-grid-service.js +561 -0
  100. package/packages/super-grid/src/super-grid.vue +2793 -0
  101. package/packages/super-grid/src/utils.js +763 -0
  102. package/packages/super-grid/src/view-image-dialog.vue +130 -0
  103. package/packages/super-nine-grid/index.js +7 -0
  104. package/packages/super-nine-grid/src/apis.js +103 -0
  105. package/packages/super-nine-grid/src/custom-formatter.js +66 -0
  106. package/packages/super-nine-grid/src/formatter.js +132 -0
  107. package/packages/super-nine-grid/src/search-form-number.vue +38 -0
  108. package/packages/super-nine-grid/src/search-form.vue +430 -0
  109. package/packages/super-nine-grid/src/search-methods.js +134 -0
  110. package/packages/super-nine-grid/src/store.js +3 -0
  111. package/packages/super-nine-grid/src/super-grid-service.js +91 -0
  112. package/packages/super-nine-grid/src/super-nine-grid.vue +872 -0
  113. package/packages/super-nine-grid/src/utils.js +261 -0
  114. package/packages/svg-icon/index.js +6 -0
  115. package/packages/svg-icon/src/svg-icon.vue +43 -0
  116. package/packages/utils/utils.js +152 -0
  117. package/packages/utils/value-set.js +86 -0
  118. package/packages/valid-code/index.js +7 -0
  119. package/packages/valid-code/src/valid-code.vue +95 -0
  120. package/packages/workflow-button/index.js +6 -0
  121. package/packages/workflow-button/src/workflow-button.vue +325 -0
  122. package/packages/workflow-history-list/index.js +6 -0
  123. package/packages/workflow-history-list/src/api.js +7 -0
  124. package/packages/workflow-history-list/src/workflow-history-list.vue +185 -0
  125. package/packages/workgroup-tree/index.js +6 -0
  126. package/packages/workgroup-tree/src/workgroup-tree.vue +76 -0
  127. package/packages/workgroup-tree-inline/index.js +6 -0
  128. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +317 -0
  129. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +43 -0
  130. package/packages/workgroup-user-tree/index.js +6 -0
  131. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
  132. package/packages/workgroup-user-tree-inline/index.js +6 -0
  133. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +163 -0
  134. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +436 -0
  135. package/packages/year-range-picker/index.js +6 -0
  136. package/packages/year-range-picker/src/year-range-picker.vue +51 -0
  137. package/src/i18n/i18n.js +1 -1
  138. package/src/i18n/langs/cn.js +4 -2
  139. package/src/i18n/langs/en.js +4 -2
  140. package/src/index.js +93 -0
  141. package/src/permission.js +7 -3
  142. package/src/plugins.js +3 -3
  143. package/src/router/index.js +24 -0
  144. package/src/store/getters.js +2 -1
  145. package/src/store/modules/app.js +10 -1
  146. package/src/styles/display-layout.scss +34 -0
  147. package/src/styles/index.scss +32 -4
  148. package/src/styles/theme/dark-blue/button.scss +9 -0
  149. package/src/styles/theme/dark-blue/card.scss +64 -0
  150. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  151. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  152. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  153. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  154. package/src/styles/theme/dark-blue/font.scss +71 -0
  155. package/src/styles/theme/dark-blue/form.scss +51 -0
  156. package/src/styles/theme/dark-blue/index.scss +247 -0
  157. package/src/styles/theme/dark-blue/input.scss +15 -0
  158. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  159. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  160. package/src/styles/theme/dark-blue/sidebar.scss +296 -0
  161. package/src/styles/theme/dark-blue/tab.scss +83 -0
  162. package/src/styles/theme/dark-blue/table.scss +60 -0
  163. package/src/styles/theme/dark-blue/tree.scss +31 -0
  164. package/src/styles/theme/dark-blue/var.scss +1028 -0
  165. package/src/styles/theme/gray/form-style.scss +2 -2
  166. package/src/styles/theme/gray/input-style.scss +8 -0
  167. package/src/utils/auth-api.js +115 -0
  168. package/src/utils/auth.js +34 -42
  169. package/src/utils/calculator/calculator-factory.js +2 -2
  170. package/src/utils/common-util.js +34 -0
  171. package/src/utils/jump-page-utils.js +29 -5
  172. package/src/utils/menu.js +19 -0
  173. package/src/utils/permission.js +4 -0
  174. package/src/utils/request.js +18 -2
  175. package/src/utils/util.js +7 -3
  176. package/src/views/dsc-component/Sidebar/Item.vue +4 -4
  177. package/src/views/dsc-component/Sidebar/Link.vue +11 -2
  178. package/src/views/dsc-component/Sidebar/SidebarItem.vue +36 -20
  179. package/src/views/dsc-component/Sidebar/index.vue +24 -12
  180. package/src/views/dsc-component/tabs/tab-content.vue +16 -1
  181. package/src/views/login/index.vue +1 -1
@@ -0,0 +1,79 @@
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>
@@ -0,0 +1,386 @@
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-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>
@@ -0,0 +1,38 @@
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>
@@ -0,0 +1,162 @@
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>