mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
优化代码
This commit is contained in:
parent
04ee6aa7f0
commit
a70fc5b16a
@ -64,20 +64,20 @@
|
||||
data() {
|
||||
return {
|
||||
inouts:[],
|
||||
paId:'',
|
||||
paNum:'',
|
||||
noFace:''
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
_loadInouts:function(_paId){
|
||||
_loadInouts:function(_paNum){
|
||||
this.noFace = conf.commonBaseUrl+"/img/noPhoto.jpg";
|
||||
this.paId = _paId;
|
||||
this.paNum = _paNum;
|
||||
let _that =this;
|
||||
getIotOpenApi(this,{
|
||||
page:1,
|
||||
row:50,
|
||||
communityId:this.getCommunityId(),
|
||||
paId:this.paId,
|
||||
paNum:this.paNum,
|
||||
iotApiCode:'listCarInoutDetailBmoImpl'
|
||||
}).then(_data=>{
|
||||
_that.inouts = _data.data;
|
||||
|
||||
@ -52,18 +52,18 @@
|
||||
data() {
|
||||
return {
|
||||
payments:[ ],
|
||||
paId:''
|
||||
paNum:''
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
_loadPayments:function(_paId){
|
||||
this.paId = _paId;
|
||||
_loadPayments:function(_paNum){
|
||||
this.paNum = _paNum;
|
||||
let _that =this;
|
||||
getIotOpenApi(this,{
|
||||
page:1,
|
||||
row:50,
|
||||
communityId:this.getCommunityId(),
|
||||
paId:this.paId,
|
||||
paNum:this.paNum,
|
||||
iotApiCode:'listCarInoutPaymentBmoImpl'
|
||||
}).then(_data=>{
|
||||
_that.payments = _data.data;
|
||||
|
||||
@ -54,7 +54,7 @@ import { getCommunityId } from '../../api/community/community.js';
|
||||
name: "barrierGateControl",
|
||||
data() {
|
||||
return {
|
||||
paId: '',
|
||||
paNumm: '',
|
||||
machines: [],
|
||||
showModel: false,
|
||||
curMachine: {}
|
||||
@ -62,13 +62,13 @@ import { getCommunityId } from '../../api/community/community.js';
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
_loadMachines: function(_paId) {
|
||||
this.paId = _paId;
|
||||
_loadMachines: function(_paNum) {
|
||||
this.paNumd = _paNum;
|
||||
let _that = this;
|
||||
getIotOpenApi(this, {
|
||||
page: 1,
|
||||
row: 50,
|
||||
paId: _paId,
|
||||
paNum: _paNum,
|
||||
communityId: this.getCommunityId(),
|
||||
iotApiCode: 'listParkingAreaMachinesBmoImpl',
|
||||
}).then(_data => {
|
||||
@ -168,7 +168,7 @@ import { getCommunityId } from '../../api/community/community.js';
|
||||
this.cancel();
|
||||
uni.navigateTo({
|
||||
url: '/pages/car/carInParkingArea?machineId=' + _curMachine.machineId +
|
||||
'&machineCode=' + _curMachine.machineCode + '&paId=' + _that.paId + "&boxId=" +
|
||||
'&machineCode=' + _curMachine.machineCode + 'paNumd=' + _that.paNumd + "&boxId=" +
|
||||
_curMachine.boxId
|
||||
})
|
||||
},
|
||||
@ -185,7 +185,7 @@ import { getCommunityId } from '../../api/community/community.js';
|
||||
this.cancel();
|
||||
uni.navigateTo({
|
||||
url: '/pages/car/carOutParkingArea?machineId=' + _curMachine.machineId +
|
||||
"&machineCode=" + _curMachine.machineCode + "&paId=" + this.paId + "&boxId=" +
|
||||
"&machineCode=" + _curMachine.machineCode + "paNumd=" + this.paNumd + "&boxId=" +
|
||||
_curMachine.boxId
|
||||
})
|
||||
}
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
data() {
|
||||
return {
|
||||
paId: '',
|
||||
paNum:'',
|
||||
parkingAreas: [],
|
||||
currentPage: 0,
|
||||
}
|
||||
@ -83,6 +84,7 @@
|
||||
_chooseArea: function(_area) {
|
||||
let _that = this;
|
||||
this.paId = _area.paId;
|
||||
this.paNum = _area.num;
|
||||
|
||||
setTimeout(function() {
|
||||
_that.changeListType(0);
|
||||
@ -92,11 +94,11 @@
|
||||
changeListType: function(e) {
|
||||
this.currentPage = e;
|
||||
if (e == 1) {
|
||||
this.$refs.barrierControlInoutsRef._loadInouts(this.paId);
|
||||
this.$refs.barrierControlInoutsRef._loadInouts(this.paNum);
|
||||
} else if (e == 2) {
|
||||
this.$refs.barrierControlPaymentRef._loadPayments(this.paId);
|
||||
this.$refs.barrierControlPaymentRef._loadPayments(this.paNum);
|
||||
} else {
|
||||
this.$refs.barrierGateControlRef._loadMachines(this.paId);
|
||||
this.$refs.barrierGateControlRef._loadMachines(this.paNum);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user