agilebuilder-ui 1.0.621 → 1.0.962
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.js +115880 -110424
- package/lib/super-ui.umd.cjs +103 -95
- package/package.json +6 -3
- package/packages/department-tree/src/department-tree.vue +27 -10
- package/packages/department-tree-inline/src/department-tree-service.js +20 -41
- package/packages/department-tree-mobile/src/department-tree-app.vue +6 -6
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +15 -15
- package/packages/department-user-tree/src/department-user-tree.vue +17 -2
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +61 -26
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +64 -22
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -6
- package/packages/department-user-tree-inline/src/group-user/group-input.vue +162 -0
- package/packages/department-user-tree-inline/src/group-user/group-list.vue +99 -0
- package/packages/department-user-tree-inline/src/group-user/group-user.vue +42 -0
- package/packages/department-user-tree-inline/src/group-user-multiple-tree.vue +304 -0
- package/packages/department-user-tree-inline/src/group-user-single-tree.vue +155 -0
- package/packages/department-user-tree-inline/src/group-user-tree-service.js +74 -0
- package/packages/department-user-tree-inline/src/search-result.vue +34 -36
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +6 -6
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +17 -19
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +0 -11
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +795 -799
- package/packages/dynamic-source-select/src/events.js +11 -16
- package/packages/fs-upload-list/src/fs-upload-list.vue +183 -122
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +246 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +480 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +127 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +246 -0
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +255 -0
- package/packages/fs-upload-new/src/fs-button-upload.vue +10 -13
- package/packages/fs-upload-new/src/fs-drag-upload.vue +4 -8
- package/packages/fs-upload-new/src/fs-preview-new.vue +103 -36
- package/packages/fs-upload-new/src/fs-upload-new.vue +160 -13
- package/packages/index.js +11 -2
- package/packages/organization-input/src/organization-input.vue +493 -539
- package/packages/plugins/export-data-new.js +34 -1
- package/packages/rich-editor/index.vue +29 -0
- package/packages/row-form/index.js +7 -0
- package/packages/row-form/index.vue +211 -0
- package/packages/scan-code-input/src/scan-code-input.vue +136 -104
- package/packages/scan-code-input-browser/index.js +6 -0
- package/packages/{scan-code-input/src/scan-code-input-colse.vue → scan-code-input-browser/src/scan-code-input.vue} +1 -28
- package/packages/secret-info/index.vue +2 -2
- package/packages/super-grid/src/apis.js +158 -10
- package/packages/super-grid/src/components/grid-icon.vue +7 -14
- package/packages/super-grid/src/components/hyperlinks.vue +24 -8
- package/packages/super-grid/src/custom-formatter.js +312 -380
- package/packages/super-grid/src/dynamic-input.vue +346 -43
- package/packages/super-grid/src/formValidatorUtil.js +79 -15
- package/packages/super-grid/src/group-column.vue +5 -0
- package/packages/super-grid/src/normal-column-content.vue +1056 -0
- package/packages/super-grid/src/normal-column.vue +57 -740
- package/packages/super-grid/src/row-detail.vue +50 -0
- package/packages/super-grid/src/row-operation.vue +19 -10
- package/packages/super-grid/src/scan-util.ts +243 -0
- package/packages/super-grid/src/search-button.vue +18 -14
- package/packages/super-grid/src/search-form-advancedQuery.vue +9 -2
- package/packages/super-grid/src/search-form-item.vue +10 -3
- package/packages/super-grid/src/search-form-mobile.vue +250 -0
- package/packages/super-grid/src/search-form.vue +159 -82
- package/packages/super-grid/src/super-grid-service.js +51 -6
- package/packages/super-grid/src/super-grid.vue +657 -761
- package/packages/super-grid/src/utils.js +126 -170
- package/packages/super-nine-grid/src/super-nine-grid.vue +1032 -1141
- package/packages/workflow-button/src/workflow-button.vue +6 -1
- package/packages/workgroup-tree/src/workgroup-tree.vue +31 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +28 -0
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +26 -0
- package/packages/workgroup-tree-mobile/index.js +6 -0
- package/packages/workgroup-tree-mobile/src/dept-result.vue +51 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +120 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +375 -0
- package/packages/workgroup-tree-mobile/src/workgroup-tree-service.ts +62 -0
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +15 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +27 -0
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +11 -0
- package/packages/workgroup-user-tree-mobile/index.js +6 -0
- package/packages/workgroup-user-tree-mobile/src/dept-path.vue +36 -0
- package/packages/workgroup-user-tree-mobile/src/dept-result.vue +58 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue +119 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +394 -0
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-service.ts +41 -0
- package/src/api/sso-service.js +44 -15
- package/src/directives/permission/permission.js +4 -3
- package/src/i18n/langs/cn.js +19 -3
- package/src/i18n/langs/en.js +18 -2
- package/src/permission.js +114 -122
- package/src/store/modules/user.js +32 -33
- package/src/styles/index.scss +1 -0
- package/src/styles/table.scss +12 -0
- package/src/styles/theme/dark-blue/button.scss +2 -2
- package/src/styles/theme/dark-blue/index.scss +1 -1
- package/src/styles/theme/dark-blue/sidebar.scss +10 -0
- package/src/styles/theme/dark-blue/table.scss +8 -52
- package/src/styles/theme/green/button.scss +2 -2
- package/src/styles/theme/green/green.scss +1 -1
- package/src/styles/theme/green/index.scss +1 -1
- package/src/styles/theme/green/sidebar.scss +20 -0
- package/src/styles/theme/green/table.scss +7 -51
- package/src/styles/theme/ocean-blue/button.scss +2 -2
- package/src/styles/theme/ocean-blue/index.scss +1 -1
- package/src/styles/theme/ocean-blue/ocean-blue.scss +1 -1
- package/src/styles/theme/ocean-blue/sidebar.scss +10 -0
- package/src/styles/theme/ocean-blue/table.scss +7 -52
- package/src/utils/auth.js +23 -3
- package/src/utils/calculator/calculator-factory.js +4 -4
- package/src/utils/calculator/calculator-util.js +14 -0
- package/src/utils/common-util.js +270 -124
- package/src/utils/i18n-util.js +145 -0
- package/src/utils/jump-page-utils.js +245 -314
- package/src/utils/permission.js +7 -1
- package/src/utils/permissionAuth.js +155 -37
- package/src/utils/request.js +10 -11
- package/src/utils/util.js +154 -205
- package/src/views/layout/EmptyLayout.vue +1 -1
- package/src/views/layout/components/Menubar/Item.vue +27 -4
- package/src/views/layout/components/Menubar/SidebarItem.vue +7 -3
- package/src/views/layout/components/Menubar/index.vue +14 -2
- package/src/views/layout/tab-content-index.vue +1 -1
|
@@ -2,6 +2,7 @@ import * as Vue from 'vue'
|
|
|
2
2
|
import { getToken } from '../../../src/utils/auth'
|
|
3
3
|
import { isPlateSys, isShowMenuRoute } from '../../../src/utils/common-util'
|
|
4
4
|
import { getEntityFieldValue } from '../../../src/utils/util'
|
|
5
|
+
import { doFormatWithValueSet } from './formatter'
|
|
5
6
|
import store from './store'
|
|
6
7
|
export function getColumnValues(data, prop) {
|
|
7
8
|
const values = []
|
|
@@ -87,7 +88,7 @@ const ArrowKeyAction = {
|
|
|
87
88
|
return null
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
|
-
}
|
|
91
|
+
}
|
|
91
92
|
}
|
|
92
93
|
export { ArrowKeyAction }
|
|
93
94
|
|
|
@@ -101,10 +102,7 @@ export function setCurrentRow(rowIndex, listCode) {
|
|
|
101
102
|
// 新建时会传过来比记录条数大的行号
|
|
102
103
|
if (gridParams.isMulitiSelect) {
|
|
103
104
|
gridParams.superGrid.clearSelection()
|
|
104
|
-
gridParams.superGrid.toggleRowSelection(
|
|
105
|
-
gridParams.gridData[rowIndex],
|
|
106
|
-
true
|
|
107
|
-
)
|
|
105
|
+
gridParams.superGrid.toggleRowSelection(gridParams.gridData[rowIndex], true)
|
|
108
106
|
} else {
|
|
109
107
|
gridParams.superGrid.setCurrentRow(gridParams.gridData[rowIndex])
|
|
110
108
|
}
|
|
@@ -160,17 +158,11 @@ export function isLastEditRowSave(listCode) {
|
|
|
160
158
|
// 表示有正在编辑的行,不能编辑其他行
|
|
161
159
|
return false
|
|
162
160
|
}
|
|
163
|
-
if (
|
|
164
|
-
typeof gridParams.$rowIndex === 'undefined' ||
|
|
165
|
-
gridParams.$rowIndex === null
|
|
166
|
-
) {
|
|
161
|
+
if (typeof gridParams.$rowIndex === 'undefined' || gridParams.$rowIndex === null) {
|
|
167
162
|
// 表示没有在该列表编辑任何行,可以编辑行
|
|
168
163
|
return true
|
|
169
164
|
}
|
|
170
|
-
if (
|
|
171
|
-
typeof gridParams.$lastSaveRowIndex === 'undefined' ||
|
|
172
|
-
gridParams.$lastSaveRowIndex === null
|
|
173
|
-
) {
|
|
165
|
+
if (typeof gridParams.$lastSaveRowIndex === 'undefined' || gridParams.$lastSaveRowIndex === null) {
|
|
174
166
|
// 表示没有在该列表保存任何行,可以编辑行
|
|
175
167
|
return true
|
|
176
168
|
}
|
|
@@ -197,10 +189,7 @@ export function isCanRefreshGrid(listCode) {
|
|
|
197
189
|
return false
|
|
198
190
|
}
|
|
199
191
|
|
|
200
|
-
if (
|
|
201
|
-
typeof gridParams.isCreateRow !== 'undefined' &&
|
|
202
|
-
gridParams.isCreateRow === true
|
|
203
|
-
) {
|
|
192
|
+
if (typeof gridParams.isCreateRow !== 'undefined' && gridParams.isCreateRow === true) {
|
|
204
193
|
// 说明刚刚新建的行还没有保存 或 撤销编辑,表示当前列表中有编辑行,不能刷新列表数据
|
|
205
194
|
return false
|
|
206
195
|
}
|
|
@@ -237,16 +226,12 @@ export function isDisableEdit(prop, listCode, row) {
|
|
|
237
226
|
const fieldPermissions = gridParams.options.validateRules
|
|
238
227
|
if (fieldPermissions) {
|
|
239
228
|
const fieldRule = fieldPermissions.filter(
|
|
240
|
-
(item) =>
|
|
241
|
-
item.name && (item.name === prop || item.name === 'all_fields')
|
|
229
|
+
(item) => item.name && (item.name === prop || item.name === 'all_fields')
|
|
242
230
|
)
|
|
243
231
|
let canEdit = true
|
|
244
232
|
if (fieldRule && fieldRule.length > 0) {
|
|
245
233
|
for (let i = 0; i < fieldRule.length; i++) {
|
|
246
|
-
if (
|
|
247
|
-
fieldRule[i].rowIndexes === undefined ||
|
|
248
|
-
fieldRule[i].rowIndexes === null
|
|
249
|
-
) {
|
|
234
|
+
if (fieldRule[i].rowIndexes === undefined || fieldRule[i].rowIndexes === null) {
|
|
250
235
|
canEdit = fieldRule[i].canEdit
|
|
251
236
|
} else if (fieldRule[i].rowIndexes.indexOf(rowId) >= 0) {
|
|
252
237
|
canEdit = fieldRule[i].canEdit
|
|
@@ -277,6 +262,15 @@ export function isDisableEdit(prop, listCode, row) {
|
|
|
277
262
|
isDiabled = true
|
|
278
263
|
}
|
|
279
264
|
}
|
|
265
|
+
if (isDiabled === false) {
|
|
266
|
+
// 表示不是禁止编辑的,继续校验自定义规则中是否是禁止编辑的
|
|
267
|
+
if(gridParams.options.customRules && (gridParams.options.customRules[prop] || gridParams.options.customRules['_all_fields'])){
|
|
268
|
+
const columnRules = gridParams.options.customRules[prop]? gridParams.options.customRules[prop]: gridParams.options.customRules['_all_fields']
|
|
269
|
+
if(columnRules && columnRules.disabled){
|
|
270
|
+
isDiabled = true
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
280
274
|
}
|
|
281
275
|
return isDiabled
|
|
282
276
|
}
|
|
@@ -342,10 +336,7 @@ export function isHasEditOption(event, listCode) {
|
|
|
342
336
|
listCode = store.get('_list_code')
|
|
343
337
|
}
|
|
344
338
|
const gridParams = store.get(listCode)
|
|
345
|
-
if (
|
|
346
|
-
gridParams.options.lineEditOptions &&
|
|
347
|
-
gridParams.options.lineEditOptions[event]
|
|
348
|
-
) {
|
|
339
|
+
if (gridParams.options.lineEditOptions && gridParams.options.lineEditOptions[event]) {
|
|
349
340
|
return true
|
|
350
341
|
}
|
|
351
342
|
return false
|
|
@@ -356,10 +347,7 @@ export function isEditOptionFunction(event, listCode) {
|
|
|
356
347
|
listCode = store.get('_list_code')
|
|
357
348
|
}
|
|
358
349
|
const gridParams = store.get(listCode)
|
|
359
|
-
if (
|
|
360
|
-
gridParams.options.lineEditOptions &&
|
|
361
|
-
typeof gridParams.options.lineEditOptions[event] === 'function'
|
|
362
|
-
) {
|
|
350
|
+
if (gridParams.options.lineEditOptions && typeof gridParams.options.lineEditOptions[event] === 'function') {
|
|
363
351
|
return true
|
|
364
352
|
}
|
|
365
353
|
return false
|
|
@@ -424,7 +412,7 @@ export function getGridParams() {
|
|
|
424
412
|
isRestoreByEsc: true, // 点击ESC时,是否撤销编辑,
|
|
425
413
|
aftersaveIsCancelEditState: true, // 保存后,是否取消编辑状态
|
|
426
414
|
afterRestoreIsCancelEditState: true, // 撤销编辑后,是否取消编辑状态
|
|
427
|
-
input: function () {}
|
|
415
|
+
input: function () {} // 数据改变时触发
|
|
428
416
|
// 'beforeSave': function() { return true }, // 保存行数据前的回调
|
|
429
417
|
// 'saveSuccess': function() {}, // 保存行数据成功的回调
|
|
430
418
|
// 'saveError': function() {}, // 保存行数据发生异常的回调
|
|
@@ -451,7 +439,7 @@ export function getGridParams() {
|
|
|
451
439
|
// urlToSaveRow:'', // 保存行记录的url,如果设置了以该设置的为准
|
|
452
440
|
// isEnableValidate: true, // 保存行记录时,是否启用必填验证
|
|
453
441
|
// saveRow: function(){return new Promise((resolve, reject) => {...resolve(data)})} // 需要返回的是保存后的行记录的值
|
|
454
|
-
}
|
|
442
|
+
}
|
|
455
443
|
// 自定义行编辑
|
|
456
444
|
// customFormatter: {
|
|
457
445
|
// },
|
|
@@ -516,7 +504,7 @@ export function getGridParams() {
|
|
|
516
504
|
// actionPermission: { 'canAdd': true, 'canUpdate': true, 'canDelete': true }, // 列表行编辑时控制按钮的权限
|
|
517
505
|
// formData: {}, // 主表单的实体信息
|
|
518
506
|
// hiddenColumns:['operation','xx]
|
|
519
|
-
}
|
|
507
|
+
}
|
|
520
508
|
}
|
|
521
509
|
return Vue.reactive(gridParams)
|
|
522
510
|
}
|
|
@@ -572,69 +560,50 @@ export function addDynamicPropDateSection(target, prop, propValue) {
|
|
|
572
560
|
}
|
|
573
561
|
|
|
574
562
|
export function getTableHeight(superGrid, listCode, pageHeight) {
|
|
575
|
-
let
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
// 表示是配置系统的列表页面
|
|
579
|
-
// 16 .gray .app-container .box-card,
|
|
580
|
-
// 20为内容区域的padding 20
|
|
581
|
-
// 34 + 5为翻页 height 和margin-top
|
|
582
|
-
topDivHeight = 16 * 2 + 20 + 34 + 5
|
|
563
|
+
let rect
|
|
564
|
+
if (superGrid) {
|
|
565
|
+
rect = superGrid.$el.getBoundingClientRect()
|
|
583
566
|
}
|
|
567
|
+
const totalHeight = window.innerHeight - rect.y - 110
|
|
568
|
+
console.log('rect=', rect, 'window.innerHeight=', window.innerHeight, 'totalHeight=', totalHeight)
|
|
569
|
+
return totalHeight
|
|
584
570
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
571
|
+
// let topDivHeight = 120
|
|
572
|
+
// const boxCard = document.querySelector('.box-card')
|
|
573
|
+
// if (boxCard && boxCard !== null) {
|
|
574
|
+
// // 表示是配置系统的列表页面
|
|
575
|
+
// // 16 .gray .app-container .box-card,
|
|
576
|
+
// // 20为内容区域的padding 20
|
|
577
|
+
// // 34 + 5为翻页 height 和margin-top
|
|
578
|
+
// topDivHeight = 16 * 2 + 20 + 34 + 5
|
|
579
|
+
// }
|
|
589
580
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
topDivHeight = topDivHeight + 80
|
|
594
|
-
}
|
|
595
|
-
if (pageHeight === undefined || pageHeight === null || pageHeight === '') {
|
|
596
|
-
pageHeight = window.innerHeight
|
|
597
|
-
} else {
|
|
598
|
-
// 表示弹框页面的高度
|
|
599
|
-
topDivHeight = 0
|
|
600
|
-
}
|
|
601
|
-
let totalHeight = pageHeight - topDivHeight
|
|
602
|
-
if(superGrid){
|
|
603
|
-
totalHeight = pageHeight - superGrid.$el.offsetTop - topDivHeight
|
|
604
|
-
}
|
|
605
|
-
// const cur = document.querySelectorAll("div[class='grid-area']")
|
|
606
|
-
// if (cur.length === 1) {
|
|
607
|
-
// 表示只有一个表格
|
|
608
|
-
return totalHeight
|
|
609
|
-
// } else if (cur.length > 1) {
|
|
610
|
-
// // 表示有多个表格
|
|
611
|
-
// // TODO 主子表的表格高度自适应待实现
|
|
612
|
-
// const gridParams = store.get(listCode)
|
|
613
|
-
// let addHeight = 0
|
|
614
|
-
// if (gridParams.options.addHeight) {
|
|
615
|
-
// addHeight = gridParams.options.addHeight
|
|
616
|
-
// }
|
|
617
|
-
// const hasLoadMainTable = store.hasLoadMainTable
|
|
618
|
-
// if (typeof (hasLoadMainTable) !== 'undefined' && hasLoadMainTable === true) {
|
|
619
|
-
// // 表示主表已加载完成
|
|
620
|
-
// const gridHeight = store.gridTableHeight + addHeight
|
|
621
|
-
// store.hasLoadMainTable = false
|
|
622
|
-
// return gridHeight
|
|
623
|
-
// } else {
|
|
624
|
-
// let gridHeight = totalHeight / cur.length - 5 + addHeight
|
|
625
|
-
// if (gridHeight <= 0) {
|
|
626
|
-
// gridHeight = 200
|
|
627
|
-
// }
|
|
628
|
-
// store.hasLoadMainTable = true
|
|
629
|
-
// store.gridTableHeight = gridHeight
|
|
630
|
-
// return gridHeight
|
|
631
|
-
// }
|
|
581
|
+
// if (isShowMenuRoute() === true) {
|
|
582
|
+
// // 如果显示菜单层级,列表高度需要减少50
|
|
583
|
+
// topDivHeight = topDivHeight + 50
|
|
632
584
|
// }
|
|
585
|
+
|
|
586
|
+
// const listGrid = document.querySelector('.el-tabs__content .' + listCode)
|
|
587
|
+
// if (listGrid) {
|
|
588
|
+
// // 表示当前列表在tab页签内容,需要减去tab的高度
|
|
589
|
+
// topDivHeight = topDivHeight + 80
|
|
590
|
+
// }
|
|
591
|
+
// if (pageHeight === undefined || pageHeight === null || pageHeight === '') {
|
|
592
|
+
// pageHeight = window.innerHeight
|
|
593
|
+
// } else {
|
|
594
|
+
// // 表示弹框页面的高度
|
|
595
|
+
// topDivHeight = 0
|
|
596
|
+
// }
|
|
597
|
+
// let totalHeight = pageHeight - topDivHeight
|
|
598
|
+
// if (superGrid) {
|
|
599
|
+
// totalHeight = pageHeight - superGrid.$el.offsetTop - topDivHeight
|
|
600
|
+
// }
|
|
601
|
+
// return totalHeight
|
|
633
602
|
}
|
|
634
603
|
|
|
635
604
|
export function getExtraParam(searchParam, gridParams) {
|
|
636
605
|
const param = {
|
|
637
|
-
searchParam: searchParam
|
|
606
|
+
searchParam: searchParam
|
|
638
607
|
}
|
|
639
608
|
param.withDataPermission = gridParams.options.isWithDataPermission
|
|
640
609
|
param.isWorkflowEntity = gridParams.options.isWorkflowEntity
|
|
@@ -675,25 +644,17 @@ export function analysisFileSetObj(fileSetObj, isSql) {
|
|
|
675
644
|
}
|
|
676
645
|
return {
|
|
677
646
|
showName: showName,
|
|
678
|
-
serverPath: serverPath
|
|
647
|
+
serverPath: serverPath
|
|
679
648
|
}
|
|
680
649
|
}
|
|
681
650
|
|
|
682
|
-
export function otherFilesToStandard(
|
|
683
|
-
fileSetObj,
|
|
684
|
-
keyValueParam,
|
|
685
|
-
files,
|
|
686
|
-
filesStringData
|
|
687
|
-
) {
|
|
651
|
+
export function otherFilesToStandard(fileSetObj, keyValueParam, files, filesStringData) {
|
|
688
652
|
const standardFiles = []
|
|
689
653
|
if (files) {
|
|
690
654
|
if (files && files.length > 0) {
|
|
691
655
|
for (var i = 0; i < files.length; i++) {
|
|
692
656
|
const file = files[i]
|
|
693
|
-
const standardFile = packageFile(
|
|
694
|
-
file[keyValueParam.showName],
|
|
695
|
-
file[keyValueParam.serverPath]
|
|
696
|
-
)
|
|
657
|
+
const standardFile = packageFile(file[keyValueParam.showName], file[keyValueParam.serverPath])
|
|
697
658
|
standardFiles.push(standardFile)
|
|
698
659
|
}
|
|
699
660
|
}
|
|
@@ -720,31 +681,15 @@ export function packageFile(showName, serverPath) {
|
|
|
720
681
|
standardFile.showName = showName
|
|
721
682
|
standardFile.serverPath = serverPath
|
|
722
683
|
|
|
723
|
-
if (
|
|
724
|
-
standardFile.showName &&
|
|
725
|
-
/\.(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF|bmp|BMP|psd|PSD|tif|TIF)$/.test(
|
|
726
|
-
showName
|
|
727
|
-
)
|
|
728
|
-
) {
|
|
684
|
+
if (standardFile.showName && /\.(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF|bmp|BMP|psd|PSD|tif|TIF)$/.test(showName)) {
|
|
729
685
|
standardFile.isImg = true
|
|
730
686
|
}
|
|
731
687
|
const token = getToken()
|
|
732
|
-
let url =
|
|
733
|
-
window.$vueApp.config.globalProperties.baseURL +
|
|
734
|
-
'/common/super-form/downloads?jwt=' +
|
|
735
|
-
token
|
|
688
|
+
let url = window.$vueApp.config.globalProperties.baseURL + '/common/super-form/downloads?jwt=' + token
|
|
736
689
|
if (isPlateSys(window.$vueApp.config.globalProperties.systemCode)) {
|
|
737
|
-
url =
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
token
|
|
741
|
-
}
|
|
742
|
-
const src =
|
|
743
|
-
url +
|
|
744
|
-
'&showName=' +
|
|
745
|
-
encodeURI(standardFile.showName) +
|
|
746
|
-
'&serverPath=' +
|
|
747
|
-
standardFile.serverPath
|
|
690
|
+
url = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/downloads?jwt=' + token
|
|
691
|
+
}
|
|
692
|
+
const src = url + '&showName=' + encodeURI(standardFile.showName) + '&serverPath=' + standardFile.serverPath
|
|
748
693
|
standardFile.src = src
|
|
749
694
|
return standardFile
|
|
750
695
|
}
|
|
@@ -754,8 +699,7 @@ export function getFileList(row, column, isSql) {
|
|
|
754
699
|
if (
|
|
755
700
|
column.fileSet &&
|
|
756
701
|
column.fileSet !== '' &&
|
|
757
|
-
(column.componentType === 'annex' ||
|
|
758
|
-
column.componentType === 'multipartUpload')
|
|
702
|
+
(column.componentType === 'annex' || column.componentType === 'multipartUpload')
|
|
759
703
|
) {
|
|
760
704
|
const fileSetObj = JSON.parse(column.fileSet)
|
|
761
705
|
const keyValueParam = analysisFileSetObj(fileSetObj, isSql)
|
|
@@ -764,23 +708,13 @@ export function getFileList(row, column, isSql) {
|
|
|
764
708
|
// const lowerStr = fileSetObj.childAnnexDataTableCode.toLowerCase()
|
|
765
709
|
const fileArr = row[column.prop]
|
|
766
710
|
// 子表
|
|
767
|
-
fileList = otherFilesToStandard(
|
|
768
|
-
fileSetObj,
|
|
769
|
-
keyValueParam,
|
|
770
|
-
fileArr,
|
|
771
|
-
null
|
|
772
|
-
)
|
|
711
|
+
fileList = otherFilesToStandard(fileSetObj, keyValueParam, fileArr, null)
|
|
773
712
|
} else {
|
|
774
713
|
const filesStringData = {
|
|
775
714
|
showName: getEntityFieldValue(row, keyValueParam.showName),
|
|
776
|
-
serverPath: getEntityFieldValue(row, keyValueParam.serverPath)
|
|
715
|
+
serverPath: getEntityFieldValue(row, keyValueParam.serverPath)
|
|
777
716
|
}
|
|
778
|
-
fileList = otherFilesToStandard(
|
|
779
|
-
fileSetObj,
|
|
780
|
-
keyValueParam,
|
|
781
|
-
null,
|
|
782
|
-
filesStringData
|
|
783
|
-
)
|
|
717
|
+
fileList = otherFilesToStandard(fileSetObj, keyValueParam, null, filesStringData)
|
|
784
718
|
}
|
|
785
719
|
} else {
|
|
786
720
|
const showName = getEntityFieldValue(row, keyValueParam.showName)
|
|
@@ -791,13 +725,10 @@ export function getFileList(row, column, isSql) {
|
|
|
791
725
|
return fileList
|
|
792
726
|
}
|
|
793
727
|
|
|
794
|
-
export function getDynamicDataSourceOptions(column, isSql, additionalParamMap) {
|
|
728
|
+
export function getDynamicDataSourceOptions(column, isSql, additionalParamMap, baseURL) {
|
|
795
729
|
let additionalParameter
|
|
796
730
|
if (additionalParamMap) {
|
|
797
|
-
console.log(
|
|
798
|
-
'getDynamicDataSourceOptions--additionalParamMap=',
|
|
799
|
-
additionalParamMap
|
|
800
|
-
)
|
|
731
|
+
console.log('getDynamicDataSourceOptions--additionalParamMap=', additionalParamMap)
|
|
801
732
|
if (additionalParamMap && typeof additionalParamMap === 'object') {
|
|
802
733
|
additionalParameter = JSON.stringify(additionalParamMap)
|
|
803
734
|
} else if (additionalParamMap && additionalParamMap !== '') {
|
|
@@ -807,6 +738,7 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap) {
|
|
|
807
738
|
const options = {
|
|
808
739
|
isSql: isSql,
|
|
809
740
|
additionalParameter: additionalParameter,
|
|
741
|
+
backendUrl: baseURL
|
|
810
742
|
}
|
|
811
743
|
// 如果是多选文件类型,需要解析(需要设置临时字段,判断文件还是图片,图片需要预览)
|
|
812
744
|
if (column.valueSetOptions) {
|
|
@@ -814,10 +746,7 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap) {
|
|
|
814
746
|
if (valueSetOptionsObj && valueSetOptionsObj.valueSetOptions) {
|
|
815
747
|
options.valueSetOptions = valueSetOptionsObj.valueSetOptions
|
|
816
748
|
}
|
|
817
|
-
if (
|
|
818
|
-
valueSetOptionsObj.dynamicDataSourceCode &&
|
|
819
|
-
valueSetOptionsObj.dynamicDataSourceCode !== ''
|
|
820
|
-
) {
|
|
749
|
+
if (valueSetOptionsObj.dynamicDataSourceCode && valueSetOptionsObj.dynamicDataSourceCode !== '') {
|
|
821
750
|
options.dynamicDataSourceCode = valueSetOptionsObj.dynamicDataSourceCode
|
|
822
751
|
}
|
|
823
752
|
}
|
|
@@ -826,11 +755,7 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap) {
|
|
|
826
755
|
|
|
827
756
|
// 值设置是否是动态数据源类型的数据源
|
|
828
757
|
export function isDynamicDataSourceSource(column) {
|
|
829
|
-
if (
|
|
830
|
-
column.valueSet &&
|
|
831
|
-
column.valueSet.length > 0 &&
|
|
832
|
-
column.valueSet[0].value === 'dynamicDataSource'
|
|
833
|
-
) {
|
|
758
|
+
if (column.valueSet && column.valueSet.length > 0 && column.valueSet[0].value === 'dynamicDataSource') {
|
|
834
759
|
return true
|
|
835
760
|
} else {
|
|
836
761
|
return false
|
|
@@ -840,11 +765,7 @@ export function isDynamicDataSourceSource(column) {
|
|
|
840
765
|
export function getLastPageNum(total, rowsPerPage) {
|
|
841
766
|
if (total === undefined || total === null || total === 0) {
|
|
842
767
|
return 1
|
|
843
|
-
} else if (
|
|
844
|
-
rowsPerPage === undefined ||
|
|
845
|
-
rowsPerPage === null ||
|
|
846
|
-
rowsPerPage === 0
|
|
847
|
-
) {
|
|
768
|
+
} else if (rowsPerPage === undefined || rowsPerPage === null || rowsPerPage === 0) {
|
|
848
769
|
return 1
|
|
849
770
|
} else {
|
|
850
771
|
return Math.ceil(total / rowsPerPage)
|
|
@@ -852,32 +773,67 @@ export function getLastPageNum(total, rowsPerPage) {
|
|
|
852
773
|
}
|
|
853
774
|
// 纵向滚动条滚动最底部功能
|
|
854
775
|
export function scrollYToBottom(listCode) {
|
|
855
|
-
const scrollDivElement = document.querySelector(
|
|
856
|
-
'.' + listCode + ' .el-table--scrollable-y .el-table__body-wrapper'
|
|
857
|
-
)
|
|
776
|
+
const scrollDivElement = document.querySelector('.' + listCode + ' .el-table--scrollable-y .el-table__body-wrapper')
|
|
858
777
|
console.log('scrollDivElement==', scrollDivElement)
|
|
859
778
|
if (scrollDivElement && scrollDivElement !== null) {
|
|
860
779
|
// 表示有滚动条,需要将滚动条滚动最底部
|
|
861
|
-
console.log(
|
|
862
|
-
'scrollDivElement==scrollDivElement.scrollHeight=',
|
|
863
|
-
scrollDivElement.scrollHeight
|
|
864
|
-
)
|
|
780
|
+
console.log('scrollDivElement==scrollDivElement.scrollHeight=', scrollDivElement.scrollHeight)
|
|
865
781
|
scrollDivElement.scrollTop = scrollDivElement.scrollHeight
|
|
866
782
|
}
|
|
867
783
|
}
|
|
868
784
|
|
|
869
785
|
export function getAdditionalParamMap(gridParams) {
|
|
870
786
|
let additionalParamMap = null
|
|
871
|
-
if (
|
|
872
|
-
gridParams.additionalParamMap &&
|
|
873
|
-
typeof gridParams.additionalParamMap === 'object'
|
|
874
|
-
) {
|
|
787
|
+
if (gridParams.additionalParamMap && typeof gridParams.additionalParamMap === 'object') {
|
|
875
788
|
additionalParamMap = gridParams.additionalParamMap
|
|
876
|
-
} else if (
|
|
877
|
-
gridParams.additionalParamMap &&
|
|
878
|
-
gridParams.additionalParamMap !== ''
|
|
879
|
-
) {
|
|
789
|
+
} else if (gridParams.additionalParamMap && gridParams.additionalParamMap !== '') {
|
|
880
790
|
additionalParamMap = JSON.parse(gridParams.additionalParamMap)
|
|
881
791
|
}
|
|
882
792
|
return additionalParamMap
|
|
883
793
|
}
|
|
794
|
+
|
|
795
|
+
// 获得控件的配置信息,例如:自定义控件的附加配置等
|
|
796
|
+
export function getControlConfig(column) {
|
|
797
|
+
let controlConfig = {}
|
|
798
|
+
if (column && column.controlConfig) {
|
|
799
|
+
controlConfig = JSON.parse(column.controlConfig)
|
|
800
|
+
}
|
|
801
|
+
return controlConfig
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
export function getContentAlign(column, gridParams) {
|
|
805
|
+
let align
|
|
806
|
+
if (gridParams.options?.align && gridParams.options.align !== '') {
|
|
807
|
+
align = gridParams.options.align
|
|
808
|
+
} else if (column.contAlign && column.contAlign !== '') {
|
|
809
|
+
align = column.contAlign
|
|
810
|
+
}
|
|
811
|
+
return align
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
export function getHeaderAlign(column, gridParams) {
|
|
815
|
+
let headerAlign
|
|
816
|
+
if (gridParams.options?.headerAlign && gridParams.options.headerAlign !== '') {
|
|
817
|
+
headerAlign = gridParams.options.headerAlign
|
|
818
|
+
} else if (column.titleAlign && column.titleAlign !== '') {
|
|
819
|
+
headerAlign = column.titleAlign
|
|
820
|
+
}
|
|
821
|
+
return headerAlign
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
export function getHeaderLable(column) {
|
|
825
|
+
let label = column.label
|
|
826
|
+
if (!column.titleValueSet) {
|
|
827
|
+
label = label.replace(/\\n/g, '</br>')
|
|
828
|
+
} else {
|
|
829
|
+
label = formatHeader(column)
|
|
830
|
+
}
|
|
831
|
+
if (label === null || label === undefined || label === '') {
|
|
832
|
+
label = column.prop
|
|
833
|
+
}
|
|
834
|
+
return label
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
function formatHeader(column) {
|
|
838
|
+
return doFormatWithValueSet(column.titleValueSetValue, column.label)
|
|
839
|
+
}
|