guhongwei 4 سال پیش
والد
کامیت
30ba9dc7d6
2فایلهای تغییر یافته به همراه166 افزوده شده و 19 حذف شده
  1. 25 0
      public/index.html
  2. 141 19
      src/views/achieveLive/detail/imgtxtData.vue

+ 25 - 0
public/index.html

@@ -6,6 +6,31 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%= htmlWebpackPlugin.options.title %></title>
+    <style>
+      /*修改滚动条样式*/
+      div::-webkit-scrollbar {
+        width: 5px;
+        height: 10px;
+      }
+    
+      div::-webkit-scrollbar-track {
+        background: rgb(239, 239, 239);
+        border-radius: 2px;
+      }
+    
+      div::-webkit-scrollbar-thumb {
+        background: #bfbfbf;
+        border-radius: 10px;
+      }
+    
+      div::-webkit-scrollbar-thumb:hover {
+        background: #333;
+      }
+    
+      div::-webkit-scrollbar-corner {
+        background: #179a16;
+      }
+    </style>
   </head>
   <body>
     <noscript>

+ 141 - 19
src/views/achieveLive/detail/imgtxtData.vue

@@ -5,31 +5,55 @@
         <el-tabs v-model="active" type="card">
           <el-tab-pane label="图文直播" name="first">
             <el-col :span="24" class="first">
-              <el-col :span="24" v-for="(item, index) in imgList" :key="index">
-                <el-col :span="24">
-                  <span>[{{ item.create_time }}]</span>
+              <el-col :span="24" class="imgList" v-for="(item, index) in imgList" :key="index">
+                <el-col :span="24" class="user">
+                  <span>[{{ getDate(item.create_time) }}]</span>
                   <span>展会负责人</span>
+                  <span>
+                    <el-link v-if="item.file_path" :href="item.file_path" target="_blank" :underline="false" class="videoPlay">视频播放</el-link>
+                  </span>
                 </el-col>
-                <el-col :span="24">
+                <el-col :span="24" class="content">
                   {{ item.content }}
                 </el-col>
-                <el-col :span="24">
-                  <el-link v-if="item.file_path" :href="item.file_path" target="_blank" :underline="false" class="videoPlay">视频播放</el-link>
-                </el-col>
-                <el-col :span="24">
-                  <el-image :src="tag.url" class="imagelist" v-for="(tag, tagindex) in item.url" :key="tagindex"></el-image>
+                <el-col :span="24" class="image">
+                  <el-image :src="tag.url" v-for="(tag, tagindex) in item.url" :key="tagindex"></el-image>
                 </el-col>
               </el-col>
             </el-col>
           </el-tab-pane>
           <el-tab-pane label="洽谈合作" name="second">
-            洽谈合作
+            <el-col :span="24" class="second">
+              <el-col :span="24" class="secondList" v-for="(item, index) in secondList" :key="index">
+                <span>[{{ getDate(item.create_time) }}]</span>
+                <span class="textOver">{{ item.d_name }}</span>
+                <span>与</span>
+                <span class="textOver">{{ item.s_name }}</span>
+                <span>{{ getStatus(item.status) }}</span>
+              </el-col>
+            </el-col>
           </el-tab-pane>
           <el-tab-pane label="达成意向" name="third">
-            达成意向
+            <el-col :span="24" class="second">
+              <el-col :span="24" class="secondList" v-for="(item, index) in thirdList" :key="index">
+                <span>[{{ getDate(item.create_time) }}]</span>
+                <span class="textOver">{{ item.d_name }}</span>
+                <span>与</span>
+                <span class="textOver">{{ item.s_name }}</span>
+                <span>{{ getStatus(item.status) }}</span>
+              </el-col>
+            </el-col>
           </el-tab-pane>
           <el-tab-pane label="交易完成" name="fourth">
