jwyu 3 rokov pred
rodič
commit
2bcfc912ee
1 zmenil súbory, kde vykonal 11 pridanie a 2 odobranie
  1. 11 2
      src/view/ficc_yb/weekDetail.vue

+ 11 - 2
src/view/ficc_yb/weekDetail.vue

@@ -200,6 +200,11 @@
 // import CryptoJS from './utils/crypto'
 import { apiReportDetailWeek,apiReportDetail } from "@/api/ficc_yb/api.js";
 export default {
+    watch: {
+        '$route.query'(){
+            this.getDetail();
+        }
+    },
     computed: {
         topBgUrl() {
             if (this.$route.query.type == "week") {
@@ -240,6 +245,7 @@ export default {
         });
     },
     updated() {
+        document.body.scrollTop = document.documentElement.scrollTop = 0;
         $(".content-wrap")
             .find("img")
             .css({ display: "block", width: "100%", margin: "0 auto" });
@@ -247,6 +253,7 @@ export default {
     methods: {
         
         async getDetail() {
+            
             const res = await apiReportDetailWeek({
                 Authorization: this.$route.query.token,
                 research_report_type_id: this.$route.query.report_type_id
@@ -267,7 +274,9 @@ export default {
             })
             if(res.code===200){
                 this.list=res.data.research_report_type_list||[]
+                this.selectId=this.$route.query.report_type_id
             }
+            document.body.scrollTop = document.documentElement.scrollTop = 0;
         },
 
         showTips() {
@@ -280,7 +289,6 @@ export default {
         },
         selectTag(id) {  //底部章节跳转
 				 this.$router.push({
-                path:"/hzybReportWeekDetail",
                     query:{
                         report_type_id:id,
                         token:this.$route.query.token,
@@ -289,7 +297,8 @@ export default {
                 })
 //				window.location.href=process.env.linkurl + '#/dayweekdtls/'+this.bid+'/'+id+'/'+this.reporttype;
 				document.body.scrollTop = document.documentElement.scrollTop = 0;
-				window.location.reload();
+				// window.location.reload();
+                // this.getDetail();
 			},
     }
 };