diff --git a/src/api/module/eam/device/template.ts b/src/api/module/eam/device/template.ts index af10270..34b3dda 100644 --- a/src/api/module/eam/device/template.ts +++ b/src/api/module/eam/device/template.ts @@ -47,7 +47,7 @@ export const updateTempStatus = (id: string, enabled: number) => eamServer({ url: '/template/update-status', method: 'put', - data: { id, enabled }, + params: { id, enabled }, }) export const updateSheetStatus = (id: string, status: number) => diff --git a/src/pages/deviceInfo/index.vue b/src/pages/deviceInfo/index.vue index dfac7a9..124ecbd 100644 --- a/src/pages/deviceInfo/index.vue +++ b/src/pages/deviceInfo/index.vue @@ -60,6 +60,7 @@ class="table" v-loading="loading" :data="list" + ref="tableRef" :highlight-current-row="true" :page-total="total" :current-page="queryParams.pageNo" @@ -157,15 +158,18 @@ const total = ref(0) const list = ref([]) const queryParams = reactive({ pageNo: 1, - pageSize: 10, + pageSize: undefined, serialNo: undefined, name: undefined, status: undefined, categoryId: [], createTime: [], }) - +const tableRef = ref() const getList = async () => { + if (!queryParams.pageSize) { + queryParams.pageSize = tableRef.value.getSize() + } loading.value = true const options = { @@ -237,7 +241,6 @@ function addDevice() { function onView(row: any) { router.push({ path: '/device/deviceOperation', query: { action: 'view', id: row.id } }) } -