瀏覽代碼

帮助文档增加培训视频入口

cxmo 1 年之前
父節點
當前提交
4e2eca87b3
共有 3 個文件被更改,包括 35 次插入3 次删除
  1. 二進制
      src/assets/img/video-pic.png
  2. 4 1
      src/layouts/Index.vue
  3. 31 2
      src/views/help/Index.vue

二進制
src/assets/img/video-pic.png


+ 4 - 1
src/layouts/Index.vue

@@ -3,7 +3,7 @@
 
 <template>
     <div class="layout-wrap">
-        <div class="header">
+        <div class="header" :class="[$route.path==='/help/index'?'has-min-width':'']">
             <template v-if="!['/video/detail','/video/list'].includes($route.path)">
                 <div class="logo">
                     <img src="~@/assets/img/logo.png"/>
@@ -41,6 +41,9 @@
         align-items: center;
         box-sizing: border-box;
         padding:0 20px;
+        &.has-min-width{
+            min-width: 1000px;
+        }
         .logo{
             width:200px;
             img{

+ 31 - 2
src/views/help/Index.vue

@@ -4,9 +4,9 @@ import subMenuBox from "./components/subMenuBox.vue"
 import menuBox from "./components/menubox.vue"
 import {apiGetHelpDocClassify,apiGetHelpDocDetail} from "@/api/helpApi.js"
 import {ref,nextTick,onMounted,onUnmounted } from 'vue'
-import {useRoute} from 'vue-router'
+import {useRoute,useRouter} from 'vue-router'
 const route = useRoute()
-
+const router = useRouter()
 const documentData=ref([])
 const currentNodeKey=ref('')
 const defaultActiveId=ref(0)
@@ -174,6 +174,15 @@ const scrollChange=()=>{
         currentNodeKey.value=''
     }
 }
+function toVideoPage(){
+    const routerEl = router.resolve({
+        path:'/video/list',
+        query:{
+            bus_code:businessCode
+        }
+    })
+    window.open(routerEl.href,'_blank')
+}
 </script>
 
 <template>
@@ -210,6 +219,8 @@ const scrollChange=()=>{
           <div class="text">编辑研报/插入图表</div>
         </div>
       </div>
+      <!-- 培训视频入口 -->
+      <img src="@/assets/img/video-pic.png" class="banner-pic" @click="toVideoPage">
     </div>
     <div class="operation-document-body" id="operation-document-body">
       <div class="document-body-left">
@@ -272,6 +283,7 @@ const scrollChange=()=>{
       display: flex;
       align-items: center;
       justify-content: center;
+      position: relative;
       .banner-image{
         height: 140px;
         width: 250px;
@@ -303,6 +315,23 @@ const scrollChange=()=>{
         width: 40px;
         margin: 0 10px;
       }
+      .banner-pic{
+        width:123px;
+        height: 106px;
+        position:absolute;
+        top:50%;
+        right:5%;
+        transform: translateY(-50%);
+        z-index: 2;
+        cursor: pointer;
+        @media screen and (max-width:1560px){
+            top:auto;
+            transform: none;
+            left:10px;
+            bottom: -54px;
+        }
+
+      }
     }
     .operation-document-body{
       width: 100%;