agilebuilder-ui 1.0.85 → 1.0.87-temp1
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 +24626 -23708
- package/lib/super-ui.umd.cjs +76 -76
- package/package.json +2 -2
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +3 -0
- package/packages/fs-upload-list/src/fs-upload-list.vue +2 -1
- package/packages/index.js +5 -2
- package/packages/rich-editor/index.vue +1 -1
- package/packages/row-form/index.js +7 -0
- package/packages/row-form/index.vue +211 -0
- package/packages/super-grid/src/apis.js +26 -0
- 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 -386
- package/packages/super-grid/src/dynamic-input.vue +8 -1
- package/packages/super-grid/src/normal-column-content.vue +1079 -0
- package/packages/super-grid/src/normal-column.vue +41 -752
- package/packages/super-grid/src/row-detail.vue +50 -0
- package/packages/super-grid/src/search-form-advancedQuery.vue +6 -1
- package/packages/super-grid/src/search-form-item.vue +6 -1
- package/packages/super-grid/src/super-grid-service.js +41 -1
- package/packages/super-grid/src/super-grid.vue +123 -49
- package/packages/super-grid/src/utils.js +80 -56
- package/src/i18n/langs/cn.js +4 -1
- package/src/i18n/langs/en.js +3 -0
- package/src/permission.js +7 -1
- package/src/store/modules/user.js +4 -1
- package/src/styles/theme/dark-blue/button.scss +2 -2
- package/src/styles/theme/dark-blue/index.scss +1 -1
- package/src/styles/theme/green/button.scss +2 -2
- package/src/styles/theme/green/index.scss +1 -1
- package/src/styles/theme/ocean-blue/button.scss +2 -2
- package/src/styles/theme/ocean-blue/index.scss +1 -1
- package/src/utils/jump-page-utils.js +199 -321
- package/src/utils/permissionAuth.js +1 -1
- package/src/views/layout/components/Menubar/Item.vue +27 -4
- package/src/views/layout/components/Menubar/SidebarItem.vue +6 -2
- package/src/views/layout/components/Menubar/index.vue +14 -2
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-table-column
|
|
3
|
+
align="center"
|
|
4
|
+
:class-name="column.prop"
|
|
5
|
+
fixed="left"
|
|
6
|
+
header-align="center"
|
|
7
|
+
:prop="column.prop"
|
|
8
|
+
:width="80"
|
|
9
|
+
:label="column.label"
|
|
10
|
+
>
|
|
11
|
+
<template v-slot="scope">
|
|
12
|
+
<el-icon @click="showDetail(scope.$index)"><ElView /></el-icon>
|
|
13
|
+
</template>
|
|
14
|
+
</el-table-column>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { View as ElView } from '@element-plus/icons-vue'
|
|
19
|
+
export default {
|
|
20
|
+
name: 'RowDetail',
|
|
21
|
+
components: {
|
|
22
|
+
ElView
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
column: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: null
|
|
28
|
+
},
|
|
29
|
+
listCode: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: null
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
},
|
|
36
|
+
computed: {
|
|
37
|
+
},
|
|
38
|
+
created() {
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
showDetail(rowIndex) {
|
|
42
|
+
this.$emit('show-detail', rowIndex)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style lang="scss" scoped>
|
|
49
|
+
|
|
50
|
+
</style>
|
|
@@ -462,10 +462,15 @@ export default {
|
|
|
462
462
|
...searchMethods,
|
|
463
463
|
getDynamicDataSourceOptions(column) {
|
|
464
464
|
const gridParams = store.get(this.code)
|
|
465
|
+
let baseURL = gridParams.options.backendUrl
|
|
466
|
+
if (!baseURL) {
|
|
467
|
+
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
468
|
+
}
|
|
465
469
|
return getDynamicDataSourceOptions(
|
|
466
470
|
column,
|
|
467
471
|
this.isSql,
|
|
468
|
-
gridParams.additionalParamMap
|
|
472
|
+
gridParams.additionalParamMap,
|
|
473
|
+
baseURL
|
|
469
474
|
)
|
|
470
475
|
},
|
|
471
476
|
// 值设置是否是动态数据源类型的数据源
|
|
@@ -321,10 +321,15 @@ export default {
|
|
|
321
321
|
...searchMethods,
|
|
322
322
|
getDynamicDataSourceOptions(column) {
|
|
323
323
|
const gridParams = store.get(this.code)
|
|
324
|
+
let baseURL = gridParams.options.backendUrl
|
|
325
|
+
if (!baseURL) {
|
|
326
|
+
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
327
|
+
}
|
|
324
328
|
return getDynamicDataSourceOptions(
|
|
325
329
|
column,
|
|
326
330
|
this.isSql,
|
|
327
|
-
gridParams.additionalParamMap
|
|
331
|
+
gridParams.additionalParamMap,
|
|
332
|
+
baseURL
|
|
328
333
|
)
|
|
329
334
|
},
|
|
330
335
|
// 值设置是否是动态数据源类型的数据源
|
|
@@ -192,6 +192,7 @@ const superGridService = {
|
|
|
192
192
|
? this.isShowPage
|
|
193
193
|
: false
|
|
194
194
|
gridParams.isSubTableShowPage = this.isSubTableShowPage
|
|
195
|
+
this.getDetailColumn()
|
|
195
196
|
this.hasLoadedColumns = true
|
|
196
197
|
let canFetchData = true
|
|
197
198
|
if (isHasOptionFunction('loadBeforeSend', this.code)) {
|
|
@@ -249,6 +250,45 @@ const superGridService = {
|
|
|
249
250
|
console.log('初始化所耗时间', a1 - a)
|
|
250
251
|
})
|
|
251
252
|
},
|
|
253
|
+
getDetailColumn() {
|
|
254
|
+
if (this.isFormSubTable && this.options.showRowForm) {
|
|
255
|
+
// 显示详情列
|
|
256
|
+
const detailColumn = {
|
|
257
|
+
"prop": "$detail",
|
|
258
|
+
"orgProp": "$detail",
|
|
259
|
+
"label": "详情",
|
|
260
|
+
"dataType": "TEXT",
|
|
261
|
+
"width": 80,
|
|
262
|
+
"show": true,
|
|
263
|
+
"exportable": false,
|
|
264
|
+
"sortable": "false",
|
|
265
|
+
"filterable": false,
|
|
266
|
+
"fixed": "left",
|
|
267
|
+
"span": false,
|
|
268
|
+
"queryType": "no",
|
|
269
|
+
"querySetting": "{}",
|
|
270
|
+
"editable": false,
|
|
271
|
+
"componentType": "input",
|
|
272
|
+
"titleAlign": "center",
|
|
273
|
+
"contAlign": "center",
|
|
274
|
+
"showType": "default",
|
|
275
|
+
"exportType": "default",
|
|
276
|
+
"displayOrderType": "default",
|
|
277
|
+
"displayOrder": 5,
|
|
278
|
+
"widthType": "default",
|
|
279
|
+
"ifMultiData": true,
|
|
280
|
+
"dynamic": false,
|
|
281
|
+
"total": false,
|
|
282
|
+
"custom": true,
|
|
283
|
+
"remoteEnum": false,
|
|
284
|
+
"fuzzy": true,
|
|
285
|
+
"groupHeader": false
|
|
286
|
+
}
|
|
287
|
+
detailColumn.label = this.$t('superGrid.detail')
|
|
288
|
+
this.detailColumn = detailColumn
|
|
289
|
+
console.log('getDetailColumn----this.detailColumn=', this.detailColumn)
|
|
290
|
+
}
|
|
291
|
+
},
|
|
252
292
|
getListViewSetting(additionalParams) {
|
|
253
293
|
return new Promise((resolve, reject) => {
|
|
254
294
|
console.log('getListViewSetting--this.settings====', this.settings)
|
|
@@ -300,7 +340,7 @@ const superGridService = {
|
|
|
300
340
|
if (column.queryType && column.queryType !== 'no' && column.componentType && (column.componentType === 'date' || column.componentType === 'dateSection' ||
|
|
301
341
|
column.componentType === 'timePicker' || column.componentType === 'dateTimePicker')) {
|
|
302
342
|
// 配置了默认值
|
|
303
|
-
if (column.controlConfig) {
|
|
343
|
+
if (column.controlConfig && column.controlConfig.timeDefaultQueryRange) {
|
|
304
344
|
queryParameterSize++
|
|
305
345
|
}
|
|
306
346
|
}
|
|
@@ -75,6 +75,11 @@
|
|
|
75
75
|
@cell-click="selectCell"
|
|
76
76
|
@cell-dblclick="cellDblClick"
|
|
77
77
|
>
|
|
78
|
+
<row-detail v-if="detailColumn"
|
|
79
|
+
:column="detailColumn"
|
|
80
|
+
:list-code="code"
|
|
81
|
+
@show-detail="openRowForm"
|
|
82
|
+
/>
|
|
78
83
|
<template v-if="myCustomFormatter">
|
|
79
84
|
<component
|
|
80
85
|
:is="getComponentType(column)"
|
|
@@ -205,14 +210,34 @@
|
|
|
205
210
|
:column="rightClickColumn"
|
|
206
211
|
@clearHeaderContextmenu="clearHeaderContextmenu"
|
|
207
212
|
/>
|
|
208
|
-
|
|
209
|
-
v-if="
|
|
210
|
-
:
|
|
211
|
-
:
|
|
212
|
-
:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
<row-form
|
|
214
|
+
v-if="showRowForm"
|
|
215
|
+
:parent-form-data="parentFormData"
|
|
216
|
+
:columns="visibleColumns"
|
|
217
|
+
:row-index="currentEditRowIndex"
|
|
218
|
+
:list-code="code"
|
|
219
|
+
:drag-column-prop="dragColumnProp"
|
|
220
|
+
:is-sql="isSql"
|
|
221
|
+
:base-url="baseURL"
|
|
222
|
+
:options="options"
|
|
223
|
+
:table-name="tableName"
|
|
224
|
+
:page-code="pageCode"
|
|
225
|
+
:list-toolbar-form-data="listToolbarFormData"
|
|
226
|
+
:list-name="listName"
|
|
227
|
+
:current-page="currentPage"
|
|
228
|
+
:grid-data="isSubTableShowPage ? subTableData : gridData"
|
|
229
|
+
:page-grid-data="
|
|
230
|
+
isSubTableShowPage ? getSubTableGridData(subTableData) : gridData
|
|
231
|
+
"
|
|
232
|
+
:line-edit="lineEdit"
|
|
233
|
+
@close="closeRowForm"
|
|
234
|
+
@refresData="refresData"
|
|
235
|
+
@refresPortData="refresPortData"
|
|
236
|
+
@refresPortsData="refresPortsData"
|
|
237
|
+
@refresMainTableFields="refresMainTableFields"
|
|
238
|
+
@open-page="openPageDialog"
|
|
239
|
+
@prohibitToEdit="prohibitToEdit"
|
|
240
|
+
/>
|
|
216
241
|
</div>
|
|
217
242
|
</template>
|
|
218
243
|
|
|
@@ -226,10 +251,12 @@ import GroupColumn from './group-column.vue'
|
|
|
226
251
|
import ColumnsConfig from './columns-config.vue'
|
|
227
252
|
import SearchForm from './search-form.vue'
|
|
228
253
|
import searchFormDialog from './search-form-dialog.vue'
|
|
254
|
+
import RowDetail from './row-detail.vue'
|
|
229
255
|
import {getEntityFieldValueWithOutCase, setEntityFieldValue} from '../../../src/utils/util'
|
|
230
256
|
import eventBus from './eventBus'
|
|
231
257
|
import {
|
|
232
258
|
addDynamicProp,
|
|
259
|
+
getControlConfig,
|
|
233
260
|
getExtraParam,
|
|
234
261
|
getFirstEditableColumn,
|
|
235
262
|
getGridParams,
|
|
@@ -266,6 +293,7 @@ export default {
|
|
|
266
293
|
searchFormDialog,
|
|
267
294
|
ElIconSetting,
|
|
268
295
|
ElIconRefresh,
|
|
296
|
+
RowDetail
|
|
269
297
|
},
|
|
270
298
|
name: 'SuperGrid',
|
|
271
299
|
props: {
|
|
@@ -461,7 +489,11 @@ export default {
|
|
|
461
489
|
configureObj, // 表格配置信息
|
|
462
490
|
isMobile, // 是否是移动端
|
|
463
491
|
isShowMobileSearch: false, // 是否显示移动端查询区域
|
|
464
|
-
subTableStyle: {}
|
|
492
|
+
subTableStyle: {},
|
|
493
|
+
detailColumn: null, // 详情列。子表展开表单 配置使用。
|
|
494
|
+
currentEditRowIndex: null, // 当前查看的行记录号
|
|
495
|
+
showRowForm: false, // 是否显示行记录详情
|
|
496
|
+
baseURL: null
|
|
465
497
|
}
|
|
466
498
|
},
|
|
467
499
|
computed: {
|
|
@@ -976,20 +1008,27 @@ export default {
|
|
|
976
1008
|
gridParams.options.formSetHeight
|
|
977
1009
|
) {
|
|
978
1010
|
tempMaxHeight = gridParams.options.formSetHeight
|
|
979
|
-
} else if (
|
|
980
|
-
!this.basicInfo.displayEffect ||
|
|
981
|
-
this.basicInfo.displayEffect === '' ||
|
|
982
|
-
this.basicInfo.displayEffect === 'default'
|
|
983
|
-
) {
|
|
984
|
-
tempMaxHeight = null
|
|
985
1011
|
}
|
|
1012
|
+
// else if (
|
|
1013
|
+
// !this.basicInfo.displayEffect ||
|
|
1014
|
+
// this.basicInfo.displayEffect === '' ||
|
|
1015
|
+
// this.basicInfo.displayEffect === 'default'
|
|
1016
|
+
// ) {
|
|
1017
|
+
// tempMaxHeight = null
|
|
1018
|
+
// }
|
|
986
1019
|
// if(tempHeight !== undefined && tempHeight !== null){
|
|
987
1020
|
// // el-table的height和maxHeight不能同时设值,会导致列表渲染失败,报脚本错.设置height不起作用,都使用maxHeight控制列表高度吧,暂时不知道原因
|
|
988
1021
|
// this.tableHeight = tempHeight
|
|
989
1022
|
// }
|
|
990
1023
|
}
|
|
991
|
-
if(
|
|
1024
|
+
if(!this.basicInfo.displayEffect ||
|
|
1025
|
+
this.basicInfo.displayEffect === '' ||
|
|
1026
|
+
this.basicInfo.displayEffect === 'default'){
|
|
1027
|
+
// default默认不铺满
|
|
992
1028
|
this.maxHeight = tempMaxHeight
|
|
1029
|
+
} else {
|
|
1030
|
+
// 表示需要cover铺满
|
|
1031
|
+
this.tableHeight = tempMaxHeight
|
|
993
1032
|
}
|
|
994
1033
|
console.log('resizeTableHeight-----tempMaxHeight=',tempMaxHeight,'this.tableHeight=',this.tableHeight,'this.maxHeight=', this.maxHeight ,'gridParams.options=', gridParams.options)
|
|
995
1034
|
})
|
|
@@ -1341,6 +1380,15 @@ export default {
|
|
|
1341
1380
|
) {
|
|
1342
1381
|
gridParams.additionalParamMap = this.options.additionalParamMap
|
|
1343
1382
|
}
|
|
1383
|
+
|
|
1384
|
+
let baseURL
|
|
1385
|
+
if (gridParams.options && gridParams.options.backendUrl) {
|
|
1386
|
+
baseURL = gridParams.options.backendUrl
|
|
1387
|
+
}
|
|
1388
|
+
if (!baseURL) {
|
|
1389
|
+
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
1390
|
+
}
|
|
1391
|
+
this.baseURL = baseURL
|
|
1344
1392
|
},
|
|
1345
1393
|
changeRowStyle(param) {
|
|
1346
1394
|
// param的格式:{row, rowIndex}
|
|
@@ -1375,6 +1423,7 @@ export default {
|
|
|
1375
1423
|
const gridParams = store.get(this.code)
|
|
1376
1424
|
let funName = null
|
|
1377
1425
|
let columnOptions = null
|
|
1426
|
+
let columnStyleSetting = null
|
|
1378
1427
|
if (param && param.column && param.column.property) {
|
|
1379
1428
|
if (gridParams && gridParams.columnOptionMap) {
|
|
1380
1429
|
if (gridParams.columnOptionMap[param.column.property]) {
|
|
@@ -1382,6 +1431,10 @@ export default {
|
|
|
1382
1431
|
if (columnOptions.events && columnOptions.events.cellStyle) {
|
|
1383
1432
|
funName = columnOptions.events.cellStyle
|
|
1384
1433
|
}
|
|
1434
|
+
const controlConfig = getControlConfig(columnOptions)
|
|
1435
|
+
if (controlConfig && controlConfig['cellStyle']) {
|
|
1436
|
+
columnStyleSetting = controlConfig['cellStyle']
|
|
1437
|
+
}
|
|
1385
1438
|
}
|
|
1386
1439
|
}
|
|
1387
1440
|
}
|
|
@@ -1390,7 +1443,8 @@ export default {
|
|
|
1390
1443
|
if (isHasOptionFunction('cellStyleRender', this.code)) {
|
|
1391
1444
|
param.additionalParamMap = gridParams.additionalParamMap
|
|
1392
1445
|
param.pageContext = this.pageContext
|
|
1393
|
-
param.
|
|
1446
|
+
param.configureObj = this.configureObj
|
|
1447
|
+
param.cellStyle = columnStyleSetting
|
|
1394
1448
|
return gridParams.options.cellStyleRender.call(this, param)
|
|
1395
1449
|
} else if (
|
|
1396
1450
|
funName !== null &&
|
|
@@ -1406,7 +1460,8 @@ export default {
|
|
|
1406
1460
|
column: columnOptions,
|
|
1407
1461
|
prop: param.column.property,
|
|
1408
1462
|
additionalParamMap: gridParams.additionalParamMap,
|
|
1409
|
-
rowIndex: param.rowIndex
|
|
1463
|
+
rowIndex: param.rowIndex,
|
|
1464
|
+
cellStyle: columnStyleSetting
|
|
1410
1465
|
}
|
|
1411
1466
|
return gridParams.options['eventCallBack'][funName].call(this, params)
|
|
1412
1467
|
}
|
|
@@ -1442,6 +1497,7 @@ export default {
|
|
|
1442
1497
|
const gridParams = store.get(this.code)
|
|
1443
1498
|
let funName = null
|
|
1444
1499
|
let columnOptions = null
|
|
1500
|
+
let titleStyleSetting = null
|
|
1445
1501
|
if (param && param.column && param.column.property) {
|
|
1446
1502
|
if (gridParams && gridParams.columnOptionMap) {
|
|
1447
1503
|
if (gridParams.columnOptionMap[param.column.property]) {
|
|
@@ -1452,43 +1508,54 @@ export default {
|
|
|
1452
1508
|
) {
|
|
1453
1509
|
funName = columnOptions.events.headerCellStyle
|
|
1454
1510
|
}
|
|
1511
|
+
const controlConfig = getControlConfig(columnOptions)
|
|
1512
|
+
if (controlConfig && controlConfig['titleStyle']) {
|
|
1513
|
+
titleStyleSetting = controlConfig['titleStyle']
|
|
1514
|
+
}
|
|
1455
1515
|
}
|
|
1456
1516
|
}
|
|
1457
1517
|
}
|
|
1458
1518
|
// 应用模式
|
|
1459
1519
|
// 修改表头样式,当某些字段需要编辑时,某些字段不需要编辑时,为了突出显示有权限编辑的字段,可以使用该功能
|
|
1460
|
-
if (
|
|
1461
|
-
gridParams.
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1520
|
+
if (isHasOptionFunction('titleStyleRender', this.code)) {
|
|
1521
|
+
param.additionalParamMap = gridParams.additionalParamMap
|
|
1522
|
+
param.pageContext = this.pageContext
|
|
1523
|
+
param.configureObj = this.configureObj
|
|
1524
|
+
param.titleStyle = titleStyleSetting
|
|
1525
|
+
return gridParams.options.titleStyleRender.call(this, param)
|
|
1526
|
+
} else if (
|
|
1527
|
+
gridParams.options.renderHeader &&
|
|
1528
|
+
gridParams.options.renderHeader.props
|
|
1529
|
+
) {
|
|
1530
|
+
const column = param.column
|
|
1531
|
+
const props = gridParams.options.renderHeader.props
|
|
1532
|
+
const propsArr = props.split(',')
|
|
1533
|
+
for (let i = 0; i < propsArr.length; i++) {
|
|
1534
|
+
const prop = propsArr[i]
|
|
1535
|
+
if (column.property === prop.trim()) {
|
|
1536
|
+
let backgroundColor = '#c3f4e2'
|
|
1537
|
+
if (
|
|
1538
|
+
typeof gridParams.options.renderHeader.color !== 'undefined'
|
|
1539
|
+
) {
|
|
1540
|
+
backgroundColor = gridParams.options.renderHeader.color
|
|
1541
|
+
}
|
|
1542
|
+
return { background: backgroundColor }
|
|
1475
1543
|
}
|
|
1476
|
-
return { background: backgroundColor }
|
|
1477
1544
|
}
|
|
1545
|
+
} else if (
|
|
1546
|
+
funName !== null &&
|
|
1547
|
+
columnOptions !== null &&
|
|
1548
|
+
gridParams.options &&
|
|
1549
|
+
gridParams.options['eventCallBack'] &&
|
|
1550
|
+
gridParams.options['eventCallBack'][funName] &&
|
|
1551
|
+
typeof gridParams.options['eventCallBack'][funName] === 'function'
|
|
1552
|
+
) {
|
|
1553
|
+
// const param = { value: param.row[param.column.property], row: param.row, column: columnOptions, prop: param.column.property }
|
|
1554
|
+
param.additionalParamMap = gridParams.additionalParamMap
|
|
1555
|
+
param.titleStyle = titleStyleSetting
|
|
1556
|
+
return gridParams.options['eventCallBack'][funName].call(this, param)
|
|
1478
1557
|
}
|
|
1479
|
-
} else if (
|
|
1480
|
-
funName !== null &&
|
|
1481
|
-
columnOptions !== null &&
|
|
1482
|
-
gridParams.options &&
|
|
1483
|
-
gridParams.options['eventCallBack'] &&
|
|
1484
|
-
gridParams.options['eventCallBack'][funName] &&
|
|
1485
|
-
typeof gridParams.options['eventCallBack'][funName] === 'function'
|
|
1486
|
-
) {
|
|
1487
|
-
// const param = { value: param.row[param.column.property], row: param.row, column: columnOptions, prop: param.column.property }
|
|
1488
|
-
param.additionalParamMap = gridParams.additionalParamMap
|
|
1489
|
-
return gridParams.options['eventCallBack'][funName].call(this, param)
|
|
1490
1558
|
}
|
|
1491
|
-
}
|
|
1492
1559
|
},
|
|
1493
1560
|
fetchData(searchParam, isSearch, parentRowIds, resove) {
|
|
1494
1561
|
const gridParams = store.get(this.code)
|
|
@@ -2301,11 +2368,10 @@ export default {
|
|
|
2301
2368
|
) {
|
|
2302
2369
|
searchParam.initSearchForm = gridParams.options.initSearchForm
|
|
2303
2370
|
}
|
|
2304
|
-
console.log('getSearchParam---gridParams=', gridParams)
|
|
2305
2371
|
if (
|
|
2306
2372
|
gridParams.query &&
|
|
2307
|
-
typeof gridParams.query.defaultQueryCriteria !== 'undefined'
|
|
2308
|
-
|
|
2373
|
+
typeof gridParams.query.defaultQueryCriteria !== 'undefined' &&
|
|
2374
|
+
gridParams.query.defaultQueryCriteria !== ''
|
|
2309
2375
|
) {
|
|
2310
2376
|
// json字符串转数组
|
|
2311
2377
|
searchParam.defaultQueryCriteria = JSON.parse(
|
|
@@ -3005,6 +3071,7 @@ export default {
|
|
|
3005
3071
|
listCode: popPageSetting._listCode,
|
|
3006
3072
|
rowIndex: popPageSetting._rowIndex,
|
|
3007
3073
|
row: popPageSetting.row,
|
|
3074
|
+
columnProp: popPageSetting._columnProp,
|
|
3008
3075
|
id: row?(row.ID?row.ID:row.id):null,
|
|
3009
3076
|
isMobile,
|
|
3010
3077
|
gridData: isSubTableShowPage
|
|
@@ -3253,6 +3320,13 @@ export default {
|
|
|
3253
3320
|
if (data && data.componentId) {
|
|
3254
3321
|
eventBus.$emit(data.componentId + '-scanDone', data)
|
|
3255
3322
|
}
|
|
3323
|
+
},
|
|
3324
|
+
openRowForm (rowIndex) {
|
|
3325
|
+
this.currentEditRowIndex = rowIndex
|
|
3326
|
+
this.showRowForm = true
|
|
3327
|
+
},
|
|
3328
|
+
closeRowForm () {
|
|
3329
|
+
this.showRowForm = false
|
|
3256
3330
|
}
|
|
3257
3331
|
},
|
|
3258
3332
|
emits: [
|
|
@@ -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 = []
|
|
@@ -550,64 +551,45 @@ export function addDynamicPropDateSection(target, prop, propValue) {
|
|
|
550
551
|
}
|
|
551
552
|
|
|
552
553
|
export function getTableHeight(superGrid, listCode, pageHeight) {
|
|
553
|
-
let
|
|
554
|
-
const boxCard = document.querySelector('.box-card')
|
|
555
|
-
if (boxCard && boxCard !== null) {
|
|
556
|
-
// 表示是配置系统的列表页面
|
|
557
|
-
// 16 .gray .app-container .box-card,
|
|
558
|
-
// 20为内容区域的padding 20
|
|
559
|
-
// 34 + 5为翻页 height 和margin-top
|
|
560
|
-
topDivHeight = 16 * 2 + 20 + 34 + 5
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
if (isShowMenuRoute() === true) {
|
|
564
|
-
// 如果显示菜单层级,列表高度需要减少50
|
|
565
|
-
topDivHeight = topDivHeight + 50
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
const listGrid = document.querySelector('.el-tabs__content .' + listCode)
|
|
569
|
-
if (listGrid) {
|
|
570
|
-
// 表示当前列表在tab页签内容,需要减去tab的高度
|
|
571
|
-
topDivHeight = topDivHeight + 80
|
|
572
|
-
}
|
|
573
|
-
if (pageHeight === undefined || pageHeight === null || pageHeight === '') {
|
|
574
|
-
pageHeight = window.innerHeight
|
|
575
|
-
} else {
|
|
576
|
-
// 表示弹框页面的高度
|
|
577
|
-
topDivHeight = 0
|
|
578
|
-
}
|
|
579
|
-
let totalHeight = pageHeight - topDivHeight
|
|
554
|
+
let rect
|
|
580
555
|
if (superGrid) {
|
|
581
|
-
|
|
556
|
+
rect = superGrid.$el.getBoundingClientRect()
|
|
582
557
|
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
// 表示只有一个表格
|
|
558
|
+
const totalHeight = window.innerHeight - rect.y - 110
|
|
559
|
+
console.log('rect=', rect, 'window.innerHeight=', window.innerHeight, 'totalHeight=', totalHeight)
|
|
586
560
|
return totalHeight
|
|
587
|
-
|
|
588
|
-
//
|
|
589
|
-
//
|
|
590
|
-
//
|
|
591
|
-
//
|
|
592
|
-
//
|
|
593
|
-
//
|
|
594
|
-
//
|
|
595
|
-
//
|
|
596
|
-
//
|
|
597
|
-
|
|
598
|
-
//
|
|
599
|
-
//
|
|
600
|
-
//
|
|
601
|
-
//
|
|
602
|
-
|
|
603
|
-
//
|
|
604
|
-
//
|
|
605
|
-
//
|
|
606
|
-
//
|
|
607
|
-
//
|
|
608
|
-
//
|
|
609
|
-
//
|
|
561
|
+
|
|
562
|
+
// let topDivHeight = 120
|
|
563
|
+
// const boxCard = document.querySelector('.box-card')
|
|
564
|
+
// if (boxCard && boxCard !== null) {
|
|
565
|
+
// // 表示是配置系统的列表页面
|
|
566
|
+
// // 16 .gray .app-container .box-card,
|
|
567
|
+
// // 20为内容区域的padding 20
|
|
568
|
+
// // 34 + 5为翻页 height 和margin-top
|
|
569
|
+
// topDivHeight = 16 * 2 + 20 + 34 + 5
|
|
570
|
+
// }
|
|
571
|
+
|
|
572
|
+
// if (isShowMenuRoute() === true) {
|
|
573
|
+
// // 如果显示菜单层级,列表高度需要减少50
|
|
574
|
+
// topDivHeight = topDivHeight + 50
|
|
575
|
+
// }
|
|
576
|
+
|
|
577
|
+
// const listGrid = document.querySelector('.el-tabs__content .' + listCode)
|
|
578
|
+
// if (listGrid) {
|
|
579
|
+
// // 表示当前列表在tab页签内容,需要减去tab的高度
|
|
580
|
+
// topDivHeight = topDivHeight + 80
|
|
581
|
+
// }
|
|
582
|
+
// if (pageHeight === undefined || pageHeight === null || pageHeight === '') {
|
|
583
|
+
// pageHeight = window.innerHeight
|
|
584
|
+
// } else {
|
|
585
|
+
// // 表示弹框页面的高度
|
|
586
|
+
// topDivHeight = 0
|
|
587
|
+
// }
|
|
588
|
+
// let totalHeight = pageHeight - topDivHeight
|
|
589
|
+
// if (superGrid) {
|
|
590
|
+
// totalHeight = pageHeight - superGrid.$el.offsetTop - topDivHeight
|
|
610
591
|
// }
|
|
592
|
+
// return totalHeight
|
|
611
593
|
}
|
|
612
594
|
|
|
613
595
|
export function getExtraParam(searchParam, gridParams) {
|
|
@@ -734,7 +716,7 @@ export function getFileList(row, column, isSql) {
|
|
|
734
716
|
return fileList
|
|
735
717
|
}
|
|
736
718
|
|
|
737
|
-
export function getDynamicDataSourceOptions(column, isSql, additionalParamMap) {
|
|
719
|
+
export function getDynamicDataSourceOptions(column, isSql, additionalParamMap, baseURL) {
|
|
738
720
|
let additionalParameter
|
|
739
721
|
if (additionalParamMap) {
|
|
740
722
|
console.log('getDynamicDataSourceOptions--additionalParamMap=', additionalParamMap)
|
|
@@ -746,7 +728,8 @@ export function getDynamicDataSourceOptions(column, isSql, additionalParamMap) {
|
|
|
746
728
|
}
|
|
747
729
|
const options = {
|
|
748
730
|
isSql: isSql,
|
|
749
|
-
additionalParameter: additionalParameter
|
|
731
|
+
additionalParameter: additionalParameter,
|
|
732
|
+
backendUrl: baseURL
|
|
750
733
|
}
|
|
751
734
|
// 如果是多选文件类型,需要解析(需要设置临时字段,判断文件还是图片,图片需要预览)
|
|
752
735
|
if (column.valueSetOptions) {
|
|
@@ -808,3 +791,44 @@ export function getControlConfig(column) {
|
|
|
808
791
|
}
|
|
809
792
|
return controlConfig
|
|
810
793
|
}
|
|
794
|
+
|
|
795
|
+
export function getContentAlign(column, gridParams){
|
|
796
|
+
let align
|
|
797
|
+
if (typeof gridParams.options.align !== 'undefined') {
|
|
798
|
+
align = gridParams.options.align
|
|
799
|
+
} else if (column.contAlign && column.contAlign !== '') {
|
|
800
|
+
align = column.contAlign
|
|
801
|
+
}
|
|
802
|
+
return align
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
export function getHeaderAlign(column, gridParams){
|
|
806
|
+
let headerAlign
|
|
807
|
+
if (typeof gridParams.options.headerAlign !== 'undefined') {
|
|
808
|
+
headerAlign = gridParams.options.headerAlign
|
|
809
|
+
} else if (column.titleAlign && column.titleAlign !== '') {
|
|
810
|
+
headerAlign = column.titleAlign
|
|
811
|
+
} else {
|
|
812
|
+
// 如果没有配置表头对齐方式,默认使用内容对齐方式
|
|
813
|
+
headerAlign = 'left'
|
|
814
|
+
}
|
|
815
|
+
return headerAlign
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
export function getHeaderLable(column) {
|
|
820
|
+
let label = column.label
|
|
821
|
+
if (!column.titleValueSet) {
|
|
822
|
+
label = label.replace(/\\n/g, '</br>')
|
|
823
|
+
} else {
|
|
824
|
+
label = formatHeader(column)
|
|
825
|
+
}
|
|
826
|
+
if (label === null || label === undefined || label === '') {
|
|
827
|
+
label = column.prop
|
|
828
|
+
}
|
|
829
|
+
return label
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
function formatHeader(column) {
|
|
833
|
+
return doFormatWithValueSet(column.titleValueSetValue, column.label)
|
|
834
|
+
}
|
package/src/i18n/langs/cn.js
CHANGED
package/src/i18n/langs/en.js
CHANGED
package/src/permission.js
CHANGED
|
@@ -151,11 +151,17 @@ router.beforeEach((to, from, next) => {
|
|
|
151
151
|
if (!isDevp && devpRoleCodes) {
|
|
152
152
|
// 表示是开发环境设计时生成的运行平台的JWT,且缓存了项目权限编码,对应运行平台的岗位编码
|
|
153
153
|
// console.log('开发环境设计时生成的运行平台的JWT,且缓存了项目权限编码时,!isDevp && devpRoleCodes')
|
|
154
|
+
console.log('getDevPlatformPermissions---devpRoleCodes=', devpRoleCodes)
|
|
154
155
|
return store.dispatch('getDevPlatformPermissions', devpRoleCodes)
|
|
155
156
|
} else {
|
|
156
157
|
// 开发平台本身的功能或直接平台功能时
|
|
157
158
|
// console.log('开发平台本身的功能或直接平台功能时')
|
|
158
|
-
|
|
159
|
+
let systemCode = to.query ? to.query.customSystem: null
|
|
160
|
+
if (!systemCode) {
|
|
161
|
+
systemCode = window.$vueApp.config.globalProperties.currentSystem
|
|
162
|
+
}
|
|
163
|
+
console.log('3333systemCode=', systemCode)
|
|
164
|
+
return store.dispatch('getCurrentUserPermissions', {loginName:user.loginName, systemCode})
|
|
159
165
|
}
|
|
160
166
|
})
|
|
161
167
|
.then((permissions) => {
|