imatrix-ui 0.2.4-up → 0.2.6-up
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.js +169 -190
- package/lib/super-ui.umd.cjs +13 -19
- package/package.json +2 -5
- package/packages/fs-upload/src/fs-upload-single.vue +313 -310
- package/packages/super-nine-grid/src/super-nine-grid.vue +1137 -1118
- package/src/styles/theme/dark-blue/index.scss +6 -5
- package/src/utils/auth-api.js +3 -2
- package/src/views/dsc-component/Sidebar/index.vue +219 -218
- package/src/views/layout/components/Breadcrumb/index.vue +141 -139
- package/src/views/layout/components/Menubar/index.vue +201 -201
- package/src/views/layout/components/Sidebar/index.vue +133 -133
|
@@ -190,7 +190,8 @@
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.el-pagination {
|
|
193
|
-
|
|
193
|
+
display: flex;
|
|
194
|
+
justify-content: flex-end;
|
|
194
195
|
}
|
|
195
196
|
|
|
196
197
|
.el-table td {
|
|
@@ -209,7 +210,7 @@
|
|
|
209
210
|
/**表格内容纵向分隔线去掉**/
|
|
210
211
|
.el-table--border td,
|
|
211
212
|
.el-table--border th,
|
|
212
|
-
.el-table__body-wrapper .el-table--border.is-scrolling-left
|
|
213
|
+
.el-table__body-wrapper .el-table--border.is-scrolling-left ~ .el-table__fixed {
|
|
213
214
|
border-right: 0px
|
|
214
215
|
}
|
|
215
216
|
|
|
@@ -217,7 +218,7 @@
|
|
|
217
218
|
.el-table--border td,
|
|
218
219
|
.el-table--border th,
|
|
219
220
|
.el-table--border th.is-leaf,
|
|
220
|
-
.el-table__body-wrapper .el-table--border.is-scrolling-left
|
|
221
|
+
.el-table__body-wrapper .el-table--border.is-scrolling-left ~ .el-table__fixed {
|
|
221
222
|
border-right: 1px solid #fefefe;
|
|
222
223
|
}
|
|
223
224
|
|
|
@@ -231,7 +232,7 @@
|
|
|
231
232
|
text-align: left;
|
|
232
233
|
}
|
|
233
234
|
|
|
234
|
-
.el-button
|
|
235
|
+
.el-button + .el-button {
|
|
235
236
|
margin-left: 10px;
|
|
236
237
|
}
|
|
237
238
|
|
|
@@ -269,4 +270,4 @@
|
|
|
269
270
|
border-radius: 0;
|
|
270
271
|
box-shadow: 0 0px 0px #ccc;
|
|
271
272
|
}
|
|
272
|
-
}
|
|
273
|
+
}
|
package/src/utils/auth-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Cookies from 'js-cookie'
|
|
2
2
|
// const Cookies = require('js-cookie')
|
|
3
3
|
|
|
4
4
|
const jwtKey = 'JWT'
|
|
@@ -71,7 +71,8 @@ function removeCurrentUser() {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
function getCookieCache(key) {
|
|
74
|
-
console.log('%c描述-
|
|
74
|
+
console.log('%c描述-173122', 'color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px', Cookies);
|
|
75
|
+
console.dir(Cookies);
|
|
75
76
|
return Cookies.get(key)
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -1,228 +1,229 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
4
|
+
<keep-alive>
|
|
5
|
+
<el-menu
|
|
6
|
+
:collapse="isCollapse"
|
|
7
|
+
:default-active="getDefaultActive()"
|
|
8
|
+
:show-timeout="200"
|
|
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>
|
|
15
|
+
</el-scrollbar>
|
|
16
|
+
<hamburger
|
|
17
|
+
:is-active="sidebar.opened"
|
|
18
|
+
class="hamburger-container"
|
|
19
|
+
@toggleClick="toggleSideBar"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import {
|
|
25
|
+
import {mapGetters} from 'vuex'
|
|
26
26
|
import SidebarItem from './SidebarItem'
|
|
27
|
-
import
|
|
27
|
+
import Cookies from 'js-cookie'
|
|
28
28
|
import tabJs from '../../../api/tab'
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
29
|
+
import {getMenus} from '../../../utils/permissionAuth'
|
|
30
|
+
import {getI18nName} from '../../../utils/menu'
|
|
31
|
+
|
|
31
32
|
export default {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
33
|
+
name: 'Sidebar',
|
|
34
|
+
components: {
|
|
35
|
+
SidebarItem,
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
systemCode: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: null,
|
|
41
|
+
},
|
|
42
|
+
collapse: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
data() {
|
|
48
|
+
const menus = getMenus()
|
|
49
|
+
return {
|
|
50
|
+
menus: Object.freeze(menus),
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
computed: {
|
|
54
|
+
...mapGetters(['sidebar']),
|
|
55
|
+
isCollapse() {
|
|
56
|
+
if (this.collapse === false) {
|
|
57
|
+
return !this.sidebar.opened
|
|
58
|
+
}
|
|
59
|
+
return true
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
created() {
|
|
63
|
+
const a = new Date().getTime()
|
|
64
|
+
this.firstLeafMenu = this.getMyFirstMenu(this.menus)
|
|
65
|
+
if (this.firstLeafMenu && this.firstLeafMenu.fullPath) {
|
|
66
|
+
// 跳转到第一个页面
|
|
67
|
+
if (
|
|
68
|
+
this.firstLeafMenu.pageType &&
|
|
69
|
+
this.firstLeafMenu.pageType === 'iframe'
|
|
70
|
+
) {
|
|
71
|
+
const iframeSrc = this.firstLeafMenu.fullPath
|
|
72
|
+
const path = this.firstLeafMenu.path
|
|
73
|
+
const query = {
|
|
74
|
+
src: iframeSrc,
|
|
75
|
+
customSystem: this.systemCode,
|
|
76
|
+
path: path,
|
|
77
|
+
_menuCode: this.firstLeafMenu.code,
|
|
78
|
+
_menuName: getI18nName(this.firstLeafMenu),
|
|
79
|
+
}
|
|
80
|
+
this.addTabs(
|
|
81
|
+
query,
|
|
82
|
+
this.$store.state.tabContent.openTab,
|
|
83
|
+
'/dsc/iframe-page',
|
|
84
|
+
'/dsc/iframe-page'
|
|
85
|
+
)
|
|
86
|
+
this.$router.push({path: '/dsc-index/iframe-page', query: query})
|
|
87
|
+
} else {
|
|
88
|
+
const pageCode = this.firstLeafMenu.path
|
|
89
|
+
const query = {
|
|
90
|
+
customSystem: this.systemCode,
|
|
91
|
+
pageCode: pageCode,
|
|
92
|
+
_menuCode: this.firstLeafMenu.code,
|
|
93
|
+
_menuName: getI18nName(this.firstLeafMenu),
|
|
94
|
+
}
|
|
95
|
+
this.addTabs(
|
|
96
|
+
query,
|
|
97
|
+
this.$store.state.tabContent.openTab,
|
|
98
|
+
'/dsc/page',
|
|
99
|
+
'/dsc/page'
|
|
100
|
+
)
|
|
101
|
+
this.$router.push({path: '/dsc-index/page', query: query})
|
|
102
|
+
// this.$router.push({ path: this.firstLeafMenu.fullPath })
|
|
103
|
+
}
|
|
104
|
+
const b = new Date().getTime()
|
|
105
|
+
console.log('菜单组件==>created==>b-a', b - a)
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
methods: {
|
|
109
|
+
...tabJs,
|
|
110
|
+
getDefaultActive() {
|
|
111
|
+
if (this.firstLeafMenu && this.firstLeafMenu.pageType !== 'iframe') {
|
|
112
|
+
const pageCode = this.firstLeafMenu.path
|
|
113
|
+
return '/dsc/' + this.firstLeafMenu.code + '~~' + pageCode
|
|
114
|
+
} else if (
|
|
115
|
+
this.firstLeafMenu &&
|
|
116
|
+
this.firstLeafMenu.pageType === 'iframe'
|
|
117
|
+
) {
|
|
118
|
+
return '/dsc/' + this.firstLeafMenu.code + '~~'
|
|
119
|
+
} else {
|
|
120
|
+
return ''
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
toggleSideBar() {
|
|
124
|
+
this.$store.dispatch('toggleSidebar')
|
|
125
|
+
},
|
|
126
|
+
selectMenu(index, indexPath) {
|
|
127
|
+
Cookies.set('selectMenu', index)
|
|
128
|
+
},
|
|
129
|
+
getMyFirstMenu(menus) {
|
|
130
|
+
const a = new Date().getTime()
|
|
131
|
+
if (menus && menus.length > 0) {
|
|
132
|
+
let shouldSelectMenu = this.getFirstMenu(menus)
|
|
133
|
+
if (!shouldSelectMenu) {
|
|
134
|
+
shouldSelectMenu = this.getFirstMenuWithCookie(menus)
|
|
135
|
+
}
|
|
136
|
+
const b = new Date().getTime()
|
|
137
|
+
console.log('菜单组件==>getMyFirstMenu==>b-a', b - a)
|
|
138
|
+
// 默认不展示第一个有权限的菜单了,可以去掉下面的代码
|
|
139
|
+
// if (!shouldSelectMenu) {
|
|
140
|
+
// shouldSelectMenu = this.getSelectMenuWithFirstMenu(menus[0])
|
|
141
|
+
// }
|
|
142
|
+
return shouldSelectMenu
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
getFirstMenu(menus) {
|
|
146
|
+
if (menus && menus.length > 0) {
|
|
147
|
+
let shouldSelectMenu
|
|
148
|
+
for (let i = 0; i < menus.length; i++) {
|
|
149
|
+
const menu = menus[i]
|
|
150
|
+
shouldSelectMenu = this.getShouldSelectMenu(menu)
|
|
151
|
+
if (shouldSelectMenu) {
|
|
152
|
+
// 表示获得到了应该选中的菜单
|
|
153
|
+
break
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return shouldSelectMenu
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
getShouldSelectMenu(menu) {
|
|
160
|
+
// console.log('dsc--getShouldSelectMenu--this.$route=', this.$route)
|
|
161
|
+
const currentMenuCode = this.$route.query
|
|
162
|
+
? this.$route.query._menuCode
|
|
163
|
+
: null
|
|
164
|
+
if (menu && currentMenuCode) {
|
|
165
|
+
let shouldSelectMenu
|
|
166
|
+
const children = menu.children
|
|
167
|
+
if (children && children.length > 0) {
|
|
168
|
+
shouldSelectMenu = this.getFirstMenu(children)
|
|
169
|
+
} else if (menu.code && menu.code === currentMenuCode) {
|
|
170
|
+
shouldSelectMenu = menu
|
|
171
|
+
}
|
|
172
|
+
return shouldSelectMenu
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
getSelectMenuWithFirstMenu(menu) {
|
|
176
|
+
if (menu) {
|
|
177
|
+
let shouldSelectMenu
|
|
178
|
+
const children = menu.children
|
|
179
|
+
if (children && children.length > 0) {
|
|
180
|
+
shouldSelectMenu = this.getFirstMenu(children)
|
|
181
|
+
} else {
|
|
182
|
+
shouldSelectMenu = menu
|
|
183
|
+
}
|
|
184
|
+
return shouldSelectMenu
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
getFirstMenuWithCookie(menus) {
|
|
188
|
+
if (menus && menus.length > 0) {
|
|
189
|
+
const cookieMenu = Cookies.get('selectMenu')
|
|
190
|
+
if (cookieMenu) {
|
|
191
|
+
// // 表示缓存中存储了menu,格式为:/dsc/菜单编码~~pageCode
|
|
192
|
+
const prefix = '/dsc/'
|
|
193
|
+
const menuCode = cookieMenu.substring(
|
|
194
|
+
cookieMenu.indexOf(prefix) + prefix.length,
|
|
195
|
+
cookieMenu.lastIndexOf('~~')
|
|
196
|
+
)
|
|
196
197
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
198
|
+
let shouldSelectMenu
|
|
199
|
+
for (let i = 0; i < menus.length; i++) {
|
|
200
|
+
const menu = menus[i]
|
|
201
|
+
shouldSelectMenu = this.getShouldSelectMenuWithCookie(
|
|
202
|
+
menu,
|
|
203
|
+
menuCode
|
|
204
|
+
)
|
|
205
|
+
if (shouldSelectMenu) {
|
|
206
|
+
// 表示获得到了应该选中的菜单
|
|
207
|
+
break
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return shouldSelectMenu
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
getShouldSelectMenuWithCookie(menu, menuCode) {
|
|
215
|
+
if (menu) {
|
|
216
|
+
// console.log('dsc--getShouldSelectMenuWithCookie--this.$route=', this.$route)
|
|
217
|
+
let shouldSelectMenu
|
|
218
|
+
const children = menu.children
|
|
219
|
+
if (children && children.length > 0) {
|
|
220
|
+
shouldSelectMenu = this.getFirstMenuWithCookie(children)
|
|
221
|
+
} else if (menu.code && menu.code === menuCode) {
|
|
222
|
+
shouldSelectMenu = menu
|
|
223
|
+
}
|
|
224
|
+
return shouldSelectMenu
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
},
|
|
227
228
|
}
|
|
228
229
|
</script>
|