定时查询优化

master
schry 2 years ago
parent c354889969
commit 5a49f41ae1

@ -733,10 +733,11 @@ export default {
limit: 10,
},
manuOrderQuery: {
recordCode: "",
recordCode: null,
page: 1,
limit: 10,
},
recordCode: null,
manuCodeRelQuery: {
manuOrderIdFk: null,
page: 1,
@ -801,6 +802,7 @@ export default {
this.listCodeRel = null;
this.loading = true;
this.manuOrderQuery.recordCode = this.list.recordCode
console.log(this.manuOrderQuery.recordCode);
getTraceManuOrderList(this.manuOrderQuery).then((res) => {
this.loading = false;
if (res.code === 20000) {
@ -822,14 +824,16 @@ export default {
orderTimeOut() {
//
this.filterQuery.page = 1;
this.getList()
if(!(this.list == undefined || this.list.length <= 0)){
this.manuOrderQuery.recordCode = this.list.recordCode
this.getManuOrderList()
if((this.list == undefined || this.list.length <= 0)){
this.getList()
if (this.manuOrderQuery.recordCode != null || this.manuOrderQuery.recordCode != "") {
this.getManuOrderList()
}
}
// 使
if(this.list == undefined || this.list.length <= 0){
this.monitorOrder = setTimeout(this.orderTimeOut, 1000);
this.monitorOrder = setTimeout(this.orderTimeOut, 10000);
}
},
formaterSourceType(row){
@ -991,7 +995,12 @@ export default {
page: 1,
limit: 10,
};
this.list = null,
this.manuOrderQuery = {
recordCode: null,
page: 1,
limit: 10,
},
this.list = "",
this.listOrder = null,
this.listCodeRel = null,
clearTimeout(this.monitorOrder);
@ -999,8 +1008,13 @@ export default {
//this.total = 0
},
onSubmit() {
// if(this.list != undefined || this.list.length > 0){
// clearTimeout(this.monitorOrder);
// this.monitorOrder = ""
// }else {
// this.orderTimeOut()
// }
this.orderTimeOut()
},
getList() {
this.loading = true;
@ -1009,7 +1023,8 @@ export default {
if (res.code === 20000) {
this.list = res.data || [];
this.total = res.data.total || 0;
console.log(this.list)
this.recordCode = res.data.recordCode
console.log(this.recordCode)
} else {
this.$message.error(res.message);
this.list = [];
@ -1025,6 +1040,10 @@ export default {
},
created() {
this.getCompanyName()
if (this.list > 0) {
clearTimeout(this.monitorOrder);
this.monitorOrder = ""
}
},
beforeDestroy() {
if (this.monitorOrder) {

@ -857,14 +857,15 @@ export default {
orderTimeOut() {
//
this.filterQuery.page = 1;
this.getList()
if (!(this.list == undefined || this.list.length <= 0)) {
this.manuOrderQuery.recordCode = this.list.recordCode
this.getManuOrderList()
if ((this.list == undefined || this.list.length <= 0)) {
this.getList()
if (this.manuOrderQuery.recordCode != null || this.manuOrderQuery.recordCode != "") {
this.getManuOrderList()
}
}
// 使
if (this.list == undefined || this.list.length <= 0) {
this.monitorOrder = setTimeout(this.orderTimeOut, 1000);
this.monitorOrder = setTimeout(this.orderTimeOut, 10000);
}
},
formaterSourceType(row) {

Loading…
Cancel
Save