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.
Files changed (120) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.js +115880 -110424
  3. package/lib/super-ui.umd.cjs +103 -95
  4. package/package.json +6 -3
  5. package/packages/department-tree/src/department-tree.vue +27 -10
  6. package/packages/department-tree-inline/src/department-tree-service.js +20 -41
  7. package/packages/department-tree-mobile/src/department-tree-app.vue +6 -6
  8. package/packages/department-tree-mobile/src/department-tree-inline-app.vue +15 -15
  9. package/packages/department-user-tree/src/department-user-tree.vue +17 -2
  10. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +61 -26
  11. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +64 -22
  12. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -6
  13. package/packages/department-user-tree-inline/src/group-user/group-input.vue +162 -0
  14. package/packages/department-user-tree-inline/src/group-user/group-list.vue +99 -0
  15. package/packages/department-user-tree-inline/src/group-user/group-user.vue +42 -0
  16. package/packages/department-user-tree-inline/src/group-user-multiple-tree.vue +304 -0
  17. package/packages/department-user-tree-inline/src/group-user-single-tree.vue +155 -0
  18. package/packages/department-user-tree-inline/src/group-user-tree-service.js +74 -0
  19. package/packages/department-user-tree-inline/src/search-result.vue +34 -36
  20. package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +6 -6
  21. package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +17 -19
  22. package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +0 -11
  23. package/packages/dynamic-source-select/src/dynamic-source-select.vue +795 -799
  24. package/packages/dynamic-source-select/src/events.js +11 -16
  25. package/packages/fs-upload-list/src/fs-upload-list.vue +183 -122
  26. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +246 -0
  27. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +480 -0
  28. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +127 -0
  29. package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +246 -0
  30. package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +255 -0
  31. package/packages/fs-upload-new/src/fs-button-upload.vue +10 -13
  32. package/packages/fs-upload-new/src/fs-drag-upload.vue +4 -8
  33. package/packages/fs-upload-new/src/fs-preview-new.vue +103 -36
  34. package/packages/fs-upload-new/src/fs-upload-new.vue +160 -13
  35. package/packages/index.js +11 -2
  36. package/packages/organization-input/src/organization-input.vue +493 -539
  37. package/packages/plugins/export-data-new.js +34 -1
  38. package/packages/rich-editor/index.vue +29 -0
  39. package/packages/row-form/index.js +7 -0
  40. package/packages/row-form/index.vue +211 -0
  41. package/packages/scan-code-input/src/scan-code-input.vue +136 -104
  42. package/packages/scan-code-input-browser/index.js +6 -0
  43. package/packages/{scan-code-input/src/scan-code-input-colse.vue → scan-code-input-browser/src/scan-code-input.vue} +1 -28
  44. package/packages/secret-info/index.vue +2 -2
  45. package/packages/super-grid/src/apis.js +158 -10
  46. package/packages/super-grid/src/components/grid-icon.vue +7 -14
  47. package/packages/super-grid/src/components/hyperlinks.vue +24 -8
  48. package/packages/super-grid/src/custom-formatter.js +312 -380
  49. package/packages/super-grid/src/dynamic-input.vue +346 -43
  50. package/packages/super-grid/src/formValidatorUtil.js +79 -15
  51. package/packages/super-grid/src/group-column.vue +5 -0
  52. package/packages/super-grid/src/normal-column-content.vue +1056 -0
  53. package/packages/super-grid/src/normal-column.vue +57 -740
  54. package/packages/super-grid/src/row-detail.vue +50 -0
  55. package/packages/super-grid/src/row-operation.vue +19 -10
  56. package/packages/super-grid/src/scan-util.ts +243 -0
  57. package/packages/super-grid/src/search-button.vue +18 -14
  58. package/packages/super-grid/src/search-form-advancedQuery.vue +9 -2
  59. package/packages/super-grid/src/search-form-item.vue +10 -3
  60. package/packages/super-grid/src/search-form-mobile.vue +250 -0
  61. package/packages/super-grid/src/search-form.vue +159 -82
  62. package/packages/super-grid/src/super-grid-service.js +51 -6
  63. package/packages/super-grid/src/super-grid.vue +657 -761
  64. package/packages/super-grid/src/utils.js +126 -170
  65. package/packages/super-nine-grid/src/super-nine-grid.vue +1032 -1141
  66. package/packages/workflow-button/src/workflow-button.vue +6 -1
  67. package/packages/workgroup-tree/src/workgroup-tree.vue +31 -0
  68. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +28 -0
  69. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +26 -0
  70. package/packages/workgroup-tree-mobile/index.js +6 -0
  71. package/packages/workgroup-tree-mobile/src/dept-result.vue +51 -0
  72. package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +120 -0
  73. package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +375 -0
  74. package/packages/workgroup-tree-mobile/src/workgroup-tree-service.ts +62 -0
  75. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +15 -0
  76. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +27 -0
  77. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +11 -0
  78. package/packages/workgroup-user-tree-mobile/index.js +6 -0
  79. package/packages/workgroup-user-tree-mobile/src/dept-path.vue +36 -0
  80. package/packages/workgroup-user-tree-mobile/src/dept-result.vue +58 -0
  81. package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue +119 -0
  82. package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +394 -0
  83. package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-service.ts +41 -0
  84. package/src/api/sso-service.js +44 -15
  85. package/src/directives/permission/permission.js +4 -3
  86. package/src/i18n/langs/cn.js +19 -3
  87. package/src/i18n/langs/en.js +18 -2
  88. package/src/permission.js +114 -122
  89. package/src/store/modules/user.js +32 -33
  90. package/src/styles/index.scss +1 -0
  91. package/src/styles/table.scss +12 -0
  92. package/src/styles/theme/dark-blue/button.scss +2 -2
  93. package/src/styles/theme/dark-blue/index.scss +1 -1
  94. package/src/styles/theme/dark-blue/sidebar.scss +10 -0
  95. package/src/styles/theme/dark-blue/table.scss +8 -52
  96. package/src/styles/theme/green/button.scss +2 -2
  97. package/src/styles/theme/green/green.scss +1 -1
  98. package/src/styles/theme/green/index.scss +1 -1
  99. package/src/styles/theme/green/sidebar.scss +20 -0
  100. package/src/styles/theme/green/table.scss +7 -51
  101. package/src/styles/theme/ocean-blue/button.scss +2 -2
  102. package/src/styles/theme/ocean-blue/index.scss +1 -1
  103. package/src/styles/theme/ocean-blue/ocean-blue.scss +1 -1
  104. package/src/styles/theme/ocean-blue/sidebar.scss +10 -0
  105. package/src/styles/theme/ocean-blue/table.scss +7 -52
  106. package/src/utils/auth.js +23 -3
  107. package/src/utils/calculator/calculator-factory.js +4 -4
  108. package/src/utils/calculator/calculator-util.js +14 -0
  109. package/src/utils/common-util.js +270 -124
  110. package/src/utils/i18n-util.js +145 -0
  111. package/src/utils/jump-page-utils.js +245 -314
  112. package/src/utils/permission.js +7 -1
  113. package/src/utils/permissionAuth.js +155 -37
  114. package/src/utils/request.js +10 -11
  115. package/src/utils/util.js +154 -205
  116. package/src/views/layout/EmptyLayout.vue +1 -1
  117. package/src/views/layout/components/Menubar/Item.vue +27 -4
  118. package/src/views/layout/components/Menubar/SidebarItem.vue +7 -3
  119. package/src/views/layout/components/Menubar/index.vue +14 -2
  120. package/src/views/layout/tab-content-index.vue +1 -1
