Просмотр исходного кода

Merge branch 'master' of http://git.cc-lotus.info/count/webnew-count

wuhongyu 5 лет назад
Родитель
Сommit
47797fa33a

+ 4 - 1
src/layout/common/newmenu.vue

@@ -5,7 +5,7 @@
       <el-menu-item index="2">成果展示</el-menu-item>
       <el-menu-item index="3">计算服务</el-menu-item>
       <el-menu-item index="4">交流活动</el-menu-item>
-      <el-menu-item index="5"><a href="https://www.ele.me" target="_blank">党建学院</a></el-menu-item>
+      <el-menu-item index="5" @click="toPartisan">党建学院</el-menu-item>
     </el-menu>
   </div>
 </template>
@@ -23,6 +23,9 @@ export default {
   computed: {},
   methods: {
     handleSelect() {},
+    toPartisan() {
+      this.$router.push({ path: '/partisan/index' });
+    },
   },
 };
 </script>

+ 30 - 0
src/layout/news/infoList.vue

@@ -0,0 +1,30 @@
+<template>
+  <div id="infoList">
+    <p>infoList</p>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'infoList',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 41 - 0
src/layout/news/newsQuestion.vue

@@ -0,0 +1,41 @@
+<template>
+  <div id="newsQuestion">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
+          <i class="el-icon-s-unfold"></i>
+          <span>新闻咨询</span>
+        </el-col>
+        <el-col :span="24" class="question">
+          问题
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'newsQuestion',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 10 - 0
src/router/index.js

@@ -9,6 +9,16 @@ const routes = [
     name: '',
     component: () => import('../views/index.vue'),
   },
+  {
+    path: '/partisan/index',
+    name: '党建学苑',
+    component: () => import('../views/partisan/index.vue'),
+  // 新闻动态
+  {
+    path: '/news/index',
+    meta: { title: '新闻动态', subSite: true },
+    component: () => import('../views/news/index.vue'),
+  },
 ];
 
 const router = new VueRouter({

+ 100 - 0
src/views/news/index.vue

@@ -0,0 +1,100 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          头部
+        </el-col>
+        <el-col :span="24" class="banner">
+          <div class="w_1200">
+            logo
+          </div>
+        </el-col>
+        <el-col :span="24" class="menu">
+          <div class="w_1200">
+            菜单
+          </div>
+        </el-col>
+        <el-col :span="24" class="main">
+          <div class="w_1200">
+            <el-col :span="5" class="left">
+              <newsQuestion></newsQuestion>
+            </el-col>
+            <el-col :span="18" class="right">
+              <infoList></infoList>
+            </el-col>
+          </div>
+        </el-col>
+        <el-col :span="24" class="foot">
+          <div class="w_1200">
+            底部
+          </div>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import newsQuestion from '@/layout/news/newsQuestion.vue';
+import infoList from '@/layout/news/infoList.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    newsQuestion,
+    infoList,
+  },
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.style {
+  .top {
+    height: 40px;
+  }
+  .banner {
+    height: 220px;
+  }
+  .menu {
+    height: 70px;
+    margin: 0 0 10px 0;
+  }
+  .main {
+    min-height: 600px;
+    margin: 0 0 10px 0;
+    .left {
+      min-height: 600px;
+      background: #fff;
+      margin: 0 10px 0 0;
+    }
+    .right {
+      width: 78%;
+      min-height: 600px;
+      background: #fff;
+    }
+  }
+  .foot {
+    height: 120px;
+  }
+}
+</style>

+ 39 - 0
src/views/partisan/index.vue

@@ -0,0 +1,39 @@
+<template>
+  <div id="partisan">
+    <el-row>
+      <div class="w_1200">
+        <top></top>
+        <div class="w_1200">
+          <newmenu></newmenu>
+        </div>
+        <el-col class="main"> </el-col>
+      </div>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from '@/layout/common/top.vue';
+import newmenu from '@/layout/common/newmenu.vue';
+export default {
+  name: 'partisan',
+  props: {},
+  components: { top, newmenu },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.main {
+  height: 740px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+</style>