guhongwei 4 years ago
parent
commit
eb68458720

+ 1 - 1
src/views/hall/directBefore.vue

@@ -53,7 +53,7 @@ export default {
       if (data.room_id == '1005') {
         this.$router.push({ path: '/halltwo/directTwo', query: { id: data.id, title: data.title } });
       } else {
-        this.$router.push({ path: '/hall/direct', query: { id: data.id, title: data.title } });
+        this.$router.push({ path: '/halltwo/directTwo', query: { id: data.id, title: data.title } });
       }
     },
   },

+ 23 - 41
src/views/halltwo/directTwo.vue

@@ -266,6 +266,7 @@ import dockchat from './parts/dockchat.vue';
 
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
+const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -313,27 +314,9 @@ export default {
       // 技术成果项目
       achieveName: 'first',
       // 全部
-      achieveoneList: [
-        {
-          name: '测试技术成果',
-          field: '生物与新医学技术',
-        },
-        {
-          name: '九条数据',
-          field: '生物与新医学技术',
-        },
-      ],
+      achieveoneList: [],
       // 电子信息技术
-      achievetwoList: [
-        {
-          name: '测试技术成果',
-          field: '电子信息技术',
-        },
-        {
-          name: '九条数据',
-          field: '电子信息技术',
-        },
-      ],
+      achievetwoList: [],
       // 生物与新医学技术
       achievethreeList: [
         {
@@ -458,24 +441,7 @@ export default {
         },
       ],
       // 技术专家
-      expertList: [
-        {
-          url: require('@a/expert1.png'),
-          name: '不知道',
-        },
-        {
-          url: require('@a/expert1.png'),
-          name: '不知道',
-        },
-        {
-          url: require('@a/expert1.png'),
-          name: '不知道',
-        },
-        {
-          url: require('@a/expert1.png'),
-          name: '不知道',
-        },
-      ],
+      expertList: [],
       // 指导单位
       zdcom: require('@a/zh_17.png'),
       jscom: require('@a/zh_18.png'),
@@ -487,16 +453,32 @@ export default {
   },
   methods: {
     ...dock({ dockQuery: 'query', dockFetch: 'fetch', goodsquery: 'goodsquery' }),
+    ...expertsuser({ expertQuery: 'query' }),
     async searchInfo() {
+      // 查询展会详情
       if (this.id) {
         let res = await this.dockFetch(this.id);
         if (this.$checkRes(res)) {
           this.$set(this, `dockInfo`, res.data);
+          // 查询产品
+          let czxm = res.data.apply.map(item => item.goodsList);
+          czxm = _.flattenDeep(czxm);
+          let czxmNew = czxm.filter(item => item.dockStatus == '1');
+          let achieve = czxmNew.filter(i => i.type == '1');
+          if (achieve.length > 0) {
+            // 技术成果全部
+            this.$set(this, `achieveoneList`, achieve);
+            // 电子信息技术
+            let achievetwoList = achieve.filter(i => i.field == '电子信息技术');
+            this.$set(this, `achievetwoList`, achievetwoList);
+          }
         }
       }
-    },
-    to() {
-      // this.$router.push({ ptah: '/halltwo/detail' });
+      // 查询专家
+      let res = await this.expertQuery({ skip: 0, limit: 6 });
+      if (this.$checkRes(res)) {
+        this.$set(this, `expertList`, res.data);
+      }
     },
   },
   computed: {

+ 19 - 2
src/views/halltwo/parts/dockchat.vue

@@ -7,11 +7,11 @@
             公共聊天
           </el-col>
           <el-col :span="9" class="right">
-            <p>
+            <p @click="sendEmotion('flower')">
               <el-image :src="zh1"></el-image>
               <span>发贺信</span>
             </p>
-            <p>
+            <p @click="sendEmotion('hand')">
               <el-image :src="zh2"></el-image>
               <span>送鲜花</span>
             </p>
@@ -86,6 +86,23 @@ export default {
         this.$checkRes(res, null, res.errmsg || '发言失败');
       } else this.$message.error('请输入信息后发送');
     },
+    async sendEmotion(type) {
+      let object = { sender_name: this.user.name ? this.user.name : this.user.adminuser, dock_id: this.dock_id };
+      let content = '';
+      content = `<img src='${_.get(this, `${type}`)}' style="width:30px;height:30px" />`;
+      object.content = content;
+      if (this.user.uid) {
+        object.sender_id = this.user.uid;
+        object.role = this.user.role;
+        let res = await this.create(object);
+        this.$checkRes(res, null, res.errmsg || '发言失败');
+      } else {
+        object.sender_id = this.user.suid;
+        object.role = this.user.role;
+        let res = await this.create(object);
+        this.$checkRes(res, null, res.errmsg || '发言失败');
+      }
+    },
     // 切换图片
     isEmotion(word) {
       return word.startsWith('<img');

+ 3 - 1
src/views/halltwo/parts/expert.vue

@@ -9,7 +9,7 @@
         <el-col :span="24" class="down">
           <el-col :span="12" class="list" v-for="(item, index) in list" :key="index">
             <el-col :span="12" class="image">
-              <el-image :src="item.url"></el-image>
+              <el-image :src="item.expertimage"></el-image>
             </el-col>
             <el-col :span="12" class="txt">
               <p>{{ item.name }}</p>
@@ -44,6 +44,8 @@ export default {
 
 <style lang="less" scoped>
 .main {
+  height: 440px;
+  overflow: hidden;
   .top {
     height: 45px;
     line-height: 45px;