agilebuilder-ui 1.1.36 → 1.1.37-sit2
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/{401-b8934d65.js → 401-c46a3b20.js} +1 -1
- package/lib/{404-743a4631.js → 404-c35a937a.js} +1 -1
- package/lib/{iframe-page-5e102433.js → iframe-page-10e94ddd.js} +1 -1
- package/lib/{index-a0c08bb5.js → index-f92e8ddb.js} +8140 -8005
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +97 -97
- package/lib/{tab-content-iframe-index-e9b465bf.js → tab-content-iframe-index-8113610a.js} +1 -1
- package/lib/{tab-content-index-313404d0.js → tab-content-index-3b7f4fa8.js} +1 -1
- package/lib/{tache-subprocess-history-7d87cd77.js → tache-subprocess-history-75f40d2a.js} +1 -1
- package/package.json +1 -1
- package/packages/department-tree/src/department-tree.vue +130 -123
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +435 -466
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +335 -342
- package/packages/department-tree-inline/src/department-tree-inline.vue +18 -11
- package/packages/department-tree-inline/src/department-tree-service.js +10 -11
- package/packages/department-tree-mobile/src/department-tree-app.vue +103 -75
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +256 -225
- package/packages/department-tree-mobile/src/department-tree-service.ts +98 -75
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +112 -115
- package/packages/department-user-tree/src/department-user-single-tree.vue +85 -88
- package/packages/department-user-tree/src/department-user-tree.vue +127 -119
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +6 -1
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +5 -0
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +18 -11
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +26 -51
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +25 -45
- package/packages/department-user-tree-inline/src/group-user/group-list.vue +97 -90
- package/packages/department-user-tree-inline/src/group-user/group-user.vue +28 -32
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +103 -75
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +282 -224
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +58 -51
- package/packages/fs-preview/src/fs-preview.vue +20 -2
- package/packages/fs-upload-list/src/fs-upload-list.vue +30 -7
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +1 -1
- package/packages/fs-upload-new/src/fs-preview-new.vue +27 -15
- package/packages/organization-input/src/organization-input.vue +34 -12
- package/packages/super-grid/src/apis.js +25 -4
- package/packages/super-grid/src/components/grid-radio-input.vue +104 -0
- package/packages/super-grid/src/dynamic-input.vue +94 -16
- package/packages/super-grid/src/formValidatorUtil.js +7 -2
- package/packages/super-grid/src/normal-column-content.vue +2 -1
- package/packages/super-grid/src/row-operation.vue +23 -13
- package/packages/super-grid/src/search-form-item.vue +444 -460
- package/packages/super-grid/src/super-grid.vue +73 -45
- package/packages/super-grid/src/utils.js +28 -9
- package/packages/super-icon/src/index.vue +4 -1
- package/packages/utils/value-set.js +25 -33
- package/packages/workgroup-tree/src/workgroup-tree.vue +117 -110
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +6 -1
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +103 -75
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +229 -208
- package/src/api/sso-service.js +6 -5
- package/src/store/modules/table.js +0 -1
- package/src/styles/theme/dark-blue/sidebar.scss +9 -0
- package/src/styles/theme/gray/sidebar.scss +9 -8
- package/src/styles/theme/green/sidebar.scss +10 -0
- package/src/styles/theme/ocean-blue/sidebar.scss +9 -0
- package/src/styles/theme/tiffany-blue-mobile/sidebar.scss +9 -0
- package/src/utils/common-util.js +2 -1
- package/src/utils/insert_css.js +1 -1
- package/src/utils/util.js +19 -0
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -2
- package/src/views/dsc-component/Sidebar/index.vue +36 -18
- package/src/views/layout/components/Menubar/Item.vue +0 -9
- package/src/views/layout/components/Menubar/SidebarItem.vue +2 -2
- package/src/views/layout/components/Sidebar/Item.vue +4 -1
- package/src/views/layout/components/Sidebar/SidebarItem.vue +2 -2
|
@@ -210,7 +210,8 @@ import {
|
|
|
210
210
|
isEditOptionFunction,
|
|
211
211
|
isHasEditOption,
|
|
212
212
|
isHasOptionFunction,
|
|
213
|
-
isObjectValueEqual
|
|
213
|
+
isObjectValueEqual,
|
|
214
|
+
rowBeforeValidate
|
|
214
215
|
} from './utils'
|
|
215
216
|
import Sortable from 'sortablejs'
|
|
216
217
|
import store from './store'
|
|
@@ -581,11 +582,15 @@ export default {
|
|
|
581
582
|
if (gridParams && gridParams.options && gridParams.options.rowKeyProp) {
|
|
582
583
|
return gridParams.options.rowKeyProp
|
|
583
584
|
} else {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
585
|
+
// 使用rowDataGuId作为唯一标识,解决台账显示或不显示id。
|
|
586
|
+
// 大小写、或(子表时id还不存在问题,导致行选择和push新数据后 3行数据,
|
|
587
|
+
// 在第二行插入数据,因为key问题3、4行数据变成一样的)
|
|
588
|
+
return '$rowDataGuId'
|
|
589
|
+
// if (this.dataSourceType === 'oracle') {
|
|
590
|
+
// return 'ID'
|
|
591
|
+
// } else {
|
|
592
|
+
// return 'id'
|
|
593
|
+
// }
|
|
589
594
|
}
|
|
590
595
|
},
|
|
591
596
|
filterGridData() {
|
|
@@ -630,15 +635,12 @@ export default {
|
|
|
630
635
|
tableDatas: {
|
|
631
636
|
deep: true,
|
|
632
637
|
immediate: true,
|
|
633
|
-
handler(a, b) {
|
|
634
|
-
console.log('SGQ --- 表格监听数据修改============================》', a, b)
|
|
635
|
-
}
|
|
638
|
+
handler(a, b) {}
|
|
636
639
|
},
|
|
637
640
|
'options.SuperGrid': {
|
|
638
641
|
deep: true,
|
|
639
642
|
handler: function () {
|
|
640
643
|
this.externalClickFlag = true
|
|
641
|
-
console.log('监听到数据改变')
|
|
642
644
|
this.initSetting()
|
|
643
645
|
this.initialize()
|
|
644
646
|
}
|
|
@@ -714,7 +716,6 @@ export default {
|
|
|
714
716
|
deep: true,
|
|
715
717
|
handler: function () {
|
|
716
718
|
this.externalClickFlag = true
|
|
717
|
-
console.log('监听到数据改变================', this.options.validateRules)
|
|
718
719
|
const gridParams = store.get(this.code)
|
|
719
720
|
if (gridParams && gridParams.options) {
|
|
720
721
|
gridParams.options.validateRules = this.options.validateRules
|
|
@@ -746,7 +747,6 @@ export default {
|
|
|
746
747
|
'options.extraParam.entityMap': {
|
|
747
748
|
deep: true,
|
|
748
749
|
handler(newValue, oldValue) {
|
|
749
|
-
console.log('watch====options.extraParam.entityMap===改变==', newValue)
|
|
750
750
|
this.parentFormData = newValue
|
|
751
751
|
this.$emit('change-form-data', this.parentFormData)
|
|
752
752
|
}
|
|
@@ -937,7 +937,6 @@ export default {
|
|
|
937
937
|
if (that.options.isEnableEnterEvent !== undefined && that.options.isEnableEnterEvent === false) {
|
|
938
938
|
canCall = false
|
|
939
939
|
}
|
|
940
|
-
console.log('super-grid-----isEnableEnterEvent=', that.options.isEnableEnterEvent, 'canCall=', canCall)
|
|
941
940
|
const gridParams = store.get(that.code)
|
|
942
941
|
if (canCall && gridParams.options && gridParams.options.isFormSubTable) {
|
|
943
942
|
canCall = false
|
|
@@ -994,19 +993,19 @@ export default {
|
|
|
994
993
|
tempMaxHeight = tableHeight
|
|
995
994
|
}
|
|
996
995
|
}
|
|
997
|
-
if(tempMaxHeight === null){
|
|
996
|
+
if (tempMaxHeight === null) {
|
|
998
997
|
// 高度是null会导致页面卡死
|
|
999
998
|
tempMaxHeight = undefined
|
|
1000
999
|
}
|
|
1001
|
-
if(tempMaxHeight !== null && tempMaxHeight !== undefined && parseFloat(tempMaxHeight+'') < 100){
|
|
1000
|
+
if (tempMaxHeight !== null && tempMaxHeight !== undefined && parseFloat(tempMaxHeight + '') < 100) {
|
|
1002
1001
|
// 如果小于100时,高度给100
|
|
1003
1002
|
tempMaxHeight = 100
|
|
1004
1003
|
}
|
|
1005
|
-
if(tempMaxHeight !== null && tempMaxHeight !== undefined){
|
|
1004
|
+
if (tempMaxHeight !== null && tempMaxHeight !== undefined) {
|
|
1006
1005
|
// 用parseFloat是因为tempMaxHeight的值有时是数字字符串
|
|
1007
|
-
tempMaxHeight = parseFloat(tempMaxHeight+'')
|
|
1008
|
-
}
|
|
1009
|
-
if(gridParams.options && gridParams.options.isFormSubTable){
|
|
1006
|
+
tempMaxHeight = parseFloat(tempMaxHeight + '')
|
|
1007
|
+
}
|
|
1008
|
+
if (gridParams.options && gridParams.options.isFormSubTable) {
|
|
1010
1009
|
// 表示表单页面子表时,不解析 显示效果了,直接使用高度就行了
|
|
1011
1010
|
if (
|
|
1012
1011
|
!this.basicInfo.displayEffect ||
|
|
@@ -1037,16 +1036,6 @@ export default {
|
|
|
1037
1036
|
this.tableHeight = undefined
|
|
1038
1037
|
}
|
|
1039
1038
|
}
|
|
1040
|
-
console.log(
|
|
1041
|
-
'resizeTableHeight-----tempMaxHeight=',
|
|
1042
|
-
tempMaxHeight,
|
|
1043
|
-
'this.tableHeight=',
|
|
1044
|
-
this.tableHeight,
|
|
1045
|
-
'this.maxHeight=',
|
|
1046
|
-
this.maxHeight,
|
|
1047
|
-
'gridParams.options=',
|
|
1048
|
-
gridParams.options
|
|
1049
|
-
)
|
|
1050
1039
|
})
|
|
1051
1040
|
},
|
|
1052
1041
|
// 回车键
|
|
@@ -1556,7 +1545,6 @@ export default {
|
|
|
1556
1545
|
// 子表无记录时不需要刷新子表记录。表示是新建或修改时子表无记录,且不需要刷新子表。
|
|
1557
1546
|
if (this.isSubTableEmpty(gridParams)) {
|
|
1558
1547
|
// 表示是新建表单时,子表记录集合是空数组
|
|
1559
|
-
console.log('子表无记录----code=', this.code, gridParams)
|
|
1560
1548
|
const subTableData = []
|
|
1561
1549
|
this.packageSubTableData(gridParams, subTableData)
|
|
1562
1550
|
}
|
|
@@ -2180,7 +2168,7 @@ export default {
|
|
|
2180
2168
|
} else {
|
|
2181
2169
|
vm.fetchData(vm.getSearchParam(), isSearch, parentRowIds)
|
|
2182
2170
|
.then((data) => {
|
|
2183
|
-
console.log('打印1====', gridParams)
|
|
2171
|
+
// console.log('打印1====', gridParams)
|
|
2184
2172
|
if (
|
|
2185
2173
|
gridParams !== undefined &&
|
|
2186
2174
|
gridParams.options !== undefined &&
|
|
@@ -2188,18 +2176,18 @@ export default {
|
|
|
2188
2176
|
gridParams.options.isHiddenSearchForm === true
|
|
2189
2177
|
) {
|
|
2190
2178
|
// 查询时,是否隐藏查询区域,默认是不隐藏查询区域
|
|
2191
|
-
console.log('打印2====', vm)
|
|
2179
|
+
// console.log('打印2====', vm)
|
|
2192
2180
|
vm.showSearch = false
|
|
2193
2181
|
$emit(vm, 'cancel-search')
|
|
2194
2182
|
}
|
|
2195
|
-
console.log('打印3====', vm)
|
|
2196
|
-
console.log('打印4====', vm.$refs)
|
|
2183
|
+
// console.log('打印3====', vm)
|
|
2184
|
+
// console.log('打印4====', vm.$refs)
|
|
2197
2185
|
if (vm.$refs && vm.$refs.sf) {
|
|
2198
|
-
console.log('打印5====', vm.$refs.sf)
|
|
2186
|
+
// console.log('打印5====', vm.$refs.sf)
|
|
2199
2187
|
vm.$refs.sf.loading = false
|
|
2200
2188
|
vm.$refs.sf.searchComplete()
|
|
2201
2189
|
}
|
|
2202
|
-
console.log('打印6====', vm)
|
|
2190
|
+
// console.log('打印6====', vm)
|
|
2203
2191
|
// 重新计算列表高度
|
|
2204
2192
|
this.resizeTableHeight()
|
|
2205
2193
|
resolve(data)
|
|
@@ -2344,8 +2332,6 @@ export default {
|
|
|
2344
2332
|
} else if (prop === undefined && column.children && column.children.length > 0) {
|
|
2345
2333
|
type = 'GroupColumn'
|
|
2346
2334
|
}
|
|
2347
|
-
// console.log('%c描述-180428','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',this.myCustomFormatter);
|
|
2348
|
-
// console.log('%c描述-155704','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',type);
|
|
2349
2335
|
return type
|
|
2350
2336
|
},
|
|
2351
2337
|
focusOnFirstEditableInput() {
|
|
@@ -2356,7 +2342,6 @@ export default {
|
|
|
2356
2342
|
},
|
|
2357
2343
|
handleSizeChange(val) {
|
|
2358
2344
|
if (!this.options || !this.options.isPageShow) {
|
|
2359
|
-
// console.log(`每页 ${val} 条`)
|
|
2360
2345
|
this.currentPage = 1
|
|
2361
2346
|
this.pageSize = val
|
|
2362
2347
|
this.pagination.pageSize = val
|
|
@@ -2791,10 +2776,28 @@ export default {
|
|
|
2791
2776
|
gridData = this.subTableData
|
|
2792
2777
|
}
|
|
2793
2778
|
if (gridData && gridData.length > 0) {
|
|
2779
|
+
const gridParams = store.get(this.code)
|
|
2780
|
+
const customRules = gridParams.options.customRules
|
|
2794
2781
|
const pageSize = this.pagination && this.pagination.pageSize
|
|
2795
2782
|
const validateRules = formValidatorService.getValidator(this.code)
|
|
2796
2783
|
for (let i = 0; i < gridData.length; i++) {
|
|
2797
2784
|
const row = gridData[i]
|
|
2785
|
+
let rules = validateRules
|
|
2786
|
+
if (customRules) {
|
|
2787
|
+
const propNames = Object.keys(customRules)
|
|
2788
|
+
if (propNames.length > 0) {
|
|
2789
|
+
// 遍历customRules,判断customRules的规则是否有beforeValidate
|
|
2790
|
+
for (const propName of propNames) {
|
|
2791
|
+
if (customRules[propName].beforeValidate) {
|
|
2792
|
+
const result = rowBeforeValidate(customRules[propName], gridParams, row)
|
|
2793
|
+
if (result === false && rules[propName]) {
|
|
2794
|
+
rules = JSON.parse(JSON.stringify(validateRules))
|
|
2795
|
+
rules[propName] = []
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2798
2801
|
// 取消最后一个编辑行的状态
|
|
2799
2802
|
if (row.$editing !== undefined && row.$editing === true) {
|
|
2800
2803
|
setEntityFieldValue(row, '$editing', false)
|
|
@@ -2804,7 +2807,7 @@ export default {
|
|
|
2804
2807
|
let needValidate = true
|
|
2805
2808
|
if (isHasEditOption('isEnableValidate', this.code)) {
|
|
2806
2809
|
// 表示配置了是否启用必填验证
|
|
2807
|
-
needValidate =
|
|
2810
|
+
needValidate = gridParams.options.lineEditOptions['isEnableValidate']
|
|
2808
2811
|
}
|
|
2809
2812
|
let validateResult = true
|
|
2810
2813
|
if (needValidate === true) {
|
|
@@ -2819,7 +2822,7 @@ export default {
|
|
|
2819
2822
|
row,
|
|
2820
2823
|
this.code,
|
|
2821
2824
|
i,
|
|
2822
|
-
|
|
2825
|
+
rules,
|
|
2823
2826
|
this.isSubTableShowPage,
|
|
2824
2827
|
pageNum,
|
|
2825
2828
|
pageRowIndex
|
|
@@ -2839,7 +2842,6 @@ export default {
|
|
|
2839
2842
|
return this.isSubTableShowPage ? this.subTableData : this.gridData
|
|
2840
2843
|
},
|
|
2841
2844
|
rowDblclickEvent(row, column, event) {
|
|
2842
|
-
debugger
|
|
2843
2845
|
const gridParams = store.get(this.code)
|
|
2844
2846
|
if (gridParams.options && gridParams.options.isFormSubTable && gridParams.options.isPdfEditor) {
|
|
2845
2847
|
// 如果是子表并且是pdf模式
|
|
@@ -2849,7 +2851,6 @@ export default {
|
|
|
2849
2851
|
let canEdit = true
|
|
2850
2852
|
const gridParams = store.get(this.code)
|
|
2851
2853
|
if (isEditOptionFunction('beforeEdit', this.code)) {
|
|
2852
|
-
debugger;
|
|
2853
2854
|
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
2854
2855
|
// 每页显示多少条
|
|
2855
2856
|
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
@@ -2880,7 +2881,6 @@ export default {
|
|
|
2880
2881
|
}
|
|
2881
2882
|
} else {
|
|
2882
2883
|
if (row) {
|
|
2883
|
-
debugger
|
|
2884
2884
|
if (gridParams && gridParams.lineEdit && gridParams.lineEdit.editable && gridParams.canntEdit) {
|
|
2885
2885
|
let index = this.gridData.findIndex(function (item) {
|
|
2886
2886
|
return (item.id && item.id === row.id) || (item.ID && item.ID === row.ID)
|
|
@@ -2895,7 +2895,6 @@ export default {
|
|
|
2895
2895
|
this.rowDblClick(row, column, event)
|
|
2896
2896
|
},
|
|
2897
2897
|
rowDbClickEditRow(gridParams, row) {
|
|
2898
|
-
console.log('rowDbClickEditRow+++++++++++++++++++', gridParams, row)
|
|
2899
2898
|
// 取消上一行的编辑状态
|
|
2900
2899
|
let editRows
|
|
2901
2900
|
if (this.isSubTableShowPage) {
|
|
@@ -3353,6 +3352,35 @@ export default {
|
|
|
3353
3352
|
},
|
|
3354
3353
|
changeOperationAddState(state) {
|
|
3355
3354
|
eventBus.$emit('change-add-state', state)
|
|
3355
|
+
},
|
|
3356
|
+
scrollTo(options, yCoord) {
|
|
3357
|
+
this.$refs.superGrid?.scrollTo(options, yCoord)
|
|
3358
|
+
},
|
|
3359
|
+
setScrollTop(top) {
|
|
3360
|
+
this.$refs.superGrid?.setScrollTop(top)
|
|
3361
|
+
},
|
|
3362
|
+
setScrollLeft(left) {
|
|
3363
|
+
this.$refs.superGrid?.setScrollLeft(left)
|
|
3364
|
+
},
|
|
3365
|
+
setScrollTopByRowIndex(rowIndex) {
|
|
3366
|
+
if (this.$refs.superGrid) {
|
|
3367
|
+
const theTableRows = this.$refs.superGrid.$el.querySelectorAll('.el-table__body tbody .el-table__row')
|
|
3368
|
+
let scrollTop = 0
|
|
3369
|
+
for (let i = 0; i < theTableRows.length; i++) {
|
|
3370
|
+
if (i === rowIndex) {
|
|
3371
|
+
break
|
|
3372
|
+
}
|
|
3373
|
+
scrollTop += theTableRows[i].offsetHeight
|
|
3374
|
+
}
|
|
3375
|
+
this.$refs.superGrid.setScrollTop(scrollTop)
|
|
3376
|
+
}
|
|
3377
|
+
},
|
|
3378
|
+
setCurrentRowIndex(rowIndex) {
|
|
3379
|
+
// 选中行
|
|
3380
|
+
this.$refs.superGrid.setCurrentRow(this.tableDatas[rowIndex])
|
|
3381
|
+
},
|
|
3382
|
+
getSuperGridRef() {
|
|
3383
|
+
return this.$refs.superGrid
|
|
3356
3384
|
}
|
|
3357
3385
|
},
|
|
3358
3386
|
emits: [
|
|
@@ -205,7 +205,7 @@ function getEntityId(row) {
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
// 行编辑时,是否有权限编辑某字段
|
|
208
|
-
export function isDisableEdit(prop, listCode, row) {
|
|
208
|
+
export function isDisableEdit(prop, listCode, row, rowIndex) {
|
|
209
209
|
if (!listCode) {
|
|
210
210
|
listCode = store.get('_list_code')
|
|
211
211
|
}
|
|
@@ -264,9 +264,18 @@ export function isDisableEdit(prop, listCode, row) {
|
|
|
264
264
|
}
|
|
265
265
|
if (isDiabled === false) {
|
|
266
266
|
// 表示不是禁止编辑的,继续校验自定义规则中是否是禁止编辑的
|
|
267
|
-
if
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
if (
|
|
268
|
+
gridParams.options.customRules &&
|
|
269
|
+
(gridParams.options.customRules[prop] || gridParams.options.customRules['_all_fields'])
|
|
270
|
+
) {
|
|
271
|
+
const columnRules = gridParams.options.customRules[prop]
|
|
272
|
+
? gridParams.options.customRules[prop]
|
|
273
|
+
: gridParams.options.customRules['_all_fields']
|
|
274
|
+
let beforeValidateResult = true
|
|
275
|
+
// if (columnRules.beforeValidate) {
|
|
276
|
+
// beforeValidateResult = rowBeforeValidate(columnRules, gridParams, row, rowIndex)
|
|
277
|
+
// }
|
|
278
|
+
if (columnRules && columnRules.disabled && beforeValidateResult !== false) {
|
|
270
279
|
isDiabled = true
|
|
271
280
|
}
|
|
272
281
|
}
|
|
@@ -275,6 +284,16 @@ export function isDisableEdit(prop, listCode, row) {
|
|
|
275
284
|
return isDiabled
|
|
276
285
|
}
|
|
277
286
|
|
|
287
|
+
export function rowBeforeValidate(columnRules, gridParams, row) {
|
|
288
|
+
const params = {
|
|
289
|
+
parent: gridParams.options.extraParam.entityMap,
|
|
290
|
+
row: row,
|
|
291
|
+
pageContext: gridParams.options.pageContext,
|
|
292
|
+
configure: gridParams.options.configureObj
|
|
293
|
+
}
|
|
294
|
+
return columnRules.beforeValidate(params)
|
|
295
|
+
}
|
|
296
|
+
|
|
278
297
|
// 行编辑时,是否必填某字段, 如果是流程表单子表, 需要将列表管理里配置的必填字段去掉,使用流程内的子表编辑权限控制
|
|
279
298
|
export function isRequiredEdit(column, listCode) {
|
|
280
299
|
const prop = column.prop
|
|
@@ -565,7 +584,6 @@ export function getTableHeight(superGrid, listCode, pageHeight) {
|
|
|
565
584
|
rect = superGrid.$el.getBoundingClientRect()
|
|
566
585
|
}
|
|
567
586
|
const totalHeight = window.innerHeight - (rect?.y ?? 0) - 110
|
|
568
|
-
console.log('rect=', rect, 'window.innerHeight=', window.innerHeight, 'totalHeight=', totalHeight)
|
|
569
587
|
return totalHeight
|
|
570
588
|
|
|
571
589
|
// let topDivHeight = 120
|
|
@@ -755,9 +773,12 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap, b
|
|
|
755
773
|
|
|
756
774
|
// 值设置是否是动态数据源类型的数据源
|
|
757
775
|
export function isDynamicDataSourceSource(column) {
|
|
758
|
-
if(column.valueSetOptions) {
|
|
776
|
+
if (column.valueSetOptions) {
|
|
759
777
|
const valueSetOptionsObj = JSON.parse(column.valueSetOptions)
|
|
760
|
-
if(
|
|
778
|
+
if (
|
|
779
|
+
(valueSetOptionsObj.type && valueSetOptionsObj.type === 'dynamicData') ||
|
|
780
|
+
valueSetOptionsObj.dynamicDataSourceCode
|
|
781
|
+
) {
|
|
761
782
|
// 表示是动态数据源
|
|
762
783
|
return true
|
|
763
784
|
}
|
|
@@ -782,10 +803,8 @@ export function getLastPageNum(total, rowsPerPage) {
|
|
|
782
803
|
// 纵向滚动条滚动最底部功能
|
|
783
804
|
export function scrollYToBottom(listCode) {
|
|
784
805
|
const scrollDivElement = document.querySelector('.' + listCode + ' .el-table--scrollable-y .el-table__body-wrapper')
|
|
785
|
-
console.log('scrollDivElement==', scrollDivElement)
|
|
786
806
|
if (scrollDivElement && scrollDivElement !== null) {
|
|
787
807
|
// 表示有滚动条,需要将滚动条滚动最底部
|
|
788
|
-
console.log('scrollDivElement==scrollDivElement.scrollHeight=', scrollDivElement.scrollHeight)
|
|
789
808
|
scrollDivElement.scrollTop = scrollDivElement.scrollHeight
|
|
790
809
|
}
|
|
791
810
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<i v-else-if="iconValue.indexOf('fa-') === 0" :class="'fa ' + iconValue" />
|
|
5
5
|
<img
|
|
6
6
|
v-else-if="iconValue.indexOf('svg-img-') === 0"
|
|
7
|
-
:src="
|
|
7
|
+
:src="defaultShowSvgAction + iconValue"
|
|
8
8
|
style="width: 1em; height: 1em"
|
|
9
9
|
/>
|
|
10
10
|
<SvgIcon v-else-if="iconValue.indexOf('svg-') === 0" :icon-class="iconValue.substring('svg-'.length)" />
|
|
@@ -39,6 +39,9 @@ const props = defineProps({
|
|
|
39
39
|
const defaultShowImageAction = ref(
|
|
40
40
|
window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/show-image?serverPath='
|
|
41
41
|
)
|
|
42
|
+
const defaultShowSvgAction = ref(
|
|
43
|
+
window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/show-svg?svgName='
|
|
44
|
+
)
|
|
42
45
|
</script>
|
|
43
46
|
<style lang="scss" scoped>
|
|
44
47
|
.super-icon {
|
|
@@ -17,7 +17,7 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
17
17
|
return new Promise((resolve, reject) => {
|
|
18
18
|
const valueSetColumnsInfo = {
|
|
19
19
|
listCode: listCode,
|
|
20
|
-
valueSetMetas: []
|
|
20
|
+
valueSetMetas: []
|
|
21
21
|
}
|
|
22
22
|
const valueSetColumnIndexs = []
|
|
23
23
|
for (let i = 0; i < columns.length; i++) {
|
|
@@ -27,13 +27,11 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
27
27
|
let titleValueSet = null
|
|
28
28
|
const titleValueSetJson = column.titleValueSet
|
|
29
29
|
if (titleValueSetJson) {
|
|
30
|
-
titleValueSet = packageEnumAndBeanColumnValueSet(
|
|
31
|
-
JSON.parse(titleValueSetJson)
|
|
32
|
-
)
|
|
30
|
+
titleValueSet = packageEnumAndBeanColumnValueSet(JSON.parse(titleValueSetJson))
|
|
33
31
|
}
|
|
34
32
|
if (columnValueSet || titleValueSet) {
|
|
35
33
|
const valueSetMeta = {
|
|
36
|
-
prop: prop
|
|
34
|
+
prop: prop
|
|
37
35
|
}
|
|
38
36
|
if (columnValueSet) {
|
|
39
37
|
// 字段的值设置
|
|
@@ -48,17 +46,11 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
48
46
|
}
|
|
49
47
|
if (valueSetColumnsInfo.valueSetMetas.length > 0) {
|
|
50
48
|
window.$vueApp.config.globalProperties.$http
|
|
51
|
-
.post(
|
|
52
|
-
window.$vueApp.config.globalProperties.baseURL +
|
|
53
|
-
'/common/super-grids/value-sets',
|
|
54
|
-
valueSetColumnsInfo
|
|
55
|
-
)
|
|
49
|
+
.post(window.$vueApp.config.globalProperties.baseURL + '/common/super-grids/value-sets', valueSetColumnsInfo)
|
|
56
50
|
.then((columnValueSets) => {
|
|
57
51
|
valueSetColumnIndexs.forEach((columnIndex) => {
|
|
58
52
|
let valueSetMap
|
|
59
|
-
const prop = columns[columnIndex].prop
|
|
60
|
-
? columns[columnIndex].prop
|
|
61
|
-
: columns[columnIndex].label
|
|
53
|
+
const prop = columns[columnIndex].prop ? columns[columnIndex].prop : columns[columnIndex].label
|
|
62
54
|
for (const prop1 in columnValueSets) {
|
|
63
55
|
if (prop === prop1) {
|
|
64
56
|
valueSetMap = columnValueSets[prop]
|
|
@@ -70,8 +62,7 @@ function packageEnumAndBeanColumnValueSetsWhenPlate(columns, listCode) {
|
|
|
70
62
|
columns[columnIndex].valueSet = valueSetMap.valueSet
|
|
71
63
|
}
|
|
72
64
|
if (valueSetMap.titleValueSet) {
|
|
73
|
-
columns[columnIndex].titleValueSetValue =
|
|
74
|
-
valueSetMap.titleValueSet
|
|
65
|
+
columns[columnIndex].titleValueSetValue = valueSetMap.titleValueSet
|
|
75
66
|
}
|
|
76
67
|
}
|
|
77
68
|
})
|
|
@@ -111,7 +102,7 @@ function packageEnumAndBeanColumnValueSet(valueSetInfo) {
|
|
|
111
102
|
* 封装值设置为枚举 或 bean方式时的值为'key-value'键值对信息
|
|
112
103
|
*/
|
|
113
104
|
function packageEnumAndBeanColumnValueSetsWhenOtherSys(columns, listCode, additionalParamMap, entity, systemCode) {
|
|
114
|
-
return new Promise((resolve, reject) => {
|
|
105
|
+
return new Promise((resolve, reject) => {
|
|
115
106
|
const dataSourceList = getDataSourceConfigList(columns)
|
|
116
107
|
const valueSetColumnIndexs = dataSourceList.valueSetColumnIndexs
|
|
117
108
|
const param = {
|
|
@@ -129,7 +120,7 @@ function packageEnumAndBeanColumnValueSetsWhenOtherSys(columns, listCode, additi
|
|
|
129
120
|
.then((result) => {
|
|
130
121
|
const columnValueSet = result.columnValueSet
|
|
131
122
|
const columnTitleValueSet = result.columnTitleValueSet
|
|
132
|
-
for(let prop in valueSetColumnIndexs){
|
|
123
|
+
for (let prop in valueSetColumnIndexs) {
|
|
133
124
|
const columnIndex = valueSetColumnIndexs[prop]
|
|
134
125
|
const valueSet = columnValueSet[prop]
|
|
135
126
|
if (valueSet) {
|
|
@@ -175,7 +166,7 @@ function getDataSourceConfigList(columns) {
|
|
|
175
166
|
valueSetColumnIndexs[prop] = i
|
|
176
167
|
}
|
|
177
168
|
}
|
|
178
|
-
return {dataSourceConfigList, dataSourceConfigListTitle, valueSetColumnIndexs}
|
|
169
|
+
return { dataSourceConfigList, dataSourceConfigListTitle, valueSetColumnIndexs }
|
|
179
170
|
}
|
|
180
171
|
|
|
181
172
|
function getConfigWithValueSet(valueSetInfo, prop, column) {
|
|
@@ -203,41 +194,42 @@ function getConfigWithValueSet(valueSetInfo, prop, column) {
|
|
|
203
194
|
}
|
|
204
195
|
}
|
|
205
196
|
} else if (beanName && beanName !== '') {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}else if(column && column.valueSetOptions) {
|
|
212
|
-
//
|
|
197
|
+
infoObj.type = 'beanName'
|
|
198
|
+
infoObj.props = {
|
|
199
|
+
prop: prop,
|
|
200
|
+
valueSet: BEAN_NAME_PREFIX + beanName
|
|
201
|
+
}
|
|
202
|
+
} else if (column && column.valueSetOptions) {
|
|
203
|
+
// 动态数据源(select开启value-label自动转换或者)、数据表/视图、服务
|
|
213
204
|
const valueSetOptionsObj = JSON.parse(column.valueSetOptions)
|
|
214
|
-
if(
|
|
205
|
+
if (
|
|
206
|
+
(valueSetOptionsObj.type || valueSetOptionsObj.dynamicDataSourceCode) &&
|
|
207
|
+
(column.componentType === 'radio' || column.componentType === 'checkbox' || valueSetOptionsObj.valueLabelSwitch)
|
|
208
|
+
) {
|
|
215
209
|
// 表示是动态数据源等值设置信息
|
|
216
210
|
// const isShouldInitSearch = (valueSetOptionsObj.filterType === undefined || valueSetOptionsObj.filterType != 'remote')
|
|
217
|
-
if(!valueSetOptionsObj.type || valueSetOptionsObj.type !== 'optionGroup'){
|
|
211
|
+
if (!valueSetOptionsObj.type || valueSetOptionsObj.type !== 'optionGroup') {
|
|
218
212
|
// 选项组时不需要在此处获得
|
|
219
213
|
Object.assign(infoObj, valueSetOptionsObj)
|
|
220
214
|
// 更新uuid为字段名
|
|
221
215
|
infoObj.uuid = prop
|
|
222
|
-
if(!infoObj.props){
|
|
216
|
+
if (!infoObj.props) {
|
|
223
217
|
infoObj.props = {}
|
|
224
218
|
}
|
|
225
219
|
infoObj.props.prop = prop
|
|
226
220
|
}
|
|
227
|
-
if(valueSetOptionsObj.dynamicDataSourceCode){
|
|
221
|
+
if (valueSetOptionsObj.dynamicDataSourceCode) {
|
|
228
222
|
infoObj.type = 'dynamicData'
|
|
229
|
-
if(!infoObj.props){
|
|
223
|
+
if (!infoObj.props) {
|
|
230
224
|
infoObj.props = {}
|
|
231
225
|
}
|
|
232
226
|
infoObj.props.code = valueSetOptionsObj.dynamicDataSourceCode
|
|
233
227
|
}
|
|
234
228
|
}
|
|
235
229
|
}
|
|
236
|
-
if(infoObj.type){
|
|
230
|
+
if (infoObj.type) {
|
|
237
231
|
// 表示是有效的值设置
|
|
238
232
|
return infoObj
|
|
239
233
|
}
|
|
240
234
|
return null
|
|
241
235
|
}
|
|
242
|
-
|
|
243
|
-
|