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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
inouts:[],
|
inouts:[],
|
||||||
paId:'',
|
paNum:'',
|
||||||
noFace:''
|
noFace:''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
_loadInouts:function(_paId){
|
_loadInouts:function(_paNum){
|
||||||
this.noFace = conf.commonBaseUrl+"/img/noPhoto.jpg";
|
this.noFace = conf.commonBaseUrl+"/img/noPhoto.jpg";
|
||||||
this.paId = _paId;
|
this.paNum = _paNum;
|
||||||
let _that =this;
|
let _that =this;
|
||||||
getIotOpenApi(this,{
|
getIotOpenApi(this,{
|
||||||
page:1,
|
page:1,
|
||||||
row:50,
|
row:50,
|
||||||
communityId:this.getCommunityId(),
|
communityId:this.getCommunityId(),
|
||||||
paId:this.paId,
|
paNum:this.paNum,
|
||||||
iotApiCode:'listCarInoutDetailBmoImpl'
|
iotApiCode:'listCarInoutDetailBmoImpl'
|
||||||
}).then(_data=>{
|
}).then(_data=>{
|
||||||
_that.inouts = _data.data;
|
_that.inouts = _data.data;
|
||||||
|
|||||||
@ -52,18 +52,18 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
payments:[ ],
|
payments:[ ],
|
||||||
paId:''
|
paNum:''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
_loadPayments:function(_paId){
|
_loadPayments:function(_paNum){
|
||||||
this.paId = _paId;
|
this.paNum = _paNum;
|
||||||
let _that =this;
|
let _that =this;
|
||||||
getIotOpenApi(this,{
|
getIotOpenApi(this,{
|
||||||
page:1,
|
page:1,
|
||||||
row:50,
|
row:50,
|
||||||
communityId:this.getCommunityId(),
|
communityId:this.getCommunityId(),
|
||||||
paId:this.paId,
|
paNum:this.paNum,
|
||||||
iotApiCode:'listCarInoutPaymentBmoImpl'
|
iotApiCode:'listCarInoutPaymentBmoImpl'
|
||||||
}).then(_data=>{
|
}).then(_data=>{
|
||||||
_that.payments = _data.data;
|
_that.payments = _data.data;
|
||||||
|
|||||||
@ -54,7 +54,7 @@ import { getCommunityId } from '../../api/community/community.js';
|
|||||||
name: "barrierGateControl",
|
name: "barrierGateControl",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
paId: '',
|
paNumm: '',
|
||||||
machines: [],
|
machines: [],
|
||||||
showModel: false,
|
showModel: false,
|
||||||
curMachine: {}
|
curMachine: {}
|
||||||
@ -62,13 +62,13 @@ import { getCommunityId } from '../../api/community/community.js';
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
_loadMachines: function(_paId) {
|
_loadMachines: function(_paNum) {
|
||||||
this.paId = _paId;
|
this.paNumd = _paNum;
|
||||||
let _that = this;
|
let _that = this;
|
||||||
getIotOpenApi(this, {
|
getIotOpenApi(this, {
|
||||||
page: 1,
|
page: 1,
|
||||||
row: 50,
|
row: 50,
|
||||||
paId: _paId,
|
paNum: _paNum,
|
||||||
communityId: this.getCommunityId(),
|
communityId: this.getCommunityId(),
|
||||||
iotApiCode: 'listParkingAreaMachinesBmoImpl',
|
iotApiCode: 'listParkingAreaMachinesBmoImpl',
|
||||||
}).then(_data => {
|
}).then(_data => {
|
||||||
@ -168,7 +168,7 @@ import { getCommunityId } from '../../api/community/community.js';
|
|||||||
this.cancel();
|
this.cancel();
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/car/carInParkingArea?machineId=' + _curMachine.machineId +
|
url: '/pages/car/carInParkingArea?machineId=' + _curMachine.machineId +
|
||||||
'&machineCode=' + _curMachine.machineCode + '&paId=' + _that.paId + "&boxId=" +
|
'&machineCode=' + _curMachine.machineCode + 'paNumd=' + _that.paNumd + "&boxId=" +
|
||||||
_curMachine.boxId
|
_curMachine.boxId
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -185,7 +185,7 @@ import { getCommunityId } from '../../api/community/community.js';
|
|||||||
this.cancel();
|
this.cancel();
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/car/carOutParkingArea?machineId=' + _curMachine.machineId +
|
url: '/pages/car/carOutParkingArea?machineId=' + _curMachine.machineId +
|
||||||
"&machineCode=" + _curMachine.machineCode + "&paId=" + this.paId + "&boxId=" +
|
"&machineCode=" + _curMachine.machineCode + "paNumd=" + this.paNumd + "&boxId=" +
|
||||||
_curMachine.boxId
|
_curMachine.boxId
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,6 +53,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
paId: '',
|
paId: '',
|
||||||
|
paNum:'',
|
||||||
parkingAreas: [],
|
parkingAreas: [],
|
||||||
currentPage: 0,
|
currentPage: 0,
|
||||||
}
|
}
|
||||||
@ -83,6 +84,7 @@
|
|||||||
_chooseArea: function(_area) {
|
_chooseArea: function(_area) {
|
||||||
let _that = this;
|
let _that = this;
|
||||||
this.paId = _area.paId;
|
this.paId = _area.paId;
|
||||||
|
this.paNum = _area.num;
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
_that.changeListType(0);
|
_that.changeListType(0);
|
||||||
@ -92,11 +94,11 @@
|
|||||||
changeListType: function(e) {
|
changeListType: function(e) {
|
||||||
this.currentPage = e;
|
this.currentPage = e;
|
||||||
if (e == 1) {
|
if (e == 1) {
|
||||||
this.$refs.barrierControlInoutsRef._loadInouts(this.paId);
|
this.$refs.barrierControlInoutsRef._loadInouts(this.paNum);
|
||||||
} else if (e == 2) {
|
} else if (e == 2) {
|
||||||
this.$refs.barrierControlPaymentRef._loadPayments(this.paId);
|
this.$refs.barrierControlPaymentRef._loadPayments(this.paNum);
|
||||||
} else {
|
} else {
|
||||||
this.$refs.barrierGateControlRef._loadMachines(this.paId);
|
this.$refs.barrierGateControlRef._loadMachines(this.paNum);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user