guhongwei %!s(int64=5) %!d(string=hai) anos
pai
achega
a922b5b6bf

+ 41 - 16
src/layout/gain/gainLeft.vue

@@ -1,14 +1,20 @@
 <template>
   <div id="gainLeft">
     <el-row>
-      <el-col :span="24" class="leftMenu">
-        <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
-          <el-menu-item index="1">
-            <span slot="title">中心成果</span>
-          </el-menu-item>
-          <el-menu-item index="2">
-            <span slot="title">工作成果</span>
-          </el-menu-item>
+      <el-col :span="24" class="gainLeft">
+        <el-menu :default-active="path" class="el-menu-vertical-demo" :router="true">
+          <template v-for="(item, index) in subMenu">
+            <template v-if="item.children&&item.children.length>0">
+              <template v-for="(sec) in item.children">
+                <el-menu-item :index="sec.path" :key="sec.id" v-if="sec.type !== 'url'">{{ sec.title }}</el-menu-item>
+                <el-menu-item :index="``" :key="sec.id" @click="turnTo(sec.url)" v-else> {{ sec.title }}</el-menu-item>
+              </template>
+            </template>
+            <el-menu-item :index="item.path" :key="index" v-else-if="item.type === 'content'||item.type==='column'">
+              {{ item.title }}</el-menu-item>
+            <el-menu-item :index="`${index}-${subIndex}`" :key="index" @click="turnTo(item.url)" v-else>
+              {{ item.title }}</el-menu-item>
+          </template>
         </el-menu>
       </el-col>
     </el-row>
@@ -16,27 +22,46 @@
 </template>
 
 <script>
