优化代码

This commit is contained in:
java110 2022-09-06 17:48:51 +08:00
parent 444ad7f1a1
commit 1546883bee
4 changed files with 40 additions and 22 deletions

View File

@ -1,10 +1,10 @@
<div class="margin-top"> <div class="margin-top">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<img :src="parkingAreaControlCarInoutInfo.inImg" width="100%" height="350px" /> <img :src="parkingAreaControlCarInoutInfo.inImg" :onerror="imgOnErrorIn()" width="100%" height="350px" />
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<img :src="parkingAreaControlCarInoutInfo.outImg" width="100%" height="350px" /> <img :src="parkingAreaControlCarInoutInfo.outImg" :onerror="imgOnErrorOut()" width="100%" height="350px" />
</div> </div>
</div> </div>
</div> </div>

View File

@ -21,17 +21,30 @@
return; return;
} }
if (_parkingAreaControl.inMachineId == _data.extMachineId) { if (_parkingAreaControl.inMachineId == _data.extMachineId) {
//$that.parkingAreaControlCarInoutInfo.inImg = _data.img;
setTimeout(function() {
$that.parkingAreaControlCarInoutInfo.inImg = _data.img; $that.parkingAreaControlCarInoutInfo.inImg = _data.img;
}, 1500)
} }
if (_parkingAreaControl.outMachineId == _data.extMachineId) { if (_parkingAreaControl.outMachineId == _data.extMachineId) {
//$that.parkingAreaControlCarInoutInfo.outImg = _data.img;
setTimeout(function() {
$that.parkingAreaControlCarInoutInfo.outImg = _data.img; $that.parkingAreaControlCarInoutInfo.outImg = _data.img;
}, 1500)
} }
}) })
}, },
methods: { methods: {
imgOnErrorIn: function() {
//let _img = $that.parkingAreaControlCarInoutInfo.inImg
},
imgOnErrorOut: function() {
//let _img = $that.parkingAreaControlCarInoutInfo.outImg
}
} }
}); });
})(window.vc); })(window.vc);

View File

@ -28,6 +28,7 @@
// = _params; // = _params;
vc.copyObject(_params, vc.component.parkingAreaControlCustomCarInoutInfo); vc.copyObject(_params, vc.component.parkingAreaControlCustomCarInoutInfo);
vc.component.parkingAreaControlCustomCarInoutInfo.communityId = vc.getCurrentCommunity().communityId; vc.component.parkingAreaControlCustomCarInoutInfo.communityId = vc.getCurrentCommunity().communityId;
$that._queryCustomCarMoney();
}); });
}, },
methods: { methods: {

View File

@ -57,7 +57,8 @@
function(json, res) { function(json, res) {
let _info = JSON.parse(json); let _info = JSON.parse(json);
$that._viewQr(_info.data) $that._viewQr(_info.data)
}, function (errInfo, error) { },
function(errInfo, error) {
console.log('请求失败处理'); console.log('请求失败处理');
} }
); );
@ -68,11 +69,13 @@
carNum: $that.parkingAreaControlFeeInfo.carNum, carNum: $that.parkingAreaControlFeeInfo.carNum,
amount: $that.parkingAreaControlFeeInfo.pay, amount: $that.parkingAreaControlFeeInfo.pay,
payCharge: $that.parkingAreaControlFeeInfo.payCharge, payCharge: $that.parkingAreaControlFeeInfo.payCharge,
machineId: $that.parkingAreaControlFeeInfo.machineId machineId: $that.parkingAreaControlFeeInfo.machineId,
boxId: $that.parkingAreaControlFeeInfo.boxId,
}) })
}, },
clearParkingAreaControlFeeInfo: function() { clearParkingAreaControlFeeInfo: function() {
let _machineId = $that.parkingAreaControlFeeInfo.machineId; let _machineId = $that.parkingAreaControlFeeInfo.machineId;
let _boxId = $that.parkingAreaControlFeeInfo.boxId;
$that.parkingAreaControlFeeInfo = { $that.parkingAreaControlFeeInfo = {
carNum: "", carNum: "",
@ -82,7 +85,8 @@
remark: "", remark: "",
open: "", open: "",
openMsg: "", openMsg: "",
machineId: _machineId machineId: _machineId,
boxId: _boxId
} }
}, },
_viewQr: function(_data) { _viewQr: function(_data) {