guhongwei 4 年之前
父节点
当前提交
747a026982

+ 74 - 8
src/views/technical/list.vue

@@ -13,16 +13,16 @@
           <el-col :span="18" class="listInfo">
             <span v-if="display == 'list'">
               <span v-if="column_name == '专家问诊'">
-                专家问诊
+                <exports :zhuantiList="zhuantiList" :total="zhuantiTotal" :menuName="column_name"></exports>
               </span>
               <span v-else-if="column_name == '行业研究'">
-                行业研究
+                <industry :industryList="industryList" :total="industryTotal" :menuName="column_name"></industry>
               </span>
               <span v-else-if="column_name == '嘉宾访谈'">
-                嘉宾访谈
+                <guidance :guidanceList="guidanceList" :total="guidanceTotal" :menuName="column_name"></guidance>
               </span>
               <span v-else-if="column_name == '项目路演'">
-                项目路演
+                <roadshow :roadshowList="roadshowList" :total="roadshowTotal" :menuName="column_name"></roadshow>
               </span>
             </span>
             <span v-else>
@@ -67,11 +67,25 @@
 </template>
 
 <script>
+import _ from 'lodash';
+import exports from './list/export.vue';
+import industry from './list/industry.vue';
+import guidance from './list/guidance.vue';
+import roadshow from './list/roadshow.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: column } = createNamespacedHelpers('column');
+const { mapActions: news } = createNamespacedHelpers('news');
+const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
+const { mapActions: newsroadshow } = createNamespacedHelpers('newsroadshow');
 export default {
   name: 'list',
   props: {},
-  components: {},
+  components: {
+    exports,
+    industry,
+    guidance,
+    roadshow,
+  },
   data: function() {
     return {
       squareImage: require('@/assets/live/square_big.png'),
@@ -84,12 +98,31 @@ export default {
       display: 'list',
       // 右侧头部栏目
       column_name: '专家问诊',
+      // 专家问诊,行业研究栏目
+      columnLists: [],
+      // 专家列表
+      zhuantiList: [],
+      zhuantiTotal: 0,
+      // 行业研究
+      industryList: [],
+      industryTotal: 0,
+      // 嘉宾访谈
+      guidanceList: [],
+      guidanceTotal: 0,
+      // 项目路演
+      roadshowList: [],
+      roadshowTotal: 0,
     };
   },
-  created() {
-    this.searchColumn();
+  async created() {
+    await this.searchcol();
+    await this.searchColumn();
   },
   methods: {
+    ...column({ columnList: 'query', columnInfo: 'fetch' }),
+    ...news({ newsList: 'query' }),
+    ...newsguidance({ danceQuery: 'query' }),
+    ...newsroadshow({ adshowQuery: 'query' }),
     // 查询栏目,列表,详情
     async searchColumn() {
       if (this.type == 1) {
@@ -118,7 +151,35 @@ export default {
       this.searchInfo({ columnName });
     },
     // 查看列表
-    async searchInfo({ skip = 0, columnName, name, ...info } = {}) {},
+    async searchInfo({ skip = 0, columnName, name, ...info } = {}) {
+      if (columnName == '专家问诊') {
+        let column = this.columnLists.find(i => i.name == '专家问诊');
+        const res = await this.newsList({ column_id: column._id });
+        if (this.$checkRes(res)) {
+          this.$set(this, `zhuantiList`, res.data);
+          this.$set(this, `zhuantiTotal`, res.total);
+        }
+      } else if (columnName == '行业研究') {
+        let column = this.columnLists.find(i => i.name == '行业研究');
+        const res = await this.newsList({ column_id: column._id });
+        if (this.$checkRes(res)) {
+          this.$set(this, `industryList`, res.data);
+          this.$set(this, `industryTotal`, res.total);
+        }
+      } else if (columnName == '嘉宾访谈') {
+        let res = await this.danceQuery({ column_name: '嘉宾访谈' });
+        if (this.$checkRes(res)) {
+          this.$set(this, `guidanceList`, res.data);
+          this.$set(this, `guidanceTotal`, res.total);
+        }
+      } else if (columnName == '项目路演') {
+        let res = await this.adshowQuery({ column_name: '项目路演' });
+        if (this.$checkRes(res)) {
+          this.$set(this, `roadshowList`, res.data);
+          this.$set(this, `roadshowTotal`, res.total);
+        }
+      }
+    },
     // 查看详情
     async searchDetail(columnName, id) {},
     // 点击查看详情
@@ -127,6 +188,11 @@ export default {
       this.display = 'detail';
       this.searchDetail(column_name, id);
     },
+    // 查询栏目
+    async searchcol() {
+      let res = await this.columnList();
+      if (res) this.$set(this, `columnLists`, res.data);
+    },
   },
   computed: {
     ...mapState(['user']),

+ 148 - 0
src/views/technical/list/export.vue

@@ -0,0 +1,148 @@
+<template>
+  <div id="export">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="leftTop">
+          <span>|</span> <span>{{ menuName }}</span>
+        </el-col>
+        <el-col class="infoLeftList" :span="24" v-for="(item, index) in list" :key="index">
+          <p>{{ item.publish_time || '暂无' }}</p>
+          <p>
+            <span class="textOver">{{ item.title }}</span>
+            <span>{{ item.titlejj }}</span>
+          </p>
+        </el-col>
+        <el-col :span="24" class="page">
+          <el-pagination
+            @current-change="handleCurrentChange"
+            :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 { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'export',
+  props: {
+    zhuantiList: { type: Array },
+    total: { type: Number },
+    menuName: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1, //默认数据1
+      pageSize: 5, //每页显示数据数量
+      origin: [], //分割数据
+      list: [], //显示数据列表
+    };
+  },
+  created() {},
+  methods: {
+    searchPage(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+  },
+  watch: {
+    zhuantiList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .leftTop {
+    font-size: 18px;
+    width: 96%;
+    height: 41px;
+    line-height: 35px;
+    border-bottom: 1px solid #e5e5e5;
+    position: relative;
+    bottom: 1px;
+    margin: 10px;
+    font-weight: 600;
+    color: #22529a;
+  }
+  .infoLeftList {
+    float: left;
+    width: 95%;
+    border-bottom: 1px dashed #ccc;
+    padding: 10px 0 10px 10px;
+    height: 87px;
+    margin: 0 0 0 5px;
+  }
+  .infoLeftList:hover p:last-child span:first-child {
+    -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: #005293;
+    cursor: pointer;
+  }
+  .infoLeftList p:first-child {
+    float: left;
+    width: 20%;
+    font-size: 15px;
+    background: #044b79;
+    text-align: center;
+    color: #fff;
+    font-weight: bold;
+    padding: 4px 0px;
+    margin: 0 0 0 5px;
+  }
+  .infoLeftList p:last-child {
+    float: right;
+    width: 70%;
+    padding: 0 0 0 10px;
+  }
+  .infoLeftList p:last-child span:first-child {
+    float: left;
+    width: 90%;
+    font-size: 18px;
+  }
+  .infoLeftList p:last-child span:last-child {
+    float: left;
+    width: 90%;
+    font-size: 16px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    -webkit-line-clamp: 2;
+    word-break: break-all;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    margin: 5px 0 0 0;
+    color: #666;
+  }
+}
+.page {
+  text-align: center;
+  padding: 15px 0;
+}
+</style>

+ 136 - 0
src/views/technical/list/guidance.vue

@@ -0,0 +1,136 @@
+<template>
+  <div id="guidance">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="leftTop">
+          <span>|</span> <span>{{ menuName }}</span>
+        </el-col>
+        <el-col class="infoRightList" :span="24" v-for="(item, index) in list" :key="index">
+          <p>
+            <span class="textOver">{{ item.title }}</span
+            ><span class="textOver">{{ item.publish_time || '暂无' }}</span>
+          </p>
+        </el-col>
+        <el-col :span="24" class="page">
+          <el-pagination
+            @current-change="handleCurrentChange"
+            :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 { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'guidance',
+  props: {
+    guidanceList: { type: Array },
+    total: { type: Number },
+    menuName: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1, //默认数据1
+      pageSize: 10, //每页显示数据数量
+      origin: [], //分割数据
+      list: [], //显示数据列表
+    };
+  },
+  created() {},
+  methods: {
+    searchPage(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+  },
+  watch: {
+    guidanceList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .leftTop {
+    font-size: 18px;
+    width: 98%;
+    height: 41px;
+    line-height: 35px;
+    border-bottom: 1px solid #e5e5e5;
+    position: relative;
+    bottom: 1px;
+    margin: 10px;
+    font-weight: 600;
+    color: #22529a;
+  }
+  .infoRightList {
+    float: left;
+    width: 99%;
+    padding: 7px 0;
+    margin: 0 0 0 5px;
+  }
+  .infoRightList:nth-child(6) {
+    border-bottom: 1px solid #ccc;
+    padding: 0 0 17px 0;
+  }
+  .infoRightList:nth-child(7) {
+    padding: 15px 0 0 0;
+  }
+  .infoRightList:nth-child(11) {
+    border-bottom: 1px solid #ccc;
+    padding: 0 0 15px 0;
+  }
+  .infoRightList:hover p span:first-child {
+    -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: #005293;
+    cursor: pointer;
+  }
+  .infoRightList p {
+    font-size: 18px;
+  }
+  .infoRightList p span:first-child {
+    display: inline-block;
+    width: 80%;
+    margin: 0 20px 0 10px;
+  }
+  .infoRightList p span:last-child {
+    display: inline-block;
+    width: 15%;
+    text-align: center;
+    font-size: 16px;
+  }
+}
+.page {
+  text-align: center;
+  padding: 15px 0;
+}
+</style>

+ 136 - 0
src/views/technical/list/industry.vue

@@ -0,0 +1,136 @@
+<template>
+  <div id="industry">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="leftTop">
+          <span>|</span> <span>{{ menuName }}</span>
+        </el-col>
+        <el-col class="infoRightList" :span="24" v-for="(item, index) in list" :key="index">
+          <p>
+            <span class="textOver">{{ item.title }}</span
+            ><span class="textOver">{{ item.publish_time || '暂无' }}</span>
+          </p>
+        </el-col>
+        <el-col :span="24" class="page">
+          <el-pagination
+            @current-change="handleCurrentChange"
+            :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 { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'industry',
+  props: {
+    industryList: { type: Array },
+    total: { type: Number },
+    menuName: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1, //默认数据1
+      pageSize: 10, //每页显示数据数量
+      origin: [], //分割数据
+      list: [], //显示数据列表
+    };
+  },
+  created() {},
+  methods: {
+    searchPage(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+  },
+  watch: {
+    industryList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .leftTop {
+    font-size: 18px;
+    width: 98%;
+    height: 41px;
+    line-height: 35px;
+    border-bottom: 1px solid #e5e5e5;
+    position: relative;
+    bottom: 1px;
+    margin: 10px;
+    font-weight: 600;
+    color: #22529a;
+  }
+  .infoRightList {
+    float: left;
+    width: 99%;
+    padding: 7px 0;
+    margin: 0 0 0 5px;
+  }
+  .infoRightList:nth-child(6) {
+    border-bottom: 1px solid #ccc;
+    padding: 0 0 17px 0;
+  }
+  .infoRightList:nth-child(7) {
+    padding: 15px 0 0 0;
+  }
+  .infoRightList:nth-child(11) {
+    border-bottom: 1px solid #ccc;
+    padding: 0 0 15px 0;
+  }
+  .infoRightList:hover p span:first-child {
+    -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: #005293;
+    cursor: pointer;
+  }
+  .infoRightList p {
+    font-size: 18px;
+  }
+  .infoRightList p span:first-child {
+    display: inline-block;
+    width: 80%;
+    margin: 0 20px 0 10px;
+  }
+  .infoRightList p span:last-child {
+    display: inline-block;
+    width: 15%;
+    text-align: center;
+    font-size: 16px;
+  }
+}
+.page {
+  text-align: center;
+  padding: 15px 0;
+}
+</style>

+ 148 - 0
src/views/technical/list/roadshow.vue

@@ -0,0 +1,148 @@
+<template>
+  <div id="roadshow">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="leftTop">
+          <span>|</span> <span>{{ menuName }}</span>
+        </el-col>
+        <el-col class="infoLeftList" :span="24" v-for="(item, index) in list" :key="index">
+          <p>{{ item.publish_time || '暂无' }}</p>
+          <p>
+            <span class="textOver">{{ item.title }}</span>
+            <span>{{ item.titlejj }}</span>
+          </p>
+        </el-col>
+        <el-col :span="24" class="page">
+          <el-pagination
+            @current-change="handleCurrentChange"
+            :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 { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'roadshow',
+  props: {
+    roadshowList: { type: Array },
+    total: { type: Number },
+    menuName: null,
+  },
+  components: {},
+  data: function() {
+    return {
+      currentPage: 1, //默认数据1
+      pageSize: 5, //每页显示数据数量
+      origin: [], //分割数据
+      list: [], //显示数据列表
+    };
+  },
+  created() {},
+  methods: {
+    searchPage(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+  },
+  watch: {
+    roadshowList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .leftTop {
+    font-size: 18px;
+    width: 96%;
+    height: 41px;
+    line-height: 35px;
+    border-bottom: 1px solid #e5e5e5;
+    position: relative;
+    bottom: 1px;
+    margin: 10px;
+    font-weight: 600;
+    color: #22529a;
+  }
+  .infoLeftList {
+    float: left;
+    width: 95%;
+    border-bottom: 1px dashed #ccc;
+    padding: 10px 0 10px 10px;
+    height: 87px;
+    margin: 0 0 0 5px;
+  }
+  .infoLeftList:hover p:last-child span:first-child {
+    -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: #005293;
+    cursor: pointer;
+  }
+  .infoLeftList p:first-child {
+    float: left;
+    width: 20%;
+    font-size: 15px;
+    background: #044b79;
+    text-align: center;
+    color: #fff;
+    font-weight: bold;
+    padding: 4px 0px;
+    margin: 0 0 0 5px;
+  }
+  .infoLeftList p:last-child {
+    float: right;
+    width: 70%;
+    padding: 0 0 0 10px;
+  }
+  .infoLeftList p:last-child span:first-child {
+    float: left;
+    width: 90%;
+    font-size: 18px;
+  }
+  .infoLeftList p:last-child span:last-child {
+    float: left;
+    width: 90%;
+    font-size: 16px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    -webkit-line-clamp: 2;
+    word-break: break-all;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    margin: 5px 0 0 0;
+    color: #666;
+  }
+}
+.page {
+  text-align: center;
+  padding: 15px 0;
+}
+</style>