소스 검색

排行榜分页修改

lidongze 2 년 전
부모
커밋
238dcad92d
1개의 변경된 파일16개의 추가작업 그리고 3개의 파일을 삭제
  1. 16 3
      src/main/vue/src/views/MetaRankDetailList.vue

+ 16 - 3
src/main/vue/src/views/MetaRankDetailList.vue

@@ -77,10 +77,12 @@ export default {
         this.$http.get('/metaGameBoxPoints/getType').then(res => {
             this.gameBoxTypes = res;
         });
+        this.id = this.$route.query.id;
     },
     mixins: [pageableTable],
     data() {
         return {
+            id: '',
             type: 0,
             gameBoxTypes: [],
             multipleMode: false,
@@ -96,8 +98,12 @@ export default {
     },
     methods: {
         beforeGetData() {
-            if (this.$route.query.id === '2') {
-                return { query: { id: this.$route.query.id, type: this.type } };
+            if (this.$route.query.id === undefined ? this.id : this.$route.query.id === '2') {
+                return {
+                    query: { id: this.$route.query.id === undefined ? this.id : this.$route.query.id, type: this.type }
+                };
+            } else {
+                return { query: { id: this.$route.query.id === undefined ? this.id : this.$route.query.id } };
             }
         },
         toggleMultipleMode(multipleMode) {
@@ -111,7 +117,14 @@ export default {
             this.$axios
                 .get('/metaRank/excel/rank', {
                     responseType: 'blob',
-                    params: { size: 10000, query: { id: this.$route.query.id, del: false, type: this.type } }
+                    params: {
+                        size: 10000,
+                        query: {
+                            id: this.$route.query.id === undefined ? this.id : this.$route.query.id,
+                            del: false,
+                            type: this.type
+                        }
+                    }
                 })
                 .then(res => {
                     console.log(res);