mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
8311b0ebdd
commit
9fd5b0ee17
@ -31,13 +31,13 @@
|
||||
</div>
|
||||
<div class="col-sm-4" v-if="listOweFeeInfo.conditions.payObjType == '3333'">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请填写房屋编号,如1#1#1123" class="form-control"
|
||||
<input type="text" placeholder="请填写房屋编号,如1-1-1123" class="form-control"
|
||||
v-model="listOweFeeInfo.conditions.num">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" v-else>
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请填写车位编号,如6#8" class="form-control "
|
||||
<input type="text" placeholder="请填写车位编号,如6-8" class="form-control "
|
||||
v-model="listOweFeeInfo.conditions.num">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -9,23 +9,26 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入表ID"
|
||||
v-model="meterWaterManageInfo.conditions.waterId" class=" form-control">
|
||||
<input type="text" placeholder="请填写房屋编号,如1-1-1123"
|
||||
v-model="meterWaterManageInfo.conditions.roomNum" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="meterWaterManageInfo.conditions.meterType">
|
||||
<option selected value="">请选择表类型</option>
|
||||
<option value="1010">电表</option>
|
||||
<option value="2020">水表</option>
|
||||
</select> </div>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="请输入房屋编号"
|
||||
v-model="meterWaterManageInfo.conditions.roomNum" class=" form-control">
|
||||
<input type="text" placeholder="请输入表ID"
|
||||
v-model="meterWaterManageInfo.conditions.waterId" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
|
||||
@ -1,85 +1,86 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function(vc){
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data:{
|
||||
meterWaterManageInfo:{
|
||||
meterWaters:[],
|
||||
total:0,
|
||||
records:1,
|
||||
moreCondition:false,
|
||||
waterId:'',
|
||||
conditions:{
|
||||
waterId:'',
|
||||
meterType:'',
|
||||
roomNum:'',
|
||||
data: {
|
||||
meterWaterManageInfo: {
|
||||
meterWaters: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
waterId: '',
|
||||
conditions: {
|
||||
waterId: '',
|
||||
meterType: '',
|
||||
roomNum: '',
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function () {
|
||||
vc.component._listMeterWaters(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent:function(){
|
||||
|
||||
vc.on('meterWaterManage','listMeterWater',function(_param){
|
||||
vc.component._listMeterWaters(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('meterWaterManage', 'listMeterWater', function (_param) {
|
||||
vc.component._listMeterWaters(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination','page_event',function(_currentPage){
|
||||
vc.component._listMeterWaters(_currentPage,DEFAULT_ROWS);
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listMeterWaters(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
_listMeterWaters:function(_page, _rows){
|
||||
methods: {
|
||||
_listMeterWaters: function (_page, _rows) {
|
||||
|
||||
vc.component.meterWaterManageInfo.conditions.page = _page;
|
||||
vc.component.meterWaterManageInfo.conditions.row = _rows;
|
||||
vc.component.meterWaterManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
||||
var param = {
|
||||
params:vc.component.meterWaterManageInfo.conditions
|
||||
};
|
||||
params: vc.component.meterWaterManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('meterWater.listMeterWaters',
|
||||
param,
|
||||
function(json,res){
|
||||
var _meterWaterManageInfo=JSON.parse(json);
|
||||
vc.component.meterWaterManageInfo.total = _meterWaterManageInfo.total;
|
||||
vc.component.meterWaterManageInfo.records = _meterWaterManageInfo.records;
|
||||
vc.component.meterWaterManageInfo.meterWaters = _meterWaterManageInfo.data;
|
||||
vc.emit('pagination','init',{
|
||||
total:vc.component.meterWaterManageInfo.records,
|
||||
currentPage:_page
|
||||
});
|
||||
},function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
//发送get请求
|
||||
vc.http.apiGet('meterWater.listMeterWaters',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _meterWaterManageInfo = JSON.parse(json);
|
||||
vc.component.meterWaterManageInfo.total = _meterWaterManageInfo.total;
|
||||
vc.component.meterWaterManageInfo.records = _meterWaterManageInfo.records;
|
||||
vc.component.meterWaterManageInfo.meterWaters = _meterWaterManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.meterWaterManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddMeterWaterModal:function(){
|
||||
vc.emit('addMeterWater','openAddMeterWaterModal',{});
|
||||
_openAddMeterWaterModal: function () {
|
||||
vc.emit('addMeterWater', 'openAddMeterWaterModal', {});
|
||||
},
|
||||
_openEditMeterWaterModel:function(_meterWater){
|
||||
vc.emit('editMeterWater','openEditMeterWaterModal',_meterWater);
|
||||
_openEditMeterWaterModel: function (_meterWater) {
|
||||
vc.emit('editMeterWater', 'openEditMeterWaterModal', _meterWater);
|
||||
},
|
||||
_openDeleteMeterWaterModel:function(_meterWater){
|
||||
vc.emit('deleteMeterWater','openDeleteMeterWaterModal',_meterWater);
|
||||
_openDeleteMeterWaterModel: function (_meterWater) {
|
||||
vc.emit('deleteMeterWater', 'openDeleteMeterWaterModal', _meterWater);
|
||||
},
|
||||
_queryMeterWaterMethod:function(){
|
||||
_queryMeterWaterMethod: function () {
|
||||
vc.component._listMeterWaters(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_moreCondition:function(){
|
||||
if(vc.component.meterWaterManageInfo.moreCondition){
|
||||
_moreCondition: function () {
|
||||
if (vc.component.meterWaterManageInfo.moreCondition) {
|
||||
vc.component.meterWaterManageInfo.moreCondition = false;
|
||||
}else{
|
||||
} else {
|
||||
vc.component.meterWaterManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user