guhongwei vor 4 Jahren
Ursprung
Commit
cb94672317

+ 86 - 53
src/views/adminCenter/statisInfo/parts/achievements.vue

@@ -6,7 +6,7 @@
           <template>
             <el-col :span="24" class="search">
               <el-col :span="5">
-                <el-select v-model="field" placeholder="请选择所属领域" @change="change">
+                <el-select v-model="field" filterable clearable placeholder="请选择所属领域" @change="changeField">
                   <el-option label="先进制造" value="0"></el-option>
                   <el-option label="新材料" value="1"></el-option>
                   <el-option label="光电子" value="2"></el-option>
@@ -15,7 +15,7 @@
                 </el-select>
               </el-col>
               <el-col :span="12">
-                <el-radio-group v-model="radio1" @change="submits">
+                <el-radio-group v-model="radio1" @change="changeRadio">
                   <el-radio label="0" border>是我处支持范围</el-radio>
                   <el-radio label="1" border>不是我处支持范围</el-radio>
                 </el-radio-group>
@@ -24,7 +24,6 @@
             <el-table :data="list" style="width: 100%" border>
               <el-table-column type="index" label="序号" width="50" align="center"> </el-table-column>
               <el-table-column prop="name" label="商品名称 " align="center"> </el-table-column>
-              <el-table-column prop="company" label="所属单位 " align="center"> </el-table-column>
               <el-table-column prop="field" label="所属技术领域" align="center">
                 <template v-slot="scoped">
                   {{
@@ -42,14 +41,43 @@
                   }}
                 </template>
               </el-table-column>
