imatrix-ui 0.0.15 → 0.1.1-up

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 (171) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/README.md +7 -0
  3. package/components/dynamic-source-select/dynamic-source-select-service.js +106 -0
  4. package/components/dynamic-source-select/dynamic-source-select.vue +673 -0
  5. package/components/dynamic-source-select/events.js +77 -0
  6. package/components/fs-preview/fs-preview.vue +287 -0
  7. package/components/index.js +26 -0
  8. package/components/plugins/export-data-new.js +623 -0
  9. package/components/plugins/export-data.js +431 -0
  10. package/components/plugins/index.js +15 -0
  11. package/components/plugins/public-method.js +47 -0
  12. package/components/rich-editor/index-bak.vue +306 -0
  13. package/components/rich-editor/index.vue +236 -0
  14. package/components/rich-editor/langs/zh-Hans.js +438 -0
  15. package/components/rich-editor/viewer.vue +105 -0
  16. package/components/super-grid/apis.js +1065 -0
  17. package/components/super-grid/columns-config.vue +430 -0
  18. package/components/super-grid/custom-formatter.js +330 -0
  19. package/components/super-grid/dynamic-input.vue +1706 -0
  20. package/components/super-grid/eventBus.js +2 -0
  21. package/components/super-grid/events.js +56 -0
  22. package/components/super-grid/formValidatorUtil.js +300 -0
  23. package/components/super-grid/formatter.js +190 -0
  24. package/components/super-grid/group-column.vue +100 -0
  25. package/components/super-grid/header-context-menu.vue +82 -0
  26. package/components/super-grid/index-column.vue +69 -0
  27. package/components/super-grid/normal-column.vue +1148 -0
  28. package/components/super-grid/public-methods.js +30 -0
  29. package/components/super-grid/row-operation.vue +193 -0
  30. package/components/super-grid/search-button.vue +74 -0
  31. package/components/super-grid/search-condition-input.vue +73 -0
  32. package/components/super-grid/search-condition-list.vue +68 -0
  33. package/components/super-grid/search-form-advancedQuery.vue +820 -0
  34. package/components/super-grid/search-form-dialog.vue +77 -0
  35. package/components/super-grid/search-form-item.vue +470 -0
  36. package/components/super-grid/search-form-number.vue +111 -0
  37. package/components/super-grid/search-form-open.vue +178 -0
  38. package/components/super-grid/search-form-ordinarySearch.vue +218 -0
  39. package/components/super-grid/search-form.vue +756 -0
  40. package/components/super-grid/search-methods.js +484 -0
  41. package/components/super-grid/selection-column.vue +46 -0
  42. package/components/super-grid/store.js +3 -0
  43. package/components/super-grid/super-grid-service.js +682 -0
  44. package/components/super-grid/super-grid.vue +2893 -0
  45. package/components/super-grid/utils.js +851 -0
  46. package/components/super-grid/view-image-dialog.vue +173 -0
  47. package/components/utils/gogocodeTransfer.js +59 -0
  48. package/components/utils/utils.js +180 -0
  49. package/components/utils/value-set.js +98 -0
  50. package/components/z-test-utton/index.vue +82 -0
  51. package/package.json +29 -40
  52. package/public/index.html +13 -0
  53. package/public/vite.svg +1 -0
  54. package/src/api/sso-service.js +172 -19
  55. package/src/api/tab.js +36 -0
  56. package/src/api/user-service.js +11 -11
  57. package/src/assets/401/401.gif +0 -0
  58. package/src/assets/404/404-cloud.png +0 -0
  59. package/src/assets/404/404.png +0 -0
  60. package/src/assets/cloud.png +0 -0
  61. package/src/directives/permission/index.js +13 -13
  62. package/src/directives/permission/permission.js +20 -15
  63. package/src/i18n/i18n.js +16 -0
  64. package/src/i18n/langs/cn.js +254 -0
  65. package/src/i18n/langs/en.js +264 -0
  66. package/src/permission.js +157 -71
  67. package/src/plugins.js +18 -18
  68. package/src/router/index.js +96 -69
  69. package/src/store/getters.js +15 -10
  70. package/src/store/index.js +19 -19
  71. package/src/store/modules/app.js +54 -42
  72. package/src/store/modules/permission.js +137 -73
  73. package/src/store/modules/tab-content.js +36 -0
  74. package/src/store/modules/user.js +293 -80
  75. package/src/styles/display-layout.scss +34 -0
  76. package/src/styles/element-ui.scss +29 -29
  77. package/src/styles/index.scss +157 -78
  78. package/src/styles/mixin.scss +27 -27
  79. package/src/styles/theme/black/font-style.scss +70 -0
  80. package/src/styles/theme/black/index.scss +306 -0
  81. package/src/styles/theme/black/sidebar.scss +189 -0
  82. package/src/styles/theme/blue/font-style.scss +46 -0
  83. package/src/styles/theme/blue/index.scss +172 -0
  84. package/src/styles/{sidebar.scss → theme/blue/sidebar.scss} +171 -141
  85. package/src/styles/theme/blue2/font-style.scss +70 -0
  86. package/src/styles/theme/blue2/index.scss +188 -0
  87. package/src/styles/theme/blue2/sidebar.scss +201 -0
  88. package/src/styles/theme/dark-blue/button.scss +9 -0
  89. package/src/styles/theme/dark-blue/card.scss +62 -0
  90. package/src/styles/theme/dark-blue/checkbox.scss +10 -0
  91. package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
  92. package/src/styles/theme/dark-blue/dialog.scss +21 -0
  93. package/src/styles/theme/dark-blue/element-variables.scss +7 -0
  94. package/src/styles/theme/dark-blue/font.scss +71 -0
  95. package/src/styles/theme/dark-blue/form.scss +51 -0
  96. package/src/styles/theme/dark-blue/index.scss +269 -0
  97. package/src/styles/theme/dark-blue/input.scss +15 -0
  98. package/src/styles/theme/dark-blue/message.scss +8 -0
  99. package/src/styles/theme/dark-blue/pagination.scss +14 -0
  100. package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
  101. package/src/styles/theme/dark-blue/sidebar.scss +266 -0
  102. package/src/styles/theme/dark-blue/tab.scss +83 -0
  103. package/src/styles/theme/dark-blue/table.scss +60 -0
  104. package/src/styles/theme/dark-blue/tree.scss +31 -0
  105. package/src/styles/theme/dark-blue/var.scss +1028 -0
  106. package/src/styles/theme/gray/card-style.scss +54 -0
  107. package/src/styles/theme/gray/font-style.scss +70 -0
  108. package/src/styles/theme/gray/index.scss +172 -0
  109. package/src/styles/theme/gray/input-style.scss +19 -0
  110. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  111. package/src/styles/theme/gray/sidebar.scss +231 -0
  112. package/src/styles/theme/gray/tab-style.scss +81 -0
  113. package/src/styles/transition.scss +47 -46
  114. package/src/utils/auth-api.js +159 -0
  115. package/src/utils/auth.js +61 -15
  116. package/src/utils/calculator/calculator-factory-wf.js +558 -0
  117. package/src/utils/calculator/calculator-factory.js +145 -0
  118. package/src/utils/calculator/calculator-util.js +166 -0
  119. package/src/utils/common-util.js +305 -0
  120. package/src/utils/eventBus.js +2 -0
  121. package/src/utils/iconUtils.js +28 -0
  122. package/src/utils/index.js +102 -86
  123. package/src/utils/jump-page-utils.js +814 -0
  124. package/src/utils/local-storage.js +33 -31
  125. package/src/utils/menu.js +19 -0
  126. package/src/utils/permission.js +31 -26
  127. package/src/utils/permissionAuth.js +90 -0
  128. package/src/utils/range-selector.js +188 -0
  129. package/src/utils/request.js +270 -116
  130. package/src/utils/restful-interface-utils.js +57 -0
  131. package/src/utils/util.js +698 -0
  132. package/src/utils/validate.js +34 -33
  133. package/src/utils/watermark.js +108 -0
  134. package/src/utils/workflow-util.js +93 -0
  135. package/src/views/404.vue +248 -228
  136. package/src/views/dsc-component/Sidebar/Item.vue +84 -0
  137. package/src/views/dsc-component/Sidebar/Link.vue +38 -0
  138. package/src/views/dsc-component/Sidebar/SidebarItem.vue +196 -0
  139. package/src/views/dsc-component/Sidebar/index.vue +220 -0
  140. package/src/views/dsc-component/tabs/tab-content.vue +199 -0
  141. package/src/views/error-page/401.vue +106 -91
  142. package/src/views/error-page/404.vue +248 -228
  143. package/src/views/layout/EmptyLayout.vue +3 -0
  144. package/src/views/layout/Layout.vue +81 -68
  145. package/src/views/layout/NewLayout.vue +18 -0
  146. package/src/views/layout/components/AppMain.vue +39 -29
  147. package/src/views/layout/components/Breadcrumb/index.vue +156 -0
  148. package/src/views/layout/components/Menubar/Item.vue +57 -0
  149. package/src/views/layout/components/Menubar/Link.vue +38 -0
  150. package/src/views/layout/components/Menubar/SidebarItem.vue +164 -0
  151. package/src/views/layout/components/Menubar/index.vue +210 -0
  152. package/src/views/layout/components/Sidebar/Item.vue +53 -29
  153. package/src/views/layout/components/Sidebar/Link.vue +38 -39
  154. package/src/views/layout/components/Sidebar/SidebarItem.vue +135 -100
  155. package/src/views/layout/components/Sidebar/index.vue +141 -48
  156. package/src/views/layout/components/iframe-page.vue +38 -0
  157. package/src/views/layout/components/index.js +4 -3
  158. package/src/views/layout/components/tabs/tab-content.vue +207 -0
  159. package/src/views/layout/mixin/ResizeHandler.js +41 -41
  160. package/src/views/layout/tab-content-iframe-index.vue +38 -0
  161. package/src/views/layout/tab-content-index.vue +93 -0
  162. package/src/views/login/authredirect.vue +10 -10
  163. package/src/views/login/index.vue +296 -203
  164. package/src/views/login/update-password.vue +243 -0
  165. package/src/views/redirect/index.vue +14 -12
  166. package/src/views/wf-history/tache-subprocess-history.vue +45 -0
  167. package/vite.config.js +31 -0
  168. package/lib/super-ui.css +0 -1
  169. package/lib/super-ui.umd.min.js +0 -2
  170. package/src/styles/variables.scss +0 -4
  171. package/src/views/layout/components/Navbar.vue +0 -92
