用forEach循环数组里的数据, 然后利用判断来替换数据
//this.reslist为数据源, 也是数组
this.reslist.forEach((element) => {
if (element.billClear == 0) {
element.billClears = "未生成";
}
if (element.billClear == 1) {
element.billClears = "已生成但未结算";
}
if (element.billClear == 2) {
element.billClears = "已结算";
}
if (element.instrumentationType == 1) {
element.instrumentationType = "普通水表";
} else if (element.instrumentationType == 2) {
element.instrumentationType = "普通电表";
}
});