imatrix-ui 2.9.54-dw → 2.9.56-dw

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imatrix-ui",
3
- "version": "2.9.54-dw",
3
+ "version": "2.9.56-dw",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
@@ -13,6 +13,7 @@
13
13
  :select-options="options"
14
14
  :grid-data="gridData"
15
15
  :page-grid-data="pageGridData"
16
+ :additional-settings="controlConfig"
16
17
  @input="cellEvent('input',$event)"
17
18
  />
18
19
  </div>
@@ -397,7 +398,7 @@
397
398
  <script>
398
399
  import store from './store'
399
400
  import Vue from 'vue'
400
- import { isDisableEdit, isEditOptionFunction, analysisFileSetObj, otherFilesToStandard, getFileList, isDynamicDataSourceSource, getAdditionalParamMap } from './utils'
401
+ import { isDisableEdit, isEditOptionFunction, analysisFileSetObj, otherFilesToStandard, getFileList, isDynamicDataSourceSource, getAdditionalParamMap, getControlConfig } from './utils'
401
402
  import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select'
402
403
  import { getEntityFieldValue, setEntityFieldValue } from '../../../src/utils/util'
403
404
  import { getToken } from '../../../src/utils/auth'
@@ -524,7 +525,8 @@ export default {
524
525
  fileInfo: { showName: null, serverPath: null },
525
526
  gridData: isSubTableShowPage ? subTableData : gridData,
526
527
  pageGridData: isSubTableShowPage ? gridData : null,
527
- additionalParamMap
528
+ additionalParamMap,
529
+ controlConfig: getControlConfig(this.column)
528
530
 
529
531
  }
530
532
  },
@@ -88,7 +88,7 @@
88
88
  </span>
89
89
  </span>
90
90
  <span v-else-if="customFormatValue(scope.row, column.prop, customFormat, scope.$index)" class="cell--span">
91
- <component :is="column.prop + scope.$index" :row="scope.row" :entity="scope.row" :prop="column.prop" :parent="parentFormData" :row-index="scope.$index" :show-value="$escapeHtml(getLabel(scope.row,scope.$index))" :value="getCellValue(scope.row)" :select-options="column.valueSet" />
91
+ <component :is="column.prop + scope.$index" :row="scope.row" :entity="scope.row" :prop="column.prop" :parent="parentFormData" :row-index="scope.$index" :additional-settings="controlConfig" :show-value="$escapeHtml(getLabel(scope.row,scope.$index))" :value="getCellValue(scope.row)" :select-options="column.valueSet" />
92
92
  </span>
93
93
  <!-- 自定义格式的时候 -->
94
94
  <span v-else-if="columnFormatter !== undefined && columnFormatter.type !== undefined && columnFormatter.type === 'customControl' && columnFormatter.options && columnFormatter.options.format && columnFormatter.options.format !== ''" class="cell--span">
@@ -110,6 +110,7 @@
110
110
  :grid-data="gridData"
111
111
  :page-grid-data="pageGridData"
112
112
  :current-page="currentPage"
113
+ :additional-settings="controlConfig"
113
114
  @prohibitToEdit="prohibitToEdit"
114
115
  /></span>
115
116
  <span v-else-if="columnFormatter !== undefined && columnFormatter.type !== undefined && columnFormatter.type === 'secretInfo'" :id="column.prop+'DomData'+scope.$index" class="cell--span">
@@ -318,7 +319,8 @@ export default {
318
319
  isEditable: this.column.editable,
319
320
  showRichEditorViewer: false,
320
321
  getFormData: gridParams.options.getFormData,
321
- getTableGridData: gridParams.options.getGridData
322
+ getTableGridData: gridParams.options.getGridData,
323
+ controlConfig: this.getColumnCustomControlControlConfig(this.column.formatter)
322
324
 
323
325
  }
324
326
  },
@@ -763,6 +765,12 @@ export default {
763
765
  },
