guhongwei 4 years ago
parent
commit
13731e5f19

+ 16 - 4
src/router/index.js

@@ -153,6 +153,12 @@ const live = [
     meta: { title: '活动总结', subSite: true },
     component: () => import('../views/halltwo/detail.vue'),
   },
+  {
+    path: '/halltwo/xmdj',
+    name: 'xmdj',
+    meta: { title: '项目对接', subSite: true },
+    component: () => import('../views/halltwo/xmdj.vue'),
+  },
   {
     path: '/halltwo/xmcg',
     name: 'xmcg',
@@ -165,12 +171,18 @@ const live = [
     meta: { title: '专家列表', subSite: true },
     component: () => import('../views/halltwo/expertxmcg.vue'),
   },
+  {
+    path: '/halltwo/expertxmcg',
+    name: 'expertxmcg',
+    meta: { title: '专家列表', subSite: true },
+    component: () => import('../views/halltwo/expertxmcg.vue'),
+  },
 
   {
-    path: '/halltwo/xmdj',
-    name: 'xmdj',
-    meta: { title: '项目对接', subSite: true },
-    component: () => import('../views/halltwo/xmdj.vue'),
+    path: '/halltwo/liveCenter',
+    name: 'liveCenter',
+    meta: { title: '直播中心', subSite: true },
+    component: () => import('../views/halltwo/liveCenter.vue'),
   },
   {
     path: '/hall/productList/technologyList',

+ 21 - 3
src/views/adminCenter/dockInfo/parts/dockInfo.vue

@@ -7,15 +7,33 @@
             <el-input v-model="form.title"></el-input>
           </el-form-item>
           <el-form-item label="开始时间">
-            <el-date-picker v-model="form.start_time" type="datetime" placeholder="请选择开始时间" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm">
+            <el-date-picker
+              v-model="form.start_time"
+              type="datetime"
+              placeholder="选择日期时间"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            >
             </el-date-picker>
           </el-form-item>
           <el-form-item label="结束时间">
-            <el-date-picker v-model="form.end_time" type="datetime" placeholder="请选择结束时间" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm">
+            <el-date-picker
+              v-model="form.end_time"
+              type="datetime"
+              placeholder="请选择结束时间"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            >
             </el-date-picker>
           </el-form-item>
           <el-form-item label="报名截止时间">
-            <el-date-picker v-model="form.join_end" type="datetime" placeholder="请选择报名截止时间" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm">
+            <el-date-picker
+              v-model="form.join_end"
+              type="datetime"
+              placeholder="请选择报名截止时间"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            >
             </el-date-picker>
           </el-form-item>
           <el-form-item label="省份">

+ 2 - 2
src/views/halltwo/detail.vue

@@ -28,8 +28,8 @@
             <el-col :span="24" class="twocen">
               <el-col :span="15" class="left"> <span>主办单位:</span>{{ dockInfo.sponsor }} </el-col>
               <el-col :span="8" class="right">
-                <el-button class="btn1" @click="back()">返回展会进行页</el-button>
-                <el-button class="btn2">进入展会总结页</el-button>
+                <el-button class="btn1" @click="$router.push({ path: '/halltwo/directTwo', query: { id: dockInfo.id } })">返回展会进行页</el-button>
+                <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { dock_id: dockInfo.id } })">进入展会总结页</el-button>
               </el-col>
             </el-col>
           </div>

+ 40 - 11
src/views/halltwo/directTwo.vue

@@ -29,13 +29,13 @@
                 <el-image :src="two2"></el-image>
                 <p>{{ dockInfo.start_time }}</p>
                 <p>距离展会结束还有</p>
-                <p>倒计时</p>
+                <p>{{ djs }}</p>
               </el-col>
             </el-col>
             <el-col :span="24" class="twocen">
               <el-col :span="15" class="left"> <span>主办单位:</span>{{ dockInfo.sponsor }} </el-col>
               <el-col :span="8" class="right">
-                <el-button class="btn1">返回展会进行页</el-button>
+                <el-button class="btn1" @click="$router.push({ path: '/halltwo/directTwo', query: { id: dockInfo.id } })">返回展会进行页</el-button>
                 <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { dock_id: dockInfo.id } })">进入展会总结页</el-button>
               </el-col>
             </el-col>
@@ -102,16 +102,16 @@
               <el-col :span="12" class="right">
                 <el-tabs v-model="activeName">
                   <el-tab-pane label="所有" name="first">
