guhongwei 4 năm trước cách đây
mục cha
commit
d8cefbeadb
3 tập tin đã thay đổi với 205 bổ sung0 xóa
  1. 14 0
      src/views/live/detail.vue
  2. 88 0
      src/views/live/parts/czxm.vue
  3. 103 0
      src/views/live/parts/jbft.vue

+ 14 - 0
src/views/live/detail.vue

@@ -22,6 +22,12 @@
             <van-tab title="公共聊天">
               <dockchat></dockchat>
             </van-tab>
+            <van-tab title="参展项目">
+              <czxm></czxm>
+            </van-tab>
+            <van-tab title="嘉宾访谈">
+              <jbft></jbft>
+            </van-tab>
           </van-tabs>
         </el-col>
       </el-col>
@@ -46,6 +52,10 @@
 import imgtxtdock from './parts/imgtxtdock.vue';
 // 公共聊天
 import dockchat from './parts/dockchat.vue';
+// 参展项目
+import czxm from './parts/czxm.vue';
+// 嘉宾访谈
+import jbft from './parts/jbft.vue';
 
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
@@ -61,6 +71,10 @@ export default {
     imgtxtdock,
     // 公共聊天
     dockchat,
+    // 参展项目
+    czxm,
+    // 嘉宾访谈
+    jbft,
   },
   data: function() {
     return {

+ 88 - 0
src/views/live/parts/czxm.vue

@@ -0,0 +1,88 @@
+<template>
+  <div id="czxm">
+    <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 name">
+            {{ item.name }}
+          </el-col>
+          <el-col :span="5" class="textOver type">
+            {{ item.type == '0' ? '科技需求' : '技术成果' }}
+          </el-col>
+          <el-col :span="24" class="textOver other"> 领域:{{ item.field }} </el-col>
+          <el-col :span="24" class="textOver other"> 领域:{{ item.contacts }} </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+export default {
+  name: 'czxm',
+  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: {
+    ...dock(['fetch']),
+    async search() {
+      // 参展项目
+      let res = await this.fetch(this.dock_id);
+      if (this.$checkRes(res)) {
+        let czxm = res.data.apply.map(item => item.goodsList);
+        czxm = _.flattenDeep(czxm);
+        this.$set(this, `list`, czxm);
+      }
+    },
+    // 详情页面
+    detailBtn(data) {
+      this.$router.push({ path: '/market/productDetail', query: { id: data._id, type: data.type } });
+    },
+  },
+  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;
+    .name {
+      font-size: 16px;
+      font-weight: bold;
+    }
+    .type {
+      font-size: 14px;
+      text-align: center;
+    }
+    .other {
+      font-size: 14px;
+      padding: 5px 0 0 0;
+    }
+  }
+}
+</style>

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

@@ -0,0 +1,103 @@
+<template>
+  <div id="jbft">
+    <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: newsguidance } = createNamespacedHelpers('newsguidance');
+export default {
+  name: 'jbft',
+  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: {
+    ...newsguidance(['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: '3' } });
+    },
+  },
+  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>