mirror of https://github.com/veops/cmdb.git
删除fullscreen相关代码
This commit is contained in:
parent
4eff09900d
commit
158d9f8a76
|
@ -7,7 +7,7 @@ import store from '../store'
|
|||
export const generatorDynamicRouter = async () => {
|
||||
const packages = []
|
||||
const { apps = undefined } = store.getters.userInfo
|
||||
for (let appName of appConfig.buildModules.filter(item => item !== 'fullscreen')) {
|
||||
for (let appName of appConfig.buildModules) {
|
||||
if (!apps || !apps.length || apps.includes(appName)) {
|
||||
const module = await import(`@/modules/${appName}/index.js`)
|
||||
const r = await module.default.route()
|
||||
|
@ -26,23 +26,6 @@ export const generatorDynamicRouter = async () => {
|
|||
}
|
||||
}
|
||||
let routes = packages
|
||||
if (appConfig.buildModules.includes('fullscreen')) {
|
||||
routes = routes.concat([
|
||||
{
|
||||
path: '/fullscreen',
|
||||
component: BasicLayout,
|
||||
redirect: '/fullscreen/index',
|
||||
meta: { title: '大屏' },
|
||||
name: 'fullscreen',
|
||||
children: [{
|
||||
path: '/fullscreen/index',
|
||||
name: 'fullscreen_index',
|
||||
meta: { title: '大屏' },
|
||||
component: () => import(/* webpackChunkName: "fullscreen" */ '@/views/fullscreen'),
|
||||
}],
|
||||
},
|
||||
{ path: '*', redirect: '/404', hidden: true }])
|
||||
}
|
||||
routes = routes.concat([
|
||||
{ path: '*', redirect: '/404', hidden: true },
|
||||
{
|
||||
|
|
|
@ -49,13 +49,11 @@ const store = new Vuex.Store({
|
|||
})
|
||||
|
||||
appConfig.buildModules.forEach(appName => {
|
||||
if (appName !== 'fullscreen') {
|
||||
import(`@/modules/${appName}/index.js`).then(m => {
|
||||
if (m.default.store) {
|
||||
store.registerModule(m.default.store.name || m.deault.name, m.default.store)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
export default store
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
<template>
|
||||
<div class="ops-fullscreen-dashboard">
|
||||
<ul>
|
||||
<li class="ops-fullscreen-dashboard-li" v-for="item in list" :key="item.name">
|
||||
<a class="ops-fullscreen-dashboard-a" @click="goto(item.href)">
|
||||
<div class="ops-fullscreen-dashboard-image" :style="{ backgroundImage: `url('${item.image}')` }"></div>
|
||||
<h4>{{ item.name }}</h4>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cmdb_fullscreen from '../../assets/fullscreen/cmdb_fullscreen.png'
|
||||
export default {
|
||||
name: 'Fullscreen',
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
name: 'CMDB',
|
||||
image: cmdb_fullscreen,
|
||||
href: '/cmdb/screen',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goto(href) {
|
||||
this.$router.push(href)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.ops-fullscreen-dashboard {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 40px;
|
||||
z-index: 150;
|
||||
width: 100%;
|
||||
padding: 24px;
|
||||
> ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
.ops-fullscreen-dashboard-li {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 25%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
.ops-fullscreen-dashboard-a {
|
||||
&:hover .ops-fullscreen-dashboard-image {
|
||||
transform: translateY(-4px);
|
||||
border-color: transparent;
|
||||
box-shadow: 0 6px 16px #6b93e024;
|
||||
}
|
||||
.ops-fullscreen-dashboard-image {
|
||||
background-color: #fff;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
border: 1px solid #f0f0f0;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
height: calc(100vw / 7 - 20px);
|
||||
min-height: 130px;
|
||||
max-height: 280px;
|
||||
object-fit: cover;
|
||||
transition: all 0.3s;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
h4 {
|
||||
margin: 16px 0 0;
|
||||
text-align: center;
|
||||
color: #101424;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue