diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index 259282eb..b88ab999 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -1890,21 +1890,21 @@ // ) { // params.status = '' // } - // let paramsFather = '' - // let i = 1 - // for (var key in params) { - // if (params[key] === '') { - // delete params[key] - // } else { - // if (i != 1) { - // paramsFather += `&${key}=` + params[key] - // i += 1 - // } else if (i == 1) { - // paramsFather += `${key}=` + params[key] - // i += 1 - // } - // } - // } + let paramsFather = '' + let i = 1 + for (var key in params) { + if (params[key] === '') { + delete params[key] + } else { + if (i != 1) { + paramsFather += `&${key}=` + params[key] + i += 1 + } else if (i == 1) { + paramsFather += `${key}=` + params[key] + i += 1 + } + } + } getCameraByCondition(params).then((res) => { dataSource.value = res.data.data pagination.value.total = res.data.count diff --git a/front/src/views/home/videoSurveillance/index.vue b/front/src/views/home/videoSurveillance/index.vue index 7660f412..7d8c13c8 100644 --- a/front/src/views/home/videoSurveillance/index.vue +++ b/front/src/views/home/videoSurveillance/index.vue @@ -292,21 +292,21 @@ type: this.mapSearchParam.type, borderPolygonList: this.mapSearchParam.borderPolygonList || [], } - // let paramsFather = '' - // let i = 1 - // for (var key in params) { - // if (params[key] === '') { - // delete params[key] - // } else { - // if (i != 1) { - // paramsFather += `&${key}=` + params[key] - // i += 1 - // } else if (i == 1) { - // paramsFather += `${key}=` + params[key] - // i += 1 - // } - // } - // } + let paramsFather = '' + let i = 1 + for (var key in params) { + if (params[key] === '') { + delete params[key] + } else { + if (i != 1) { + paramsFather += `&${key}=` + params[key] + i += 1 + } else if (i == 1) { + paramsFather += `${key}=` + params[key] + i += 1 + } + } + } getCameraByCondition(params).then((res) => { console.log('根据parent查询摄像头', res.data.data) if(type=='map'){