imatrix-ui 2.9.15-dw-tmp2 → 2.9.16-boe1

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 (193) hide show
  1. package/lib/super-ui.css +1 -1
  2. package/lib/super-ui.umd.min.js +5 -35
  3. package/package.json +2 -2
  4. package/src/api/sso-service.js +19 -1
  5. package/src/assets/nonemessage.png +0 -0
  6. package/src/i18n/i18n.js +1 -1
  7. package/src/i18n/langs/cn.js +18 -6
  8. package/src/i18n/langs/en.js +20 -7
  9. package/src/permission.js +2 -2
  10. package/src/plugins.js +3 -3
  11. package/src/router/index.js +10 -0
  12. package/src/store/modules/tab-content.js +6 -0
  13. package/src/store/modules/user.js +32 -2
  14. package/src/styles/display-layout.scss +1 -1
  15. package/src/styles/index.scss +74 -4
  16. package/src/styles/theme/black/font-style.scss +70 -0
  17. package/src/styles/theme/black/index.scss +6 -30
  18. package/src/styles/theme/blue/font-style.scss +37 -0
  19. package/src/styles/theme/blue/index.scss +2 -18
  20. package/src/styles/theme/blue2/font-style.scss +70 -0
  21. package/src/styles/theme/blue2/index.scss +3 -13
  22. package/src/styles/theme/dark-blue/card.scss +4 -6
  23. package/src/styles/theme/dark-blue/form.scss +7 -4
  24. package/src/styles/theme/dark-blue/index.scss +30 -5
  25. package/src/styles/theme/dark-blue/message.scss +8 -0
  26. package/src/styles/theme/dark-blue/radio.scss +13 -0
  27. package/src/styles/theme/dark-blue/sidebar.scss +7 -37
  28. package/src/styles/theme/dark-blue/tab.scss +4 -1
  29. package/src/styles/theme/dark-blue/table.scss +1 -1
  30. package/src/styles/theme/dark-blue/tree.scss +35 -10
  31. package/src/styles/theme/gray/card-style.scss +13 -1
  32. package/src/styles/theme/gray/font-style.scss +38 -0
  33. package/src/styles/theme/gray/index.scss +13 -25
  34. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  35. package/src/styles/theme/gray/sidebar.scss +7 -14
  36. package/src/utils/auth-api.js +47 -1
  37. package/src/utils/common-util.js +22 -81
  38. package/src/utils/jump-page-utils.js +3 -6
  39. package/src/utils/range-selector.js +185 -0
  40. package/src/utils/request.js +6 -3
  41. package/src/utils/util.js +13 -11
  42. package/src/utils/workflow-util.js +3 -0
  43. package/src/views/dsc-component/Sidebar/Item.vue +7 -5
  44. package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
  45. package/src/views/dsc-component/Sidebar/index.vue +12 -20
  46. package/src/views/dsc-component/tabs/tab-content.vue +8 -9
  47. package/src/views/layout/EmptyLayout.vue +4 -1
  48. package/src/views/layout/NewLayout.vue +6 -65
  49. package/src/views/layout/components/AppMain.vue +2 -1
  50. package/src/views/layout/components/Menubar/Item.vue +23 -7
  51. package/src/views/layout/components/Menubar/Link.vue +11 -2
  52. package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
  53. package/src/views/layout/components/Menubar/index.vue +51 -16
  54. package/src/views/layout/components/tabs/tab-content.vue +162 -0
  55. package/src/views/layout/tab-content-iframe-index.vue +31 -0
  56. package/src/views/layout/tab-content-index.vue +85 -0
  57. package/src/views/login/index.vue +1 -1
  58. package/packages/breadcrumb/index.js +0 -6
  59. package/packages/breadcrumb/src/breadcrumb.vue +0 -71
  60. package/packages/department-tree/index.js +0 -6
  61. package/packages/department-tree/src/department-tree.vue +0 -108
  62. package/packages/department-tree-inline/index.js +0 -6
  63. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -408
  64. package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -290
  65. package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
  66. package/packages/department-tree-inline/src/department-tree-service.js +0 -273
  67. package/packages/department-tree-inline/src/search-result.vue +0 -176
  68. package/packages/department-user-tree/index.js +0 -6
  69. package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
  70. package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
  71. package/packages/department-user-tree/src/department-user-tree.vue +0 -101
  72. package/packages/department-user-tree-inline/index.js +0 -6
  73. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -636
  74. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -271
  75. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
  76. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -248
  77. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -142
  78. package/packages/department-user-tree-inline/src/search-result.vue +0 -197
  79. package/packages/directives/prevent-reclick.js +0 -19
  80. package/packages/dynamic-source-select/index.js +0 -6
  81. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
  82. package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
  83. package/packages/dynamic-source-select/src/events.js +0 -55
  84. package/packages/fs-preview/index.js +0 -6
  85. package/packages/fs-preview/src/fs-preview.vue +0 -226
  86. package/packages/fs-upload/index.js +0 -6
  87. package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
  88. package/packages/fs-upload/src/fs-upload-single.vue +0 -312
  89. package/packages/fs-upload/src/fs-upload.vue +0 -189
  90. package/packages/fs-upload/src/see-big-picture.vue +0 -55
  91. package/packages/fs-upload-list/index.js +0 -6
  92. package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
  93. package/packages/hamburger/index.js +0 -6
  94. package/packages/hamburger/src/hamburger.vue +0 -38
  95. package/packages/index.js +0 -121
  96. package/packages/multipart-upload/index.js +0 -6
  97. package/packages/multipart-upload/src/index.vue +0 -73
  98. package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
  99. package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
  100. package/packages/organization-input/index.js +0 -6
  101. package/packages/organization-input/src/organization-input.vue +0 -542
  102. package/packages/plugins/export-data-new.js +0 -466
  103. package/packages/plugins/export-data.js +0 -361
  104. package/packages/plugins/index.js +0 -15
  105. package/packages/plugins/public-method.js +0 -43
  106. package/packages/remove-department/index.js +0 -6
  107. package/packages/remove-department/src/remove-department.vue +0 -172
  108. package/packages/remove-department/src/remove-dept-service.js +0 -20
  109. package/packages/remove-user/index.js +0 -6
  110. package/packages/remove-user/src/remove-user-service.js +0 -20
  111. package/packages/remove-user/src/remove-user.vue +0 -195
  112. package/packages/remove-workgroup/index.js +0 -6
  113. package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
  114. package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
  115. package/packages/rich-editor/index.js +0 -7
  116. package/packages/rich-editor/index.vue +0 -278
  117. package/packages/rich-editor/langs/zh-Hans.js +0 -1
  118. package/packages/rich-editor/viewer.vue +0 -103
  119. package/packages/scan-code-input/index.js +0 -6
  120. package/packages/scan-code-input/src/events.js +0 -33
  121. package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
  122. package/packages/scan-code-input/src/scan-code-input.vue +0 -116
  123. package/packages/secret-info/index.js +0 -7
  124. package/packages/secret-info/index.vue +0 -90
  125. package/packages/super-grid/index.js +0 -7
  126. package/packages/super-grid/src/apis.js +0 -820
  127. package/packages/super-grid/src/columns-config.vue +0 -335
  128. package/packages/super-grid/src/custom-formatter.js +0 -278
  129. package/packages/super-grid/src/dynamic-input.vue +0 -1279
  130. package/packages/super-grid/src/eventBus.js +0 -2
  131. package/packages/super-grid/src/events.js +0 -55
  132. package/packages/super-grid/src/formValidatorUtil.js +0 -226
  133. package/packages/super-grid/src/formatter.js +0 -181
  134. package/packages/super-grid/src/group-column.vue +0 -100
  135. package/packages/super-grid/src/header-context-menu.vue +0 -87
  136. package/packages/super-grid/src/index-column.vue +0 -51
  137. package/packages/super-grid/src/normal-column.vue +0 -771
  138. package/packages/super-grid/src/public-methods.js +0 -31
  139. package/packages/super-grid/src/row-operation.vue +0 -161
  140. package/packages/super-grid/src/search-button.vue +0 -66
  141. package/packages/super-grid/src/search-condition-input.vue +0 -61
  142. package/packages/super-grid/src/search-condition-list.vue +0 -59
  143. package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
  144. package/packages/super-grid/src/search-form-dialog.vue +0 -79
  145. package/packages/super-grid/src/search-form-item.vue +0 -404
  146. package/packages/super-grid/src/search-form-number.vue +0 -38
  147. package/packages/super-grid/src/search-form-open.vue +0 -170
  148. package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -196
  149. package/packages/super-grid/src/search-form.vue +0 -642
  150. package/packages/super-grid/src/search-methods.js +0 -448
  151. package/packages/super-grid/src/selection-column.vue +0 -43
  152. package/packages/super-grid/src/store.js +0 -3
  153. package/packages/super-grid/src/super-grid-service.js +0 -593
  154. package/packages/super-grid/src/super-grid.vue +0 -2882
  155. package/packages/super-grid/src/utils.js +0 -762
  156. package/packages/super-grid/src/view-image-dialog.vue +0 -130
  157. package/packages/super-nine-grid/index.js +0 -7
  158. package/packages/super-nine-grid/src/apis.js +0 -103
  159. package/packages/super-nine-grid/src/custom-formatter.js +0 -66
  160. package/packages/super-nine-grid/src/formatter.js +0 -132
  161. package/packages/super-nine-grid/src/search-form-number.vue +0 -38
  162. package/packages/super-nine-grid/src/search-form.vue +0 -430
  163. package/packages/super-nine-grid/src/search-methods.js +0 -134
  164. package/packages/super-nine-grid/src/store.js +0 -3
  165. package/packages/super-nine-grid/src/super-grid-service.js +0 -91
  166. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
  167. package/packages/super-nine-grid/src/utils.js +0 -261
  168. package/packages/svg-icon/index.js +0 -6
  169. package/packages/svg-icon/src/svg-icon.vue +0 -43
  170. package/packages/utils/memory-cache-utils.js +0 -90
  171. package/packages/utils/utils.js +0 -152
  172. package/packages/utils/value-set.js +0 -86
  173. package/packages/valid-code/index.js +0 -7
  174. package/packages/valid-code/src/valid-code.vue +0 -95
  175. package/packages/workflow-button/index.js +0 -6
  176. package/packages/workflow-button/src/workflow-button.vue +0 -325
  177. package/packages/workflow-history-list/index.js +0 -6
  178. package/packages/workflow-history-list/src/api.js +0 -7
  179. package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
  180. package/packages/workgroup-tree/index.js +0 -6
  181. package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
  182. package/packages/workgroup-tree-inline/index.js +0 -6
  183. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
  184. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
  185. package/packages/workgroup-user-tree/index.js +0 -6
  186. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
  187. package/packages/workgroup-user-tree-inline/index.js +0 -6
  188. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
  189. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
  190. package/packages/year-range-picker/index.js +0 -6
  191. package/packages/year-range-picker/src/year-range-picker.vue +0 -51
  192. package/src/index.js +0 -93
  193. package/src/styles/theme/gray/form-style.scss +0 -41
