Commit d24185d1 by 冒粤蓉

fix

1 parent f1f2f247
......@@ -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%",
......
......@@ -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, onMounted, computed, watch, getCurrentInstance } from 'vue';
import { reactive, toRefs, onBeforeMount, 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
}
}
......
......@@ -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>
......
<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;
......
......@@ -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
......@@ -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>
......
......@@ -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'
}
}
]
......
......@@ -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)
......
......@@ -61,7 +61,7 @@ const qianKunStart = (config, baseURL) => {
setDefaultMountApp(defaultApp);
start({ singular: false, sandbox: { strictStyleIsolation: true } });
start({ singular: false });
}
......
......@@ -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')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!