imatrix-ui 2.9.18-dw → 2.9.19-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/lib/super-ui.css +1 -1
- package/lib/super-ui.umd.min.js +4 -4
- package/package.json +1 -1
- package/packages/super-grid/src/apis.js +5 -8
- package/packages/super-grid/src/dynamic-input.vue +6 -3
- package/packages/super-grid/src/search-form-item.vue +2 -2
- package/packages/super-grid/src/super-grid.vue +4 -9
- package/packages/super-grid/src/utils.js +10 -0
package/package.json
CHANGED
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
isEditOptionFunction,
|
|
5
5
|
isLastEditRowSave,
|
|
6
6
|
isHasEditOption,
|
|
7
|
-
scrollYToBottom
|
|
7
|
+
scrollYToBottom,
|
|
8
|
+
getAdditionalParamMap
|
|
8
9
|
} from './utils'
|
|
9
10
|
import formValidatorService from './formValidatorUtil'
|
|
10
11
|
import Vue from 'vue'
|
|
@@ -354,7 +355,8 @@ const apis = {
|
|
|
354
355
|
columns: gridParams.columns,
|
|
355
356
|
isMobile: false,
|
|
356
357
|
pageGridData: isSubTableShowPage ? gridParams.gridData : null,
|
|
357
|
-
pageSize
|
|
358
|
+
pageSize,
|
|
359
|
+
additionalParamMap: getAdditionalParamMap(gridParams)
|
|
358
360
|
})
|
|
359
361
|
}
|
|
360
362
|
if (isPromise(canEdit)) {
|
|
@@ -463,12 +465,7 @@ gridParams.$rowIndex < gridParams.gridData.length) {
|
|
|
463
465
|
if (canSave === undefined || canSave === true) {
|
|
464
466
|
// 触发点击保存时的事件线,在 normal-column 监听处对字段控件是选项组的字段的值进行处理
|
|
465
467
|
eventBus.$emit('un-edit', { row })
|
|
466
|
-
|
|
467
|
-
if (gridParams.additionalParamMap && typeof (gridParams.additionalParamMap) === 'object') {
|
|
468
|
-
additionalParamMap = gridParams.additionalParamMap
|
|
469
|
-
} else if (gridParams.additionalParamMap && gridParams.additionalParamMap !== '') {
|
|
470
|
-
additionalParamMap = JSON.parse(gridParams.additionalParamMap)
|
|
471
|
-
}
|
|
468
|
+
const additionalParamMap = getAdditionalParamMap(gridParams)
|
|
472
469
|
let saveRowRequest
|
|
473
470
|
if (isEditOptionFunction('saveRow', listCode)) {
|
|
474
471
|
// 表示保存方法,用户自己重写了
|
|
@@ -271,7 +271,8 @@
|
|
|
271
271
|
:options="{
|
|
272
272
|
dynamicDataSourceCode:dynamicDataSourceCode,
|
|
273
273
|
valueSetOptions:valueSetOptions,
|
|
274
|
-
isSql:isSql
|
|
274
|
+
isSql:isSql,
|
|
275
|
+
additionalParameter: additionalParamMap?JSON.stringify(additionalParamMap):null
|
|
275
276
|
}"
|
|
276
277
|
:table-name="tableName"
|
|
277
278
|
:list-code="listCode"
|
|
@@ -396,7 +397,7 @@
|
|
|
396
397
|
<script>
|
|
397
398
|
import store from './store'
|
|
398
399
|
import Vue from 'vue'
|
|
399
|
-
import { isDisableEdit, isEditOptionFunction, analysisFileSetObj, otherFilesToStandard, getFileList, isDynamicDataSourceSource } from './utils'
|
|
400
|
+
import { isDisableEdit, isEditOptionFunction, analysisFileSetObj, otherFilesToStandard, getFileList, isDynamicDataSourceSource, getAdditionalParamMap } from './utils'
|
|
400
401
|
import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select'
|
|
401
402
|
import { getEntityFieldValue, setEntityFieldValue } from '../../../src/utils/util'
|
|
402
403
|
import { getToken } from '../../../src/utils/auth'
|
|
@@ -488,6 +489,7 @@ export default {
|
|
|
488
489
|
const gridData = gridParams.gridData
|
|
489
490
|
const subTableData = gridParams.subTableData
|
|
490
491
|
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
492
|
+
const additionalParamMap = getAdditionalParamMap(gridParams)
|
|
491
493
|
return {
|
|
492
494
|
deptManTree: false, // 是否是部门人员树
|
|
493
495
|
isMultiTree: false, // 是否是多选树
|
|
@@ -522,7 +524,8 @@ export default {
|
|
|
522
524
|
inputNumberSet: {},
|
|
523
525
|
fileInfo: { showName: null, serverPath: null },
|
|
524
526
|
gridData: isSubTableShowPage ? subTableData : gridData,
|
|
525
|
-
pageGridData: isSubTableShowPage ? gridData : null
|
|
527
|
+
pageGridData: isSubTableShowPage ? gridData : null,
|
|
528
|
+
additionalParamMap
|
|
526
529
|
|
|
527
530
|
}
|
|
528
531
|
},
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
type="yearRange"
|
|
42
42
|
@change="setYearRangeValue(column.prop,$event)"
|
|
43
43
|
/>
|
|
44
|
-
<el-date-picker
|
|
44
|
+
<el-g-date-picker
|
|
45
45
|
v-else-if="column.componentType==='dateTimePicker'"
|
|
46
46
|
:value="getFormItemValue(column.prop)"
|
|
47
47
|
:default-time="getDefaultTime(column)"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
value-format="yyyy-MM-dd"
|
|
68
68
|
@input="setValueToModelProp(column.prop,$event)"
|
|
69
69
|
/>
|
|
70
|
-
<el-date-picker
|
|
70
|
+
<el-g-date-picker
|
|
71
71
|
v-else-if="column.dataType === 'TIME' && column.componentType==='timepicker'"
|
|
72
72
|
:value="getFormItemValue(column.prop)"
|
|
73
73
|
type="datetimerange"
|
|
@@ -727,15 +727,9 @@ export default {
|
|
|
727
727
|
const that = this
|
|
728
728
|
const isShowUserTreeDialog =
|
|
729
729
|
document.querySelector('.user-tree') !== null
|
|
730
|
-
// 列表页面中是否有弹框,例如:按钮区点击一个按钮dialog弹框时,如果有弹框,则列表的回车事件不生效,否则会导致页面刷新
|
|
731
|
-
let isPageHasDialog = window.sessionStorage.getItem(this.pageCode + '-isShowPageDialog')
|
|
732
|
-
if (isPageHasDialog === undefined) {
|
|
733
|
-
isPageHasDialog = false
|
|
734
|
-
}
|
|
735
|
-
console.log('super-grid-----this.pageCode=', this.pageCode, 'isPageHasDialog=', isPageHasDialog)
|
|
736
730
|
// 当前页面监视键盘输入
|
|
737
731
|
document.querySelector('.' + this.code).onkeydown = function(e) {
|
|
738
|
-
if (!that.isShowPageDialog && !isShowUserTreeDialog
|
|
732
|
+
if (!that.isShowPageDialog && !isShowUserTreeDialog) {
|
|
739
733
|
// 当前列表页面没有弹框或选人弹框,才走键盘监视事件
|
|
740
734
|
// 事件对象兼容
|
|
741
735
|
// eslint-disable-next-line no-caller
|
|
@@ -804,11 +798,12 @@ export default {
|
|
|
804
798
|
// 是否触发回车事件
|
|
805
799
|
isCallEnterEvent(that) {
|
|
806
800
|
let canCall = true
|
|
807
|
-
if (
|
|
801
|
+
if (that.options.isEnableEnterEvent !== undefined && that.options.isEnableEnterEvent === false) {
|
|
808
802
|
canCall = false
|
|
809
803
|
}
|
|
804
|
+
console.log('super-grid-----isEnableEnterEvent=', that.options.isEnableEnterEvent, 'canCall=', canCall)
|
|
810
805
|
const gridParams = store.get(that.code)
|
|
811
|
-
if (gridParams.options && gridParams.options.isFormSubTable) {
|
|
806
|
+
if (canCall && gridParams.options && gridParams.options.isFormSubTable) {
|
|
812
807
|
canCall = false
|
|
813
808
|
}
|
|
814
809
|
return canCall
|
|
@@ -770,3 +770,13 @@ export function scrollYToBottom(listCode) {
|
|
|
770
770
|
scrollDivElement.scrollTop = scrollDivElement.scrollHeight
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
|
+
|
|
774
|
+
export function getAdditionalParamMap(gridParams) {
|
|
775
|
+
let additionalParamMap = null
|
|
776
|
+
if (gridParams.additionalParamMap && typeof (gridParams.additionalParamMap) === 'object') {
|
|
777
|
+
additionalParamMap = gridParams.additionalParamMap
|
|
778
|
+
} else if (gridParams.additionalParamMap && gridParams.additionalParamMap !== '') {
|
|
779
|
+
additionalParamMap = JSON.parse(gridParams.additionalParamMap)
|
|
780
|
+
}
|
|
781
|
+
return additionalParamMap
|
|
782
|
+
}
|