@@ -1,11 +1,6 @@
1
1
  import * as Vue from 'vue'
2
- import {
3
- analysisCondition,
4
- analysisValue,
5
- getEntityFieldValue,
6
- setEntityFieldValue,
7
- } from './util'
8
- import { getSystemFrontendUrl } from './common-util'
2
+ import { analysisCondition, analysisValue, getEntityFieldValue, setEntityFieldValue } from './util'
3
+ import { getSystemFrontendUrl, getUuidv4, isMobileBrowser } from './common-util'
9
4
  // 解析初始化条件,api方法;additionalParamMap是上个页面传过来的附加参数集合
10
5
  export function initialization(
11
6
  jumpPage,
@@ -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,61 +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
- let paramStoreId = ''
234
- if (result && result.uuid) {
235
- paramStoreId = result.uuid + '_additionalParamMap'
236
- window.sessionStorage.setItem(
237
- paramStoreId,
238
- JSON.stringify(result.paramMap)
239
- )
240
- }
241
- jumpPageSetting.paramStoreId = paramStoreId
242
- // 存入缓存
243
- jumpToPageTwo(
244
- jumpPageSetting,
245
- system,
246
- dataId,
247
- ids,
248
- buttonCode,
249
- isHasIdParam
250
- ).then((openPageParams) => {
251
- // openPageParams:xxx弹框打开页面时需要的参数 或 刷新页面时路由查询参数
252
- resolve(openPageParams)
253
- })
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)
254
251
  })
