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