guhongwei 4 rokov pred
rodič
commit
836cd03782

+ 250 - 0
src/views/hall/productList/technologyList copy.vue

@@ -0,0 +1,250 @@
+<template>
+  <div id="technologyList">
+    <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">
+                <span>项目成果({{ total }})</span>
+                <span @click="back">返回活动首页></span>
+              </el-col>
+              <el-col :span="24" class="mianbottom">
+                <el-col :span="24" class="all"><span>全部</span> </el-col>
+                <el-col :span="24" class="list" v-for="(item, index) in productList" :key="index">
+                  <span>{{ item.name }}</span>
+                  <span>{{ item.contact_user }}</span>
+                  <el-button
+                    size="mini"
+                    type="success"
+                    @click="
+                      $router.push({
+                        path: '/live/hall/dock/dockDetail',
+                        query: { id: item._id, dockid: dock_id, user_id: user_id, type: item.type },
+                      })
+                    "
+                    >对接</el-button
+                  >
+                </el-col>
+              </el-col>
+              <el-col class="page" :span="24">
+                <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 { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+export default {
+  name: 'technologyList',
+  props: {},
+  components: {},
+  data: () => ({
+    beijingPic: require('@a/live/top_3.png'),
+    applyList: [], //查询数据
+    currentPage: 1, //默认数据1
+    pageSize: 10, //每页显示数据数量
+    origin: [], //分割数据
+    productList: [],
+    total: 0,
+    dock_id: '',
+    dockInfo: {},
+    user_id: '',
+  }),
+  created() {
+    this.$set(this, `dock_id`, this.$route.query.dockid);
+    this.search();
+  },
+  methods: {
+    ...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
+    async search() {
+      let res = await this.dockFetch(this.dock_id);
+      this.$set(this, `dockInfo`, res.data);
+      // 对接会创建人id
+      this.$set(this, `user_id`, res.data.user_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.type === '0');
+          this.$set(this, `applyList`, jishuList);
+          this.$set(this, `total`, jishuList.length);
+        } else if (this.column_name == '技术成果') {
+          var jishuList = productList.filter(item => item.type === '1');
+          this.$set(this, `applyList`, jishuList);
+          this.$set(this, `total`, jishuList.length);
+        } else if (this.column_name == '商务服务') {
+          var jishuList = productList.filter(item => item.type === '2');
+          this.$set(this, `applyList`, jishuList);
+          this.$set(this, `total`, jishuList.length);
+        }
+      }
+    },
+    searchPage(page = 1) {
+      this.$set(this, `productList`, this.origin[page - 1]);
+    },
+    handleCurrentChange(currentPage) {
+      this.searchPage(currentPage);
+    },
+    // 返回
+    back() {
+      history.back();
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+    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>
+
+<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;
+}
+
+.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: 800px;
+  border-radius: 10px;
+  border: 1px solid #ccc;
+  background: #fff;
+  padding: 30px 20px;
+}
+.maintop {
+  border-bottom: 4px solid rgb(240, 240, 240);
+  padding: 0 0 5px 0;
+}
+.maintop span:first-child {
+  display: inline-block;
+  background-color: #d80000;
+  width: 140px;
+  color: #fff;
+  text-align: center;
+  font-size: 16px;
+  height: 50px;
+  line-height: 50px;
+}
+.maintop span:nth-child(2) {
+  float: right;
+  line-height: 50px;
+  cursor: pointer;
+}
+.all {
+  border-bottom: 1px solid rgb(200, 200, 200);
+  margin: 10px 0;
+}
+.all span {
+  border: 1px #f90 solid;
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+  background: #f90;
+  color: #fff;
+  width: 60px;
+  height: 40px;
+  line-height: 40px;
+  display: inline-block;
+  text-align: center;
+  margin-left: 8px;
+}
+.list {
+  border-bottom: 1px #ccc dashed;
+  height: 50px;
+  line-height: 50px;
+  padding: 0 20px;
+}
+.list:nth-child(2n) {
+  background: #f2f2f2;
+}
+.list span:first-child {
+  float: left;
+  width: 664px;
+  font-size: 14px;
+}
+.list span:nth-child(2) {
+  float: left;
+  width: 200px;
+  font-size: 14px;
+  padding-left: 20px;
+}
+.list .el-button {
+  float: right;
+  margin-top: 12px;
+}
+.page {
+  margin: 20px 0;
+  text-align: center;
+}
+</style>

