Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d24185d1
authored
May 25, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
f1f2f247
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
58 deletions
package-lock.json
package.json
src/components/DesktopLeftSider/Sub/Menu.vue
src/components/DesktopLeftSider/Sub/NavInfoCard.vue
src/components/DesktopRightSider/DesktopRightSider.vue
src/components/DesktopTopSider/Sub/FullScreen.vue
src/components/DesktopTopSider/Sub/UserButton.vue
src/config/menuTree.js
src/main.js
src/micro/index.js
vue.config.js
package-lock.json
View file @
d24185d
This diff is collapsed.
Click to expand it.
package.json
View file @
d24185d
...
...
@@ -7,8 +7,7 @@
"build"
:
"vue-cli-service build"
},
"dependencies"
:
{
"axios"
:
"^0.21.1"
,
"babel-polyfill"
:
"^6.26.0"
,
"axios"
:
"^0.20.0"
,
"core-js"
:
"^3.6.5"
,
"element-plus"
:
"^1.0.2-beta.44"
,
"less"
:
"^3.12.2"
,
...
...
@@ -20,12 +19,14 @@
"vuex"
:
"^4.0.0-alpha.1"
},
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^4.5.13"
,
"@vue/cli-plugin-router"
:
"^4.5.13"
,
"@vue/cli-plugin-vuex"
:
"^4.5.13"
,
"@vue/cli-service"
:
"^4.5.13"
,
"@vue/compiler-sfc"
:
"^3.0.11"
,
"babel-plugin-import"
:
"^1.13.1"
"@vue/cli-plugin-babel"
:
"~4.5.0"
,
"@vue/cli-plugin-router"
:
"~4.5.0"
,
"@vue/cli-plugin-vuex"
:
"~4.5.0"
,
"@vue/cli-service"
:
"~4.5.0"
,
"@vue/compiler-sfc"
:
"^3.0.0"
,
"babel-plugin-import"
:
"^1.13.1"
,
"babel-polyfill"
:
"^6.26.0"
,
"vue-cli-plugin-vue-next"
:
"~0.1.4"
},
"browserslist"
:
[
"> 1%"
,
...
...
src/components/DesktopLeftSider/Sub/Menu.vue
View file @
d24185d
...
...
@@ -3,30 +3,31 @@
<div
class=
"menu"
>
<el-menu
:uniqueOpened=
"true"
class=
"el-menu-vertical"
@
open=
"handleOpen"
@
close=
"handleClose"
:default-active=
"defaultActive"
background-color=
"#001529"
text-color=
"hsla(0,0%,100%,.65)"
active-text-color=
"#fff"
>
<el-submenu
v-for=
"(item, pIndex) in menuList"
:key=
"item.origin.menuNo"
:index=
"pIndex.toString()"
>
<template
#
title
>
<i
class=
"el-icon-tableware"
></i>
<span>
{{
item
.
origin
.
menuName
}}
</span>
</
template
>
<el-menu-item
v-for=
"(cItem, cIndex) in item.children"
:key=
"cItem.origin.menuNo"
:index=
"pIndex+'-'+cIndex"
@
click=
"cItemClick(cItem.origin.frontRoute || '', cItem, item)"
>
{{cItem.origin.menuName}}
<div
v-for=
"(item, pIndex) in menuList"
:key=
"item.origin.menuNo"
>
<el-submenu
v-if=
"item.children && item.children.length > 0"
:index=
"pIndex.toString()"
>
<template
#
title
>
<i
class=
"el-icon-tableware"
></i>
<span>
{{
item
.
origin
.
menuName
}}
</span>
</
template
>
<el-menu-item
v-for=
"(cItem, cIndex) in item.children"
:key=
"cItem.origin.menuNo"
:index=
"pIndex+'-'+cIndex"
@
click=
"cItemClick(cItem.origin.frontRoute || '', cItem, item)"
>
{{cItem.origin.menuName}}
</el-menu-item>
</el-submenu>
<el-menu-item
v-else
:index=
"pIndex.toString()"
>
<
template
#
title
>
{{
item
.
origin
.
menuName
}}
</
template
>
</el-menu-item>
</el-submenu
>
</div
>
</el-menu>
<!-- 三级菜单 原生写法
<ul class="ant-menu ant-menu-inline ant-menu-sub"
...
...
@@ -41,7 +42,7 @@
</template>
<
script
>
import
{
reactive
,
toRefs
,
on
Mounted
,
computed
,
watch
,
getCurrentInstance
}
from
'vue'
;
import
{
reactive
,
toRefs
,
on
BeforeMount
,
computed
}
from
'vue'
;
import
{
useStore
}
from
'vuex'
;
import
MenuService
from
'services/Menu'
;
...
...
@@ -49,8 +50,6 @@ import { menuTree as menuTreeLocalList } from 'config/menuTree';
export
default
{
name
:
'Menu'
,
components
:
{
},
setup
(
props
,
context
)
{
const
store
=
useStore
();
const
state
=
reactive
({
...
...
@@ -309,7 +308,10 @@ export default {
})
};
getServerTree
(
true
);
onBeforeMount
(()
=>
{
getServerTree
(
true
);
})
const
updateMenu
=
computed
(()
=>
{
const
updateNow
=
!!
store
.
getters
.
updateMenu
;
...
...
@@ -319,19 +321,11 @@ export default {
return
updateNow
;
});
const
handleOpen
=
(
key
,
keyPath
)
=>
{
}
const
handleClose
=
(
key
,
keyPath
)
=>
{
}
return
{
...
toRefs
(
state
),
cItemClick
,
subMenuClicked
,
updateMenu
,
handleOpen
,
handleClose
}
}
...
...
src/components/DesktopLeftSider/Sub/NavInfoCard.vue
View file @
d24185d
...
...
@@ -28,8 +28,8 @@
<!-- 菜单搜索 -->
<div
class=
"search-menu"
:class=
"{ navActive: isNavFilterActive }"
@
click=
"upClicked"
>
<a-input
class=
"search-menu-input"
v-model:value=
"value"
:disabled=
"true"
placeholder=
""
/>
<
!-- <
a-input class="search-menu-input"
v-model:value="value" :disabled="true" placeholder="" />
-->
<!-- <UpCircleOutlined class="icon-arrow" /> -->
</div>
</div>
...
...
src/components/DesktopRightSider/DesktopRightSider.vue
View file @
d24185d
<
template
>
<el-main
class=
"glsx-
bread-crumb
"
class=
"glsx-
right-side
"
:style=
"
{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }"
>
<el-breadcrumb>
...
...
@@ -13,7 +13,7 @@
</el-breadcrumb-item>
</el-breadcrumb>
<div
v-show=
"showEmpty"
>
<el-empty
description=
"暂无数据"
image-size=
"100
"
></el-empty>
<el-empty
description=
"暂无数据"
:image-size=
"imgSize
"
></el-empty>
</div>
<div
v-show=
"!showEmpty"
id=
"sub-system-frame"
ref=
"elmSubMicro"
></div>
</el-main>
...
...
@@ -28,6 +28,7 @@ export default {
setup
(
props
,
context
)
{
const
elmSubMicro
=
ref
(
null
);
const
state
=
reactive
({
imgSize
:
100
,
el_sub_innerH
:
''
});
const
store
=
useStore
();
...
...
@@ -120,15 +121,18 @@ export default {
}
</
script
>
<
style
scoped
>
.glsx-
bread-crumb
>>>
.breadcrumb-item
span
{
.glsx-
right-side
>>>
.breadcrumb-item
span
{
color
:
rgba
(
0
,
0
,
0
,
.45
);
}
.glsx-
bread-crumb
>>>
.breadcrumb-item.active
span
{
.glsx-
right-side
>>>
.breadcrumb-item.active
span
{
color
:
#2196f3
;
}
</
style
>
<
style
lang=
"less"
scoped
>
@import
'styles/variables.less'
;
.glsx-right-side
{
position
:
relative
;
}
.ant-layout-content
{
min-width
:
1190px
;
min-height
:
unset
!important
;
...
...
src/components/DesktopTopSider/Sub/FullScreen.vue
View file @
d24185d
...
...
@@ -69,8 +69,9 @@ export default {
@import
'styles/common.less'
;
@import
'styles/variables.less'
;
.el-icon-full-screen
{
cursor
:
pointer
;
margin-right
:
20px
;
font-size
:
25px
;
color
:
@
defaultThemeColor
;
cursor
:
pointer
;
}
</
style
>
\ No newline at end of file
src/components/DesktopTopSider/Sub/UserButton.vue
View file @
d24185d
...
...
@@ -5,11 +5,11 @@
<template
v-slot:content
>
<div
@
click=
"logout"
class=
"pop-over-item"
>
登出
</div>
</
template
>
-->
<a-avatar
class=
"avatar-btn"
:size=
"35"
>
<
!-- <
a-avatar class="avatar-btn" :size="35">
<template v-slot:icon>
<
!--
<UserOutlined
/>
--
>
<
UserOutlined /
>
</template>
</a-avatar>
</a-avatar>
-->
<span
class=
"nav-top-text log-out"
@
click=
"logout"
>
退出
</span>
<!-- </a-popover> -->
</div>
...
...
src/config/menuTree.js
View file @
d24185d
...
...
@@ -64,7 +64,7 @@ const menuTree = [
},
{
origin
:
{
menuName
:
"
数据风
控"
,
menuName
:
"
车辆监
控"
,
menuNo
:
201
,
type
:
1
,
icon
:
'DesktopOutlined'
...
...
@@ -72,10 +72,10 @@ const menuTree = [
children
:
[
{
origin
:
{
menuName
:
"
渠道风
控"
,
menuName
:
"
车辆监
控"
,
menuNo
:
20101
,
type
:
2
,
path
:
'/
monitor#/channel
'
path
:
'/
oEshield#/monitor/monitor
'
}
}
]
...
...
src/main.js
View file @
d24185d
...
...
@@ -13,6 +13,11 @@ microAppStart();
const
app
=
createApp
(
App
);
app
.
config
.
warnHandler
=
function
(
msg
,
vm
,
trace
)
{
};
app
.
config
.
errorHandler
=
(
err
,
vm
,
info
)
=>
{
}
app
.
use
(
store
)
.
use
(
router
)
.
use
(
elementUI
)
...
...
src/micro/index.js
View file @
d24185d
...
...
@@ -61,7 +61,7 @@ const qianKunStart = (config, baseURL) => {
setDefaultMountApp
(
defaultApp
);
start
({
singular
:
false
,
sandbox
:
{
strictStyleIsolation
:
true
}
});
start
({
singular
:
false
});
}
...
...
vue.config.js
View file @
d24185d
...
...
@@ -7,10 +7,10 @@ function resolve(dir) {
module
.
exports
=
{
runtimeCompiler
:
true
,
devServer
:
{
//
overlay: {
//
warning: false,
//
errors: false
//
},
overlay
:
{
warning
:
false
,
errors
:
false
},
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
,
},
...
...
@@ -27,7 +27,7 @@ module.exports = {
// }
// }
},
//
lintOnSave: false,
lintOnSave
:
false
,
chainWebpack
:
config
=>
{
config
.
plugin
(
'html'
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment