Sfoglia il codice sorgente

钻取表分页问题修复

zhulizhen1111 4 anni fa
parent
commit
e04b8b2afd

+ 7 - 5
src/views/equipment/table/eqDetaileDialog.vue

@@ -126,7 +126,7 @@ export default {
                 { id: 'test3', name: '下级分项' },
                 { id: 'test4', name: '滑动平均滑动平均' }
             ],
-            page: 1,
+           // page: 1,
             size: 10,
             total: 1,
             sbjc: '',
@@ -149,7 +149,7 @@ export default {
     computed: {
         ...mapGetters(['floorSelect'])
     },
-    props: ['row', 'major'],
+    props: ['row', 'major','sonpage'],
     mounted() {
         this.queryTableList()
         this.tabFind()
@@ -164,7 +164,9 @@ export default {
         },
         //序号的方法
         indexMethod(index) {
-            return (this.page - 1) * this.size + index + 1
+            if(this.sonpage){
+                return (this.sonpage - 1) * this.size + index + 1
+            }   
         },
         //多余输入框监听
         confirm(fws, manufacturer) {
@@ -231,7 +233,7 @@ export default {
             })
         },
         pageChanged(page) {
-            this.page = page
+            this.sonpage = page
             this.queryTableList()
         },
         queryTableList() {
@@ -252,7 +254,7 @@ export default {
             let data = {
                 major: major,
                 plazaId: this.$store.state.plazaId,
-                page: this.page,
+                page: this.sonpage,
                 size: this.size
             }
             //输入框搜索

+ 3 - 1
src/views/equipment/table/eqListTable.vue

@@ -88,7 +88,7 @@
             :visible.sync='innerVisible'
             append-to-body
         >
-            <eq-detail ref='qdDialog' :row='row' :major='major'></eq-detail>
+            <eq-detail ref='qdDialog' :row='row' :major='major' :sonpage='sonpage'></eq-detail>
         </el-dialog>
     </div>
 </template>
@@ -106,6 +106,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
+            sonpage:1,
             size: 10,
             innerVisible: false, //详情弹框
             keyword: '',
@@ -130,6 +131,7 @@ export default {
             this.type_name = row.type_name
             this.innerVisible = true
             this.row = row
+            this.sonpage = 1
         },
         pageChanged(page) {
             this.currentPage = page

+ 3 - 1
src/views/equipment/table/standTable.vue

@@ -80,7 +80,7 @@
         </div>
         <!-- 标准表格详情钻取表 -->
         <el-dialog width='90%' style='height:900px;overflow: hidden;' :title='`${InfoName}-${type_name}`' :visible.sync='innerVisible' append-to-body>
-            <eq-detail ref='qdDialog' :row='row' :major='major'></eq-detail>
+            <eq-detail ref='qdDialog' :row='row' :major='major' :sonpage='sonpage'></eq-detail>
         </el-dialog>
     </div>
 </template>
@@ -99,6 +99,7 @@ export default {
             tableData: [],
             total: 0,
             currentPage: 1,
+            sonpage:1,
             size: 10,
             keyword: '',
             floor: '1',
@@ -123,6 +124,7 @@ export default {
             this.type_name = row.type_name
             this.innerVisible = true
             this.row = row
+            this.sonpage = 1
         },
         pageChanged(page, size) {
             this.currentPage = page