105 lines
3.9 KiB
JavaScript
105 lines
3.9 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 1000;
|
|
vc.extends({
|
|
data: {
|
|
aInspectionPlanDetailInfo: {
|
|
beforeTime: "",
|
|
canReexamine: "",
|
|
createTime:"",
|
|
createUserId:"",
|
|
createUserName:"",
|
|
endDate:"",
|
|
endTime :"",
|
|
inspectionDay:"",
|
|
inspectionMonth:"",
|
|
inspectionPlanId:"",
|
|
inspectionPlanName:"",
|
|
inspectionPlanPeriod:"",
|
|
inspectionPlanPeriodName:"",
|
|
inspectionRouteId:"",
|
|
inspectionRouteName :"",
|
|
inspectionWorkday :"",
|
|
remark:"",
|
|
signType:"",
|
|
signTypeName:"",
|
|
startDate:"",
|
|
startTime :"",
|
|
state :"",
|
|
stateName:"",
|
|
total: 0,
|
|
records: 1,
|
|
moreCondition: false,
|
|
inspectionName: '',
|
|
pointObjTypes: [],
|
|
_currentTab: 'aInspectionPlanDetailStaff',
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
$that.aInspectionPlanDetailInfo.inspectionPlanId = vc.getParam('inspectionPlanId');
|
|
//与字典表关联
|
|
vc.getDict('inspection_point', "point_obj_type", function (_data) {
|
|
$that.aInspectionPlanDetailInfo.pointObjTypes = _data;
|
|
});
|
|
$that._listAInspectionPlanDetails(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('aInspectionPlanDetail', 'listAInspectionPlanDetail', function (_param) {
|
|
$that._listAInspectionPlanDetails(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
});
|
|
vc.on('pagination', 'page_event', function (_currentPage) {
|
|
$that._listAInspectionPlanDetails(_currentPage, DEFAULT_ROWS);
|
|
});
|
|
},
|
|
methods: {
|
|
_listAInspectionPlanDetails: function (_page, _rows) {
|
|
let param = {
|
|
params: {
|
|
page:1,
|
|
row:1,
|
|
inspectionPlanId:$that.aInspectionPlanDetailInfo.inspectionPlanId
|
|
}
|
|
};
|
|
//发送get请求
|
|
vc.http.apiGet('/inspectionPlan.listAdminInspectionPlans',
|
|
param,
|
|
function (json, res) {
|
|
let _json = JSON.parse(json);
|
|
vc.copyObject(_json.data[0],$that.aInspectionPlanDetailInfo);
|
|
$that.changeTab($that.aInspectionPlanDetailInfo._currentTab);
|
|
},
|
|
function (errInfo, error) {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
|
|
//查询
|
|
_queryAInspectionPlanDetailMethod: function () {
|
|
$that._listAInspectionPlanDetails(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
|
|
changeTab: function (_tab) {
|
|
$that.aInspectionPlanDetailInfo._currentTab = _tab;
|
|
vc.emit(_tab, 'switch', {
|
|
inspectionPlanId:$that.aInspectionPlanDetailInfo.inspectionPlanId,
|
|
inspectionRouteId:$that.aInspectionPlanDetailInfo.inspectionRouteId
|
|
});
|
|
},
|
|
_moreCondition: function () {
|
|
if ($that.aInspectionPlanDetailInfo.moreCondition) {
|
|
$that.aInspectionPlanDetailInfo.moreCondition = false;
|
|
} else {
|
|
$that.aInspectionPlanDetailInfo.moreCondition = true;
|
|
}
|
|
},
|
|
_pointQrCode: function (_aInspectionPlanDetail) {
|
|
vc.emit('aInspectionPlanDetailQrCode', 'openAInspectionPlanDetailQrCodeModal', _aInspectionPlanDetail);
|
|
|
|
}
|
|
}
|
|
});
|
|
})(window.vc); |