@@ -0,0 +1,77 @@
1
+ <template>
2
+ <el-dialog
3
+ :show-close="true"
4
+ :append-to-body="true"
5
+ title="查询条件"
6
+ model-value
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
+
24
+ <script>
25
+ import { $on, $off, $once, $emit } from '../utils/gogocodeTransfer'
26
+ import SearchForm from './search-form.vue'
27
+ export default {
28
+ name: 'SearchFormDialog',
29
+ components: {
30
+ SearchForm,
31
+ },
32
+ props: {
33
+ columns: {
34
+ type: Array,
35
+ default: null,
36
+ },
37
+ code: {
38
+ type: String,
39
+ default: null,
40
+ },
41
+ url: {
42
+ type: String,
43
+ default: null,
44
+ },
45
+ pagination: {
46
+ type: Object,
47
+ default: null,
48
+ },
49
+ query: {
50
+ type: Object,
51
+ default: null,
52
+ },
53
+ searchParam: {
54
+ type: Object,
55
+ default: null,
56
+ },
57
+ initSearchProps: {
58
+ type: Array,
59
+ default: null,
60
+ },
61
+ },
62
+ data() {
63
+ return {}
64
+ },
65
+ computed: {},
66
+ created() {},
67
+ methods: {
68
+ doSearch(searchForm) {
69
+ $emit(this, 'search', searchForm)
70
+ },
71
+ resetSearch() {
72
+ $emit(this, 'reset')
73
+ },
74
+ },
75
+ emits: ['close', 'search', 'reset'],
76
+ }
77
+ </script>
@@ -0,0 +1,470 @@
1
+ <template>
2
+ <el-form-item
3
+ :prop="column.prop"
4
+ :label-width="
5
+ column.querySetting ? getLabelWidth(column.querySetting) : '110px'
6
+ "
7
+ >
8
+ <template v-slot:label>
9
+ <span
10
+ v-if="column.searchLabel && column.searchLabel !== ''"
11
+ :title="column.searchLabel.replace(/\\n/g, '</br>')"
12
+ v-html="column.searchLabel.replace(/\\n/g, '</br>')"
13
+ />
14
+ <span
15
+ v-else
16
+ :title="column.label.replace(/\\n/g, '</br>')"
17
+ v-html="column.label.replace(/\\n/g, '</br>')"
18
+ />
19
+ </template>
20
+ <span v-if="customComponent(column) === true">
21
+ <component
22
+ :is="column.componentName"
23
+ :ref="column.componentName"
24
+ class="customComponent"
25
+ :select-options="column.valueSet"
26
+ :prop="column.prop"
27
+ :value="getFormItemValue(column.prop)"
28
+ :row="searchForm"
29
+ :entity="searchForm"
30
+ @input="setValueToModelProp(column.prop, $event, column.componentName)"
31
+ />
32
+ </span>
33
+ <!-- 日期区间-两个输入框方式 -->
34
+ <span v-else-if="column.componentType === 'dateSection'">
35
+ <el-date-picker
36
+ :model-value="getFormItemValue(column.prop, 0)"
37
+ :style="column.searchControlWidth"
38
+ type="date"
39
+ :placeholder="$t('imatrixUIMessage.startDate')"
40
+ @input="setValueToModelProp(column.prop, $event, null, 0)"
41
+ />
42
+ <el-date-picker
43
+ :model-value="getFormItemValue(column.prop, 1)"
44
+ :style="column.searchControlWidth"
45
+ type="date"
46
+ :placeholder="$t('imatrixUIMessage.endDate')"
47
+ @input="setValueToModelProp(column.prop, $event, null, 1)"
48
+ />
49
+ </span>
50
+ <!--后面再优化年份及年份区间控件--->
51
+ <year-range-picker
52
+ v-else-if="column.componentType === 'yearRange'"
53
+ :value="getFormItemValue(column.prop)"
54
+ type="yearRange"
55
+ @change="setYearRangeValue(column.prop, $event)"
56
+ />
57
+ <el-date-picker
58
+ v-else-if="column.componentType === 'dateTimePicker'"
59
+ :value="getFormItemValue(column.prop)"
60
+ :default-time="getDefaultTime(column)"
61
+ type="datetimerange"
62
+ :range-separator="$t('imatrixUIPublicModel.to')"
63
+ unlink-panels
64
+ :style="column.searchControlWidth"
65
+ :start-placeholder="$t('imatrixUIMessage.startDate')"
66
+ :end-placeholder="$t('imatrixUIMessage.endDate')"
67
+ value-format="yyyy-MM-dd HH:mm:ss"
68
+ @input="setValueToModelProp(column.prop, $event)"
69
+ />
70
+
71
+ <el-date-picker
72
+ v-else-if="column.dataType === 'DATE' || column.componentType === 'date'"
73
+ :value="getFormItemValue(column.prop)"
74
+ type="daterange"
75
+ :style="column.searchControlWidth"
76
+ :range-separator="$t('imatrixUIPublicModel.to')"
77
+ unlink-panels
78
+ :start-placeholder="$t('imatrixUIMessage.startDate')"
79
+ :end-placeholder="$t('imatrixUIMessage.endDate')"
80
+ value-format="yyyy-MM-dd"
81
+ @input="setValueToModelProp(column.prop, $event)"
82
+ />
83
+ <el-date-picker
84
+ v-else-if="
85
+ column.dataType === 'TIME' && column.componentType === 'timepicker'
86
+ "
87
+ :value="getFormItemValue(column.prop)"
88
+ type="datetimerange"
89
+ :range-separator="$t('imatrixUIPublicModel.to')"
90
+ unlink-panels
91
+ :style="column.searchControlWidth"
92
+ :start-placeholder="$t('imatrixUIMessage.startDate')"
93
+ :end-placeholder="$t('imatrixUIMessage.endDate')"
94
+ value-format="HH:mm:ss"
95
+ @input="setValueToModelProp(column.prop, $event)"
96
+ />
97
+
98
+ <el-time-picker
99
+ v-else-if="
100
+ column.componentType === 'timepicker' &&
101
+ column.dataType !== 'TIME' &&
102
+ column.dataType !== 'DATE'
103
+ "
104
+ type="fixed-time"
105
+ :placeholder="$t('imatrixUIMessage.selectTime')"
106
+ style="width: 100%"
107
+ value-format="HH:mm:ss"
108
+ :value="getFormItemValue(column.prop)"
109
+ @input="setValueToModelProp(column.prop, $event)"
110
+ />
111
+
112
+ <organization-input
113
+ v-else-if="componentTypeTypeIsTree(column.componentType)"
114
+ :value="getFormItemValue(column.prop)"
115
+ :fields="getTreeFields(column.orgTreeSet)"
116
+ :models="searchForm"
117
+ :multiple="getTreeIsMultiTree(column.componentType)"
118
+ :tree-type="getTreeType(column.componentType)"
119
+ @setValue="organizationInputEvent"
120
+ @clear="clearOrganizationInputEvent"
121
+ />
122
+
123
+ <el-select
124
+ v-else-if="
125
+ ((column.componentType && column.componentType === 'select') ||
126
+ column.dataType === 'BOOLEAN') &&
127
+ !isDynamicDataSourceSource(column)
128
+ "
129
+ clearable
130
+ filterable
131
+ :style="column.searchControlWidth"
132
+ :placeholder="$t('imatrixUIMessage.pleaseSelect')"
133
+ :value="getFormItemValue(column.prop)"
134
+ @input="setValueToModelProp(column.prop, $event)"
135
+ >
136
+ <el-option
137
+ v-for="item in column.valueSet"
138
+ :key="item.value"
139
+ :label="item.label"
140
+ :value="item.value"
141
+ />
142
+ </el-select>
143
+ <el-select
144
+ v-else-if="
145
+ column.componentType &&
146
+ column.componentType === 'multiselect' &&
147
+ !isDynamicDataSourceSource(column)
148
+ "
149
+ clearable
150
+ multiple
151
+ filterable
152
+ :style="column.searchControlWidth"
153
+ collapse-tags
154
+ :placeholder="$t('imatrixUIMessage.pleaseSelect')"
155
+ :value="getFormItemValue(column.prop)"
156
+ @input="setValueToModelProp(column.prop, $event)"
157
+ >
158
+ <el-option
159
+ v-for="item in column.valueSet"
160
+ :key="item.value"
161
+ :label="item.label"
162
+ :value="item.value"
163
+ />
164
+ </el-select>
165
+ <dynamic-source-select
166
+ v-else-if="
167
+ column.componentType &&
168
+ (column.componentType === 'multiselect' ||
169
+ column.componentType === 'select') &&
170
+ isDynamicDataSourceSource(column)
171
+ "
172
+ :value="getFormItemValue(column.prop)"
173
+ :base-props="{
174
+ multiple: column.componentType === 'multiselect' ? true : false,
175
+ }"
176
+ :allow-create="true"
177
+ :filterable="true"
178
+ :list-toolbar-form-data="listToolbarFormData"
179
+ :entity="searchForm"
180
+ :options="getDynamicDataSourceOptions(column)"
181
+ :table-name="tableName"
182
+ :is-join-table="isJoinTable"
183
+ :list-code="code"
184
+ @input="setValueToModelProp(column.prop, $event)"
185
+ />
186
+ <!--
187
+ <el-input-number
188
+ v-else-if="column.componentType && column.componentType==='inputNumber'"
189
+ :value="getFormItemValue(column.prop)"
190
+ @input="setValueToModelProp(column.prop,$event)"
191
+ /> -->
192
+
193
+ <!--<search-form-number-->
194
+ <!-- v-else-if="column.componentType && column.componentType === 'inputNumber'"-->
195
+ <!-- :item-value="searchForm[column.prop]"-->
196
+ <!-- :module-config="moduleConfig"-->
197
+ <!-- @setValue="setNumberValue"-->
198
+ <!--/>-->
199
+
200
+ <el-switch
201
+ v-else-if="column.componentType && column.componentType === 'switch'"
202
+ active-color="#13ce66"
203
+ inactive-color="#ff4949"
204
+ :style="column.searchControlWidth"
205
+ :model-value="getFormItemValue(column.prop)"
206
+ @input="setValueToModelProp(column.prop, $event)"
207
+ />
208
+ <el-slider
209
+ v-else-if="column.componentType && column.componentType === 'slider'"
210
+ :model-value="getFormItemValue(column.prop)"
211
+ :style="column.searchControlWidth"
212
+ @input="setValueToModelProp(column.prop, $event)"
213
+ />
214
+
215
+ <el-rate
216
+ v-else-if="column.componentType && column.componentType === 'rate'"
217
+ :model-value="getFormItemValue(column.prop)"
218
+ :style="column.searchControlWidth"
219
+ @input="setValueToModelProp(column.prop, $event)"
220
+ />
221
+ <el-input
222
+ v-else
223
+ :model-value="getFormItemValue(column.prop)"
224
+ :style="column.searchControlWidth"
225
+ @keyup.enter="submitForm('searchForm')"
226
+ @input="setValueToModelProp(column.prop, $event)"
227
+ />
228
+ </el-form-item>
229
+ </template>
230
+
231
+ <script>
232
+ import searchMethods from './search-methods'
233
+ // import searchFormNumber from './search-form-number'
234
+ import store from './store'
235
+ import { getDynamicDataSourceOptions, isDynamicDataSourceSource } from './utils'
236
+ import * as Vue from 'vue'
237
+ export default {
238
+ name: 'SearchFormItem',
239
+ components: {
240
+ // searchFormNumber,
241
+ },
242
+ inject: ['getListToolbarFormData'],
243
+ props: {
244
+ column: {
245
+ type: Object,
246
+ default: null,
247
+ },
248
+ code: {
249
+ type: String,
250
+ default: null,
251
+ },
252
+ isSql: {
253
+ type: Boolean,
254
+ default: false,
255
+ },
256
+ tableName: {
257
+ type: String,
258
+ default: null,
259
+ },
260
+ isJoinTable: {
261
+ type: Boolean,
262
+ default: false,
263
+ },
264
+ // 查询表单信息
265
+ searchForm: {
266
+ type: Object,
267
+ default: null,
268
+ },
269
+ },
270
+ data() {
271
+ const customComponentNames = new Set()
272
+ return {
273
+ customComponentNames: customComponentNames,
274
+ dateOne: null,
275
+ dataTwo: null,
276
+ moduleConfig: {},
277
+ }
278
+ },
279
+ computed: {
280
+ listToolbarFormData() {
281
+ console.log(this.getListToolbarFormData())
282
+ const data = this.getListToolbarFormData()
283
+ if (data && data.listToolbarFormData) {
284
+ return this.getListToolbarFormData().listToolbarFormData
285
+ }
286
+ return null
287
+ },
288
+ },
289
+ created() {
290
+ if (this.column.valueSetOptions) {
291
+ this.moduleConfig = JSON.parse(this.column.valueSetOptions)
292
+ }
293
+ console.log('searchitem页面', this.column)
294
+ },
295
+ methods: {
296
+ ...searchMethods,
297
+ getDynamicDataSourceOptions(column) {
298
+ return getDynamicDataSourceOptions(column, this.isSql)
299
+ },
300
+ // 值设置是否是动态数据源类型的数据源
301
+ isDynamicDataSourceSource(column) {
302
+ return isDynamicDataSourceSource(column)
303
+ },
304
+ setValueToModelProp(prop, value, componentName, index) {
305
+ if (prop && prop.indexOf('.') > 0) {
306
+ const parentOjbect = this.getParentObject(prop)
307
+ // 嵌套属性中的最后一个属性是属于这个中间父对象的,所有要通过中间父对象来赋值
308
+ if (index != null && index !== undefined) {
309
+ // parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)][index] = value
310
+ parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)][index] = value
311
+ } else {
312
+ parentOjbect[prop.substring(prop.lastIndexOf('.') + 1)] = value
313
+ }
314
+ } else {
315
+ if (index != null && index !== undefined) {
316
+ this.searchForm[prop][index] = value
317
+ } else {
318
+ this.searchForm[prop] = value
319
+ }
320
+ }
321
+ },
322
+ getLabelWidth(querySetting) {
323
+ const configData = JSON.parse(querySetting)
324
+ if (
325
+ configData.labelWidth !== '' &&
326
+ configData.labelWidth !== null &&
327
+ configData.labelWidth !== undefined
328
+ ) {
329
+ return configData.labelWidth + 'px'
330
+ } else {
331
+ return '110px'
332
+ }
333
+ },
334
+ componentTypeTypeIsTree(componentType) {
335
+ if (componentType) {
336
+ if (componentType.indexOf('DeptManTree') > 0) {
337
+ // 说明是部门人员树
338
+ return true
339
+ }
340
+ if (componentType.indexOf('DeptTree') > 0) {
341
+ // 说明是部门树
342
+ return true
343
+ }
344
+ if (componentType.indexOf('WgManTree') > 0) {
345
+ // 说明是工作组人员树
346
+ return true
347
+ }
348
+ if (componentType.indexOf('WgManTree') > 0) {
349
+ // 说明是工作组树
350
+ return true
351
+ }
352
+ }
353
+ return false
354
+ },
355
+ getTreeFields(orgTreeSetJson) {
356
+ if (orgTreeSetJson && orgTreeSetJson !== '') {
357
+ const orgTreeSet = JSON.parse(orgTreeSetJson)
358
+ if (orgTreeSet.length) {
359
+ return orgTreeSet
360
+ } else {
361
+ if (orgTreeSet.orgTreeSetArr) {
362
+ return orgTreeSet.orgTreeSetArr
363
+ }
364
+ }
365
+ }
366
+ },
367
+ getTreeIsMultiTree(componentType) {
368
+ if (
369
+ componentType &&
370
+ componentType.indexOf('single') >= 0 &&
371
+ componentType.indexOf('Tree') > 0
372
+ ) {
373
+ return false
374
+ } else {
375
+ return true
376
+ }
377
+ },
378
+ getTreeType(componentType) {
379
+ if (componentType) {
380
+ if (componentType.indexOf('DeptManTree') > 0) {
381
+ // 说明是部门人员树
382
+ return 'DeptUserTree'
383
+ }
384
+ if (componentType.indexOf('DeptTree') > 0) {
385
+ // 说明是部门树
386
+ return 'DeptTree'
387
+ }
388
+ if (componentType.indexOf('WgTree') > 0) {
389
+ // 说明是工作组人员树
390
+ return 'WgTree'
391
+ }
392
+ if (componentType.indexOf('WgManTree') > 0) {
393
+ // 说明是工作组树
394
+ return 'WgUserTree'
395
+ }
396
+ }
397
+ },
398
+ // 组织结构树文本框值改变事件
399
+ organizationInputEvent(prop, value) {
400
+ if (prop) {
401
+ // 必须手动调用一下input事件,否则不会更新组件的值
402
+ this.searchForm[prop] = value
403
+ }
404
+ },
405
+ // 组织结构树文本框值清空事件
406
+ clearOrganizationInputEvent(prop) {
407
+ if (prop) {
408
+ // 必须手动调用一下input事件,否则不会更新组件的值
409
+ this.searchForm[prop] = null
410
+ }
411
+ },
412
+ customComponent(column) {
413
+ const gridParams = store.get(this.code)
414
+ if (column.componentName && column.componentName !== '') {
415
+ this.customComponentNames.add(column.componentName)
416
+ return true
417
+ }
418
+ if (
419
+ (!column.componentName || column.componentName === '') &&
420
+ gridParams.options &&
421
+ gridParams.options.search &&
422
+ gridParams.options.search.customSearchElements
423
+ ) {
424
+ // 定义了自定义查询组件
425
+ const propSearchEle =
426
+ gridParams.options.search.customSearchElements[column.prop]
427
+ // console.log('customComponent-customSearchElements-propSearchEle-', column.prop)
428
+ if (propSearchEle) {
429
+ column.componentName = 'custom-' + column.prop
430
+ const component = propSearchEle.call(this, column)
431
+ // console.log('customComponent-customSearchElements-')
432
+ if (component) {
433
+ this.customComponentNames.add(column.componentName)
434
+ window.$vueApp.component(column.componentName, component)
435
+ return true
436
+ }
437
+ }
438
+ }
439
+ return false
440
+ },
441
+ setNumberValue(value, r, n) {
442
+ let itemValue = this.getFormItemValue(this.column.prop)
443
+ itemValue = value
444
+ this.setValueToModelProp(this.column.prop, itemValue)
445
+ },
446
+ setYearRangeValue(prop, value) {
447
+ this.searchForm[prop][0] = value[0]
448
+ this.searchForm[prop][1] = value[1]
449
+ },
450
+ getDefaultTime(column) {
451
+ if (column['valueSetOptions']) {
452
+ const valueSetOptions = JSON.parse(column['valueSetOptions'])
453
+ if (valueSetOptions.defaultTime) {
454
+ return [valueSetOptions.defaultTime, valueSetOptions.defaultTime]
455
+ } else {
456
+ return ['00:00:00']
457
+ }
458
+ } else {
459
+ return ['00:00:00']
460
+ }
461
+ },
462
+ },
463
+ }
464
+ </script>
465
+
466
+ <style lang="scss" scoped>
467
+ ::v-deep .el-range-separator {
468
+ min-width: 20px;
469
+ }
470
+ </style>
@@ -0,0 +1,111 @@
1
+ <template>
2
+ <div>
3
+ <el-input-number
4
+ v-model="number1"
5
+ :min="
6
+ moduleConfig.min == 0
7
+ ? 0
8
+ : !moduleConfig.min
9
+ ? -Infinity
10
+ : moduleConfig.min
11
+ "
12
+ :max="
13
+ moduleConfig.max == 0
14
+ ? 0
15
+ : !moduleConfig.max
16
+ ? Infinity
17
+ : moduleConfig.max
18
+ "
19
+ :step="moduleConfig.step ? moduleConfig.step : 1"
20
+ :precision="moduleConfig.precision ? moduleConfig.precision : 0"
21
+ :controls-position="moduleConfig.position ? moduleConfig.position : ''"
22
+ @change="setValue()"
23
+ />
24
+ <span>---</span>
25
+ <el-input-number
26
+ v-model="number2"
27
+ :min="
28
+ moduleConfig.min == 0
29
+ ? 0
30
+ : !moduleConfig.min
31
+ ? -Infinity
32
+ : moduleConfig.min
33
+ "
34
+ :max="
35
+ moduleConfig.max == 0
36
+ ? 0
37
+ : !moduleConfig.max
38
+ ? Infinity
39
+ : moduleConfig.max
40
+ "
41
+ :step="moduleConfig.step ? moduleConfig.step : 1"
42
+ :precision="moduleConfig.precision ? moduleConfig.precision : 0"
43
+ :controls-position="moduleConfig.position ? moduleConfig.position : ''"
44
+ @change="setValue()"
45
+ />
46
+ </div>
47
+ </template>
48
+
49
+ <script>
50
+ import { $on, $off, $once, $emit } from '../utils/gogocodeTransfer'
51
+ export default {
52
+ props: {
53
+ r: {
54
+ type: Number,
55
+ default: null,
56
+ },
57
+ n: {
58
+ type: Number,
59
+ default: null,
60
+ },
61
+ itemValue: {
62
+ type: Array,
63
+ default: () => {
64
+ return [0, 0]
65
+ },
66
+ },
67
+ moduleConfig: {
68
+ type: Object,
69
+ },
70
+ },
71
+ data() {
72
+ const number1 =
73
+ this.moduleConfig.min === 0
74
+ ? 0
75
+ : !this.moduleConfig.min
76
+ ? 0
77
+ : this.moduleConfig.min
78
+ const number2 =
79
+ this.moduleConfig.max === 0
80
+ ? 0
81
+ : !this.moduleConfig.max
82
+ ? 100
83
+ : this.moduleConfig.max
84
+
85
+ return {
86
+ number1,
87
+ number2,
88
+ }
89
+ },
90
+ watch: {
91
+ itemValue: {
92
+ deep: true,
93
+ handler(newValue) {
94
+ if (newValue) {
95
+ this.number1 = newValue[0] ? newValue[0] : 0
96
+ this.number2 = newValue[1] ? newValue[1] : 0
97
+ }
98
+ },
99
+ },
100
+ },
101
+ created() {
102
+ $emit(this, 'setValue', [this.number1, this.number2], this.r, this.n)
103
+ },
104
+ methods: {
105
+ setValue() {
106
+ $emit(this, 'setValue', [this.number1, this.number2], this.r, this.n)
107
+ },
108
+ },
109
+ emits: ['setValue'],
110
+ }
111
+ </script>