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.
Files changed (38) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.js +24626 -23708
  3. package/lib/super-ui.umd.cjs +76 -76
  4. package/package.json +2 -2
  5. package/packages/dynamic-source-select/src/dynamic-source-select.vue +3 -0
  6. package/packages/fs-upload-list/src/fs-upload-list.vue +2 -1
  7. package/packages/index.js +5 -2
  8. package/packages/rich-editor/index.vue +1 -1
  9. package/packages/row-form/index.js +7 -0
  10. package/packages/row-form/index.vue +211 -0
  11. package/packages/super-grid/src/apis.js +26 -0
  12. package/packages/super-grid/src/components/grid-icon.vue +7 -14
  13. package/packages/super-grid/src/components/hyperlinks.vue +24 -8
  14. package/packages/super-grid/src/custom-formatter.js +312 -386
  15. package/packages/super-grid/src/dynamic-input.vue +8 -1
  16. package/packages/super-grid/src/normal-column-content.vue +1079 -0
  17. package/packages/super-grid/src/normal-column.vue +41 -752
  18. package/packages/super-grid/src/row-detail.vue +50 -0
  19. package/packages/super-grid/src/search-form-advancedQuery.vue +6 -1
  20. package/packages/super-grid/src/search-form-item.vue +6 -1
  21. package/packages/super-grid/src/super-grid-service.js +41 -1
  22. package/packages/super-grid/src/super-grid.vue +123 -49
  23. package/packages/super-grid/src/utils.js +80 -56
  24. package/src/i18n/langs/cn.js +4 -1
  25. package/src/i18n/langs/en.js +3 -0
  26. package/src/permission.js +7 -1
  27. package/src/store/modules/user.js +4 -1
  28. package/src/styles/theme/dark-blue/button.scss +2 -2
  29. package/src/styles/theme/dark-blue/index.scss +1 -1
  30. package/src/styles/theme/green/button.scss +2 -2
  31. package/src/styles/theme/green/index.scss +1 -1
  32. package/src/styles/theme/ocean-blue/button.scss +2 -2
  33. package/src/styles/theme/ocean-blue/index.scss +1 -1
  34. package/src/utils/jump-page-utils.js +199 -321
  35. package/src/utils/permissionAuth.js +1 -1
  36. package/src/views/layout/components/Menubar/Item.vue +27 -4
  37. package/src/views/layout/components/Menubar/SidebarItem.vue +6 -2
  38. package/src/views/layout/components/Menubar/index.vue +14 -2
@@ -1,10 +1,5 @@
1
1
  import * as Vue from 'vue'
2
- import {
3
- analysisCondition,
4
- analysisValue,
5
- getEntityFieldValue,
6
- setEntityFieldValue,
7
- } from './util'
2
+ import { analysisCondition, analysisValue, getEntityFieldValue, setEntityFieldValue } from './util'
8
3
  import { getSystemFrontendUrl, getUuidv4, isMobileBrowser } from './common-util'
9
4
  // 解析初始化条件,api方法;additionalParamMap是上个页面传过来的附加参数集合