-                    <trainlist :list="trainoneList"></trainlist>
+                    <trainlist :list="trainoneList" @liveCenBtn="liveCenBtn"></trainlist>
                   </el-tab-pane>
                   <el-tab-pane label="实现对接" name="second">
-                    <trainlist :list="traintwoList"></trainlist>
+                    <trainlist :list="traintwoList" @liveCenBtn="liveCenBtn"></trainlist>
                   </el-tab-pane>
                   <el-tab-pane label="产生意向" name="third">
-                    <trainlist :list="trainthreeList"></trainlist>
+                    <trainlist :list="trainthreeList" @liveCenBtn="liveCenBtn"></trainlist>
                   </el-tab-pane>
                   <el-tab-pane label="达成意向" name="fourth">
-                    <trainlist :list="trainfourList"></trainlist>
+                    <trainlist :list="trainfourList" @liveCenBtn="liveCenBtn"></trainlist>
                   </el-tab-pane>
                 </el-tabs>
               </el-col>
@@ -146,16 +146,16 @@
                 <el-col :span="24" class="lefttop">
                   <el-tabs v-model="techolName">
                     <el-tab-pane label="科技需求" name="first">
-                      <achieve :list="techoloneList" @xmdjBtn="xmdjBtn"></achieve>
+                      <achieve :list="techoloneList"></achieve>
                     </el-tab-pane>
                     <el-tab-pane label="新材料技术" name="second">
-                      <achieve :list="techoltwoList" @xmdjBtn="xmdjBtn"></achieve>
+                      <achieve :list="techoltwoList"></achieve>
                     </el-tab-pane>
                     <el-tab-pane label="高技术服务业" name="third">
-                      <achieve :list="techolthreeList" @xmdjBtn="xmdjBtn"></achieve>
+                      <achieve :list="techolthreeList"></achieve>
                     </el-tab-pane>
                     <el-tab-pane label="新能源及节能技术" name="fourth">
-                      <achieve :list="techolfourList" @xmdjBtn="xmdjBtn"></achieve>
+                      <achieve :list="techolfourList"></achieve>
                     </el-tab-pane>
                   </el-tabs>
                   <el-link :underline="false" class="more" @click="$router.push({ path: '/halltwo/xmcg', query: { dock_id: dockInfo.id } })">更多></el-link>
@@ -279,6 +279,7 @@ const { mapActions: dock } = createNamespacedHelpers('dock');
 const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
 const { mapActions: transaction } = createNamespacedHelpers('transaction');
 const { mapActions: market } = createNamespacedHelpers('market');
+var moment = require('moment');
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -361,6 +362,8 @@ export default {
         czxm: 0,
         czxq: 0,
       },
+      // 倒计时
+      djs: '',
     };
   },
   async created() {
@@ -413,6 +416,10 @@ export default {
             let techolfourList = techol.filter(i => i.field == '新能源及节能技术');
             this.$set(this, `techolfourList`, techolfourList);
           }
+          // 倒计时
+          this.timer = setInterval(() => {
+            this.setTime(res.data.start_time);
+          }, 1000);
         }
       }
       // 查询专家
@@ -450,6 +457,24 @@ export default {
         this.$set(this.statNum, `tszx`, tszx.total);
       }
     },
