imatrix-ui 2.8.19 → 2.8.20-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 -5
- package/package.json +2 -2
- package/src/i18n/langs/cn.js +7 -0
- package/src/i18n/langs/en.js +9 -2
- package/src/router/index.js +10 -0
- package/src/store/modules/tab-content.js +6 -0
- package/src/styles/index.scss +72 -2
- 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 +12 -4
- 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 +5 -0
- package/src/utils/auth-api.js +45 -1
- package/src/utils/common-util.js +11 -0
- package/src/utils/range-selector.js +185 -0
- package/src/utils/request.js +4 -1
- package/src/utils/util.js +2 -2
- 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/styles/theme/gray/form-style.scss +0 -41
|
@@ -29,4 +29,42 @@
|
|
|
29
29
|
color: rgba(0, 13, 31, 0.85);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
.page-layout__title {
|
|
34
|
+
width: 46px;
|
|
35
|
+
height: 16px;
|
|
36
|
+
font-size: 11px;
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
color: #333333;
|
|
39
|
+
line-height: 13px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.component-type-name__title {
|
|
43
|
+
width: 40px;
|
|
44
|
+
height: 14px;
|
|
45
|
+
font-size: 10px;
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
color: #333333;
|
|
48
|
+
line-height: 12px;
|
|
49
|
+
// -webkit-background-clip: text;
|
|
50
|
+
// -webkit-text-fill-color: transparent;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.page-layout__title::before {
|
|
54
|
+
content: "";
|
|
55
|
+
text-align: center;
|
|
56
|
+
background: #1A6BF3;
|
|
57
|
+
float: left;
|
|
58
|
+
position: relative;
|
|
59
|
+
border-radius: 3px;
|
|
60
|
+
/** 定义成 block 元素 **/
|
|
61
|
+
display: block;
|
|
62
|
+
// height: 21px;
|
|
63
|
+
// width: 4px;
|
|
64
|
+
margin-right: 12px;
|
|
65
|
+
|
|
66
|
+
width: 2px;
|
|
67
|
+
height: 16px;
|
|
68
|
+
|
|
69
|
+
}
|
|
32
70
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@import './card-style.scss';
|
|
4
4
|
@import './tab-style.scss';
|
|
5
5
|
@import './input-style.scss';
|
|
6
|
-
@import './
|
|
6
|
+
@import './scrollbar-style.scss';
|
|
7
7
|
|
|
8
8
|
.gray {
|
|
9
9
|
font-family: microsoft yahei, Arial, Helvetica, sans-serif;
|
|
@@ -76,8 +76,9 @@
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.app-container {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
padding: 20px;
|
|
80
|
+
border-radius: 6px;
|
|
81
|
+
box-shadow: 0px 1px 8px 0px #00000019;
|
|
81
82
|
|
|
82
83
|
.box-card {
|
|
83
84
|
margin: 16px 24px;
|
|
@@ -95,26 +96,6 @@
|
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
|
|
98
|
-
.form-container {
|
|
99
|
-
height: calc(100vh - 82px);
|
|
100
|
-
overflow: auto;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.form-container .el-form .el-card {
|
|
104
|
-
margin-bottom: 10px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.form-container .el-form .el-card:last-child {
|
|
108
|
-
margin-bottom: 0;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// 带有tab页签的表单高度
|
|
112
|
-
.tab-form-container {
|
|
113
|
-
height: calc(100vh - 190px);
|
|
114
|
-
overflow: auto;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
99
|
// 解决tab页签中内容多时没有滚动条问题
|
|
119
100
|
.el-tabs__content {
|
|
120
101
|
flex-grow: 1;
|
|
@@ -173,12 +154,19 @@
|
|
|
173
154
|
.el-table th {
|
|
174
155
|
padding: 0;
|
|
175
156
|
}
|
|
157
|
+
|
|
176
158
|
/**表格内容纵向分隔线去掉**/
|
|
177
|
-
.el-table--border td,
|
|
159
|
+
.el-table--border td,
|
|
160
|
+
.el-table--border th,
|
|
161
|
+
.el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed {
|
|
178
162
|
border-right: 0px
|
|
179
163
|
}
|
|
164
|
+
|
|
180
165
|
/**表格标题纵向分隔线颜色调浅点儿**/
|
|
181
|
-
.el-table--border td,
|
|
166
|
+
.el-table--border td,
|
|
167
|
+
.el-table--border th,
|
|
168
|
+
.el-table--border th.is-leaf,
|
|
169
|
+
.el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed {
|
|
182
170
|
border-right: 1px solid #fefefe;
|
|
183
171
|
}
|
|
184
172
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.dark-blue {
|
|
2
|
+
|
|
3
|
+
// 滚动条基础样式
|
|
4
|
+
::-webkit-scrollbar {
|
|
5
|
+
width: 6px; // 纵向的宽度
|
|
6
|
+
height: 8px; // 横向的高度
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// 默认下滚动条的样式
|
|
10
|
+
::-webkit-scrollbar-thumb {
|
|
11
|
+
background: #eaeaea;
|
|
12
|
+
border: none;
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// 鼠标悬停在滚动条时的样式
|
|
17
|
+
::-webkit-scrollbar-thumb:hover {
|
|
18
|
+
background: rgba(157, 165, 183, 0.7)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 滚动条区域 空白地方的样式
|
|
22
|
+
::-webkit-scrollbar-track {
|
|
23
|
+
background-color: transparent;
|
|
24
|
+
border: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 鼠标悬停在滚动条时 滚动条区域 空白地方的样式
|
|
28
|
+
::-webkit-scrollbar-track:hover {
|
|
29
|
+
background-color: #eaeaea;
|
|
30
|
+
border: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
package/src/utils/auth-api.js
CHANGED
|
@@ -4,6 +4,7 @@ import Vue from 'vue'
|
|
|
4
4
|
const jwtKey = 'JWT'
|
|
5
5
|
const currentUserNameKey = 'USERNAME'
|
|
6
6
|
const currentUserInfoKey = 'CURRENT_USER'
|
|
7
|
+
const currentSystemUrlKey = 'CURRENT_SYSTEM_URL_'
|
|
7
8
|
|
|
8
9
|
function getToken() {
|
|
9
10
|
let token = getCookieCache(jwtKey)
|
|
@@ -96,6 +97,45 @@ function setSessionCache(key, value) {
|
|
|
96
97
|
function removeSessionCache(key) {
|
|
97
98
|
sessionStorage.removeItem(key)
|
|
98
99
|
}
|
|
100
|
+
|
|
101
|
+
function getSystemCacheUrlByCode(systemCode) {
|
|
102
|
+
if (!systemCode) {
|
|
103
|
+
systemCode = Vue.prototype.customSystem
|
|
104
|
+
}
|
|
105
|
+
if (!systemCode) {
|
|
106
|
+
systemCode = Vue.prototype.systemCode
|
|
107
|
+
}
|
|
108
|
+
if (systemCode) {
|
|
109
|
+
const systemUrls = getSystemCacheUrl()
|
|
110
|
+
if (systemUrls) {
|
|
111
|
+
return systemUrls[systemCode]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function getSystemCacheUrl() {
|
|
117
|
+
let systemUrlJson = getCookieCache(currentSystemUrlKey)
|
|
118
|
+
if (!systemUrlJson) {
|
|
119
|
+
systemUrlJson = getSessionCache(currentSystemUrlKey)
|
|
120
|
+
}
|
|
121
|
+
if (systemUrlJson) {
|
|
122
|
+
return JSON.parse(systemUrlJson)
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function setSystemCacheUrl(systemUrlObj) {
|
|
127
|
+
if (systemUrlObj) {
|
|
128
|
+
const systemUrlStr = JSON.stringify(systemUrlObj)
|
|
129
|
+
setSessionCache(currentSystemUrlKey, systemUrlStr)
|
|
130
|
+
setCookieCache(currentSystemUrlKey, systemUrlStr)
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function removeSystemCacheUrl() {
|
|
135
|
+
removeSessionCache(currentSystemUrlKey)
|
|
136
|
+
removeCookieCache(currentSystemUrlKey)
|
|
137
|
+
}
|
|
138
|
+
|
|
99
139
|
export default {
|
|
100
140
|
getToken,
|
|
101
141
|
setToken,
|
|
@@ -111,5 +151,9 @@ export default {
|
|
|
111
151
|
removeCookieCache,
|
|
112
152
|
getSessionCache,
|
|
113
153
|
setSessionCache,
|
|
114
|
-
removeSessionCache
|
|
154
|
+
removeSessionCache,
|
|
155
|
+
getSystemCacheUrlByCode,
|
|
156
|
+
getSystemCacheUrl,
|
|
157
|
+
setSystemCacheUrl,
|
|
158
|
+
removeSystemCacheUrl
|
|
115
159
|
}
|
package/src/utils/common-util.js
CHANGED
|
@@ -223,3 +223,14 @@ export function getTimeZone() {
|
|
|
223
223
|
}
|
|
224
224
|
return timeZone
|
|
225
225
|
}
|
|
226
|
+
|
|
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
|
+
if (backendUrl) {
|
|
233
|
+
Vue.prototype.baseURL = getRelativeBaseUrl(backendUrl)
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -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
|
@@ -14,7 +14,8 @@ 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({
|
|
@@ -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
|
@@ -452,11 +452,11 @@ export function getEntityFieldValueWithOutCase(entity, prop) {
|
|
|
452
452
|
*/
|
|
453
453
|
export function getEntityFieldValue(entity, prop, isLowerCase) {
|
|
454
454
|
let value = getEntityFieldValueWithCase(entity, prop)
|
|
455
|
-
if (value === undefined) {
|
|
455
|
+
if (value === undefined || value === null) {
|
|
456
456
|
// 兼容mysql数据库
|
|
457
457
|
value = getEntityFieldValueWithCase(entity, prop.toLowerCase())
|
|
458
458
|
}
|
|
459
|
-
if (value === undefined && isLowerCase === undefined) {
|
|
459
|
+
if (value === undefined || value === null && isLowerCase === undefined) {
|
|
460
460
|
// 兼容oracle数据库
|
|
461
461
|
value = getEntityFieldValueWithCase(entity, prop.toUpperCase())
|
|
462
462
|
}
|
|
@@ -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
|
}
|