mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
2bccf109c5
commit
9884cb388a
@ -57,5 +57,10 @@
|
|||||||
<button class="btn btn-primary" type="button" :disabled="parkingAreaControlFeeInfo.pay==0"
|
<button class="btn btn-primary" type="button" :disabled="parkingAreaControlFeeInfo.pay==0"
|
||||||
v-on:click="saveTempFeeInfo()">临时车收费</button>
|
v-on:click="saveTempFeeInfo()">临时车收费</button>
|
||||||
</div>
|
</div>
|
||||||
|
<!--收费二维码-->
|
||||||
|
<div class="form-group text-center " style="margin-top: 50px;">
|
||||||
|
<div id="qrcode" style="width:200px; height:200px;margin:0 auto "></div>
|
||||||
|
<div class="margin-top">收费二维码</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -12,11 +12,14 @@
|
|||||||
remark: "",
|
remark: "",
|
||||||
open: "",
|
open: "",
|
||||||
openMsg: "",
|
openMsg: "",
|
||||||
machineId: ''
|
machineId: '-1',
|
||||||
|
showRefresh:'',
|
||||||
|
paId:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_initMethod: function () {
|
_initMethod: function () {
|
||||||
|
$that.parkingAreaControlFeeInfo.paId = vc.getParam('paId');
|
||||||
|
$that._loadQrCodeUrl();
|
||||||
},
|
},
|
||||||
_initEvent: function () {
|
_initEvent: function () {
|
||||||
vc.on('parkingAreaControlFee', 'notify', function (_data) {
|
vc.on('parkingAreaControlFee', 'notify', function (_data) {
|
||||||
@ -33,13 +36,32 @@
|
|||||||
vc.on('parkingAreaControlFee', 'changeMachine', function (_data) {
|
vc.on('parkingAreaControlFee', 'changeMachine', function (_data) {
|
||||||
$that.parkingAreaControlFeeInfo.machineId = _data.machineId;
|
$that.parkingAreaControlFeeInfo.machineId = _data.machineId;
|
||||||
})
|
})
|
||||||
|
|
||||||
vc.on('parkingAreaControlFee', 'clear', function () {
|
vc.on('parkingAreaControlFee', 'clear', function () {
|
||||||
$that.clearParkingAreaControlFeeInfo();
|
$that.clearParkingAreaControlFeeInfo();
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
_loadQrCodeUrl:function(){
|
||||||
|
//判断是否支付
|
||||||
|
var param = {
|
||||||
|
params: {
|
||||||
|
communityId: vc.getCurrentCommunity().communityId,
|
||||||
|
paId: $that.parkingAreaControlFeeInfo.paId,
|
||||||
|
machineId: $that.parkingAreaControlFeeInfo.machineId,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//发送get请求
|
||||||
|
vc.http.apiGet('/machine.getCarMachineQrCodeUrl',
|
||||||
|
param,
|
||||||
|
function (json, res) {
|
||||||
|
let _info = JSON.parse(json);
|
||||||
|
$that._viewQr(_info.data)
|
||||||
|
}, function (errInfo, error) {
|
||||||
|
console.log('请求失败处理');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
saveTempFeeInfo: function () {
|
saveTempFeeInfo: function () {
|
||||||
vc.emit('parkingAreaControlCustomCarInout', 'open', {
|
vc.emit('parkingAreaControlCustomCarInout', 'open', {
|
||||||
type: "1102", //1101 手动入场 1102 手动出场
|
type: "1102", //1101 手动入场 1102 手动出场
|
||||||
@ -62,7 +84,19 @@
|
|||||||
openMsg: "",
|
openMsg: "",
|
||||||
machineId: _machineId
|
machineId: _machineId
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
_viewQr: function (_data) {
|
||||||
|
document.getElementById("qrcode").innerHTML = "";
|
||||||
|
let qrcode = new QRCode(document.getElementById("qrcode"), {
|
||||||
|
text: "临时车收费二维码", //你想要填写的文本
|
||||||
|
width: 200, //生成的二维码的宽度
|
||||||
|
height: 200, //生成的二维码的高度
|
||||||
|
colorDark: "#000000", // 生成的二维码的深色部分
|
||||||
|
colorLight: "#ffffff", //生成二维码的浅色部分
|
||||||
|
correctLevel: QRCode.CorrectLevel.H
|
||||||
|
});
|
||||||
|
qrcode.makeCode(_data.url);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})(window.vc);
|
})(window.vc);
|
||||||
@ -116,7 +116,8 @@
|
|||||||
outMachineId: _outMachineId
|
outMachineId: _outMachineId
|
||||||
});
|
});
|
||||||
vc.emit('parkingAreaControlFee', 'changeMachine', {
|
vc.emit('parkingAreaControlFee', 'changeMachine', {
|
||||||
machineId: _outMachineId
|
machineId: _outMachineId,
|
||||||
|
paId: $that.parkingAreaControlVideoInfo.paId
|
||||||
});
|
});
|
||||||
|
|
||||||
let paId = "";
|
let paId = "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user