wxy před 4 roky
rodič
revize
55c84dec3f

+ 13 - 7
src/views/market/detail.vue

@@ -19,7 +19,7 @@
             <serveDetail :info="info"></serveDetail>
           </span>
           <span v-else>
-            <expertDetail></expertDetail>
+            <expertDetail :info="info"></expertDetail>
           </span>
         </el-col>
       </el-col>
@@ -41,6 +41,7 @@ import serveDetail from './detailParts/serveDetail.vue';
 //专家智库详情
 import expertDetail from './detailParts/expertDetail.vue';
 const { mapActions: product } = createNamespacedHelpers('product');
+const { mapActions: exportuser } = createNamespacedHelpers('exportuser');
 export default {
   metaInfo() {
     return { title: this.$route.meta.title };
@@ -78,17 +79,22 @@ export default {
   },
   methods: {
     ...product(['fetch']),
+    ...exportuser({ exportFetch: 'fetch' }),
     //查详情
     async search() {
       if (this.type == '4') {
         console.log('专利');
         return;
-      }
-      const res = await this.fetch(this.id);
-      // console.log(res.data);
-      if (this.$checkRes(res)) {
-        this.$set(this, `info`, res.data);
-        // console.log(this.info);
+      } else if (this.type == '0' || this.type == '1' || this.type == '2') {
+        const res = await this.fetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `info`, res.data);
+        }
+      } else {
+        const res = await this.exportFetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `info`, res.data);
+        }
       }
     },
     //设置标题

+ 192 - 6
src/views/market/detailParts/expertDetail.vue

@@ -1,8 +1,86 @@
 <template>
   <div id="expertDetail">
     <el-row>
-      <el-col :span="24">
-        <p>expertDetail</p>
+      <el-col :span="24" class="expertDetail">
+        <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 v-if="info.expertimage != null || undefined" :src="info.expertimage"></el-image>
+            <el-image :src="expertimage" v-else></el-image>
+            <p>
+              <span>{{ info.name || '暂无' }}</span>
+              <span>{{ info.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>{{ info.company || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>毕业院校</span>
+                    <span>{{ info.school || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>最高学历</span>
+                    <span>{{ info.education || '暂无' }}</span>
+                  </p>
+
+                  <p>
+                    <span>出生日期</span>
+                    <span>{{ info.birthDate || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>职务职称</span>
+                    <span>{{ info.zwzc || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>QQ/微信</span>
+                    <span>{{ getphone(info.qqwx) || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>电子邮箱</span>
+                    <span>{{ info.email || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>擅长领域</span>
+                    <span>{{ info.expertise || '暂无' }}</span>
+                  </p>
+                </el-col>
+              </van-tab>
+              <van-tab title="工作经历">
+                <el-col :span="24" class="resume">
+                  <p>{{ info.workexperience || '暂无' }}</p>
+                </el-col>
+              </van-tab>
+              <van-tab title="技术能力">
+                <el-col :span="24" class="basic">
+                  <p>
+                    <span>科研综述</span>
+                    <span>{{ info.scientific || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>承担项目</span>
+                    <span>{{ info.undertakingproject || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>科技奖励</span>
+                    <span>{{ info.scienceaward || '暂无' }}</span>
+                  </p>
+                  <p>
+                    <span>社会任职</span>
+                    <span>{{ info.social || '暂无' }}</span>
+                  </p>
+                </el-col>
+              </van-tab>
+            </van-tabs>
+          </el-col>
+        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -15,17 +93,125 @@ export default {
     return { title: this.$route.meta.title };
   },
   name: 'expertDetail',
-  props: {},
+  props: { info: { type: Object } },
   components: {},
   data: function() {
-    return {};
+    return {
+      beijing: require('@/assets/test1.jpg'),
+      expertimage: require('@/assets/222.png'),
+      active: '1',
+    };
   },
   created() {},
-  methods: {},
+  methods: {
+    // 隐藏手机号
+    getphone(value) {
+      if (value == undefined) {
+        return '暂无';
+      } else {
+        if (value.length === 11 || value.length === 12) {
+          let start = value.slice(0, 4);
+          let end = value.slice(-3);
+          return `${start}****${end}`;
+        } else if (value.length === 20) {
+          let start = value.slice(0, 13);
+          let end = value.slice(-3);
+          return `${start}****${end}`;
+        } else {
+          return value;
+        }
+      }
+    },
+  },
   computed: {
     ...mapState(['user']),
   },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.expertDetail {
+  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>

+ 1 - 3
src/views/market/detailParts/tecDetail.vue

@@ -109,9 +109,7 @@ export default {
       noimage: require('@/assets/noimage.jpg'),
     };
   },
-  created() {
-    console.log(this.info);
-  },
+  created() {},
   methods: {},
   computed: {
     ...mapState(['user']),