Bläddra i källkod

日前调度计划页面合并

小王 1 år sedan
förälder
incheckning
43bed72805
2 ändrade filer med 252 tillägg och 362 borttagningar
  1. 107 173
      src/router/index.js
  2. 145 189
      src/views/fdjh/LeftNav.vue

+ 107 - 173
src/router/index.js

@@ -3,28 +3,17 @@ import VueRouter from 'vue-router'
 import Login from '../views/Login/Login.vue'
 import Table1 from '../views/Articles/index.vue'
 import Fdjh from '../views/fdjh/fdjh.vue'
-import Gznfh1 from '@/views/ydjhdjk/gznfh/index.vue'
-import Gznfh from '@/views/ydjhdjk/gznfh/gznfh.vue'
-import Llx from '@/views/ystjjk/llx/llx.vue'
-import Llx1 from '@/views/ystjjk/llx/index.vue'
-import Dm from '@/views/ystjjk/dm/dm.vue'
-import Dm1 from '@/views/ystjjk/dm/index.vue'
-import Hd from '@/views/sjcjjk/hd/hd.vue'
-import Hd1 from '@/views/sjcjjk/hd/index.vue'
-import Fdgf from '@/views/sjcjjk/fdgf/fdgf.vue'
-import Fdgf1 from '@/views/sjcjjk/fdgf/index.vue'
-import Ptfh from '@/views/sjcjjk/ptfh/ptfh.vue'
-import Ptfh1 from '@/views/sjcjjk/ptfh/index.vue'
-import Gaoznfh from '@/views/sjcjjk/gznfh/gznfh.vue'
-import Gaoznfh1 from '@/views/sjcjjk/gznfh/index.vue'
-import Fdjhhd from '@/views/fdjh/hd/hd.vue'
-import Fdjhhd1 from '@/views/fdjh/hd/index.vue'
-import Fdjhgf from '@/views/fdjh/gf/gf.vue'
-import Fdjhgf1 from '@/views/fdjh/gf/index.vue'
-import Fdjhcn from '@/views/fdjh/cn/cn.vue'
-import Fdjhcn1 from '@/views/fdjh/cn/index.vue'
-import Jkcx from '@/views/xtrz/jkcx/jkcx.vue'
-import Jkcx1 from '@/views/xtrz/jkcx/index.vue'
+import Gznfh from '@/views/ydjhdjk/gznfh/index.vue'
+import Llx from '@/views/ystjjk/llx/index.vue'
+import Dm from '@/views/ystjjk/dm/index.vue'
+import Hd from '@/views/sjcjjk/hd/index.vue'
+import Fdgf from '@/views/sjcjjk/fdgf/index.vue'
+import Ptfh from '@/views/sjcjjk/ptfh/index.vue'
+import Gaoznfh from '@/views/sjcjjk/gznfh/index.vue'
+import Fdjhhd from '@/views/fdjh/hd/index.vue'
+import Fdjhgf from '@/views/fdjh/gf/index.vue'
+import Fdjhcn from '@/views/fdjh/cn/index.vue'
+import Jkcx from '@/views/xtrz/jkcx/index.vue'
 import Xtpz from '../views/xtpz/xtpz.vue'
 import Rqdd from '../views/rqdd/rqdd.vue'
 import fdjhnav from '../views/fdjh/LeftNav.vue'
