agilebuilder-ui 1.1.41 → 1.1.42-sit1
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-deb6f978.js → 401-5c692db3.js} +1 -1
- package/lib/{404-ca0b33ee.js → 404-bcdb3ce5.js} +1 -1
- package/lib/{iframe-page-eb39ba95.js → iframe-page-c8073fc1.js} +1 -1
- package/lib/{index-a36c91b2.js → index-fa4b5a84.js} +4882 -4825
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +85 -85
- package/lib/{tab-content-iframe-index-094835e7.js → tab-content-iframe-index-2be5c19e.js} +1 -1
- package/lib/{tab-content-index-92b24462.js → tab-content-index-69988e2f.js} +1 -1
- package/lib/{tache-subprocess-history-0d32337a.js → tache-subprocess-history-9889b788.js} +1 -1
- package/package.json +1 -1
- package/packages/fs-preview/src/fs-preview.vue +38 -29
- package/packages/fs-upload-new/src/fs-button-upload.vue +34 -1
- package/packages/fs-upload-new/src/fs-drag-upload.vue +43 -2
- package/packages/fs-upload-new/src/fs-preview-new.vue +6 -4
- package/packages/super-grid/src/custom-formatter.js +16 -10
- package/packages/super-grid/src/dynamic-input.vue +8 -3
- package/packages/super-grid/src/normal-column-content.vue +1 -0
- package/packages/super-grid/src/normal-column.vue +8 -4
- package/packages/super-grid/src/row-operation.vue +13 -9
- package/packages/super-grid/src/search-form-advancedQuery.vue +1 -1
- package/packages/super-grid/src/search-form-item.vue +23 -23
- package/packages/super-grid/src/search-form-open.vue +164 -158
- package/packages/super-grid/src/super-grid-service.js +141 -153
- package/packages/super-grid/src/super-grid.vue +43 -14
- package/packages/super-nine-grid/src/search-form.vue +469 -659
- package/packages/super-nine-grid/src/super-nine-grid.vue +1 -1
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +515 -539
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +24 -44
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +626 -665
- package/src/utils/permission.js +86 -9
|
@@ -3,6 +3,7 @@ import { $emit } from '../../utils/gogocodeTransfer'
|
|
|
3
3
|
import Sortable from 'sortablejs'
|
|
4
4
|
import { packageEnumAndBeanColumnValueSets } from '../../utils/value-set'
|
|
5
5
|
import store from './store'
|
|
6
|
+
import { checkPermission, isFieldHasBranchAuth } from '../../../src/utils/permission'
|
|
6
7
|
import { isHasOptionFunction } from './utils'
|
|
7
8
|
|
|
8
9
|
const superGridService = {
|
|
@@ -25,8 +26,7 @@ const superGridService = {
|
|
|
25
26
|
resolve()
|
|
26
27
|
} else {
|
|
27
28
|
let additionalParams
|
|
28
|
-
const additionalParamMap =
|
|
29
|
-
window.sessionStorage.getItem('additionalParamMap')
|
|
29
|
+
const additionalParamMap = window.sessionStorage.getItem('additionalParamMap')
|
|
30
30
|
if (additionalParamMap) {
|
|
31
31
|
console.log('进入判断', additionalParamMap)
|
|
32
32
|
if (additionalParamMap && typeof additionalParamMap === 'object') {
|
|
@@ -35,20 +35,14 @@ const superGridService = {
|
|
|
35
35
|
additionalParams = additionalParamMap
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
if (
|
|
39
|
-
this.options.additionalParamMap &&
|
|
40
|
-
typeof this.options.additionalParamMap === 'object'
|
|
41
|
-
) {
|
|
38
|
+
if (this.options.additionalParamMap && typeof this.options.additionalParamMap === 'object') {
|
|
42
39
|
const optionParam = JSON.stringify(this.options.additionalParamMap)
|
|
43
40
|
if (additionalParams) {
|
|
44
41
|
Object.assign(additionalParams, optionParam)
|
|
45
42
|
} else {
|
|
46
43
|
additionalParams = optionParam
|
|
47
44
|
}
|
|
48
|
-
} else if (
|
|
49
|
-
this.options.additionalParamMap &&
|
|
50
|
-
this.options.additionalParamMap !== ''
|
|
51
|
-
) {
|
|
45
|
+
} else if (this.options.additionalParamMap && this.options.additionalParamMap !== '') {
|
|
52
46
|
const optionParam = this.options.additionalParamMap
|
|
53
47
|
if (additionalParams) {
|
|
54
48
|
Object.assign(additionalParams, optionParam)
|
|
@@ -67,9 +61,18 @@ const superGridService = {
|
|
|
67
61
|
this.isLoadCompleteQuery(data.columns)
|
|
68
62
|
// 行编辑设置所有字段的默认值null时使用,优化行编辑性能
|
|
69
63
|
let allColumns = []
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
)
|
|
64
|
+
// if (structuredClone) {
|
|
65
|
+
// structuredClone
|
|
66
|
+
// allColumns = structuredClone(data.columns)
|
|
67
|
+
// } else {
|
|
68
|
+
allColumns.concat(JSON.parse(JSON.stringify(data.columns)))
|
|
69
|
+
// }
|
|
70
|
+
if (data.branchFieldsMap && Object.keys(data.branchFieldsMap).length > 0) {
|
|
71
|
+
if (data.branchFieldsMap.allAuthFields && data.branchFieldsMap.allAuthFields.length > 0) {
|
|
72
|
+
gridParams.branchFieldsMap = data.branchFieldsMap
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
data.columns = this.filterHasAuthColumns(data.columns, gridParams, data.basicInfo?.systemCode)
|
|
73
76
|
// 根据this.options.showColumns设置显示的字段
|
|
74
77
|
this.getShowColumns(data)
|
|
75
78
|
// 将列表信息存入store缓存中,用来导出时获取国际化名
|
|
@@ -101,14 +104,14 @@ const superGridService = {
|
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
// 需要多个组件共享的数据放到store中,避免组件定义一堆props来接收这些共享数据
|
|
104
|
-
packageEnumAndBeanColumnValueSets(
|
|
107
|
+
packageEnumAndBeanColumnValueSets(
|
|
108
|
+
data.columns,
|
|
109
|
+
this.code,
|
|
110
|
+
gridParams.additionalParamMap,
|
|
111
|
+
this.parentFormData
|
|
112
|
+
)
|
|
105
113
|
.then(() => {
|
|
106
|
-
return this.getDynamicColumnByBean(
|
|
107
|
-
additionalParams,
|
|
108
|
-
data.dynamicColumnInfo,
|
|
109
|
-
data.columns,
|
|
110
|
-
gridParams
|
|
111
|
-
)
|
|
114
|
+
return this.getDynamicColumnByBean(additionalParams, data.dynamicColumnInfo, data.columns, gridParams)
|
|
112
115
|
})
|
|
113
116
|
.then((dynamicColumns) => {
|
|
114
117
|
const b = new Date().getTime()
|
|
@@ -117,21 +120,13 @@ const superGridService = {
|
|
|
117
120
|
showColumns = this.options.showColumns.split(',')
|
|
118
121
|
}
|
|
119
122
|
let customDynamicColumns = dynamicColumns
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
customDynamicColumns.length === 0
|
|
123
|
-
) {
|
|
124
|
-
if (
|
|
125
|
-
this.options.dynamicColumns &&
|
|
126
|
-
this.options.dynamicColumns.length > 0
|
|
127
|
-
) {
|
|
123
|
+
if (!customDynamicColumns || customDynamicColumns.length === 0) {
|
|
124
|
+
if (this.options.dynamicColumns && this.options.dynamicColumns.length > 0) {
|
|
128
125
|
customDynamicColumns = this.options.dynamicColumns
|
|
129
126
|
}
|
|
130
127
|
}
|
|
131
128
|
if (customDynamicColumns && customDynamicColumns.length > 0) {
|
|
132
|
-
allColumns = allColumns.concat(
|
|
133
|
-
JSON.parse(JSON.stringify(customDynamicColumns))
|
|
134
|
-
)
|
|
129
|
+
allColumns = allColumns.concat(JSON.parse(JSON.stringify(customDynamicColumns)))
|
|
135
130
|
if (showColumns && showColumns.length > 0) {
|
|
136
131
|
for (let i = 0; i < customDynamicColumns.length; i++) {
|
|
137
132
|
const prop = customDynamicColumns[i].prop
|
|
@@ -145,9 +140,7 @@ const superGridService = {
|
|
|
145
140
|
}
|
|
146
141
|
data.columns = data.columns.concat(customDynamicColumns)
|
|
147
142
|
// 按照排序字段的值升序排列字段
|
|
148
|
-
data.columns = data.columns.sort(
|
|
149
|
-
(col1, col2) => col1.displayOrder - col2.displayOrder
|
|
150
|
-
)
|
|
143
|
+
data.columns = data.columns.sort((col1, col2) => col1.displayOrder - col2.displayOrder)
|
|
151
144
|
}
|
|
152
145
|
Object.assign(this, data)
|
|
153
146
|
if (this.options && typeof isSqlSetting === 'undefined') {
|
|
@@ -177,22 +170,21 @@ const superGridService = {
|
|
|
177
170
|
gridParams.pageContext = this.pageContext
|
|
178
171
|
gridParams.configureObj = this.configureObj
|
|
179
172
|
this.tableName = this.basicInfo.tableName
|
|
180
|
-
gridParams.hiddenColumns = this.options.hiddenColumns
|
|
173
|
+
gridParams.hiddenColumns = this.options.hiddenColumns
|
|
174
|
+
? JSON.parse(JSON.stringify(this.options.hiddenColumns))
|
|
175
|
+
: []
|
|
181
176
|
if (this.pagination) {
|
|
182
177
|
// 监控每行显示多少条变量使用
|
|
183
178
|
this.pageSize = this.pagination.pageSize
|
|
184
179
|
}
|
|
185
180
|
gridParams.query = this.query
|
|
186
181
|
gridParams.dynamicColumnInfo = this.dynamicColumnInfo
|
|
187
|
-
gridParams.mainDefaultValueColumns =
|
|
188
|
-
this.mainDefaultValueColumns
|
|
182
|
+
gridParams.mainDefaultValueColumns = this.mainDefaultValueColumns
|
|
189
183
|
gridParams.contextParameter = this.contextParameter
|
|
190
184
|
// 是否显示分页区域
|
|
191
185
|
this.isShowPage = this.isShowPageArea()
|
|
192
186
|
// 子表是否分页
|
|
193
|
-
this.isSubTableShowPage = this.isFormSubTable
|
|
194
|
-
? this.isShowPage
|
|
195
|
-
: false
|
|
187
|
+
this.isSubTableShowPage = this.isFormSubTable ? this.isShowPage : false
|
|
196
188
|
gridParams.isSubTableShowPage = this.isSubTableShowPage
|
|
197
189
|
this.getDetailColumn()
|
|
198
190
|
this.hasLoadedColumns = true
|
|
@@ -213,8 +205,7 @@ const superGridService = {
|
|
|
213
205
|
// 表示是页面展示模式
|
|
214
206
|
} else if (typeof this.options.initSearch === 'undefined') {
|
|
215
207
|
if (
|
|
216
|
-
typeof gridParams.basicInfo.initializationQuery ===
|
|
217
|
-
'undefined' ||
|
|
208
|
+
typeof gridParams.basicInfo.initializationQuery === 'undefined' ||
|
|
218
209
|
gridParams.basicInfo.initializationQuery
|
|
219
210
|
) {
|
|
220
211
|
// console.log('fetchData-----this.loadCompleteQuery=', this.loadCompleteQuery, '1111111')
|
|
@@ -256,35 +247,35 @@ const superGridService = {
|
|
|
256
247
|
if (this.isFormSubTable && this.options.showRowForm) {
|
|
257
248
|
// 显示详情列
|
|
258
249
|
const detailColumn = {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
250
|
+
prop: '$detail',
|
|
251
|
+
orgProp: '$detail',
|
|
252
|
+
label: '详情',
|
|
253
|
+
dataType: 'TEXT',
|
|
254
|
+
width: 80,
|
|
255
|
+
show: true,
|
|
256
|
+
exportable: false,
|
|
257
|
+
sortable: 'false',
|
|
258
|
+
filterable: false,
|
|
259
|
+
fixed: 'left',
|
|
260
|
+
span: false,
|
|
261
|
+
queryType: 'no',
|
|
262
|
+
querySetting: '{}',
|
|
263
|
+
editable: false,
|
|
264
|
+
componentType: 'input',
|
|
265
|
+
titleAlign: 'center',
|
|
266
|
+
contAlign: 'center',
|
|
267
|
+
showType: 'default',
|
|
268
|
+
exportType: 'default',
|
|
269
|
+
displayOrderType: 'default',
|
|
270
|
+
displayOrder: 5,
|
|
271
|
+
widthType: 'default',
|
|
272
|
+
ifMultiData: true,
|
|
273
|
+
dynamic: false,
|
|
274
|
+
total: false,
|
|
275
|
+
custom: true,
|
|
276
|
+
remoteEnum: false,
|
|
277
|
+
fuzzy: true,
|
|
278
|
+
groupHeader: false
|
|
288
279
|
}
|
|
289
280
|
detailColumn.label = this.$t('superGrid.detail')
|
|
290
281
|
this.detailColumn = detailColumn
|
|
@@ -297,10 +288,7 @@ const superGridService = {
|
|
|
297
288
|
if (this.settings) {
|
|
298
289
|
resolve(this.settings)
|
|
299
290
|
} else {
|
|
300
|
-
const url =
|
|
301
|
-
window.$vueApp.config.globalProperties.baseAPI +
|
|
302
|
-
'/component/super-grids/' +
|
|
303
|
-
this.code
|
|
291
|
+
const url = window.$vueApp.config.globalProperties.baseAPI + '/component/super-grids/' + this.code
|
|
304
292
|
const param = {}
|
|
305
293
|
const isSqlSetting = this.options.isSql
|
|
306
294
|
if (this.options && typeof isSqlSetting !== 'undefined') {
|
|
@@ -324,7 +312,8 @@ const superGridService = {
|
|
|
324
312
|
.post(url, param)
|
|
325
313
|
.then((data) => {
|
|
326
314
|
resolve(data)
|
|
327
|
-
})
|
|
315
|
+
})
|
|
316
|
+
.catch((error) => {
|
|
328
317
|
reject(error)
|
|
329
318
|
})
|
|
330
319
|
}
|
|
@@ -334,13 +323,17 @@ const superGridService = {
|
|
|
334
323
|
if (columns !== null) {
|
|
335
324
|
let queryParameterSize = 0
|
|
336
325
|
columns.forEach((column) => {
|
|
337
|
-
if (
|
|
338
|
-
column.hasOwnProperty('queryType') &&
|
|
339
|
-
column.hasOwnProperty('prop')
|
|
340
|
-
) {
|
|
326
|
+
if (column.hasOwnProperty('queryType') && column.hasOwnProperty('prop')) {
|
|
341
327
|
if (column.prop !== '$index' && column.prop !== '$selection') {
|
|
342
|
-
if (
|
|
343
|
-
column.
|
|
328
|
+
if (
|
|
329
|
+
column.queryType &&
|
|
330
|
+
column.queryType !== 'no' &&
|
|
331
|
+
column.componentType &&
|
|
332
|
+
(column.componentType === 'date' ||
|
|
333
|
+
column.componentType === 'dateSection' ||
|
|
334
|
+
column.componentType === 'timePicker' ||
|
|
335
|
+
column.componentType === 'dateTimePicker')
|
|
336
|
+
) {
|
|
344
337
|
// 配置了默认值
|
|
345
338
|
if (column.controlConfig && column.controlConfig.timeDefaultQueryRange) {
|
|
346
339
|
queryParameterSize++
|
|
@@ -372,24 +365,12 @@ const superGridService = {
|
|
|
372
365
|
}
|
|
373
366
|
})
|
|
374
367
|
},
|
|
375
|
-
getDynamicColumnByBean(
|
|
376
|
-
additionalParams,
|
|
377
|
-
dynamicColumnInfos,
|
|
378
|
-
columns,
|
|
379
|
-
gridParams
|
|
380
|
-
) {
|
|
368
|
+
getDynamicColumnByBean(additionalParams, dynamicColumnInfos, columns, gridParams) {
|
|
381
369
|
return new Promise((resolve, reject) => {
|
|
382
|
-
if (
|
|
383
|
-
gridParams.options.extraParam &&
|
|
384
|
-
gridParams.options.extraParam.entityMap
|
|
385
|
-
) {
|
|
370
|
+
if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
|
|
386
371
|
this.parentFormData = gridParams.options.extraParam.entityMap
|
|
387
372
|
}
|
|
388
|
-
if (
|
|
389
|
-
!this.options.isPageInfo &&
|
|
390
|
-
dynamicColumnInfos &&
|
|
391
|
-
dynamicColumnInfos.length > 0
|
|
392
|
-
) {
|
|
373
|
+
if (!this.options.isPageInfo && dynamicColumnInfos && dynamicColumnInfos.length > 0) {
|
|
393
374
|
const totalDynamicColumns = []
|
|
394
375
|
this.getDynamicColumnByBeanWithOneSet(
|
|
395
376
|
additionalParams,
|
|
@@ -422,58 +403,48 @@ const superGridService = {
|
|
|
422
403
|
) {
|
|
423
404
|
return new Promise((resolve, reject) => {
|
|
424
405
|
if (dynamicColumnInfo && dynamicColumnInfo.beanName) {
|
|
425
|
-
const url =
|
|
426
|
-
window.$vueApp.config.globalProperties.baseURL +
|
|
427
|
-
'/common/dynamic-columns'
|
|
406
|
+
const url = window.$vueApp.config.globalProperties.baseURL + '/common/dynamic-columns'
|
|
428
407
|
const param = {
|
|
429
408
|
additionalParams, // 附加参数对象
|
|
430
409
|
listCode: this.code,
|
|
431
410
|
columns,
|
|
432
|
-
beanName: dynamicColumnInfo.beanName
|
|
411
|
+
beanName: dynamicColumnInfo.beanName
|
|
433
412
|
}
|
|
434
413
|
if (this.parentFormData) {
|
|
435
414
|
// 初始化表单时,加载动态列需要
|
|
436
415
|
if (gridParams.dynamicTemp) {
|
|
437
416
|
param.parent = gridParams.dynamicTemp.parent
|
|
438
|
-
param.watchParentAttrValues =
|
|
439
|
-
gridParams.dynamicTemp.watchParentAttrValues
|
|
417
|
+
param.watchParentAttrValues = gridParams.dynamicTemp.watchParentAttrValues
|
|
440
418
|
} else {
|
|
441
419
|
param.parent = this.parentFormData
|
|
442
420
|
}
|
|
443
421
|
// 监听主表字段的值
|
|
444
422
|
if (dynamicColumnInfo.watchParentAttr) {
|
|
445
|
-
const watchParentAttrs =
|
|
446
|
-
dynamicColumnInfo.watchParentAttr.split(',')
|
|
423
|
+
const watchParentAttrs = dynamicColumnInfo.watchParentAttr.split(',')
|
|
447
424
|
watchParentAttrs.forEach((watchParentAttr) => {
|
|
448
425
|
if (watchParentAttr) {
|
|
449
426
|
// 存储属性对应的值
|
|
450
427
|
if (!param.watchParentAttrValues) {
|
|
451
428
|
param.watchParentAttrValues = {}
|
|
452
429
|
}
|
|
453
|
-
param.watchParentAttrValues[watchParentAttr] =
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
430
|
+
param.watchParentAttrValues[watchParentAttr] = this.parentFormData[watchParentAttr]
|
|
431
|
+
const unWatch = this.$watch('parentFormData.' + watchParentAttr, function (newValue, oldValue) {
|
|
432
|
+
// 重新加载表格及表格数据
|
|
433
|
+
if (!gridParams.dynamicTemp) {
|
|
434
|
+
gridParams.dynamicTemp = {}
|
|
435
|
+
}
|
|
436
|
+
gridParams.dynamicTemp.parent = this.parentFormData
|
|
437
|
+
if (!gridParams.dynamicTemp.watchParentAttrValues) {
|
|
438
|
+
gridParams.dynamicTemp.watchParentAttrValues = {}
|
|
439
|
+
}
|
|
440
|
+
gridParams.dynamicTemp.watchParentAttrValues[watchParentAttr] = newValue
|
|
441
|
+
if (this.$refs && this.$refs.superGrid) {
|
|
442
|
+
// 手动注销watch,否则会调用多次watch
|
|
443
|
+
unWatch()
|
|
458
444
|
// 重新加载表格及表格数据
|
|
459
|
-
|
|
460
|
-
gridParams.dynamicTemp = {}
|
|
461
|
-
}
|
|
462
|
-
gridParams.dynamicTemp.parent = this.parentFormData
|
|
463
|
-
if (!gridParams.dynamicTemp.watchParentAttrValues) {
|
|
464
|
-
gridParams.dynamicTemp.watchParentAttrValues = {}
|
|
465
|
-
}
|
|
466
|
-
gridParams.dynamicTemp.watchParentAttrValues[
|
|
467
|
-
watchParentAttr
|
|
468
|
-
] = newValue
|
|
469
|
-
if (this.$refs && this.$refs.superGrid) {
|
|
470
|
-
// 手动注销watch,否则会调用多次watch
|
|
471
|
-
unWatch()
|
|
472
|
-
// 重新加载表格及表格数据
|
|
473
|
-
$emit(this, 'reload-grid')
|
|
474
|
-
}
|
|
445
|
+
$emit(this, 'reload-grid')
|
|
475
446
|
}
|
|
476
|
-
)
|
|
447
|
+
})
|
|
477
448
|
}
|
|
478
449
|
})
|
|
479
450
|
}
|
|
@@ -530,10 +501,7 @@ const superGridService = {
|
|
|
530
501
|
// return listColumn.listColumnFixed === 'left' || listColumn.listColumnFixed === 'right'
|
|
531
502
|
// })
|
|
532
503
|
for (var r = 0; r < vm.columns.length; r++) {
|
|
533
|
-
if (
|
|
534
|
-
vm.columns[r].fixed === 'left' ||
|
|
535
|
-
vm.columns[r].fixed === 'right'
|
|
536
|
-
) {
|
|
504
|
+
if (vm.columns[r].fixed === 'left' || vm.columns[r].fixed === 'right') {
|
|
537
505
|
frozenArr.push(r)
|
|
538
506
|
}
|
|
539
507
|
}
|
|
@@ -579,12 +547,7 @@ const superGridService = {
|
|
|
579
547
|
}
|
|
580
548
|
}
|
|
581
549
|
}
|
|
582
|
-
vm.indexAfterTheChangeUpdateDisplayOrder(
|
|
583
|
-
vm.columns,
|
|
584
|
-
oldIndex,
|
|
585
|
-
newIndex,
|
|
586
|
-
'displayOrder'
|
|
587
|
-
)
|
|
550
|
+
vm.indexAfterTheChangeUpdateDisplayOrder(vm.columns, oldIndex, newIndex, 'displayOrder')
|
|
588
551
|
let splitArr = []
|
|
589
552
|
if (oldIndex > newIndex) {
|
|
590
553
|
// 从后往前
|
|
@@ -595,14 +558,10 @@ const superGridService = {
|
|
|
595
558
|
}
|
|
596
559
|
const params = {
|
|
597
560
|
listCode: vm.code,
|
|
598
|
-
columns: splitArr
|
|
561
|
+
columns: splitArr
|
|
599
562
|
}
|
|
600
563
|
vm.$http
|
|
601
|
-
.post(
|
|
602
|
-
window.$vueApp.config.globalProperties.baseAPI +
|
|
603
|
-
'/component/super-grids/drag-columns',
|
|
604
|
-
params
|
|
605
|
-
)
|
|
564
|
+
.post(window.$vueApp.config.globalProperties.baseAPI + '/component/super-grids/drag-columns', params)
|
|
606
565
|
.then((data) => {
|
|
607
566
|
console.log('移动成功')
|
|
608
567
|
})
|
|
@@ -627,7 +586,7 @@ const superGridService = {
|
|
|
627
586
|
// vm.$set(targetItem, 'displayOrder', currentDisplayOrder)
|
|
628
587
|
// vm.$set(targetItem, 'displayOrderType', 'custom')
|
|
629
588
|
// })
|
|
630
|
-
}
|
|
589
|
+
}
|
|
631
590
|
})
|
|
632
591
|
}
|
|
633
592
|
}
|
|
@@ -652,7 +611,7 @@ const superGridService = {
|
|
|
652
611
|
that.columns.splice(oldIndex, 1)
|
|
653
612
|
that.columns.splice(newIndex, 0, oldItem)
|
|
654
613
|
$emit(this, 'columnDrop', oldIndex, newIndex)
|
|
655
|
-
}
|
|
614
|
+
}
|
|
656
615
|
})
|
|
657
616
|
}
|
|
658
617
|
}
|
|
@@ -705,11 +664,7 @@ const superGridService = {
|
|
|
705
664
|
}
|
|
706
665
|
},
|
|
707
666
|
getDisplayOrder(column, dragIndex) {
|
|
708
|
-
if (
|
|
709
|
-
column &&
|
|
710
|
-
column.displayOrder !== undefined &&
|
|
711
|
-
column.displayOrder !== null
|
|
712
|
-
) {
|
|
667
|
+
if (column && column.displayOrder !== undefined && column.displayOrder !== null) {
|
|
713
668
|
return column.displayOrder
|
|
714
669
|
} else {
|
|
715
670
|
return dragIndex + 1
|
|
@@ -771,13 +726,13 @@ const superGridService = {
|
|
|
771
726
|
if (width !== undefined) {
|
|
772
727
|
const params = {
|
|
773
728
|
prop: prop,
|
|
774
|
-
width: width + ''
|
|
729
|
+
width: width + ''
|
|
775
730
|
}
|
|
776
731
|
this.$http
|
|
777
732
|
.post(
|
|
778
733
|
window.$vueApp.config.globalProperties.baseAPI +
|
|
779
|
-
|
|
780
|
-
|
|
734
|
+
'/component/super-grids/setting-column-widths/' +
|
|
735
|
+
this.code,
|
|
781
736
|
params
|
|
782
737
|
)
|
|
783
738
|
.then((data) => {
|
|
@@ -791,5 +746,38 @@ const superGridService = {
|
|
|
791
746
|
}
|
|
792
747
|
})
|
|
793
748
|
},
|
|
749
|
+
filterHasAuthColumns(columns, gridParams, systemCode) {
|
|
750
|
+
if(!this.pageContext || !this.configureObj) {
|
|
751
|
+
return columns
|
|
752
|
+
}
|
|
753
|
+
const prop = this.configureObj.code ? this.configureObj.code : this.code
|
|
754
|
+
if (!this.pageContext.subTablePageInfo) {
|
|
755
|
+
this.pageContext.subTablePageInfo = {}
|
|
756
|
+
}
|
|
757
|
+
if (!this.pageContext.subTablePageInfo[prop]) {
|
|
758
|
+
this.pageContext.subTablePageInfo[prop] = {}
|
|
759
|
+
}
|
|
760
|
+
this.pageContext.subTablePageInfo[prop].fields = []
|
|
761
|
+
return columns.filter((column) => {
|
|
762
|
+
// 如果有 functionCode,则检查权限
|
|
763
|
+
let hasAuth = true
|
|
764
|
+
if (gridParams.branchFieldsMap) {
|
|
765
|
+
// 检查分支权限
|
|
766
|
+
hasAuth = isFieldHasBranchAuth(gridParams.branchFieldsMap, column.prop)
|
|
767
|
+
}
|
|
768
|
+
if (column.functionCode) {
|
|
769
|
+
hasAuth = checkPermission(column.functionCode, systemCode)
|
|
770
|
+
}
|
|
771
|
+
if (hasAuth) {
|
|
772
|
+
if (column.prop !== '$index' && column.prop !== '$selection') {
|
|
773
|
+
this.pageContext.subTablePageInfo[prop].fields.push(column.prop)
|
|
774
|
+
}
|
|
775
|
+
return true
|
|
776
|
+
} else {
|
|
777
|
+
// 如果没有权限,则不显示该列
|
|
778
|
+
return false
|
|
779
|
+
}
|
|
780
|
+
})
|
|
781
|
+
}
|
|
794
782
|
}
|
|
795
783
|
export default superGridService
|
|
@@ -92,7 +92,6 @@
|
|
|
92
92
|
@cell-dblclick="cellDblClick"
|
|
93
93
|
>
|
|
94
94
|
<row-detail v-if="detailColumn" :column="detailColumn" :list-code="code" @show-detail="openRowForm" />
|
|
95
|
-
|
|
96
95
|
<component
|
|
97
96
|
:is="getComponentType(column)"
|
|
98
97
|
v-for="({ column, ...item }, index) in visibleColumnsComponentData"
|
|
@@ -139,7 +138,7 @@
|
|
|
139
138
|
|
|
140
139
|
<columns-config
|
|
141
140
|
v-if="showColumnConfig"
|
|
142
|
-
:columns="
|
|
141
|
+
:columns="visibleColumns"
|
|
143
142
|
:list-code="code"
|
|
144
143
|
:is-sql="isSql"
|
|
145
144
|
@close="closeCustomConfig($event)"
|
|
@@ -220,7 +219,6 @@ import events from './events'
|
|
|
220
219
|
import publicMethods from './public-methods'
|
|
221
220
|
import superGridService from './super-grid-service'
|
|
222
221
|
import formValidatorService from './formValidatorUtil'
|
|
223
|
-
import { getSystemCode } from '../../../src/utils/permissionAuth'
|
|
224
222
|
import apis from './apis'
|
|
225
223
|
import headerContextMenu from './header-context-menu.vue'
|
|
226
224
|
import { isMobileBrowser, isPromise } from '../../../src/utils/common-util'
|
|
@@ -455,7 +453,9 @@ export default {
|
|
|
455
453
|
computed: {
|
|
456
454
|
// 高度偏移
|
|
457
455
|
heightOffset() {
|
|
458
|
-
|
|
456
|
+
//去掉之前的偏移量33,解决偏移导致横向滚动条被遮住无法显示问题
|
|
457
|
+
return Number(this.manualHeightOffset ?? this.options?.configureObj?.props?.size?.pc?.heightOffset ?? 0)
|
|
458
|
+
// return Number(this.manualHeightOffset ?? this.options?.configureObj?.props?.size?.pc?.heightOffset ?? 33)
|
|
459
459
|
},
|
|
460
460
|
// 限制高度最低值
|
|
461
461
|
hasMaxHeight() {
|
|
@@ -488,13 +488,11 @@ export default {
|
|
|
488
488
|
const gridParams = store.get(this.code)
|
|
489
489
|
const operations = this.getOptionOperations()
|
|
490
490
|
gridParams.canntEdit = false
|
|
491
|
-
|
|
492
491
|
const setAttrs = (data) => data.map((item) => ({ property: item.prop, ...item }))
|
|
493
|
-
|
|
494
492
|
if (operations && operations.operation && operations.operation.length > 0) {
|
|
495
493
|
operations.operation.forEach((buttonInfo) => {
|
|
496
494
|
if (buttonInfo.props.code === 'lineEditUpdate') {
|
|
497
|
-
if (checkPermission(buttonInfo.props.functionCode)) {
|
|
495
|
+
if (checkPermission(buttonInfo.props.functionCode, this.basicInfo.systemCode)) {
|
|
498
496
|
gridParams.canntEdit = true
|
|
499
497
|
}
|
|
500
498
|
}
|
|
@@ -603,15 +601,17 @@ export default {
|
|
|
603
601
|
},
|
|
604
602
|
scrollbarAlwaysOn() {
|
|
605
603
|
// 检查全局 Vue 应用配置中是否有 scrollbarAlwaysOn 属性
|
|
606
|
-
if (
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
604
|
+
if (
|
|
605
|
+
window.$vueApp &&
|
|
606
|
+
window.$vueApp.config &&
|
|
607
|
+
window.$vueApp.config.globalProperties &&
|
|
608
|
+
window.$vueApp.config.globalProperties.scrollbarAlwaysOn !== undefined
|
|
609
|
+
) {
|
|
610
610
|
// 返回全局配置的值
|
|
611
|
-
return window.$vueApp.config.globalProperties.scrollbarAlwaysOn
|
|
611
|
+
return window.$vueApp.config.globalProperties.scrollbarAlwaysOn
|
|
612
612
|
}
|
|
613
613
|
// 默认返回 false
|
|
614
|
-
return false
|
|
614
|
+
return false
|
|
615
615
|
}
|
|
616
616
|
// ,
|
|
617
617
|
// hasLoadMainTable() {
|
|
@@ -1383,6 +1383,9 @@ export default {
|
|
|
1383
1383
|
param.additionalParamMap = gridParams.additionalParamMap
|
|
1384
1384
|
param.pageContext = this.pageContext
|
|
1385
1385
|
param.configureOb = this.configureObj
|
|
1386
|
+
if (param.row) {
|
|
1387
|
+
param.row = this.handRowKeyToUpperCase(param.row)
|
|
1388
|
+
}
|
|
1386
1389
|
return gridParams.options.rowStyleRender.call(this, param)
|
|
1387
1390
|
}
|
|
1388
1391
|
if (this.options && this.options.renderRow && this.options.renderRow.hasOwnProperty(param.rowIndex)) {
|
|
@@ -1415,6 +1418,9 @@ export default {
|
|
|
1415
1418
|
param.pageContext = this.pageContext
|
|
1416
1419
|
param.configureObj = this.configureObj
|
|
1417
1420
|
param.cellStyle = columnStyleSetting
|
|
1421
|
+
if (param.row) {
|
|
1422
|
+
param.row = this.handRowKeyToUpperCase(param.row)
|
|
1423
|
+
}
|
|
1418
1424
|
return gridParams.options.cellStyleRender.call(this, param)
|
|
1419
1425
|
} else if (
|
|
1420
1426
|
funName !== null &&
|
|
@@ -1433,6 +1439,9 @@ export default {
|
|
|
1433
1439
|
rowIndex: param.rowIndex,
|
|
1434
1440
|
cellStyle: columnStyleSetting
|
|
1435
1441
|
}
|
|
1442
|
+
if (params.row) {
|
|
1443
|
+
params.row = this.handRowKeyToUpperCase(params.row)
|
|
1444
|
+
}
|
|
1436
1445
|
return gridParams.options['eventCallBack'][funName].call(this, params)
|
|
1437
1446
|
}
|
|
1438
1447
|
},
|
|
@@ -1726,7 +1735,7 @@ export default {
|
|
|
1726
1735
|
// 父级字段名,例如:parentId 或 fk_parent_id
|
|
1727
1736
|
param['parentProp'] = this.parentProp
|
|
1728
1737
|
// 传入系统code
|
|
1729
|
-
param.systemCode =
|
|
1738
|
+
param.systemCode = this.basicInfo.systemCode
|
|
1730
1739
|
|
|
1731
1740
|
requestUrl = this.options.subRowUrl
|
|
1732
1741
|
}
|
|
@@ -3394,6 +3403,26 @@ export default {
|
|
|
3394
3403
|
},
|
|
3395
3404
|
getSuperGridRef() {
|
|
3396
3405
|
return this.$refs.superGrid
|
|
3406
|
+
},
|
|
3407
|
+
getColumns() {
|
|
3408
|
+
return this.columns
|
|
3409
|
+
},
|
|
3410
|
+
handRowKeyToUpperCase(row) {
|
|
3411
|
+
// 把row对象的所有key都转成大写
|
|
3412
|
+
if (row) {
|
|
3413
|
+
const newRow = {}
|
|
3414
|
+
try {
|
|
3415
|
+
for (const key in row) {
|
|
3416
|
+
if (Object.prototype.hasOwnProperty.call(row, key)) {
|
|
3417
|
+
newRow[key.toUpperCase()] = row[key]
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
} catch (error) {
|
|
3421
|
+
console.error('handRowKeyToUpperCase error:', error)
|
|
3422
|
+
return row
|
|
3423
|
+
}
|
|
3424
|
+
return newRow
|
|
3425
|
+
}
|
|
3397
3426
|
}
|
|
3398
3427
|
},
|
|
3399
3428
|
emits: [
|