安装

image

使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export default {
debugMeter: async () => {
let rID = Number(Select1.selectedOptionValue);
let metricName = Input6.text;
let meterAsset = Input7.text;
let busAddr = Input8.text;
let meterAddr = Number(Input9.text);
let registerAddr = Number(Input10.text);
let registerCount = Number(Input11.text);
let ratio = Number(Input12.text);
let result = await ky.post("http://172.16.0.181:9090/debug_meter",{json:{rID,metricName,meterAsset,busAddr,meterAddr,registerAddr,registerCount,ratio}});
if (result.ok) {
let data = await result.json();
showAlert("At "+data.timestamp+" debug meter data is "+data.value,"success");
}else {
showAlert("debug meter is failed.","error");
}
}
}