@@ -32,162 +21,107 @@ import fdjhnav from '../views/fdjh/LeftNav.vue'
 Vue.use(VueRouter)
 
 const routes = [
-  {
-    path: '/xndc',
-    component: () => import('@/views/xndc/index'),
-    hidden: true
-  },
-  {
-    path: '/',
-    name: 'Login',
-    component: Login
-  },
-  {
-    path: '/table1',
-    name: 'Table1',
-    component: Table1
-  },
-  {
-    path: '/fdjh',
-    name: '发电计划',
-    component: Fdjh
-  },
-  {
-    path: '/fdjhhd1',
-    name: '火电厂',
-    component: Fdjhhd1
-  },
-  {
-    path: '/fdjhhd',
-    name: '火电厂',
-    component: Fdjhhd
-  },
-  {
-    path: '/fdjhgf1',
-    name: '光伏电站',
-    component: Fdjhgf1
-  },
-  {
-    path: '/fdjhgf',
-    name: '光伏电站',
-    component: Fdjhgf
-  },
-  {
-    path: '/fdjhcn1',
-    name: '储能',
-    component: Fdjhcn1
-  },
-  {
-    path: '/fdjhcn',
-    name: '储能',
-    component: Fdjhcn
-  },
-  {
-    path: '/gznfh1',
-    name: '高载能负荷',
-    component: Gznfh1
-  },
-  {
-    path: '/gznfh',
-    name: '高载能负荷',
-    component: Gznfh
-  },
-  {
-    path: '/llx1',
-    name: '联络线',
-    component: Llx1
-  },
-  {
-    path: '/llx',
-    name: '联络线',
-    component: Llx
-  },
-  {
-    path: '/dm1',
-    name: '断面',
-    component: Dm1
-  },
-  {
-    path: '/dm',
-    name: '断面',
-    component: Dm
-  },
-  {
-    path: '/hd1',
-    name: '火电厂',
-    component: Hd1
-  },
-  {
-    path: '/hd',
-    name: '火电厂',
-    component: Hd
-  },
-  {
-    path: '/fdgf1',
-    name: '风电、光伏电站',
-    component: Fdgf1
-  },
-  {
-    path: '/fdgf',
-    name: '风电、光伏电站',
-    component: Fdgf
-  },
-  {
-    path: '/ptfh1',
-    name: '普通负荷',
-    component: Ptfh1
-  },
-  {
-    path: '/ptfh',
-    name: '普通负荷',
-    component: Ptfh
-  },
-  {
-    path: '/gaoznfh1',
-    name: '高载能负荷',
-    component: Gaoznfh1
-  },
-  {
-    path: '/gaoznfh',
-    name: '高载能负荷',
-    component: Gaoznfh
-  },
-  {
-    path: '/jkcx1',
-    name: '接口、程序',
-    component: Jkcx1
-  },
-  {
-    path: '/jkcx',
-    name: '接口、程序',
-    component: Jkcx
-  },
+    {
+        path: '/xndc',
+        component: () => import('@/views/xndc/index'),
+        hidden: true
+    },
+    {
+        path: '/',
+        name: 'Login',
+        component: Login
+    },
+    {
+        path: '/table1',
+        name: 'Table',
+        component: Table1
+    },
+    {
+        path: '/fdjh',
+        name: '发电计划',
+        component: Fdjh
+    },
+    {
+        path: '/fdjhhd',
+        name: '火电厂',
+        component: Fdjhhd
+    },
+    {
+        path: '/fdjhgf',
+        name: '光伏电站',
+        component: Fdjhgf
+    },
+    {
+        path: '/fdjhcn',
+        name: '储能',
+        component: Fdjhcn
+    },
+    {
+        path: '/gznfh',
+        name: '高载能负荷',
+        component: Gznfh
+    },
+    {
+        path: '/llx',
+        name: '联络线',
+        component: Llx
+    },
+    {
+        path: '/dm',
+        name: '断面',
+        component: Dm
+    },
+    {
+        path: '/hd',
+        name: '火电厂',
+        component: Hd
+    },
+    {
+        path: '/fdgf',
+        name: '风电、光伏电站',
+        component: Fdgf
+    },
+    {
+        path: '/ptfh',
+        name: '普通负荷',
+        component: Ptfh
+    },
+    {
+        path: '/gaoznfh',
+        name: '高载能负荷',
+        component: Gaoznfh
+    },
+    {
+        path: '/jkcx',
+        name: '接口、程序',
+        component: Jkcx
+    },
 
-  {
-    path: '/xtpz',
-    name: '系统配置',
-    component: Xtpz
-  },
-  {
-    path: '/rqdd',
-    name: '日前调度',
-    component: Rqdd
-  },
-  {
-    path: '/dailyPlanning',
-    component: () => import('@/views/xndc/index'),
-    hidden: true
-  },
-  {
-    path: '/fdjhnav',
-    name: '发电计划菜单',
-    component: fdjhnav
-  },
+    {
+        path: '/xtpz',
+        name: '系统配置',
+        component: Xtpz
+    },
+    {
+        path: '/rqdd',
+        name: '日前调度',
+        component: Rqdd
+    },
+    {
+        path: '/dailyPlanning',
+        component: () => import('@/views/xndc/index'),
+        hidden: true
+    },
+    {
+        path: '/fdjhnav',
+        name: '发电计划菜单',
+        component: fdjhnav
+    },
 
 ]
 
 const router = new VueRouter({
-  routes
+    routes
 })
 
 export default router