252
+ })
255
253
  } else {
256
- jumpToPageTwo(
257
- jumpPageSetting,
258
- system,
259
- dataId,
260
- ids,
261
- buttonCode,
262
- false
263
- ).then((openPageParams) => {
254
+ // 新页面设计中page信息当作附加参数传达跳转到的页面
255
+ getParamMapWithPageData(jumpPageSetting)
256
+ jumpToPageTwo(jumpPageSetting, system, dataId, ids, buttonCode, false).then((openPageParams) => {
264
257
  // openPageParams:xxx弹框打开页面时需要的参数 或 刷新页面时路由查询参数
265
258
  resolve(openPageParams)
266
259
  })
@@ -273,20 +266,57 @@ export function jumpToPage(
273
266
  })
274
267
  }
275
268
 
269
+ // 新页面设计中page信息当作附加参数传达跳转到的页面
270
+ function getParamMapWithPageData(jumpPageSetting, paramResult) {
271
+ let pageData = jumpPageSetting._pageData
272
+ if (!pageData) {
273
+ pageData = {}
274
+ }
275
+ if (!paramResult) {
276
+ paramResult = {}
277
+ }
278
+ if (jumpPageSetting._pageData && Object.keys(jumpPageSetting._pageData).length > 0) {
279
+ // 表示新页面中page数据需要作为跳转页面的附加参数
280
+ if (!paramResult.uuid) {
281
+ paramResult.uuid = getUuidv4()
282
+ }
283
+ pageData = jumpPageSetting._pageData
284
+ }
285
+ if (!paramResult.paramMap) {
286
+ paramResult.paramMap = {}
287
+ }
288
+ const paramMap = { ...pageData, ...paramResult.paramMap }
289
+ let paramStoreId = ''
290
+ if (paramResult && paramResult.uuid) {
291
+ paramStoreId = paramResult.uuid + '_additionalParamMap'
292
+ window.sessionStorage.setItem(paramStoreId, JSON.stringify(paramMap))
293
+ }
294
+ jumpPageSetting.paramStoreId = paramStoreId
295
+ // 解析标题的值
296
+ if (paramResult && paramResult.jumpPageTitle) {
297
+ // 格式如:${obj.ID}aasdfd${obj.name}
298
+ jumpPageSetting.jumpPageTitle = paramResult.jumpPageTitle
299
+ }
300
+ }
301
+
276
302
  function getSystem(system, jumpPageUrl, isNewPage, jumpPageSetting) {
277
303
  return new Promise((resolve, reject) => {
278
304
  if (isFullPath(jumpPageUrl)) {
279
305
  resolve(null)
280
306
  } else {
281
- 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
+ ) {
282
312
  if (jumpPageUrl.indexOf('page:') === 0) {
283
- const pageCode = jumpPageUrl.substring(
284
- jumpPageUrl.indexOf('page:') + 'page:'.length
285
- )
313
+ const pageCode = jumpPageUrl.substring(jumpPageUrl.indexOf('page:') + 'page:'.length)
286
314
  const path =
287
315
  window.$vueApp.config.globalProperties.baseAPI +
288
316
  '/component/business-systems/with-page-codes/' +
289
- pageCode+'?isNewPage='+isNewPage
317
+ pageCode +
318
+ '?isNewPage=' +
319
+ isNewPage
290
320
  window.$vueApp.config.globalProperties.$http
291
321
  .get(path)
292
322
  .then((data) => {
@@ -301,10 +331,7 @@ function getSystem(system, jumpPageUrl, isNewPage, jumpPageSetting) {
301
331
  if (!systemCode) {
302
332
  systemCode = window.$vueApp.config.globalProperties.systemCode
303
333
  }
304
- const path =
305
- window.$vueApp.config.globalProperties.baseAPI +
306
- '/component/business-systems/' +
307
- systemCode
334
+ const path = window.$vueApp.config.globalProperties.baseAPI + '/component/business-systems/' + systemCode
308
335
  window.$vueApp.config.globalProperties.$http
309
336
  .get(path)
310
337
  .then((data) => {
@@ -326,43 +353,27 @@ function isFullPath(path) {
326
353
  return path.indexOf('http:') === 0 || path.indexOf('https:') === 0
327
354
  }
328
355
  // 正式跳转
329
- function jumpToPageTwo(
330
- jumpPageSetting,
331
- system,
332
- dataId,
333
- ids,
334
- buttonCode,
335
- isHasIdParam
336
- ) {
356
+ function jumpToPageTwo(jumpPageSetting, system, dataId, ids, buttonCode, isHasIdParam) {
337
357
  return new Promise((resolve, reject) => {
338
358
  const jumpPageUrl = jumpPageSetting.jumpPageUrl
339
359
  if (!jumpPageUrl) {
340
360
  return
341
361
  }
362
+ const isMobile = isMobileBrowser()
342
363
  if (jumpPageUrl.indexOf('page:') === 0) {
343
364
  // 表示是自定义系统跳转页面编码
344
- jumpWithSuperPage(
345
- jumpPageUrl,
346
- system,
347
- dataId,
348
- jumpPageSetting,
349
- ids,
350
- buttonCode,
351
- isHasIdParam
352
- ).then((openPageParams) => {
353
- resolve(openPageParams)
354
- })
355
- } else {
356
- const additionalParameterStr = analysisAdditionalParameter(
357
- jumpPageSetting.paramStoreId
365
+ jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, buttonCode, isHasIdParam, isMobile).then(
366
+ (openPageParams) => {
367
+ resolve(openPageParams)
368
+ }
358
369
  )
370
+ } else {
371
+ const additionalParameterStr = analysisAdditionalParameter(jumpPageSetting.paramStoreId)
359
372
  // 表示是路径,格式如:http://www.baidu.com 或 http://localhost:9600/demo/#/demo/plan/list 或 /demo/plan/list
360
373
  let path = jumpPageUrl
361
374
  if (jumpPageUrl.indexOf('path:') >= 0) {
362
375
  // 兼容历史数据
363
- path = jumpPageUrl.substring(
364
- jumpPageUrl.indexOf('path:') + 'path:'.length
365
- )
376
+ path = jumpPageUrl.substring(jumpPageUrl.indexOf('path:') + 'path:'.length)
366
377
  }
367
378
  if (isFullPath(path)) {
368
379
  // 表示是全路径,例如:http://www.baidu.com 或 http://localhost:9600/demo/#/demo/plan/list
@@ -372,7 +383,8 @@ function jumpToPageTwo(
372
383
  path = frontendUrl + '/#' + path
373
384
  }
374
385
  const systemName = getSystemNameWithLanguage(system)
375
- jumpToPageWithFullPath(
386
+ // 移动端时会有返回值
387
+ const fullPath = jumpToPageWithFullPath(
376
388
  dataId,
377
389
  path,
378
390
  additionalParameterStr,
@@ -380,9 +392,14 @@ function jumpToPageTwo(
380
392
  ids,
381
393
  buttonCode,
382
394
  isHasIdParam,
383
- systemName
395
+ systemName,
396
+ isMobile
384
397
  )
385
- resolve()
398
+ if (fullPath) {
399
+ // 移动端时返回的全路径
400
+ jumpPageSetting._path = fullPath
401
+ }
402
+ resolve(jumpPageSetting)
386
403
  }
387
404
  })
388
405
  }
@@ -401,16 +418,10 @@ function jumpToPageWithFullPath(
401
418
  ids,
402
419
  buttonCode,
403
420
  isHasIdParam,
404
- systemName
421
+ systemName,
422
+ isMobile
405
423
  ) {
406
- path = packagePathParams(
407
- dataId,
408
- path,
409
- jumpPage,
410
- ids,
411
- buttonCode,
412
- isHasIdParam
413
- )
424
+ path = packagePathParams(dataId, path, jumpPage, ids, buttonCode, isHasIdParam)
414
425
  // 保持这种情况参数传递,是为了解决不同域时获得不到window.sessionStorage中存的附加参数问题
415
426
  if (additionalParameterStr && additionalParameterStr !== '') {
416
427
  let systemNameParam = ''
@@ -425,6 +436,10 @@ function jumpToPageWithFullPath(
425
436
  path += additionalParameterStr + systemNameParam
426
437
  }
427
438
  }
439
+ if (isMobile) {
440
+ // 如果是移动端返回全路径即可
441
+ return path
442
+ }
428
443
  let jumpMode = 'refresh'
429
444
  if (jumpPage) {
430
445
  if (jumpPage.jumpPageOpenMode) {
@@ -465,19 +480,8 @@ function jumpToPageWithFullPath(
465
480
  }
466
481
 
467
482
  // path封装参数
468
- function packagePathParams(
469
- dataId,
470
- path,
471
- jumpPage,
472
- ids,
473
- buttonCode,
474
- isHasIdParam
475
- ) {
476
- if (
477
- jumpPage.isNeedId === undefined ||
478
- jumpPage.isNeedId === null ||
479
- jumpPage.isNeedId === true
480
- ) {
483
+ function packagePathParams(dataId, path, jumpPage, ids, buttonCode, isHasIdParam) {
484
+ if (jumpPage.isNeedId === undefined || jumpPage.isNeedId === null || jumpPage.isNeedId === true) {
481
485
  if (!isHasIdParam && dataId) {
482
486
  // 表示是修改或查看页面,封装id参数
483
487
  let paramSeparator = '?'
@@ -517,9 +521,7 @@ function packagePathParams(
517
521
  path += '?buttonCode=' + buttonCode
518
522
  }
519
523
  }
520
- if (
521
- jumpPage.isNewPage!==undefined && jumpPage.isNewPage === true
522
- ) {
524
+ if (jumpPage.isNewPage !== undefined && jumpPage.isNewPage === true) {
523
525
  let paramSeparator = ''
524
526
  if (path.indexOf('?') !== -1) {
525
527
  paramSeparator = '&'
@@ -527,97 +529,63 @@ function packagePathParams(
527
529
  paramSeparator = '?'
528
530
  }
529
531
  path = path + paramSeparator + 'isNewPage=true'
530
- }
532
+ }
531
533
  return path
532
534
  }
533
535
 
534
536
  function getPageCode(jumpPageUrl) {
535
537
  let pageCode
536
538
  if (jumpPageUrl && jumpPageUrl.indexOf('page:') !== -1) {
537
- pageCode = jumpPageUrl.substring(
538
- jumpPageUrl.indexOf('page:') + 'page:'.length
539
- )
539
+ pageCode = jumpPageUrl.substring(jumpPageUrl.indexOf('page:') + 'page:'.length)
540
540
  }
541
541
  return pageCode
542
542
  }
543
543
  // 使用页面组件内部调整
544
- function jumpWithSuperPage(
545
- jumpPageUrl,
546
- system,
547
- dataId,
548
- jumpPageSetting,
549
- ids,
550
- buttonCode,
551
- isHasIdParam
552
- ) {
544
+ function jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, buttonCode, isHasIdParam, isMobile) {
553
545
  return new Promise((resolve, reject) => {
554
546
  // 表示是自定义系统跳转页面编码
555
- console.log(
556
- '----jumpWithSuperPage---',
557
- jumpPageUrl,
558
- system,
559
- dataId,
560
- jumpPageSetting
561
- )
547
+ console.log('----jumpWithSuperPage---', jumpPageUrl, system, dataId, jumpPageSetting)
562
548
  const pageCode = getPageCode(jumpPageUrl)
563
549
  let jumpMode = 'refresh'
564
- if (jumpPageSetting) {
565
- if (jumpPageSetting.jumpPageOpenMode) {
566
- jumpMode = jumpPageSetting.jumpPageOpenMode
567
- }
550
+ if (jumpPageSetting && jumpPageSetting.jumpPageOpenMode) {
551
+ jumpMode = jumpPageSetting.jumpPageOpenMode
568
552
  }
569
553
  const jumpJsonData = {
570
- jumpMode: jumpMode,
554
+ jumpMode: jumpMode
571
555
  }
572
- window.sessionStorage.setItem(
573
- pageCode + '-jumpMode',
574
- JSON.stringify(jumpJsonData)
575
- )
556
+ window.sessionStorage.setItem(pageCode + '-jumpMode', JSON.stringify(jumpJsonData))
576
557
  if (jumpMode === 'popup') {
577
- const path = packageOpenUrl(
578
- system,
579
- pageCode,
580
- dataId,
581
- jumpPageSetting,
582
- jumpMode,
583
- ids,
584
- buttonCode,
585
- isHasIdParam
586
- )
558
+ const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam)
587
559
  // 页面布局中的按钮打开
588
- const popPageSetting = openDialogWhenPopup(
589
- jumpPageSetting,
590
- system,
591
- pageCode,
592
- dataId,
593
- jumpMode,
594
- ids,
595
- buttonCode
596
- )
560
+ const popPageSetting = openDialogWhenPopup(jumpPageSetting, system, pageCode, dataId, jumpMode, ids, buttonCode)
597
561
  if (
598
- popPageSetting && (jumpPageSetting.isRefreshWhenClosePopup!==undefined && jumpPageSetting.isRefreshWhenClosePopup!==null)
562
+ popPageSetting &&
563
+ jumpPageSetting.isRefreshWhenClosePopup !== undefined &&
564
+ jumpPageSetting.isRefreshWhenClosePopup !== null
599
565
  ) {
600
566
  popPageSetting.isRefreshWhenClosePopup = jumpPageSetting.isRefreshWhenClosePopup
601
- }
567
+ }
602
568
  popPageSetting._path = path
569
+ popPageSetting.customSystem = system.code
603
570
  resolve(popPageSetting)
604
571
  } else if (jumpMode === 'newTab') {
605
572
  // 新页签打开
606
573
  const path =
607
- packageOpenUrl(
608
- system,
609
- pageCode,
610
- dataId,
611
- jumpPageSetting,
612
- jumpMode,
613
- ids,
614
- buttonCode,
615
- isHasIdParam
616
- ) +
574
+ packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam) +
617
575
  '&_t_=' +
618
576
  new Date().getTime()
619
- window.open(path)
620
- resolve()
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) {
585
+ // 不是移动端时直接open打开pc新页签
586
+ window.open(path)
587
+ }
588
+ resolve(popPageSetting)
621
589
  } else {
622
590
  // 刷新页面
623
591
  const queryParam = {
@@ -625,7 +593,7 @@ function jumpWithSuperPage(
625
593
  customSystem: system.code,
626
594
  jumpMode: jumpMode,
627
595
  buttonCode: buttonCode,
628
- ids: ids ? ids.join(',') : '',
596
+ ids: ids ? ids.join(',') : ''
629
597
  }
630
598
  if (
631
599
  jumpPageSetting.isNeedId === undefined ||
@@ -641,16 +609,7 @@ function jumpWithSuperPage(
641
609
  if (paramStoreId && paramStoreId !== '') {
642
610
  queryParam['paramStoreId'] = paramStoreId
643
611
  }
644
- const path = packageOpenUrl(
645
- system,
646
- pageCode,
647
- dataId,
648
- jumpPageSetting,
649
- jumpMode,
650
- ids,
651
- buttonCode,
652
- isHasIdParam
653
- )
612
+ const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam)
654
613
  queryParam._path = path
655
614
  resolve(queryParam)
656
615
  }
@@ -666,15 +625,7 @@ function jumpWithSuperPage(
666
625
  * @param {*} ids
667
626
  * @param {*} buttonCode
668
627
  */
669
- function openDialogWhenPopup(
670
- jumpPageSetting,
671
- system,
672
- pageCode,
673
- dataId,
674
- jumpMode,
675
- ids,
676
- buttonCode
677
- ) {
628
+ function openDialogWhenPopup(jumpPageSetting, system, pageCode, dataId, jumpMode, ids, buttonCode) {
678
629
  const popPageSetting = {}
679
630
  if (jumpPageSetting) {
680
631
  popPageSetting.jumpPageTitle = jumpPageSetting.jumpPageTitle
@@ -683,8 +634,7 @@ function openDialogWhenPopup(
683
634
  popPageSetting.valueMappings = jumpPageSetting.valueMappings
684
635
  popPageSetting.updateValueEvent = jumpPageSetting.updateValueEvent
685
636
  popPageSetting.closeEvent = jumpPageSetting.closeEvent
686
- popPageSetting.isRefreshWhenClosePopup =
687
- jumpPageSetting.isRefreshWhenClosePopup
637
+ popPageSetting.isRefreshWhenClosePopup = jumpPageSetting.isRefreshWhenClosePopup
688
638
  }
689
639
  // 是否是自定义系统
690
640
  let isDsc = false
@@ -713,16 +663,7 @@ function openDialogWhenPopup(
713
663
  return popPageSetting
714
664
  }
715
665
 
716
- function packageOpenUrl(
717
- system,
718
- pageCode,
719
- dataId,
720
- jumpPageSetting,
721
- jumpMode,
722
- ids,
723
- buttonCode,
724
- isHasIdParam
725
- ) {
666
+ function packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam) {
726
667
  const frontendUrl = getSystemFrontendUrl(system.frontendUrl)
727
668
  let path =
728
669
  frontendUrl +
@@ -736,14 +677,7 @@ function packageOpenUrl(
736
677
  if (systemName) {
737
678
  path += '&_systemName_=' + encodeURI(systemName)
738
679
  }
739
- return packagePathParams(
740
- dataId,
741
- path,
742
- jumpPageSetting,
743
- ids,
744
- buttonCode,
745
- isHasIdParam
746
- )
680
+ return packagePathParams(dataId, path, jumpPageSetting, ids, buttonCode, isHasIdParam)
747
681
  }
748
682
 
749
683
  function getSystemNameWithLanguage(system) {
@@ -772,10 +706,7 @@ function analysisAdditionalParameterWithMap(additionalParamMap) {
772
706
  if (additionalParamMap) {
773
707
  const additionalParameterMap = JSON.parse(additionalParamMap)
774
708
  const keys = Object.keys(additionalParameterMap)
775
- console.log(
776
- 'analysisAdditionalParameterWithMap--Object.keys(additionalParameterMap)=',
777
- keys
778
- )
709
+ console.log('analysisAdditionalParameterWithMap--Object.keys(additionalParameterMap)=', keys)
779
710
  for (let i = 0; i < keys.length; i++) {
780
711
  if (additionalParameterStr !== '') {
781
712
  additionalParameterStr += '&'