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