10
5
  export function initialization(
@@ -15,70 +10,110 @@ export function initialization(
15
10
  contextParameter,
16
11
  tableName,
17
12
  parentFormData,
18
- pageContext
13
+ gridParams
19
14
  ) {
20
15
  const result = {}
21
16
  if (jumpPage) {
22
17
  // 页面附加参数
23
18
  result.visible = true
24
19
  let additionalParameterMap = {}
25
- if (
26
- additionalParamerter &&
27
- typeof additionalParamerter === 'string' &&
28
- additionalParamerter !== ''
29
- ) {
20
+ if (additionalParamerter && typeof additionalParamerter === 'string' && additionalParamerter !== '') {
30
21
  additionalParameterMap = JSON.parse(additionalParamerter)
31
- } else if (
32
- additionalParamerter &&
33
- typeof additionalParamerter === 'object'
34
- ) {
22
+ } else if (additionalParamerter && typeof additionalParamerter === 'object') {
35
23
  additionalParameterMap = additionalParamerter
36
24
  }
37
25
  // 环境变量,例如:当前用户id、当前用户登录名等
38
26
  let contextParameterMap = {}
39
- if (
40
- contextParameter &&
41
- typeof contextParameter === 'string' &&
42
- contextParameter !== ''
43
- ) {
27
+ if (contextParameter && typeof contextParameter === 'string' && contextParameter !== '') {
44
28
  contextParameterMap = JSON.parse(contextParameter)
45
29
  } else if (contextParameter && typeof contextParameter === 'object') {
46
30
  contextParameterMap = contextParameter
47
31
  }
48
- if (jumpPage.displayTextJudge) {
49
- // 例如:${obj.menu_code}-#-#${input.---}-#-#${context.currentTransactor}
50
- const label = analysisValue(
51
- jumpPage.displayText,
52
- entity,
53
- additionalParameterMap,
54
- contextParameterMap,
55
- pageContext
56
- )
57
- result.label = label
58
- }
59
- if (jumpPage.icon) {
60
- result.icon = jumpPage.icon
61
- }
62
- if (jumpPage.linkTips) {
63
- result.title = jumpPage.linkTips
64
- }
65
- if (jumpPage.buttonDisplayConditionsList) {
66
- let displayJudgment = ''
67
- if (jumpPage.buttonDisplayConditionsList) {
68
- displayJudgment = JSON.stringify(jumpPage.buttonDisplayConditionsList)
32
+ if (Array.isArray(jumpPage)) {
33
+ for (let i = 0; i < jumpPage.length; i++) {
34
+ let enable = false
35
+ const jumpPageItem = jumpPage[i]
36
+ if (jumpPageItem.jumpConditionType === 'none') {
37
+ enable = true
38
+ } else if (jumpPageItem.jumpConditionType === 'config') {
39
+ if (jumpPageItem.conditions && jumpPageItem.conditions.length > 0) {
40
+ const visible = analysisCondition(
41
+ JSON.stringify(jumpPageItem.conditions),
42
+ entity,
43
+ additionalParameterMap,
44
+ contextParameterMap,
45
+ isSql,
46
+ tableName,
47
+ parentFormData,
48
+ gridParams.pageContext
49
+ )
50
+ enable = visible ? true : false
51
+ } else {
52
+ enable = true
53
+ }
54
+ } else if (jumpPageItem.jumpConditionType === 'customFunc') {
55
+ const param = {
56
+ row: entity,
57
+ additionalParamMap: gridParams.additionalParamMap
58
+ }
59
+ const funcResult = gridParams.options['eventCallBack'][jumpPageItem.customFunc].call(this, param)
60
+ enable = funcResult ? true : false
61
+ }
62
+ if (enable) {
63
+ const jumpPageResult = initialization(
64
+ jumpPageItem.jumpPageSetting,
65
+ entity,
66
+ isSql,
67
+ additionalParamerter,
68
+ contextParameter,
69
+ tableName,
70
+ parentFormData,
71
+ gridParams
72
+ )
73
+ if (jumpPageResult && jumpPageResult.visible) {
74
+ const res = { ...jumpPageResult }
75
+ res.jumpPageSetting = JSON.stringify(jumpPageItem.jumpPageSetting)
76
+ return res
77
+ }
78
+ }
69
79
  }
70
- if (displayJudgment && displayJudgment !== '') {
71
- const visible = analysisCondition(
72
- displayJudgment,
80
+ return { visible: false }
81
+ } else {
82
+ if (jumpPage.displayTextJudge) {
83
+ // 例如:${obj.menu_code}-#-#${input.---}-#-#${context.currentTransactor}
84
+ const label = analysisValue(
85
+ jumpPage.displayText,
73
86
  entity,
74
87
  additionalParameterMap,
75
88
  contextParameterMap,
76
- isSql,
77
- tableName,
78
- parentFormData,
79
- pageContext
89
+ gridParams.pageContext
80
90
  )
81
- result.visible = visible
91
+ result.label = label
92
+ }
93
+ if (jumpPage.icon) {
94
+ result.icon = jumpPage.icon
95
+ }
96
+ if (jumpPage.linkTips) {
97
+ result.title = jumpPage.linkTips
98
+ }
99
+ if (jumpPage.buttonDisplayConditionsList) {
100
+ let displayJudgment = ''
101
+ if (jumpPage.buttonDisplayConditionsList) {
102
+ displayJudgment = JSON.stringify(jumpPage.buttonDisplayConditionsList)
103
+ }
104
+ if (displayJudgment && displayJudgment !== '') {
105
+ const visible = analysisCondition(
106
+ displayJudgment,
107
+ entity,
108
+ additionalParameterMap,
109
+ contextParameterMap,
110
+ isSql,
111
+ tableName,
112
+ parentFormData,
113
+ gridParams.pageContext
114
+ )
115
+ result.visible = visible
116
+ }
82
117
  }
83
118
  }
84
119
  }
@@ -116,53 +151,46 @@ export function openPage(pageSetting) {
116
151
  const additionalParamMap = pageSetting.additionalParamMap
117
152
  const entity = pageSetting.entity
118
153
  const parentFormData = pageSetting.parentFormData
119
- jumpToPage(
120
- jumpPageSetting,
121
- system,
122
- dataId,
123
- entity,
124
- additionalParamMap,
125
- ids,
126
- buttonCode,
127
- parentFormData
128
- ).then((openPageParams) => {
129
- let jumpMode
130
- if (openPageParams) {
131
- jumpMode = openPageParams.jumpMode
132
- }
133
- if (openPageParams) {
134
- const popPageSetting = openPageParams
135
- const path = popPageSetting._path
136
- if (jumpMode === 'popup') {
137
- let jumpPageWidth
138
- let jumpPageHeight
154
+ jumpToPage(jumpPageSetting, system, dataId, entity, additionalParamMap, ids, buttonCode, parentFormData).then(
155
+ (openPageParams) => {
156
+ let jumpMode
157
+ if (openPageParams) {
158
+ jumpMode = openPageParams.jumpMode
159
+ }
160
+ if (openPageParams) {
161
+ const popPageSetting = openPageParams
162
+ const path = popPageSetting._path
163
+ if (jumpMode === 'popup') {
164
+ let jumpPageWidth
165
+ let jumpPageHeight
139
166
 
140
- if (openPageParams.jumpPageWidth) {
141
- jumpPageWidth = openPageParams.jumpPageWidth
142
- } else {
143
- jumpPageWidth = window.innerWidth - 150
144
- }
167
+ if (openPageParams.jumpPageWidth) {
168
+ jumpPageWidth = openPageParams.jumpPageWidth
169
+ } else {
170
+ jumpPageWidth = window.innerWidth - 150
171
+ }
145
172
 
146
- if (openPageParams.jumpPageHeight) {
147
- jumpPageHeight = openPageParams.jumpPageHeight
148
- } else {
149
- jumpPageHeight = window.innerHeight - 150
173
+ if (openPageParams.jumpPageHeight) {
174
+ jumpPageHeight = openPageParams.jumpPageHeight
175
+ } else {
176
+ jumpPageHeight = window.innerHeight - 150
177
+ }
178
+ // 弹出页面
179
+ window.open(
180
+ path,
181
+ '',
182
+ `height=` +
183
+ jumpPageHeight +
184
+ `,width=` +
185
+ jumpPageWidth +
186
+ `,top=100,left=100,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no`
187
+ )
188
+ } else if (jumpMode === 'refresh') {
189
+ window.location.href = path
150
190
  }
151
- // 弹出页面
152
- window.open(
153
- path,
154
- '',
155
- `height=` +
156
- jumpPageHeight +
157
- `,width=` +
158
- jumpPageWidth +
159
- `,top=100,left=100,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no`
160
- )
161
- } else if (jumpMode === 'refresh') {
162
- window.location.href = path
163
191
  }
164
192
  }
165
- })
193
+ )
166
194
  }
167
195
  }
168
196
 
@@ -171,10 +199,7 @@ function isHasIdAdditionalParam(jumpPageAdditional) {
171
199
  if (jumpPageAdditional && jumpPageAdditional.length > 0) {
172
200
  for (let i = 0; i < jumpPageAdditional.length; i++) {
173
201
  const item = jumpPageAdditional[i]
174
- if (
175
- item.paramName &&
176
- (item.paramName === 'id' || item.paramName === 'ID')
177
- ) {
202
+ if (item.paramName && (item.paramName === 'id' || item.paramName === 'ID')) {
178
203
  return true
179
204
  }
180
205
  }
@@ -194,11 +219,7 @@ export function jumpToPage(
194
219
  parentFormData
195
220
  ) {
196
221
  return new Promise((resolve, reject) => {
197
- if (
198
- jumpPageSetting &&
199
- typeof jumpPageSetting === 'string' &&
200
- jumpPageSetting !== ''
201
- ) {
222
+ if (jumpPageSetting && typeof jumpPageSetting === 'string' && jumpPageSetting !== '') {
202
223
  jumpPageSetting = JSON.parse(jumpPageSetting)
203
224
  }
204
225
  if (!jumpPageSetting.jumpPageUrl) {
@@ -206,56 +227,33 @@ export function jumpToPage(
206
227
  }
207
228
  getSystem(system, jumpPageSetting.jumpPageUrl, jumpPageSetting.isNewPage, jumpPageSetting)
208
229
  .then((system) => {
209
- if (
210
- jumpPageSetting.jumpPageAdditional &&
211
- jumpPageSetting.jumpPageAdditional.length > 0
212
- ) {
230
+ if (jumpPageSetting.jumpPageAdditional && jumpPageSetting.jumpPageAdditional.length > 0) {
213
231
  // 发送请求,获取附加参数,并存入缓存
214
232
  const paramPath =
215
- window.$vueApp.config.globalProperties.baseAPI +
216
- '/component/super-pages/parsing-additional-parameters'
233
+ window.$vueApp.config.globalProperties.baseAPI + '/component/super-pages/parsing-additional-parameters'
217
234
  const paramMap = {}
218
- paramMap.jumpPageAdditional = JSON.stringify(
219
- jumpPageSetting.jumpPageAdditional
220
- )
235
+ paramMap.jumpPageAdditional = JSON.stringify(jumpPageSetting.jumpPageAdditional)
236
+ paramMap.jumpPageTitle = jumpPageSetting.jumpPageTitle
221
237
  // 表单页面
222
238
  paramMap.entity = entity
223
239
  paramMap.additionalParamMap = additionalParamMap
224
240
  console.log('paramMap.parentFormData', parentFormData)
225
241
  paramMap.parentFormData = parentFormData
226
- const isHasIdParam = isHasIdAdditionalParam(
227
- jumpPageSetting.jumpPageAdditional
228
- )
242
+ const isHasIdParam = isHasIdAdditionalParam(jumpPageSetting.jumpPageAdditional)
229
243
 
230
- window.$vueApp.config.globalProperties.$http
231
- .post(paramPath, paramMap)
232
- .then((result) => {
233
- // 新页面设计中page信息当作附加参数传达跳转到的页面
234
- getParamMapWithPageData(jumpPageSetting, result)
235
- // 存入缓存
236
- jumpToPageTwo(
237
- jumpPageSetting,
238
- system,
239
- dataId,
240
- ids,
241
- buttonCode,
242
- isHasIdParam
243
- ).then((openPageParams) => {
244
- // openPageParams:xxx弹框打开页面时需要的参数 或 刷新页面时路由查询参数
245
- resolve(openPageParams)
246
- })
244
+ window.$vueApp.config.globalProperties.$http.post(paramPath, paramMap).then((result) => {
245
+ // 新页面设计中page信息当作附加参数传达跳转到的页面
246
+ getParamMapWithPageData(jumpPageSetting, result)
247
+ // 存入缓存
248
+ jumpToPageTwo(jumpPageSetting, system, dataId, ids, buttonCode, isHasIdParam).then((openPageParams) => {
249
+ // openPageParams:xxx弹框打开页面时需要的参数 或 刷新页面时路由查询参数
250
+ resolve(openPageParams)
247
251
  })
252
+ })
248
253
  } else {
249
254
  // 新页面设计中page信息当作附加参数传达跳转到的页面
250
255
  getParamMapWithPageData(jumpPageSetting)
251
- jumpToPageTwo(
252
- jumpPageSetting,
253
- system,
254
- dataId,
255
- ids,
256
- buttonCode,
257
- false
258
- ).then((openPageParams) => {
256
+ jumpToPageTwo(jumpPageSetting, system, dataId, ids, buttonCode, false).then((openPageParams) => {
259
257
  // openPageParams:xxx弹框打开页面时需要的参数 或 刷新页面时路由查询参数
260
258
  resolve(openPageParams)
261
259
  })
@@ -271,32 +269,34 @@ export function jumpToPage(
271
269
  // 新页面设计中page信息当作附加参数传达跳转到的页面
272
270
  function getParamMapWithPageData(jumpPageSetting, paramResult) {
273
271
  let pageData = jumpPageSetting._pageData
274
- if(!pageData){
272
+ if (!pageData) {
275
273
  pageData = {}
276
274
  }
277
275
  if (!paramResult) {
278
276
  paramResult = {}
279
277
  }
280
- if(jumpPageSetting._pageData && Object.keys(jumpPageSetting._pageData).length > 0){
278
+ if (jumpPageSetting._pageData && Object.keys(jumpPageSetting._pageData).length > 0) {
281
279
  // 表示新页面中page数据需要作为跳转页面的附加参数
282
- if(!paramResult.uuid){
280
+ if (!paramResult.uuid) {
283
281
  paramResult.uuid = getUuidv4()
284
282
  }
285
283
  pageData = jumpPageSetting._pageData
286
284
  }
287
- if(!paramResult.paramMap){
285
+ if (!paramResult.paramMap) {
288
286
  paramResult.paramMap = {}
289
287
  }
290
- const paramMap = {...pageData,...paramResult.paramMap}
288
+ const paramMap = { ...pageData, ...paramResult.paramMap }
291
289
  let paramStoreId = ''
292
290
  if (paramResult && paramResult.uuid) {
293
291
  paramStoreId = paramResult.uuid + '_additionalParamMap'
294
- window.sessionStorage.setItem(
295
- paramStoreId,
296
- JSON.stringify(paramMap)
297
- )
292
+ window.sessionStorage.setItem(paramStoreId, JSON.stringify(paramMap))
298
293
  }
299
294
  jumpPageSetting.paramStoreId = paramStoreId
295
+ // 解析标题的值
296
+ if (paramResult && paramResult.jumpPageTitle) {
297
+ // 格式如:${obj.ID}aasdfd${obj.name}
298
+ jumpPageSetting.jumpPageTitle = paramResult.jumpPageTitle
299
+ }
300
300
  }
301
301
 
302
302
  function getSystem(system, jumpPageUrl, isNewPage, jumpPageSetting) {
@@ -304,15 +304,19 @@ function getSystem(system, jumpPageUrl, isNewPage, jumpPageSetting) {
304
304
  if (isFullPath(jumpPageUrl)) {
305
305
  resolve(null)
306
306
  } else {
307
- if ((!system || system === null) || (jumpPageSetting.jumpSystemCode && jumpPageSetting.jumpSystemCode !== system.code)) {
307
+ if (
308
+ !system ||
309
+ system === null ||
310
+ (jumpPageSetting.jumpSystemCode && jumpPageSetting.jumpSystemCode !== system.code)
311
+ ) {
308
312
  if (jumpPageUrl.indexOf('page:') === 0) {
309
- const pageCode = jumpPageUrl.substring(
310
- jumpPageUrl.indexOf('page:') + 'page:'.length
311
- )
313
+ const pageCode = jumpPageUrl.substring(jumpPageUrl.indexOf('page:') + 'page:'.length)
312
314
  const path =
313
315
  window.$vueApp.config.globalProperties.baseAPI +
314
316
  '/component/business-systems/with-page-codes/' +
315
- pageCode+'?isNewPage='+isNewPage
317
+ pageCode +
318
+ '?isNewPage=' +
319
+ isNewPage
316
320
  window.$vueApp.config.globalProperties.$http
317
321
  .get(path)
318
322
  .then((data) => {
@@ -327,10 +331,7 @@ function getSystem(system, jumpPageUrl, isNewPage, jumpPageSetting) {
327
331
  if (!systemCode) {
328
332
  systemCode = window.$vueApp.config.globalProperties.systemCode
329
333
  }
330
- const path =
331
- window.$vueApp.config.globalProperties.baseAPI +
332
- '/component/business-systems/' +
333
- systemCode
334
+ const path = window.$vueApp.config.globalProperties.baseAPI + '/component/business-systems/' + systemCode
334
335
  window.$vueApp.config.globalProperties.$http
335
336
  .get(path)
336
337
  .then((data) => {
@@ -352,14 +353,7 @@ function isFullPath(path) {
352
353
  return path.indexOf('http:') === 0 || path.indexOf('https:') === 0
353
354
  }
354
355
  // 正式跳转
355
- function jumpToPageTwo(
356
- jumpPageSetting,
357
- system,
358
- dataId,
359
- ids,
360
- buttonCode,
361
- isHasIdParam
362
- ) {
356
+ function jumpToPageTwo(jumpPageSetting, system, dataId, ids, buttonCode, isHasIdParam) {
363
357
  return new Promise((resolve, reject) => {
364
358
  const jumpPageUrl = jumpPageSetting.jumpPageUrl
365
359
  if (!jumpPageUrl) {
@@ -368,29 +362,18 @@ function jumpToPageTwo(
368
362
  const isMobile = isMobileBrowser()
369
363
  if (jumpPageUrl.indexOf('page:') === 0) {
370
364
  // 表示是自定义系统跳转页面编码
371
- jumpWithSuperPage(
372
- jumpPageUrl,
373
- system,
374
- dataId,
375
- jumpPageSetting,
376
- ids,
377
- buttonCode,
378
- isHasIdParam,
379
- isMobile
380
- ).then((openPageParams) => {
381
- resolve(openPageParams)
382
- })
383
- } else {
384
- const additionalParameterStr = analysisAdditionalParameter(
385
- jumpPageSetting.paramStoreId
365
+ jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, buttonCode, isHasIdParam, isMobile).then(
366
+ (openPageParams) => {
367
+ resolve(openPageParams)
368
+ }
386
369
  )
370
+ } else {
371
+ const additionalParameterStr = analysisAdditionalParameter(jumpPageSetting.paramStoreId)
387
372
  // 表示是路径,格式如:http://www.baidu.com 或 http://localhost:9600/demo/#/demo/plan/list 或 /demo/plan/list
388
373
  let path = jumpPageUrl
389
374
  if (jumpPageUrl.indexOf('path:') >= 0) {
390
375
  // 兼容历史数据
391
- path = jumpPageUrl.substring(
392
- jumpPageUrl.indexOf('path:') + 'path:'.length
393
- )
376
+ path = jumpPageUrl.substring(jumpPageUrl.indexOf('path:') + 'path:'.length)
394
377
  }
395
378
  if (isFullPath(path)) {
396
379
  // 表示是全路径,例如:http://www.baidu.com 或 http://localhost:9600/demo/#/demo/plan/list
@@ -412,7 +395,7 @@ function jumpToPageTwo(
412
395
  systemName,
413
396
  isMobile
414
397
  )
415
- if(fullPath){
398
+ if (fullPath) {
416
399
  // 移动端时返回的全路径
417
400
  jumpPageSetting._path = fullPath
418
401
  }
@@ -438,14 +421,7 @@ function jumpToPageWithFullPath(
438
421
  systemName,
439
422
  isMobile
440
423
  ) {
441
- path = packagePathParams(
442
- dataId,
443
- path,
444
- jumpPage,
445
- ids,
446
- buttonCode,
447
- isHasIdParam
448
- )
424
+ path = packagePathParams(dataId, path, jumpPage, ids, buttonCode, isHasIdParam)
449
425
  // 保持这种情况参数传递,是为了解决不同域时获得不到window.sessionStorage中存的附加参数问题
450
426
  if (additionalParameterStr && additionalParameterStr !== '') {
451
427
  let systemNameParam = ''
@@ -460,7 +436,7 @@ function jumpToPageWithFullPath(
460
436
  path += additionalParameterStr + systemNameParam
461
437
  }
462
438
  }
463
- if(isMobile){
439
+ if (isMobile) {
464
440
  // 如果是移动端返回全路径即可
465
441
  return path
466
442
  }
@@ -504,19 +480,8 @@ function jumpToPageWithFullPath(
504
480
  }
505
481
 
506
482
  // path封装参数
507
- function packagePathParams(
508
- dataId,
509
- path,
510
- jumpPage,
511
- ids,
512
- buttonCode,
513
- isHasIdParam
514
- ) {
515
- if (
516
- jumpPage.isNeedId === undefined ||
517
- jumpPage.isNeedId === null ||
518
- jumpPage.isNeedId === true
519
- ) {
483
+ function packagePathParams(dataId, path, jumpPage, ids, buttonCode, isHasIdParam) {
484
+ if (jumpPage.isNeedId === undefined || jumpPage.isNeedId === null || jumpPage.isNeedId === true) {
520
485
  if (!isHasIdParam && dataId) {
521
486
  // 表示是修改或查看页面,封装id参数
522
487
  let paramSeparator = '?'
@@ -556,9 +521,7 @@ function packagePathParams(
556
521
  path += '?buttonCode=' + buttonCode
557
522
  }
558
523
  }
559
- if (
560
- jumpPage.isNewPage!==undefined && jumpPage.isNewPage === true
561
- ) {
524
+ if (jumpPage.isNewPage !== undefined && jumpPage.isNewPage === true) {
562
525
  let paramSeparator = ''
563
526
  if (path.indexOf('?') !== -1) {
564
527
  paramSeparator = '&'
@@ -566,107 +529,59 @@ function packagePathParams(
566
529
  paramSeparator = '?'
567
530
  }
568
531
  path = path + paramSeparator + 'isNewPage=true'
569
- }
532
+ }
570
533
  return path
571
534
  }
572
535
 
573
536
  function getPageCode(jumpPageUrl) {
574
537
  let pageCode
575
538
  if (jumpPageUrl && jumpPageUrl.indexOf('page:') !== -1) {
576
- pageCode = jumpPageUrl.substring(
577
- jumpPageUrl.indexOf('page:') + 'page:'.length
578
- )
539
+ pageCode = jumpPageUrl.substring(jumpPageUrl.indexOf('page:') + 'page:'.length)
579
540
  }
580
541
  return pageCode
581
542
  }
582
543
  // 使用页面组件内部调整
583
- function jumpWithSuperPage(
584
- jumpPageUrl,
585
- system,
586
- dataId,
587
- jumpPageSetting,
588
- ids,
589
- buttonCode,
590
- isHasIdParam,
591
- isMobile
592
- ) {
544
+ function jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, buttonCode, isHasIdParam, isMobile) {
593
545
  return new Promise((resolve, reject) => {
594
546
  // 表示是自定义系统跳转页面编码
595
- console.log(
596
- '----jumpWithSuperPage---',
597
- jumpPageUrl,
598
- system,
599
- dataId,
600
- jumpPageSetting
601
- )
547
+ console.log('----jumpWithSuperPage---', jumpPageUrl, system, dataId, jumpPageSetting)
602
548
  const pageCode = getPageCode(jumpPageUrl)
603
549
  let jumpMode = 'refresh'
604
550
  if (jumpPageSetting && jumpPageSetting.jumpPageOpenMode) {
605
- jumpMode = jumpPageSetting.jumpPageOpenMode
551
+ jumpMode = jumpPageSetting.jumpPageOpenMode
606
552
  }
607
553
  const jumpJsonData = {
608
- jumpMode: jumpMode,
554
+ jumpMode: jumpMode
609
555
  }
610
- window.sessionStorage.setItem(
611
- pageCode + '-jumpMode',
612
- JSON.stringify(jumpJsonData)
613
- )
556
+ window.sessionStorage.setItem(pageCode + '-jumpMode', JSON.stringify(jumpJsonData))
614
557
  if (jumpMode === 'popup') {
615
- const path = packageOpenUrl(
616
- system,
617
- pageCode,
618
- dataId,
619
- jumpPageSetting,
620
- jumpMode,
621
- ids,
622
- buttonCode,
623
- isHasIdParam
624
- )
558
+ const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam)
625
559
  // 页面布局中的按钮打开
626
- const popPageSetting = openDialogWhenPopup(
627
- jumpPageSetting,
628
- system,
629
- pageCode,
630
- dataId,
631
- jumpMode,
632
- ids,
633
- buttonCode
634
- )
560
+ const popPageSetting = openDialogWhenPopup(jumpPageSetting, system, pageCode, dataId, jumpMode, ids, buttonCode)
635
561
  if (
636
- popPageSetting && (jumpPageSetting.isRefreshWhenClosePopup!==undefined && jumpPageSetting.isRefreshWhenClosePopup!==null)
562
+ popPageSetting &&
563
+ jumpPageSetting.isRefreshWhenClosePopup !== undefined &&
564
+ jumpPageSetting.isRefreshWhenClosePopup !== null
637
565
  ) {
638
566
  popPageSetting.isRefreshWhenClosePopup = jumpPageSetting.isRefreshWhenClosePopup
639
- }
567
+ }
640
568
  popPageSetting._path = path
641
569
  popPageSetting.customSystem = system.code
642
570
  resolve(popPageSetting)
643
571
  } else if (jumpMode === 'newTab') {
644
572
  // 新页签打开
645
573
  const path =
646
- packageOpenUrl(
647
- system,
648
- pageCode,
649
- dataId,
650
- jumpPageSetting,
651
- jumpMode,
652
- ids,
653
- buttonCode,
654
- isHasIdParam
655
- ) +
574
+ packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam) +
656
575
  '&_t_=' +
657
576
  new Date().getTime()
658
- const popPageSetting = {
659
- _path: path,
660
- pageCode: pageCode,
661
- customSystem: system.code,
662
- jumpMode: jumpMode
663
- }
664
- console.log(
665
- '----jumpWithSuperPage---',
666
- isMobile,
667
- popPageSetting
668
- )
669
- if(!isMobile){
577
+ const popPageSetting = {
578
+ _path: path,
579
+ pageCode: pageCode,
580
+ customSystem: system.code,
581
+ jumpMode: jumpMode
582
+ }
583
+ console.log('----jumpWithSuperPage---', isMobile, popPageSetting)
584
+ if (!isMobile) {
670
585
  // 不是移动端时直接open打开pc新页签
671
586
  window.open(path)
672
587
  }
@@ -694,16 +609,7 @@ function jumpWithSuperPage(
694
609
  if (paramStoreId && paramStoreId !== '') {
695
610
  queryParam['paramStoreId'] = paramStoreId
696
611
  }
697
- const path = packageOpenUrl(
698
- system,
699
- pageCode,
700
- dataId,
701
- jumpPageSetting,
702
- jumpMode,
703
- ids,
704
- buttonCode,
705
- isHasIdParam
706
- )
612
+ const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam)
707
613
  queryParam._path = path
708
614
  resolve(queryParam)
709
615
  }
@@ -719,15 +625,7 @@ function jumpWithSuperPage(
719
625
  * @param {*} ids
720
626
  * @param {*} buttonCode
721
627
  */
722
- function openDialogWhenPopup(
723
- jumpPageSetting,
724
- system,
725
- pageCode,
726
- dataId,
727
- jumpMode,
728
- ids,
729
- buttonCode
730
- ) {
628
+ function openDialogWhenPopup(jumpPageSetting, system, pageCode, dataId, jumpMode, ids, buttonCode) {
731
629
  const popPageSetting = {}
732
630
  if (jumpPageSetting) {
733
631
  popPageSetting.jumpPageTitle = jumpPageSetting.jumpPageTitle
@@ -736,8 +634,7 @@ function openDialogWhenPopup(
736
634
  popPageSetting.valueMappings = jumpPageSetting.valueMappings
737
635
  popPageSetting.updateValueEvent = jumpPageSetting.updateValueEvent
738
636
  popPageSetting.closeEvent = jumpPageSetting.closeEvent
739
- popPageSetting.isRefreshWhenClosePopup =
740
- jumpPageSetting.isRefreshWhenClosePopup
637
+ popPageSetting.isRefreshWhenClosePopup = jumpPageSetting.isRefreshWhenClosePopup
741
638
  }
742
639
  // 是否是自定义系统
743
640
  let isDsc = false
@@ -766,16 +663,7 @@ function openDialogWhenPopup(
766
663
  return popPageSetting
767
664
  }
768
665
 
769
- function packageOpenUrl(
770
- system,
771
- pageCode,
772
- dataId,
773
- jumpPageSetting,
774
- jumpMode,
775
- ids,
776
- buttonCode,
777
- isHasIdParam
778
- ) {
666
+ function packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam) {
779
667
  const frontendUrl = getSystemFrontendUrl(system.frontendUrl)
780
668
  let path =
781
669
  frontendUrl +
@@ -789,14 +677,7 @@ function packageOpenUrl(
789
677
  if (systemName) {
790
678
  path += '&_systemName_=' + encodeURI(systemName)
791
679
  }
792
- return packagePathParams(
793
- dataId,
794
- path,
795
- jumpPageSetting,
796
- ids,
797
- buttonCode,
798
- isHasIdParam
799
- )
680
+ return packagePathParams(dataId, path, jumpPageSetting, ids, buttonCode, isHasIdParam)
800
681
  }
801
682
 
802
683
  function getSystemNameWithLanguage(system) {
@@ -825,10 +706,7 @@ function analysisAdditionalParameterWithMap(additionalParamMap) {
825
706
  if (additionalParamMap) {
826
707
  const additionalParameterMap = JSON.parse(additionalParamMap)
827
708
  const keys = Object.keys(additionalParameterMap)
828
- console.log(
829
- 'analysisAdditionalParameterWithMap--Object.keys(additionalParameterMap)=',
830
- keys
831
- )
709
+ console.log('analysisAdditionalParameterWithMap--Object.keys(additionalParameterMap)=', keys)
832
710
  for (let i = 0; i < keys.length; i++) {
833
711
  if (additionalParameterStr !== '') {
834
712
  additionalParameterStr += '&'