+ 145 - 189
src/views/fdjh/LeftNav.vue

@@ -1,233 +1,189 @@
 <template>
-  <div class="sidebar">
-    <div class="title"
-         style="font-family: AliMaMa;font-size: 30px;font-weight: 1000;text-align: left;">
-      <span style="position: absolute;top:-3px;left: 70px">目录</span>
+    <div class="sidebar">
+        <div class="title"
+             style="font-family: AliMaMa;font-size: 30px;font-weight: 1000;text-align: left;">
+            <span style="position: absolute;top:-3px;left: 70px">目录</span>
+        </div>
+
+        <el-menu
+                active-text-color="#ffd04b"
+                background-color="transparent"
+                class="sidebar-el-menu"
+                default-active="1"
+                text-color="#fff">
+            <!-- 一级菜单 -->
+            <template v-for="item in list">
+                <el-submenu v-if="item.children && item.children.length" :key="item.path" :index="item.path">
+                    <template slot="title"><img :src="require('./img/plan.png')"
+                                                width="28px"/><span>{{ item.name }}</span>
+                    </template>
+                    <!-- 二级菜单 -->
+                    <template v-for="itemChild in item.children">
+                        <el-submenu v-if="itemChild.children && itemChild.children.length" :key="itemChild.path"
+                                    :index="itemChild.path">
+                            <template slot="title"><img
+                                    :src="require('./img/pc1.png')"/><span>{{ itemChild.name }}</span></template>
+                            <!-- 三级菜单 -->
+                            <el-menu-item v-for="itemChild_Child in itemChild.children" :key="itemChild_Child.path"
+                                          :index="itemChild_Child.path" @click="changePage(itemChild_Child)">
+                                <img :src="require('./img/last1.png')"/><span
+                                    slot="title">{{ itemChild_Child.name }}</span></el-menu-item>
+                        </el-submenu>
+
+                        <el-menu-item v-else :key="itemChild.path" :index="itemChild.path"><img
+                                :src="require('./img/pc1.png')"/><span slot="title">{{ itemChild.name }}</span>
+                        </el-menu-item>
+                    </template>
+                </el-submenu>
+                <el-menu-item v-else :key="item.path" :index="item.path"><img :src="require('./img/plan.png')"
+                                                                              width="28px"/><span
+                        slot="title">{{ item.name }}</span></el-menu-item>
+            </template>
+        </el-menu>
     </div>
