From 8098e7f023320b5bd9482bace3bf4f19d807765e Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期五, 16 四月 2021 18:08:26 +0800 Subject: [PATCH] 修复集群检索无法分页的bug --- src/pages/searchForCluster/index/Searching.vue | 20 +++++---- vue.config.js | 39 ++++++++++--------- src/components/subComponents/ModelCard.vue | 7 ++- src/Pool/VideoPhotoData.ts | 15 ++++--- 4 files changed, 44 insertions(+), 37 deletions(-) diff --git a/src/Pool/VideoPhotoData.ts b/src/Pool/VideoPhotoData.ts index ca783bc..e86de54 100644 --- a/src/Pool/VideoPhotoData.ts +++ b/src/Pool/VideoPhotoData.ts @@ -74,7 +74,7 @@ async querySearchList() { this.cards = [] this.preCards = [] - var param:any = { + var param: any = { page: this.page, size: this.size, searchTime: this.searchTime, @@ -84,7 +84,7 @@ tasks: this.queryTasks, treeNodes: this.treeNodes } - if(this.searchFrom == 'cluster'){ + if (this.searchFrom == 'cluster') { param.isAll = true } const rsp: any = await getSearchList(param); @@ -119,7 +119,7 @@ picUrl: this.picUrl, databases: this.compareTabs, threshold: this.threshold, - isAll: this.searchFrom== "cluster"?true: false + isAll: this.searchFrom == "cluster" ? true : false } const rsp: any = await findPersonByPic(param); if (rsp && rsp.success) { @@ -142,7 +142,7 @@ this.cards = [] var compType = this.compTargetType == "1" ? 1 : 0 let param - if ( this.searchFrom== "cluster") { + if (this.searchFrom == "cluster") { param = { page: this.page, size: this.size, @@ -202,7 +202,8 @@ picUrl: this.picUrl, databases: this.compareTabs, compareNum: this.compareNum, - threshold: this.threshold + threshold: this.threshold, + isAll: this.searchFrom == "cluster" ? true : false } const rsp: any = await findPerson(param); if (rsp && rsp.success) { @@ -273,8 +274,8 @@ } async queryTaskList() { - let params:any = {}; - if(this.searchFrom == 'cluster'){ + let params: any = {}; + if (this.searchFrom == 'cluster') { params.isPlatform = 1 } console.log(params) diff --git a/src/components/subComponents/ModelCard.vue b/src/components/subComponents/ModelCard.vue index 2b378cd..57c13f0 100644 --- a/src/components/subComponents/ModelCard.vue +++ b/src/components/subComponents/ModelCard.vue @@ -75,11 +75,12 @@ </p> <p class="align-right"> <span - class="fontStyleForModel camera-addr" + class="fontStyleForModel text-overflow" :title="data.cameraAddr" >{{ data.cameraAddr }}</span> <span - class="fontStyleForModel analyServer" + class="fontStyleForModel text-overflow" + :title="data.cameraAddr" style="margin-left:20px;" >{{ data.analyServerName }}</span> </p> @@ -520,7 +521,7 @@ p { &.align-right { text-align: right; - .camera-addr { + .text-overflow { display: inline-block; vertical-align: top; width: 90px; diff --git a/src/pages/searchForCluster/index/Searching.vue b/src/pages/searchForCluster/index/Searching.vue index 8ca04f6..9814964 100644 --- a/src/pages/searchForCluster/index/Searching.vue +++ b/src/pages/searchForCluster/index/Searching.vue @@ -275,7 +275,7 @@ this.TreeDataPool.multiple = true; this.TreeDataPool.searchFrom = 'cluster'; this.TreeDataPool.clean(); - + this.TreeDataPool.fetchTreeData(); }, mounted() { @@ -297,12 +297,12 @@ // this.VideoTaskData.tasks[this.VideoTaskData.activeIndex].taskId // ]; // } - let start = this.getUrlKey("start") - let end = this.getUrlKey("end") - if (start&&end) { - this.searchTime = [start,end] - this.VideoPhotoData.searchTime = [start,end] - }else{ + let start = this.getUrlKey("start") + let end = this.getUrlKey("end") + if (start && end) { + this.searchTime = [start, end] + this.VideoPhotoData.searchTime = [start, end] + } else { this.searchTime = this.getDateInit(); this.VideoPhotoData.searchTime = this.getDateInit(); } @@ -453,7 +453,7 @@ } }, computed: { - searchTimeFormated(){ + searchTimeFormated() { return this.format(this.searchTime) } }, @@ -672,8 +672,10 @@ }, changePages(page) { this.VideoPhotoData.page = page; + this.VideoPhotoData.isAll = true; + console.log("鍒嗛〉鏀瑰彉锛�", this.VideoPhotoData.page) + if (!this.VideoPhotoData.uploadType) { - console.log("鍒嗛〉鏀瑰彉锛�") this.VideoPhotoData.uploadDiaplay = false; // this.VideoPhotoData.querySearchList(); this.setLoadSearch(this.VideoPhotoData.querySearchList()); diff --git a/vue.config.js b/vue.config.js index 975e666..bb448d4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -39,6 +39,10 @@ // enforce: true // } }) + +const serverUrl = "http://58.118.225.79:41243" // 缇婁簲 +// const serverUrl = "http://192.168.20.10:7003" + module.exports = { pages, chainWebpack: config => { @@ -73,54 +77,53 @@ devServer: { proxy: { '/track': { - target: 'http://192.168.20.10:8000', + target: serverUrl, // ws: true, changeOrigin: true, }, '/ws': { - target: 'http://192.168.20.10:7003', + target: serverUrl, // ws: true, changeOrigin: true, }, - // "/data/api-v/app/findAllApp": { - // // target: '/', - // target: 'http://localhost:8080/', - // changeOrigin: true, - // pathRewrite: { - // '^/data/api-v/app/findAllApp': 'apps.json' - // } - // }, + "/data/api-v/app/findAllApp": { + // target: '/', + target: 'http://localhost:8080/', + changeOrigin: true, + pathRewrite: { + '^/data/api-v/app/findAllApp': 'apps.json' + } + }, "/api-c": { - target: 'http://192.168.20.113:8004', + target: serverUrl, changeOrigin: true }, "/api-v": { - target: 'http://192.168.20.10:8000', + target: serverUrl, changeOrigin: true }, "/api-f": { - target: 'http://192.168.20.10:8011', + target: serverUrl, // secure: false, changeOrigin: true }, "/api-p": { - target: 'http://192.168.5.23:8010', + target: serverUrl, // secure: false, changeOrigin: true }, "/api-u": { - target: 'http://192.168.20.10:8000', + target: serverUrl, changeOrigin: true }, "/httpImage": { - target: 'http://192.168.20.10:7003', + target: serverUrl, changeOrigin: true, //寮�鍚唬鐞� }, "/files": { - target: 'http://192.168.20.10:7003', + target: serverUrl, changeOrigin: true, //寮�鍚唬鐞� } } } } -// http://111.205.161.131:40143/ \ No newline at end of file -- Gitblit v1.8.0