imatrix-ui 2.9.10-dw → 2.9.11-boe2

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 (181) 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/i18n/i18n.js +1 -1
  6. package/src/i18n/langs/cn.js +14 -4
  7. package/src/i18n/langs/en.js +16 -5
  8. package/src/permission.js +1 -1
  9. package/src/plugins.js +3 -3
  10. package/src/router/index.js +10 -0
  11. package/src/store/modules/tab-content.js +6 -0
  12. package/src/store/modules/user.js +19 -0
  13. package/src/styles/index.scss +74 -4
  14. package/src/styles/theme/black/font-style.scss +70 -0
  15. package/src/styles/theme/black/index.scss +6 -30
  16. package/src/styles/theme/blue/font-style.scss +37 -0
  17. package/src/styles/theme/blue/index.scss +2 -18
  18. package/src/styles/theme/blue2/font-style.scss +70 -0
  19. package/src/styles/theme/blue2/index.scss +3 -13
  20. package/src/styles/theme/dark-blue/index.scss +27 -5
  21. package/src/styles/theme/dark-blue/message.scss +8 -0
  22. package/src/styles/theme/dark-blue/sidebar.scss +7 -37
  23. package/src/styles/theme/dark-blue/table.scss +1 -1
  24. package/src/styles/theme/gray/card-style.scss +13 -1
  25. package/src/styles/theme/gray/font-style.scss +38 -0
  26. package/src/styles/theme/gray/index.scss +13 -25
  27. package/src/styles/theme/gray/scrollbar-style.scss +32 -0
  28. package/src/styles/theme/gray/sidebar.scss +7 -14
  29. package/src/utils/auth-api.js +45 -1
  30. package/src/utils/common-util.js +21 -81
  31. package/src/utils/range-selector.js +185 -0
  32. package/src/utils/request.js +6 -3
  33. package/src/utils/util.js +12 -10
  34. package/src/views/dsc-component/Sidebar/Item.vue +7 -5
  35. package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
  36. package/src/views/dsc-component/Sidebar/index.vue +12 -20
  37. package/src/views/dsc-component/tabs/tab-content.vue +1 -5
  38. package/src/views/layout/NewLayout.vue +6 -65
  39. package/src/views/layout/components/Menubar/Item.vue +23 -7
  40. package/src/views/layout/components/Menubar/Link.vue +11 -2
  41. package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
  42. package/src/views/layout/components/Menubar/index.vue +51 -16
  43. package/src/views/layout/components/tabs/tab-content.vue +160 -0
  44. package/src/views/layout/tab-content-iframe-index.vue +31 -0
  45. package/src/views/layout/tab-content-index.vue +85 -0
  46. package/src/views/login/index.vue +1 -1
  47. package/packages/breadcrumb/index.js +0 -6
  48. package/packages/breadcrumb/src/breadcrumb.vue +0 -71
  49. package/packages/department-tree/index.js +0 -6
  50. package/packages/department-tree/src/department-tree.vue +0 -108
  51. package/packages/department-tree-inline/index.js +0 -6
  52. package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -402
  53. package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -284
  54. package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
  55. package/packages/department-tree-inline/src/department-tree-service.js +0 -245
  56. package/packages/department-tree-inline/src/search-result.vue +0 -176
  57. package/packages/department-user-tree/index.js +0 -6
  58. package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
  59. package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
  60. package/packages/department-user-tree/src/department-user-tree.vue +0 -101
  61. package/packages/department-user-tree-inline/index.js +0 -6
  62. package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -626
  63. package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -269
  64. package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
  65. package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -230
  66. package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -122
  67. package/packages/department-user-tree-inline/src/search-result.vue +0 -197
  68. package/packages/directives/prevent-reclick.js +0 -19
  69. package/packages/dynamic-source-select/index.js +0 -6
  70. package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
  71. package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
  72. package/packages/dynamic-source-select/src/events.js +0 -55
  73. package/packages/fs-preview/index.js +0 -6
  74. package/packages/fs-preview/src/fs-preview.vue +0 -226
  75. package/packages/fs-upload/index.js +0 -6
  76. package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
  77. package/packages/fs-upload/src/fs-upload-single.vue +0 -312
  78. package/packages/fs-upload/src/fs-upload.vue +0 -189
  79. package/packages/fs-upload/src/see-big-picture.vue +0 -55
  80. package/packages/fs-upload-list/index.js +0 -6
  81. package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
  82. package/packages/hamburger/index.js +0 -6
  83. package/packages/hamburger/src/hamburger.vue +0 -38
  84. package/packages/index.js +0 -121
  85. package/packages/multipart-upload/index.js +0 -6
  86. package/packages/multipart-upload/src/index.vue +0 -73
  87. package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
  88. package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
  89. package/packages/organization-input/index.js +0 -6
  90. package/packages/organization-input/src/organization-input.vue +0 -542
  91. package/packages/plugins/export-data-new.js +0 -453
  92. package/packages/plugins/export-data.js +0 -361
  93. package/packages/plugins/index.js +0 -15
  94. package/packages/plugins/public-method.js +0 -43
  95. package/packages/remove-department/index.js +0 -6
  96. package/packages/remove-department/src/remove-department.vue +0 -172
  97. package/packages/remove-department/src/remove-dept-service.js +0 -20
  98. package/packages/remove-user/index.js +0 -6
  99. package/packages/remove-user/src/remove-user-service.js +0 -20
  100. package/packages/remove-user/src/remove-user.vue +0 -195
  101. package/packages/remove-workgroup/index.js +0 -6
  102. package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
  103. package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
  104. package/packages/rich-editor/index.js +0 -7
  105. package/packages/rich-editor/index.vue +0 -278
  106. package/packages/rich-editor/langs/zh-Hans.js +0 -1
  107. package/packages/rich-editor/viewer.vue +0 -103
  108. package/packages/scan-code-input/index.js +0 -6
  109. package/packages/scan-code-input/src/events.js +0 -33
  110. package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
  111. package/packages/scan-code-input/src/scan-code-input.vue +0 -116
  112. package/packages/secret-info/index.js +0 -7
  113. package/packages/secret-info/index.vue +0 -90
  114. package/packages/super-grid/index.js +0 -7
  115. package/packages/super-grid/src/apis.js +0 -778
  116. package/packages/super-grid/src/columns-config.vue +0 -335
  117. package/packages/super-grid/src/custom-formatter.js +0 -250
  118. package/packages/super-grid/src/dynamic-input.vue +0 -1279
  119. package/packages/super-grid/src/eventBus.js +0 -2
  120. package/packages/super-grid/src/events.js +0 -55
  121. package/packages/super-grid/src/formValidatorUtil.js +0 -226
  122. package/packages/super-grid/src/formatter.js +0 -181
  123. package/packages/super-grid/src/group-column.vue +0 -100
  124. package/packages/super-grid/src/header-context-menu.vue +0 -87
  125. package/packages/super-grid/src/index-column.vue +0 -51
  126. package/packages/super-grid/src/normal-column.vue +0 -769
  127. package/packages/super-grid/src/public-methods.js +0 -31
  128. package/packages/super-grid/src/row-operation.vue +0 -161
  129. package/packages/super-grid/src/search-button.vue +0 -66
  130. package/packages/super-grid/src/search-condition-input.vue +0 -61
  131. package/packages/super-grid/src/search-condition-list.vue +0 -59
  132. package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
  133. package/packages/super-grid/src/search-form-dialog.vue +0 -79
  134. package/packages/super-grid/src/search-form-item.vue +0 -386
  135. package/packages/super-grid/src/search-form-number.vue +0 -38
  136. package/packages/super-grid/src/search-form-open.vue +0 -162
  137. package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -188
  138. package/packages/super-grid/src/search-form.vue +0 -634
  139. package/packages/super-grid/src/search-methods.js +0 -387
  140. package/packages/super-grid/src/selection-column.vue +0 -43
  141. package/packages/super-grid/src/store.js +0 -3
  142. package/packages/super-grid/src/super-grid-service.js +0 -561
  143. package/packages/super-grid/src/super-grid.vue +0 -2829
  144. package/packages/super-grid/src/utils.js +0 -763
  145. package/packages/super-grid/src/view-image-dialog.vue +0 -130
  146. package/packages/super-nine-grid/index.js +0 -7
  147. package/packages/super-nine-grid/src/apis.js +0 -103
  148. package/packages/super-nine-grid/src/custom-formatter.js +0 -66
  149. package/packages/super-nine-grid/src/formatter.js +0 -132
  150. package/packages/super-nine-grid/src/search-form-number.vue +0 -38
  151. package/packages/super-nine-grid/src/search-form.vue +0 -430
  152. package/packages/super-nine-grid/src/search-methods.js +0 -134
  153. package/packages/super-nine-grid/src/store.js +0 -3
  154. package/packages/super-nine-grid/src/super-grid-service.js +0 -91
  155. package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
  156. package/packages/super-nine-grid/src/utils.js +0 -261
  157. package/packages/svg-icon/index.js +0 -6
  158. package/packages/svg-icon/src/svg-icon.vue +0 -43
  159. package/packages/utils/utils.js +0 -152
  160. package/packages/utils/value-set.js +0 -86
  161. package/packages/valid-code/index.js +0 -7
  162. package/packages/valid-code/src/valid-code.vue +0 -95
  163. package/packages/workflow-button/index.js +0 -6
  164. package/packages/workflow-button/src/workflow-button.vue +0 -325
  165. package/packages/workflow-history-list/index.js +0 -6
  166. package/packages/workflow-history-list/src/api.js +0 -7
  167. package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
  168. package/packages/workgroup-tree/index.js +0 -6
  169. package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
  170. package/packages/workgroup-tree-inline/index.js +0 -6
  171. package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
  172. package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
  173. package/packages/workgroup-user-tree/index.js +0 -6
  174. package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
  175. package/packages/workgroup-user-tree-inline/index.js +0 -6
  176. package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
  177. package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
  178. package/packages/year-range-picker/index.js +0 -6
  179. package/packages/year-range-picker/src/year-range-picker.vue +0 -51
  180. package/src/index.js +0 -93
  181. package/src/styles/theme/gray/form-style.scss +0 -41
@@ -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
  * 根据动态数据源获得下拉选的选项集合
@@ -274,12 +274,14 @@ function getValueByField(entityData, fieldName) {
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]
@@ -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])
@@ -98,11 +98,7 @@ export default {
98
98
  path = src
99
99
  }
100
100
  if (params) {
101
- if (path && path.indexOf('?') > 0) {
102
- path += '&' + params
103
- } else {
104
- path += '?' + params
105
- }
101
+ path += '?' + params
106
102
  }
107
103
  } else {
108
104
  // 表示页面跳转
@@ -1,77 +1,18 @@
1
1
  <template>
2
- <div :class="classObj" class="app-wrapper">
3
- <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
4
- <menubar class="sidebar-container" />
5
- <div class="main-container">
6
- <breadcrumb v-if="showMenuRoute" />
2
+ <div class="app-wrapper">
3
+ <div class="tab-main-container">
4
+ <!-- <tab-content/> -->
7
5
  <app-main />
8
6
  </div>
9
7
  </div>
10
8
  </template>
11
-
12
9
  <script>
13
- import { Menubar, AppMain, Breadcrumb } from './components'
14
- import ResizeMixin from './mixin/ResizeHandler'
15
- import { isShowMenuRoute } from '../../../src/utils/common-util'
16
-
10
+ import { AppMain } from './components'
17
11
  export default {
18
- name: 'Layout',
12
+ name: 'EmptyLayout',
19
13
  components: {
20
- Menubar,
21
- AppMain,
22
- Breadcrumb
23
- },
24
- mixins: [ResizeMixin],
25
- data() {
26
- // 是否显示菜单路径,默认是不显示
27
- const showMenuRoute = isShowMenuRoute()
28
- return {
29
- showMenuRoute
30
- }
31
- },
32
- computed: {
33
- sidebar() {
34
- return this.$store.state.app.sidebar
35
- },
36
- device() {
37
- return this.$store.state.app.device
38
- },
39
- classObj() {
40
- return {
41
- hideSidebar: !this.sidebar.opened,
42
- openSidebar: this.sidebar.opened,
43
- withoutAnimation: this.sidebar.withoutAnimation,
44
- mobile: this.device === 'mobile'
45
- }
46
- }
47
- },
48
- methods: {
49
- handleClickOutside() {
50
- this.$store.dispatch('closeSidebar', { withoutAnimation: false })
51
- }
14
+ AppMain
52
15
  }
53
16
  }
54
17
  </script>
55
18
 
56
- <style rel="stylesheet/scss" lang="scss" scoped>
57
- @import "../../styles/mixin.scss";
58
- .app-wrapper {
59
- @include clearfix;
60
- position: relative;
61
- height: 100%;
62
- width: 100%;
63
- &.mobile.openSidebar{
64
- position: fixed;
65
- top: 0;
66
- }
67
- }
68
- .drawer-bg {
69
- background: #000;
70
- opacity: 0.3;
71
- width: 100%;
72
- top: 0;
73
- height: 100%;
74
- position: absolute;
75
- z-index: 999;
76
- }
77
- </style>
@@ -14,20 +14,28 @@ export default {
14
14
  hasChildren: {
15
15
  type: Boolean,
16
16
  default: false
17
+ },
18
+ isRoot: {
19
+ type: Boolean,
20
+ default: false
17
21
  }
18
22
  },
19
23
  render(h, context) {
24
+ const { title, hasChildren, isRoot } = context.props
20
25
  let icon = context.props.icon
21
- const { title, hasChildren } = context.props
22
26
  const vnodes = []
23
-
24
27
  if (icon) {
25
28
  if (icon.indexOf('fa-') === 0) {
26
29
  // 表示以“fa-”开头,使用font-awesome中的图标
27
30
  icon = 'fa ' + icon
31
+ vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon}/></div>)
32
+ } else if (icon.indexOf('svg-') === 0) {
33
+ icon = icon.substring(icon.indexOf('svg-') + 4)
34
+ vnodes.push(<div style='display: inline-block;overflow:hidden;'><svg-icon icon-class={icon}/></div>)
35
+ } else {
36
+ icon += ' svg-icon'
37
+ vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon} /></div>)
28
38
  }
