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.
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.umd.min.js +5 -35
- package/package.json +2 -2
- package/src/api/sso-service.js +19 -1
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +14 -4
- package/src/i18n/langs/en.js +16 -5
- package/src/permission.js +1 -1
- package/src/plugins.js +3 -3
- package/src/router/index.js +10 -0
- package/src/store/modules/tab-content.js +6 -0
- package/src/store/modules/user.js +19 -0
- package/src/styles/index.scss +74 -4
- package/src/styles/theme/black/font-style.scss +70 -0
- package/src/styles/theme/black/index.scss +6 -30
- package/src/styles/theme/blue/font-style.scss +37 -0
- package/src/styles/theme/blue/index.scss +2 -18
- package/src/styles/theme/blue2/font-style.scss +70 -0
- package/src/styles/theme/blue2/index.scss +3 -13
- package/src/styles/theme/dark-blue/index.scss +27 -5
- package/src/styles/theme/dark-blue/message.scss +8 -0
- package/src/styles/theme/dark-blue/sidebar.scss +7 -37
- package/src/styles/theme/dark-blue/table.scss +1 -1
- package/src/styles/theme/gray/card-style.scss +13 -1
- package/src/styles/theme/gray/font-style.scss +38 -0
- package/src/styles/theme/gray/index.scss +13 -25
- package/src/styles/theme/gray/scrollbar-style.scss +32 -0
- package/src/styles/theme/gray/sidebar.scss +7 -14
- package/src/utils/auth-api.js +45 -1
- package/src/utils/common-util.js +21 -81
- package/src/utils/range-selector.js +185 -0
- package/src/utils/request.js +6 -3
- package/src/utils/util.js +12 -10
- package/src/views/dsc-component/Sidebar/Item.vue +7 -5
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +2 -3
- package/src/views/dsc-component/Sidebar/index.vue +12 -20
- package/src/views/dsc-component/tabs/tab-content.vue +1 -5
- package/src/views/layout/NewLayout.vue +6 -65
- package/src/views/layout/components/Menubar/Item.vue +23 -7
- package/src/views/layout/components/Menubar/Link.vue +11 -2
- package/src/views/layout/components/Menubar/SidebarItem.vue +50 -7
- package/src/views/layout/components/Menubar/index.vue +51 -16
- package/src/views/layout/components/tabs/tab-content.vue +160 -0
- package/src/views/layout/tab-content-iframe-index.vue +31 -0
- package/src/views/layout/tab-content-index.vue +85 -0
- package/src/views/login/index.vue +1 -1
- package/packages/breadcrumb/index.js +0 -6
- package/packages/breadcrumb/src/breadcrumb.vue +0 -71
- package/packages/department-tree/index.js +0 -6
- package/packages/department-tree/src/department-tree.vue +0 -108
- package/packages/department-tree-inline/index.js +0 -6
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -402
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -284
- package/packages/department-tree-inline/src/department-tree-inline.vue +0 -86
- package/packages/department-tree-inline/src/department-tree-service.js +0 -245
- package/packages/department-tree-inline/src/search-result.vue +0 -176
- package/packages/department-user-tree/index.js +0 -6
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -116
- package/packages/department-user-tree/src/department-user-single-tree.vue +0 -76
- package/packages/department-user-tree/src/department-user-tree.vue +0 -101
- package/packages/department-user-tree-inline/index.js +0 -6
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -626
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -269
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -79
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -230
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -122
- package/packages/department-user-tree-inline/src/search-result.vue +0 -197
- package/packages/directives/prevent-reclick.js +0 -19
- package/packages/dynamic-source-select/index.js +0 -6
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -70
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -440
- package/packages/dynamic-source-select/src/events.js +0 -55
- package/packages/fs-preview/index.js +0 -6
- package/packages/fs-preview/src/fs-preview.vue +0 -226
- package/packages/fs-upload/index.js +0 -6
- package/packages/fs-upload/src/fs-upload-multi.vue +0 -420
- package/packages/fs-upload/src/fs-upload-single.vue +0 -312
- package/packages/fs-upload/src/fs-upload.vue +0 -189
- package/packages/fs-upload/src/see-big-picture.vue +0 -55
- package/packages/fs-upload-list/index.js +0 -6
- package/packages/fs-upload-list/src/fs-upload-list.vue +0 -287
- package/packages/hamburger/index.js +0 -6
- package/packages/hamburger/src/hamburger.vue +0 -38
- package/packages/index.js +0 -121
- package/packages/multipart-upload/index.js +0 -6
- package/packages/multipart-upload/src/index.vue +0 -73
- package/packages/multipart-upload/src/multipart-upload-form.vue +0 -297
- package/packages/multipart-upload/src/multipart-upload-list.vue +0 -378
- package/packages/organization-input/index.js +0 -6
- package/packages/organization-input/src/organization-input.vue +0 -542
- package/packages/plugins/export-data-new.js +0 -453
- package/packages/plugins/export-data.js +0 -361
- package/packages/plugins/index.js +0 -15
- package/packages/plugins/public-method.js +0 -43
- package/packages/remove-department/index.js +0 -6
- package/packages/remove-department/src/remove-department.vue +0 -172
- package/packages/remove-department/src/remove-dept-service.js +0 -20
- package/packages/remove-user/index.js +0 -6
- package/packages/remove-user/src/remove-user-service.js +0 -20
- package/packages/remove-user/src/remove-user.vue +0 -195
- package/packages/remove-workgroup/index.js +0 -6
- package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -20
- package/packages/remove-workgroup/src/remove-workgroup.vue +0 -159
- package/packages/rich-editor/index.js +0 -7
- package/packages/rich-editor/index.vue +0 -278
- package/packages/rich-editor/langs/zh-Hans.js +0 -1
- package/packages/rich-editor/viewer.vue +0 -103
- package/packages/scan-code-input/index.js +0 -6
- package/packages/scan-code-input/src/events.js +0 -33
- package/packages/scan-code-input/src/scan-code-input-colse.vue +0 -131
- package/packages/scan-code-input/src/scan-code-input.vue +0 -116
- package/packages/secret-info/index.js +0 -7
- package/packages/secret-info/index.vue +0 -90
- package/packages/super-grid/index.js +0 -7
- package/packages/super-grid/src/apis.js +0 -778
- package/packages/super-grid/src/columns-config.vue +0 -335
- package/packages/super-grid/src/custom-formatter.js +0 -250
- package/packages/super-grid/src/dynamic-input.vue +0 -1279
- package/packages/super-grid/src/eventBus.js +0 -2
- package/packages/super-grid/src/events.js +0 -55
- package/packages/super-grid/src/formValidatorUtil.js +0 -226
- package/packages/super-grid/src/formatter.js +0 -181
- package/packages/super-grid/src/group-column.vue +0 -100
- package/packages/super-grid/src/header-context-menu.vue +0 -87
- package/packages/super-grid/src/index-column.vue +0 -51
- package/packages/super-grid/src/normal-column.vue +0 -769
- package/packages/super-grid/src/public-methods.js +0 -31
- package/packages/super-grid/src/row-operation.vue +0 -161
- package/packages/super-grid/src/search-button.vue +0 -66
- package/packages/super-grid/src/search-condition-input.vue +0 -61
- package/packages/super-grid/src/search-condition-list.vue +0 -59
- package/packages/super-grid/src/search-form-advancedQuery.vue +0 -653
- package/packages/super-grid/src/search-form-dialog.vue +0 -79
- package/packages/super-grid/src/search-form-item.vue +0 -386
- package/packages/super-grid/src/search-form-number.vue +0 -38
- package/packages/super-grid/src/search-form-open.vue +0 -162
- package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -188
- package/packages/super-grid/src/search-form.vue +0 -634
- package/packages/super-grid/src/search-methods.js +0 -387
- package/packages/super-grid/src/selection-column.vue +0 -43
- package/packages/super-grid/src/store.js +0 -3
- package/packages/super-grid/src/super-grid-service.js +0 -561
- package/packages/super-grid/src/super-grid.vue +0 -2829
- package/packages/super-grid/src/utils.js +0 -763
- package/packages/super-grid/src/view-image-dialog.vue +0 -130
- package/packages/super-nine-grid/index.js +0 -7
- package/packages/super-nine-grid/src/apis.js +0 -103
- package/packages/super-nine-grid/src/custom-formatter.js +0 -66
- package/packages/super-nine-grid/src/formatter.js +0 -132
- package/packages/super-nine-grid/src/search-form-number.vue +0 -38
- package/packages/super-nine-grid/src/search-form.vue +0 -430
- package/packages/super-nine-grid/src/search-methods.js +0 -134
- package/packages/super-nine-grid/src/store.js +0 -3
- package/packages/super-nine-grid/src/super-grid-service.js +0 -91
- package/packages/super-nine-grid/src/super-nine-grid.vue +0 -872
- package/packages/super-nine-grid/src/utils.js +0 -261
- package/packages/svg-icon/index.js +0 -6
- package/packages/svg-icon/src/svg-icon.vue +0 -43
- package/packages/utils/utils.js +0 -152
- package/packages/utils/value-set.js +0 -86
- package/packages/valid-code/index.js +0 -7
- package/packages/valid-code/src/valid-code.vue +0 -95
- package/packages/workflow-button/index.js +0 -6
- package/packages/workflow-button/src/workflow-button.vue +0 -325
- package/packages/workflow-history-list/index.js +0 -6
- package/packages/workflow-history-list/src/api.js +0 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +0 -185
- package/packages/workgroup-tree/index.js +0 -6
- package/packages/workgroup-tree/src/workgroup-tree.vue +0 -76
- package/packages/workgroup-tree-inline/index.js +0 -6
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -317
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -43
- package/packages/workgroup-user-tree/index.js +0 -6
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -100
- package/packages/workgroup-user-tree-inline/index.js +0 -6
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -163
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -436
- package/packages/year-range-picker/index.js +0 -6
- package/packages/year-range-picker/src/year-range-picker.vue +0 -51
- package/src/index.js +0 -93
- 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
|
+
}
|
package/src/utils/request.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios from 'axios'
|
|
2
2
|
import {
|
|
3
3
|
Message
|
|
4
|
-
} from '
|
|
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:
|
|
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
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
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中的图标
|
|
30
|
+
// 表示以“fa-”开头,使用font-awesome中的图标
|
|
31
31
|
icon = 'fa ' + icon
|
|
32
|
-
vnodes.push(<div style='display: inline-block;overflow:hidden;'><i class={icon}
|
|
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}
|
|
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
|
|
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"
|
|
12
|
-
<template
|
|
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
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
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
|
|
67
|
-
const query = { src: iframeSrc, customSystem: this.systemCode,
|
|
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])
|
|
@@ -1,77 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<div
|
|
4
|
-
|
|
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 {
|
|
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: '
|
|
12
|
+
name: 'EmptyLayout',
|
|
19
13
|
components: {
|
|
20
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
}
|