-
-  <el-menu
-      default-active="1"
-      background-color="transparent"
-      text-color="#fff"
-      active-text-color="#ffd04b"
-      class="sidebar-el-menu">
-    <!-- 一级菜单 -->
-    <template v-for="item in list">
-      <el-submenu v-if="item.children && item.children.length" :index="item.path" :key="item.path">
-        <template slot="title"><img width="28px" :src="require('./img/plan.png')" /><span>{{item.name}}</span></template>
-        <!-- 二级菜单 -->
-        <template v-for="itemChild in item.children">
-          <el-submenu v-if="itemChild.children && itemChild.children.length" :index="itemChild.path" :key="itemChild.path">
-            <template slot="title"><img :src="require('./img/pc1.png')" /><span>{{itemChild.name}}</span></template>
-            <!-- 三级菜单 -->
-            <el-menu-item v-for="itemChild_Child in itemChild.children" :index="itemChild_Child.path" :key="itemChild_Child.path" @click="changePage(itemChild_Child)">
-              <img :src="require('./img/last1.png')" /><span slot="title">{{itemChild_Child.name}}</span></el-menu-item>
-          </el-submenu>
-
-          <el-menu-item v-else :index="itemChild.path" :key="itemChild.path"><img :src="require('./img/pc1.png')" /><span slot="title">{{itemChild.name}}</span></el-menu-item>
-        </template>
-      </el-submenu>
-      <el-menu-item v-else :index="item.path" :key="item.path"><img width="28px" :src="require('./img/plan.png')" /><span slot="title">{{item.name}}</span></el-menu-item>
-    </template>
-  </el-menu>
-
-<!--  <el-menu-->
-<!--      class="sidebar-el-menu"-->
-<!--      @open="handleOpen"-->
-<!--      @close="handleClose"-->
-<!--      background-color="transparent"-->
-<!--      text-color="#fff"-->
-<!--      active-text-color="#ffd04b">-->
-
-<!--    <el-submenu index="1">-->
-<!--      <template slot="title">-->
-<!--        <img width="28px" :src="require('./img/plan.png')" />-->
-<!--        <span style="font-size:18px;font-weight:bold">&nbsp;日前调度计划</span>-->
-<!--      </template>-->
-<!--      <el-submenu index="1-1">-->
-<!--        <template slot="title">-->
-<!--          <img :src="require('./img/pc1.png')" />-->
-<!--          <span style="font-size:16px;font-weight:bold">&nbsp;发电端计划监控</span>-->
-<!--        </template>-->
-<!--        <el-menu-item index="1-1-1" @click="changeLogo"><img :src="require('./img/last1.png')" />&nbsp;风电</el-menu-item>-->
-<!--        <el-menu-item index="1-1-2"><img :src="require('./img/last1.png')" />&nbsp;光伏电站</el-menu-item>-->
-<!--        <el-menu-item index="1-1-3"><img :src="require('./img/last1.png')" />&nbsp;火电站</el-menu-item>-->
-<!--      </el-submenu>-->
-<!--      <el-submenu index="1-2">-->
-<!--        <template slot="title">-->
-<!--          <img :src="require('./img/pc1.png')" />-->
-<!--          <span style="font-size:16px;font-weight:bold">&nbsp;用电端计划监控</span>-->
-<!--        </template>-->
-<!--        <el-menu-item index="1-2-1"><img :src="require('./img/last1.png')" />&nbsp;高载能计划负荷</el-menu-item>-->
-<!--      </el-submenu>-->
-<!--      <el-submenu index="1-3">-->
-<!--        <template slot="title">-->
-<!--          <img :src="require('./img/pc1.png')" />-->
-<!--          <span style="font-size:16px;font-weight:bold">&nbsp;约束条件监控</span>-->
-<!--        </template>-->
-<!--        <el-menu-item index="1-3-1"><img :src="require('./img/last1.png')" />&nbsp;联络线</el-menu-item>-->
-<!--        <el-menu-item index="1-3-2"><img :src="require('./img/last1.png')" />&nbsp;断面</el-menu-item>-->
-<!--      </el-submenu>-->
-<!--      <el-submenu index="1-4">-->
-<!--        <template slot="title">-->
-<!--          <img :src="require('./img/pc1.png')" />-->
-<!--          <span style="font-size:16px;font-weight:bold">&nbsp;数据采集监控监控</span>-->
-<!--        </template>-->
-<!--        <el-menu-item index="1-4-1"><img :src="require('./img/last1.png')" />&nbsp;火电厂</el-menu-item>-->
-<!--        <el-menu-item index="1-4-2"><img :src="require('./img/last1.png')" />&nbsp;风电、光伏电站</el-menu-item>-->
-<!--        <el-menu-item index="1-4-3"><img :src="require('./img/last1.png')" />&nbsp;普通负荷</el-menu-item>-->
-<!--        <el-menu-item index="1-4-4"><img :src="require('./img/last1.png')" />&nbsp;高载能负荷</el-menu-item>-->
-<!--      </el-submenu>-->
-<!--    </el-submenu>-->
-<!--  </el-menu>-->
-  </div>
 </template>
 
 <script>
 export default {
-  data() {
-    return {
-      list: [
-        {
-          path: "/1",
-          name: "日前调度计划",
-          children: [
-            {
-              path: "/1/1",
-              name: "发电端计划监控",
-              children: [
-                {
-                  path: "/#/table1",
-                  name: "风电",
-                },
-                {
-                  path: "/1/1/2",
-                  name: "光伏电站",
-                },
-                {
-                  path: "/1/1/3",
-                  name: "火电站",
-                }
-              ]
-            },
-            {
-              path: "/1/2",
-              name: "用电端计划监控",
-              children: [
-                {
-                  path: "/1/2/1",
-                  name: "高载能计划负荷",
-                }
-              ]
-            },
-            {
-              path: "/1/3",
-              name: "约束条件监控",
-              children: [
-                {
-                  path: "/1/3/1",
-                  name: "联络线",
-                },
-                {
-                  path: "/1/3/2",
-                  name: "断面",
-                }
-              ]
-            },
-            {
-              path: "/1/4",
-              name: "数据采集监控监控",
-              children: [
+    data() {
+        return {
+            list: [
                 {
-                  path: "/1/4/1",
-                  name: "火电厂",
-                },
-                {
-                  path: "/1/4/2",
-                  name: "风电、光伏电站",
-                },
-                {
-                  path: "/1/4/3",
-                  name: "普通负荷",
-                },
-                {
-                  path: "/1/4/4",
-                  name: "高载能负荷",
+                    path: "/1",
+                    name: "日前调度计划",
+                    children: [
+                        {
+                            path: "/1/1",
+                            name: "发电端计划监控",
+                            children: [
+                                {
+                                    path: "/#/table1",
+                                    name: "风电",
+                                },
+                                {
+                                    path: "/#/fdjhgf",
+                                    name: "光伏电站",
+                                },
+                                {
+                                    path: "/#/fdjhhd",
+                                    name: "火电厂",
+                                }
+                            ]
+                        },
+                        {
+                            path: "/1/2",
+                            name: "用电端计划监控",
+                            children: [
+                                {
+                                    path: "/#/gznfh",
+                                    name: "高载能计划负荷",
+                                }
+                            ]
+                        },
+                        {
+                            path: "/1/3",
+                            name: "约束条件监控",
+                            children: [
+                                {
+                                    path: "/#/llx",
+                                    name: "联络线",
+                                },
+                                {
+                                    path: "/#/dm",
+                                    name: "断面",
+                                }
+                            ]
+                        },
+                        {
+                            path: "/1/4",
+                            name: "数据采集监控监控",
+                            children: [
+                                {
+                                    path: "/#/hd",
+                                    name: "火电厂",
+                                },
+                                {
+                                    path: "/#/fdgf",
+                                    name: "风电、光伏电站",
+                                },
+                                {
+                                    path: "/#/ptfh",
+                                    name: "普通负荷",
+                                },
+                                {
+                                    path: "/#/gaoznfh",
+                                    name: "高载能负荷",
+                                }
+                            ]
+                        }
+                    ]
                 }
-              ]
-            }
-          ]
+            ]
         }
-      ]
-    }
-  },
-  methods: {
-    handleOpen(key, keyPath) {
-      // console.log(key, keyPath);
-    },
-    handleClose(key, keyPath) {
-      // console.log(key, keyPath);
     },
-    changePage(obj){
-      var parentIframe = parent.document.getElementById('showcontent');
-       parentIframe.src = obj.path;
-    }
+    methods: {
+        changePage(obj) {
+            var parentIframe = parent.document.getElementById('showcontent');
+            parentIframe.src = obj.path;
+        }
 
-  }
+    }
 }
 </script>
 
 <style scoped>
 .title {
-  margin-bottom: 20px;
-  margin-left: 60px;
-  font-size: 18px;
-  color: #fff;
+    margin-bottom: 20px;
+    margin-left: 60px;
+    font-size: 18px;
+    color: #fff;
 }
 
 .sidebar {
-  display: block;
-  text-align: left;
+    display: block;
+    text-align: left;
 }
 
 .sidebar::-webkit-scrollbar {
-  width: 0;
+    width: 0;
 }
 
 .sidebar-el-menu:not(.el-menu--collapse) {
 
-  margin: 40px 0 30px 30px;
-  background-size: 100% 100%;
+    margin: 40px 0 30px 30px;
+    background-size: 100% 100%;
 }
 
 
-/deep/ .el-submenu__title:hover{
-  background-color: rgb(103, 118, 49) !important;
+/deep/ .el-submenu__title:hover {
+    background-color: rgb(103, 118, 49) !important;
 
 }
-/deep/ .sidebar-el-menu{
-  margin-left: 23px !important;
+
+/deep/ .sidebar-el-menu {
+    margin-left: 23px !important;
 }
 
-.sidebar>ul {
-  height: 100%;
+.sidebar > ul {
+    height: 100%;
 }
 
-.el-menu{
-  border:0!important;
+.el-menu {
+    border: 0 !important;
 }
+
 .el-menu-item {
-  height: 40px;
-  font-size: 16px;
-  font-weight:bold;
+    height: 40px;
+    font-size: 16px;
+    font-weight: bold;
 }
 
-.el-submenu .el-menu-item:hover{
-  background-color: rgb(103, 118, 49) !important;
+.el-submenu .el-menu-item:hover {
+    background-color: rgb(103, 118, 49) !important;
 }
 
-.el-sub-menu__title:hover{
-  background-color: rgb(103, 118, 49) !important;
+.el-sub-menu__title:hover {
+    background-color: rgb(103, 118, 49) !important;
 }
 </style>