diff --git a/src/assets/main.css b/src/assets/main.css index 36fb845..79b6035 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -1,9 +1,8 @@ @import './base.css'; #app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; + width: 100%; + min-height: 100vh; font-weight: normal; } @@ -21,15 +20,4 @@ a, } } -@media (min-width: 1024px) { - body { - display: flex; - place-items: center; - } - #app { - display: grid; - grid-template-columns: 1fr 1fr; - padding: 0 2rem; - } -} diff --git a/src/layout/Layout.vue b/src/layout/Layout.vue new file mode 100644 index 0000000..6905bc8 --- /dev/null +++ b/src/layout/Layout.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index 47c7288..9db9eff 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,5 +1,6 @@ import {createWebHistory, createRouter} from "vue-router"; +import Layout from "@/layout/Layout.vue"; import LoginVue from "@/views/Login.vue"; import VideoVue from "@/views/Video.vue"; import VideoListVue from "@/views/VideoList.vue"; @@ -25,78 +26,81 @@ const routes = [ component: LoginVue }, { - path: '/video', - name: 'Video', - component: VideoVue - }, - { - path: '/videoList', - name: 'VideoList', - component: VideoListVue - }, - { - path: '/device', - name: 'Device', - component: DeviceListVue - }, - { - path: '/deviceRealVP', - name: 'DeviceRealVP', - component: DeviceRealVP - }, - { - path: '/im', - name: 'Im', - component: ImVue - }, - { - path: '/user', - name: 'User', - component: UserListVue - }, - { - path: '/cid', - name: 'CID', - component: CIDListVue - }, - { - path: "/group", - name: "Group", - component: Group - }, - { - path: '/cidlog', - name: 'CIDLog', - component: CIDLog - }, - { - path:"/chat", - name:"chat", - component:Chat - }, - { - path:"/file", - name:"file", - component:File - }, - { - path:"/shell", - name:"shell", - component:Shell + path: '/', + component: Layout, + redirect: '/user', + children: [ + { + path: 'video', + name: 'Video', + component: VideoVue + }, + { + path: 'videoList', + name: 'VideoList', + component: VideoListVue + }, + { + path: 'device', + name: 'Device', + component: DeviceListVue + }, + { + path: 'deviceRealVP', + name: 'DeviceRealVP', + component: DeviceRealVP + }, + { + path: 'im', + name: 'Im', + component: ImVue + }, + { + path: 'user', + name: 'User', + component: UserListVue + }, + { + path: 'cid', + name: 'CID', + component: CIDListVue + }, + { + path: 'group', + name: 'Group', + component: Group + }, + { + path: 'cidlog', + name: 'CIDLog', + component: CIDLog + }, + { + path: 'chat', + name: 'chat', + component: Chat + }, + { + path: 'file', + name: 'file', + component: File + }, + { + path: 'shell', + name: 'shell', + component: Shell + }, + { + path: 'projectSelect', + name: 'projectSelect', + component: projectSelect + } + ] }, { path: '/callback', name: 'callback', component: callback - }, - { - path: '/projectSelect', - name: 'projectSelect', - component: projectSelect - }, - { - path: '/', - redirect: '/login' } ] diff --git a/src/views/CIDList.vue b/src/views/CIDList.vue index 8b5f75d..01b5885 100644 --- a/src/views/CIDList.vue +++ b/src/views/CIDList.vue @@ -7,7 +7,7 @@ import { addCIDService } from "@/api/cid.js"; import { deleteCIDService } from "@/api/cid.js"; import { updateCIDService,getCIDRuningListService } from "@/api/cid.js"; import router from "@/router/index.js"; -import Menu from "@/views/Menu.vue"; + import {ElMessage, ElLoading} from "element-plus"; @@ -301,8 +301,7 @@ export default {