29
- icon += ' svg-icon'
30
- vnodes.push(<div style='display: inline-block;'><i class={icon}/></div>)
31
39
  }
32
40
 
33
41
  if (title) {
@@ -36,9 +44,17 @@ export default {
36
44
  // 当是父菜单时,为了使后面的三角能显示出来,需要将宽度设小点
37
45
  width = '100px'
38
46
  }
39
- vnodes.push(<div slot='title' style='display: inline-block'>
40
- <div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>{(title)}</div>
41
- </div>)
47
+ if (isRoot) {
48
+ // 是否是根目录,没有子菜单时
49
+ vnodes.push(<div style='display: inline-block'>
50
+ <div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>{(title)}</div>
51
+ </div>)
52
+ } else {
53
+ // 有子菜单时
54
+ vnodes.push(<div slot='title' style='display: inline-block'>
55
+ <div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>{(title)}</div>
56
+ </div>)
57
+ }
42
58
  }
43
59
  return vnodes
44
60
  }
@@ -6,9 +6,12 @@
6
6
  <slot />
7
7
  </a> -->
8
8
 
9
- <router-link :to="to">
9
+ <router-link v-if="!isOpenNewTab" :to="to">
10
10
  <slot />
11
11
  </router-link>
12
+ <div v-else>
13
+ <slot />
14
+ </div>
12
15
  </div>
13
16
  </template>
14
17
 
@@ -23,8 +26,14 @@ export default {
23
26
  },
24
27
  data() {
25
28
  const isExter = this.to.isExternal
29
+ const openWay = this.to.openWay
30
+ let isOpenNewTab = false
31
+ if (openWay && openWay === 'NEW_PAGE_OPEN') {
32
+ isOpenNewTab = true
33
+ }
26
34
  return {
27
- isExter
35
+ isExter,
36
+ isOpenNewTab
28
37
  }
29
38
  }
30
39
  }