-              <!-- <el-table-column label="操作" align="center">
-                <template slot-scope="scoped">
-                  <el-button v-if="scoped.row.status == 4" type="primary" size="mini" @click="shareBtn(scoped.row.id)">审核 </el-button>
-                  
-              </el-table-column> -->
+              <el-table-column prop="phase" label="研发阶段" align="center">
+                <template v-slot="scoped">
+                  {{ scoped.row.phase == '0' ? '阶段成果' : scoped.row.phase == '1' ? '最终成果' : '暂无' }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="coopermode" label="合作方式" align="center">
+                <template v-slot="scoped">
+                  {{
+                    scoped.row.coopermode == '0'
+                      ? '技术转让'
+                      : scoped.row.coopermode == '1'
+                      ? '技术服务'
+                      : scoped.row.coopermode == '2'
+                      ? '技术许可'
+                      : scoped.row.coopermode == '3'
+                      ? '技术融资'
+                      : scoped.row.coopermode == '4'
+                      ? '其他'
+                      : '暂无'
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="business" label="交易方式" align="center">
+                <template v-slot="scoped">
+                  {{ scoped.row.business == '0' ? '公用' : scoped.row.business == '1' ? '竞价' : scoped.row.business == '2' ? '转让' : '暂无' }}
+                </template>
+              </el-table-column>
             </el-table>
             <el-col :span="24" class="page">
-              <page v-bind="$attrs" position="center" :limit="limit" :total="total" @query="search"></page>
+              <el-pagination
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+                :page-size="pageSize"
+              >
+              </el-pagination>
             </el-col>
           </template>
         </el-col>
@@ -59,65 +87,70 @@
 </template>
 
 <script>
-import page from '@/components/pagination.vue';
 import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
-const { mapActions: product } = createNamespacedHelpers('marketproduct');
+const { mapActions: dock } = createNamespacedHelpers('dock');
+import _ from 'loadsh';
 export default {
   name: 'column',
   props: {},
-  components: {
-    page,
-  },
+  components: {},
   data: () => ({
-    currentPage: 0,
-    pageSize: 10,
-    limit: 10,
+    applyList: [], //查询数据
+    currentPage: 1, //默认数据1
+    pageSize: 10, //每页显示数据数量
+    origin: [], //分割数据
+    list: [], //显示数据列表
     total: 0,
-    list: [],
-    field: [],
+    // 技术领域
+    field: '',
+    // 是否我处支持
     radio1: '',
   }),
   created() {
     this.search();
   },
-  computed: {},
   methods: {
-    ...product({ productQuery: 'query' }),
+    ...dock(['query', 'delete', 'update', 'fetch']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      if (this.field) {
-        if (this.radio1) {
-          let res = await this.productQuery({ skip, totaltype: 1, field: this.field, radio1: this.radio1, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        } else {
-          let res = await this.productQuery({ skip, totaltype: 1, field: this.field, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        }
-      } else if (this.radio1) {
-        if (this.field) {
-          let res = await this.productQuery({ skip, totaltype: 1, field: this.field, radio1: this.radio1, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        } else {
-          let res = await this.productQuery({ skip, totaltype: 1, radio1: this.radio1, limit, ...info });
-          this.$set(this, `list`, res.data);
-          this.$set(this, `total`, res.total);
-        }
-      } else {
-        let res = await this.productQuery({ skip, totaltype: 1, limit, ...info });
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
+      let res = await this.query({ skip, limit, uid: this.user.uid, ...info });
+      let arr = res.data.map(item => item.apply.map(apply => apply.goodsList));
+      arr = _.flattenDeep(arr);
+      var newArr = arr.filter(item => item.totaltype === '1');
+      this.$set(this, `applyList`, newArr);
+      this.$set(this, `total`, newArr.length);
     },
-    async change(value) {
-      this.$set(this, `field`, value);
-      this.search();
+    searchPage(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
     },
-
-    submits(value) {
-      this.$set(this, `radio1`, value);
-      this.search();
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+    // 筛选技术领域
+    changeField(value) {
+      var arr = this.applyList.filter(item => item.field === value);
+      this.$set(this, `list`, arr);
+      this.$set(this, `total`, arr.length);
+    },
+    // 筛选是否是我处支持
+    changeRadio() {},
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    applyList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
     },
   },
 };

+ 70 - 11
src/views/adminCenter/statisInfo/parts/technology.vue

@@ -6,7 +6,7 @@
           <template>
             <el-col :span="24" class="search">
               <el-col :span="5">
-                <el-select v-model="field" placeholder="请选择所属领域" @change="changeField">
+                <el-select v-model="field" filterable clearable placeholder="请选择所属领域" @change="changeField">
                   <el-option label="先进制造" value="0"></el-option>
                   <el-option label="新材料" value="1"></el-option>
                   <el-option label="光电子" value="2"></el-option>
@@ -41,9 +41,43 @@
                   }}
                 </template>
               </el-table-column>
+              <el-table-column prop="phase" label="研发阶段" align="center">
+                <template v-slot="scoped">
+                  {{ scoped.row.phase == '0' ? '阶段成果' : scoped.row.phase == '1' ? '最终成果' : '暂无' }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="coopermode" label="合作方式" align="center">
+                <template v-slot="scoped">
+                  {{
+                    scoped.row.coopermode == '0'
+                      ? '技术转让'
+                      : scoped.row.coopermode == '1'
+                      ? '技术服务'
+                      : scoped.row.coopermode == '2'
+                      ? '技术许可'
+                      : scoped.row.coopermode == '3'
+                      ? '技术融资'
+                      : scoped.row.coopermode == '4'
+                      ? '其他'
+                      : '暂无'
+                  }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="business" label="交易方式" align="center">
+                <template v-slot="scoped">
+                  {{ scoped.row.business == '0' ? '公用' : scoped.row.business == '1' ? '竞价' : scoped.row.business == '2' ? '转让' : '暂无' }}
+                </template>
+              </el-table-column>
             </el-table>
             <el-col :span="24" class="page">
-              分頁
+              <el-pagination
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+                :page-size="pageSize"
+              >
+              </el-pagination>
             </el-col>
           </template>
         </el-col>
@@ -55,12 +89,18 @@
 <script>
 import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
 const { mapActions: dock } = createNamespacedHelpers('dock');
+import _ from 'loadsh';
 export default {
   name: 'column',
   props: {},
   components: {},
   data: () => ({
-    list: [],
+    applyList: [], //查询数据
+    currentPage: 1, //默认数据1
+    pageSize: 10, //每页显示数据数量
+    origin: [], //分割数据
+    list: [], //显示数据列表
+    total: 0,
     // 技术领域
     field: '',
     // 是否我处支持
@@ -72,16 +112,25 @@ export default {
   methods: {
     ...dock(['query', 'delete', 'update', 'fetch']),
     async search({ skip = 0, limit = 10, ...info } = {}) {
-      let res = await this.query({ skip, limit, uid: this.user.uid });
-      for (const val of res.data) {
-        for (const val2 of val.apply) {
-          var enticeNew = val2.goodsList.map(item => ({ item: item }));
-          console.log(enticeNew);
-        }
-      }
+      let res = await this.query({ skip, limit, uid: this.user.uid, ...info });
+      let arr = res.data.map(item => item.apply.map(apply => apply.goodsList));
+      arr = _.flattenDeep(arr);
+      var newArr = arr.filter(item => item.totaltype === '0');
+      this.$set(this, `applyList`, newArr);
+      this.$set(this, `total`, newArr.length);
+    },
+    searchPage(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
     },
     // 筛选技术领域
-    changeField() {},
+    changeField(value) {
+      var arr = this.applyList.filter(item => item.field === value);
+      this.$set(this, `list`, arr);
+      this.$set(this, `total`, arr.length);
+    },
     // 筛选是否是我处支持
     changeRadio() {},
   },
@@ -94,6 +143,16 @@ export default {
   metaInfo() {
     return { title: this.$route.meta.title };
   },
+  watch: {
+    applyList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
+    },
+  },
 };
 </script>
 

+ 187 - 221
src/views/hall/direct.vue

@@ -5,7 +5,7 @@
         <div class="livetop">
           <div class="w_1200">
             <el-col :span="24" class="title">
-              {{ title }}
+              {{ dockInfo.title }}
             </el-col>
             <el-col :span="24" class="zhuban">
               <span>主办方:</span>
@@ -14,27 +14,27 @@
             <el-col :span="24" class="num">
               <p>
                 <span>同时在线</span>
-                <span>1人</span>
+                <span>{{ statNum.tszx }}人</span>
               </p>
               <p>
                 <span>特邀嘉宾</span>
-                <span>{{ expertList.length }}人</span>
+                <span>{{ statNum.tyjb }}人</span>
               </p>
               <p>
                 <span>洽谈合作</span>
-                <span>{{ qiatan }}项</span>
+                <span>{{ statNum.qthz }}项</span>
               </p>
               <p>
                 <span>达成意愿</span>
-                <span>{{ dacheng }}项</span>
+                <span>{{ statNum.dcyx }}项</span>
               </p>
               <p>
                 <span>交易完成</span>
-                <span>{{ chengguo }}项</span>
+                <span>{{ statNum.jywc }}项</span>
               </p>
               <p>
                 <span>参展项目</span>
-                <span>{{ xuqiu }}项</span>
+                <span>{{ statNum.czxm }}项</span>
               </p>
             </el-col>
           </div>
@@ -43,12 +43,12 @@
           <el-col :span="24" class="livemain">
             <el-col :span="24" class="livevideo">
               <el-col :span="24" class="left">
-                <el-col :span="24" class="title" @click.native="btnDirectDetail">
+                <el-col :span="24" class="title" @click.native="$router.push({ path: '/live/hallDetail', query: { id: this.$route.query.id } })">
                   <span style="color: rgb(255, 132, 0);">现场</span>
                   <span>直播</span>
                 </el-col>
                 <el-col :span="24" class="video">
-                  <video :src="file_path" controls="controls" style="height: 395px; width: 100%;">
+                  <video :src="dockInfo.file_path" controls="controls" style="height: 395px; width: 100%;">
                     您的浏览器不支持 video 标签。
                   </video>
                   <!-- <videoPlayer ref="videoPlayer" :options="videoOptions" class="vjs-custom-skin videoPlayer" :playsinline="true" /> -->
@@ -142,7 +142,7 @@
                             <el-button
                               size="mini"
                               type="success"
-                              @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: id, user_id: user_id } })"
+                              @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item._id, dockid: dock_id, user_id: user_id } })"
                               >对接</el-button
                             >
                           </el-col>
@@ -152,7 +152,8 @@
                         <el-button
                           type="primary"
                           size="mini"
-                          @click="$router.push({ path: '/hall/productList/technologyList', query: { column_name: '技术' } })"
+                          @click="$router.push({ path: '/hall/productList/technologyList', query: { column_name: '技术', dockid: dock_id } })"
+                          v-if="jishulist.length > 5"
                           >查看所有项目</el-button
                         >
                       </el-col>
@@ -173,7 +174,7 @@
                               <el-button
                                 size="mini"
                                 type="success"
-                                @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: id, user_id: user_id } })"
+                                @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: this.id, user_id: this.user_id } })"
                                 >对接</el-button
                               >
                             </el-col>
@@ -226,7 +227,8 @@
                           <el-button
                             type="primary"
                             size="mini"
-                            @click="$router.push({ path: '/hall/productList/technologyList', query: { column_name: '产品' } })"
+                            @click="$router.push({ path: '/hall/productList/technologyList', query: { column_name: '产品', dockid: dock_id } })"
+                            v-if="demandList.length > 5"
                             >查看所有项目</el-button
                           >
                         </el-col>
@@ -248,7 +250,7 @@
                               <el-button
                                 size="mini"
                                 type="success"
-                                @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: id, user_id: user_id } })"
+                                @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item._id, dockid: dock_id, user_id: user_id } })"
                                 >对接</el-button
                               >
                             </el-col>
@@ -281,7 +283,8 @@
                           <el-button
                             type="primary"
                             size="mini"
-                            @click="$router.push({ path: '/hall/productList/technologyList', query: { column_name: '服务' } })"
+                            @click="$router.push({ path: '/hall/productList/technologyList', query: { column_name: '服务', dockid: dock_id } })"
+                            v-if="serviceList.length > 10"
                             >查看所有项目</el-button
                           >
                         </el-col>
@@ -298,7 +301,12 @@
                       <el-col :span="20" class="info">
                         <p>
                           <span class="textOver">{{ item.name }}</span>
-                          <el-button size="mini" type="success" @click="zhuanjiaduijies(item)">对接</el-button>
+                          <el-button
+                            size="mini"
+                            type="success"
+                            @click="$router.push({ path: '/live/hall/dock/zhanjiaduijie', query: { id: item._id, dockid: dock_id, user_id: user_id } })"
+                            >对接</el-button
+                          >
                           <el-button size="mini" type="primary" @click="twoBtnDetail(item)" style="margin:0 5px 0 5px">详情</el-button>
                         </p>
 
@@ -316,7 +324,8 @@
                       <el-button
                         type="primary"
                         size="mini"
-                        @click="$router.push({ path: '/hall/productList/expertList', query: { dockid: id, user_id: user_id } })"
+                        @click="$router.push({ path: '/hall/productList/expertList', query: { dockid: dock_id, user_id: user_id } })"
+                        v-if="expertList.length > 1"
                         >查看所有项目</el-button
                       >
                     </el-col>
@@ -415,7 +424,6 @@ import 'video.js/dist/video-js.css';
 import 'vue-video-player/src/custom-theme.css';
 import { videoPlayer } from 'vue-video-player';
 import 'videojs-flash';
-
 import liveFoot from '@/layout/live/foot.vue';
 import chat from '@/components/parts/chat.vue';
 import directDetail from '@/layout/direct/directDetail.vue';
@@ -427,7 +435,6 @@ const { mapActions: market } = createNamespacedHelpers('market');
 const { mapActions: dock } = createNamespacedHelpers('dock');
 const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
 import moment from 'moment';
-
 import _ from 'loadsh';
 export default {
   name: 'hall',
@@ -451,15 +458,6 @@ export default {
   },
   data: () => ({
     activeName: 'second',
-    name: '',
-
-    // 详情显示
-    dialogVisible: false,
-    // 技术,产品,服务详情
-    directInfo: {},
-    // 专家详情
-    dialogExport: false,
-    exportInfo: {},
     //搜索判断用
     panduan: '找技术',
     // 找技术
@@ -470,88 +468,15 @@ export default {
     serviceList: [],
     // 找专家
     expertList: [],
-    //对接会创建人id
-    user_id: '',
-    // 路演
-    luyanList: [
-      {
-        title: '项目路演',
-        num: '1234',
-        city: '吉林省',
-        hy: '所属行业',
-        xurz: '股权融资',
-      },
-      {
-        title: '项目路演',
-        num: '1234',
-        city: '吉林省',
-        hy: '所属行业',
-        xurz: '股权融资',
-      },
-      {
-        title: '项目路演',
-        num: '1234',
-        city: '吉林省',
-        hy: '所属行业',
-        xurz: '股权融资',
-      },
-      {
-        title: '项目路演',
-        num: '1234',
-        city: '吉林省',
-        hy: '所属行业',
-        xurz: '股权融资',
-      },
-    ],
+    // 详情显示
+    dialogVisible: false,
+    // 技术,产品,服务详情
+    directInfo: {},
+    // 专家详情
+    dialogExport: false,
+    exportInfo: {},
     // 交易实况
-    directlist: [
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-
-      {
-        time: '2019-03-05',
-        name1: '中科院宁波先进制造所',
-        name2: '深圳市华尔威体育用品',
-      },
-    ],
+    directlist: [],
     //达成意向
     yixianglist: [],
     //合作成功
@@ -584,15 +509,58 @@ export default {
         context: '测试内容测试内容测试内容测试内容测试内容测试内容测试内容测试内容',
       },
     ],
+    // 路演
+    luyanList: [
+      {
+        title: '项目路演',
+        num: '1234',
+        city: '吉林省',
+        hy: '所属行业',
+        xurz: '股权融资',
+      },
+      {
+        title: '项目路演',
+        num: '1234',
+        city: '吉林省',
+        hy: '所属行业',
+        xurz: '股权融资',
+      },
+      {
+        title: '项目路演',
+        num: '1234',
+        city: '吉林省',
+        hy: '所属行业',
+        xurz: '股权融资',
+      },
+      {
+        title: '项目路演',
+        num: '1234',
+        city: '吉林省',
+        hy: '所属行业',
+        xurz: '股权融资',
+      },
+    ],
+    // 使用手册开始
     superOne: require('@/assets/live/main1.png'),
     two: require('@/assets/live/top_bg.png'),
     superOnes: require('@/assets/live/测试图片.jpg'),
-    title: '',
-    file_path: '',
-    xuqiu: '',
-    chengguo: '',
-    qiatan: '',
-    dacheng: '',
+    // 使用手册结束
+    // 统计数字
+    statNum: {
+      tszx: 0,
+      tyjb: 0,
+      qthz: 0,
+      dcyx: 0,
+      jywc: 0,
+      czxm: 0,
+    },
+    // 对接会详情
+    dockInfo: {
+      title: '',
+      file_path: '',
+    },
+    //对接会创建人id
+    user_id: '',
     videoSrc: '',
     videoOptions: {
       playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
@@ -622,12 +590,12 @@ export default {
         fullscreenToggle: true, //全屏按钮
       },
     },
+    name: '',
+    dock_id: '',
   }),
   created() {
-    this.searchInfo();
-    this.searchzhanjia();
-    this.searchchanpin();
-    this.searchfuwu();
+    this.$set(this, `dock_id`, this.$route.query.id);
+    // 对接会详情
     this.searchdock();
   },
   methods: {
@@ -636,130 +604,138 @@ export default {
     ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
     ...expertsuser({ expertQuery: 'query' }),
     ...transaction({ tquery: 'query' }),
+    // 查询详情
     async searchdock() {
       // 标题
-      let res = await this.dockFetch(this.id);
-      this.$set(this, `title`, res.data.title);
-      this.$set(this, `file_path`, res.data.file_path);
-      this.$set(this, `user_id`, res.data.user_id);
-      console.log(res.data);
-      // 交易实况
-      let aaa = await this.tquery({ dockid: this.id });
-      let newaaa = aaa.data.filter(f => f.status == '1' || f.status == '2');
-      for (const val of newaaa) {
+      let res = await this.dockFetch(this.dock_id);
+      if (this.$checkRes(res)) {
+        // 对接会标题
+        this.$set(this.dockInfo, `title`, res.data.title);
+        // 对接会视频
+        this.$set(this.dockInfo, `file_path`, res.data.file_path);
+        // 对接会创建人id
+        this.$set(this, `user_id`, res.data.user_id);
+        // 参展项目
+        let czxm = res.data.apply.map(item => item.goodsList);
+        // let czxm = res.data.map(item => item.apply.map(apply => apply.goodsList));
+        czxm = _.flattenDeep(czxm);
+        this.$set(this.statNum, `czxm`, czxm.length);
+        // 找技术
+        var jishuData = czxm.filter(item => item.totaltype === '0');
+        this.$set(this, `jishulist`, jishuData);
+        // 找产品
+        var chanpinData = czxm.filter(item => item.totaltype === '1');
+        this.$set(this, `demandList`, chanpinData);
+        // 找服务
+        var fuwuData = czxm.filter(item => item.totaltype === '2');
+        this.$set(this, `serviceList`, fuwuData);
+        // 找专家
+        let exportdata = await this.expertQuery({ role: 6 });
+        if (this.$checkRes(exportdata)) this.$set(this, `expertList`, exportdata.data);
+      }
+      // 查询特邀嘉宾
+      let arr = await this.expertQuery({ role: 6 });
+      this.$set(this.statNum, `tyjb`, arr.data.length);
+      // 洽谈合作
+      let qthe = await this.tquery({ status: 0, dockid: this.id });
+      this.$set(this.statNum, `qthz`, arr.data.length);
+      // 达成意向
+      let dcyx = await this.tquery({ status: 1, dockid: this.id });
+      for (const val of dcyx.data) {
         var time = moment(val.meta.createdAt).format('YYYY-MM-DD hh:mm');
         val.time = time;
       }
-      this.$set(this, `directlist`, newaaa);
-      // 洽谈
-      let abb = await this.tquery({ status: 0, dockid: this.id });
-      this.$set(this, `qiatan`, abb.total);
-      // 意向
-      let acc = await this.tquery({ status: 1, dockid: this.id });
-
-      for (const val of acc.data) {
+      this.$set(this.statNum, `dcyx`, dcyx.total);
+      this.$set(this, `yixianglist`, dcyx.data);
+      // 交易完成&合作成功
+      let jywc = await this.tquery({ status: 2, dockid: this.id });
+      for (const val of jywc.data) {
         var time = moment(val.meta.createdAt).format('YYYY-MM-DD hh:mm');
         val.time = time;
       }
-
-      this.$set(this, `dacheng`, acc.total);
-      this.$set(this, `yixianglist`, acc.data);
-      // 成果
-      let aee = await this.tquery({ status: 2, dockid: this.id });
-      for (const val of aee.data) {
+      this.$set(this.statNum, `jywc`, jywc.total);
+      this.$set(this, `successlist`, jywc.data);
+      //交易实况
+      let jysk = await this.tquery({ dockid: this.id });
+      let newjysk = jysk.data.filter(f => f.status == '1' || f.status == '2');
+      for (const val of newjysk) {
         var time = moment(val.meta.createdAt).format('YYYY-MM-DD hh:mm');
         val.time = time;
       }
-      this.$set(this, `chengguo`, aee.total);
-      this.$set(this, `successlist`, aee.data);
-      // 需求
-      let aff = await this.mapProductQuery();
-      this.$set(this, `xuqiu`, aff.total);
-    },
-    //技术
-    async searchInfo(newname) {
-      let res = await this.mapProductQuery({ skip: 0, limit: 10, totaltype: '0', name: newname });
-      console.log(res);
-      if (this.$checkRes(res)) this.$set(this, `jishulist`, res.data);
-    },
-    //产品
-    async searchchanpin(newname) {
-      let res = await this.mapProductQuery({ skip: 0, limit: 5, totaltype: '1', name: newname });
-      if (this.$checkRes(res)) this.$set(this, `demandList`, res.data);
-    },
-    //服务
-    async searchfuwu(newname) {
-      let res = await this.mapProductQuery({ skip: 0, limit: 5, totaltype: '2', name: newname });
-      if (this.$checkRes(res)) this.$set(this, `serviceList`, res.data);
+      this.$set(this, `directlist`, newjysk);
     },
-    //专家
-    async searchzhanjia(newname) {
-      let res = await this.expertQuery({ skip: 0, limit: 6, name: newname, role: 6 });
-      if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
-    },
-    //tabs
-    handleClick(tab, event) {
-      if (event.target.getAttribute('id') == 'tab-0') {
-        this.panduan = '找技术';
-        if (this.name) {
-          this.searchInfo();
-        }
-      } else if (event.target.getAttribute('id') == 'tab-1') {
-        this.panduan = '找产品';
-        if (this.name) {
-          this.searchchanpin();
-        }
-      } else if (event.target.getAttribute('id') == 'tab-2') {
-        this.panduan = '找服务';
-        if (this.name) {
-          this.searchfuwu();
-        }
-      } else if (event.target.getAttribute('id') == 'tab-3') {
-        this.panduan = '找专家';
-        if (this.name) {
-          this.searchzhanjia();
-        }
+    // 交易实况
+    handleClicks(tab, event) {
+      if (tab.name == 'four') {
+        this.$router.push('/tltest');
+      } else if (tab.name == 'five') {
+        this.$router.push('/tllltest');
+      } else if (tab.name == 'six') {
+        this.$router.push('/tltest2');
       }
     },
     // 点击查询
     resetForm(name) {
       if (this.panduan == '找技术') {
         if (name) {
-          this.searchInfo(name);
+          var filterdata = this.jishulist.filter(item => item.name === name);
+          this.$set(this, `jishulist`, filterdata);
         } else {
-          this.searchInfo();
+          this.searchdock();
         }
       } else if (this.panduan == '找产品') {
         if (name) {
-          this.searchchanpin(name);
+          var filterdata = this.demandList.filter(item => item.name === name);
+          this.$set(this, `demandList`, filterdata);
         } else {
-          this.searchchanpin();
+          this.searchdock();
         }
       } else if (this.panduan == '找服务') {
         if (name) {
-          this.searchfuwu(name);
+          var filterdata = this.serviceList.filter(item => item.name === name);
+          this.$set(this, `serviceList`, filterdata);
         } else {
-          this.searchfuwu();
+          this.searchdock();
         }
       } else if (this.panduan == '找专家') {
         if (name) {
-          this.searchzhanjia(name);
+          var filterdata = this.expertList.filter(item => item.name === name);
+          this.$set(this, `expertList`, filterdata);
         } else {
-          this.searchzhanjia();
+          this.searchdock();
         }
       }
     },
-    // 直播详情
-    btnDirectDetail() {
-      this.$router.push({ path: '/live/hallDetail', query: { id: this.$route.query.id } });
+    //找技术,找产品,找服务,找专家
+    handleClick(tab, event) {
+      if (event.target.getAttribute('id') == 'tab-0') {
+        this.panduan = '找技术';
+        if (this.name) {
+          console.log('找技术');
+        }
+      } else if (event.target.getAttribute('id') == 'tab-1') {
+        this.panduan = '找产品';
+        if (this.name) {
+          console.log('找产品');
+        }
+      } else if (event.target.getAttribute('id') == 'tab-2') {
+        this.panduan = '找服务';
+        if (this.name) {
+          console.log('找服务');
+        }
+      } else if (event.target.getAttribute('id') == 'tab-3') {
+        this.panduan = '找专家';
+        if (this.name) {
+          console.log('找专家');
+        }
+      }
     },
     // 技术,产品,服务详情
     oneBtnDetail(data) {
       this.dialogVisible = true;
-      console.log(data);
       this.$set(this, `directInfo`, data);
     },
-    // 关闭dialog
+    // 关闭技术,产品,服务详情
     handleClose(done) {
       done();
     },
@@ -770,39 +746,24 @@ export default {
       data.cardnumber = this.cardnumberNumFilter(data.cardnumber);
       this.$set(this, `exportInfo`, data);
     },
+    // 过滤隐藏手机号
     phoneNumFilter(phone) {
       let start = phone.slice(0, 3);
       let end = phone.slice(-4);
       return `${start}****${end}`;
     },
+    // 过滤隐藏身份证号
     cardnumberNumFilter(cardnumber) {
       let start = cardnumber.slice(0, 4);
       let end = cardnumber.slice(-3);
       return `${start}****${end}`;
     },
-
-    zhuanjiaduijies(data) {
-      this.$router.push({ path: '/live/hall/dock/zhanjiaduijie', query: { id: data.id, dockid: this.id } });
-    },
-    handleClicks(tab, event) {
-      if (tab.name == 'four') {
-        this.$router.push('/tltest');
-      } else if (tab.name == 'five') {
-        this.$router.push('/tllltest');
-      } else if (tab.name == 'six') {
-        this.$router.push('/tltest2');
-      }
-    },
-
     // 关闭专家详情
     handleCloseExport(done) {
       done();
     },
   },
   computed: {
-    id() {
-      return this.$route.query.id;
-    },
     ...mapState(['user']),
     pageTitle() {
       return `${this.$route.meta.title}`;
@@ -1372,8 +1333,10 @@ export default {
 // 技术
 .demandList {
   .topList {
+    height: 430px;
+    overflow: hidden;
     .list {
-      padding: 11px 0;
+      padding: 6px 0;
       border-bottom: 1px dashed #ccc;
       .name {
         height: 30px;
@@ -1420,6 +1383,8 @@ export default {
 // 服务
 .serviceList {
   .topList {
+    height: 430px;
+    overflow: hidden;
     .list {
       padding: 11px 0;
       border-bottom: 1px dashed #ccc;
@@ -1460,6 +1425,7 @@ export default {
   position: fixed;
   top: 15px;
   text-align: right;
+  z-index: 999;
   span {
     color: #fff;
     font-weight: bold;

+ 47 - 105
src/views/hall/liveApply.vue

@@ -1,56 +1,5 @@
 <template>
   <div id="liveApply">
-    <!-- <div class="w_0100">
-      <div class="w_1200">
-        <div class="liveApply">
-          <el-col :span="24" class="liveApplyTop">
-            <el-col :span="3">
-              <el-image :src="logo" style="width:105px;height:105px;"></el-image>
-            </el-col>
-            <el-col :span="20">
-              <p>温馨提示:</p>
-              <p>1、为了保证您的信息能顺利通过我们的审核,请将信息的真实情况尽可能全面的发布出来!</p>
-              <p>
-                2、根据我们的长期跟踪统计,信息完整度越高,越容易获得目标客户的关注!3、信息完整度越高,将在我们的平台搜索结果排序靠前、获得推荐机会,以及享受增值服务试用机会!
-              </p>
-            </el-col>
-          </el-col>
-          <el-col :span="24" class="liveApplyInfo">
-            <el-form ref="form" :model="form" label-width="120px">
-              <el-form-item label="申请人身份">
-                <el-radio-group v-model="form.buyer" @change="changeuser">
-                  <el-radio label="0">买家</el-radio>
-                  <el-radio label="1">卖家</el-radio>
-                </el-radio-group>
-              </el-form-item>
-              <span v-if="this.resource == '1' || this.resource == ''">
-                <el-form-item label="选择产品">
-                  <el-select v-model="form.goodsList" multiple placeholder="请选择选择产品">
-                    <el-option v-for="(item, index) in goodsLists" :key="index" :label="item.name" :value="item.id"> </el-option>
-                  </el-select>
-                </el-form-item>
-              </span>
-              <el-form-item label="联系人">
-                <el-input v-model="form.contact"></el-input>
-              </el-form-item>
-              <el-form-item label="联系电话">
-                <el-input v-model="form.contact_tel"></el-input>
-              </el-form-item>
-              <el-form-item label="电子邮箱">
-                <el-input v-model="form.email"></el-input>
-              </el-form-item>
-              <el-form-item label="单位名称">
-                <el-input v-model="form.company"></el-input>
-              </el-form-item>
-              <el-row style="text-align:center">
-                <el-button type="primary" @click="onSubmit">立即申请</el-button>
-                <el-button @click="restBtn">取消</el-button>
-              </el-row>
-            </el-form>
-          </el-col>
-        </div>
-      </div>
-    </div> -->
     <el-row>
       <el-col :span="24">
         <div class="w_1200">
@@ -191,21 +140,21 @@
                     <el-input v-model.number="demandForm.contact_tel" placeholder="请输入联系电话" maxlength="11"></el-input>
                   </el-form-item>
                   <el-form-item>
-                    <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
                     <el-button @click="resetForm('ruleForm')">取消</el-button>
+                    <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
                   </el-form-item>
                 </el-form>
               </el-tab-pane>
               <el-tab-pane label="产品申请" name="second">
-                <el-form :model="productForm" :rules="productFormrules" ref="productForm" label-width="100px" class="demo-ruleForm">
+                <el-form :model="productForm" :rules="productFormrules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
                   <el-form-item label="选择产品">
-                    <el-select v-model="productForm.goodsList" multiple placeholder="请选择选择产品">
-                      <el-option v-for="(item, index) in goodsLists" :key="index" :label="item.name" :value="item.id"> </el-option>
+                    <el-select v-model="productForm.goodsList" value-key="id" multiple placeholder="请选择选择产品">
+                      <el-option v-for="(item, index) in goodsLists" :key="index" :label="item.name" :value="item"> </el-option>
                     </el-select>
                   </el-form-item>
                   <el-form-item>
-                    <el-button type="primary" @click="submitproductForm('productForm')">确定</el-button>
-                    <el-button @click="resetForm('productForm')">取消</el-button>
+                    <el-button type="primary" @click="submitproductForm('ruleForm')">确定</el-button>
+                    <el-button @click="resetForm('ruleForm')">取消</el-button>
                   </el-form-item>
                 </el-form>
               </el-tab-pane>
@@ -221,9 +170,10 @@
 import { mapState, createNamespacedHelpers } from 'vuex';
 import _ from 'lodash';
 import upload from '@/components/upload.vue';
-const { mapActions: mapProduct } = createNamespacedHelpers('marketproduct');
 const { mapActions: apply } = createNamespacedHelpers('apply');
 const { mapActions: mapMarkettype } = createNamespacedHelpers('markettype');
+const { mapActions: mapProduct } = createNamespacedHelpers('marketproduct');
+
 export default {
   name: 'liveApply',
   props: {},
@@ -244,75 +194,64 @@ export default {
       contact_user: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
       contact_tel: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
     },
-    // 产品
+    // 技术
     productForm: {},
-    goodsLists: [],
     productFormrules: {},
+    // 产品类别
+    goodsLists: [],
   }),
   created() {
-    this.searchInfo();
-    // 查询类型
     this.maarkettype();
   },
   methods: {
-    ...mapProduct({ mapProductQuery: 'query', mapProductFetch: 'fetch' }),
-    ...apply({ applyCreate: 'create' }),
+    ...apply({ applyupdate: 'update', applyCreate: 'create' }),
     ...mapMarkettype({ markettypeList: 'query' }),
-    // 查询产品
-    async searchInfo() {
-      let res = await this.mapProductQuery({ userid: this.user.uid });
+    ...mapProduct({ mapProductQuery: 'query', mapProductFetch: 'fetch' }),
+    // 需求提交
+    async submitForm() {
+      let data = {};
+      data.user_id = this.user.uid;
+      data.user_name = this.user.name;
+      data.contact_tel = this.user.phone;
+      data.role = this.user.role;
+      let goods = [];
+      goods.push(this.demandForm);
+      data.goodsList = goods;
+      const res = await this.applyCreate({ id: this.id, ...data });
       if (res.errcode === 0) {
-        this.$set(this, `goodsLists`, res.data);
+        this.$message({
+          message: '申请参加对接会成功',
+          type: 'success',
+        });
+        this.$router.push('/hallList/index');
       }
     },
-    // 需求提交
-    async onSubmit() {
-      let duplicate = JSON.parse(JSON.stringify(this.form));
-      let data = { ...duplicate };
+    // 产品提交
+    async submitproductForm() {
+      let data = this.productForm;
       data.user_id = this.user.uid;
-      if (data.user_id) {
-        data.user_name = this.user.name;
-        data.role = this.user.role;
-
-        let dock_id = this.$route.query.id;
-        data.goodsList = this.form.goodsList;
-        // data.goodsList = [this.productInfo(this.form.goodsList)];
-        const res = await this.applyCreate({ id: dock_id, ...data });
-        if (res.errcode === 0) {
-          this.$message({
-            message: '申请参加对接会成功',
-            type: 'success',
-          });
-          this.restBtn();
-        }
-      } else {
-        // let res = 0;
-        // this.$checkRes(res, '请登录', '请登录');
+      data.user_name = this.user.name;
+      data.contact_tel = this.user.phone;
+      data.role = this.user.role;
+      const res = await this.applyCreate({ id: this.id, ...data });
+      if (res.errcode === 0) {
         this.$message({
-          dangerouslyUseHTMLString: true,
-          message: '<strong><a href="http://free.liaoningdoupo.com/platlive/newlogin" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
-          type: 'error',
+          message: '申请参加对接会成功',
+          type: 'success',
         });
+        this.$router.push('/hallList/index');
       }
     },
-    // 產品提交
-    submitproductForm() {
-      console.log(this.productForm);
-    },
-    // 取消
-    restBtn() {
-      history.go(-1);
-    },
-    productInfo(id) {
-      let index = this.goodsLists.find(item => item.id == id);
-      return index;
-    },
     // 查询类型
     async maarkettype({ category = 54, ...info } = {}) {
       const res = await this.markettypeList({ category, ...info });
       if (this.$checkRes(res)) {
         this.$set(this, `columnList`, res.data);
       }
+      const arr = await this.mapProductQuery({ userid: this.user.uid });
+      if (this.$checkRes(arr)) {
+        this.$set(this, `goodsLists`, arr.data);
+      }
     },
     // 类型选择
     selectChild(product_type_id) {
@@ -346,6 +285,9 @@ export default {
     pageTitle() {
       return `${this.$route.meta.title}`;
     },
+    id() {
+      return this.$route.query.id;
+    },
   },
   metaInfo() {
     return { title: this.$route.meta.title };

+ 0 - 3
src/views/hall/productList/expertList.vue

@@ -74,12 +74,9 @@ export default {
       }
     },
     back() {
-      console.log(this.dockid);
-
       this.$router.push({ path: '/hall/direct', query: { id: this.dockid } });
     },
     zhuanjiaduijies(item) {
-      console.log(item.id);
       this.$router.push({ path: '/live/hall/dock/zhanjiaduijie', query: { id: item.id, dockid: this.dockid } });
     },
   },

+ 58 - 27
src/views/hall/productList/technologyList.vue

@@ -12,7 +12,7 @@
             <el-col :span="24" class="main">
               <el-col :span="24" class="maintop">
                 <span>项目成果({{ total }})</span>
-                <span @click="fanhui">返回活动首页></span>
+                <span @click="back">返回活动首页></span>
               </el-col>
               <el-col :span="24" class="mianbottom">
                 <el-col :span="24" class="all"><span>全部</span> </el-col>
@@ -22,13 +22,20 @@
                   <el-button
                     size="mini"
                     type="success"
-                    @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: id, user_id: user_id } })"
+                    @click="$router.push({ path: '/live/hall/dock/dockDetail', query: { id: item.id, dockid: dock_id, user_id: user_id } })"
                     >对接</el-button
                   >
                 </el-col>
               </el-col>
               <el-col class="page" :span="24">
-                <el-pagination background layout="total,prev, pager, next,jumper" :total="total" @current-change="handleCurrentChange"> </el-pagination>
+                <el-pagination
+                  @current-change="handleCurrentChange"
+                  :current-page="currentPage"
+                  layout="total, prev, pager, next, jumper"
+                  :total="total"
+                  :page-size="pageSize"
+                >
+                </el-pagination>
               </el-col>
             </el-col>
           </div>
@@ -40,33 +47,56 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: mapProduct } = createNamespacedHelpers('marketproduct');
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'technologyList',
   props: {},
   components: {},
   data: () => ({
     beijingPic: require('@a/live/top_3.png'),
-    total: 0,
+    applyList: [], //查询数据
+    currentPage: 1, //默认数据1
+    pageSize: 10, //每页显示数据数量
+    origin: [], //分割数据
     productList: [],
+    total: 0,
+    dock_id: '',
   }),
   created() {
+    this.$set(this, `dock_id`, this.$route.query.dockid);
     this.search();
   },
   methods: {
-    ...mapProduct({ mapProductQuery: 'newquery' }),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const type = this.totalType;
-      let res = await this.mapProductQuery({ skip, limit, totaltype: type });
-      this.$set(this, `productList`, res.data);
-      this.$set(this, `total`, res.total);
+    ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
+    async search() {
+      let res = await this.dockFetch(this.dock_id);
+      if (this.$checkRes(res)) {
+        let productList = res.data.apply.map(item => item.goodsList);
+        productList = _.flattenDeep(productList);
+        if (this.column_name == '技术') {
+          var jishuList = productList.filter(item => item.totaltype === '0');
+          this.$set(this, `applyList`, jishuList);
+          this.$set(this, `total`, jishuList.length);
+        } else if (this.column_name == '产品') {
+          var jishuList = productList.filter(item => item.totaltype === '1');
+          this.$set(this, `applyList`, jishuList);
+          this.$set(this, `total`, jishuList.length);
+        } else if (this.column_name == '服务') {
+          var jishuList = productList.filter(item => item.totaltype === '2');
+          this.$set(this, `applyList`, jishuList);
+          this.$set(this, `total`, jishuList.length);
+        }
+      }
     },
-    fanhui() {
-      history.back();
+    searchPage(page = 1) {
+      this.$set(this, `productList`, this.origin[page - 1]);
     },
-    handleCurrentChange(val) {
-      console.log(`当前页: ${val}`);
-      this.search({ skip: (val - 1) * 10, limit: 10 });
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+    // 返回
+    back() {
+      history.back();
     },
   },
   computed: {
@@ -74,22 +104,23 @@ export default {
     pageTitle() {
       return `${this.$route.meta.title}`;
     },
-    totalType() {
-      const column_name = this.$route.query.column_name;
-      let type;
-      if (column_name === '技术') {
-        type = 0;
-      } else if (column_name === '产品') {
-        type = 1;
-      } else if (column_name === '服务') {
-        type = 2;
-      }
-      return type;
+    column_name() {
+      return this.$route.query.column_name;
     },
   },
   metaInfo() {
     return { title: this.$route.meta.title };
   },
+  watch: {
+    applyList: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchPage();
+      },
+    },
+  },
 };
 </script>
 

+ 1 - 2
src/views/hallList/parts/list.vue

@@ -49,13 +49,12 @@ export default {
     },
     // 跳转
     async linkBtn(id) {
-      // console.log(this.user.uid);
-
       if (this.user.uid) {
         if (
           this.user.role == '2' ||
           this.user.role == '3' ||
           this.user.role == '4' ||
+          this.user.role == '5' ||
           this.user.role == '6' ||
           this.user.role == '7' ||
           this.user.role == '8'