+    // 倒计时
+    setTime(end) {
+      let now = moment().format('YYYY-MM-DD HH:mm:ss');
+      // let now = moment().format('2020-11-20 08:00:00');
+      if (end == now) {
+        clearInterval(this.timer);
+        this.$set(this, `djs`, '展会开始');
+      } else {
+        let sec = moment(end).diff(now, 'seconds');
+        let day = _.floor(sec / 60 / 60 / 24);
+        let hour = _.floor(Math.abs(day * 24 - sec / 60 / 60));
+        let dayhour = day * 24;
+        let minute = _.floor(Math.abs(day * 24 * 60 + hour * 60 - sec / 60));
+        let second = _.floor(Math.abs(day * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 - sec));
+        let str = `${hour + dayhour}小时${minute}分${second}秒`;
+        this.$set(this, `djs`, str);
+      }
+    },
     // 成果,需求,商务
     xmdjBtn(data) {
       this.$router.push({ path: '/halltwo/xmdj', query: { dock_id: this.id, id: data._id, type: data.type } });
@@ -462,6 +487,10 @@ export default {
     expertxmcgBtn(data) {
       this.$router.push({ path: '/halltwo/expertxmcg', query: { dock_id: this.id } });
     },
+    // 进入直播中心
+    liveCenBtn() {
+      this.$router.push({ path: '/halltwo/liveCenter', query: { dock_id: this.id } });
+    },
   },
   computed: {
     ...mapState(['user']),
@@ -553,7 +582,7 @@ export default {
           background: #f5f5f5;
           padding: 20px 0px;
           border-radius: 5px;
-          height: 50px;
+          font-size: 30px;
         }
       }
       .right:hover {

+ 28 - 3
src/views/halltwo/expertxmcg.vue

@@ -29,14 +29,14 @@
                 <el-image :src="two2"></el-image>
                 <p>{{ dockInfo.start_time }}</p>
                 <p>距离展会结束还有</p>
-                <p>倒计时</p>
+                <p>{{ djs }}</p>
               </el-col>
             </el-col>
             <el-col :span="24" class="twocen">
               <el-col :span="15" class="left"> <span>主办单位:</span>{{ dockInfo.sponsor }} </el-col>
               <el-col :span="8" class="right">
                 <el-button class="btn1" @click="$router.push({ path: '/halltwo/directTwo', query: { id: dockInfo.id } })">返回展会进行页</el-button>
-                <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { id: dockInfo.id } })">进入展会总结页</el-button>
+                <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { dock_id: dockInfo.id } })">进入展会总结页</el-button>
               </el-col>
             </el-col>
           </div>
@@ -110,6 +110,7 @@ import liveFoot from '@/layout/live/foot.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
 const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
+var moment = require('moment');
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -133,6 +134,8 @@ export default {
       expertList: [],
       total: 0,
       limit: 20,
+      // 倒计时
+      djs: '',
     };
   },
   async created() {
@@ -147,6 +150,10 @@ export default {
         let res = await this.dockFetch(this.dock_id);
         if (this.$checkRes(res)) {
           this.$set(this, `dockInfo`, res.data);
+          // 倒计时
+          this.timer = setInterval(() => {
+            this.setTime(res.data.start_time);
+          }, 1000);
         }
       }
       //查询专家列表
@@ -156,6 +163,24 @@ export default {
         this.$set(this, `total`, res.total);
       }
     },
+    // 倒计时
+    setTime(end) {
+      let now = moment().format('YYYY-MM-DD HH:mm:ss');
+      // let now = moment().format('2020-11-20 08:00:00');
+      if (end == now) {
+        clearInterval(this.timer);
+        this.$set(this, `djs`, '展会开始');
+      } else {
+        let sec = moment(end).diff(now, 'seconds');
+        let day = _.floor(sec / 60 / 60 / 24);
+        let hour = _.floor(Math.abs(day * 24 - sec / 60 / 60));
+        let dayhour = day * 24;
+        let minute = _.floor(Math.abs(day * 24 * 60 + hour * 60 - sec / 60));
+        let second = _.floor(Math.abs(day * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 - sec));
+        let str = `${hour + dayhour}小时${minute}分${second}秒`;
+        this.$set(this, `djs`, str);
+      }
+    },
     expertxmdjBtn(data) {
       this.$router.push({ path: '/halltwo/xmdj', query: { dock_id: this.dock_id, id: data._id, type: '3' } });
     },
