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