@@ -1,7 +1,5 @@
1
1
  import sessionStorage from 'sessionstorage'
2
2
  import Vue from 'vue'
3
- import authApi from './auth-api'
4
- import { getToken } from './auth'
5
3
  /**
6
4
  * 获得相对地址
7
5
  */
@@ -171,7 +169,7 @@ export function isPlateSys(systemCode) {
171
169
  systemCode === 'mms' || systemCode === 'task' ||
172
170
  systemCode === 'wf' || systemCode === 'dc' ||
173
171
  systemCode === 'mc' || systemCode === 'mobile' ||
174
- systemCode === 'acs' || systemCode === 'bs' || systemCode === 'pcm')) {
172
+ systemCode === 'acs' || systemCode === 'bs')) {
175
173
  return true
176
174
  } else {
177
175
  return false
@@ -226,89 +224,32 @@ export function getTimeZone() {
226
224
  return timeZone
227
225
  }
228
226
 
229
- export function isMobileBrowser() {
230
- if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Opera Mobi|Windows CE|Symbian|Windows Phone|POLARIS|lgtelecom|nokia|SonyEricsson|LG|SAMSUNG|Samsung/i
231
- .test(navigator.userAgent)) {
232
- //移动端浏览器
233
- return true
234
- } else {
235
- //PC浏览器
236
- return false
237
- }
238
- }
239
-
240
- export function getLocaleByLang(lang) {
241
- let locale = 'cn'
242
- if (lang && lang.indexOf('_') > 0) {
243
- const language = lang.substring(0, lang.indexOf('_'))
244
- locale = language
245
- }
246
- if (locale === 'zh') {
247
- locale = 'cn'
227
+ export function setCustomSystemBackendUrl(customSystem) {
228
+ // 重新缓存系统后台路径
229
+ if (!Vue.prototype.projectModel || Vue.prototype.projectModel !== 'developing.model') {
230
+ // 表示是生产环境时,需要根据数据库配置获得对应的后端地址
231
+ const backendUrl = window.$authApi.getSystemCacheUrlByCode(customSystem)
232
+ console.log('setCustomSystemBackendUrl:' + backendUrl)
233
+ if (backendUrl) {
234
+ Vue.prototype.baseURL = getRelativeBaseUrl(backendUrl)
235
+ }
248
236
  }
249
- return locale
250
237
  }
251
238
 
252
- const langKey = 'AMB_LANG_INFO'
253
-
254
- export function cacheLangs(langs) {
255
- let langResult
256
- if(langs) {
257
- langResult = JSON.stringify(langs)
239
+ export function pushCustomControlValidatorRef(pageCode, refName, ref) {
240
+ console.log('pushCustomControlValidatorRef----', pageCode, refName, ref)
241
+ if (!window.customValidatorRef) {
242
+ window.customValidatorRef = new Map()
258
243
  }
259
- return authApi.setCookieCache(langKey,langResult)
260
- }
261
-
262
- export function getLangs() {
263
- return authApi.getCookieCache(langKey)
264
- }
265
- /**
266
- *
267
- * @param {*} langShort 例如:cn或en
268
- * @returns 例如:zh_CN或en_US
269
- */
270
- export function getLangByShort(langShort) {
271
- let lang
272
- const langResultJson = getLangs()
273
- if(langResultJson){
274
- const langObj = JSON.parse(langResultJson)
275
- lang = langObj[langShort]
244
+ let pageCustomControlRef = window.customValidatorRef.get(pageCode)
245
+ if (!pageCustomControlRef) {
246
+ pageCustomControlRef = new Map()
247
+ window.customValidatorRef.set(pageCode, pageCustomControlRef)
276
248
  }
277
- if(!lang){
278
- lang = 'zh_CN'
279
- }
280
- return lang
249
+ pageCustomControlRef.set(refName, ref)
281
250
  }
282
251
 
283
- // 首次加载业务系统时,缓存所有语言
284
- export function cacheAllLanguagesUtil(http) {
285
- return new Promise((resolve, reject) => {
286
- const token = getToken()
287
- if (token) {
288
- http.get(Vue.prototype.baseAPI + '/component/all-languages').then((langList) => {
289
- const langResult = {}
290
- if (langList) {
291
- langList.forEach(item => {
292
- // 例如:zh_CN、en_US
293
- const lang = item.value
294
- let langShort
295
- if (lang.indexOf('_') > 0) {
296
- langShort = lang.substring(0, lang.indexOf('_'))
297
- }
298
- if (langShort && langShort === 'zh') {
299
- // 中文处理,为了兼容历史逻辑
300
- langShort = 'cn'
301
- }
302
- if (langShort) {
303
- langResult[langShort] = lang
304
- }
305
- })
306
- }
307
- cacheLangs(langResult)
308
- resolve()
309
- })
310
- } else {
311
- resolve()
312
- }
313
- })
252
+ export function removeCustomControlValidatorRef(pageCode, refName) {
253
+ const pageCustomControlRef = window.customValidatorRef.get(pageCode)
254
+ pageCustomControlRef.delete(refName)
314
255
  }
@@ -331,14 +331,12 @@ function packagePathParams(dataId, path, jumpPage, ids, buttonCode, isHasIdParam
331
331
  }
332
332
  }
333
333
  if (ids && ids.length > 0) {
334
- const idsStr = ids.join(',')
335
- const idsPath = 'ids=' + idsStr + '&_idsStr=' + idsStr
336
334
  if (path.indexOf('?') !== -1) {
337
335
  path += '&'
338
- path += idsPath
336
+ path += 'ids=' + ids.join(',')
339
337
  } else {
340
338
  path += '?'
341
- path += idsPath
339
+ path += 'ids=' + ids.join(',')
342
340
  }
343
341
  }
344
342
  if (buttonCode) {
@@ -382,7 +380,7 @@ function jumpWithSuperPage(jumpPageUrl, system, dataId, jumpPageSetting, ids, bu
382
380
  resolve(popPageSetting)
383
381
  } else if (jumpMode === 'newTab') {
384
382
  // 新页签打开
385
- const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam)
383
+ const path = packageOpenUrl(system, pageCode, dataId, jumpPageSetting, jumpMode, ids, buttonCode, isHasIdParam) + '&_t_=' + new Date().getTime()
386
384
  window.open(path)
387
385
  resolve()
388
386
  } else {
@@ -429,7 +427,6 @@ function openDialogWhenPopup(jumpPageSetting, system, pageCode, dataId, jumpMode
429
427
  popPageSetting.valueMappings = jumpPageSetting.valueMappings
430
428
  popPageSetting.updateValueEvent = jumpPageSetting.updateValueEvent
431
429
  popPageSetting.closeEvent = jumpPageSetting.closeEvent
432
- popPageSetting.isRefreshWhenClosePopup = jumpPageSetting.isRefreshWhenClosePopup
433
430
  }
434
431
  // 是否是自定义系统
435
432
  let isDsc = false
@@ -0,0 +1,185 @@
1
+ export function getFirstDayOfSeason(date) {
2
+ var month = new Date(date).getMonth()
3
+ if (month < 3) {
4
+ date.setMonth(0)
5
+ } else if (month > 2 && month < 6) {
6
+ date.setMonth(3)
7
+ } else if (month > 5 && month < 9) {
8
+ date.setMonth(6)
9
+ } else if (month > 8 && month < 11) {
10
+ date.setMonth(9)
11
+ }
12
+ date.setDate(1)
13
+ return formatDate(date)
14
+ }
15
+ export function getWeekOfSeason(date) {
16
+ const weekTime = date.getDay() - 1
17
+ if (weekTime === -1) {
18
+ return date.getTime() - 6 * 24 * 60 * 60 * 1000
19
+ } else {
20
+ return date.getTime() - weekTime * 24 * 60 * 60 * 1000
21
+ }
22
+ }
23
+
24
+ function formatDate(time) {
25
+ const date = new Date(time) // 创建Date对象
26
+ const year = date.getFullYear() // 获取年份
27
+ const month = date.getMonth() + 1 // 获取月份,记得+1
28
+ const day = date.getDate() // 获取日期
29
+ return `${year}-${month}-${day}` // 返回格式化后的日期字符串
30
+ }
31
+
32
+ export function formatTimefn(format, dateTime) {
33
+ if (format === undefined || format === null || format === '') { return dateTime }
34
+ const nowTime = new Date(dateTime)
35
+ const year = nowTime.getFullYear()
36
+ const month = nowTime.getMonth() + 1
37
+ const date = nowTime.getDate()
38
+ const hour = nowTime.getHours()
39
+ const minute = nowTime.getMinutes()
40
+ const second = nowTime.getSeconds()
41
+
42
+ function getCharCount(char) {
43
+ var regex = new RegExp(char, 'g') // 使用g表示整个字符串都要匹配
44
+ var result = format.match(regex) // match方法可在字符串内检索指定的值,或找到一个或多个正则表达式的匹配。
45
+ var count = !result ? 0 : result.length
46
+ return count
47
+ }
48
+ function setDateItem(oneUnit, twoUnit, itemDate) {
49
+ if (getCharCount(oneUnit) === 1) {
50
+ format = format.replace(oneUnit, itemDate)
51
+ } else if (getCharCount(oneUnit) === 2 && itemDate < 10) {
52
+ format = format.replace(twoUnit, '0' + itemDate)
53
+ } else {
54
+ format = format.replace(twoUnit, itemDate)
55
+ }
56
+ }
57
+ // 获取第几周
58
+ function getYearWeek(a, b, c) { // a为年 b为月 c为日
59
+ var date1 = new Date(a, parseInt(b) - 1, c)
60
+ var date2 = new Date(a, 0, 1)
61
+ var d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000)
62
+ return Math.ceil((d + ((date2.getDay() + 1) - 1)) / 7)
63
+ }
64
+
65
+ if (format.indexOf('y') !== -1) {
66
+ format = format.replace('yyyy', year)
67
+ }
68
+
69
+ if (format.indexOf('M') !== -1) {
70
+ setDateItem('M', 'MM', month)
71
+ }
72
+
73
+ if (format.indexOf('W') !== -1) {
74
+ const week = getYearWeek(year, month, date)
75
+ setDateItem('W', 'WW', week)
76
+ }
77
+ if (format.indexOf('d') !== -1) {
78
+ setDateItem('d', 'dd', date)
79
+ }
80
+
81
+ if (format.indexOf('H') !== -1) {
82
+ setDateItem('H', 'HH', hour)
83
+ }
84
+
85
+ if (format.indexOf('m') !== -1) {
86
+ setDateItem('m', 'mm', minute)
87
+ }
88
+
89
+ if (format.indexOf('s') !== -1) {
90
+ setDateItem('s', 'ss', second)
91
+ }
92
+ return format
93
+ }
94
+
95
+ export function getDateRangeSelectorDefaultValue(stareScopeTimeType, format) {
96
+ let Staretime = ''
97
+ const endTime = new Date()
98
+ const computeTime = new Date()
99
+ if (stareScopeTimeType === 'oneYear') {
100
+ // 近一年
101
+ const yearTime = endTime.getFullYear()
102
+ computeTime.setFullYear(yearTime)
103
+ computeTime.setMonth(0)
104
+ Staretime = computeTime.setDate(1)
105
+ } else if (stareScopeTimeType === 'twoYear') {
106
+ // 近两年
107
+ const yearTime = endTime.getFullYear() - 1
108
+ computeTime.setFullYear(yearTime)
109
+ computeTime.setMonth(0)
110
+ Staretime = computeTime.setDate(1)
111
+ } else if (stareScopeTimeType === 'oneQuarter') {
112
+ // 近一个季度
113
+ Staretime = new Date(getFirstDayOfSeason(computeTime))
114
+ } else if (stareScopeTimeType === 'twoQuarter') {
115
+ // 近两个季度
116
+ const timeMonth = computeTime.getMonth()
117
+ if (endTime.getMonth < 3) {
118
+ const yeaNum = computeTime.getFullYear() - 1
119
+ computeTime.setFullYear(yeaNum)
120
+ computeTime.setMonth(10)
121
+ } else {
122
+ computeTime.setMonth(timeMonth - 3)
123
+ }
124
+ Staretime = new Date(getFirstDayOfSeason(computeTime))
125
+ } else if (stareScopeTimeType === 'threeQuarter') {
126
+ // 近三个季度
127
+ const timeMonth = computeTime.getMonth()
128
+ if (endTime.getMonth < 8 && endTime.getMonth > 2) {
129
+ const yeaNum = computeTime.getFullYear() - 1
130
+ computeTime.setFullYear(yeaNum)
131
+ computeTime.setMonth(8)
132
+ } else if (endTime.getMonth < 3) {
133
+ const yeaNum = computeTime.getFullYear() - 1
134
+ computeTime.setFullYear(yeaNum)
135
+ computeTime.setMonth(5)
136
+ } else {
137
+ computeTime.setMonth(timeMonth - 6)
138
+ }
139
+ Staretime = new Date(getFirstDayOfSeason(computeTime))
140
+ } else if (stareScopeTimeType === 'oneMonth') {
141
+ // 近一个月
142
+ Staretime = computeTime.setDate(1)
143
+ } else if (stareScopeTimeType === 'twoMonth') {
144
+ // 近两个月
145
+ const monthNum = endTime.getMonth() - 1
146
+ if (monthNum > -1) {
147
+ computeTime.setMonth(monthNum)
148
+ } else {
149
+ const yeartime = endTime.getFullYear() - 1
150
+ computeTime.setFullYear(yeartime)
151
+ computeTime.setMonth(11)
152
+ }
153
+ Staretime = computeTime.setDate(1)
154
+ } else if (stareScopeTimeType === 'threeMonth') {
155
+ // 近三个月
156
+ const monthTime = endTime.getMonth() - 2
157
+ if (monthTime > -1) {
158
+ computeTime.setMonth(monthTime)
159
+ } else {
160
+ const yeartime = endTime.getFullYear() - 1
161
+ computeTime.setFullYear(yeartime)
162
+ computeTime.setMonth(10)
163
+ }
164
+ Staretime = computeTime.setDate(1)
165
+ } else if (stareScopeTimeType === 'oneWeek') {
166
+ // 近一周
167
+ const MondayTime = getWeekOfSeason(computeTime)
168
+ Staretime = new Date(MondayTime)
169
+ } else if (stareScopeTimeType === 'twoWeek') {
170
+ // 近两周
171
+ const MondayTime = getWeekOfSeason(computeTime)
172
+ Staretime = new Date(MondayTime - 7 * 24 * 60 * 60 * 1000)
173
+ } else if (stareScopeTimeType === 'threeWeek') {
174
+ // 近三周
175
+ const MondayTime = getWeekOfSeason(computeTime)
176
+ Staretime = new Date(MondayTime - 14 * 24 * 60 * 60 * 1000)
177
+ }
178
+ if (Staretime) {
179
+ const startTimeTemp = new Date(Staretime).getTime()
180
+ const endTimeTemp = endTime.getTime()
181
+ const startDate = formatTimefn(format, startTimeTemp)
182
+ const endDate = formatTimefn(format, endTimeTemp)
183
+ return { startTimeTemp, endTimeTemp, startDate, endDate }
184
+ }
185
+ }
@@ -1,7 +1,7 @@
1
1
  import axios from 'axios'
2
2
  import {
3
3
  Message
4
- } from '@gcommon/gcommon-ui'
4
+ } from 'element-ui'
5
5
  import {
6
6
  getToken,
7
7
  removeToken
@@ -14,12 +14,13 @@ import {
14
14
  } from './util'
15
15
  import {
16
16
  getRelativeBaseUrl,
17
- getTimeZone
17
+ getTimeZone,
18
+ setCustomSystemBackendUrl
18
19
  } from './common-util'
19
20
  // 创建axios实例
20
21
  const service = axios.create({
21
22
  // baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
22
- timeout: 150000, // 请求超时时间
23
+ timeout: 300000, // 请求超时时间
23
24
  withCredentials: true
24
25
  })
25
26
 
@@ -38,6 +39,8 @@ service.interceptors.request.use(
38
39
  const customSystem = Vue.prototype.customSystem
39
40
  if (customSystem) {
40
41
  config.headers['customSystem'] = customSystem
42
+ // 重新缓存系统后台路径
43
+ setCustomSystemBackendUrl(customSystem)
41
44
  }
42
45
  if (Vue.prototype.baseURL) {
43
46
  config.baseURL = getRelativeBaseUrl(Vue.prototype.baseURL)
package/src/utils/util.js CHANGED
@@ -3,7 +3,6 @@ import Vue from 'vue'
3
3
  import {
4
4
  executeExpression
5
5
  } from './calculator/calculator-util'
6
- import { getLangByShort } from './common-util'
7
6
  export function getI18n() {
8
7
  if (!window.$locale) {
9
8
  i18n.locale = 'cn'
@@ -14,11 +13,12 @@ export function getI18n() {
14
13
  }
15
14
 
16
15
  export function getLanguageWithLocale() {
17
- let currentLocale = window.$locale
18
- if (!currentLocale || currentLocale === 'zh') {
19
- currentLocale = 'cn'
16
+ const currentLocale = window.$locale
17
+ if (currentLocale && currentLocale === 'en') {
18
+ return 'en_US'
19
+ } else {
20
+ return 'zh_CN'
20
21
  }
21
- return getLangByShort(currentLocale)
22
22
  }
23
23
  /**
24
24
  * 根据动态数据源获得下拉选的选项集合
@@ -267,19 +267,21 @@ function getValue(entityData, fieldName, isSql) {
267
267
  return value
268
268
  }
269
269
 
270
- function getValueByField(entityData, fieldName) {
270
+ export function getValueByField(entityData, fieldName) {
271
271
  if (entityData && entityData !== null) {
272
272
  let value
273
273
  if (fieldName.indexOf('.') > 0) {
274
274
  // 表示是子表字段
275
275
  value = getSubEntityValue(entityData, fieldName)
276
276
  } else {
277
- value = entityData[fieldName]
277
+ value = entityData[fieldName.toUpperCase()]
278
+ if (value === undefined) {
279
+ value = entityData[fieldName.toLowerCase()]
280
+ }
278
281
  }
279
282
  return value
280
283
  }
281
284
  }
282
-
283
285
  function getSubEntityValue(entityData, fieldName) {
284
286
  let value = null
285
287
  let subEntityData = entityData
@@ -452,11 +454,11 @@ export function getEntityFieldValueWithOutCase(entity, prop) {
452
454
  */
453
455
  export function getEntityFieldValue(entity, prop, isLowerCase) {
454
456
  let value = getEntityFieldValueWithCase(entity, prop)
455
- if (value === undefined) {
457
+ if (value === undefined || value === null) {
456
458
  // 兼容mysql数据库
457
459
  value = getEntityFieldValueWithCase(entity, prop.toLowerCase())
458
460
  }
459
- if (value === undefined && isLowerCase === undefined) {
461
+ if (value === undefined || value === null && isLowerCase === undefined) {
460
462
  // 兼容oracle数据库
461
463
  value = getEntityFieldValueWithCase(entity, prop.toUpperCase())
462
464
  }
@@ -509,7 +511,7 @@ function getParentModelPropWithCase(prop, parentObj) {
509
511
  if (!parentObj) {
510
512
  parentObj = {}
511
513
  }
512
- if (!parentObj[prop]) {
514
+ if (!parentObj[prop] && !parentObj[prop.toUpperCase()]) {
513
515
  parentObj[prop] = {}
514
516
  }
515
517
  return parentObj[prop]
@@ -25,6 +25,9 @@ export function i18nOperation(history, processNameI18n, processI18n, language) {
25
25
  const buttonOperation = params['2']
26
26
  // 国际化buttonOperation
27
27
  params['2'] = getI18n().t('workflowButton.' + buttonOperation)
28
+ if (params['2'].indexOf('workflowButton.') === 0) {
29
+ params['2'] = buttonOperation
30
+ }
28
31
  }
29
32
  if (i18nKey === 'process_start' && processNameI18n && processNameI18n !== null) {
30
33
  // 表示发起流程时,流程名称要国际化显示
@@ -27,15 +27,15 @@ export default {
27
27
 
28
28
  if (icon) {
29
29
  if (icon.indexOf('fa-') === 0) {
30
- // 表示以“fa-”开头,使用font-awesome中的图标 margin-right: 16px 是因为svg-icon有16px的间隔
30
+ // 表示以“fa-”开头,使用font-awesome中的图标
31
31
  icon = 'fa ' + icon
32
- vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon} style='margin-right: 16px;'/></div>)
32
+ vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon}/></div>)
33
33
  } else if (icon.indexOf('svg-') === 0) {
34
34
  icon = icon.substring(icon.indexOf('svg-') + 4)
35
35
  vnodes.push(<div style='display: inline-block;overflow:hidden;'><svg-icon icon-class={icon}/></div>)
36
36
  } else {
37
37
  icon += ' svg-icon'
38
- vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon} style='margin-right: 16px;'/></div>)
38
+ vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon}/></div>)
39
39
  }
40
40
  }
41
41
 
@@ -43,7 +43,9 @@ export default {
43
43
  let width = '130px'
44
44
  if (hasChildren) {
45
45
  // 当是父菜单时,为了使后面的三角能显示出来,需要将宽度设小点
46
- width = '100px'
46
+ // width = '100px'
47
+ // boe 反应左侧菜单栏无法展示全部文字,调整
48
+ width = '130px'
47
49
  }
48
50
  if (isRoot) {
49
51
  // 是否是根目录,没有子菜单时
@@ -52,7 +54,7 @@ export default {
52
54
  </div>)
53
55
  } else {
54
56
  // 有子菜单时
55
- vnodes.push(<div v-slot:title style='display: inline-block'>
57
+ vnodes.push(<div slot='title' style='display: inline-block'>
56
58
  <div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>{(title)}</div>
57
59
  </div>)
58
60
  }
@@ -8,8 +8,8 @@
8
8
  </app-link>
9
9
  </template>
10
10
 
11
- <el-submenu v-else :index="resolvePath(item.code,item.path,item.pageType)" :show-timeout="0" :hide-timeout="50" :popper-append-to-body="false" popper-class="sidebar-container-popper">
12
- <template v-slot:title>
11
+ <el-submenu v-else :index="resolvePath(item.code,item.path,item.pageType)" :show-timeout="0" :hide-timeout="50" popper-class="sidebar-container-popper">
12
+ <template slot="title">
13
13
  <item :icon="item.iconName" :title="getI18nName(item)" :has-children="item.children.length > 0?true:false" />
14
14
  </template>
15
15
 
@@ -38,7 +38,6 @@ import AppLink from './Link'
38
38
  import Vue from 'vue'
39
39
  import tabJs from '../../../api/tab'
40
40
  import { getI18nName } from '../../../utils/menu'
41
- // import { SidebarItemChild } from './SidebarItemChild.vue'
42
41
  export default {
43
42
  name: 'SidebarItem',
44
43
  components: { Item, AppLink },
@@ -1,17 +1,15 @@
1
1
  <template>
2
2
  <div>
3
3
  <el-scrollbar wrap-class="scrollbar-wrapper">
4
- <keep-alive>
5
- <el-menu
6
- :show-timeout="200"
7
- :default-active="getDefaultActive()"
8
- :collapse="isCollapse"
9
- mode="vertical"
10
- @select="selectMenu"
11
- >
12
- <sidebar-item v-for="menu in menus" :key="menu.code" :item="menu" />
13
- </el-menu>
14
- </keep-alive>
4
+ <el-menu
5
+ :show-timeout="200"
6
+ :default-active="getDefaultActive()"
7
+ :collapse="isCollapse"
8
+ mode="vertical"
9
+ @select="selectMenu"
10
+ >
11
+ <sidebar-item v-for="menu in menus" :key="menu.code" :item="menu" />
12
+ </el-menu>
15
13
  </el-scrollbar>
16
14
  <hamburger :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
17
15
  </div>
@@ -42,7 +40,7 @@ export default {
42
40
  data() {
43
41
  const menus = getMenus()
44
42
  return {
45
- menus: Object.freeze(menus)
43
+ menus
46
44
  }
47
45
  },
48
46
  computed: {
@@ -57,14 +55,13 @@ export default {
57
55
  }
58
56
  },
59
57
  created() {
60
- const a = new Date().getTime()
61
58
  this.firstLeafMenu = this.getMyFirstMenu(this.menus)
62
59
  if (this.firstLeafMenu && this.firstLeafMenu.fullPath) {
63
60
  // 跳转到第一个页面
64
61
  if (this.firstLeafMenu.pageType && this.firstLeafMenu.pageType === 'iframe') {
65
62
  const iframeSrc = this.firstLeafMenu.fullPath
66
- const path = this.firstLeafMenu.path
67
- const query = { src: iframeSrc, customSystem: this.systemCode, path: path, _menuCode: this.firstLeafMenu.code, _menuName: getI18nName(this.firstLeafMenu) }
63
+ const pageCode = this.firstLeafMenu.path
64
+ const query = { src: iframeSrc, customSystem: this.systemCode, pageCode: pageCode, _menuCode: this.firstLeafMenu.code, _menuName: getI18nName(this.firstLeafMenu) }
68
65
  this.addTabs(query, this.$store.state.tabContent.openTab, '/dsc/iframe-page', '/dsc/iframe-page')
69
66
  this.$router.push({ path: '/dsc-index/iframe-page', query: query })
70
67
  } else {
@@ -74,8 +71,6 @@ export default {
74
71
  this.$router.push({ path: '/dsc-index/page', query: query })
75
72
  // this.$router.push({ path: this.firstLeafMenu.fullPath })
76
73
  }
77
- const b = new Date().getTime()
78
- console.log('菜单组件==>created==>b-a', (b - a))
79
74
  }
80
75
  },
81
76
  methods: {
@@ -97,14 +92,11 @@ export default {
97
92
  Cookies.set('selectMenu', index)
98
93
  },
99
94
  getMyFirstMenu(menus) {
100
- const a = new Date().getTime()
101
95
  if (menus && menus.length > 0) {
102
96
  let shouldSelectMenu = this.getFirstMenu(menus)
103
97
  if (!shouldSelectMenu) {
104
98
  shouldSelectMenu = this.getFirstMenuWithCookie(menus)
105
99
  }
106
- const b = new Date().getTime()
107
- console.log('菜单组件==>getMyFirstMenu==>b-a', (b - a))
108
100
  // 默认不展示第一个有权限的菜单了,可以去掉下面的代码
109
101
  // if (!shouldSelectMenu) {
110
102
  // shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
@@ -5,7 +5,7 @@
5
5
  <iframe ref="tabMainContent" :src="getFullPath(tag)" class="tab-main-content" name="tab-main-content" frameborder="0" />
6
6
  </el-tab-pane>
7
7
  </el-tabs>
8
- <div class="default-page-tip">
8
+ <div v-else class="default-page-tip">
9
9
  <div class="default-page-tip-msg">
10
10
  <div class="default-page-tip-item">
11
11
  {{ defaultPageTipCn }}
@@ -14,6 +14,7 @@
14
14
  {{ defaultPageTipEn }}
15
15
  </div>
16
16
  </div>
17
+ <copyright />
17
18
  </div>
18
19
  </div>
19
20
  </template>
@@ -98,11 +99,7 @@ export default {
98
99
  path = src
99
100
  }
100
101
  if (params) {
101
- if (path && path.indexOf('?') > 0) {
102
- path += '&' + params
103
- } else {
104
- path += '?' + params
105
- }
102
+ path += '?' + params
106
103
  }
107
104
  } else {
108
105
  // 表示页面跳转
@@ -143,12 +140,14 @@ export default {
143
140
  }
144
141
  .default-page-tip {
145
142
  width: 100%;
146
- height: 100%;
143
+ position: absolute;
144
+ height: 100vh;
147
145
  background: #f7f7f8;
148
146
  }
149
147
  .default-page-tip-msg {
150
- padding-top: 25%;
151
- padding-bottom: 30%;
148
+ position: absolute;
149
+ width: 100%;
150
+ top: 40%;
152
151
  font-size: 24px;
153
152
  font-weight: 600;
154
153
  text-align: center;
@@ -1,4 +1,7 @@
1
1
  <template>
2
- <router-view />
2
+ <div>
3
+ <router-view />
4
+ <copyright />
5
+ </div>
3
6
  </template>
4
7