imatrix-ui 2.9.13-dw → 2.9.14-boe2

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