guhongwei 4 năm trước cách đây
mục cha
commit
f38f804484

+ 261 - 0
src/views/hall/productList/expertList copy.vue

@@ -0,0 +1,261 @@
+<template>
+  <div id="dockDetail">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-image :src="beijingPic"></el-image>
+        <el-col :span="24" class="info">
+          <div class="w_1200">
+            <el-col :span="24" class="top">
+              <p>{{ dockInfo.title }}</p>
+              <p>主办方:{{ dockInfo.sponsor }}</p>
+            </el-col>
+            <el-col :span="24" class="main">
+              <el-col :span="24" class="mainTop">
+                <el-col :span="21" class="expert"
+                  ><div>专家数量:{{ total || 0 }}人</div></el-col
+                >
+                <el-col :span="3" class="back" @click.native="back">返回活动首页></el-col>
+              </el-col>
+              <el-col :span="24">
+                <el-col :span="24" v-for="(item, index) in list" :key="index" class="list">
+                  <el-col :span="24"
+                    ><el-col :span="22">{{ item.name }}</el-col
+                    ><el-col :span="2" style="text-align: right;">
+                      <el-button type="success" @click="zhuanjiaduijies(item)" size="mini">对接</el-button>
+                    </el-col>
+                  </el-col>
+                </el-col>
+              </el-col>
+              <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>
+            </el-col>
+          </div>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import _ from 'lodash';
+import page from '@/components/pagination.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
+export default {
+  name: 'dockDetail',
+  props: {},
+  components: {},
+  data: () => ({
+    beijingPic: require('@a/live/top_3.png'),
+    display: '1',
+    detailInfo: {},
+    scope: '123',
+    resume: '123',
+    dialogVisible: false,
+
+    dialogTableVisible: false,
+    room: {},
+    limit: 10,
+
+    dock_id: '',
+    dockInfo: {},
+    tableData: [],
+    total: 0,
+    // 分页
+    currentPage: 1,
+    pageSize: 10,
+    origin: [],
+    list: [],
+  }),
+  created() {
+    this.$set(this, `dock_id`, this.$route.query.dockid);
+    this.search();
+  },
+  methods: {
+    ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
+    ...expertsuser({ expertQuery: 'query' }),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      let res = await this.dockFetch(this.dock_id);
+      this.$set(this, `dockInfo`, res.data);
+      let exportdata = await this.expertQuery({ skip, ...info });
+      if (this.$checkRes(exportdata)) {
+        if (this.dockInfo.room_id == '1001') {
+          let newRes = exportdata.data.filter(
+            i =>
+              i.company == '中科院长春分院' ||
+              i.company == '中国科学院东北地理与农业生态研究所' ||
+              i.company == '中国科学院长春应用化学研究所' ||
+              i.company == '中科院长春光学精密机械与物理研究所'
+          );
+          if (newRes) {
+            this.$set(this, `tableData`, newRes);
+            this.$set(this, `total`, newRes.length);
+          }
+        } else if (this.dockInfo.room_id == '1002') {
+          let newRes = exportdata.data.filter(f => f.company.includes('吉林大学'));
+          if (newRes) {
+            this.$set(this, `tableData`, newRes);
+            this.$set(this, `total`, newRes.length);
+          }
+        }
+      }
+    },
+    searchList(page = 1) {
+      this.$set(this, `list`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.searchList(currentPage);
+    },
+    back() {
+      this.$router.push({ path: '/hall/direct', query: { id: this.dockid } });
+    },
+    zhuanjiaduijies(item) {
+      this.$router.push({ path: '/live/hall/dock/zhanjiaduijie', query: { id: item.id, dockid: this.dockid } });
+    },
+  },
+  watch: {
+    tableData: {
+      immediate: true,
+      deep: true,
+      handler(val) {
+        if (val && val.length > 0) this.$set(this, `origin`, _.chunk(val, this.pageSize));
+        this.searchList();
+      },
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    dockid() {
+      return this.$route.query.dockid;
+    },
+
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  // beforeDestroy() {
+  //   this.killTalk();
+  // },
+  beforeRouteLeave(to, from, next) {
+    // this.killTalk();
+    next();
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+p {
+  padding: 0;
+  margin: 0;
+}
+.textOver {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+// .textOver{}
+// 	overflow: hidden;
+// 	text-overflow: ellipsis;
+// 	-webkit-line-clamp: 3;
+// 	word-break: break-all;
+// 	display: -webkit-box;
+//   -webkit-box-orient: vertical;
+//   }
+.style {
+  height: 100vh;
+}
+.style .info {
+  position: relative;
+  top: -450px;
+}
+.style .top {
+  position: relative;
+  top: 0;
+  width: 100%;
+  text-align: center;
+  z-index: 999;
+  height: 172px;
+  margin: 0 0 20px 0;
+}
+.style .top p:first-child {
+  font-size: 50px;
+  color: #fff;
+}
+.style .top p:last-child {
+  font-size: 30px;
+  color: #fff;
+  position: absolute;
+  width: 100%;
+  top: 135px;
+}
+.style .main {
+  min-height: 600px;
+  // border: 1px solid red;
+  background: #fff;
+  padding: 20px 20px;
+  .mainTop {
+    border-bottom: 10px solid #ccc;
+    margin-bottom: 20px;
+    .expert {
+      div {
+        background-color: red;
+        text-align: center;
+        color: #fff;
+        height: 40px;
+        width: 100px;
+        line-height: 40px;
+        // border-bottom: 10px solid #ccc;
+      }
+    }
+    .back {
+      height: 40px;
+      line-height: 40px;
+      float: right;
+      padding: 0 0 0px 37px;
+    }
+  }
+  .maintitle {
+    border-bottom: 1px #ccc solid;
+    .title {
+      height: 40px;
+      line-height: 40px;
+      width: 60px;
+      text-align: center;
+      border: 1px #f90 solid;
+      background: #f90;
+      color: #fff;
+      margin: 0 0 0 10px;
+    }
+  }
+  .list {
+    border-bottom: 1px #ccc dashed;
+    height: 50px;
+    line-height: 50px;
+    padding: 0 30px;
+    overflow: hidden;
+  }
+  .list:nth-child(2n) {
+    background: #f2f2f2;
+  }
+}
+.page {
+  text-align: center;
+  padding: 15px 0;
+}
+</style>

+ 101 - 121
src/views/hall/productList/expertList.vue

@@ -2,40 +2,47 @@
   <div id="dockDetail">
     <el-row>
       <el-col :span="24" class="style">
-        <el-image :src="beijingPic"></el-image>
-        <el-col :span="24" class="info">
+        <el-col :span="24" class="top">
           <div class="w_1200">
-            <el-col :span="24" class="top">
-              <p>{{ dockInfo.title }}</p>
-              <p>主办方:{{ dockInfo.sponsor }}</p>
+            <el-col :span="24" class="one">
+              {{ dockInfo.title }}
+            </el-col>
+            <el-col :span="24" class="two">
+              <span>主办方:</span>
+              <span>{{ dockInfo.sponsor }}</span>
             </el-col>
-            <el-col :span="24" class="main">
-              <el-col :span="24" class="mainTop">
-                <el-col :span="21" class="expert"
-                  ><div>专家数量:{{ total || 0 }}人</div></el-col
-                >
-                <el-col :span="3" class="back" @click.native="back">返回活动首页></el-col>
+          </div>
+        </el-col>
+        <el-col :span="24" class="info">
+          <div class="w_1200 ">
+            <el-col :span="24" class="infoSty">
+              <el-col :span="24" class="infoTop">
+                <el-col :span="12" class="left">
+                  <span>专家数量:{{ total || 0 }}人 </span>
+                </el-col>
+                <el-col :span="12" class="right">
+                  <el-button type="primary" size="mini" @click="back">返回活动首页</el-button>
+                </el-col>
               </el-col>
-              <el-col :span="24" class="maintitle"><el-col :span="2" class="title">全部</el-col></el-col>
-              <el-col :span="24">
-                <el-col :span="24" v-for="(item, index) in list" :key="index" class="list">
-                  <el-col :span="24"
-                    ><el-col :span="22">{{ item.name }}</el-col
-                    ><el-col :span="2" style="text-align: right;">
+              <el-col :span="24" class="infoList">
+                <el-col :span="24" class="list">
+                  <el-col :span="24" v-for="(item, index) in list" :key="index" class="dataList">
+                    <el-col :span="22" class="name textOver">{{ item.name }}</el-col>
+                    <el-col :span="2" style="text-align: right;">
                       <el-button type="success" @click="zhuanjiaduijies(item)" size="mini">对接</el-button>
                     </el-col>
                   </el-col>
                 </el-col>
-              </el-col>
-              <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 :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>
               </el-col>
             </el-col>
           </div>
@@ -157,106 +164,79 @@ export default {
 </script>
 
 <style lang="less" scoped>
-.w_1200 {
-  width: 1200px;
-  margin: 0 auto;
-}
-p {
-  padding: 0;
-  margin: 0;
-}
-.textOver {
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}
-// .textOver{}
-// 	overflow: hidden;
-// 	text-overflow: ellipsis;
-// 	-webkit-line-clamp: 3;
-// 	word-break: break-all;
-// 	display: -webkit-box;
-//   -webkit-box-orient: vertical;
-//   }
 .style {
-  height: 100vh;
-}
-.style .info {
-  position: relative;
-  top: -450px;
-}
-.style .top {
-  position: relative;
-  top: 0;
-  width: 100%;
-  text-align: center;
-  z-index: 999;
-  height: 172px;
-  margin: 0 0 20px 0;
-}
-.style .top p:first-child {
-  font-size: 50px;
-  color: #fff;
-}
-.style .top p:last-child {
-  font-size: 30px;
-  color: #fff;
-  position: absolute;
-  width: 100%;
-  top: 135px;
-}
-.style .main {
-  min-height: 600px;
-  // border: 1px solid red;
-  background: #fff;
-  padding: 20px 20px;
-  .mainTop {
-    border-bottom: 10px solid #ccc;
-    margin-bottom: 20px;
-    .expert {
-      div {
-        background-color: red;
-        text-align: center;
-        color: #fff;
-        height: 40px;
-        width: 100px;
-        line-height: 40px;
-        // border-bottom: 10px solid #ccc;
-      }
-    }
-    .back {
-      height: 40px;
-      line-height: 40px;
-      float: right;
-      padding: 0 0 0px 37px;
+  .top {
+    background: url('~@/assets/dock/top.png');
+    height: 480px;
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+    .one {
+      text-align: center;
+      font-size: 40px;
+      color: #fff;
+      padding: 6% 8% 0 10%;
+      height: 190px;
+      margin: 0 0 30px 0;
     }
-  }
-  .maintitle {
-    border-bottom: 1px #ccc solid;
-    .title {
-      height: 40px;
-      line-height: 40px;
-      width: 60px;
+    .two {
       text-align: center;
-      border: 1px #f90 solid;
-      background: #f90;
+      font-size: 30px;
       color: #fff;
-      margin: 0 0 0 10px;
+      margin: 0 0 30px 0;
     }
   }
-  .list {
-    border-bottom: 1px #ccc dashed;
-    height: 50px;
-    line-height: 50px;
-    padding: 0 30px;
-    overflow: hidden;
-  }
-  .list:nth-child(2n) {
-    background: #f2f2f2;
+  .info {
+    position: relative;
+    top: -140px;
+    .infoSty {
+      border-radius: 5px;
+      box-shadow: 0 0 5px #ccc;
+      background-color: #fff;
+      min-height: 500px;
+      .infoTop {
+        height: 50px;
+        line-height: 50px;
+        border-bottom: 3px solid #ccc;
+        .left {
+          span {
+            background: #ff0000;
+            color: #fff;
+            padding: 13px 10px;
+            font-size: 18px;
+            font-weight: bold;
+          }
+        }
+        .right {
+          text-align: right;
+          padding: 0 10px;
+        }
+      }
+      .infoList {
+        .list {
+          height: 480px;
+          overflow: hidden;
+          .dataList {
+            padding: 10px;
+            .name {
+              font-weight: bold;
+            }
+          }
+          .dataList:nth-child(2n) {
+            background-color: #f1f1f1;
+          }
+          .dataList:hover {
+            cursor: pointer;
+            .name {
+              color: #409eff;
+            }
+          }
+        }
+        .page {
+          text-align: center;
+          padding: 10px 0;
+        }
+      }
+    }
   }
 }
-.page {
-  text-align: center;
-  padding: 15px 0;
-}
 </style>