Ver código fonte

适应性培训线下课程

空白格 2 anos atrás
pai
commit
0dcde9332a

+ 17 - 1
src/api/AdaptiveTraining/index.js

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-12 17:34:57
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-25 11:39:24
+ * @LastEditTime: 2022-08-25 16:13:25
  * @FilePath: \veterans_client_web\src\api\AdaptiveTraining\index.js
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  */
@@ -107,3 +107,19 @@ export function getOfflineTrainingList(params) {
     params,
   });
 }
+
+/**
+ * 获取适应性培训线下课程详情
+ * @param {*} params
+ * @returns
+ */
+export function getOfflineTrainingDetails(params) {
+  return request({
+    url: "/app/adaptTrainOffline/getDetail/" + params.id,
+    method: "get",
+    headers: {
+      noLoginFlag: true,
+    },
+    params,
+  });
+}

+ 9 - 0
src/router/index.js

@@ -149,6 +149,15 @@ const routes = [
           title: '线上课程详情'
         }
       },
+      {
+        path: 'adaptivetraining/offlinecoursedetails',
+        name: 'OfflineCourseDetailsIndex',
+        component: () =>
+          import('@/views/AdaptiveTraining/OfflineCourseDetails/OfflineCourseDetailsIndex.vue'),
+        meta: {
+          title: '线下课程详情'
+        }
+      },
       {
         path: 'personalcenter',
         name: 'PersonalCenterIndex',

+ 6 - 1
src/views/AdaptiveTraining/AdaptiveTrainingIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-12 15:23:44
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-25 09:40:14
+ * @LastEditTime: 2022-08-25 16:11:24
  * @FilePath: \veterans_client_web\src\views\AdaptiveTraining\AdaptiveTrainingIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -111,6 +111,11 @@
             class="atcl-item"
             v-for="(item, index) in offlineObj.list"
             :key="index"
+            @click="
+              jumpPage('/adaptivetraining/offlinecoursedetails', {
+                id: item.id,
+              })
+            "
           >
             <div class="atcl-item-offline">
               <p class="name">{{ item.adaptName || "-" }}</p>

+ 155 - 0
src/views/AdaptiveTraining/OfflineCourseDetails/OfflineCourseDetailsIndex.vue

@@ -0,0 +1,155 @@
+<!--
+ * @Description: 线下课程详情
+ * @Author: 空白格
+ * @Date: 2022-08-24 10:44:26
+ * @LastEditors: 空白格
+ * @LastEditTime: 2022-08-25 16:15:08
+ * @FilePath: \veterans_client_web\src\views\AdaptiveTraining\OfflineCourseDetails\OfflineCourseDetailsIndex.vue
+ * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
+-->
+<template>
+  <div class="app-main details">
+    <BannerBreadcrumb title="线下课程" :isRouter="true" />
+    <div class="app-main-box details-box">
+      <div class="app-main-box-content details-box-content">
+        <div class="details-box-content-title">
+          {{ detainsInfo.adaptName || "-" }}
+        </div>
+        <div class="details-box-content-subtitle">
+          <span>({{ detainsInfo.adaptAddress }})</span>
+        </div>
+        <div class="details-box-content-des">
+          <div class="dbcd-content" v-html="detainsInfo.adaptPlan"></div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import BannerBreadcrumb from "@/components/BannerBreadcrumb";
+import { getOfflineTrainingDetails } from "@/api/AdaptiveTraining";
+export default {
+  name: "WorkGuideDetailsIndex",
+  components: {
+    BannerBreadcrumb,
+  },
+  data() {
+    return {
+      detainsInfo: {},
+      id: undefined,
+    };
+  },
+  created() {
+    const { id } = this.$route.query;
+    if (id) {
+      this.id = id;
+      this.getDetails();
+    }
+  },
+  methods: {
+    /**
+     * 获取详情
+     * @date 2022-08-25
+     * @returns {any}
+     */
+    getDetails() {
+      getOfflineTrainingDetails({ id: this.id }).then((res) => {
+        if (res.code === 200) {
+          this.detainsInfo = res?.data;
+        }
+      });
+    },
+    /**
+     * 预览pdf
+     * @date 2022-08-25
+     * @param {any} pdfUrl
+     * @returns {any}
+     */
+    previewPdf(pdfUrl) {
+      if (pdfUrl) {
+        window.open('http://www.gjtool.cn/pdfh5/pdf.html?file=' + pdfUrl)
+      }
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.details {
+  &-box {
+    margin: 0 auto;
+    &-content {
+      &-title {
+        padding: 10px 0;
+        text-align: center;
+        font-size: 24px;
+        color: #1a1a1a;
+        border-bottom: 1px solid #d5d5d5;
+      }
+      &-subtitle {
+        text-align: center;
+        margin: 20px 0 40px;
+        font-size: 14px;
+        color: #999999;
+        span {
+          &:last-child {
+            margin-left: 40px;
+          }
+        }
+        .no-reply {
+          color: #ef6622;
+        }
+        .has-reply {
+          color: #3ca7fe;
+        }
+      }
+      &-des {
+        .dbcd-label {
+          font-size: 20px;
+          color: #1a1a1a;
+          margin-bottom: 20px;
+          font-family: SourceHanSansCN;
+        }
+        .dbcd-content {
+          color: #666666;
+          font-size: 14px;
+        }
+      }
+      &-pdf {
+        text-align: center;
+        margin: 20px auto 30px;
+        div {
+          display: inline-block;
+          padding: 0 100px;
+          max-width: 700px;
+          cursor: pointer;
+          height: 50px;
+          line-height: 50px;
+          text-align: center;
+          font-size: 14px;
+          color: #008fff;
+          border: dashed 1px #0091ff;
+          border-radius: 5px;
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          word-break: break-all;
+        }
+      }
+      &-reply {
+        .dbcr-label {
+          font-size: 20px;
+          color: #1a1a1a;
+          margin-bottom: 20px;
+          font-family: SourceHanSansCN;
+        }
+        .dbcr-content {
+          color: #666666;
+          font-size: 14px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 2 - 2
src/views/WorkGuide/WorkGuideDetails/WorkGuideDetailsIndex.vue

@@ -3,7 +3,7 @@
  * @Author: 空白格
  * @Date: 2022-08-25 13:30:07
  * @LastEditors: 空白格
- * @LastEditTime: 2022-08-25 15:10:29
+ * @LastEditTime: 2022-08-25 16:04:15
  * @FilePath: \veterans_client_web\src\views\WorkGuide\WorkGuideDetails\WorkGuideDetailsIndex.vue
  * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
 -->
@@ -83,7 +83,7 @@ export default {
      */
     previewPdf(pdfUrl) {
       if (pdfUrl) {
-        window.open('https://www.gjtool.cn/pdfh5/pdf.html?file=' + pdfUrl)
+        window.open('http://www.gjtool.cn/pdfh5/pdf.html?file=' + pdfUrl)
       }
     }
   },