fix: BUG修改

This commit is contained in:
cjp 2023-09-13 16:35:54 +08:00
parent 895a7fe82f
commit 0638f2342e
3 changed files with 10 additions and 9 deletions

View File

@ -299,7 +299,7 @@ const getMonitorList = async () => {
}
const res = await lifterDataPage(requestData);
console.log(res);
if (res && res.result && res.result.records.length > 0) {
if (requestData.engineeringSn !== "" && res && res.result && res.result.records.length > 0) {
monitorList.value = res.result.records;
pages.value.total = +res.result.total;
} else {
@ -321,7 +321,7 @@ const getAlarmList = async () => {
}
const res = await lifterAlarmPage(requestData);
console.log(res);
if (res && res.result && res.result.records.length > 0) {
if (requestData.engineeringSn !== "" && res && res.result && res.result.records.length > 0) {
alarmList.value = res.result.records;
pages.value.total = +res.result.total;
} else {
@ -336,7 +336,7 @@ const getEquipList = async () => {
if (searchSn.value) {
const res = await lifterEquipAll(requestData);
console.log(res);
if (res && res.result && res.result.length > 0) {
if (requestData.engineeringSn !== "" && res && res.result && res.result.length > 0) {
equipList.value = res.result;
getEquipInfo(res.result[0]);
} else {

View File

@ -377,8 +377,9 @@ const getMonitorList = async () => {
requestData.createTime_end = searchForm.value.timeRange[1];
}
const res = await lifterDataPage(requestData);
console.log(res);
if (res && res.result && res.result.records.length > 0) {
console.log(requestData, "历史监测信息");
// console.log(res);
if (searchSn.value !== "" && res && res.result && res.result.records.length > 0) {
monitorList.value = res.result.records;
pages.value.total = +res.result.total;
} else {
@ -404,7 +405,7 @@ const getAlarmList = async () => {
}
const res = await lifterAlarmPage(requestData);
// console.log(res);
if (res && res.result && res.result.records.length > 0) {
if (searchSn.value !== "" && res && res.result && res.result.records.length > 0) {
alarmList.value = res.result.records;
pages.value.total = +res.result.total;
} else {

View File

@ -290,7 +290,7 @@ const getMonitorList = async () => {
}
const res = await lifterDataPage(requestData);
// console.log(res);
if (res && res.result && res.result.records.length > 0) {
if (requestData.engineeringSn !== "" && res && res.result && res.result.records.length > 0) {
monitorList.value = res.result.records;
pages.value.total = +res.result.total;
} else {
@ -316,7 +316,7 @@ const getAlarmList = async () => {
}
const res = await lifterAlarmPage(requestData);
console.log(res);
if (res && res.result && res.result.records.length > 0) {
if (requestData.engineeringSn !== "" && res && res.result && res.result.records.length > 0) {
alarmList.value = res.result.records;
pages.value.total = +res.result.total;
} else {
@ -334,7 +334,7 @@ const getEquipList = async () => {
}
const res = await lifterEquipAll(requestData);
console.log(res);
if (res && res.result && res.result.length > 0) {
if (requestData.engineeringSn !== "" && res && res.result && res.result.length > 0) {
equipList.value = res.result;
getEquipInfo(res.result[0]);
} else {