Prechádzať zdrojové kódy

Merge branch 'master' of http://git.cc-lotus.info/Free-cysci/cysci-website

lrf402788946 4 rokov pred
rodič
commit
5bf0e4a017

BIN
src/assets/menu_back.jpg


BIN
src/assets/noImg.jpg


BIN
src/assets/square_big.png


+ 199 - 0
src/components/list/list-page.vue

@@ -0,0 +1,199 @@
+<template>
+  <div id="list-page">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="top">
+          <el-col :span="3" class="left">
+            <span>|</span> <span>{{ title }}</span>
+          </el-col>
+          <el-col :span="21" class="right">
+            <el-row type="flex" justify="end">
+              <el-col :span="12" class="tabs" v-if="useTab">
+                <tabs :displayList="displayList" :dropList="dropList" @toSearch="change"></tabs>
+              </el-col>
+              <el-col :span="12" class="search" v-if="useSearch">
+                <search @toSearch="toSearch"></search>
+              </el-col>
+            </el-row>
+          </el-col>
+        </el-col>
+        <el-col :span="24" class="down">
+          <slot></slot>
+          <!-- <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+            <el-col :span="21" class="name" @click.native="clickDetail(item.id)">
+              {{ item.p1 }}
+            </el-col>
+            <el-col :span="3" class="date">
+              {{ getDate(item.p2) }}
+            </el-col>
+            <el-col :span="24" class="brief"> 成果简介:{{ item.p3 || '暂无' }} </el-col>
+          </el-col> -->
+        </el-col>
+        <el-col :span="24" class="page" v-if="usePage">
+          <el-pagination @current-change="search" :current-page="currentPage" layout="total, prev, pager, next, jumper" :total="total" :page-size="pageSize">
+          </el-pagination>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import tabs from './tabs.vue';
+import search from './search.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'list-page',
+  props: {
+    useTab: { type: Boolean, default: false },
+    useSearch: { type: Boolean, default: true },
+    displayList: { type: Array, default: () => [] },
+    dropList: { type: Array, default: () => [] },
+    list: { type: Array, default: () => [] },
+    searchModel: { type: String, default: 'name' },
+    title: { type: String },
+    total: { type: Number, default: 0 },
+    pageSize: { type: Number, default: 5 },
+    usePage: { type: Boolean, default: true },
+  },
+  components: { tabs, search },
+  data: function () {
+    return {
+      searchInfo: undefined,
+      currentPage: 1,
+      condition: {},
+    };
+  },
+  created() {},
+  methods: {
+    search(page = 1) {
+      this.currentPage = page;
+      const skip = (this.currentPage - 1) * this.pageSize;
+      let condition = { skip, limit: this.pageSize, ...this.condition };
+      if (this.searchInfo && this.searchInfo !== '') condition[this.searchModel] = this.searchInfo;
+      console.log(condition);
+      this.$emit('toSearch', condition);
+    },
+    toSearch(condition) {
+      if (condition) {
+        this.$set(this, `searchInfo`, condition);
+      } else {
+        this.$set(this, `searchInfo`, undefined);
+      }
+      this.currentPage = 1;
+      this.search();
+    },
+    change(condition) {
+      this.$set(this, `condition`, condition);
+      this.currentPage = 1;
+      this.search();
+      // this.$emit('toChangeTab', condition);
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .top {
+    height: 49px;
+    border-bottom: 1px solid #ccc;
+    padding: 5px 0 0 0;
+    .left {
+      text-align: left;
+      span:first-child {
+        color: #22529a;
+        font-weight: bold;
+        font-size: 25px;
+      }
+      span:last-child {
+        color: #22529a;
+        font-size: 20px;
+        font-weight: bold;
+      }
+    }
+    .right {
+      .tabs {
+        span {
+          font-size: 16px;
+          padding: 8px 10px;
+          display: inline-block;
+          font-weight: bold;
+        }
+        span:hover {
+          cursor: pointer;
+          color: #409eff;
+        }
+        .btn {
+          padding: 0px 0 0 0;
+          position: relative;
+          top: 1px;
+          i {
+            font-size: 20px;
+            font-weight: bold;
+          }
+        }
+      }
+      .search {
+        /deep/.el-input__inner {
+          height: 35px;
+          line-height: 35px;
+        }
+      }
+    }
+  }
+  .down {
+    height: 500px;
+    overflow: hidden;
+    .list {
+      padding: 10px 0;
+      .name {
+        font-size: 18px;
+        font-weight: bold;
+      }
+      .date {
+        font-size: 16px;
+        text-align: center;
+      }
+      .brief {
+        font-size: 16px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        -webkit-line-clamp: 2;
+        word-break: break-all;
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        margin: 10px 0 0 0;
+        max-height: 42px;
+      }
+    }
+    .list:hover {
+      cursor: pointer;
+      .name {
+        -webkit-transform: translateY(-3px);
+        -ms-transform: translateY(-3px);
+        transform: translateY(-3px);
+        -webkit-box-shadow: 0 0 6px #999;
+        box-shadow: 0 0 6px #999;
+        -webkit-transition: all 0.5s ease-out;
+        transition: all 0.5s ease-out;
+        color: #0085d2;
+      }
+    }
+  }
+  .page {
+    text-align: center;
+    height: 30px;
+    overflow: hidden;
+  }
+}
+</style>

+ 37 - 0
src/components/list/search.vue

@@ -0,0 +1,37 @@
+<template>
+  <div id="search">
+    <el-input placeholder="请输入名称" v-model="input" class="input-with-select" clearable>
+      <el-button slot="append" icon="el-icon-search" @click="searchData()"></el-button>
+    </el-input>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'search',
+  components: {},
+  data: function () {
+    return {
+      input: undefined,
+    };
+  },
+  created() {},
+  methods: {
+    searchData() {
+      this.$emit('toSearch', !this.input ? undefined : this.input);
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 65 - 0
src/components/list/tabs.vue

@@ -0,0 +1,65 @@
+<template>
+  <div id="tabs">
+    <!-- 主要成果单位 -->
+    <span v-for="(item, index) in displayList" :key="index" @click="change(item.name)">{{ item.name }}</span>
+    <!-- 其他 -->
+    <el-dropdown trigger="click" @command="change">
+      <span class="el-dropdown-link btn"><i class="el-icon-d-arrow-right"></i> </span>
+      <el-dropdown-menu slot="dropdown">
+        <el-dropdown-item v-for="(item, index) in dropList" :key="index" :command="item.name">{{ item.name }}</el-dropdown-item>
+      </el-dropdown-menu>
+    </el-dropdown>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'tabs',
+  props: {
+    displayList: { type: Array, default: () => [] },
+    dropList: { type: Array, default: () => [] },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {
+    change(data) {
+      this.$emit('toSearch', { company: data });
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+span {
+  font-size: 16px;
+  padding: 8px 10px;
+  display: inline-block;
+  font-weight: bold;
+}
+span:hover {
+  cursor: pointer;
+  color: #409eff;
+}
+.btn {
+  padding: 0px 0 0 0;
+  position: relative;
+  top: 1px;
+  i {
+    font-size: 20px;
+    font-weight: bold;
+  }
+}
+</style>

+ 6 - 0
src/router/index.js

@@ -25,6 +25,12 @@ const web = [
         meta: { title: '新闻咨询' },
         component: () => import('../views/news/index.vue'),
       },
+      {
+        path: '/news/list',
+        name: 'news_list',
+        meta: { title: '新闻咨询-列表页' },
+        component: () => import('../views/news/list.vue'),
+      },
       {
         path: '/service/index',
         name: 'service_index',

+ 1 - 1
src/views/news/index.vue

@@ -87,7 +87,7 @@ export default {
     },
     // 更多
     more(index) {
-      console.log(index);
+      this.$router.push({ path: '/news/list', query: { index: index } });
     },
   },
   computed: {

+ 79 - 0
src/views/news/list-model/model-0.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="model-0">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <el-col :span="24" class="title textOver">
+            {{ item.title }}
+          </el-col>
+          <el-col :span="24" class="other">
+            <el-col :span="12" class="text textOver">
+              信息来源:<span>{{ item.origin }}</span>
+            </el-col>
+            <el-col :span="12" class="text textOver">
+              发布时间:<span>{{ item.release_time }}</span>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'model-0',
+  props: {
+    list: { type: Array, default: () => [] },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .list {
+    padding: 12px 10px;
+    border-bottom: 1px solid #ccc;
+    .title {
+      font-size: 16px;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      .text {
+        font-size: 14px;
+        color: #666;
+        span {
+          color: #000;
+        }
+      }
+    }
+  }
+  .list:hover {
+    cursor: pointer;
+    .title {
+      color: #409eff;
+      font-weight: bold;
+    }
+  }
+}
+</style>

+ 79 - 0
src/views/news/list-model/model-1.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="model-1">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <el-col :span="24" class="title textOver">
+            {{ item.title }}
+          </el-col>
+          <el-col :span="24" class="other">
+            <el-col :span="12" class="text textOver">
+              信息来源:<span>{{ item.origin }}</span>
+            </el-col>
+            <el-col :span="12" class="text textOver">
+              发布时间:<span>{{ item.release_time }}</span>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'model-1',
+  props: {
+    list: { type: Array, default: () => [] },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .list {
+    padding: 12px 10px;
+    border-bottom: 1px solid #ccc;
+    .title {
+      font-size: 16px;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      .text {
+        font-size: 14px;
+        color: #666;
+        span {
+          color: #000;
+        }
+      }
+    }
+  }
+  .list:hover {
+    cursor: pointer;
+    .title {
+      color: #409eff;
+      font-weight: bold;
+    }
+  }
+}
+</style>

+ 109 - 0
src/views/news/list-model/model-2.vue

@@ -0,0 +1,109 @@
+<template>
+  <div id="model-2">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <el-col :span="6" class="image">
+            <el-carousel height="110px" arrow="never" indicator-position="none" :interval="2000" v-if="item.image.length > 0">
+              <el-carousel-item v-for="(tag, index) in item.image" :key="index">
+                <el-image :src="tag.url"> </el-image>
+              </el-carousel-item>
+            </el-carousel>
+            <el-image :src="noImage" v-else></el-image>
+          </el-col>
+          <el-col :span="18" class="info">
+            <el-col :span="24" class="title">
+              {{ item.title }}
+            </el-col>
+            <el-col :span="24" class="other">
+              <el-col :span="12" class="text textOver">
+                信息来源:<span>{{ item.origin }}</span>
+              </el-col>
+              <el-col :span="12" class="text textOver">
+                发布时间:<span>{{ item.release_time }}</span>
+              </el-col>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'model-2',
+  props: {
+    list: { type: Array, default: () => [] },
+  },
+  components: {},
+  data: function () {
+    return {
+      noImage: require('@a/noImg.jpg'),
+    };
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .list {
+    padding: 6px 10px;
+    border-bottom: 1px dashed #ccc;
+    .image {
+      height: 110px;
+      .el-image {
+        height: 110px;
+        border: 1px solid #f1f1f1;
+      }
+    }
+    .info {
+      padding: 0 10px;
+      .title {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        -webkit-line-clamp: 3;
+        word-break: break-all;
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        font-size: 16px;
+        margin: 0 0 5px 0;
+      }
+      .other {
+        .text {
+          font-size: 14px;
+          color: #666;
+          span {
+            color: #000;
+          }
+        }
+      }
+    }
+  }
+  .list:hover {
+    cursor: pointer;
+    .info {
+      .title {
+        color: #409eff;
+        font-weight: bold;
+      }
+    }
+  }
+}
+</style>

+ 79 - 0
src/views/news/list-model/model-3.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="model-3">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <el-col :span="24" class="title textOver">
+            {{ item.title }}
+          </el-col>
+          <el-col :span="24" class="other">
+            <el-col :span="12" class="text textOver">
+              信息来源:<span>{{ item.origin }}</span>
+            </el-col>
+            <el-col :span="12" class="text textOver">
+              发布时间:<span>{{ item.release_time }}</span>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'model-3',
+  props: {
+    list: { type: Array, default: () => [] },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .list {
+    padding: 12px 10px;
+    border-bottom: 1px solid #ccc;
+    .title {
+      font-size: 16px;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      .text {
+        font-size: 14px;
+        color: #666;
+        span {
+          color: #000;
+        }
+      }
+    }
+  }
+  .list:hover {
+    cursor: pointer;
+    .title {
+      color: #409eff;
+      font-weight: bold;
+    }
+  }
+}
+</style>

+ 79 - 0
src/views/news/list-model/model-4.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="model-4">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <el-col :span="24" class="title textOver">
+            {{ item.title }}
+          </el-col>
+          <el-col :span="24" class="other">
+            <el-col :span="12" class="text textOver">
+              信息来源:<span>{{ item.origin }}</span>
+            </el-col>
+            <el-col :span="12" class="text textOver">
+              发布时间:<span>{{ item.release_time }}</span>
+            </el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'model-4',
+  props: {
+    list: { type: Array, default: () => [] },
+  },
+  components: {},
+  data: function () {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .list {
+    padding: 12px 10px;
+    border-bottom: 1px solid #ccc;
+    .title {
+      font-size: 16px;
+      margin: 0 0 5px 0;
+    }
+    .other {
+      .text {
+        font-size: 14px;
+        color: #666;
+        span {
+          color: #000;
+        }
+      }
+    }
+  }
+  .list:hover {
+    cursor: pointer;
+    .title {
+      color: #409eff;
+      font-weight: bold;
+    }
+  }
+}
+</style>

+ 130 - 0
src/views/news/list.vue

@@ -0,0 +1,130 @@
+<template>
+  <div id="list">
+    <el-row>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="24" class="one">
+            <el-col :span="5" class="menu">
+              <el-image :src="squareImage"></el-image>
+              <span class="menuTitle">Menu</span>
+              <el-col :span="24" class="menuList" v-for="(item, index) in menuList" :key="index">
+                <p @click="changeMenu(item.component, index)" :style="`color:${menuIndex == index ? menuColor : ''}`">{{ item.name }}</p>
+              </el-col>
+            </el-col>
+            <el-col :span="19" class="listInfo">
+              <component :is="component" v-bind="params"></component>
+            </el-col>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'list',
+  props: {},
+  components: {
+    zwdt: () => import('./list/zwdt.vue'),
+    tgtg: () => import('./list/tgtg.vue'),
+    kjxw: () => import('./list/kjxw.vue'),
+    mtjj: () => import('./list/mtjj.vue'),
+    xxgk: () => import('./list/xxgk.vue'),
+  },
+  data: function () {
+    return {
+      menuList: [
+        { name: '政务动态', component: 'zwdt', options: { useTab: false, listModel: 0 } },
+        { name: '通知通告', component: 'tgtg', options: { useTab: false, listModel: 1 } },
+        { name: '科技新闻', component: 'kjxw', options: { useTab: false, listModel: 2 } },
+        { name: '媒体聚焦', component: 'mtjj', options: { useTab: false, listModel: 3 } },
+        { name: '信息公开', component: 'xxgk', options: { useTab: false, listModel: 4 } },
+      ],
+      component: '',
+      params: {},
+      menuColor: 'rgb(254, 149, 14)',
+      squareImage: require('@a/square_big.png'),
+    };
+  },
+  created() {},
+  methods: {
+    changeMenu(component, index) {
+      if (index !== this.menuIndex) this.$router.push({ path: './list', query: { index } });
+      this.component = component;
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    menuIndex() {
+      const index = this.$route.query.index || 0;
+      const obj = this.menuList[index];
+      const params = {
+        title: _.get(obj, 'name'),
+        ..._.get(obj, 'options'),
+      };
+      this.$set(this, 'component', _.get(obj, 'component', 'zwdt'));
+      this.$set(this, 'params', params);
+      return index;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  min-height: 500px;
+  margin: 10px 0;
+  .one {
+    .menu {
+      height: 600px;
+      overflow: hidden;
+      padding: 15px 10px;
+      background: no-repeat 100% 100%;
+      background-image: url('~@a/menu_back.jpg');
+      box-sizing: border-box;
+      box-shadow: 0 0 10px #bbbaba;
+      .menuTitle {
+        font-size: 24px;
+        color: #92959a;
+        font-weight: bold;
+        position: relative;
+        top: -10px;
+        left: 10px;
+      }
+      .menuList {
+        height: 60px;
+        line-height: 60px;
+        border-bottom: 1px solid #409eff;
+        p {
+          font-weight: bold;
+          font-size: 18px;
+          color: #044b79;
+        }
+      }
+      .menuList:hover {
+        cursor: pointer;
+      }
+    }
+    .listInfo {
+      float: right;
+      width: 78%;
+      min-height: 600px;
+      overflow: hidden;
+      box-shadow: 0 0 10px #409eff;
+      padding: 10px;
+    }
+  }
+}
+</style>

+ 80 - 0
src/views/news/list/kjxw.vue

@@ -0,0 +1,80 @@
+<template>
+  <div id="kjxw">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="pageSize" searchModel="title">
+      <component :is="model" :list="list"></component>
+    </list-page>
+    <template v-else> 详情 </template>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import listPage from '@c/list/list-page.vue';
+const { newsColumn } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: news } = createNamespacedHelpers('news');
+export default {
+  name: 'kjxw',
+  props: ['listModel'],
+  components: {
+    listPage,
+    model2: () => import('../list-model/model-2.vue'),
+  },
+  data: function () {
+    return {
+      // 栏目
+      column: newsColumn,
+      // 列表
+      list: [],
+      total: 0,
+      pageSize: 4,
+      // 详情
+      detail: {},
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...news(['query', 'fetch']),
+    async search({ skip = 0, limit = this.pageSize, ...info } = {}) {
+      info.column_name = this.column[this.listModel];
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 查询详情
+    async searchInfo() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `detail`, res.data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    model() {
+      const moduleNumber = this.listModel || 0;
+      return `model${moduleNumber}`;
+    },
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    id: {
+      handler(ne) {
+        if (ne) this.searchInfo();
+      },
+      immediate: true,
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 80 - 0
src/views/news/list/mtjj.vue

@@ -0,0 +1,80 @@
+<template>
+  <div id="mtjj">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="pageSize" searchModel="title">
+      <component :is="model" :list="list"></component>
+    </list-page>
+    <template v-else> 详情 </template>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import listPage from '@c/list/list-page.vue';
+const { newsColumn } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: news } = createNamespacedHelpers('news');
+export default {
+  name: 'mtjj',
+  props: ['listModel'],
+  components: {
+    listPage,
+    model3: () => import('../list-model/model-3.vue'),
+  },
+  data: function () {
+    return {
+      // 栏目
+      column: newsColumn,
+      // 列表
+      list: [],
+      total: 0,
+      pageSize: 7,
+      // 详情
+      detail: {},
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...news(['query', 'fetch']),
+    async search({ skip = 0, limit = this.pageSize, ...info } = {}) {
+      info.column_name = this.column[this.listModel];
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 查询详情
+    async searchInfo() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `detail`, res.data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    model() {
+      const moduleNumber = this.listModel || 0;
+      return `model${moduleNumber}`;
+    },
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    id: {
+      handler(ne) {
+        if (ne) this.searchInfo();
+      },
+      immediate: true,
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 80 - 0
src/views/news/list/tgtg.vue

@@ -0,0 +1,80 @@
+<template>
+  <div id="zwdt">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="pageSize" searchModel="title">
+      <component :is="model" :list="list"></component>
+    </list-page>
+    <template v-else> 详情 </template>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import listPage from '@c/list/list-page.vue';
+const { newsColumn } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: news } = createNamespacedHelpers('news');
+export default {
+  name: 'zwdt',
+  props: ['listModel'],
+  components: {
+    listPage,
+    model1: () => import('../list-model/model-1.vue'),
+  },
+  data: function () {
+    return {
+      // 栏目
+      column: newsColumn,
+      // 列表
+      list: [],
+      total: 0,
+      pageSize: 7,
+      // 详情
+      detail: {},
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...news(['query', 'fetch']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      info.column_name = this.column[this.listModel];
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 查询详情
+    async searchInfo() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `detail`, res.data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    model() {
+      const moduleNumber = this.listModel || 0;
+      return `model${moduleNumber}`;
+    },
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    id: {
+      handler(ne) {
+        if (ne) this.searchInfo();
+      },
+      immediate: true,
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 80 - 0
src/views/news/list/xxgk.vue

@@ -0,0 +1,80 @@
+<template>
+  <div id="xxgk">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="pageSize" searchModel="title">
+      <component :is="model" :list="list"></component>
+    </list-page>
+    <template v-else> 详情 </template>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import listPage from '@c/list/list-page.vue';
+const { newsColumn } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: news } = createNamespacedHelpers('news');
+export default {
+  name: 'xxgk',
+  props: ['listModel'],
+  components: {
+    listPage,
+    model4: () => import('../list-model/model-4.vue'),
+  },
+  data: function () {
+    return {
+      // 栏目
+      column: newsColumn,
+      // 列表
+      list: [],
+      total: 0,
+      pageSize: 7,
+      // 详情
+      detail: {},
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...news(['query', 'fetch']),
+    async search({ skip = 0, limit = this.pageSize, ...info } = {}) {
+      info.column_name = this.column[this.listModel];
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 查询详情
+    async searchInfo() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `detail`, res.data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    model() {
+      const moduleNumber = this.listModel || 0;
+      return `model${moduleNumber}`;
+    },
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    id: {
+      handler(ne) {
+        if (ne) this.searchInfo();
+      },
+      immediate: true,
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 80 - 0
src/views/news/list/zwdt.vue

@@ -0,0 +1,80 @@
+<template>
+  <div id="zwdt">
+    <list-page v-bind="$attrs" :total="total" v-if="!id" @toSearch="search" :pageSize="pageSize" searchModel="title">
+      <component :is="model" :list="list"></component>
+    </list-page>
+    <template v-else> 详情 </template>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+import listPage from '@c/list/list-page.vue';
+const { newsColumn } = require('@common/dict/index');
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: news } = createNamespacedHelpers('news');
+export default {
+  name: 'zwdt',
+  props: ['listModel'],
+  components: {
+    listPage,
+    model0: () => import('../list-model/model-0.vue'),
+  },
+  data: function () {
+    return {
+      // 栏目
+      column: newsColumn,
+      // 列表
+      list: [],
+      total: 0,
+      pageSize: 7,
+      // 详情
+      detail: {},
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...news(['query', 'fetch']),
+    async search({ skip = 0, limit = this.pageSize, ...info } = {}) {
+      info.column_name = this.column[this.listModel];
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    // 查询详情
+    async searchInfo() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `detail`, res.data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    model() {
+      const moduleNumber = this.listModel || 0;
+      return `model${moduleNumber}`;
+    },
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    id: {
+      handler(ne) {
+        if (ne) this.searchInfo();
+      },
+      immediate: true,
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 5 - 2
src/views/news/parts/list.vue

@@ -31,11 +31,12 @@
         <el-col :span="24" class="thr" v-else-if="type == '3'">
           <el-col :span="12" class="list" v-for="(item, index) in list" :key="index">
             <el-col :span="24" class="image">
-              <el-carousel height="135px" arrow="never" indicator-position="none" :interval="2000">
+              <el-carousel height="135px" arrow="never" indicator-position="none" :interval="2000" v-if="item.image.length > 0">
                 <el-carousel-item v-for="(tag, index) in item.image" :key="index">
                   <el-image :src="tag.url"></el-image>
                 </el-carousel-item>
               </el-carousel>
+              <el-image :src="noImage" v-else></el-image>
             </el-col>
             <el-col :span="24" class="title">
               {{ item.title }}
@@ -90,7 +91,9 @@ export default {
   },
   components: {},
   data: function () {
-    return {};
+    return {
+      noImage: require('@a/noImg.jpg'),
+    };
   },
   created() {},
   methods: {},