guhongwei 5 years ago
parent
commit
d962a8bbb4

+ 12 - 17
src/layout/index/chengguo.vue

@@ -11,15 +11,13 @@
           </el-col>
         </el-col>
         <el-col :span="24" class="newsMain">
-          <el-col :span="24" class="newsLi">
-            <el-col class="chengguolist" :span="24" v-for="(tag, index) in chengguolist" :key="index" :type="tag.type"
+          <el-col class="chengguolist" :span="24" v-for="(tag, index) in chengguolist" :key="index" :type="tag.type"
                   @click="$router.push({ path: '/detail', params:{id:tag.id} })">
-              <el-col :span="20">
-                {{tag.title}}
-              </el-col>
-              <el-col :span="4" style="text-align:right;">
-                {{tag.time}}
-              </el-col>
+            <el-col :span="20">
+              {{tag.title}}
+            </el-col>
+            <el-col :span="4" style="text-align:right;">
+              {{tag.time}}
             </el-col>
           </el-col>
         </el-col>
@@ -38,7 +36,7 @@ export default {
   data: () => ({
     borderColor: '#850000',
     Color: '#850000',
-    title:'成果展示'
+    title: '成果展示'
   }),
   created() {
   },
@@ -48,11 +46,6 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.chengguolist{
-  padding: 10px 0;
-  border-bottom: 1px dashed #ccc;
-  margin: 1px;
-}
 .news {
   padding: 10px;
 }
@@ -64,10 +57,12 @@ export default {
   height: 30px;
   border-bottom: 1px solid transparent;
 }
+.chengguolist {
+  padding: 10px 0;
+  border-bottom: 1px dashed #ccc;
+  margin: 1px;
+}
 .newsMain {
   padding: 5px 0;
 }
-.block {
-  height: 250px;
-}
 </style>

+ 67 - 0
src/layout/index/mingshi.vue

@@ -0,0 +1,67 @@
+<template>
+  <div id="news">
+    <el-row>
+      <el-col :span="24" class="news">
+        <el-col :span="24" class="topTit">
+          <el-col :span="18">
+            <span :style="`border-color:${borderColor}`">{{title}}</span>
+          </el-col>
+          <el-col :span="6" style="text-align:right;">
+            <el-link :underline="false" :style="`color:${Color}`">MORE<i class="el-icon-video-play"></i></el-link>
+          </el-col>
+        </el-col>
+          <el-col :span="24" class="newsMain">
+            <el-col class="chengguolist" :span="24" v-for="(tag, index) in mingshilist" :key="index" :type="tag.type"
+                  @click="$router.push({ path: '/detail', params:{id:tag.id} })">
+              <el-col :span="16">
+                {{tag.title}}
+              </el-col>
+              <el-col :span="8" style="text-align:right;">
+                {{tag.time}}
+              </el-col>
+            </el-col>
+          </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'news',
+  props: {
+    mingshilist:null,
+  },
+  components: {},
+  data: () => ({
+    borderColor:'#850000',
+    Color:'#850000',
+    title:"计算明示",
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.news {
+  padding: 10px;
+}
+.topTit {
+  border-bottom: 1px solid #ccc;
+}
+.topTit span {
+  display: inline-block;
+  height: 30px;
+  border-bottom: 1px solid transparent;
+}
+.newsMain {
+  padding: 5px 0;
+}
+.chengguolist{
+  padding: 10px 0;
+  border-bottom: 1px dashed #ccc;
+  margin: 1px;
+}
+</style>

+ 27 - 67
src/layout/index/news.vue

@@ -1,5 +1,5 @@
 <template>
-  <div id="news">
+  <div id="chengguo">
     <el-row>
       <el-col :span="24" class="news">
         <el-col :span="24" class="topTit">
@@ -11,19 +11,14 @@
           </el-col>
         </el-col>
         <el-col :span="24" class="newsMain">
-          <!-- <el-col :span="14" class="block">
-            <el-carousel ref="shubiao">
-              <el-carousel-item v-for="(item, index) in newsList" :key="index" :name="`${index}`">
-                <el-link :underline="false" ><img :src="item.picurl" class="newsList" /></el-link>
-              </el-carousel-item>
-            </el-carousel>
-          </el-col> -->
-          <el-col :span="24" class="newsLi">
-            <ul>
-              <li v-for="(tag, index) in newsList" :key="index" :type="tag.type" @click="$router.push({ path: '/detail', params:{id:tag.id} })">
-                <el-link :underline="false" class="newsListTit" >{{ tag.title }}</el-link>
-              </li>
-            </ul>         
+          <el-col class="chengguolist" :span="24" v-for="(tag, index) in newslist" :key="index" :type="tag.type"
+                  @click="$router.push({ path: '/detail', params:{id:tag.id} })">
+            <el-col :span="20">
+              {{tag.title}}
+            </el-col>
+            <el-col :span="4" style="text-align:right;">
+              {{tag.time}}
+            </el-col>
           </el-col>
         </el-col>
       </el-col>
@@ -33,76 +28,41 @@
 
 <script>
 export default {
-  name: 'news',
+  name: 'chengguo',
   props: {
-    // newsList:null,
-    // title: null,
+    newslist: null,
   },
   components: {},
   data: () => ({
-    borderColor:'#850000',
-    Color:'#850000',
-    title:"最近新闻",
-    newsList:[],
+    borderColor: '#850000',
+    Color: '#850000',
+    title: '新闻动态'
   }),
   created() {
-    this.testList();
   },
   computed: {},
-  methods: {
-    testList() {
-      let arr = [];
-      for (let index = 0; index < 8; index++){
-        arr.push({title:`测试标题${index+1}`});
-      }
-      this.$set(this, `newsList`, arr);
-    },
-  },
+  methods: {},
 };
 </script>
 
 <style lang="less" scoped>
-ul {
-  margin: 0;
-  padding: 0;
-}
-li {
-  margin: 0;
-  padding: 0;
-  list-style: none;
+.news {
+  padding: 10px;
 }
-.news{
-  padding:10px;
+.topTit {
+  border-bottom: 1px solid #ccc;
 }
-.topTit{
-  border-bottom:1px solid #ccc;
-}
-.topTit span{
+.topTit span {
   display: inline-block;
   height: 30px;
-  border-bottom:1px solid transparent;
-}
-.newsMain{
-  padding:5px 0;
-}
-.block{
-  height:250px;
-}
-.newsList{
-  height:250px;
-}
-.newsLi ul li{
-  padding:9px;
-  border-bottom:1px dashed #ccc;
-  margin:1px;
+  border-bottom: 1px solid transparent;
 }
-.newsListTit{
-  color:#606266;
+.chengguolist {
+  padding: 10px 0;
+  border-bottom: 1px dashed #ccc;
+  margin: 1px;
 }
-/deep/.newsListTit .el-link--inner{
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-  width:270px;
+.newsMain {
+  padding: 5px 0;
 }
 </style>

+ 30 - 47
src/layout/index/notice.vue

@@ -1,27 +1,26 @@
 <template>
-  <div id="notice">
+  <div id="news">
     <el-row>
-      <el-col :span="24" class="notice">
+      <el-col :span="24" class="news">
         <el-col :span="24" class="topTit">
-          <el-col :span="20">
-           <span :style="`border-color:${borderColor}`">最新公告</span>
+          <el-col :span="18">
+            <span :style="`border-color:${borderColor}`">{{title}}</span>
           </el-col>
-          <el-col :span="4">
+          <el-col :span="6" style="text-align:right;">
             <el-link :underline="false" :style="`color:${Color}`">MORE<i class="el-icon-video-play"></i></el-link>
           </el-col>
         </el-col>
-        <el-col :span="24" class="noticeMain">
-          <el-col :span="24" class="noticeList" v-for="(item, index) in noticeList" :key="index" :name="`${index}`">
-            <el-col :span="4" class="time" >
-              {{item.time}}
-            </el-col>
-            <el-col :span="20" class="title">
-              <el-link :underline="false">
-                <p class="textOver"> {{item.title}}</p>
-              </el-link>
+          <el-col :span="24" class="newsMain">
+            <el-col class="chengguolist" :span="24" v-for="(tag, index) in noticelist" :key="index" :type="tag.type"
+                  @click="$router.push({ path: '/detail', params:{id:tag.id} })">
+              <el-col :span="16">
+                {{tag.title}}
+              </el-col>
+              <el-col :span="8" style="text-align:right;">
+                {{tag.time}}
+              </el-col>
             </el-col>
           </el-col>
-        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -29,14 +28,15 @@
 
 <script>
 export default {
-  name: 'notice',
+  name: 'news',
   props: {
-    noticeList:null,
+    noticelist:null,
   },
   components: {},
   data: () => ({
     borderColor:'#850000',
-    Color:'#850000'
+    Color:'#850000',
+    title:"通知公告",
   }),
   created() {},
   computed: {},
@@ -45,40 +45,23 @@ export default {
 </script>
 
 <style lang="less" scoped>
-p{
-  margin:0;
-  padding:0;
-}
-.textOver{
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-.notice{
-  padding:10px;
+.news {
+  padding: 10px;
 }
-.topTit{
-  border-bottom:1px solid #ccc;
+.topTit {
+  border-bottom: 1px solid #ccc;
 }
-.topTit span{
+.topTit span {
   display: inline-block;
   height: 30px;
-  border-bottom:1px solid transparent;
+  border-bottom: 1px solid transparent;
 }
-.noticeList{
-  padding: 7px 0;
-  border-bottom: 1px dashed #ccc;
-}
-.noticeList .time{
-  height: 38px;
-  line-height: 38px;
-  text-align: center;
-  background: #850000;
-  color: #fff;
-  font-size: 18px;
+.newsMain {
+  padding: 5px 0;
 }
-.noticeList .title p{
-  width: 290px;
-  padding: 10px;
+.chengguolist{
+  padding: 10px 0;
+  border-bottom: 1px dashed #ccc;
+  margin: 1px;
 }
 </style>

+ 1 - 1
src/layout/index/top.vue

@@ -24,6 +24,6 @@ export default {
 
 <style lang="less" scoped>
 .image{
-  padding: 20px;
+  padding: 40px 0;
 }
 </style>

+ 14 - 6
src/views/index/index.vue

@@ -14,7 +14,7 @@
       <el-col :span="24" class="main">
         <div class="w_1200">
           <el-col :span="6" class="notice">
-            <news title="通知公告"></news>
+            <notice :noticelist="noticelist"></notice>
           </el-col>
           <el-col :span="17" class="news">
             <news :newslist="newslist"></news>
@@ -24,7 +24,7 @@
       <el-col :span="24" class="mains">
         <div class="w_1200">
           <el-col :span="6" class="mingshi">
-            <news title="计算明示"></news>
+            <mingshi :mingshilist="mingshilist"></mingshi>
           </el-col>
           <el-col :span="17" class="chengguo">
             <chengguo :chengguolist="chengguolist"></chengguo>
@@ -33,7 +33,7 @@
       </el-col>
       <el-col :span="24" class="down">
         <div class="w_1200">
-          <foot></foot>
+          <footinfo :content="content"></footinfo>
         </div>
       </el-col>
     </el-row>
@@ -44,19 +44,29 @@
 import top from '../../layout/index/top.vue';
 import native from '../../layout/index/native.vue';
 import news from '../../layout/index/news.vue';
+import notice from '../../layout/index/notice.vue';
+import mingshi from '../../layout/index/mingshi.vue';
 import chengguo from '../../layout/index/chengguo.vue';
+import footinfo from '../../layout/index/foot.vue';
+
 export default {
   name: 'index',
   props: {
     logolist:null,
+    noticelist:null,
     newslist:null,
+    mingshilist:null,
     chengguolist:null,
+    content:null,
   },
   components: {
     top,
     native,
+    notice,
     news,
+    mingshi,
     chengguo,
+    footinfo,
   },
   data: () => ({}),
   created() { },
@@ -71,13 +81,11 @@ export default {
   margin: 0 auto;
 }
 .top {
-  height: 100px;
-  border: 1px solid #ccc;
+  height: 150px;
 }
 .menu {
   margin-bottom: 20px;
   height: 40px;
-  border: 1px solid #ccc;
 }
 .main {
   margin-bottom: 20px;