agilebuilder-ui 1.0.85-temp2 → 1.0.85-temp4

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.
@@ -1,407 +1,322 @@
1
- import {$emit} from '../../utils/gogocodeTransfer'
2
- import {doFormat} from './formatter'
1
+ import { $emit } from '../../utils/gogocodeTransfer'
2
+ import { doFormat } from './formatter'
3
3
  import store from './store'
4
- import {initialization, jumpToPage} from '../../../src/utils/jump-page-utils'
5
- import {analysisFileSetObj, otherFilesToStandard} from './utils'
6
- import {isPromise} from '../../../src/utils/common-util'
7
-
4
+ import { initialization, jumpToPage } from '../../../src/utils/jump-page-utils'
5
+ import { analysisFileSetObj, otherFilesToStandard } from './utils'
6
+ import { isPromise } from '../../../src/utils/common-util'
8
7
 
9
8
  const customFormatter = {
10
- /**
11
- * 自定义格式化值
12
- * @param {prop} 属性名
13
- * @param {formatValue} 格式化后的值
14
- * @param {format} 格式化方法
15
- * @param {componentName} 组件名
16
- */
17
- customFormatValue(row, prop, format, rowIndex) {
18
- // const start = new Date().getTime()
19
- // console.log('---super-grid--customFormatValue--this.customFormat=', this.customFormat)
20
- if (this.customFormat) {
21
- let originalValue = row[prop]
22
- if (this.isObjectProp(prop)) {
23
- originalValue = this.objectPropOriginalValue(row, prop)
24
- }
25
- const formatValue = doFormat(this.column, originalValue)
26
- const component = format.call(
27
- this,
28
- originalValue,
29
- formatValue,
30
- row,
31
- this.column,
32
- rowIndex
33
- )
34
- // console.log('---super-grid--customFormatValue--component=', component)
35
- if (typeof component === 'undefined') {
36
- return false
37
- } else {
38
- // const aa = defineCustomElement(component)
39
- // window.customElements.define(prop + rowIndex , aa)
40
- window.$vueApp.component(prop + rowIndex, component)
41
- }
42
-
43
- // const end = new Date().getTime()
44
- // console.log('---super-grid--customFormatValue--time1=', (end - start))
45
- return true
46
- } else {
47
- // const end = new Date().getTime()
48
- // console.log('---super-grid--customFormatValue--time2=', (end - start))
49
- return false
50
- }
51
- },
52
-
53
- isObjectProp(prop) {
54
- // const start = new Date().getTime()
55
- // console.log('---super-grid--isObjectProp--')
56
- if (prop && prop.indexOf('.') > 0) {
57
- // const end = new Date().getTime()
58
- // console.log('---super-grid--isObjectProp--time1=', (end - start))
59
- return true
60
- } else {
61
- // const end = new Date().getTime()
62
- // console.log('---super-grid--isObjectProp--time2=', (end - start))
63
- return false
64
- }
65
- },
66
-
67
- objectPropOriginalValue(row, prop) {
68
- try {
69
- // console.log('---super-grid--objectPropOriginalValue--')
70
- let objValue = row
71
- if (prop && prop.indexOf('.') > 0) {
72
- const props = prop.split('.')
73
- props.forEach((subProp) => {
74
- if (objValue) {
75
- objValue = objValue[subProp]
76
- } else {
77
- objValue = ''
78
- throw objValue
79
- }
80
- })
81
- return objValue
82
- } else {
83
- return row[prop]
84
- }
85
- } catch (e) {
86
- // console.log(e)
87
- return ''
9
+ /**
10
+ * 自定义格式化值
11
+ * @param {prop} 属性名
12
+ * @param {formatValue} 格式化后的值
13
+ * @param {format} 格式化方法
14
+ * @param {componentName} 组件名
15
+ */
16
+ customFormatValue(row, prop, format, rowIndex) {
17
+ // const start = new Date().getTime()
18
+ // console.log('---super-grid--customFormatValue--this.customFormat=', this.customFormat)
19
+ if (this.customFormat) {
20
+ let originalValue = row[prop]
21
+ if (this.isObjectProp(prop)) {
22
+ originalValue = this.objectPropOriginalValue(row, prop)
23
+ }
24
+ const formatValue = doFormat(this.column, originalValue)
25
+ const component = format.call(this, originalValue, formatValue, row, this.column, rowIndex)
26
+ // console.log('---super-grid--customFormatValue--component=', component)
27
+ if (typeof component === 'undefined') {
28
+ return false
29
+ } else {
30
+ // const aa = defineCustomElement(component)
31
+ // window.customElements.define(prop + rowIndex , aa)
32
+ window.$vueApp.component(prop + rowIndex, component)
33
+ }
34
+
35
+ // const end = new Date().getTime()
36
+ // console.log('---super-grid--customFormatValue--time1=', (end - start))
37
+ return true
38
+ } else {
39
+ // const end = new Date().getTime()
40
+ // console.log('---super-grid--customFormatValue--time2=', (end - start))
41
+ return false
42
+ }
43
+ },
44
+
45
+ isObjectProp(prop) {
46
+ // const start = new Date().getTime()
47
+ // console.log('---super-grid--isObjectProp--')
48
+ if (prop && prop.indexOf('.') > 0) {
49
+ // const end = new Date().getTime()
50
+ // console.log('---super-grid--isObjectProp--time1=', (end - start))
51
+ return true
52
+ } else {
53
+ // const end = new Date().getTime()
54
+ // console.log('---super-grid--isObjectProp--time2=', (end - start))
55
+ return false
56
+ }
57
+ },
58
+
59
+ objectPropOriginalValue(row, prop) {
60
+ try {
61
+ // console.log('---super-grid--objectPropOriginalValue--')
62
+ let objValue = row
63
+ if (prop && prop.indexOf('.') > 0) {
64
+ const props = prop.split('.')
65
+ props.forEach((subProp) => {
66
+ if (objValue) {
67
+ objValue = objValue[subProp]
68
+ } else {
69
+ objValue = ''
70
+ throw objValue
71
+ }
72
+ })
73
+ return objValue
74
+ } else {
75
+ return row[prop]
76
+ }
77
+ } catch (e) {
78
+ // console.log(e)
79
+ return ''
80
+ }
81
+ },
82
+
83
+ objectPropValue(row, prop) {
84
+ return this.formatter(row, prop, this.column)
85
+ },
86
+ // 获取显示的值
87
+ // 附件类型,显示值与实际值不相同。如果时子表多选,需要单独判断
88
+ objectPropValueTwo(row, column) {
89
+ if ((column.componentType === 'annex' || column.componentType === 'multipartUpload') && column.fileSet) {
90
+ // 判断是否是对象集合(子表存储)
91
+ const fileSetObj = JSON.parse(column.fileSet)
92
+ if (fileSetObj.childAnnexDataTableCode) {
93
+ // 获取存好的json并解析
94
+ const keyValueParam = analysisFileSetObj(fileSetObj, this.isSql)
95
+ // 子表存储。返回最后一个对象的展示名称
96
+ const fileArr = this.objectPropValue(row, column.prop)
97
+ if (fileArr && fileArr.length > 0) {
98
+ const fileList = otherFilesToStandard(fileSetObj, keyValueParam, fileArr, null)
99
+ return fileList[fileList.length - 1].showName
88
100
  }
89
- },
90
-
91
- objectPropValue(row, prop) {
92
- return this.formatter(row, prop, this.column)
93
- },
94
- // 获取显示的值
95
- // 附件类型,显示值与实际值不相同。如果时子表多选,需要单独判断
96
- objectPropValueTwo(row, column) {
97
- if (
98
- (column.componentType === 'annex' ||
99
- column.componentType === 'multipartUpload') && column.fileSet
100
- ) {
101
- // 判断是否是对象集合(子表存储)
102
- const fileSetObj = JSON.parse(column.fileSet)
103
- if (fileSetObj.childAnnexDataTableCode) {
104
- // 获取存好的json并解析
105
- const keyValueParam = analysisFileSetObj(fileSetObj, this.isSql)
106
- // 子表存储。返回最后一个对象的展示名称
107
- const fileArr = this.objectPropValue(row, column.prop)
108
- if (fileArr && fileArr.length > 0) {
109
- const fileList = otherFilesToStandard(
110
- fileSetObj,
111
- keyValueParam,
112
- fileArr,
113
- null
114
- )
115
- return fileList[fileList.length - 1].showName
116
- }
117
- } else {
118
- return this.objectPropValue(row, column.prop)
119
- }
120
- } else if (column.formatter && column.formatter.type === 'files') {
121
- // 判断是否是对象集合(子表存储)
122
- const fileSetObj = JSON.parse(column.formatter.options.fileSet)
123
- if (fileSetObj.childAnnexDataTableCode) {
124
- // 获取存好的json并解析
125
- const keyValueParam = analysisFileSetObj(fileSetObj, this.isSql)
126
- // 子表存储。返回最后一个对象的展示名称
127
- const fileArr = this.objectPropValue(row, column.prop)
128
- if (fileArr && fileArr.length > 0) {
129
- const fileList = otherFilesToStandard(
130
- fileSetObj,
131
- keyValueParam,
132
- fileArr,
133
- null
134
- )
135
- return fileList[fileList.length - 1].showName
136
- }
137
- } else {
138
- return this.objectPropValue(row, column.prop)
139
- }
140
- } else {
141
- return this.objectPropValue(row, column.prop)
101
+ } else {
102
+ return this.objectPropValue(row, column.prop)
103
+ }
104
+ } else if (column.formatter && column.formatter.type === 'files') {
105
+ // 判断是否是对象集合(子表存储)
106
+ const fileSetObj = JSON.parse(column.formatter.options.fileSet)
107
+ if (fileSetObj.childAnnexDataTableCode) {
108
+ // 获取存好的json并解析
109
+ const keyValueParam = analysisFileSetObj(fileSetObj, this.isSql)
110
+ // 子表存储。返回最后一个对象的展示名称
111
+ const fileArr = this.objectPropValue(row, column.prop)
112
+ if (fileArr && fileArr.length > 0) {
113
+ const fileList = otherFilesToStandard(fileSetObj, keyValueParam, fileArr, null)
114
+ return fileList[fileList.length - 1].showName
142
115
  }
143
- },
144
- formatter(row, prop, column) {
145
- const cellValue = this.objectPropOriginalValue(row, prop)
116
+ } else {
117
+ return this.objectPropValue(row, column.prop)
118
+ }
119
+ } else {
120
+ return this.objectPropValue(row, column.prop)
121
+ }
122
+ },
123
+ formatter(row, prop, column) {
124
+ const cellValue = this.objectPropOriginalValue(row, prop)
125
+ if (this.columnFormatter !== undefined && this.columnFormatter.type === 'custom') {
126
+ // 自定义事件
127
+ let funName
128
+ if (this.columnFormatter.options && this.columnFormatter.options.format) {
129
+ funName = this.columnFormatter.options.format
130
+ }
131
+ if (funName && funName !== null && funName !== '') {
132
+ const gridParams = store.get(this.listCode)
146
133
  if (
147
- this.columnFormatter !== undefined &&
148
- this.columnFormatter.type === 'custom'
134
+ gridParams.options &&
135
+ gridParams.options['eventCallBack'] &&
136
+ gridParams.options['eventCallBack'][funName] &&
137
+ typeof gridParams.options['eventCallBack'][funName] === 'function'
149
138
  ) {
150
- // 自定义事件
151
- let funName
152
- if (this.columnFormatter.options && this.columnFormatter.options.format) {
153
- funName = this.columnFormatter.options.format
154
- }
155
- if (funName && funName !== null && funName !== '') {
156
- const gridParams = store.get(this.listCode)
157
- if (
158
- gridParams.options &&
159
- gridParams.options['eventCallBack'] &&
160
- gridParams.options['eventCallBack'][funName] &&
161
- typeof gridParams.options['eventCallBack'][funName] === 'function'
162
- ) {
163
- const param = {
164
- value: cellValue,
165
- row: row,
166
- column: this.column,
167
- prop: prop,
168
- additionalParamMap: gridParams.additionalParamMap,
169
- }
170
- return gridParams.options['eventCallBack'][funName].call(this, param)
171
- } else {
172
- return doFormat(column, cellValue)
173
- }
174
- } else {
175
- return doFormat(column, cellValue)
176
- }
139
+ const param = {
140
+ value: cellValue,
141
+ row: row,
142
+ column: this.column,
143
+ prop: prop,
144
+ additionalParamMap: gridParams.additionalParamMap
145
+ }
146
+ return gridParams.options['eventCallBack'][funName].call(this, param)
177
147
  } else {
178
- return doFormat(column, cellValue)
148
+ return doFormat(column, cellValue)
179
149
  }
180
- },
181
- getColumnValue(row, column) {
182
- const prop = column.prop
183
- let originalValue = row[prop]
184
- if (this.isObjectProp(prop)) {
185
- originalValue = this.objectPropOriginalValue(row, prop)
186
- }
187
- const formatValue = doFormat(column, originalValue)
188
- return {
189
- originalValue,
190
- formatValue,
191
- }
192
- },
193
- onClickFun(row, column, onClick, rowIndex, button) {
194
- const values = this.getColumnValue(row, column)
195
- onClick.call(
196
- this,
197
- values.originalValue,
198
- values.formatValue,
199
- row,
200
- column,
201
- rowIndex,
202
- button
203
- )
204
- },
205
- isShowButtonFun(row, column, isShowFun, rowIndex) {
206
- if (isShowFun === undefined) {
207
- return true
208
- }
209
- if (typeof isShowFun === 'function') {
210
- const values = this.getColumnValue(row, column)
211
- let isShow = isShowFun.call(
212
- this,
213
- values.originalValue,
214
- values.formatValue,
215
- row,
216
- column,
217
- rowIndex
218
- )
219
- if (isShow === undefined) {
220
- isShow = true
221
- }
222
- return isShow
223
- } else {
224
- return isShowFun
225
- }
226
- },
227
- // 超链接解析
228
- getHyperLinkSetting(
229
- column,
150
+ } else {
151
+ return doFormat(column, cellValue)
152
+ }
153
+ } else {
154
+ return doFormat(column, cellValue)
155
+ }
156
+ },
157
+ getColumnValue(row, column) {
158
+ const prop = column.prop
159
+ let originalValue = row[prop]
160
+ if (this.isObjectProp(prop)) {
161
+ originalValue = this.objectPropOriginalValue(row, prop)
162
+ }
163
+ const formatValue = doFormat(column, originalValue)
164
+ return {
165
+ originalValue,
166
+ formatValue
167
+ }
168
+ },
169
+ onClickFun(row, column, onClick, rowIndex, button) {
170
+ const values = this.getColumnValue(row, column)
171
+ onClick.call(this, values.originalValue, values.formatValue, row, column, rowIndex, button)
172
+ },
173
+ isShowButtonFun(row, column, isShowFun, rowIndex) {
174
+ if (isShowFun === undefined) {
175
+ return true
176
+ }
177
+ if (typeof isShowFun === 'function') {
178
+ const values = this.getColumnValue(row, column)
179
+ let isShow = isShowFun.call(this, values.originalValue, values.formatValue, row, column, rowIndex)
180
+ if (isShow === undefined) {
181
+ isShow = true
182
+ }
183
+ return isShow
184
+ } else {
185
+ return isShowFun
186
+ }
187
+ },
188
+ // 超链接解析
189
+ getHyperLinkSetting(column, row, isSql, additionalParamerter, contextParameter, tableName, listCode) {
190
+ const gridParams = store.get(listCode)
191
+ let parentFormData = null
192
+ if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
193
+ parentFormData = gridParams.options.extraParam.entityMap
194
+ }
195
+ let hyperLinkResult = {}
196
+ let jumpPageJson
197
+ if (column && column.formatter && column.formatter.options && column.formatter.options.format) {
198
+ jumpPageJson = column.formatter.options.format
199
+ }
200
+ if (jumpPageJson && jumpPageJson !== '') {
201
+ // 解析是否需要显示该超链接
202
+ const result = initialization(
203
+ JSON.parse(jumpPageJson),
230
204
  row,
231
205
  isSql,
232
206
  additionalParamerter,
233
207
  contextParameter,
234
208
  tableName,
235
- listCode
236
- ) {
237
- const gridParams = store.get(listCode)
238
- let parentFormData = null
239
- if (
240
- gridParams.options.extraParam &&
241
- gridParams.options.extraParam.entityMap
242
- ) {
243
- parentFormData = gridParams.options.extraParam.entityMap
244
- }
245
- let hyperLinkResult = {}
246
- let jumpPageJson
247
- if (
248
- column &&
249
- column.formatter &&
250
- column.formatter.options &&
251
- column.formatter.options.format
252
- ) {
253
- jumpPageJson = column.formatter.options.format
254
- }
255
- if (jumpPageJson && jumpPageJson !== '') {
256
- // 解析是否需要显示该超链接
257
- const result = initialization(
258
- JSON.parse(jumpPageJson),
259
- row,
260
- isSql,
261
- additionalParamerter,
262
- contextParameter,
263
- tableName,
264
- parentFormData,
265
- gridParams.pageContext
266
- )
267
- // console.log('getHyperLinkSetting--resut=', result)
268
- if (result && result.label && result.label !== '') {
269
- console.log('label存在')
270
- } else {
271
- result.label = this.objectPropValueTwo(row, column)
272
- }
273
- if (result && result.title && result.title !== '') {
274
- console.log('title存在')
275
- } else {
276
- result.title = result.label
277
- }
278
- hyperLinkResult = result
279
- } else {
280
- // 表示显示超链接
281
- hyperLinkResult.visible = true
282
- hyperLinkResult.label = this.objectPropValueTwo(row, column)
283
- hyperLinkResult.title = hyperLinkResult.label
284
- }
285
- return hyperLinkResult
286
- },
287
- // 点击超链接
288
- clickHyperLink(column, row, listCode, rowIndex) {
289
- let jumpPageJson
290
- if (
291
- column &&
292
- column.formatter &&
293
- column.formatter.options &&
294
- column.formatter.options.format
295
- ) {
296
- jumpPageJson = column.formatter.options.format
297
- }
298
- if (jumpPageJson && jumpPageJson !== '') {
299
- // 解析是否需要显示该超链接
300
- let canClick = true
301
- const gridParams = store.get(listCode)
302
- const jumpPageSetting = JSON.parse(jumpPageJson)
303
- console.log(
304
- 'gupre-grid---clickHyperLink--jumpPageSetting=',
305
- jumpPageSetting
306
- )
307
- if (jumpPageSetting.beforeClick) {
308
- const funName = jumpPageSetting.beforeClick
309
- console.log(
310
- 'gupre-grid---clickHyperLink--jumpPageSetting.beforeClick=',
311
- funName
312
- )
313
- console.log(
314
- 'gupre-grid---clickHyperLink--gridParams.options[eventCallBack]=',
315
- gridParams.options['eventCallBack']
316
- )
317
- if (
318
- gridParams.options &&
319
- gridParams.options['eventCallBack'] &&
320
- gridParams.options['eventCallBack'][funName] &&
321
- typeof gridParams.options['eventCallBack'][funName] === 'function'
322
- ) {
323
- const param = {
324
- row: row,
325
- column: column,
326
- rowIndex: rowIndex,
327
- listCode,
328
- additionalParamMap: gridParams.additionalParamMap,
329
- }
330
- canClick = gridParams.options['eventCallBack'][funName].call(
331
- this,
332
- param
333
- )
334
- }
335
- }
336
- if (isPromise(canClick)) {
337
- canClick.then((result) => {
338
- this.doClickHyperLink(
339
- row,
340
- listCode,
341
- rowIndex,
342
- jumpPageSetting,
343
- gridParams
344
- )
345
- })
346
- } else {
347
- this.doClickHyperLink(
348
- row,
349
- listCode,
350
- rowIndex,
351
- jumpPageSetting,
352
- gridParams
353
- )
354
- }
355
- }
356
- },
357
- doClickHyperLink(row, listCode, rowIndex, jumpPageSetting, gridParams) {
358
- let parentFormData = null
209
+ parentFormData,
210
+ gridParams.pageContext
211
+ )
212
+ debugger
213
+ if (result.jumpPageSetting) {
214
+ column.formatter.options.format = result.jumpPageSetting
215
+ }
216
+ // console.log('getHyperLinkSetting--resut=', result)
217
+ if (result && result.label && result.label !== '') {
218
+ console.log('label存在')
219
+ } else {
220
+ result.label = this.objectPropValueTwo(row, column)
221
+ }
222
+ if (result && result.title && result.title !== '') {
223
+ console.log('title存在')
224
+ } else {
225
+ result.title = result.label
226
+ }
227
+ hyperLinkResult = result
228
+ } else {
229
+ // 表示显示超链接
230
+ hyperLinkResult.visible = true
231
+ hyperLinkResult.label = this.objectPropValueTwo(row, column)
232
+ hyperLinkResult.title = hyperLinkResult.label
233
+ }
234
+ return hyperLinkResult
235
+ },
236
+ // 点击超链接
237
+ clickHyperLink(column, row, listCode, rowIndex) {
238
+ let jumpPageJson
239
+ if (column && column.formatter && column.formatter.options && column.formatter.options.format) {
240
+ jumpPageJson = column.formatter.options.format
241
+ }
242
+ if (jumpPageJson && jumpPageJson !== '') {
243
+ // 解析是否需要显示该超链接
244
+ let canClick = true
245
+ const gridParams = store.get(listCode)
246
+ const jumpPageSetting = JSON.parse(jumpPageJson)
247
+ console.log('gupre-grid---clickHyperLink--jumpPageSetting=', jumpPageSetting)
248
+ if (jumpPageSetting.beforeClick) {
249
+ const funName = jumpPageSetting.beforeClick
250
+ console.log('gupre-grid---clickHyperLink--jumpPageSetting.beforeClick=', funName)
251
+ console.log(
252
+ 'gupre-grid---clickHyperLink--gridParams.options[eventCallBack]=',
253
+ gridParams.options['eventCallBack']
254
+ )
359
255
  if (
360
- gridParams.options.extraParam &&
361
- gridParams.options.extraParam.entityMap
256
+ gridParams.options &&
257
+ gridParams.options['eventCallBack'] &&
258
+ gridParams.options['eventCallBack'][funName] &&
259
+ typeof gridParams.options['eventCallBack'][funName] === 'function'
362
260
  ) {
363
- parentFormData = gridParams.options.extraParam.entityMap
261
+ const param = {
262
+ row: row,
263
+ column: column,
264
+ rowIndex: rowIndex,
265
+ listCode,
266
+ additionalParamMap: gridParams.additionalParamMap
267
+ }
268
+ canClick = gridParams.options['eventCallBack'][funName].call(this, param)
364
269
  }
365
- console.log(
366
- 'ridParams.options.extraParam.entityMap',
367
- gridParams.options.extraParam
368
- )
369
-
370
- /// 把父页面的pageData传给弹出的页面或新页签
371
- const copyPageData = JSON.parse(JSON.stringify((gridParams.pageContext && gridParams.pageContext.page?gridParams.pageContext.page: {})))
372
- jumpPageSetting._pageData = copyPageData
373
- jumpToPage(
374
- jumpPageSetting,
375
- gridParams.system,
376
- row.id ? row.id : row.ID,
377
- row,
378
- gridParams.additionalParamMap,
379
- null,
380
- null,
381
- parentFormData
382
- ).then((openPageParams) => {
383
- console.log('doClickHyperLink----openPageParams----', openPageParams)
384
- if (openPageParams) {
385
- // 点击列表组件中某元素弹出的页面
386
- if (
387
- jumpPageSetting &&
388
- typeof jumpPageSetting === 'string' &&
389
- jumpPageSetting !== ''
390
- ) {
391
- jumpPageSetting = JSON.parse(jumpPageSetting)
392
- }
393
- Object.assign(openPageParams, jumpPageSetting)
394
- // console.log('clickHyperLink--openPageParams22===', openPageParams, '----jumpPageSetting===', jumpPageSetting)
395
- openPageParams._position = 'list'
396
- openPageParams._listCode = listCode
397
- openPageParams._rowIndex = rowIndex
398
- // 行编辑的记录
399
- openPageParams.row = row
400
- // 通知父页面弹出页面
401
- $emit(this, 'open-page', openPageParams)
402
- }
270
+ }
271
+ if (isPromise(canClick)) {
272
+ canClick.then((result) => {
273
+ this.doClickHyperLink(row, listCode, rowIndex, jumpPageSetting, gridParams)
403
274
  })
404
- },
275
+ } else {
276
+ this.doClickHyperLink(row, listCode, rowIndex, jumpPageSetting, gridParams)
277
+ }
278
+ }
279
+ },
280
+ doClickHyperLink(row, listCode, rowIndex, jumpPageSetting, gridParams) {
281
+ let parentFormData = null
282
+ if (gridParams.options.extraParam && gridParams.options.extraParam.entityMap) {
283
+ parentFormData = gridParams.options.extraParam.entityMap
284
+ }
285
+ console.log('ridParams.options.extraParam.entityMap', gridParams.options.extraParam)
286
+
287
+ /// 把父页面的pageData传给弹出的页面或新页签
288
+ const copyPageData = JSON.parse(
289
+ JSON.stringify(gridParams.pageContext && gridParams.pageContext.page ? gridParams.pageContext.page : {})
290
+ )
291
+ jumpPageSetting._pageData = copyPageData
292
+ jumpToPage(
293
+ jumpPageSetting,
294
+ gridParams.system,
295
+ row.id ? row.id : row.ID,
296
+ row,
297
+ gridParams.additionalParamMap,
298
+ null,
299
+ null,
300
+ parentFormData
301
+ ).then((openPageParams) => {
302
+ console.log('doClickHyperLink----openPageParams----', openPageParams)
303
+ if (openPageParams) {
304
+ // 点击列表组件中某元素弹出的页面
305
+ if (jumpPageSetting && typeof jumpPageSetting === 'string' && jumpPageSetting !== '') {
306
+ jumpPageSetting = JSON.parse(jumpPageSetting)
307
+ }
308
+ Object.assign(openPageParams, jumpPageSetting)
309
+ // console.log('clickHyperLink--openPageParams22===', openPageParams, '----jumpPageSetting===', jumpPageSetting)
310
+ openPageParams._position = 'list'
311
+ openPageParams._listCode = listCode
312
+ openPageParams._rowIndex = rowIndex
313
+ // 行编辑的记录
314
+ openPageParams.row = row
315
+ // 通知父页面弹出页面
316
+ $emit(this, 'open-page', openPageParams)
317
+ }
318
+ })
319
+ },
405
320
  // 图标解析
406
321
  getIconSetting(column, row, isSql, gridParams, listCode) {
407
322
  let tableName
@@ -421,7 +336,16 @@ const customFormatter = {
421
336
  }
422
337
  if (formatJson && formatJson !== '') {
423
338
  // 解析是否需要显示该超链接
424
- const result = initialization(JSON.parse(formatJson), row, isSql, additionalParamerter, contextParameter, tableName, parentFormData, gridParams.pageContext)
339
+ const result = initialization(
340
+ JSON.parse(formatJson),
341
+ row,
342
+ isSql,
343
+ additionalParamerter,
344
+ contextParameter,
345
+ tableName,
346
+ parentFormData,
347
+ gridParams.pageContext
348
+ )
425
349
  // console.log('getHyperLinkSetting--resut=', result)
426
350
  if (result && result.label && result.label !== '') {
427
351
  console.log('label存在')