imatrix-ui 2.9.9-dw → 2.9.11-boe1

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