mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
a875e2e5dc
commit
27ea4a4b49
@ -19,8 +19,8 @@
|
||||
<select class="custom-select" v-model="meterWaterManageInfo.conditions.meterType">
|
||||
<option selected value="">请选择表类型</option>
|
||||
<option v-for="(item,index) in meterWaterManageInfo.meterTypes" :key="index"
|
||||
v-bind:value="item.statusCd">
|
||||
{{item.name}}
|
||||
v-bind:value="item.typeId">
|
||||
{{item.typeName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
@ -80,7 +80,7 @@
|
||||
<tbody>
|
||||
<tr v-for="meterWater in meterWaterManageInfo.meterWaters">
|
||||
<td class="text-center">{{meterWater.waterId}}</td>
|
||||
<td class="text-center">{{_getMeteTypeName(meterWater.meterType)}}</td>
|
||||
<td class="text-center">{{meterWater.meterTypeName}}</td>
|
||||
<td class="text-center">{{meterWater.objName}}</td>
|
||||
<td class="text-center">{{meterWater.preDegrees}}</td>
|
||||
<td class="text-center">{{meterWater.curDegrees}}</td>
|
||||
|
||||
@ -21,9 +21,7 @@
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.getDict('meter_water', "meter_type", function (_data) {
|
||||
vc.component.meterWaterManageInfo.meterTypes = _data;
|
||||
});
|
||||
$that.listMeterTypes();
|
||||
vc.component._listMeterWaters(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
@ -102,7 +100,26 @@
|
||||
return "水表";
|
||||
}
|
||||
return "煤气费";
|
||||
}
|
||||
},
|
||||
listMeterTypes: function () {
|
||||
let param = {
|
||||
params: {
|
||||
page:1,
|
||||
row:100,
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('meterType.listMeterType',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _meterTypeManageInfo = JSON.parse(json);
|
||||
$that.meterWaterManageInfo.meterTypes = _meterTypeManageInfo.data;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user