imatrix-ui 2.8.5-tmp2 → 2.8.5-tmp4
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 +4 -4
- package/package.json +1 -1
- package/src/router/index.js +10 -0
- package/src/store/modules/tab-content.js +6 -0
- package/src/styles/theme/dark-blue/button.scss +9 -0
- package/src/styles/theme/dark-blue/{card-style.scss → card.scss} +9 -1
- package/src/styles/theme/dark-blue/checkbox.scss +10 -0
- package/src/styles/theme/dark-blue/dark-blue-var.scss +8 -0
- package/src/styles/theme/dark-blue/dialog.scss +21 -0
- package/src/styles/theme/dark-blue/element-variables.scss +6 -9
- package/src/styles/theme/dark-blue/index.scss +35 -10
- package/src/styles/theme/dark-blue/pagination.scss +14 -0
- package/src/styles/theme/dark-blue/scrollbar-style.scss +32 -0
- package/src/styles/theme/dark-blue/sidebar.scss +1 -1
- package/src/styles/theme/dark-blue/table.scss +56 -0
- package/src/styles/theme/gray/index.scss +10 -2
- package/src/styles/theme/gray/scrollbar-style.scss +32 -0
- package/src/views/layout/NewLayout.vue +6 -65
- package/src/views/layout/components/Menubar/Item.vue +17 -4
- 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 +161 -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/dark-blue/{font-style.scss → font.scss} +0 -0
- /package/src/styles/theme/dark-blue/{form-style.scss → form.scss} +0 -0
- /package/src/styles/theme/dark-blue/{input-style.scss → input.scss} +0 -0
- /package/src/styles/theme/dark-blue/{tab-style.scss → tab.scss} +0 -0
package/package.json
CHANGED
package/src/router/index.js
CHANGED
|
@@ -69,6 +69,16 @@ export const publicRouterMap = [
|
|
|
69
69
|
path: '/show-sub-wf-history',
|
|
70
70
|
component: () => import('../views/wf-history/tache-subprocess-history'),
|
|
71
71
|
hidden: true
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
path: '/tab-content-index',
|
|
75
|
+
component: () => import('../views/layout/tab-content-index'),
|
|
76
|
+
hidden: true
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
path: '/tab-content-iframe-index',
|
|
80
|
+
component: () => import('../views/layout/tab-content-iframe-index'),
|
|
81
|
+
hidden: true
|
|
72
82
|
}
|
|
73
83
|
|
|
74
84
|
]
|
|
@@ -22,6 +22,12 @@ const tabContent = {
|
|
|
22
22
|
// 设置当前激活的tab
|
|
23
23
|
set_active_index(state, index) {
|
|
24
24
|
state.activeIndex = index
|
|
25
|
+
},
|
|
26
|
+
// 清空tabs
|
|
27
|
+
clear_tabs(state, route) {
|
|
28
|
+
if (state.openTab.length > 0) {
|
|
29
|
+
state.openTab.splice(0, state.openTab.length)
|
|
30
|
+
}
|
|
25
31
|
}
|
|
26
32
|
},
|
|
27
33
|
actions: {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
.platform {
|
|
43
|
+
.platform-card {
|
|
44
44
|
.el-card__header {
|
|
45
45
|
height: 40px;
|
|
46
46
|
background: #F0F8FE;
|
|
@@ -51,6 +51,14 @@
|
|
|
51
51
|
text-align: left;
|
|
52
52
|
padding: 9px 0px 9px 20px;
|
|
53
53
|
}
|
|
54
|
+
|
|
55
|
+
.el-card__header>div {
|
|
56
|
+
line-height: 22px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.card-style {
|
|
60
|
+
margin-top: 20px;
|
|
61
|
+
}
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* 改变主题色变量 */
|
|
2
|
+
$--color-primary: #005EBA;
|
|
3
|
+
$--button-default-border-color: $--color-primary;
|
|
4
|
+
$--button-default-font-color: $--color-primary;
|
|
5
|
+
$--button-font-weight: regular;
|
|
6
|
+
$--button-default-font-color: $--color-primary;
|
|
7
|
+
$--button-opt-background-color:#0780ED;
|
|
8
|
+
$th-cell-background: #F0F8FE;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.dark-blue {
|
|
2
|
+
.el-dialog__header {
|
|
3
|
+
padding: 22px 0px 0px 24px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.el-dialog__title::before {
|
|
7
|
+
content: "";
|
|
8
|
+
text-align: center;
|
|
9
|
+
background: #1A6BF3;
|
|
10
|
+
float: left;
|
|
11
|
+
position: relative;
|
|
12
|
+
border-radius: 3px;
|
|
13
|
+
/** 定义成 block 元素 **/
|
|
14
|
+
display: block;
|
|
15
|
+
height: 21px;
|
|
16
|
+
width: 4px;
|
|
17
|
+
margin-right: 12px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
$--color-primary: #0780ED;
|
|
3
|
-
$--button-default-border-color: #005EBA;
|
|
4
|
-
$--button-default-font-color: #005EBA;
|
|
5
|
-
$--button-font-weight: regular;
|
|
1
|
+
@import "./dark-blue-var.scss";
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@import "~element-ui/packages/theme-chalk/src/index";
|
|
3
|
+
.dark-blue {
|
|
4
|
+
/* 改变 icon 字体路径变量,必需 */
|
|
5
|
+
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
|
6
|
+
@import "~element-ui/packages/theme-chalk/src/index";
|
|
7
|
+
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
@import './sidebar.scss';
|
|
2
|
-
@import './font-style.scss';
|
|
3
|
-
@import './card-style.scss';
|
|
4
|
-
@import './tab-style.scss';
|
|
5
|
-
@import './input-style.scss';
|
|
6
|
-
@import './form-style.scss';
|
|
7
1
|
@import './element-variables.scss';
|
|
2
|
+
@import './table.scss';
|
|
3
|
+
@import './sidebar.scss';
|
|
4
|
+
@import './font.scss';
|
|
5
|
+
@import './card.scss';
|
|
6
|
+
@import './tab.scss';
|
|
7
|
+
@import './input.scss';
|
|
8
|
+
@import './form.scss';
|
|
9
|
+
@import './pagination.scss';
|
|
10
|
+
@import './button.scss';
|
|
11
|
+
@import './checkbox.scss';
|
|
12
|
+
@import './dialog.scss';
|
|
13
|
+
@import './scrollbar-style.scss';
|
|
14
|
+
|
|
8
15
|
|
|
9
16
|
.dark-blue {
|
|
10
17
|
font-family: cursive;
|
|
@@ -78,12 +85,15 @@
|
|
|
78
85
|
.app-main {
|
|
79
86
|
min-height: 100%;
|
|
80
87
|
background: #f7f7f8;
|
|
81
|
-
padding
|
|
88
|
+
padding: 11px 24px 11px 24px;
|
|
89
|
+
// padding-top: 12px;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
.app-container {
|
|
85
93
|
// padding: 20px;
|
|
86
|
-
padding: 0px;
|
|
94
|
+
// padding: 0px;
|
|
95
|
+
padding: 20px 24px;
|
|
96
|
+
background: #FFFFFF;
|
|
87
97
|
|
|
88
98
|
.box-card {
|
|
89
99
|
margin: 0px 24px 0px 0px;
|
|
@@ -92,6 +102,7 @@
|
|
|
92
102
|
|
|
93
103
|
.operation-area {
|
|
94
104
|
margin-bottom: 20px;
|
|
105
|
+
|
|
95
106
|
}
|
|
96
107
|
|
|
97
108
|
.operation-area-chart {
|
|
@@ -145,7 +156,11 @@
|
|
|
145
156
|
}
|
|
146
157
|
|
|
147
158
|
.el-tree-node.is-current>.el-tree-node__content {
|
|
148
|
-
background
|
|
159
|
+
background: $th-cell-background;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.el-tree-node__content:hover {
|
|
163
|
+
background-color: $th-cell-background;
|
|
149
164
|
}
|
|
150
165
|
|
|
151
166
|
.menu-tab-container .el-tabs__item {
|
|
@@ -173,7 +188,7 @@
|
|
|
173
188
|
|
|
174
189
|
.el-table td,
|
|
175
190
|
.el-table th {
|
|
176
|
-
height:
|
|
191
|
+
height: 40px;
|
|
177
192
|
}
|
|
178
193
|
|
|
179
194
|
.el-table th {
|
|
@@ -194,4 +209,14 @@
|
|
|
194
209
|
.el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed {
|
|
195
210
|
border-right: 1px solid #fefefe;
|
|
196
211
|
}
|
|
212
|
+
|
|
213
|
+
.selectPeopleClass {
|
|
214
|
+
color: #313233;
|
|
215
|
+
font-family: Source Han Sans CN;
|
|
216
|
+
font-weight: regular;
|
|
217
|
+
font-size: 14px;
|
|
218
|
+
line-height: 22px;
|
|
219
|
+
letter-spacing: 0px;
|
|
220
|
+
text-align: left;
|
|
221
|
+
}
|
|
197
222
|
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@import "./dark-blue-var.scss";
|
|
2
|
+
|
|
3
|
+
.dark-blue {
|
|
4
|
+
|
|
5
|
+
$table-cell-font-color: #313233;
|
|
6
|
+
|
|
7
|
+
// 表头背景颜色
|
|
8
|
+
.el-table__header-wrapper {
|
|
9
|
+
background: $th-cell-background;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.el-table th.el-table__cell {
|
|
13
|
+
background: $th-cell-background;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.el-table thead.is-group th.el-table__cell {
|
|
17
|
+
background: $th-cell-background;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.el-table .el-table__cell {
|
|
21
|
+
padding: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 表头字体样式
|
|
25
|
+
.el-table th.el-table__cell>.cell {
|
|
26
|
+
color: $table-cell-font-color;
|
|
27
|
+
font-family: Source Han Sans CN;
|
|
28
|
+
font-weight: medium;
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
line-height: 22px;
|
|
31
|
+
letter-spacing: 0px;
|
|
32
|
+
text-align: left;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// 表格内容颜色
|
|
36
|
+
.el-table .cell {
|
|
37
|
+
color: $table-cell-font-color;
|
|
38
|
+
font-family: Source Han Sans CN;
|
|
39
|
+
font-weight: regular;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
line-height: 22px;
|
|
42
|
+
letter-spacing: 0px;
|
|
43
|
+
text-align: left;
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.el-button--text {
|
|
48
|
+
color: $--color-primary;
|
|
49
|
+
font-family: Source Han Sans CN;
|
|
50
|
+
font-weight: regular;
|
|
51
|
+
font-size: 14px;
|
|
52
|
+
line-height: 22px;
|
|
53
|
+
letter-spacing: 0px;
|
|
54
|
+
text-align: center;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@import './tab-style.scss';
|
|
5
5
|
@import './input-style.scss';
|
|
6
6
|
@import './form-style.scss';
|
|
7
|
+
@import './scrollbar-style.scss';
|
|
7
8
|
|
|
8
9
|
.gray {
|
|
9
10
|
font-family: microsoft yahei, Arial, Helvetica, sans-serif;
|
|
@@ -173,12 +174,19 @@
|
|
|
173
174
|
.el-table th {
|
|
174
175
|
padding: 0;
|
|
175
176
|
}
|
|
177
|
+
|
|
176
178
|
/**表格内容纵向分隔线去掉**/
|
|
177
|
-
.el-table--border td,
|
|
179
|
+
.el-table--border td,
|
|
180
|
+
.el-table--border th,
|
|
181
|
+
.el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed {
|
|
178
182
|
border-right: 0px
|
|
179
183
|
}
|
|
184
|
+
|
|
180
185
|
/**表格标题纵向分隔线颜色调浅点儿**/
|
|
181
|
-
.el-table--border td,
|
|
186
|
+
.el-table--border td,
|
|
187
|
+
.el-table--border th,
|
|
188
|
+
.el-table--border th.is-leaf,
|
|
189
|
+
.el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed {
|
|
182
190
|
border-right: 1px solid #fefefe;
|
|
183
191
|
}
|
|
184
192
|
}
|
|
@@ -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
|
+
}
|
|
@@ -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,11 +14,15 @@ 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
27
|
if (icon) {
|
|
24
28
|
if (icon.indexOf('fa-') === 0) {
|
|
@@ -35,14 +39,23 @@ export default {
|
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
if (title) {
|
|
42
|
+
debugger
|
|
38
43
|
let width = '130px'
|
|
39
44
|
if (hasChildren) {
|
|
40
45
|
// 当是父菜单时,为了使后面的三角能显示出来,需要将宽度设小点
|
|
41
46
|
width = '100px'
|
|
42
47
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
if (isRoot) {
|
|
49
|
+
// 是否是根目录,没有子菜单时
|
|
50
|
+
vnodes.push(<div style='display: inline-block'>
|
|
51
|
+
<div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>{(title)}</div>
|
|
52
|
+
</div>)
|
|
53
|
+
} else {
|
|
54
|
+
// 有子菜单时
|
|
55
|
+
vnodes.push(<div slot='title' style='display: inline-block'>
|
|
56
|
+
<div title={title} style={'display: inline-block;width:' + width + ';overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all;'}>{(title)}</div>
|
|
57
|
+
</div>)
|
|
58
|
+
}
|
|
46
59
|
}
|
|
47
60
|
return vnodes
|
|
48
61
|
}
|
|
@@ -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
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="menu-wrapper">
|
|
3
3
|
<template v-if="!item.children || item.children.lenght === 0">
|
|
4
|
-
<app-link :to="toPath(item)">
|
|
4
|
+
<app-link :to="toPath(item)" @click.native="clickMenu(toPath(item))">
|
|
5
5
|
<el-menu-item :index="item.fullPath+'~~'+item.i18nValue" :class="{'submenu-title-noDropdown':!isNest}">
|
|
6
|
-
<item :icon="item.iconName" :title="item
|
|
6
|
+
<item :icon="item.iconName" :title="getI18nName(item)" :is-root="true" />
|
|
7
7
|
</el-menu-item>
|
|
8
8
|
</app-link>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<el-submenu v-else :index="item.fullPath+'~~'+item.i18nValue">
|
|
12
12
|
<template slot="title">
|
|
13
|
-
<item :icon="item.iconName" :title="item
|
|
13
|
+
<item :icon="item.iconName" :title="getI18nName(item)" :has-children="item.children.length > 0?true:false" />
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<template v-for="child in item.children">
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
:item="child"
|
|
22
22
|
class="nest-menu"
|
|
23
23
|
/>
|
|
24
|
-
<app-link v-else :key="child.code" :to="toPath(child)">
|
|
24
|
+
<app-link v-else :key="child.code" :to="toPath(child)" @click.native="clickMenu(toPath(child))">
|
|
25
25
|
<el-menu-item :index="child.fullPath+'~~'+child.i18nValue">
|
|
26
|
-
<item :icon="child.iconName" :title="child
|
|
26
|
+
<item :icon="child.iconName" :title="getI18nName(child)" />
|
|
27
27
|
</el-menu-item>
|
|
28
28
|
</app-link>
|
|
29
29
|
</template>
|
|
@@ -34,6 +34,9 @@
|
|
|
34
34
|
<script>
|
|
35
35
|
import Item from './Item'
|
|
36
36
|
import AppLink from './Link'
|
|
37
|
+
import Vue from 'vue'
|
|
38
|
+
import { getI18nName } from 'imatrix-ui/src/utils/menu'
|
|
39
|
+
import tabJs from '../../../../api/tab'
|
|
37
40
|
|
|
38
41
|
export default {
|
|
39
42
|
name: 'SidebarItem',
|
|
@@ -59,6 +62,7 @@ export default {
|
|
|
59
62
|
}
|
|
60
63
|
},
|
|
61
64
|
methods: {
|
|
65
|
+
...tabJs,
|
|
62
66
|
hasOneShowingChild(children, parent) {
|
|
63
67
|
if (children && children.length > 0) {
|
|
64
68
|
this.onlyOneChild = children[0]
|
|
@@ -80,13 +84,24 @@ export default {
|
|
|
80
84
|
toPath(menu) {
|
|
81
85
|
const toPathObj = {}
|
|
82
86
|
const routePath = menu.fullPath
|
|
87
|
+
toPathObj.openWay = menu.openWay
|
|
83
88
|
if (this.isExternalLink(menu.pageType)) {
|
|
84
|
-
toPathObj.path = '/iframe-
|
|
89
|
+
toPathObj.path = '/tab-content-iframe-index'
|
|
90
|
+
toPathObj.tabPath = '/iframe-page/page'
|
|
85
91
|
toPathObj.query = {}
|
|
86
92
|
toPathObj.query.src = routePath
|
|
87
93
|
toPathObj.isExternal = true
|
|
94
|
+
// 如果路径中没有拼系统编码,才需要把系统编码放到参数中
|
|
95
|
+
toPathObj.query.customSystem = Vue.prototype.customSystem
|
|
96
|
+
toPathObj.query._menuCode = menu.code
|
|
97
|
+
toPathObj.query._menuName = getI18nName(menu)
|
|
88
98
|
} else {
|
|
89
|
-
toPathObj.path =
|
|
99
|
+
toPathObj.path = '/tab-content-index'
|
|
100
|
+
toPathObj.tabPath = routePath
|
|
101
|
+
toPathObj.query = {}
|
|
102
|
+
toPathObj.query.customSystem = Vue.prototype.customSystem
|
|
103
|
+
toPathObj.query._menuCode = menu.code
|
|
104
|
+
toPathObj.query._menuName = getI18nName(menu)
|
|
90
105
|
}
|
|
91
106
|
return toPathObj
|
|
92
107
|
},
|
|
@@ -95,6 +110,34 @@ export default {
|
|
|
95
110
|
return true
|
|
96
111
|
}
|
|
97
112
|
return false
|
|
113
|
+
},
|
|
114
|
+
clickMenu(toPathObj) {
|
|
115
|
+
// console.log('clickMenu----toPathObj=', toPathObj)
|
|
116
|
+
if (toPathObj.openWay && toPathObj.openWay === 'NEW_PAGE_OPEN' && toPathObj.query) {
|
|
117
|
+
// 新页签打开菜单
|
|
118
|
+
let url = toPathObj.query.src
|
|
119
|
+
if (url && url.indexOf('?') > 0) {
|
|
120
|
+
url += '&'
|
|
121
|
+
} else {
|
|
122
|
+
url += '?'
|
|
123
|
+
}
|
|
124
|
+
if (toPathObj.query.customSystem) {
|
|
125
|
+
url += 'customSystem=' + toPathObj.query.customSystem
|
|
126
|
+
}
|
|
127
|
+
if (toPathObj.query._menuCode) {
|
|
128
|
+
url += '_menuCode=' + toPathObj.query._menuCode
|
|
129
|
+
}
|
|
130
|
+
if (toPathObj.query._menuCode) {
|
|
131
|
+
url += '_menuName=' + toPathObj.query._menuName
|
|
132
|
+
}
|
|
133
|
+
window.open(url, toPathObj.query._menuCode)
|
|
134
|
+
} else {
|
|
135
|
+
// 刷新页签打开菜单
|
|
136
|
+
this.addTabs(toPathObj.query, this.$store.state.tabContent.openTab, toPathObj.tabPath)
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
getI18nName(menu) {
|
|
140
|
+
return getI18nName(menu)
|
|
98
141
|
}
|
|
99
142
|
}
|
|
100
143
|
}
|