Kaynağa Gözat

瓦斯巡检地点管理修改

lxh 2 ay önce
ebeveyn
işleme
da1178d323
1 değiştirilmiş dosya ile 9 ekleme ve 4 silme
  1. 9 4
      src/views/vent/gas/gasInspect/index.vue

+ 9 - 4
src/views/vent/gas/gasInspect/index.vue

@@ -45,7 +45,7 @@
                 </a-row>
             </div>
             <a-table :columns="columns" size="small" :data-source="tableData" :scroll="{ y: 500 }" class="tableW"
-                :pagination="pagination">
+                :pagination="pagination" @change="pageChange">
                 <template #action="{ record }">
                     <a class="table-action-link" @click="handlerEdit(record)">编辑</a>
                     <a class="table-action-link" @click="handlerDel(record)">删除</a>
@@ -212,15 +212,14 @@ let handlerTeam=()=>{
 async function queryByIdList() {
     let res = await list({ id: searchId.value, pageNo: pagination.current, pageSize: pagination.pageSize })
     console.log(res, '列表查询---')
-    pagination.current = 1
-    tableData.value = res.records.map((el: any) => {
+    tableData.value = res.map((el: any) => {
         return {
             morning: el.insType,
             afterNoon: el.insType,
             evening: el.insType,
             ...el
         }
-    })
+    }) 
     pagination.total = res.total
 }
 //查询
@@ -232,6 +231,12 @@ let getReset = () => {
     searchId.value = ''
     queryByIdList()
 }
+ //分页切换
+ let pageChange=(val)=> {
+    pagination.current = val.current;
+    pagination.pageSize = val.pageSize;
+    queryByIdList()
+  }
 //导入
 let getupload = () => {
     modalType.value = 'upload'