导入抄表记录完成电表列表部分(未调试)
This commit is contained in:
@@ -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',
|
||||
})
|
||||
|
Reference in New Issue
Block a user