-            交易完成
+            <el-col :span="24" class="second">
+              <el-col :span="24" class="secondList" v-for="(item, index) in fourthList" :key="index">
+                <span>[{{ getDate(item.create_time) }}]</span>
+                <span class="textOver">{{ item.d_name }}</span>
+                <span>与</span>
+                <span class="textOver">{{ item.s_name }}</span>
+                <span>{{ getStatus(item.status) }}</span>
+              </el-col>
+            </el-col>
           </el-tab-pane>
         </el-tabs>
       </el-col>
@@ -39,7 +63,9 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: interview } = createNamespacedHelpers('interview');
+const { mapActions: dockPw } = createNamespacedHelpers('dockPw');
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
+var moment = require('moment');
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -50,15 +76,51 @@ export default {
   data: function() {
     return {
       active: 'first',
+      // 图文列表
       imgList: [],
+      // 正在洽谈
+      secondList: [],
+      // 达成意向
+      thirdList: [],
+      // 交易完成
+      fourthList: [],
     };
   },
   async created() {
     await this.search();
   },
   methods: {
-    ...interview(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {},
+    ...dockPw({ pwQuery: 'query' }),
+    ...transaction({ transQuery: 'query' }),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      // 查询图文
+      let res = await this.pwQuery({ skip, dock_id: this.id, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `imgList`, res.data);
+      }
+      // 正在洽谈
+      res = await this.transQuery({ skip, dock_id: this.id, status: '0' });
+      if (this.$checkRes(res)) this.$set(this, `secondList`, res.data);
+      // 达成意向
+      res = await this.transQuery({ skip, dock_id: this.id, status: '1' });
+      if (this.$checkRes(res)) this.$set(this, `thirdList`, res.data);
+      // 交易完成
+      res = await this.transQuery({ skip, dock_id: this.id, status: '3' });
+      if (this.$checkRes(res)) this.$set(this, `fourthList`, res.data);
+    },
+    // 整理时间
+    getDate(val) {
+      let newDate = moment(val).format('hh:mm:ss');
+      if (newDate) return newDate;
+    },
+    // 整理状态
+    getStatus(val) {
+      if (val == '0') return '正在洽谈';
+      else if (val == '1') return '达成意向';
+      else if (val == '2') return '交易备案';
+      else if (val == '3') return '交易完成';
+      else if (val == '4') return '交易失败';
+    },
   },
   computed: {
     ...mapState(['user']),
@@ -72,13 +134,73 @@ export default {
 
 <style lang="less" scoped>
 .style {
-  .info {
+  /deep/.el-tabs__header {
+    margin: 0 0 10px 0;
+  }
+  .first {
     padding: 0 10px;
-    height: 450px;
+    height: 415px;
     overflow-y: auto;
+    .imgList {
+      padding: 10px 0 0 0;
+      border-bottom: 1px dashed #ff0000;
+      .user {
+        margin: 0 0 5px 0;
+        span {
+          font-size: 16px;
+        }
+        span:nth-child(2) {
+          padding: 0 0 0 10px;
+          font-weight: bold;
+        }
+        span:nth-child(3) {
+          padding: 0 0 0 20px;
+          .el-link {
+            font-weight: bold;
+            font-size: 16px;
+            top: -3px;
+          }
+        }
+      }
+      .content {
+        padding: 0 0 10px 0;
+        text-indent: 2rem;
+      }
+      .image {
+        .el-image {
+          width: 100%;
+          height: 250px;
+          margin: 0 0 10px 0;
+        }
+      }
+    }
   }
-  /deep/.el-tabs__header {
-    margin: 0 0 10px 0;
+  .second {
+    padding: 0 10px;
+    height: 415px;
+    overflow-y: auto;
+    .secondList {
+      border-bottom: 1px dashed #ff0000;
+      padding: 10px 0;
+      span {
+        float: left;
+        font-weight: bold;
+        font-size: 16px;
+      }
+      span:nth-child(1) {
+        color: #ff0000;
+      }
+      span:nth-child(2n) {
+        width: 32%;
+        margin: 0 10px 0 10px;
+      }
+      span:nth-child(3) {
+        color: #666;
+      }
+      span:nth-child(5) {
+        float: right;
+      }
+    }
   }
 }
 </style>