소스 검색

首页修改完成

guhongwei 5 년 전
부모
커밋
5ec60b6d35
5개의 변경된 파일143개의 추가작업 그리고 46개의 파일을 삭제
  1. 7 7
      src/layout/index/chengguo.vue
  2. 93 0
      src/layout/index/fabu.vue
  3. 1 1
      src/layout/index/native.vue
  4. 25 7
      src/layout/index/top.vue
  5. 17 31
      src/views/index/index.vue

+ 7 - 7
src/layout/index/chengguo.vue

@@ -27,7 +27,7 @@
         </el-col> -->
         <el-col :span="24" class="newsMain">
           <el-col :span="24" v-for="(tag, index) in chengguolist" :key="index" :type="tag.type">
-            <el-carousel indicator-position="outside" type="card" :interval="3000">
+            <el-carousel indicator-position="outside" :interval="3000">
               <el-carousel-item v-for="(item, index) in tag.children" :key="index">
                 <el-col :span="24" class="link" @click.native="$router.push({ name: 'detail', params:{id:item.id} })">
                   <el-col :span="24">
@@ -57,18 +57,18 @@ export default {
     borderColor: '#850000',
     Color: '#850000',
     title: '成果展示',
-    img1:require('../../assets/cg1.png'),
-    img2:require('../../assets/cg2.jpg'),
-    img3:require('../../assets/cg3.jpg'),
+    img1: require('../../assets/cg1.png'),
+    img2: require('../../assets/cg2.jpg'),
+    img3: require('../../assets/cg3.jpg'),
   }),
   created() {
   },
   computed: {},
   methods: {
     getPic(index) {
-      let res= index % 3;
-      if(res === 1) return this.img1;
-      else if(res === 2) return this.img2;
+      let res = index % 3;
+      if (res === 1) return this.img1;
+      else if (res === 2) return this.img2;
       else return this.img3
     }
   },

+ 93 - 0
src/layout/index/fabu.vue

