guhongwei 3 年 前
コミット
e789c1d7c2

+ 28 - 5
src/views/live/onAchieve/detail.vue

@@ -22,6 +22,11 @@
                 <project-frame @detail="detail"></project-frame>
               </van-col>
             </van-tab>
+            <van-tab title="特邀嘉宾">
+              <van-col span="24" class="downInfo" :style="{ height: client.height - 250 + 'px' }">
+                <expert-frame :height="client.height - 250" @detail="expertDel"></expert-frame>
+              </van-col>
+            </van-tab>
             <van-tab title="项目路演">
               <van-col span="24" class="downInfo" :style="{ height: client.height - 250 + 'px' }">
                 <readshow-frame></readshow-frame>
@@ -31,11 +36,14 @@
         </van-col>
       </template>
     </mobileMain>
-    <van-dialog v-model="projectShow" title="项目详情" :show-confirm-button="false" :close-on-click-overlay="true" :show-cancel-button="true">
+    <van-dialog v-model="projectShow" class="dialog_1" title="项目详情" :show-confirm-button="false" :close-on-click-overlay="true" :show-cancel-button="true">
       <techol-detail v-if="form.type == '0'" :form="form"></techol-detail>
       <achieve-detail v-else-if="form.type == '1'" :form="form"></achieve-detail>
       <service-detail v-else-if="form.type == '2'" :form="form"></service-detail>
     </van-dialog>
+    <van-dialog v-model="expertShow" class="dialog_2" title="专家详情" :show-confirm-button="false" :close-on-click-overlay="true" :show-cancel-button="true">
+      <expert-detail :form="expertForm"></expert-detail>
+    </van-dialog>
   </div>
 </template>
 
@@ -44,10 +52,13 @@ import videoFrame from './parts/video_1.vue';
 import imgtextFrame from './parts/imgtext_1.vue';
 import chatFrame from './parts/chat_1.vue';
 import projectFrame from './parts/project_1.vue';
+import expertFrame from './parts/expert_1.vue';
 import achieveDetail from '../../market/parts/detail_1.vue';
 import techolDetail from '../../market/parts/detail_3.vue';
 import serviceDetail from './project/techol.vue';
 import readshowFrame from './parts/readshow_1.vue';
+// 专家详情
+import expertDetail from '../../market/parts/detail_4.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: mapDock } = createNamespacedHelpers('dock');
 export default {
@@ -58,19 +69,24 @@ export default {
     imgtextFrame,
     chatFrame,
     projectFrame,
+    expertFrame,
     achieveDetail,
     techolDetail,
     serviceDetail,
     readshowFrame,
+    expertDetail,
   },
   data: function() {
     return {
       client: {},
       dockInfo: {},
-      active: 0,
+      active: 3,
       // 参展项目详情
       projectShow: false,
       form: {},
+      // 专家详情
+      expertShow: false,
+      expertForm: {},
     };
   },
   created() {
@@ -89,8 +105,10 @@ export default {
       this.$set(this, `form`, data);
       this.projectShow = true;
     },
-    confirm() {
-      console.log('1');
+    // 专家详情
+    expertDel(data) {
+      this.$set(this, `expertForm`, data);
+      this.expertShow = true;
     },
   },
   mounted() {
@@ -136,9 +154,14 @@ export default {
 /deep/.van-dialog__header {
   padding-top: 10px;
 }
-/deep/.van-dialog__content {
+/deep/.dialog_1 .van-dialog__content {
   height: 500px;
   overflow-y: auto;
   padding: 10px;
 }
+/deep/.dialog_2 .van-dialog__content {
+  height: 500px;
+  overflow: hidden;
+  padding: 10px;
+}
 </style>

+ 134 - 0
src/views/live/onAchieve/parts/expert_1.vue

@@ -0,0 +1,134 @@
+<template>
+  <div id="expert_1">
+    <van-row>
+      <van-col span="24" class="main" :style="{ height: height + 'px' }">
+        <van-col span="24" class="one" :style="{ height: height - 45 + 'px' }">
+          <van-col span="24" class="list" v-for="(item, index) in list" :key="index" @click.native="detail(item)">
+            <van-col span="6" class="left">
+              <van-image :src="item.img_path">
+                <template v-slot:error>加载失败</template>
+              </van-image>
+            </van-col>
+            <van-col span="18" class="right">
+              <van-col span="24" class="title">
+                {{ item.name }}
+              </van-col>
+              <van-col span="24" class="other">
+                <van-col span="24" class="otherInfo textOver">
+                  职务职称:<span>{{ item.zwzc || '暂无' }}</span>
+                </van-col>
+                <van-col span="24" class="otherInfo textOver">
+                  工作单位:<span>{{ item.company || '暂无' }}</span>
+                </van-col>
+              </van-col>
+            </van-col>
+          </van-col>
+        </van-col>
+        <van-col span="24" class="two">
+          <page :total="total" :limit="limit" @search="search"></page>
+        </van-col>
+      </van-col>
+    </van-row>
+  </div>
+</template>
+
+<script>
+import page from '@/layout/common/page.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: expert } = createNamespacedHelpers('expert');
+export default {
+  name: 'expert_1',
+  props: {
+    height: { type: Number },
+  },
+  components: {
+    page,
+  },
+  data: function() {
+    return {
+      list: [],
+      total: 0,
+      limit: '5',
+    };
+  },
+  created() {
+    if (this.id) this.search();
+  },
+  methods: {
+    ...expert(['query']),
+    async search({ skip = 0, limit = this.limit, ...info } = {}) {
+      info.company = '中科系';
+      let res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+    detail(data) {
+      this.$emit('detail', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    overflow-y: auto;
+    .list {
+      padding: 8px;
+      margin: 0 0 10px 0;
+      border-radius: 8px;
+      background-color: #fff;
+      .left {
+        text-align: center;
+        .van-image {
+          width: 80px;
+          height: 80px;
+        }
+        /deep/.van-image__img {
+          border-radius: 90px;
+        }
+      }
+      .right {
+        padding: 0 0 0 5px;
+        .title {
+          font-size: 16px;
+          font-weight: bold;
+          margin: 0 0 5px 0;
+        }
+        .other {
+          .otherInfo {
+            font-size: 14px;
+            color: #666;
+            margin: 0 0 5px 0;
+            span {
+              color: #000;
+            }
+          }
+        }
+      }
+    }
+  }
+  .two {
+    height: 45px;
+    overflow: hidden;
+  }
+}
+</style>

+ 1 - 1
src/views/market/parts/detail_4.vue

@@ -97,7 +97,7 @@ export default {
     .left {
       text-align: center;
       height: 140px;
-      line-height: 200px;
+      padding: 35px 0;
       .van-image {
         width: 70px;
         height: 70px;