lrf402788946 5 vuotta sitten
vanhempi
commit
1ffd74977b

+ 1 - 1
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">
+            <el-carousel indicator-position="outside" type="card" :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">

+ 94 - 0
src/layout/index/iconList.vue

@@ -0,0 +1,94 @@
+<template>
+  <div id="icon-link">
+    <el-row>
+      <el-col :span="24" class="news" style="background:#fff">
+        <el-col :span="24" class="topTit" v-if="title">
+          <el-col :span="18">
+            <span :style="`border-color:${borderColor}`">{{title}}</span>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="newsMain">
+          <el-row :gutter="10">
+            <el-col :span="4" v-for="(item, index) in dataList" :key="index" style="text-align:center;">
+              <el-link :href="item.url">
+                <el-image :src="item.pic" fit="scale-down" style="zoom:0.4"></el-image>
+                <p style="color:#409EFF">{{item.title}}</p>
+              </el-link>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'icon-link',
+  props: {
+    title: null,
+    list: null,
+  },
+  components: {},
+  data: () => ({
+    borderColor: '#850000',
+    Color: '#850000',
+    dataList: [],
+  }),
+  watch:{
+    list:{
+      handler(val){
+        if(val) this.$set(this, `dataList`, val);
+      },
+      immediate: true
+    }
+  },
+  created() {},
+  computed: {},
+  methods: {},
+};
+</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;
+}
+.chengguolist {
+  padding: 10px 0;
+  border-bottom: 1px dashed #ccc;
+  margin: 1px;
+}
+.newsMain {
+  padding: 5px 0;
+}
+.newsMain .title {
+  position: absolute;
+  bottom: 0;
+  background: rgba(119, 136, 153, 0.5);
+}
+.newsMain .title p {
+  font-size: 25px;
+  padding: 0 10px;
+  color: #fff;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+</style>

+ 92 - 0
src/layout/index/link.vue

@@ -0,0 +1,92 @@
+<template>
+  <div id="chengguo">
+    <el-row>
+      <el-col :span="24" class="news" style="background:#fff">
+        <el-col :span="24" class="topTit">
+          <el-col :span="18">
+            <span :style="`border-color:${borderColor}`">{{title}}</span>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="newsMain">
+          <el-row :gutter="10">
+            <el-col :span="6" v-for="(item, index) in dataList" :key="index">
+              <el-image :src="item.pic" fit="scale-down"></el-image>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'chengguo',
+  props: {
+    title: null,
+    list: null,
+  },
+  components: {},
+  data: () => ({
+    borderColor: '#850000',
+    Color: '#850000',
+    dataList: [],
+  }),
+  watch:{
+    list:{
+      handler(val){
+        if(val) this.$set(this, `dataList`, val);
+      },
+      immediate: true
+    }
+  },
+  created() {
+  },
+  computed: {},
+  methods: {},
+};
+</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;
+}
+.chengguolist {
+  padding: 10px 0;
+  border-bottom: 1px dashed #ccc;
+  margin: 1px;
+}
+.newsMain {
+  padding: 5px 0;
+}
+.newsMain .title {
+  position: absolute;
+  bottom: 0;
+  background: rgba(119, 136, 153, 0.5);
+}
+.newsMain .title p {
+  font-size: 25px;
+  padding: 0 10px;
+  color: #fff;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+</style>

+ 23 - 0
src/views/index/index.vue

@@ -43,6 +43,20 @@
           </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>
+        </div>
+      </el-col>
+      <el-col :span="24" class="mains" style="height:auto;">
+        <div class="w_1200">
+          <el-col :span="24" class="link">
+            <links title="友情链接" :list="linkList"> </links>
+          </el-col>
+        </div>
+      </el-col>
       <el-col :span="24" class="down">
         <footinfo :topInfo="topInfo"></footinfo>
       </el-col>
@@ -60,6 +74,8 @@ import chengguo from '../../layout/index/chengguo.vue';
 import footinfo from '../../layout/index/foot.vue';
 import infoList from '../../layout/index/infoList.vue';
 import tabsList from '../../layout/index/tabsList.vue';
+import links from '../../layout/index/link.vue';
+import iconList from '../../layout/index/iconList.vue';
 export default {
   name: 'index',
   props: {
@@ -70,6 +86,8 @@ export default {
     chengguolist: null, //成果展示
     partyList: null, //党建信息
     tabsList: null, //标签页列表
+    linkList:null, //友情链接列表
+    iconList: null, //图标链接列表
     footlist: null,
   },
   components: {
@@ -82,6 +100,8 @@ export default {
     footinfo,
     infoList,
     tabsList,
+    links,
+    iconList,
   },
   data: () => ({}),
   created() { },
@@ -147,4 +167,7 @@ export default {
   overflow: hidden;
   background: #fff;
 }
+.link{
+  width:100%;
+}
 </style>