+import { mapActions, mapState, mapMutations } from 'vuex';
 export default {
   name: 'gainLeft',
   props: {},
   components: {},
   data: () => ({}),
-  created() { },
-  computed: {},
+  created() { this.getSubMenu() },
+  watch: {
+    path: 'getSubMenu',
+  },
+  computed: {
+    ...mapState(['subMenu']),
+    path() {
+      return this.$route.path;
+    },
+  },
   methods: {
-    handleOpen(key, keyPath) {
-      console.log(key, keyPath);
+    ...mapMutations(['setSubMenu']),
+    getSubMenu() {
+      this.setSubMenu(this.path);
     },
-    handleClose(key, keyPath) {
-      console.log(key, keyPath);
-    }
   },
 };
 </script>
 
 <style lang="less" scoped>
-.leftMenu {
+.gainLeft {
   min-height: 500px;
   background-color: rgba(255, 255, 255, 0.8);
 }
+.info {
+  height: 44px;
+  line-height: 44px;
+  padding: 0 15px;
+}
+.info .title {
+  border-bottom: 1px dashed #ccc;
+  display: inline-block;
+  height: 40px;
+  width: 260px;
+  padding: 0 0px;
+}
 </style>

+ 32 - 16
src/layout/interflow/interflowLeft.vue

@@ -1,14 +1,23 @@
 <template>
-  <div id="serviceLeft">
+  <div id="gainLeft">
     <el-row>
-      <el-col :span="24" class="main">
-        <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
-          <el-menu-item index="1">
-            <span slot="title">需求发布</span>
-          </el-menu-item>
+      <el-col :span="24" class="gainLeft">
+        <el-menu :default-active="path" class="el-menu-vertical-demo" :router="true">
+          <template v-for="(item, index) in subMenu">
+            <template v-if="item.children&&item.children.length>0">
+              <template v-for="(sec) in item.children">
+                <el-menu-item :index="sec.path" :key="sec.id" v-if="sec.type !== 'url'">{{ sec.title }}</el-menu-item>
+                <el-menu-item :index="``" :key="sec.id" @click="turnTo(sec.url)" v-else> {{ sec.title }}</el-menu-item>
+              </template>
+            </template>
+            <el-menu-item :index="item.path" :key="index" v-else-if="item.type === 'content'||item.type==='column'">
+              {{ item.title }}</el-menu-item>
+            <el-menu-item :index="`${index}-${subIndex}`" :key="index" @click="turnTo(item.url)" v-else>
+              {{ item.title }}</el-menu-item>
+          </template>
         </el-menu>
         <el-col :span="24" class="button">
-          <el-button type="primary" plain>我要发布</el-button>
+          <el-button type="primary">我要发布</el-button>
         </el-col>
       </el-col>
     </el-row>
@@ -18,9 +27,10 @@
 <script>
 import { mapActions, mapState, mapMutations } from 'vuex';
 export default {
-  name: 'serviceLeft',
+  name: 'gainLeft',
   props: {},
   components: {},
+  data: () => ({}),
   created() { this.getSubMenu() },
   watch: {
     path: 'getSubMenu',
@@ -36,23 +46,29 @@ export default {
     getSubMenu() {
       this.setSubMenu(this.path);
     },
-    handleOpen(key, keyPath) {
-      console.log(key, keyPath);
-    },
-    handleClose(key, keyPath) {
-      console.log(key, keyPath);
-    }
   },
 };
 </script>
 
 <style lang="less" scoped>
-.main {
+.gainLeft {
   min-height: 500px;
   background-color: rgba(255, 255, 255, 0.8);
 }
+.info {
+  height: 44px;
+  line-height: 44px;
+  padding: 0 15px;
+}
+.info .title {
+  border-bottom: 1px dashed #ccc;
+  display: inline-block;
+  height: 40px;
+  width: 260px;
+  padding: 0 0px;
+}
 .button {
   text-align: right;
-  padding: 10px;
+  padding: 20px 10px;
 }
 </style>

+ 18 - 12
src/layout/list/mainLeft.vue

@@ -1,17 +1,19 @@
 <template>
   <div id="mainLeft">
     <el-row>
-      <el-col :span="24">
+      <el-col :span="24" class="mainLeft">
         <el-menu :default-active="path" class="el-menu-vertical-demo" :router="true">
           <template v-for="(item, index) in subMenu">
             <template v-if="item.children&&item.children.length>0">
-                <template v-for="(sec) in item.children">
-                  <el-menu-item :index="sec.path" :key="sec.id" v-if="sec.type !== 'url'">{{ sec.title }}</el-menu-item>
-                  <el-menu-item :index="``" :key="sec.id" @click="turnTo(sec.url)" v-else> {{ sec.title }}</el-menu-item>
-                </template>
+              <template v-for="(sec) in item.children">
+                <el-menu-item :index="sec.path" :key="sec.id" v-if="sec.type !== 'url'">{{ sec.title }}</el-menu-item>
+                <el-menu-item :index="``" :key="sec.id" @click="turnTo(sec.url)" v-else> {{ sec.title }}</el-menu-item>
+              </template>
             </template>
-            <el-menu-item :index="item.path" :key="index" v-else-if="item.type === 'content'||item.type==='column'">{{ item.title }}</el-menu-item>
-            <el-menu-item :index="`${index}-${subIndex}`" :key="index" @click="turnTo(item.url)" v-else> {{ item.title }}</el-menu-item>
+            <el-menu-item :index="item.path" :key="index" v-else-if="item.type === 'content'||item.type==='column'">
+              {{ item.title }}</el-menu-item>
+            <el-menu-item :index="`${index}-${subIndex}`" :key="index" @click="turnTo(item.url)" v-else>
+              {{ item.title }}</el-menu-item>
           </template>
         </el-menu>
       </el-col>
@@ -20,25 +22,25 @@
 </template>
 
 <script>
-import { mapActions, mapState,mapMutations } from 'vuex';
+import { mapActions, mapState, mapMutations } from 'vuex';
 export default {
   name: 'mainLeft',
   props: {},
   components: {},
   data: () => ({}),
-  created() {this.getSubMenu()},
-  watch:{
+  created() { this.getSubMenu() },
+  watch: {
     path: 'getSubMenu',
   },
   computed: {
     ...mapState(['subMenu']),
-    path(){
+    path() {
       return this.$route.path;
     },
   },
   methods: {
     ...mapMutations(['setSubMenu']),
-    getSubMenu(){
+    getSubMenu() {
       this.setSubMenu(this.path);
     },
   },
@@ -46,6 +48,10 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.mainLeft {
+  min-height: 500px;
+  background-color: rgba(255, 255, 255, 0.8);
+}
 .info {
   height: 44px;
   line-height: 44px;

+ 1 - 1
src/layout/news/newsRight.vue

@@ -25,7 +25,7 @@
               </el-col>
               <el-col :span="3" class="more">
                 <!-- @click="$router.push({ path: `moreList/${newsRightList[0].id}` })" -->
-                <el-link :underline="false" @click="$router.push({ path: '/lists/moreList' })">more</el-link>
+                <el-link :underline="false" @click="$router.push({ path: `moreList/${newsRightList[0].id}` })">more</el-link>
               </el-col>
             </el-col>
             <el-col :span="24" class="children" v-for="(tag, index) in item.children" :key="index">