imatrix-ui 2.7.38 → 2.7.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imatrix-ui",
3
- "version": "2.7.38",
3
+ "version": "2.7.39",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
@@ -1,7 +1,14 @@
1
1
  import sessionStorage from 'sessionstorage'
2
2
  import Vue from 'vue'
3
- import { analysisCondition, analysisValue, getEntityFieldValue, setEntityFieldValue } from './util'
4
- import { getSystemFrontendUrl } from './common-util'
3
+ import {
4
+ analysisCondition,
5
+ analysisValue,
6
+ getEntityFieldValue,
7
+ setEntityFieldValue
8
+ } from './util'
9
+ import {
10
+ getSystemFrontendUrl
11
+ } from './common-util'
5
12
  // 解析初始化条件,api方法;additionalParamMap是上个页面传过来的附加参数集合
6
13
  export function initialization(jumpPage, entity, isSql, additionalParamerter, contextParameter, tableName, parentFormData) {
7
14
  const result = {}
@@ -157,6 +164,7 @@ export function jumpToPage(jumpPageSetting, system, dataId, entity, additionalPa
157
164
  })
158
165
  })
159
166
  }
167
+
160
168
  function getSystem(system, jumpPageUrl) {
161
169
  return new Promise((resolve, reject) => {
162
170
  if (isFullPath(jumpPageUrl)) {
@@ -203,7 +211,7 @@ function jumpToPageTwo(jumpPageSetting, system, dataId, ids, buttonCode) {
203
211
  return
204
212
  }
205
213
  if (jumpPageUrl.indexOf('page:') === 0) {
206
- // 表示是自定义系统跳转页面编码
214
+ // 表示是自定义系统跳转页面编码
207
215
  jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, buttonCode).then((openPageParams) => {
208
216
  resolve(openPageParams)
209
217
  })
@@ -216,13 +224,13 @@ function jumpToPageTwo(jumpPageSetting, system, dataId, ids, buttonCode) {
216
224
  path = jumpPageUrl.substring(jumpPageUrl.indexOf('path:') + 'path:'.length)
217
225
  }
218
226
  if (isFullPath(path)) {
219
- // 表示是全路径,例如:http://www.baidu.com 或 http://localhost:9600/demo/#/demo/plan/list
220
- jumpToPageWithFullPath(dataId, path, additionalParameterStr, jumpPageSetting, ids, buttonCode)
227
+ // 表示是全路径,例如:http://www.baidu.com 或 http://localhost:9600/demo/#/demo/plan/list
221
228
  } else if (system) {
222
- // 表示是路由路径,例如:/demo/plan/list
223
- // TODO 配置系统暂时不支持该配置,只能选页面或全路径
224
- // jumpToPageWithPath(dataId, path, additionalParameterStr, system, jumpPage)
229
+ // 表示是路由路径,例如:/demo/plan/list
230
+ const frontendUrl = getSystemFrontendUrl(system.frontendUrl)
231
+ path = frontendUrl + '/#' + path
225
232
  }
233
+ jumpToPageWithFullPath(dataId, path, additionalParameterStr, jumpPageSetting, ids, buttonCode)
226
234
  resolve()
227
235
  }
228
236
  })
@@ -269,7 +277,7 @@ function jumpToPageWithFullPath(dataId, path, additionalParameterStr, jumpPage,
269
277
  jumpPageHeight = window.innerHeight - 150
270
278
  }
271
279
  const features = 'height=' + jumpPageHeight + ', width=' + jumpPageWidth + ', top=0, left=0, toolbar=no, menubar=no,' +
272
- 'scrollbars=no,resizable=no, location=no, status=no' // 设置新窗口的特性
280
+ 'scrollbars=no,resizable=no, location=no, status=no' // 设置新窗口的特性
273
281
  window.open(path, 'newW', features) // 打开新窗口
274
282
  } else if (jumpMode === 'newTab') {
275
283
  // 新页签
@@ -353,13 +361,19 @@ function jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, bu
353
361
  popPageSetting._path = path
354
362
  resolve(popPageSetting)
355
363
  } else if (jumpMode === 'newTab') {
356
- // 新页签打开
364
+ // 新页签打开
357
365
  const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode)
358
366
  window.open(path)
359
367
  resolve()
360
368
  } else {
361
369
  // 刷新页面
362
- const queryParam = { pageCode: pageCode, customSystem: system.code, jumpMode: jumpMode, buttonCode: buttonCode, ids: ids ? ids.join(',') : '' }
370
+ const queryParam = {
371
+ pageCode: pageCode,
372
+ customSystem: system.code,
373
+ jumpMode: jumpMode,
374
+ buttonCode: buttonCode,
375
+ ids: ids ? ids.join(',') : ''
376
+ }
363
377
  if (jumpPageSetting.isNeedId === undefined || jumpPageSetting.isNeedId === null || jumpPageSetting.isNeedId === true) {
364
378
  if (dataId) {
365
379
  // 表示是修改或查看页面,封装id参数
@@ -387,8 +401,7 @@ function jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, bu
387
401
  * @param {*} buttonCode
388
402
  */
389
403
  function openDialogWhenPopup(jumpPageSetting, system, pageCode, dataId, jumpMode, ids, buttonCode) {
390
- const popPageSetting = {
391
- }
404
+ const popPageSetting = {}
392
405
  if (jumpPageSetting) {
393
406
  popPageSetting.jumpPageTitle = jumpPageSetting.jumpPageTitle
394
407
  popPageSetting.jumpPageWidth = jumpPageSetting.jumpPageWidth
@@ -454,7 +467,7 @@ export function updateWithPageValue(sourceModel, sourceTableName, jumpPageSettin
454
467
  if (sourceModel && sourceModel !== null && entity && entity !== null && jumpPageSetting && jumpPageSetting !== null && jumpPageSetting.valueMappings) {
455
468
  let sourceEntity = sourceModel
456
469
  if (Array.isArray(sourceModel) && sourceModel.length > 0) {
457
- // 弹出框中列表选择了多行时,默认只赋值第一行记录
470
+ // 弹出框中列表选择了多行时,默认只赋值第一行记录
458
471
  sourceEntity = sourceModel[0]
459
472
  }
460
473
  const valueMappings = jumpPageSetting.valueMappings
@@ -482,4 +495,3 @@ export function updateWithPageValue(sourceModel, sourceTableName, jumpPageSettin
482
495
  })
483
496
  }
484
497
  }
485
-