@@ -0,0 +1,93 @@
+<template>
+  <div id="fabu">
+    <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}`"
+                     @click="$router.push({ path: `list/${fabuList[0].id}` })">MORE<i class="el-icon-video-play"></i>
+            </el-link>
+          </el-col>
+        </el-col>
+        <!-- fabuList -->
+        <el-col :span="24" class="newsMain">
+          <el-col :span="24" class="chengguolist" v-for="(tag, index) in fabuList" :key="index" :type="tag.type">
+            <el-col :span="16" @click.native="$router.push({ name: 'detail', params:{id:tag.id} })">
+              <p class="textOver">{{ tag.title }}</p>
+            </el-col>
+            <el-col :span="8" style="text-align:right;">
+              {{tag.publish_time}}
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'fabu',
+  props: {
+    fabuList: null,
+  },
+  components: {},
+  data: () => ({
+    borderColor: '#850000',
+    Color: '#850000',
+    title: '技术发布',
+    img1: require('../../assets/cg1.png'),
+    img2: require('../../assets/cg2.jpg'),
+    img3: require('../../assets/cg3.jpg'),
+  }),
+  created() {
+  },
+  computed: {},
+  methods: {
+    getPic(index) {
+      let res = index % 3;
+      if (res === 1) return this.img1;
+      else if (res === 2) return this.img2;
+      else return this.img3
+    }
+  },
+};
+</script>
+
+<style lang="less" scoped>
+p {
+  margin: 0;
+  padding: 0;
+}
+.textOver {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+.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;
+}
+.chengguolist p:hover{
+  color:#850000;
+  cursor: pointer;
+}
+</style>

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

@@ -74,7 +74,7 @@ export default {
 }
 /deep/.el-submenu__title {
   font-size: 20px;
-  padding: 0 50px;
+  padding: 0 80px;
 }
 /deep/.el-submenu__title:hover {
   background-color: #215299 !important;

+ 25 - 7
src/layout/index/top.vue

@@ -1,10 +1,19 @@
 <template>
   <div id="top">
     <el-row>
-      <el-col :span="24" class="image">
-        <!-- <el-image :src="topInfo.logo" v-if="topInfo && topInfo.logo"></el-image> -->
-         <!-- <el-image :src="topInfo.logo"></el-image> -->
-         <el-image :src="logo" @click="$router.push({ path: '/' })"></el-image>
+      <el-col :span="24">
+        <el-col :span="16" class="image">
+          <!-- <el-image :src="topInfo.logo" v-if="topInfo && topInfo.logo"></el-image> -->
+          <!-- <el-image :src="topInfo.logo"></el-image> -->
+          <el-image :src="logo" @click="$router.push({ path: '/' })"></el-image>
+        </el-col>
+        <el-col :span="8">
+          <div style="padding: 55px 35px;">
+            <el-input placeholder="请输入内容" v-model="input3" class="input-with-select">
+              <el-button slot="append" icon="el-icon-search"></el-button>
+            </el-input>
+          </div>
+        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -15,20 +24,29 @@ export default {
   name: 'top',
   props: {
     topInfo: null,
-    topInfos:null,
+    topInfos: null,
   },
   components: {},
   data: () => ({
     logo: require('../../assets/logo.png'),
+    input3: '',
   }),
-  created() {},
+  created() { },
   computed: {},
   methods: {},
 };
 </script>
 
 <style lang="less" scoped>
-.image{
+.image {
   padding: 40px 0;
 }
+.image:hover {
+  cursor: pointer;
+}
+/deep/.el-input-group__append {
+  background-color: #015194;
+  color: #fff;
+  border: 1px solid #015194;
+}
 </style>

+ 17 - 31
src/views/index/index.vue

@@ -26,27 +26,11 @@
           <el-col :span="6" class="mingshi">
             <mingshi></mingshi>
           </el-col>
-          <el-col :span="17" class="chengguo">
+          <el-col :span="11" class="chengguo">
             <chengguo :chengguolist="chengguolist"></chengguo>
           </el-col>
-        </div>
-      </el-col>
-      <el-col :span="24" class="mains">
-        <div class="w_1200">
-          <el-row>
-            <el-col :span="12" class="jishu">
-              <tabsList :title="`技术问答`" :list="tabsList"></tabsList>
-            </el-col>
-            <el-col :span="11" :push="1" class="jishu">
-              <infoList :title="`党建信息`" :list="partyList"></infoList>
-            </el-col>
-          </el-row>
-        </div>
-      </el-col>
-      <el-col :span="24" class="mains" style="height:auto;">
-        <div class="w_1200">
-          <el-col :span="24" class="link">
-            <iconList :list="iconList"> </iconList>
+          <el-col :span="6" class="fabu">
+            <fabu :fabuList="fabuList"></fabu>
           </el-col>
         </div>
       </el-col>
@@ -71,6 +55,7 @@ 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 fabu from '../../layout/index/fabu.vue';
 import footinfo from '../../layout/index/foot.vue';
 import infoList from '../../layout/index/infoList.vue';
 import tabsList from '../../layout/index/tabsList.vue';
@@ -84,9 +69,10 @@ export default {
     noticelist: null, //公告列表
     newslist: null, //新闻列表
     chengguolist: null, //成果展示
+    fabuList: null,//技术发布
     partyList: null, //党建信息
     tabsList: null, //标签页列表
-    linkList:null, //友情链接列表
+    linkList: null, //友情链接列表
     iconList: null, //图标链接列表
     footlist: null,
   },
@@ -97,11 +83,9 @@ export default {
     news,
     mingshi,
     chengguo,
+    fabu,
     footinfo,
-    infoList,
-    tabsList,
     links,
-    iconList,
   },
   data: () => ({}),
   created() { },
@@ -149,25 +133,27 @@ export default {
   overflow: hidden;
   background-color: rgba(255, 255, 255, 0.8);
   box-shadow: 0 0 2px #ccc;
+  margin: 0 20px 0 0;
 }
 .mains .chengguo {
-  float: right;
-  width: 880px;
+  float: left;
   height: 400px;
   background-color: rgba(255, 255, 255, 0.8);
   box-shadow: 0 0 2px #ccc;
   overflow: hidden;
 }
-.down {
-  min-height: 100px;
-}
-.jishu {
+.mains .fabu {
+  width: 310px;
   height: 400px;
   background-color: rgba(255, 255, 255, 0.8);
   box-shadow: 0 0 2px #ccc;
   overflow: hidden;
+  margin: 0 0 0 20px;
+}
+.down {
+  min-height: 100px;
 }
-.link{
-  width:100%;
+.link {
+  width: 100%;
 }
 </style>