+ 126 - 144
src/views/hall/productList/technologyList.vue

@@ -2,46 +2,63 @@
   <div id="technologyList">
     <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">
-                <span>项目成果({{ total }})</span>
-                <span @click="back">返回活动首页></span>
+          </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="mianbottom">
-                <el-col :span="24" class="all"><span>全部</span> </el-col>
-                <el-col :span="24" class="list" v-for="(item, index) in productList" :key="index">
-                  <span>{{ item.name }}</span>
-                  <span>{{ item.contact_user }}</span>
-                  <el-button
-                    size="mini"
-                    type="success"
-                    @click="
-                      $router.push({
-                        path: '/live/hall/dock/dockDetail',
-                        query: { id: item._id, dockid: dock_id, user_id: user_id, type: item.type },
-                      })
-                    "
-                    >对接</el-button
+              <el-col :span="24" class="infoList">
+                <el-col :span="24" class="list">
+                  <el-col :span="24" class="productList" v-for="(item, index) in productList" :key="index">
+                    <el-col :span="18" class="name textOver">
+                      {{ item.name }}
+                    </el-col>
+                    <el-col :span="3" class="contacts textOver">
+                      {{ item.contacts }}
+                    </el-col>
+                    <el-col :span="2" class="btn">
+                      <el-button
+                        type="primary"
+                        size="mini"
+                        @click="
+                          $router.push({
+                            path: '/live/hall/dock/dockDetail',
+                            query: { id: item._id, dockid: dock_id, user_id: user_id, type: item.type },
+                          })
+                        "
+                        >对接</el-button
+                      >
+                    </el-col>
+                  </el-col>
+                </el-col>
+                <el-col class="page" :span="24">
+                  <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 class="page" :span="24">
-                <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>
@@ -135,116 +152,81 @@ 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;
-}
-
 .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: 800px;
-  border-radius: 10px;
-  border: 1px solid #ccc;
-  background: #fff;
-  padding: 30px 20px;
-}
-.maintop {
-  border-bottom: 4px solid rgb(240, 240, 240);
-  padding: 0 0 5px 0;
-}
-.maintop span:first-child {
-  display: inline-block;
-  background-color: #d80000;
-  width: 140px;
-  color: #fff;
-  text-align: center;
-  font-size: 16px;
-  height: 50px;
-  line-height: 50px;
-}
-.maintop span:nth-child(2) {
-  float: right;
-  line-height: 50px;
-  cursor: pointer;
-}
-.all {
-  border-bottom: 1px solid rgb(200, 200, 200);
-  margin: 10px 0;
-}
-.all span {
-  border: 1px #f90 solid;
-  border-top-left-radius: 3px;
-  border-top-right-radius: 3px;
-  background: #f90;
-  color: #fff;
-  width: 60px;
-  height: 40px;
-  line-height: 40px;
-  display: inline-block;
-  text-align: center;
-  margin-left: 8px;
-}
-.list {
-  border-bottom: 1px #ccc dashed;
-  height: 50px;
-  line-height: 50px;
-  padding: 0 20px;
-}
-.list:nth-child(2n) {
-  background: #f2f2f2;
-}
-.list span:first-child {
-  float: left;
-  width: 664px;
-  font-size: 14px;
-}
-.list span:nth-child(2) {
-  float: left;
-  width: 200px;
-  font-size: 14px;
-  padding-left: 20px;
-}
-.list .el-button {
-  float: right;
-  margin-top: 12px;
-}
-.page {
-  margin: 20px 0;
-  text-align: center;
+  .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;
+    }
+    .two {
+      text-align: center;
+      font-size: 30px;
+      color: #fff;
+      margin: 0 0 30px 0;
+    }
+  }
+  .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;
+          .productList {
+            padding: 10px;
+            .name {
+              font-size: 18px;
+              font-weight: bold;
+            }
+            .contacts {
+              font-size: 16px;
+            }
+            .btn {
+              text-align: right;
+              padding: 0 10px;
+            }
+          }
+          .productList:nth-child(2n) {
+            background-color: #f1f1f1;
+          }
+        }
+        .page {
+          text-align: center;
+          padding: 10px 0;
+        }
+      }
+    }
+  }
 }
 </style>