imatrix-ui 2.7.98-dw → 2.8.1-dw
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.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/i18n/langs/cn.js +2 -1
- package/src/i18n/langs/en.js +2 -1
- package/src/styles/theme/gray/index.scss +2 -4
- package/src/utils/request.js +12 -2
- package/src/views/dsc-component/Sidebar/Item.vue +7 -2
- package/src/views/dsc-component/Sidebar/index.vue +11 -12
- package/src/views/dsc-component/tabs/tab-content.vue +46 -5
package/package.json
CHANGED
package/src/i18n/langs/cn.js
CHANGED
package/src/i18n/langs/en.js
CHANGED
|
@@ -70,7 +70,8 @@ const en = {
|
|
|
70
70
|
pleaseInputSearchCondition: 'Please enter the query criteria',
|
|
71
71
|
fileUpload: 'File Upload',
|
|
72
72
|
selectYear: 'Select Year',
|
|
73
|
-
search: 'Search'
|
|
73
|
+
search: 'Search',
|
|
74
|
+
forbiddenException: 'You do not have permission to access this resource'
|
|
74
75
|
},
|
|
75
76
|
superGrid: {
|
|
76
77
|
columnConfig: 'Column Config',
|
|
@@ -81,8 +81,6 @@
|
|
|
81
81
|
|
|
82
82
|
.box-card {
|
|
83
83
|
margin: 16px 24px;
|
|
84
|
-
|
|
85
|
-
.el-card__body {}
|
|
86
84
|
}
|
|
87
85
|
}
|
|
88
86
|
|
|
@@ -91,9 +89,9 @@
|
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
.operation-area-chart {
|
|
94
|
-
float: right;
|
|
95
92
|
padding-right: 24px;
|
|
96
|
-
padding-top:
|
|
93
|
+
padding-top: 24px;
|
|
94
|
+
text-align: right;
|
|
97
95
|
}
|
|
98
96
|
|
|
99
97
|
|
package/src/utils/request.js
CHANGED
|
@@ -79,8 +79,18 @@ service.interceptors.response.use(
|
|
|
79
79
|
window.location.href = loginUrl
|
|
80
80
|
})
|
|
81
81
|
}
|
|
82
|
-
} else if (error.response.status ===
|
|
83
|
-
//
|
|
82
|
+
} else if (error.response.status === 403) {
|
|
83
|
+
// ForbiddenException(403) 403没权限
|
|
84
|
+
const message = getI18n().t('imatrixUIMessage.forbiddenException')
|
|
85
|
+
Message({
|
|
86
|
+
showClose: true,
|
|
87
|
+
message: message,
|
|
88
|
+
type: 'error',
|
|
89
|
+
duration: 5 * 1000
|
|
90
|
+
})
|
|
91
|
+
return Promise.reject(error)
|
|
92
|
+
} else if (error.response.status === 400 || error.response.status === 406 || error.response.status === 404) {
|
|
93
|
+
// BadRequestException(400) || BusinessException(406) || ResourceNotFoundException(404)
|
|
84
94
|
let message = error.message
|
|
85
95
|
if (message) {
|
|
86
96
|
// 说明是原生的错误,不要显示,显示“请联系管理员”
|
|
@@ -29,9 +29,14 @@ export default {
|
|
|
29
29
|
if (icon.indexOf('fa-') === 0) {
|
|
30
30
|
// 表示以“fa-”开头,使用font-awesome中的图标
|
|
31
31
|
icon = 'fa ' + icon
|
|
32
|
+
vnodes.push(<div style='display: inline-block;'><i class={icon}/></div>)
|
|
33
|
+
} else if (icon.indexOf('svg-') === 0) {
|
|
34
|
+
icon = icon.substring(icon.indexOf('svg-') + 4)
|
|
35
|
+
vnodes.push(<div style='display: inline-block;'><svg-icon icon-class={icon}/></div>)
|
|
36
|
+
} else {
|
|
37
|
+
icon += ' svg-icon'
|
|
38
|
+
vnodes.push(<div style='display: inline-block;'><i class={icon}/></div>)
|
|
32
39
|
}
|
|
33
|
-
icon += ' svg-icon'
|
|
34
|
-
vnodes.push(<div style='display: inline-block;'><i class={icon}/></div>)
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
if (title) {
|
|
@@ -88,10 +88,14 @@ export default {
|
|
|
88
88
|
},
|
|
89
89
|
getMyFirstMenu(menus) {
|
|
90
90
|
if (menus && menus.length > 0) {
|
|
91
|
-
let shouldSelectMenu = this.
|
|
91
|
+
let shouldSelectMenu = this.getFirstMenu(menus)
|
|
92
92
|
if (!shouldSelectMenu) {
|
|
93
|
-
shouldSelectMenu = this.
|
|
93
|
+
shouldSelectMenu = this.getFirstMenuWithCookie(menus)
|
|
94
94
|
}
|
|
95
|
+
// 默认不展示第一个有权限的菜单了,可以去掉下面的代码
|
|
96
|
+
// if (!shouldSelectMenu) {
|
|
97
|
+
// shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
|
|
98
|
+
// }
|
|
95
99
|
return shouldSelectMenu
|
|
96
100
|
}
|
|
97
101
|
},
|
|
@@ -106,29 +110,24 @@ export default {
|
|
|
106
110
|
break
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
|
-
if (!shouldSelectMenu) {
|
|
110
|
-
// 如果没有获得默认选中的菜单,则默认选中第一个菜单
|
|
111
|
-
shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
|
|
112
|
-
}
|
|
113
113
|
return shouldSelectMenu
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
getShouldSelectMenu(menu) {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
console.log('dsc--getShouldSelectMenu--this.$route=', this.$route)
|
|
118
|
+
const currentMenuCode = this.$route.query ? this.$route.query._menuCode : null
|
|
119
|
+
if (menu && currentMenuCode) {
|
|
119
120
|
let shouldSelectMenu
|
|
120
121
|
const children = menu.children
|
|
121
|
-
const currentRoute = this.$route.path
|
|
122
122
|
if (children && children.length > 0) {
|
|
123
123
|
shouldSelectMenu = this.getFirstMenu(children)
|
|
124
|
-
} else if (menu.
|
|
124
|
+
} else if (menu.code && menu.code === currentMenuCode) {
|
|
125
125
|
shouldSelectMenu = menu
|
|
126
126
|
}
|
|
127
127
|
return shouldSelectMenu
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
getSelectMenuWithFirstMenu(menu) {
|
|
131
|
-
console.log('dsc--getSelectMenuWithFirstMenu--this.$route=', this.$route)
|
|
132
131
|
if (menu) {
|
|
133
132
|
let shouldSelectMenu
|
|
134
133
|
const children = menu.children
|
|
@@ -142,7 +141,7 @@ export default {
|
|
|
142
141
|
},
|
|
143
142
|
getFirstMenuWithCookie(menus) {
|
|
144
143
|
if (menus && menus.length > 0) {
|
|
145
|
-
const cookieMenu = Cookies.
|
|
144
|
+
const cookieMenu = Cookies.get('selectMenu')
|
|
146
145
|
if (cookieMenu) {
|
|
147
146
|
// // 表示缓存中存储了menu,格式为:/dsc/菜单编码~~pageCode
|
|
148
147
|
const prefix = '/dsc/'
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<el-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<el-tabs v-if="openTab && openTab.length > 0" v-model="activeIndex" class="nav-tab menu-tab-container" closable @tab-remove="closeSelectedTag">
|
|
4
|
+
<el-tab-pane v-for="tag in openTab" :key="tag.code" :label="tag.name" :name="tag.code">
|
|
5
|
+
<iframe ref="tabMainContent" :src="getFullPath(tag)" class="tab-main-content" name="tab-main-content" frameborder="0" />
|
|
6
|
+
</el-tab-pane>
|
|
7
|
+
</el-tabs>
|
|
8
|
+
<div class="default-page-tip">
|
|
9
|
+
<div class="default-page-tip-msg">
|
|
10
|
+
<div class="default-page-tip-item">
|
|
11
|
+
{{ defaultPageTipCn }}
|
|
12
|
+
</div>
|
|
13
|
+
<div class="default-page-tip-item">
|
|
14
|
+
{{ defaultPageTipEn }}
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
7
19
|
</template>
|
|
8
20
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
9
21
|
iframe.tab-main-content{
|
|
@@ -12,11 +24,24 @@ iframe.tab-main-content{
|
|
|
12
24
|
}
|
|
13
25
|
</style>
|
|
14
26
|
<script>
|
|
27
|
+
import Vue from 'vue'
|
|
15
28
|
import { mapGetters } from 'vuex'
|
|
16
29
|
export default {
|
|
17
30
|
name: 'TabContent',
|
|
18
31
|
data() {
|
|
32
|
+
let defaultPageTip = Vue.prototype.defaultPageTip
|
|
33
|
+
if (!defaultPageTip) {
|
|
34
|
+
defaultPageTip = '欢迎访问质量管理系统/Welcome to Quality Management System'
|
|
35
|
+
}
|
|
36
|
+
let defaultPageTipCn = defaultPageTip
|
|
37
|
+
let defaultPageTipEn
|
|
38
|
+
if (defaultPageTip && defaultPageTip.indexOf('/') > 0) {
|
|
39
|
+
defaultPageTipCn = defaultPageTip.substring(0, defaultPageTip.lastIndexOf('/'))
|
|
40
|
+
defaultPageTipEn = defaultPageTip.substring(defaultPageTip.lastIndexOf('/') + 1)
|
|
41
|
+
}
|
|
19
42
|
return {
|
|
43
|
+
defaultPageTipCn,
|
|
44
|
+
defaultPageTipEn
|
|
20
45
|
}
|
|
21
46
|
},
|
|
22
47
|
computed: {
|
|
@@ -101,4 +126,20 @@ export default {
|
|
|
101
126
|
.menu-tab-container .el-tabs__content{
|
|
102
127
|
padding: 0;
|
|
103
128
|
}
|
|
129
|
+
.default-page-tip {
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: 100%;
|
|
132
|
+
background: #f7f7f8;
|
|
133
|
+
}
|
|
134
|
+
.default-page-tip-msg {
|
|
135
|
+
padding-top: 25%;
|
|
136
|
+
padding-bottom: 30%;
|
|
137
|
+
font-size: 24px;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
text-align: center;
|
|
140
|
+
color: gray;
|
|
141
|
+
}
|
|
142
|
+
.default-page-tip-item {
|
|
143
|
+
padding-top: 10px;
|
|
144
|
+
}
|
|
104
145
|
</style>
|