764
766
  closeRichEditorContent() {
765
767
  this.showRichEditorViewer = false
768
+ },
769
+ getColumnCustomControlControlConfig(columnFormatter) {
770
+ if (columnFormatter && columnFormatter.options && columnFormatter.options.controlConfig) {
771
+ const controlConfig = JSON.parse(columnFormatter.options.controlConfig)
772
+ return controlConfig
773
+ }
766
774
  }
767
775
  }
768
776
  }
@@ -218,6 +218,7 @@
218
218
  class="customComponent"
219
219
  :prop="scope.row.prop"
220
220
  :row="scope.row"
221
+ :additional-settings="controlConfig"
221
222
  @input="setValueToModelProp(scope.$index,$event,scope.row.componentName)"
222
223
  @focus="selectRow(scope.row)"
223
224
  />
@@ -278,7 +279,7 @@ import searchFormNumber from './search-form-number'
278
279
  import store from './store'
279
280
  import SearchConditionInput from './search-condition-input'
280
281
  import SearchConditionList from './search-condition-list'
281
- import { getDynamicDataSourceOptions, isDynamicDataSourceSource } from './utils'
282
+ import { getDynamicDataSourceOptions, isDynamicDataSourceSource, getControlConfig } from './utils'
282
283
  import Vue from 'vue'
283
284
  export default {
284
285
  name: 'SearchForm',
@@ -327,7 +328,8 @@ export default {
327
328
  formFlag: true,
328
329
  operationArr: [],
329
330
  tableName,
330
- isJoinTable: isHasJoinTable // 是否是关联表
331
+ isJoinTable: isHasJoinTable, // 是否是关联表
332
+ controlConfig: getControlConfig(this.column)
331
333
  }
332
334
  },
333
335
  computed: {
@@ -14,6 +14,7 @@
14
14
  :value="getFormItemValue(column.prop)"
15
15
  :row="searchForm"
16
16
  :entity="searchForm"
17
+ :additional-settings="controlConfig"
17
18
  @input="setValueToModelProp(column.prop,$event,column.componentName)"
18
19
  />
19
20
  </span>
@@ -187,7 +188,7 @@
187
188
  import searchMethods from './search-methods'
188
189
  import searchFormNumber from './search-form-number'
189
190
  import store from './store'
190
- import { getDynamicDataSourceOptions, isDynamicDataSourceSource } from './utils'
191
+ import { getDynamicDataSourceOptions, isDynamicDataSourceSource, getControlConfig } from './utils'
191
192
  import Vue from 'vue'
192
193
  export default {
193
194
  name: 'SearchFormItem',
@@ -238,7 +239,8 @@ export default {
238
239
  return {
239
240
  customComponentNames: customComponentNames,
240
241
  dateOne: null,
241
- dataTwo: null
242
+ dataTwo: null,
243
+ controlConfig: getControlConfig(this.column)
242
244
  }
243
245
  },
244
246
  mounted() {
@@ -231,7 +231,8 @@ const superGridService = {
231
231
  columns.forEach(column => {
232
232
  if (column.hasOwnProperty('queryType') && column.hasOwnProperty('prop')) {
233
233
  if (column.prop !== '$index' && column.prop !== '$selection') {
234
- if (column.queryType && column.queryType !== 'no') {
234
+ if (column.queryType && column.queryType !== 'no' && column.componentType && (column.componentType === 'date' || column.componentType === 'dateSection' ||
235
+ column.componentType === 'timePicker' || column.componentType === 'dateTimePicker')) {
235
236
  // 配置了默认值
236
237
  if (column.controlConfig) {
237
238
  queryParameterSize++
@@ -780,3 +780,12 @@ export function getAdditionalParamMap(gridParams) {
780
780
  }
781
781
  return additionalParamMap
782
782
  }
783
+
784
+ // 获得控件的配置信息,例如:自定义控件的附加配置等
785
+ export function getControlConfig(column) {
786
+ let controlConfig
787
+ if (column && column.controlConfig) {
788
+ controlConfig = JSON.parse(column.controlConfig)
789
+ }
790
+ return controlConfig
791
+ }