/** 入驻小区 **/ (function (vc) { var DEFAULT_PAGE = 1; var DEFAULT_ROWS = 10; vc.extends({ data: { pointPlanInfo: { plans: [], inspectionId: '', roomNum: '', allOweFeeAmount: '0', planUserName:'', inspectionStartTime:'', inspectionEndTime:'', } }, _initMethod: function () { }, _initEvent: function () { vc.on('pointPlan', 'switch', function (_data) { $that.pointPlanInfo.inspectionId = _data.inspectionId; $that._loadPointPlanData(DEFAULT_PAGE, DEFAULT_ROWS); setTimeout(function(){ $that._initTaskDetailDate(); },1000) }); vc.on('pointPlan', 'paginationPlus', 'page_event', function (_currentPage) { $that._loadPointPlanData(_currentPage, DEFAULT_ROWS); }); vc.on('pointPlan', 'notify', function (_data) { $that._loadPointPlanData(DEFAULT_PAGE, DEFAULT_ROWS); }) }, methods: { _initTaskDetailDate:function(){ vc.initDate('pointDetailStartTime',function(_value){ $that.pointPlanInfo.inspectionStartTime = _value; }); vc.initDate('pointDetailEndTime',function(_value){ $that.pointPlanInfo.inspectionEndTime = _value; }) }, _loadPointPlanData: function (_page, _row) { let param = { params: { communityId: vc.getCurrentCommunity().communityId, inspectionId: $that.pointPlanInfo.inspectionId, planUserName: $that.pointPlanInfo.planUserName, inspectionStartTime: $that.pointPlanInfo.inspectionStartTime, inspectionEndTime: $that.pointPlanInfo.inspectionEndTime, page: _page, row: _row } }; //发送get请求 vc.http.apiGet('/inspection.queryPointInspectionPlan', param, function (json) { let _json = JSON.parse(json); $that.pointPlanInfo.plans = _json.data; vc.emit('pointPlan', 'paginationPlus', 'init', { total: _json.records, dataCount: _json.total, currentPage: _page }); }, function () { console.log('请求失败处理'); } ); }, //查询 _qureyPointPlan: function () { $that._loadPointPlanData(DEFAULT_PAGE, DEFAULT_ROWS); }, //重置 _resetPointPlan: function () { $that.pointPlanInfo.roomNum = ""; $that._loadPointPlanData(DEFAULT_PAGE, DEFAULT_ROWS); }, } }); })(window.vc);