@@ -250,7 +275,7 @@ export default {
           background: #f5f5f5;
           padding: 20px 0px;
           border-radius: 5px;
-          height: 50px;
+          font-size: 30px;
         }
       }
       .right:hover {

+ 232 - 0
src/views/halltwo/liveCenter.vue

@@ -0,0 +1,232 @@
+<template>
+  <div id="liveCenter">
+    <el-row>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <el-col :span="24" class="info">
+            <el-col :span="24" class="top">
+              <el-col :span="24" class="one">
+                <el-col :span="16" class="left">
+                  <span>{{ dockInfo.title }}</span>
+                  <span>展会实况</span>
+                </el-col>
+                <el-col :span="8" class="right">
+                  <el-button class="btn1" @click="$router.push({ path: '/halltwo/directTwo', query: { id: dockInfo.id } })">返回展会进行页</el-button>
+                  <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { dock_id: dockInfo.id } })">进入展会总结页</el-button>
+                </el-col>
+              </el-col>
+              <el-col :span="24" class="two">
+                <p>
+                  最近更新时间:<span style="color:#000;">{{ statNum.date }}</span>
+                </p>
+                <p>
+                  参加总人数<span>{{ statNum.zrs || 0 }}</span
+                  >人
+                </p>
+                <p>
+                  对接<span>{{ statNum.jywc || 0 }}</span
+                  >次
+                </p>
+                <p>
+                  产生意向<span>{{ statNum.qthz || 0 }}</span
+                  >次
+                </p>
+                <p>
+                  达成意向<span>{{ statNum.dcyx || 0 }}</span
+                  >次
+                </p>
+              </el-col>
+              <el-col :span="24" class="three">
+                滚动
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="down">
+              <el-col :span="24" class="one">
+                第一部分
+              </el-col>
+              <el-col :span="24" class="two">
+                <p>
+                  <span>主办单位:</span><span>{{ dockInfo.sponsor }}</span>
+                </p>
+                <p>
+                  <span>承办单位:</span><span>{{ dockInfo.organizer }}</span>
+                </p>
+                <p><span>技术支持:</span><span>长春市福瑞科技有限公司</span></p>
+              </el-col>
+            </el-col>
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+import data from '../dynamic/parts/js/code';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
+var moment = require('moment');
+export default {
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  name: 'liveCenter',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      // 展会详情
+      dockInfo: {},
+      // 统计数
+      statNum: {},
+    };
+  },
+  async created() {
+    await this.searchInfo();
+  },
+  methods: {
+    ...dock({ dockQuery: 'query', dockFetch: 'fetch', goodsquery: 'goodsquery' }),
+    ...transaction({ tquery: 'query' }),
+    async searchInfo() {
+      // 查询展会详情
+      if (this.dock_id) {
+        let res = await this.dockFetch(this.dock_id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `dockInfo`, res.data);
+        }
+        // 查询数目
+        let statNum = {};
+        // 当前时间
+        statNum.date = moment().format('yyyy-DD-mm');
+        // 总人数
+        statNum.zrs = res.data.apply.length;
+
+        // 正在洽谈
+        let qthe = await this.tquery({ status: 0, dock_id: this.dock_id });
+        if (this.$checkRes(qthe)) {
+          statNum.qthz = qthe.total;
+        }
+        // 达成意向
+        let dcyx = await this.tquery({ status: 1, dock_id: this.dock_id });
+        if (this.$checkRes(dcyx)) {
+          statNum.dcyx = dcyx.total;
+        }
+        // 交易完成
+        let jywc = await this.tquery({ status: 2, dock_id: this.dock_id });
+        if (this.$checkRes(jywc)) {
+          statNum.jywc = jywc.total;
+        }
+        this.$set(this, `statNum`, statNum);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    dock_id() {
+      return this.$route.query.dock_id;
+    },
+  },
+  watch: {},
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .info {
+    background-color: #2152cb;
+    .top {
+      .one {
+        height: 143px;
+        overflow: hidden;
+        .left {
+          padding: 0 15px;
+          height: 143px;
+          line-height: 143px;
+          span:nth-child(1) {
+            font-size: 35px;
+            color: #fff;
+            font-weight: bold;
+          }
+          span:nth-child(2) {
+            color: #fee452;
+            font-size: 41px;
+            font-weight: bold;
+            padding: 0 10px;
+            text-shadow: 3px 3px 3px #000;
+          }
+        }
+        .right {
+          text-align: right;
+          padding: 4% 1%;
+          .btn1 {
+            font-size: 16px;
+            color: #fff;
+            background: red;
+            border: none;
+            font-weight: bold;
+          }
+          .btn2 {
+            font-size: 16px;
+            color: #ff0000;
+            border: 1px solid #ff0000;
+            font-weight: bold;
+          }
+        }
+      }
+      .two {
+        margin: 0 0 15px 0;
+        p {
+          float: left;
+          width: 232px;
+          height: 58px;
+          margin: 0 10px 0 0;
+          background-color: #fdb21e;
+          text-align: center;
+          line-height: 58px;
+          span {
+            color: blue;
+          }
+        }
+        p:nth-child(1) {
+          border-top-left-radius: 5px;
+          border-bottom-left-radius: 5px;
+        }
+        p:nth-child(5) {
+          margin: 0;
+          border-top-right-radius: 5px;
+          border-bottom-right-radius: 5px;
+        }
+      }
+      .three {
+        height: 500px;
+        padding: 0 10px;
+      }
+    }
+    .down {
+      height: 220px;
+      border-top: 1px solid #010e6b;
+      background: -webkit-linear-gradient(top, #2152cb, #082e8b);
+      padding: 15px;
+      .one {
+        height: 54px;
+        border: 1px solid #fdb21e;
+      }
+      .two {
+        p {
+          padding: 10px 0;
+          span:nth-child(1) {
+            font-size: 20px;
+            color: #fde350;
+            letter-spacing: 15px;
+          }
+          span:nth-child(2) {
+            font-size: 16px;
+            color: #fff;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 4 - 1
src/views/halltwo/parts/trainlist.vue

@@ -11,7 +11,7 @@
         </el-col>
       </el-col>
       <el-col :span="24" class="btn">
-        <el-button>进入直播中心</el-button>
+        <el-button @click="liveCenBtn()">进入直播中心</el-button>
       </el-col>
     </el-row>
   </div>
@@ -35,6 +35,9 @@ export default {
       let data = moment().format('HH:mm:ss');
       if (data) return data;
     },
+    liveCenBtn() {
+      this.$emit('liveCenBtn');
+    },
   },
   computed: {
     ...mapState(['user']),

+ 30 - 4
src/views/halltwo/xmcg.vue

@@ -29,14 +29,14 @@
                 <el-image :src="two2"></el-image>
                 <p>{{ dockInfo.start_time }}</p>
                 <p>距离展会结束还有</p>
-                <p>倒计时</p>
+                <p>{{ djs }}</p>
               </el-col>
             </el-col>
             <el-col :span="24" class="twocen">
               <el-col :span="15" class="left"> <span>主办单位:</span>{{ dockInfo.sponsor }} </el-col>
               <el-col :span="8" class="right">
                 <el-button class="btn1" @click="$router.push({ path: '/halltwo/directTwo', query: { id: dockInfo.id } })">返回展会进行页</el-button>
-                <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { id: dockInfo.id } })">进入展会总结页</el-button>
+                <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { dock_id: dockInfo.id } })">进入展会总结页</el-button>
               </el-col>
             </el-col>
           </div>
@@ -118,6 +118,7 @@ import liveFoot from '@/layout/live/foot.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
 const { mapActions: markettype } = createNamespacedHelpers('markettype');
+var moment = require('moment');
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -147,6 +148,8 @@ export default {
       origin: [],
       list1: [],
       num: '0',
+      // 倒计时
+      djs: '',
     };
   },
   async created() {
@@ -169,9 +172,31 @@ export default {
           let achieve = czxmNew.filter(i => i.type == '1');
           this.$set(this, `list`, achieve);
           this.$set(this, `total`, achieve.length);
+          // 倒计时
+          this.timer = setInterval(() => {
+            this.setTime(res.data.start_time);
+          }, 1000);
         }
       }
     },
+    // 倒计时
+    setTime(end) {
+      let now = moment().format('YYYY-MM-DD HH:mm:ss');
+      // let now = moment().format('2020-11-20 08:00:00');
+      if (end == now) {
+        clearInterval(this.timer);
+        this.$set(this, `djs`, '展会开始');
+      } else {
+        let sec = moment(end).diff(now, 'seconds');
+        let day = _.floor(sec / 60 / 60 / 24);
+        let hour = _.floor(Math.abs(day * 24 - sec / 60 / 60));
+        let dayhour = day * 24;
+        let minute = _.floor(Math.abs(day * 24 * 60 + hour * 60 - sec / 60));
+        let second = _.floor(Math.abs(day * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 - sec));
+        let str = `${hour + dayhour}小时${minute}分${second}秒`;
+        this.$set(this, `djs`, str);
+      }
+    },
     async searchType() {
       //查领域
       const res1 = await this.markettypeList({ category: '01' });
@@ -186,8 +211,9 @@ export default {
     handleCurrentChange(currentPage) {
       this.searchPage(currentPage);
     },
+    // 项目对接
     handleEdit(index, row) {
-      console.log(index, row);
+      this.$router.push({ path: '/halltwo/xmdj', query: { dock_id: this.dock_id, id: row._id, type: row.type } });
     },
     change(item, index) {
       let val = this.list;
@@ -304,7 +330,7 @@ export default {
           background: #f5f5f5;
           padding: 20px 0px;
           border-radius: 5px;
-          height: 50px;
+          font-size: 30px;
         }
       }
       .right:hover {

+ 28 - 3
src/views/halltwo/xmdj.vue

@@ -29,14 +29,14 @@
                 <el-image :src="two2"></el-image>
                 <p>{{ dockInfo.start_time }}</p>
                 <p>距离展会结束还有</p>
-                <p>倒计时</p>
+                <p>{{ djs }}</p>
               </el-col>
             </el-col>
             <el-col :span="24" class="twocen">
               <el-col :span="15" class="left"> <span>主办单位:</span>{{ dockInfo.sponsor }} </el-col>
               <el-col :span="8" class="right">
                 <el-button class="btn1" @click="$router.push({ path: '/halltwo/directTwo', query: { id: dockInfo.id } })">返回展会进行页</el-button>
-                <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { id: dockInfo.id } })">进入展会总结页</el-button>
+                <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { dock_id: dockInfo.id } })">进入展会总结页</el-button>
               </el-col>
             </el-col>
           </div>
