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 @@
...
@@ -7,8 +7,7 @@
"build"
:
"vue-cli-service build"
"build"
:
"vue-cli-service build"
},
},
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^0.21.1"
,
"axios"
:
"^0.20.0"
,
"babel-polyfill"
:
"^6.26.0"
,
"core-js"
:
"^3.6.5"
,
"core-js"
:
"^3.6.5"
,
"element-plus"
:
"^1.0.2-beta.44"
,
"element-plus"
:
"^1.0.2-beta.44"
,
"less"
:
"^3.12.2"
,
"less"
:
"^3.12.2"
,
...
@@ -20,12 +19,14 @@
...
@@ -20,12 +19,14 @@
"vuex"
:
"^4.0.0-alpha.1"
"vuex"
:
"^4.0.0-alpha.1"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^4.5.13"
,
"@vue/cli-plugin-babel"
:
"~4.5.0"
,
"@vue/cli-plugin-router"
:
"^4.5.13"
,
"@vue/cli-plugin-router"
:
"~4.5.0"
,
"@vue/cli-plugin-vuex"
:
"^4.5.13"
,
"@vue/cli-plugin-vuex"
:
"~4.5.0"
,
"@vue/cli-service"
:
"^4.5.13"
,
"@vue/cli-service"
:
"~4.5.0"
,
"@vue/compiler-sfc"
:
"^3.0.11"
,
"@vue/compiler-sfc"
:
"^3.0.0"
,
"babel-plugin-import"
:
"^1.13.1"
"babel-plugin-import"
:
"^1.13.1"
,
"babel-polyfill"
:
"^6.26.0"
,
"vue-cli-plugin-vue-next"
:
"~0.1.4"
},
},
"browserslist"
:
[
"browserslist"
:
[
"> 1%"
,
"> 1%"
,
...
...
src/components/DesktopLeftSider/Sub/Menu.vue
View file @
d24185d
...
@@ -3,30 +3,31 @@
...
@@ -3,30 +3,31 @@
<div
class=
"menu"
>
<div
class=
"menu"
>
<el-menu
<el-menu
:uniqueOpened=
"true"
:uniqueOpened=
"true"
class=
"el-menu-vertical"
@
open=
"handleOpen"
@
close=
"handleClose"
:default-active=
"defaultActive"
:default-active=
"defaultActive"
background-color=
"#001529"
background-color=
"#001529"
text-color=
"hsla(0,0%,100%,.65)"
text-color=
"hsla(0,0%,100%,.65)"
active-text-color=
"#fff"
>
active-text-color=
"#fff"
>
<el-submenu
<div
v-for=
"(item, pIndex) in menuList"
v-for=
"(item, pIndex) in menuList"
:key=
"item.origin.menuNo"
>
:key=
"item.origin.menuNo"
<el-submenu
v-if=
"item.children && item.children.length > 0"
:index=
"pIndex.toString()"
>
:index=
"pIndex.toString()"
<template
#
title
>
>
<i
class=
"el-icon-tableware"
></i>
<template
#
title
>
<span>
{{
item
.
origin
.
menuName
}}
</span>
<i
class=
"el-icon-tableware"
></i>
</
template
>
<span>
{{
item
.
origin
.
menuName
}}
</span>
<el-menu-item
</
template
>
v-for=
"(cItem, cIndex) in item.children"
<el-menu-item
:key=
"cItem.origin.menuNo"
v-for=
"(cItem, cIndex) in item.children"
:index=
"pIndex+'-'+cIndex"
:key=
"cItem.origin.menuNo"
@
click=
"cItemClick(cItem.origin.frontRoute || '', cItem, item)"
>
:index=
"pIndex+'-'+cIndex"
{{cItem.origin.menuName}}
@
click=
"cItemClick(cItem.origin.frontRoute || '', cItem, item)"
>
</el-menu-item>
{{cItem.origin.menuName}}
</el-submenu>
<el-menu-item
v-else
:index=
"pIndex.toString()"
>
<
template
#
title
>
{{
item
.
origin
.
menuName
}}
</
template
>
</el-menu-item>
</el-menu-item>
</el-submenu
>
</div
>
</el-menu>
</el-menu>
<!-- 三级菜单 原生写法
<!-- 三级菜单 原生写法
<ul class="ant-menu ant-menu-inline ant-menu-sub"
<ul class="ant-menu ant-menu-inline ant-menu-sub"
...
@@ -41,7 +42,7 @@
...
@@ -41,7 +42,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
reactive
,
toRefs
,
on
Mounted
,
computed
,
watch
,
getCurrentInstance
}
from
'vue'
;
import
{
reactive
,
toRefs
,
on
BeforeMount
,
computed
}
from
'vue'
;
import
{
useStore
}
from
'vuex'
;
import
{
useStore
}
from
'vuex'
;
import
MenuService
from
'services/Menu'
;
import
MenuService
from
'services/Menu'
;
...
@@ -49,8 +50,6 @@ import { menuTree as menuTreeLocalList } from 'config/menuTree';
...
@@ -49,8 +50,6 @@ import { menuTree as menuTreeLocalList } from 'config/menuTree';
export
default
{
export
default
{
name
:
'Menu'
,
name
:
'Menu'
,
components
:
{
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
const
store
=
useStore
();
const
store
=
useStore
();
const
state
=
reactive
({
const
state
=
reactive
({
...
@@ -309,7 +308,10 @@ export default {
...
@@ -309,7 +308,10 @@ export default {
})
})
};
};
getServerTree
(
true
);
onBeforeMount
(()
=>
{
getServerTree
(
true
);
})
const
updateMenu
=
computed
(()
=>
{
const
updateMenu
=
computed
(()
=>
{
const
updateNow
=
!!
store
.
getters
.
updateMenu
;
const
updateNow
=
!!
store
.
getters
.
updateMenu
;
...
@@ -319,19 +321,11 @@ export default {
...
@@ -319,19 +321,11 @@ export default {
return
updateNow
;
return
updateNow
;
});
});
const
handleOpen
=
(
key
,
keyPath
)
=>
{
}
const
handleClose
=
(
key
,
keyPath
)
=>
{
}
return
{
return
{
...
toRefs
(
state
),
...
toRefs
(
state
),
cItemClick
,
cItemClick
,
subMenuClicked
,
subMenuClicked
,
updateMenu
,
updateMenu
,
handleOpen
,
handleClose
}
}
}
}
...
...
src/components/DesktopLeftSider/Sub/NavInfoCard.vue
View file @
d24185d
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
<!-- 菜单搜索 -->
<!-- 菜单搜索 -->
<div
class=
"search-menu"
:class=
"{ navActive: isNavFilterActive }"
@
click=
"upClicked"
>
<div
class=
"search-menu"
:class=
"{ navActive: isNavFilterActive }"
@
click=
"upClicked"
>
<a-input
class=
"search-menu-input"
<
!-- <
a-input class="search-menu-input"
v-model:value=
"value"
:disabled=
"true"
placeholder=
""
/>
v-model:value="value" :disabled="true" placeholder="" />
-->
<!-- <UpCircleOutlined class="icon-arrow" /> -->
<!-- <UpCircleOutlined class="icon-arrow" /> -->
</div>
</div>
</div>
</div>
...
...
src/components/DesktopRightSider/DesktopRightSider.vue
View file @
d24185d
<
template
>
<
template
>
<el-main
<el-main
class=
"glsx-
bread-crumb
"
class=
"glsx-
right-side
"
:style=
"
{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }"
:style=
"
{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }"
>
>
<el-breadcrumb>
<el-breadcrumb>
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</el-breadcrumb-item>
</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb>
<div
v-show=
"showEmpty"
>
<div
v-show=
"showEmpty"
>
<el-empty
description=
"暂无数据"
image-size=
"100
"
></el-empty>
<el-empty
description=
"暂无数据"
:image-size=
"imgSize
"
></el-empty>
</div>
</div>
<div
v-show=
"!showEmpty"
id=
"sub-system-frame"
ref=
"elmSubMicro"
></div>
<div
v-show=
"!showEmpty"
id=
"sub-system-frame"
ref=
"elmSubMicro"
></div>
</el-main>
</el-main>
...
@@ -28,6 +28,7 @@ export default {
...
@@ -28,6 +28,7 @@ export default {
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
const
elmSubMicro
=
ref
(
null
);
const
elmSubMicro
=
ref
(
null
);
const
state
=
reactive
({
const
state
=
reactive
({
imgSize
:
100
,
el_sub_innerH
:
''
el_sub_innerH
:
''
});
});
const
store
=
useStore
();
const
store
=
useStore
();
...
@@ -120,15 +121,18 @@ export default {
...
@@ -120,15 +121,18 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.glsx-
bread-crumb
>>>
.breadcrumb-item
span
{
.glsx-
right-side
>>>
.breadcrumb-item
span
{
color
:
rgba
(
0
,
0
,
0
,
.45
);
color
:
rgba
(
0
,
0
,
0
,
.45
);
}
}
.glsx-
bread-crumb
>>>
.breadcrumb-item.active
span
{
.glsx-
right-side
>>>
.breadcrumb-item.active
span
{
color
:
#2196f3
;
color
:
#2196f3
;
}
}
</
style
>
</
style
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
@import
'styles/variables.less'
;
@import
'styles/variables.less'
;
.glsx-right-side
{
position
:
relative
;
}
.ant-layout-content
{
.ant-layout-content
{
min-width
:
1190px
;
min-width
:
1190px
;
min-height
:
unset
!important
;
min-height
:
unset
!important
;
...
...
src/components/DesktopTopSider/Sub/FullScreen.vue
View file @
d24185d
...
@@ -69,8 +69,9 @@ export default {
...
@@ -69,8 +69,9 @@ export default {
@import
'styles/common.less'
;
@import
'styles/common.less'
;
@import
'styles/variables.less'
;
@import
'styles/variables.less'
;
.el-icon-full-screen
{
.el-icon-full-screen
{
cursor
:
pointer
;
margin-right
:
20px
;
font-size
:
25px
;
font-size
:
25px
;
color
:
@
defaultThemeColor
;
color
:
@
defaultThemeColor
;
cursor
:
pointer
;
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/components/DesktopTopSider/Sub/UserButton.vue
View file @
d24185d
...
@@ -5,11 +5,11 @@
...
@@ -5,11 +5,11 @@
<template
v-slot:content
>
<template
v-slot:content
>
<div
@
click=
"logout"
class=
"pop-over-item"
>
登出
</div>
<div
@
click=
"logout"
class=
"pop-over-item"
>
登出
</div>
</
template
>
-->
</
template
>
-->
<a-avatar
class=
"avatar-btn"
:size=
"35"
>
<
!-- <
a-avatar class="avatar-btn" :size="35">
<template v-slot:icon>
<template v-slot:icon>
<
!--
<UserOutlined
/>
--
>
<
UserOutlined /
>
</template>
</template>
</a-avatar>
</a-avatar>
-->
<span
class=
"nav-top-text log-out"
@
click=
"logout"
>
退出
</span>
<span
class=
"nav-top-text log-out"
@
click=
"logout"
>
退出
</span>
<!-- </a-popover> -->
<!-- </a-popover> -->
</div>
</div>
...
...
src/config/menuTree.js
View file @
d24185d
...
@@ -64,7 +64,7 @@ const menuTree = [
...
@@ -64,7 +64,7 @@ const menuTree = [
},
},
{
{
origin
:
{
origin
:
{
menuName
:
"
数据风
控"
,
menuName
:
"
车辆监
控"
,
menuNo
:
201
,
menuNo
:
201
,
type
:
1
,
type
:
1
,
icon
:
'DesktopOutlined'
icon
:
'DesktopOutlined'
...
@@ -72,10 +72,10 @@ const menuTree = [
...
@@ -72,10 +72,10 @@ const menuTree = [
children
:
[
children
:
[
{
{
origin
:
{
origin
:
{
menuName
:
"
渠道风
控"
,
menuName
:
"
车辆监
控"
,
menuNo
:
20101
,
menuNo
:
20101
,
type
:
2
,
type
:
2
,
path
:
'/
monitor#/channel
'
path
:
'/
oEshield#/monitor/monitor
'
}
}
}
}
]
]
...
...
src/main.js
View file @
d24185d
...
@@ -13,6 +13,11 @@ microAppStart();
...
@@ -13,6 +13,11 @@ microAppStart();
const
app
=
createApp
(
App
);
const
app
=
createApp
(
App
);
app
.
config
.
warnHandler
=
function
(
msg
,
vm
,
trace
)
{
};
app
.
config
.
errorHandler
=
(
err
,
vm
,
info
)
=>
{
}
app
.
use
(
store
)
app
.
use
(
store
)
.
use
(
router
)
.
use
(
router
)
.
use
(
elementUI
)
.
use
(
elementUI
)
...
...
src/micro/index.js
View file @
d24185d
...
@@ -61,7 +61,7 @@ const qianKunStart = (config, baseURL) => {
...
@@ -61,7 +61,7 @@ const qianKunStart = (config, baseURL) => {
setDefaultMountApp
(
defaultApp
);
setDefaultMountApp
(
defaultApp
);
start
({
singular
:
false
,
sandbox
:
{
strictStyleIsolation
:
true
}
});
start
({
singular
:
false
});
}
}
...
...
vue.config.js
View file @
d24185d
...
@@ -7,10 +7,10 @@ function resolve(dir) {
...
@@ -7,10 +7,10 @@ function resolve(dir) {
module
.
exports
=
{
module
.
exports
=
{
runtimeCompiler
:
true
,
runtimeCompiler
:
true
,
devServer
:
{
devServer
:
{
//
overlay: {
overlay
:
{
//
warning: false,
warning
:
false
,
//
errors: false
errors
:
false
//
},
},
headers
:
{
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
,
'Access-Control-Allow-Origin'
:
'*'
,
},
},
...
@@ -27,7 +27,7 @@ module.exports = {
...
@@ -27,7 +27,7 @@ module.exports = {
// }
// }
// }
// }
},
},
//
lintOnSave: false,
lintOnSave
:
false
,
chainWebpack
:
config
=>
{
chainWebpack
:
config
=>
{
config
config
.
plugin
(
'html'
)
.
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