guhongwei hace 4 años
padre
commit
e415e9c214

+ 3 - 3
src/layout/market/exportDetails.vue

@@ -7,10 +7,10 @@
         </el-col>
         <el-col :span="24" class="message">
           <el-col :span="24" class="one">
-            <el-image :src="exportInfo.img_path"></el-image>
+            <el-image :src="exportInfo.expertimage"></el-image>
             <p>
-              <span>{{ exportInfo.name }}</span>
-              <span>{{ exportInfo.email }}</span>
+              <span>{{ exportInfo.name || '暂无' }}</span>
+              <span>{{ exportInfo.email || '暂无' }}</span>
             </p>
           </el-col>
           <el-col :span="24" class="two">

+ 6 - 0
src/router/index.js

@@ -39,6 +39,12 @@ const routes = [
     meta: { title: '科技超市详情', isleftarrow: true },
     component: () => import('../views/market/productDetail.vue'),
   },
+  {
+    path: '/market/exportDetail',
+    name: 'market_exportDetail',
+    meta: { title: '专家详情', isleftarrow: true },
+    component: () => import('../views/market/exportDetail.vue'),
+  },
   // // 绑定
   // {
   //   path: '/bind',

+ 1 - 1
src/views/live/index.vue

@@ -39,7 +39,7 @@ export default {
   components: {
     NavBar,
     footInfo,
-    // liveList, //直播列表
+    liveList, //直播列表
   },
   data: function() {
     return {

+ 188 - 42
src/views/market/exportDetail.vue

@@ -6,7 +6,84 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <exportDetails :exportInfo="exportInfo"></exportDetails>
+          <el-col :span="24" class="top">
+            <el-image :src="beijing"></el-image>
+          </el-col>
+          <el-col :span="24" class="message">
+            <el-col :span="24" class="one">
+              <el-image :src="exportInfo.expertimage"></el-image>
+              <p>
+                <span>{{ exportInfo.name || '暂无' }}</span>
+                <span>{{ exportInfo.email || '暂无' }}</span>
+              </p>
+            </el-col>
+            <el-col :span="24" class="two">
+              <van-tabs v-model="active" type="card" animated>
+                <van-tab title="基本资料">
+                  <el-col :span="24" class="basic">
+                    <p>
+                      <span>工作单位</span>
+                      <span>{{ exportInfo.company || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>毕业院校</span>
+                      <span>{{ exportInfo.school || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>最高学历</span>
+                      <span>{{ exportInfo.education || '暂无' }}</span>
+                    </p>
+
+                    <p>
+                      <span>出生日期</span>
+                      <span>{{ exportInfo.birthDate || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>职务职称</span>
+                      <span>{{ exportInfo.zwzc || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>QQ/微信</span>
+                      <span>{{ exportInfo.qqwx || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>电子邮箱</span>
+                      <span>{{ exportInfo.email || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>擅长领域</span>
+                      <span>{{ exportInfo.expertise || '暂无' }}</span>
+                    </p>
+                  </el-col>
+                </van-tab>
+                <van-tab title="工作经历">
+                  <el-col :span="24" class="resume">
+                    <p>{{ exportInfo.workexperience || '暂无' }}</p>
+                  </el-col>
+                </van-tab>
+                <van-tab title="技术能力">
+                  <el-col :span="24" class="basic">
+                    <p>
+                      <span>科研综述</span>
+                      <span>{{ exportInfo.scientific || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>承担项目</span>
+                      <span>{{ exportInfo.undertakingproject || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>科技奖励</span>
+                      <span>{{ exportInfo.scienceaward || '暂无' }}</span>
+                    </p>
+                    <p>
+                      <span>社会任职</span>
+                      <span>{{ exportInfo.social || '暂无' }}</span>
+                    </p>
+                  </el-col>
+                </van-tab>
+              </van-tabs>
+            </el-col>
+          </el-col>
         </el-col>
       </el-col>
     </el-row>
@@ -15,61 +92,52 @@
 
 <script>
 import NavBar from '@/layout/common/topInfo.vue';
-import footInfo from '@/layout/common/footInfo.vue';
-import exportDetails from '@/layout/market/exportDetails.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
+const { mapActions: exportuser } = createNamespacedHelpers('exportuser');
 export default {
   name: 'exportDetail',
   props: {},
   components: {
     NavBar,
-    exportDetails, //专家详情
   },
-  data: () => ({
-    // 头部标题
-    title: '',
-    // meta为true
-    isleftarrow: '',
-    // 返回
-    navShow: true,
-    exportInfo: {},
-  }),
-  created() {
-    this.searchInfo();
+  data: function() {
+    return {
+      // 头部标题
+      title: '',
+      // meta为true
+      isleftarrow: '',
+      // 返回
+      navShow: true,
+      beijing: require('@/assets/test1.jpg'),
+      active: '1',
+      exportInfo: {},
+    };
   },
-  computed: {
-    id() {
-      return this.$route.query.id;
-    },
+  async created() {
+    if (this.id) {
+      await this.search();
+    }
   },
   methods: {
-    ...expertsuser(['fetch']),
-    async searchInfo() {
-      if (this.id) {
-        const res = await this.fetch(this.id);
-        if (this.$checkRes(res)) {
-          res.data.phone = this.phoneNumFilter(res.data.phone);
-          res.data.cardnumber = this.cardnumberNumFilter(res.data.cardnumber);
-          this.$set(this, `exportInfo`, res.data);
-        }
-      }
+    ...exportuser(['fetch']),
+    async search() {
+      let res = await this.fetch(this.id);
+      this.$set(this, `exportInfo`, res.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}`;
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
     },
   },
   mounted() {
     this.title = this.$route.meta.title;
     this.isleftarrow = this.$route.meta.isleftarrow;
   },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
 };
 </script>
 
@@ -83,11 +151,89 @@ export default {
 .top {
   height: 46px;
   overflow: hidden;
-  position: relative;
-  z-index: 999;
 }
 .main {
-  min-height: 600px;
+  min-height: 570px;
   background: #fff;
+  background: #fff;
+  .top {
+    height: 150px;
+    overflow: hidden;
+    .el-image {
+      height: 150px;
+      overflow: hidden;
+    }
+  }
+  .message {
+    position: relative;
+    top: -40px;
+    padding: 0 15px;
+    .one {
+      height: 80px;
+      height: 80px;
+      margin: 0 0 15px 0;
+
+      .el-image {
+        float: left;
+        width: 80px;
+        height: 80px;
+        border-radius: 90px;
+      }
+      p {
+        float: left;
+        width: 65%;
+        font-size: 18px;
+        padding: 0 15px;
+        span {
+          display: inline-block;
+          width: 100%;
+          padding: 9px 0px;
+        }
+      }
+    }
+    .two {
+      .basic {
+        font-size: 16px;
+        color: #000;
+        p {
+          padding: 0 10px;
+          min-height: 40px;
+          line-height: 40px;
+          border-bottom: 1px dashed #f6f6f6;
+          span:first-child {
+            display: inline-block;
+            width: 25%;
+            color: #cccccc;
+          }
+        }
+      }
+      .resume {
+        font-size: 16px;
+        padding: 10px;
+        p {
+          line-height: 30px;
+        }
+      }
+    }
+  }
+}
+/deep/.van-tabs--card > .van-tabs__wrap {
+  height: 40px;
+}
+/deep/.van-tabs__nav--card {
+  height: 40px;
+  border: 1px solid #ccc;
+  margin: 0;
+}
+/deep/.van-tabs__nav--card .van-tab {
+  color: #666;
+}
+/deep/.van-tabs__nav--card .van-tab.van-tab--active {
+  background: transparent;
+  color: #2c69fe;
+  font-weight: bold;
+}
+/deep/.van-tabs__nav--card .van-tab {
+  border-right: 1px solid #ccc;
 }
 </style>

+ 6 - 2
src/views/market/index.vue

@@ -17,7 +17,7 @@
               <business :list="businessList" @detailBtn="detailBtn"></business>
             </van-tab>
             <van-tab title="专家智库">
-              <expert :list="expertList"></expert>
+              <expert :list="expertList" @detailBtn="expertBtn"></expert>
             </van-tab>
           </van-tabs>
         </el-col>
@@ -90,10 +90,14 @@ export default {
       res = await this.expertquery({ skip: 0, status: '1' });
       if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
     },
-    // 成果详情
+    // 成果,需求,商务详情
     detailBtn(data) {
       this.$router.push({ path: '/market/productDetail', query: { id: data.id, type: data.type } });
     },
+    // 专家
+    expertBtn(data) {
+      this.$router.push({ path: '/market/exportDetail', query: { id: data.id } });
+    },
   },
   computed: {
     ...mapState(['user']),

+ 6 - 2
src/views/market/newparts/expert.vue

@@ -2,7 +2,7 @@
   <div id="expert">
     <el-row>
       <el-col :span="24" class="achieve">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detailBtn(item)">
           <el-col :span="6" class="image">
             <el-image v-if="item.expertimage != null || undefined" :src="item.expertimage"></el-image>
             <el-image :src="expertimage" v-else></el-image>
@@ -33,7 +33,11 @@ export default {
     };
   },
   created() {},
-  methods: {},
+  methods: {
+    detailBtn(data) {
+      this.$emit('detailBtn', data);
+    },
+  },
   computed: {
     ...mapState(['user']),
     pageTitle() {

+ 252 - 4
src/views/market/newparts/productInfo.vue

@@ -1,6 +1,201 @@
 <template>
   <div id="productInfo">
-    <p>productInfo</p>
+    <el-row>
+      <span v-if="type == '0'" class="one">
+        <el-col :span="24" class="top">
+          <el-carousel trigger="click" class="carousel">
+            <template v-if="info.image && info.image.length > 0">
+              <el-carousel-item v-for="(item, index) in info.image" :key="index">
+                <el-image :src="item.url" style="width:100%"> </el-image>
+              </el-carousel-item>
+            </template>
+            <template v-else>
+              <el-image :src="noimage"></el-image>
+            </template>
+          </el-carousel>
+        </el-col>
+        <el-col :span="24" class="message">
+          <p>
+            <span>产品名称</span>
+            <span>{{ info.name || '暂无' }}</span>
+          </p>
+          <p>
+            <span>需求方</span>
+            <span>{{ info.company || '暂无' }}</span>
+          </p>
+          <p>
+            <span>所属领域</span>
+            <span>{{ info.field || '暂无' }}</span>
+          </p>
+          <p>
+            <span>注册类型</span>
+            <span>{{ info.companytype || '暂无' }}</span>
+          </p>
+          <p>
+            <span>注册时间</span>
+            <span>{{ info.companydate || '暂无' }}</span>
+          </p>
+          <p>
+            <span>注册资金</span>
+            <span>{{ info.companycapital || '暂无' }}</span>
+          </p>
+          <p>
+            <span>投资预算</span>
+            <span>{{ info.budget || '暂无' }}</span>
+          </p>
+
+          <p>
+            <span>紧急程度</span>
+            <span>{{ info.degreeurgency || '暂无' }}</span>
+          </p>
+          <p>
+            <span>合作方式</span>
+            <span>{{ info.cooperation || '暂无' }}</span>
+          </p>
+          <p>
+            <span>联系人</span>
+            <span>{{ info.contacts || '暂无' }}</span>
+          </p>
+          <p>
+            <span>电子邮箱</span>
+            <span>{{ info.email || '暂无' }}</span>
+          </p>
+          <p>
+            <span>需求说明</span>
+            <span>{{ info.requirementdesc || '暂无' }}</span>
+          </p>
+          <p>
+            <span>预期目标</span>
+            <span>{{ info.expect || '暂无' }}</span>
+          </p>
+          <p>
+            <span>需求现状</span>
+            <span>{{ info.present || '暂无' }}</span>
+          </p>
+          <p>
+            <span>合作要求</span>
+            <span>{{ info.condition || '暂无' }}</span>
+          </p>
+        </el-col>
+      </span>
+      <span v-else-if="type == '1'" class="one">
+        <el-col :span="24" class="top">
+          <el-carousel trigger="click" class="carousel">
+            <template v-if="info.image && info.image.length > 0">
+              <el-carousel-item v-for="(item, index) in info.image" :key="index">
+                <el-image :src="item.url" style="width:100%"> </el-image>
+              </el-carousel-item>
+            </template>
+            <template v-else>
+              <el-image :src="noimage"></el-image>
+            </template>
+          </el-carousel>
+        </el-col>
+        <el-col :span="24" class="message">
+          <p>
+            <span>产品名称</span>
+            <span>{{ info.name || '暂无' }}</span>
+          </p>
+          <p>
+            <span>所属领域</span>
+            <span>{{ info.field || '暂无' }}</span>
+          </p>
+          <p>
+            <span>合作方式</span>
+            <span>{{ info.cooperation || '暂无' }}</span>
+          </p>
+          <p>
+            <span>成果状态</span>
+            <span>{{ info.achievestatus || '暂无' }}</span>
+          </p>
+          <p>
+            <span>成果来源</span>
+            <span>{{ info.achievesource || '暂无' }}</span>
+          </p>
+          <p>
+            <span>成果权属</span>
+            <span>{{ info.achieveown || '暂无' }}</span>
+          </p>
+          <p>
+            <span>意向价格</span>
+            <span>{{ info.intentionprice || '暂无' }}</span>
+          </p>
+          <p>
+            <span>联系人</span>
+            <span>{{ info.contacts || '暂无' }}</span>
+          </p>
+          <p>
+            <span>联系方式</span>
+            <span>{{ info.email }}/{{ info.qqwx || '暂无' }}</span>
+          </p>
+          <p>
+            <span>项目路演</span>
+            <el-link :href="info.roadshow" :underline="false">{{ info.roadshow ? '观看演示文件' : '暂无' }}</el-link>
+          </p>
+          <p>
+            <span>成果简介</span>
+            <span>{{ info.achievebrief || '暂无' }}</span>
+          </p>
+          <p>
+            <span>技术特点</span>
+            <span>{{ info.features || '暂无' }}</span>
+          </p>
+          <p>
+            <span>技术团队</span>
+            <span>{{ info.team || '暂无' }}</span>
+          </p>
+          <p>
+            <span>商业预期</span>
+            <span>{{ info.expectations || '暂无' }}</span>
+          </p>
+          <p>
+            <span>合作要求</span>
+            <span>{{ info.condition || '暂无' }}</span>
+          </p>
+        </el-col>
+      </span>
+      <span v-else-if="type == '2'" class="one">
+        <el-col :span="24" class="message">
+          <p>
+            <span>产品名称</span>
+            <span>{{ info.name || '暂无' }}</span>
+          </p>
+          <p>
+            <span>信息属性</span>
+            <span>{{ info.messattribute || '暂无' }}</span>
+          </p>
+          <p>
+            <span>需求程度</span>
+            <span>{{ info.demand || '暂无' }}</span>
+          </p>
+          <p>
+            <span>联系人</span>
+            <span>{{ info.contacts || '暂无' }}</span>
+          </p>
+          <p>
+            <span>联系方式</span>
+            <span>{{ info.qqwx || '暂无' }}</span>
+          </p>
+          <p>
+            <span>信息描述</span>
+            <span>{{ info.informationdesc || '暂无' }}</span>
+          </p>
+          <p>
+            <span>核心要素</span>
+            <span>{{ info.coreelements || '暂无' }}</span>
+          </p>
+
+          <p>
+            <span>价格信息</span>
+            <span>{{ info.priceinfo || '暂无' }}</span>
+          </p>
+          <p>
+            <span>商务预期</span>
+            <span>{{ info.businessexpect || '暂无' }}</span>
+          </p>
+        </el-col>
+      </span>
+    </el-row>
   </div>
 </template>
 
@@ -8,10 +203,15 @@
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'productInfo',
-  props: {},
+  props: {
+    info: { type: Object },
+    type: { type: String },
+  },
   components: {},
   data: function() {
-    return {};
+    return {
+      noimage: require('@/assets/noimage.jpg'),
+    };
   },
   created() {},
   methods: {},
@@ -27,4 +227,52 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.one {
+  .top {
+    background: #fff;
+    min-height: 220px;
+    padding: 0 15px;
+    margin: 0 0 10px 0;
+    .carousel {
+      height: 200px !important;
+      padding: 10px 0;
+    }
+    .el-image {
+      width: 100%;
+      height: 200px;
+    }
+    p {
+      font-size: 18px;
+      color: #000;
+      padding: 0 0 10px 0;
+    }
+  }
+  .message {
+    background: #fff;
+    padding: 0 15px;
+    min-height: 50px;
+    p {
+      min-height: 50px;
+      line-height: 50px;
+      border-bottom: 1px solid #ccc;
+    }
+    span:first-child {
+      display: inline-block;
+      width: 80px;
+      color: #ccc;
+    }
+    span:last-child {
+      color: #000;
+    }
+    div {
+      p {
+        border-bottom: none;
+      }
+    }
+  }
+}
+/deep/.el-carousel__container {
+  height: 200px !important;
+}
+</style>

+ 4 - 2
src/views/market/productDetail.vue

@@ -6,7 +6,7 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <productInfo :info="productInfo"></productInfo>
+          <productInfo :info="productInfo" :type="protype"></productInfo>
         </el-col>
       </el-col>
     </el-row>
@@ -34,9 +34,11 @@ export default {
       // 返回
       navShow: true,
       productInfo: {},
+      protype: '',
     };
   },
   created() {
+    this.$set(this, `protype`, this.type);
     if (this.type === '0') this.$set(this, `title`, '科技需求');
     else if (this.type === '1') this.$set(this, `title`, '技术成果');
     else if (this.type === '2') this.$set(this, `title`, '商务服务');
@@ -46,7 +48,7 @@ export default {
     ...product(['fetch']),
     async search() {
       let res = await this.fetch(this.id);
-      console.log(res);
+      if (this.$checkRes(res)) this.$set(this, `productInfo`, res.data);
     },
   },
   computed: {