guhongwei 3 years ago
parent
commit
ba6eab1af4

+ 14 - 8
src/router/index.js

@@ -102,6 +102,13 @@ const live = [
     meta: { title: '直播大厅-展会详情', subSite: true },
     component: () => import('../views/achieveLive/detail.vue'),
   },
+  {
+    path: '/achieveLive/model/dataIndex',
+    name: 'personalLive_model_dataIndex',
+    meta: { title: '直播大厅-数据列表', subSite: true },
+    component: () => import('../views/achieveLive/model/data-index.vue'),
+  },
+
   // {
   //   path: '/achieveLive/expert/index',
   //   name: 'achieveLive_expert',
@@ -111,7 +118,7 @@ const live = [
   // {
   //   path: '/achieveLive/expert/detail',
   //   name: 'achieveLive_detail',
-  //   meta: { title: '直播大厅-对接专家', subSite: true },
+  //   meta: { title: '直播大厅-专家详情', subSite: true },
   //   component: () => import('../views/achieveLive/expert/detail.vue'),
   // },
   // {
@@ -126,13 +133,12 @@ const live = [
   //   meta: { title: '直播大厅-对接项目', subSite: true },
   //   component: () => import('../views/achieveLive/product/detail.vue'),
   // },
-  {
-    path: '/achieveLive/news/detail',
-    name: 'achieveLive_news_detail',
-    meta: { title: '直播大厅-嘉宾访谈,项目路演', subSite: true },
-    component: () => import('../views/achieveLive/news/detail.vue'),
-  },
-
+  // {
+  //   path: '/achieveLive/news/detail',
+  //   name: 'achieveLive_news_detail',
+  //   meta: { title: '直播大厅-嘉宾访谈,项目路演', subSite: true },
+  //   component: () => import('../views/achieveLive/news/detail.vue'),
+  // },
   {
     path: '/website',
     name: 'website',

+ 3 - 1
src/views/achieveLive/detail/expertData.vue

@@ -66,7 +66,9 @@ export default {
     // 对接
     trans(data) {},
     // 查看更多项目
-    moreBtn() {},
+    moreBtn() {
+      this.$router.push({ path: '/achieveLive/model/dataIndex', query: { dock_id: this.dock_id, viewType: 'expert' } });
+    },
   },
   computed: {
     ...mapState(['user']),

+ 1 - 1
src/views/achieveLive/detail/jiabinData.vue

@@ -53,7 +53,7 @@ export default {
     },
     // 详情
     detail(data) {
-      this.$router.push({ path: '/achieveLive/news/detail', query: { dock_id: this.dock_id, id: data.id, type: '0' } });
+      this.$router.push({ path: '/achieveLive/model/dataIndex', query: { dock_id: this.dock_id, id: data.id, type: '0', viewType: 'news' } });
     },
   },
   computed: {

+ 3 - 1
src/views/achieveLive/detail/productData.vue

@@ -82,7 +82,9 @@ export default {
     // 对接
     trans(data, type) {},
     // 查看更多项目
-    moreBtn(type) {},
+    moreBtn(type) {
+      this.$router.push({ path: '/achieveLive/model/dataIndex', query: { dock_id: this.dock_id, type: type, viewType: 'product' } });
+    },
   },
   computed: {
     ...mapState(['user']),

+ 1 - 1
src/views/achieveLive/detail/top.vue

@@ -104,7 +104,7 @@ export default {
 .main {
   .one {
     background: url('~@common/src/assets/live/dock_top.png');
-    height: 480px;
+    height: 430px;
     background-repeat: no-repeat;
     background-size: 100% 100%;
     .one_1 {

+ 1 - 1
src/views/achieveLive/detail/xiangmuData.vue

@@ -56,7 +56,7 @@ export default {
     // 查看详情
     // 详情
     detail(data) {
-      this.$router.push({ path: '/achieveLive/news/detail', query: { dock_id: this.dock_id, id: data.id, type: '1' } });
+      this.$router.push({ path: '/achieveLive/model/dataIndex', query: { dock_id: this.dock_id, id: data.id, type: '1', viewType: 'news' } });
     },
   },
   computed: {

+ 38 - 0
src/views/achieveLive/expert/index.vue

@@ -0,0 +1,38 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        专家列表
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 47 - 0
src/views/achieveLive/model/data-index.vue

@@ -0,0 +1,47 @@
+<template>
+  <div id="data-index">
+    <data-slot>
+      <component :is="model"></component>
+    </data-slot>
+  </div>
+</template>
+
+<script>
+import dataSlot from './data-slot.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'data-index',
+  props: {},
+  components: {
+    dataSlot,
+    modelexpert: () => import('../expert/index.vue'),
+    modelproduct: () => import('../product/index.vue'),
+    modelnews: () => import('../news/index.vue'),
+  },
+  data: function() {
+    return {};
+  },
+  created() {
+    console.log(this.viewType);
+  },
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    model() {
+      return `model${this.$route.query.viewType}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 71 - 0
src/views/achieveLive/model/data-slot.vue

@@ -0,0 +1,71 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <top :info="info"></top>
+        </el-col>
+        <el-col :span="24" class="two">
+          <div class="w_1200">
+            <slot></slot>
+          </div>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from '../detail/top.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+export default {
+  name: 'index',
+  props: {},
+  components: {
+    top,
+  },
+  data: function() {
+    return {
+      info: {},
+    };
+  },
+  created() {
+    if (this.dock_id) this.search();
+  },
+  methods: {
+    ...dock(['fetch']),
+    async search() {
+      let res = await this.fetch(this.dock_id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    dock_id() {
+      return this.$route.query.dock_id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .two {
+    position: relative;
+    top: -15px;
+  }
+}
+</style>

src/views/achieveLive/news/detail.vue → src/views/achieveLive/news/index copy.vue


+ 164 - 0
src/views/achieveLive/news/index.vue

@@ -0,0 +1,164 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <el-col :span="12" class="left">
+            <span>{{ type == '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="two">
+          <el-col :span="24" class="title">
+            {{ detailInfo.title }}
+          </el-col>
+          <el-col :span="24" class="other">
+            <span>发布时间:{{ detailInfo.publish_time || '暂无' }}</span>
+            <span>信息来源:{{ detailInfo.origin || '暂无' }}</span>
+          </el-col>
+          <el-col :span="24" class="image" v-if="detailInfo.picture">
+            <el-image :src="detailInfo.picture"></el-image>
+          </el-col>
+          <el-col :span="24" class="video" v-if="detailInfo.filepath">
+            <video :src="detailInfo.filepath" controls="controls">
+              您的浏览器不支持 video 标签。
+            </video>
+          </el-col>
+          <el-col :span="24" class="content">
+            <p v-html="detailInfo.content"></p>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: interview } = createNamespacedHelpers('interview');
+const { mapActions: roadShow } = createNamespacedHelpers('roadShow');
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {
+      detailInfo: {},
+    };
+  },
+  created() {
+    if (this.id) this.search();
+  },
+  methods: {
+    ...interview({ interviewFetch: 'fetch' }),
+    ...roadShow({ roadShowFetch: 'fetch' }),
+    async search() {
+      if (this.type == '0') {
+        let res = await this.interviewFetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `detailInfo`, res.data);
+        }
+      } else if (this.type == '1') {
+        let res = await this.roadShowFetch(this.id);
+        if (this.$checkRes(res)) {
+          this.$set(this, `detailInfo`, res.data);
+        }
+      }
+    },
+    back() {
+      this.$router.push({ path: '/achieveLive/detail', query: { dock_id: this.dock_id } });
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    dock_id() {
+      return this.$route.query.dock_id;
+    },
+    id() {
+      return this.$route.query.id;
+    },
+    type() {
+      return this.$route.query.type;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  min-height: 505px;
+  box-shadow: 0 0 5px #ccc;
+  background-color: #fff;
+  padding: 20px;
+  .one {
+    margin: 0 0 10px 0;
+    height: 40px;
+    overflow: hidden;
+    border-bottom: 2px solid #666;
+    .left {
+      span {
+        display: inline-block;
+        background: #ff0000;
+        color: #fff;
+        height: 40px;
+        line-height: 40px;
+        padding: 0px 10px;
+        font-weight: bold;
+      }
+    }
+    .right {
+      text-align: right;
+    }
+  }
+  .two {
+    .title {
+      text-align: center;
+      font-size: 30px;
+      font-weight: bold;
+      padding: 15px 0;
+    }
+    .other {
+      text-align: center;
+      font-size: 14px;
+      color: #666;
+      padding: 0 0 15px 0;
+      span {
+        padding: 0 0 0 10px;
+      }
+    }
+    .image {
+      text-align: center;
+      height: 300px;
+      overflow: hidden;
+      margin: 0 0 15px 0;
+      .el-image {
+        width: 50%;
+        height: 300px;
+      }
+    }
+    .video {
+      text-align: center;
+      margin: 0 0 15px 0;
+      height: 300px;
+      overflow: hidden;
+      video {
+        width: 50%;
+        height: 300px;
+        background-color: #000000;
+      }
+    }
+  }
+}
+</style>

+ 38 - 0
src/views/achieveLive/product/index.vue

@@ -0,0 +1,38 @@
+<template>
+  <div id="index">
+    <el-row>
+      <el-col :span="24" class="main">
+        产品列表
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'index',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped></style>