imatrix-ui 2.8.39-dw → 2.8.39-pvtmp

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 (189) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +6 -4
  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 +411 -0
  10. package/packages/department-tree-inline/src/department-single-tree-inline.vue +293 -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 +275 -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 +639 -0
  20. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +274 -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 +248 -0
  23. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +142 -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 +75 -0
  28. package/packages/dynamic-source-select/src/dynamic-source-select.vue +586 -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 +468 -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 +825 -0
  73. package/packages/super-grid/src/columns-config.vue +335 -0
  74. package/packages/super-grid/src/custom-formatter.js +280 -0
  75. package/packages/super-grid/src/dynamic-input.vue +1286 -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 +775 -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 +654 -0
  90. package/packages/super-grid/src/search-form-dialog.vue +79 -0
  91. package/packages/super-grid/src/search-form-item.vue +405 -0
  92. package/packages/super-grid/src/search-form-number.vue +38 -0
  93. package/packages/super-grid/src/search-form-open.vue +170 -0
  94. package/packages/super-grid/src/search-form-ordinarySearch.vue +196 -0
  95. package/packages/super-grid/src/search-form.vue +642 -0
  96. package/packages/super-grid/src/search-methods.js +448 -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 +595 -0
  100. package/packages/super-grid/src/super-grid.vue +2936 -0
  101. package/packages/super-grid/src/utils.js +782 -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 +131 -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 +93 -0
  112. package/packages/super-nine-grid/src/super-nine-grid.vue +883 -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/memory-cache-utils.js +90 -0
  117. package/packages/utils/utils.js +152 -0
  118. package/packages/utils/value-set.js +86 -0
  119. package/packages/valid-code/index.js +7 -0
  120. package/packages/valid-code/src/valid-code.vue +95 -0
  121. package/packages/workflow-button/index.js +6 -0
  122. package/packages/workflow-button/src/workflow-button.vue +325 -0
  123. package/packages/workflow-history-list/index.js +6 -0
  124. package/packages/workflow-history-list/src/api.js +7 -0
  125. package/packages/workflow-history-list/src/workflow-history-list.vue +197 -0
  126. package/packages/workgroup-tree/index.js +6 -0
  127. package/packages/workgroup-tree/src/workgroup-tree.vue +77 -0
  128. package/packages/workgroup-tree-inline/index.js +6 -0
  129. package/packages/workgroup-tree-inline/src/search-result.vue +168 -0
  130. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +458 -0
  131. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +71 -0
  132. package/packages/workgroup-user-tree/index.js +6 -0
  133. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +100 -0
  134. package/packages/workgroup-user-tree-inline/index.js +6 -0
  135. package/packages/workgroup-user-tree-inline/src/search-result.vue +197 -0
  136. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +192 -0
  137. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +584 -0
  138. package/packages/year-range-picker/index.js +6 -0
  139. package/packages/year-range-picker/src/year-range-picker.vue +51 -0
  140. package/src/api/sso-service.js +9 -1
  141. package/src/api/tab.js +3 -3
  142. package/src/i18n/i18n.js +1 -1
  143. package/src/i18n/langs/cn.js +15 -5
  144. package/src/i18n/langs/en.js +15 -5
  145. package/src/index.js +93 -0
  146. package/src/permission.js +51 -17
  147. package/src/plugins.js +3 -3
  148. package/src/store/getters.js +2 -1
  149. package/src/store/modules/app.js +10 -1
  150. package/src/store/modules/user.js +11 -18
  151. package/src/styles/display-layout.scss +34 -0
  152. package/src/styles/index.scss +32 -4
  153. package/src/styles/theme/dark-blue/button.scss +9 -0
  154. package/src/styles/theme/dark-blue/card.scss +64 -0
  155. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  156. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  157. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  158. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  159. package/src/styles/theme/dark-blue/font.scss +71 -0
  160. package/src/styles/theme/dark-blue/form.scss +51 -0
  161. package/src/styles/theme/dark-blue/index.scss +247 -0
  162. package/src/styles/theme/dark-blue/input.scss +15 -0
  163. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  164. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  165. package/src/styles/theme/dark-blue/sidebar.scss +296 -0
  166. package/src/styles/theme/dark-blue/tab.scss +83 -0
  167. package/src/styles/theme/dark-blue/table.scss +60 -0
  168. package/src/styles/theme/dark-blue/tree.scss +31 -0
  169. package/src/styles/theme/dark-blue/var.scss +1028 -0
  170. package/src/styles/theme/gray/input-style.scss +8 -0
  171. package/src/styles/theme/gray/sidebar.scss +14 -2
  172. package/src/utils/auth-api.js +171 -0
  173. package/src/utils/auth.js +75 -41
  174. package/src/utils/calculator/calculator-factory.js +2 -2
  175. package/src/utils/calculator/calculator-util.js +7 -7
  176. package/src/utils/common-util.js +134 -1
  177. package/src/utils/jump-page-utils.js +36 -10
  178. package/src/utils/menu.js +19 -0
  179. package/src/utils/permission.js +4 -0
  180. package/src/utils/permissionAuth.js +46 -25
  181. package/src/utils/request.js +65 -8
  182. package/src/utils/util.js +77 -29
  183. package/src/views/dsc-component/Sidebar/Item.vue +5 -5
  184. package/src/views/dsc-component/Sidebar/Link.vue +11 -2
  185. package/src/views/dsc-component/Sidebar/SidebarItem.vue +37 -21
  186. package/src/views/dsc-component/Sidebar/index.vue +24 -12
  187. package/src/views/dsc-component/tabs/tab-content.vue +18 -2
  188. package/src/views/layout/components/Breadcrumb/index.vue +1 -1
  189. 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,405 @@
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
+ index: {
224
+ type: Number,
225
+ default: 0
226
+ },
227
+ length: {
228
+ type: Number,
229
+ default: 0
230
+ },
231
+ loadCompleteQuery: {
232
+ type: Boolean,
233
+ default: false
234
+ }
235
+ },
236
+ data() {
237
+ const customComponentNames = new Set()
238
+ return {
239
+ customComponentNames: customComponentNames,
240
+ dateOne: null,
241
+ dataTwo: null
242
+ }
243
+ },
244
+ mounted() {
245
+ // 查询页面加载完成
246
+ if ((this.index + 1) === this.length && this.loadCompleteQuery) {
247
+ this.$emit('submit-form')
248
+ }
249
+ },
250
+ methods: {
251
+ ...searchMethods,
252
+ getDynamicDataSourceOptions(column) {
253
+ const gridParams = store.get(this.code)
254
+ return getDynamicDataSourceOptions(column, this.isSql, gridParams.additionalParamMap)
255
+ },
256
+ // 值设置是否是动态数据源类型的数据源
257
+ isDynamicDataSourceSource(column) {
258
+ return isDynamicDataSourceSource(column)
259
+ },
260
+ setValueToModelProp(prop, value, componentName, index) {
261
+ if (prop && prop.indexOf('.') > 0) {
262
+ const parentOjbect = this.getParentObject(prop)
263
+ // 嵌套属性中的最后一个属性是属于这个中间父对象的,所有要通过中间父对象来赋值
264
+ if (index != null && index !== undefined) {
265
+ // parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)][index] = value
266
+ this.$set(parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)], index, value)
267
+ } else {
268
+ parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)] = value
269
+ }
270
+ } else {
271
+ if (index != null && index !== undefined) {
272
+ this.$set(this.searchForm[prop], index, value)
273
+ } else {
274
+ this.searchForm[prop] = value
275
+ }
276
+ }
277
+ },
278
+ componentTypeTypeIsTree(componentType) {
279
+ if (componentType) {
280
+ if (componentType.indexOf('DeptManTree') > 0) {
281
+ // 说明是部门人员树
282
+ return true
283
+ }
284
+ if (componentType.indexOf('DeptTree') > 0) {
285
+ // 说明是部门树
286
+ return true
287
+ }
288
+ if (componentType.indexOf('WgManTree') > 0) {
289
+ // 说明是工作组人员树
290
+ return true
291
+ }
292
+ if (componentType.indexOf('WgManTree') > 0) {
293
+ // 说明是工作组树
294
+ return true
295
+ }
296
+ }
297
+ return false
298
+ },
299
+ getTreeFields(orgTreeSetJson) {
300
+ if (orgTreeSetJson && orgTreeSetJson !== '') {
301
+ const orgTreeSet = JSON.parse(orgTreeSetJson)
302
+ if (orgTreeSet.length) {
303
+ return orgTreeSet
304
+ } else {
305
+ if (orgTreeSet.orgTreeSetArr) {
306
+ return orgTreeSet.orgTreeSetArr
307
+ }
308
+ }
309
+ }
310
+ },
311
+ getTreeIsMultiTree(componentType) {
312
+ if (componentType && componentType.indexOf('single') >= 0 && componentType.indexOf('Tree') > 0) {
313
+ return false
314
+ } else {
315
+ return true
316
+ }
317
+ },
318
+ getTreeType(componentType) {
319
+ if (componentType) {
320
+ if (componentType.indexOf('DeptManTree') > 0) {
321
+ // 说明是部门人员树
322
+ return 'DeptUserTree'
323
+ }
324
+ if (componentType.indexOf('DeptTree') > 0) {
325
+ // 说明是部门树
326
+ return 'DeptTree'
327
+ }
328
+ if (componentType.indexOf('WgTree') > 0) {
329
+ // 说明是工作组人员树
330
+ return 'WgTree'
331
+ }
332
+ if (componentType.indexOf('WgManTree') > 0) {
333
+ // 说明是工作组树
334
+ return 'WgUserTree'
335
+ }
336
+ }
337
+ },
338
+ // 组织结构树文本框值改变事件
339
+ organizationInputEvent(prop, value) {
340
+ if (prop) {
341
+ // 必须手动调用一下input事件,否则不会更新组件的值
342
+ this.$set(this.searchForm, prop, value)
343
+ }
344
+ },
345
+ // 组织结构树文本框值清空事件
346
+ clearOrganizationInputEvent(prop) {
347
+ if (prop) {
348
+ // 必须手动调用一下input事件,否则不会更新组件的值
349
+ this.$set(this.searchForm, prop, null)
350
+ }
351
+ },
352
+ customComponent(column) {
353
+ const gridParams = store.get(this.code)
354
+ if (column.componentName && column.componentName !== '') {
355
+ this.customComponentNames.add(column.componentName)
356
+ return true
357
+ }
358
+ if ((!column.componentName || column.componentName === '') &&
359
+ gridParams.options &&
360
+ gridParams.options.search &&
361
+ gridParams.options.search.customSearchElements) {
362
+ // 定义了自定义查询组件
363
+ const propSearchEle = gridParams.options.search.customSearchElements[column.prop]
364
+ // console.log('customComponent-customSearchElements-propSearchEle-', column.prop)
365
+ if (propSearchEle) {
366
+ column.componentName = 'custom-' + column.prop
367
+ const component = propSearchEle.call(this, column)
368
+ // console.log('customComponent-customSearchElements-')
369
+ if (component) {
370
+ this.customComponentNames.add(column.componentName)
371
+ Vue.component(column.componentName, component)
372
+ return true
373
+ }
374
+ }
375
+ }
376
+ return false
377
+ },
378
+ setNumberValue(value, r, n) {
379
+ let itemValue = this.getFormItemValue(this.column.prop)
380
+ itemValue = value
381
+ this.setValueToModelProp(this.column.prop, itemValue)
382
+ },
383
+ setYearRangeValue(prop, value) {
384
+ this.$set(this.searchForm[prop], 0, value[0])
385
+ this.$set(this.searchForm[prop], 1, value[1])
386
+ },
387
+ getDefaultTime(column) {
388
+ if (column['valueSetOptions']) {
389
+ const valueSetOptions = JSON.parse(column['valueSetOptions'])
390
+ if (valueSetOptions.defaultTime) {
391
+ return [valueSetOptions.defaultTime, valueSetOptions.defaultTime]
392
+ } else {
393
+ return ['00:00:00']
394
+ }
395
+ } else {
396
+ return ['00:00:00']
397
+ }
398
+ }
399
+ }
400
+ }
401
+ </script>
402
+
403
+ <style lang="scss" scoped>
404
+
405
+ </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,170 @@
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
+ :index="fieldNum*(r-1)+(n-1)"
17
+ :length="searchableColumns.length"
18
+ :load-complete-query="loadCompleteQuery"
19
+ @submit-form="$emit('submit-form')"
20
+ />
21
+ </template>
22
+ <!--初始进入台账页面时 或 展开时显示按钮--->
23
+ <search-button
24
+ v-if="(!myOpen && r===1 && n === fieldNum) || (myOpen && !isButtonNewRow && r === rowNum && n === fieldNum)"
25
+ ref="searchBtnOpen"
26
+ :is-open="myOpen"
27
+ @submit-form="$emit('submit-form')"
28
+ @reset-form="$emit('reset-form')"
29
+ @save-condition="$emit('save-condition')"
30
+ @open-fold="openFold"
31
+ />
32
+ </el-col>
33
+ </el-row>
34
+ </div>
35
+ <!--按钮单独一行放置时--->
36
+ <el-row v-if="isShowNewBtnRow">
37
+ <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
38
+ <search-button
39
+ ref="searchBtnOpen"
40
+ :is-open="myOpen"
41
+ @submit-form="$emit('submit-form')"
42
+ @reset-form="$emit('reset-form')"
43
+ @save-condition="$emit('save-condition')"
44
+ @open-fold="openFold"
45
+ />
46
+ </el-col>
47
+ </el-row>
48
+ </div>
49
+ </template>
50
+ <script>
51
+ import searchMethods from './search-methods'
52
+ import SearchFormItem from './search-form-item.vue'
53
+ import SearchButton from './search-button.vue'
54
+ export default {
55
+ name: 'SearchFormOpen',
56
+ components: {
57
+ SearchFormItem,
58
+ SearchButton
59
+ },
60
+ props: {
61
+ // 第一行的字段集合
62
+ searchableColumns: {
63
+ type: Array,
64
+ default: null
65
+ },
66
+ // 查询表单信息
67
+ searchForm: {
68
+ type: Object,
69
+ default: null
70
+ },
71
+ code: {
72
+ type: String,
73
+ default: null
74
+ },
75
+ isSql: {
76
+ type: Boolean,
77
+ default: false
78
+ },
79
+ tableName: {
80
+ type: String,
81
+ default: null
82
+ },
83
+ isJoinTable: {
84
+ type: Boolean,
85
+ default: false
86
+ },
87
+ spanNum: {
88
+ type: Number,
89
+ default: 8
90
+ },
91
+ // 每行几个字段
92
+ fieldNum: {
93
+ type: Number,
94
+ default: null
95
+ },
96
+ // 一共多少行
97
+ rowNum: {
98
+ type: Number,
99
+ default: null
100
+ },
101
+ // 查询条件是否展开
102
+ isOpen: {
103
+ type: Boolean,
104
+ default: false
105
+ },
106
+ loadCompleteQuery: {
107
+ type: Boolean,
108
+ default: false
109
+ }
110
+ },
111
+ data() {
112
+ let isButtonNewRow = false
113
+ let isShowNewBtnRow = false
114
+ if (this.searchableColumns.length % this.fieldNum === 0 || this.rowNum > 6) {
115
+ // 表示查询字段正好占满行,或行数大于6时,需要另起一行放查询按钮
116
+ isButtonNewRow = true
117
+ isShowNewBtnRow = true
118
+ }
119
+ if (isButtonNewRow && !myOpen) {
120
+ // 需要另起一行,但是当前是收起状态,暂不显示最后一行按钮
121
+ isShowNewBtnRow = false
122
+ }
123
+ const myOpen = this.isOpen
124
+ return {
125
+ isButtonNewRow,
126
+ isShowNewBtnRow,
127
+ myOpen
128
+ }
129
+ },
130
+ watch: {
131
+ myOpen() {
132
+ if (this.isButtonNewRow) {
133
+ if (!this.myOpen) {
134
+ // 需要另起一行,但是当前是收起状态,暂不显示最后一行按钮
135
+ this.isShowNewBtnRow = false
136
+ } else {
137
+ // 需要另起一行,当前是展开状态,显示最后一行按钮
138
+ this.isShowNewBtnRow = true
139
+ }
140
+ }
141
+ }
142
+ },
143
+ methods: {
144
+ ...searchMethods,
145
+ openFold(isOpen) {
146
+ this.myOpen = isOpen
147
+ this.$emit('open-fold', isOpen)
148
+ },
149
+ // 查询完毕
150
+ searchComplete() {
151
+ if (this.$refs.searchBtnOpen) {
152
+ if (Array.isArray(this.$refs.searchBtnOpen)) {
153
+ if (this.$refs.searchBtnOpen.length > 0) {
154
+ this.$refs.searchBtnOpen[0].searchComplete()
155
+ }
156
+ } else {
157
+ this.$refs.searchBtnOpen.searchComplete()
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ </script>
164
+
165
+ <style scoped>
166
+ .grid-search-row{
167
+ overflow: auto;
168
+ max-height: 320px;
169
+ }
170
+ </style>