guhongwei 4 年之前
父節點
當前提交
d82f18e721
共有 3 個文件被更改,包括 112 次插入4 次删除
  1. 8 3
      src/views/live/detail.vue
  2. 103 0
      src/views/live/parts/xmly.vue
  3. 1 1
      src/views/service/parts/technicaldetail.vue

+ 8 - 3
src/views/live/detail.vue

@@ -41,8 +41,9 @@
             <van-tab title="参展项目">
               <czxm></czxm>
             </van-tab>
-            <van-tab title="嘉宾访谈">
-              <jbft></jbft>
+            <van-tab title="项目路演">
+              <!-- <jbft></jbft> -->
+              <xmly></xmly>
             </van-tab>
           </van-tabs>
         </el-col>
@@ -72,6 +73,8 @@ import dockchat from './parts/dockchat.vue';
 import czxm from './parts/czxm.vue';
 // 嘉宾访谈
 import jbft from './parts/jbft.vue';
+// 项目路演
+import xmly from './parts/xmly.vue';
 
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
@@ -91,7 +94,9 @@ export default {
     // 参展项目
     czxm,
     // 嘉宾访谈
-    jbft,
+    // jbft,
+    // 项目路演
+    xmly,
   },
   data: function() {
     return {

+ 103 - 0
src/views/live/parts/xmly.vue

@@ -0,0 +1,103 @@
+<template>
+  <div id="xmly">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detailBtn(item)">
+          <el-col :span="19" class="textOver title">
+            {{ item.title }}
+          </el-col>
+          <el-col :span="5" class="date">
+            {{ item.publish_time }}
+          </el-col>
+          <el-col :span="24" class="textOver orgin">
+            来源:<span>{{ item.orgin }} </span>
+          </el-col>
+          <el-col :span="24" class="titlejj">
+            简介:<span>{{ item.titlejj }}</span>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: newsroadshow } = createNamespacedHelpers('newsroadshow');
+export default {
+  name: 'xmly',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      // 展会id
+      dock_id: '',
+      list: [],
+    };
+  },
+  async created() {
+    if (this.id) {
+      this.$set(this, `dock_id`, this.id);
+    }
+    await this.search();
+  },
+  methods: {
+    ...newsroadshow(['query']),
+    async search() {
+      let res = await this.query({ dock_id: this.dock_id });
+      if (this.$checkRes(res)) this.$set(this, `list`, res.data);
+    },
+    // 详情页面
+    detailBtn(data) {
+      this.$router.push({ path: '/service/techDetail', query: { id: data.id, type: '4' } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.style {
+  min-height: 365px;
+  max-height: 365px;
+  overflow-y: auto;
+  .list {
+    padding: 5px 0;
+    border-bottom: 1px dashed #ccc;
+    .title {
+      font-size: 16px;
+      font-weight: bold;
+    }
+    .date {
+      font-size: 14px;
+      text-align: right;
+      padding: 3px 0 0 0;
+    }
+    .orgin {
+      font-size: 14px;
+      padding: 5px 0;
+      span {
+        color: #999;
+      }
+    }
+    .titlejj {
+      font-size: 14px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      -webkit-line-clamp: 2;
+      word-break: break-all;
+      display: -webkit-box;
+      -webkit-box-orient: vertical;
+      span {
+        color: #999;
+      }
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/service/parts/technicaldetail.vue

@@ -9,7 +9,7 @@
           <span class="textOver">发布时间:{{ info.publish_time }}</span>
           <span class="textOver"> 信息来源:{{ info.orgin }}</span>
         </el-col>
-        <el-col :span="24" class="image">
+        <el-col :span="24" class="image" v-if="info.picture != null">
           <el-image :src="info.picture">
             <div slot="error" class="image-slot">
               <i class="el-icon-picture-outline"></i></div