导入抄表记录完成电表列表部分(未调试)

This commit is contained in:
2025-09-08 17:31:03 +08:00
parent 71ad4995c8
commit 70737fa2b8
16 changed files with 249 additions and 46 deletions

View File

@@ -1,4 +1,9 @@
// pages/workBench/components/reading/index.js
import { getMeterReadingRouteList } from "../../../../service/workBench"
import { alertError, loadingFunc } from "../../../../utils/index"
import request from "../../../../utils/request"
const { OK } = request
Component({
/**
@@ -12,7 +17,8 @@ Component({
* 组件的初始数据
*/
data: {
park: "",
parkName: ""
},
/**
@@ -27,7 +33,15 @@ Component({
})
},
async init() {
const { parkName, park } = this.data;
const { code, message, data } = await getMeterReadingRouteList(parkName)
if (code !== OK) {
alertError(message)
return
}
this.setData({
list: data
})
},
onConfirm(e) {
const { data } = e.detail;
@@ -51,7 +65,6 @@ Component({
},
jumpToReading(e) {
const { id } = e.currentTarget.dataset;
console.log("id", id, "e", e)
wx.navigateTo({
url: '/pages/writeReading/index',
})