guhongwei 4 年之前
父節點
當前提交
dc9dd441d0
共有 4 個文件被更改,包括 154 次插入59 次删除
  1. 2 3
      src/layout/technical/eduDetail.vue
  2. 130 0
      src/layout/technical/luyanDetail.vue
  3. 10 45
      src/views/technical/index.vue
  4. 12 11
      src/views/technical/list.vue

+ 2 - 3
src/layout/technical/eduDetail.vue

@@ -29,6 +29,7 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: news } = createNamespacedHelpers('news');
+const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
 export default {
   name: 'eduDetail',
   props: {
@@ -50,10 +51,8 @@ export default {
     this.search();
   },
   methods: {
-    ...news(['fetch']),
+    ...newsguidance(['fetch']),
     async search() {
-      console.log(this.newsid);
-
       const res = await this.fetch(this.newsid);
       this.$set(this, `detailinfo`, res.data);
     },

+ 130 - 0
src/layout/technical/luyanDetail.vue

@@ -0,0 +1,130 @@
+<template>
+  <div id="eduDetail" style="background-color: #F5F5F54f;">
+    <div class="w_0100">
+      <div class="w_1200">
+        <div class="detailmain">
+          <div class="detailtop">
+            <span>{{ detailinfo.title }}</span>
+          </div>
+          <div class="detailtopleft">
+            <span>时间:{{ detailinfo.publish_time }}&nbsp;&nbsp;&nbsp;&nbsp;来源:{{ detailinfo.orgin }}</span>
+          </div>
+          <div class="detailimage" v-if="detailinfo.picture">
+            <img :src="detailinfo.picture" class="detailimg" />
+          </div>
+          <div class="detailVideo">
+            <video :src="detailinfo.filepath" controls="controls">
+              您的浏览器不支持 video 标签。
+            </video>
+          </div>
+          <div class="detailcontext">
+            <p v-html="detailinfo.content"></p>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: news } = createNamespacedHelpers('news');
+const { mapActions: newsroadshow } = createNamespacedHelpers('newsroadshow');
+export default {
+  name: 'eduDetail',
+  props: {
+    newsid: null,
+  },
+  components: {},
+  data: () => {
+    return {
+      img: {
+        top_bg: require('@/assets/live/top_bg.png'),
+        logo: require('@/assets/live/logo.png'),
+        img1: require('@/assets/live/1.jpg'),
+      },
+      detailinfo: {},
+      videoUrl: require('@/assets/video.mp4'),
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...newsroadshow(['fetch']),
+    async search() {
+      const res = await this.fetch(this.newsid);
+      this.$set(this, `detailinfo`, res.data);
+    },
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+@import '~@/style/style.css';
+.w_1200 {
+  width: 95%;
+  margin: 0 auto;
+}
+.detailmain {
+  min-height: 500px;
+}
+
+.detailtop {
+  padding: 20px 0px;
+  font-size: 18px;
+  line-height: 40px;
+  font-weight: normal;
+  text-align: left;
+  margin: 0;
+  text-align: center;
+  color: #005293;
+}
+
+.detailtopleft {
+  text-align: center;
+  padding: 0 0 10px 0;
+  border-bottom: 1px solid #ccc;
+  font-size: 16px;
+  color: #666666;
+}
+
+.detailimage {
+  text-align: center;
+  padding: 20px 0 0 0;
+}
+.detailVideo {
+  float: left;
+  width: 100%;
+  text-align: center;
+  height: 400px;
+  overflow: hidden;
+  margin: 20px 0;
+}
+.detailVideo video {
+  height: 400px;
+  width: 50%;
+  border: 1px dashed #ccc;
+}
+
+.detailimg {
+  width: 500px;
+  height: 300px;
+}
+
+.detailcontext {
+  padding: 20px 0;
+}
+</style>

+ 10 - 45
src/views/technical/index.vue

@@ -1,30 +1,6 @@
 <template>
   <div id="technical">
     <el-col :span="24" class="main">
-      <!-- <el-col :span="12" class="left">
-        <el-col :span="24" class="downLeftTop">
-          <el-image :src="downLeftTopImage"></el-image>
-          <span class="topText">
-            <span>专题研讨</span>
-            <span
-              ><p>S</p>
-              <p>eminar</p></span
-            >
-            <span @click="turnToList('专题研讨')">更多</span>
-          </span>
-        </el-col>
-        <el-col :span="24" class="infoLeft">
-          <el-col class="infoLeftList" :span="24" v-for="(item, index) in zhuantiList" :key="index">
-            <p>{{ item.publish_time }}</p>
-            <p>
-              <span @click="$router.push({ path: '/technical/list', query: { id: item.id, display: 2, column_name: '专题研讨' } })" class="textOver">{{
-                item.title
-              }}</span>
-              <span>{{ item.titlejj }}</span>
-            </p>
-          </el-col>
-        </el-col>
-      </el-col> -->
       <el-col :span="12" class="left">
         <el-col :span="24" class="downLeftTop">
           <el-image :src="downLeftTopImage"></el-image>
@@ -39,7 +15,7 @@
         </el-col>
         <el-col :span="24" class="infoLeft">
           <el-col :span="24" class="infoLeft">
-            <el-col class="infoLeftList" :span="24" v-for="(item, index) in jishuList" :key="index">
+            <el-col class="infoLeftList" :span="24" v-for="(item, index) in zhuanjiaList" :key="index">
               <p>{{ item.publish_time }}</p>
               <p></p>
               <p>
@@ -50,16 +26,6 @@
               </p>
             </el-col>
           </el-col>
-
-          <!-- 
-          <el-col class="infoRightList" :span="24" v-for="(item, index) in jishuList" :key="index">
-            <p>
-              <span class="textOver" @click="$router.push({ path: '/technical/list', query: { id: item.id, display: 3, column_name: '专家问诊' } })">{{
-                item.title
-              }}</span
-              ><span class="textOver">{{ item.publish_time }}</span>
-            </p>
-          </el-col> -->
         </el-col>
       </el-col>
       <el-col :span="12" class="right">
@@ -144,6 +110,8 @@ import _ from 'lodash';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: column } = createNamespacedHelpers('column');
 const { mapActions: news } = createNamespacedHelpers('news');
+const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
+const { mapActions: newsroadshow } = createNamespacedHelpers('newsroadshow');
 export default {
   name: 'technical',
   props: {},
@@ -151,10 +119,8 @@ export default {
   data: () => ({
     downLeftTopImage: require('@/assets/live/square_big.png'),
     jishuImage: require('@/assets/live/main3.png'),
-    zhuantiList: [],
-    jishuList: [],
+    zhuanjiaList: [],
     hangyeList: [],
-    jiaoyuList: [],
     zhidaolist: [],
     luyanlist: [],
   }),
@@ -173,6 +139,8 @@ export default {
   methods: {
     ...column({ columnList: 'query', columnInfo: 'fetch' }),
     ...news({ newsList: 'query' }),
+    ...newsguidance({ danceQuery: 'query' }),
+    ...newsroadshow({ adshowQuery: 'query' }),
     async searchInfo({ ...info } = {}) {
       const res = await this.columnList({ ...info });
       for (const val of res.data) {
@@ -180,20 +148,17 @@ export default {
       }
     },
     async tpxwSearch({ column_id, column_name, site } = {}) {
-      if (column_name == '专题研讨') {
-        const res = await this.newsList({ skip: 0, limit: 5, column_id: column_id });
-        if (this.$checkRes(res)) this.$set(this, `zhuantiList`, res.data);
-      } else if (column_name == '专家问诊') {
+      if (column_name == '专家问诊') {
         const res = await this.newsList({ skip: 0, limit: 8, column_id: column_id });
-        if (this.$checkRes(res)) this.$set(this, `jishuList`, res.data);
+        if (this.$checkRes(res)) this.$set(this, `zhuanjiaList`, res.data);
       } else if (column_name == '行业研究') {
         const res = await this.newsList({ skip: 0, limit: 8, column_id: column_id });
         if (this.$checkRes(res)) this.$set(this, `hangyeList`, res.data);
       } else if (column_name == '在线指导') {
-        const res = await this.newsList({ skip: 0, limit: 8, column_id: column_id });
+        const res = await this.danceQuery({ skip: 0, limit: 8, column_id: column_id });
         if (this.$checkRes(res)) this.$set(this, `zhidaolist`, res.data);
       } else if (column_name == '项目路演') {
-        const res = await this.newsList({ skip: 0, limit: 5, column_id: column_id });
+        const res = await this.adshowQuery({ skip: 0, limit: 5, column_id: column_id });
         if (this.$checkRes(res)) this.$set(this, `luyanlist`, res.data);
       }
     },

+ 12 - 11
src/views/technical/list.vue

@@ -76,6 +76,9 @@
       <el-col :span="19" v-if="display == 4" class="info">
         <eduDetail :newsid="newsid"></eduDetail>
       </el-col>
+      <el-col :span="19" v-if="display == 5" class="info">
+        <luyanDetail :newsid="newsid"></luyanDetail>
+      </el-col>
     </el-col>
   </div>
 </template>
@@ -85,8 +88,11 @@ import _ from 'lodash';
 import semDetail from '@/layout/technical/semDetail.vue';
 import detail from '@/layout/technical/detail.vue';
 import eduDetail from '@/layout/technical/eduDetail.vue';
+import luyanDetail from '@/layout/technical/luyanDetail.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: news } = createNamespacedHelpers('news');
+const { mapActions: newsguidance } = createNamespacedHelpers('newsguidance');
+const { mapActions: newsroadshow } = createNamespacedHelpers('newsroadshow');
 export default {
   name: 'list',
   props: {},
@@ -94,6 +100,7 @@ export default {
     semDetail,
     detail,
     eduDetail,
+    luyanDetail,
   },
   data: () => ({
     newsid: '',
@@ -120,10 +127,6 @@ export default {
     id() {
       return this.$route.query.id;
     },
-
-    // display() {
-    //   return this.$route.query.display;
-    // },
     pageTitle() {
       return `${this.$route.meta.title}`;
     },
@@ -134,6 +137,8 @@ export default {
 
   methods: {
     ...news(['query']),
+    ...newsguidance({ danceQuery: 'query' }),
+    ...newsroadshow({ adshowQuery: 'query' }),
     async searchList({ skip = 0, limit = 10, ...info } = {}) {
       if (this.$route.query.column_name == '专家问诊') {
         this.changeMenu(this.$route.query.column_name, 0);
@@ -164,11 +169,11 @@ export default {
         this.$set(this, `exportList`, res.data);
       } else if (name == '在线指导') {
         this.pageSize = 10;
-        res = await this.query({ skip, limit, column_name: '在线指导', ...info });
+        res = await this.danceQuery({ skip, limit, column_name: '在线指导', ...info });
         this.$set(this, `hangyeList`, res.data);
       } else if (name == '项目路演') {
         this.pageSize = 5;
-        res = await this.query({ skip, limit, column_name: '项目路演', ...info });
+        res = await this.adshowQuery({ skip, limit, column_name: '项目路演', ...info });
         this.$set(this, `jiaoyuList`, res.data);
       }
       this.$set(this, `pageTotal`, res.total);
@@ -180,17 +185,13 @@ export default {
       }
       this.initList({ name: name, skip: (val - 1) * this.limit, limit: this.limit });
     },
-
     async search() {
       this.display = this.$route.query.display;
-
       this.newsid = this.id;
     },
     clickzhuanti(id) {
-      // this.$router.push({ path: '/live/semDetail', query: { id: id } });
       this.display = '3';
       this.newsid = id;
-      console.log(this.display);
     },
     clickjishu(id) {
       this.display = '3';
@@ -202,7 +203,7 @@ export default {
     },
 
     clickjiaoyu(id) {
-      this.display = '3';
+      this.display = '5';
       this.newsid = id;
     },
   },