@@ -100,6 +100,7 @@ import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
 const { mapActions: transaction } = createNamespacedHelpers('transaction');
 const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
+var moment = require('moment');
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -127,6 +128,8 @@ export default {
       detailInfo: {},
       // 显示按钮
       displayBtn: true,
+      // 倒计时
+      djs: '',
     };
   },
   async created() {
@@ -152,9 +155,31 @@ export default {
             this.$set(this, `productList`, czxmNew);
             this.searchProduct();
           }
+          // 倒计时
+          this.timer = setInterval(() => {
+            this.setTime(res.data.start_time);
+          }, 1000);
         }
       }
     },
+    // 倒计时
+    setTime(end) {
+      let now = moment().format('YYYY-MM-DD HH:mm:ss');
+      // let now = moment().format('2020-11-20 08:00:00');
+      if (end == now) {
+        clearInterval(this.timer);
+        this.$set(this, `djs`, '展会开始');
+      } else {
+        let sec = moment(end).diff(now, 'seconds');
+        let day = _.floor(sec / 60 / 60 / 24);
+        let hour = _.floor(Math.abs(day * 24 - sec / 60 / 60));
+        let dayhour = day * 24;
+        let minute = _.floor(Math.abs(day * 24 * 60 + hour * 60 - sec / 60));
+        let second = _.floor(Math.abs(day * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 - sec));
+        let str = `${hour + dayhour}小时${minute}分${second}秒`;
+        this.$set(this, `djs`, str);
+      }
+    },
     // 查找产品详情
     searchProduct() {
       let productInfo = this.productList.find(i => i._id == this.id);
@@ -306,7 +331,7 @@ export default {
           background: #f5f5f5;
           padding: 20px 0px;
           border-radius: 5px;
-          height: 50px;
+          font-size: 30px;
         }
       }
       .right:hover {

+ 16 - 4
src/views/superAdminCenter/duijiehui/index.vue

@@ -14,11 +14,23 @@
               <el-input v-model="form.title"></el-input>
             </el-form-item>
             <el-form-item label="开始时间">
-              <el-date-picker v-model="form.start_time" type="datetime" placeholder="请选择开始时间" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm">
+              <el-date-picker
+                v-model="form.start_time"
+                type="datetime"
+                placeholder="请选择开始时间"
+                format="yyyy-MM-dd HH:mm:ss"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
               </el-date-picker>
             </el-form-item>
             <el-form-item label="结束时间">
-              <el-date-picker v-model="form.end_time" type="datetime" placeholder="请选择结束时间" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm">
+              <el-date-picker
+                v-model="form.end_time"
+                type="datetime"
+                placeholder="请选择结束时间"
+                format="yyyy-MM-dd HH:mm:ss"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
               </el-date-picker>
             </el-form-item>
             <el-form-item label="报名截止时间">
@@ -26,8 +38,8 @@
                 v-model="form.join_end"
                 type="datetime"
                 placeholder="请选择报名截止时间"
-                format="yyyy-MM-dd HH:mm"
-                value-format="yyyy-MM-dd HH:mm"
+                format="yyyy-MM-dd HH:mm:ss"
+                value-format="yyyy-MM-dd HH:mm:ss"
               >
               </el-date-picker>
             </el-form-item>