| | |
| | | inputValue: this.inputValue, |
| | | tabs: this.queryTabs, |
| | | tasks: this.queryTasks, |
| | | treeNodes: this.treeNodes |
| | | treeNodes: this.treeNodes, |
| | | dataSource: "camera" |
| | | } |
| | | if (this.searchFrom == 'cluster') { |
| | | param.isAll = true |
| | |
| | | this.tabsForUploadImg.splice(0, this.tabsForUploadImg.length) |
| | | if (rsp && rsp.success) { |
| | | var arr1 = new Array |
| | | arr1 = rsp.data.filter(i => { |
| | | arr1 = rsp.data&&rsp.data.tags.filter(i => { |
| | | if (i.status === 1) { |
| | | i.title = i.title + '(已删除)' |
| | | return i |
| | | } |
| | | }); |
| | | this.tabs = rsp.data.filter(function (i) { |
| | | this.tabs = rsp.data&&rsp.data.tags.filter(function (i) { |
| | | if (i.status !== 1) { |
| | | return i |
| | | } |
| | | }) |
| | | this.tabs.push(...arr1) |
| | | this.tabsForUploadImg.push({ key: "esData", title: "抓拍库" }); |
| | | rsp.data.forEach(element => { |
| | | rsp.data.tags.forEach(element => { |
| | | this.tabsForUploadImg.push(element as any); |
| | | }); |
| | | // 放置黑白名单 0为白名单 |
| | |
| | | this.whiteList.length = 0 |
| | | var josn = JSON.stringify(rsp) |
| | | var resp = JSON.parse(josn) |
| | | resp.data.forEach(i => { |
| | | resp.data.tags.forEach(i => { |
| | | if (i.status === 0 && i.bwType === "0") { //白名单 |
| | | if (i.analyServerId === "") { //同步库 |
| | | i.title = i.title + '(同步库)' |
| | |
| | | " |
| | | ></el-button> |
| | | </el-tooltip> |
| | | <p class="p-label" style="width: 16%"> |
| | | <!-- <p class="p-label" style="width: 16%"> |
| | | <b>标签:</b> |
| | | <el-select |
| | | v-model="tagValues" |
| | |
| | | :title="item.title" |
| | | ></el-option> |
| | | </el-select> |
| | | </p> |
| | | </p> --> |
| | | <p class="p-task" style="width: 16%"> |
| | | <b>场景:</b> |
| | | <el-select |
| | |
| | | this.TreeDataPool.gbReadonly = true; |
| | | this.TreeDataPool.multiple = true; |
| | | this.TreeDataPool.clean(); |
| | | this.TreeDataPool.fetchTreeData(); |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | let scrollContain = this.$refs.scrollContain; |
| | | this.VideoPhotoData.scrollContainDom = scrollContain; |
| | | let list = this.TreeDataPool.localVedioList.filter((i) => { |
| | | return i.progress == 100; |
| | | }); |
| | | let list = |
| | | this.TreeDataPool.localVedioList && |
| | | this.TreeDataPool.localVedioList.filter((i) => { |
| | | return i.progress == 100; |
| | | }); |
| | | this.TreeDataPool.localVedioList = list; |
| | | }); |
| | | window.addEventListener("resize", this.getHeight); |
| | |
| | | ]; |
| | | }, |
| | | format(array) { |
| | | if (!array || array.length === 0) { |
| | | return []; |
| | | } |
| | | return [ |
| | | this.$moment(array[0]).format("YYYY-MM-DD HH:mm:ss"), |
| | | this.$moment(array[1]).format("YYYY-MM-DD HH:mm:ss"), |
| | | ]; |
| | | }, |
| | | searchingBtn() { |
| | | if (!this.searchTime) { |
| | | this.searchTime = []; |
| | | } |
| | | // let obj = document.getElementById('searchMid'); |
| | | // let load = this.$loading({ |
| | | // target:obj, |
| | |
| | | //处理搜索类型 |
| | | var tempArr = this.taskValues.map((task) => task.split(",")); |
| | | var tasks = []; |
| | | console.log("1"); |
| | | |
| | | tempArr.forEach((arr) => { |
| | | tasks = tasks.concat(arr); |
| | | }); |
| | | this.VideoPhotoData.queryTasks = tasks; |
| | | console.log("2"); |
| | | |
| | | this.VideoPhotoData.queryAlarmlevel = this.stringToNum(); |
| | | console.log("3"); |
| | | console.log(this.searchTime); |
| | | |
| | | this.VideoPhotoData.searchTime = this.format(this.searchTime); |
| | | console.log(this.VideoPhotoData.searchTime); |
| | | |
| | | //this.VideoPhotoData.inputValue = this.searchText; |
| | | this.VideoPhotoData.showType = this.showType; |
| | | if (!this.VideoPhotoData.uploadType) { |
| | | this.VideoPhotoData.uploadDiaplay = false; |
| | | //this.VideoPhotoData.page = this.currentPage; |
| | | // this.VideoPhotoData.querySearchList(); |
| | | console.log("4"); |
| | | |
| | | this.setLoadSearch(this.VideoPhotoData.querySearchList()); |
| | | } else { |
| | | //this.VideoPhotoData.page = this.currentPage; |
| | | // this.VideoPhotoData.findPersonByPage(); |
| | | console.log("5"); |
| | | |
| | | this.setLoadSearch(this.VideoPhotoData.findPersonByPage()); |
| | | } |
| | | }, |
| | |
| | | this.VideoPhotoData.queryAlarmlevel = []; |
| | | this.VideoPhotoData.searchTime = this.getDateInit(); |
| | | this.VideoPhotoData.inputValue = ""; |
| | | |
| | | console.log(this.searchTime); |
| | | |
| | | this.searchTime = this.getDateInit(); |
| | | if (!this.VideoPhotoData.uploadType) { |
| | | // this.VideoPhotoData.querySearchList(); |
| | |
| | | return ""; |
| | | } |
| | | return ( |
| | | "/httpImage/" + url + (url.indexOf("?") >= 0 ? "&" : "?") + "width=160" |
| | | "http://" + url + (url.indexOf("?") >= 0 ? "&" : "?") + "width=160" |
| | | ); |
| | | }, |
| | | }, |
| | |
| | | ref="picSmBox" |
| | | > |
| | | <div class="card-img-box-compear-left"> |
| | | <!-- <img :src="'/httpImage/'+data.targetInfo[0].picSmUrl" ref="picSm" /> --> |
| | | <!-- <img :src="'http://'+data.targetInfo[0].picSmUrl" ref="picSm" /> --> |
| | | <img-down |
| | | :url="data.targetInfo[0].picSmUrl" |
| | | :isPreview="false" |
| | |
| | | v-for="(item, index) in data.baseInfo" |
| | | :key="index" |
| | | > |
| | | <!-- <img :src="'/httpImage/'+item.targetPicUrl" /> --> |
| | | <!-- <img :src="'http://'+item.targetPicUrl" /> --> |
| | | <img-down |
| | | :url="item.targetPicUrl" |
| | | :isPreview="false" |
| | |
| | | class="card-img-box-compear-left" |
| | | style="width: 60%; margin-top: 5px" |
| | | > |
| | | <!-- <img :src="'/httpImage/'+data.targetInfo[0].picSmUrl" /> --> |
| | | <!-- <img :src="'http://'+data.targetInfo[0].picSmUrl" /> --> |
| | | <img-down |
| | | :url="data.targetInfo[0].picSmUrl" |
| | | :isPreview="false" |
| | |
| | | > |
| | | <div class="img-box"> |
| | | <!-- <video |
| | | :src="'/httpImage/' + data.videoUrl" |
| | | :src="'http://' + data.videoUrl" |
| | | controls |
| | | style="margin-top: 12px;" |
| | | > |
| | |
| | | v-for="(item, index) in data.baseInfo" |
| | | :key="index" |
| | | > |
| | | <!-- <img :src="'/httpImage/'+item.targetPicUrl" /> --> |
| | | <!-- <img :src="'http://'+item.targetPicUrl" /> --> |
| | | <img-down |
| | | :url="item.targetPicUrl" |
| | | :isPreview="false" |
| | |
| | | class="card-img-box-compear-left" |
| | | style="width: 60%; margin-top: 5px" |
| | | > |
| | | <!-- <img :src="'/httpImage/'+data.targetInfo[0].picSmUrl" /> --> |
| | | <!-- <img :src="'http://'+data.targetInfo[0].picSmUrl" /> --> |
| | | <img-down |
| | | :url="data.targetInfo[0].picSmUrl" |
| | | :isPreview="false" |
| | |
| | | </p> |
| | | <div class="upload-img-box"> |
| | | <img |
| | | :src="'/httpImage/' + tempUploadImg" |
| | | :src="'http://' + tempUploadImg" |
| | | alt="临时测试" |
| | | v-show="!displayUpload" |
| | | class="bigPhoto" |
| | |
| | | :key="index" |
| | | > |
| | | <img |
| | | :src="item ? '/httpImage/' + item : tempImg" |
| | | :src="item ? 'http://' + item : tempImg" |
| | | @click="selected($event, index)" |
| | | style="max-height: 100%" |
| | | :style="index == clickNum ? 'border:1px solid #FF7733' : ''" |
| | |
| | | console.log("切图返回:", res); |
| | | if (res.success) { |
| | | document.querySelector(".el-upload-list").querySelector("img").src = |
| | | "/httpImage/" + res.data.uploadImage; |
| | | "http://" + res.data.uploadImage; |
| | | this.resReady = true; |
| | | this.realSmallPath = res.data.smImage; |
| | | this.VideoPhotoData.isHaveRealSmallImg = |
| | |
| | | <template> |
| | | <div class="imgBox"> |
| | | <img |
| | | :src="'/httpImage/'+url" |
| | | class="cursor-pointer" |
| | | v-if="isPreview" |
| | | preview |
| | | /> |
| | | <img |
| | | :src="'/httpImage/'+url" |
| | | v-if="!isPreview" |
| | | /> |
| | | <el-button class="btn" @click="downloadIamge('/httpImage/'+url)"> |
| | | <i class="iconfont iconxiazai"></i> |
| | | </el-button> |
| | | </div> |
| | | <div class="imgBox"> |
| | | <img |
| | | :src="'http://' + url" |
| | | class="cursor-pointer" |
| | | v-if="isPreview" |
| | | preview |
| | | /> |
| | | <img :src="'http://' + url" v-if="!isPreview" /> |
| | | <el-button class="btn" @click="downloadIamge('http://' + url)"> |
| | | <i class="iconfont iconxiazai"></i> |
| | | </el-button> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import axios from "axios" |
| | | import axios from "axios"; |
| | | export default { |
| | | props:{ |
| | | url: { |
| | | default: "", |
| | | type: String |
| | | }, |
| | | isPreview: { |
| | | default: true, |
| | | type: Boolean |
| | | } |
| | | }, |
| | | methods:{ |
| | | props: { |
| | | url: { |
| | | default: "", |
| | | type: String, |
| | | }, |
| | | isPreview: { |
| | | default: true, |
| | | type: Boolean, |
| | | }, |
| | | }, |
| | | methods: { |
| | | downloadIamge(url) { |
| | | this.$notify.info({ |
| | | title: '消息', |
| | | message: '资源下载中,请稍后...' |
| | | }); |
| | | title: "消息", |
| | | message: "资源下载中,请稍后...", |
| | | }); |
| | | axios({ |
| | | method: "get", |
| | | url: url, |
| | | responseType: 'blob' |
| | | }).then(res => { |
| | | if (res.status == 200) { |
| | | var a = document.createElement('a') |
| | | var strs = url.split('/') |
| | | var href = new Blob([res.data],{type: 'image/jpeg'}) |
| | | a.href = URL.createObjectURL(href); |
| | | a.download = strs[strs.length - 1]+'.jpg' |
| | | a.click() |
| | | } |
| | | }).catch(err => { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "下载失败,"+err+"请重试!", |
| | | }) |
| | | responseType: "blob", |
| | | }) |
| | | .then((res) => { |
| | | if (res.status == 200) { |
| | | var a = document.createElement("a"); |
| | | var strs = url.split("/"); |
| | | var href = new Blob([res.data], { type: "image/jpeg" }); |
| | | a.href = URL.createObjectURL(href); |
| | | a.download = strs[strs.length - 1] + ".jpg"; |
| | | a.click(); |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "下载失败," + err + "请重试!", |
| | | }); |
| | | }); |
| | | }, |
| | | } |
| | | |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .imgBox{ |
| | | .imgBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | object-fit: contain |
| | | object-fit: contain; |
| | | } |
| | | .btn { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: absolute; |
| | | padding: 0; |
| | | right: 20%; |
| | | opacity: 1; |
| | | bottom: 10px; |
| | | -webkit-animation: fadenum 0.7s ease; |
| | | display: none; |
| | | i { |
| | | font-size: 20px; |
| | | } |
| | | .btn { |
| | | width: 30px; |
| | | height: 30px; |
| | | position: absolute; |
| | | padding: 0; |
| | | right: 20%; |
| | | opacity: 1; |
| | | bottom: 10px; |
| | | -webkit-animation: fadenum 0.7s ease; |
| | | display: none; |
| | | i { |
| | | font-size: 20px |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .imgBox:hover .btn { |
| | | display: inline; |
| | | } |
| | | @-webkit-keyframes fadenum{ /*设置内容由显示变为隐藏*/ |
| | | @-webkit-keyframes fadenum { |
| | | /*设置内容由显示变为隐藏*/ |
| | | |
| | | 0%{opacity: 0;} |
| | | 0% { |
| | | opacity: 0; |
| | | } |
| | | |
| | | 100%{opacity: 1;} |
| | | |
| | | 100% { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | |
| | | url = this.videoUrl; |
| | | } else { |
| | | url = "/httpImage/" + this.videoUrls[this.playerIndex]; |
| | | url = "http://" + this.videoUrls[this.playerIndex]; |
| | | } |
| | | |
| | | this.videoLoading = true; |
| | |
| | | |
| | | let url = "http://" + window.location.host + this.loadUrl; |
| | | |
| | | // let url = "http://localhost:8080/httpImage/192.168.20.189:6700/283,2f49bf283ad7?collection=2021-09-28-DSVAD010120190703-video" |
| | | // let url = "http://localhost:8080http://192.168.20.189:6700/283,2f49bf283ad7?collection=2021-09-28-DSVAD010120190703-video" |
| | | let name = url.substring(url.lastIndexOf("/") + 1); |
| | | let responsePromise = await fetch(url); |
| | | let blob = await responsePromise.blob(); |
| | |
| | | <template> |
| | | <div class="column"> |
| | | <div class="search_cluster"> |
| | | <el-select |
| | | v-model="cluster" |
| | | placeholder="请选择集群" |
| | | @change="selectCluster" |
| | | > |
| | | <el-option |
| | | v-for="item in clusterArr" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="column-left"> |
| | | <div class="resize-bar"></div> |
| | | <div class="resize-line"></div> |
| | | <div class="resize-save"> |
| | | <left-nav :appName="'Search'" :height="screenHeight - 40"></left-nav> |
| | | <left-nav :appName="'Camera'"></left-nav> |
| | | </div> |
| | | </div> |
| | | <div class="column-right"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import LeftNav from "./components/LeftNav"; |
| | | import LeftNav from "@/components/CameraLeft"; |
| | | import RightSide from "./Searching"; |
| | | import CardWindow from "./components/CardWindow"; |
| | | import { getClusterDevList } from "@/api/clusterManage"; |
| | | |
| | | export default { |
| | | name: "SearchPage", |
| | |
| | | data() { |
| | | return { |
| | | screenHeight: 0, |
| | | clusterArr: [], |
| | | cluster: "", |
| | | }; |
| | | }, |
| | | created() { |
| | | // this.parseUrl(); |
| | | this.getCluster(); |
| | | }, |
| | | mounted() { |
| | | this.screenHeight = document.documentElement.clientHeight - 20; |
| | |
| | | }, |
| | | methods: { |
| | | parseUrl() {}, |
| | | selectCluster(val) { |
| | | const arr = val.split("$$"); |
| | | if (arr[0] == "0") { |
| | | sessionStorage.setItem("clusterId", arr[1]); |
| | | sessionStorage.setItem("devId", ""); |
| | | console.log(this.clusterData); |
| | | this.clusterData.forEach((item) => { |
| | | if (arr[1] == item.cluster_id) { |
| | | sessionStorage.setItem("nodeId", item.nodeList[0].devId); |
| | | } |
| | | }); |
| | | } |
| | | if (arr[0] == "1") { |
| | | sessionStorage.setItem("clusterId", ""); |
| | | sessionStorage.setItem("devId", arr[1]); |
| | | sessionStorage.setItem("nodeId", arr[1]); |
| | | } |
| | | this.TreeDataPool.fetchTreeData(); |
| | | this.PollData.statisticTaskInfo(); |
| | | this.VideoManageData.init(); |
| | | this.PollData.statistics(); |
| | | }, |
| | | async getCluster() { |
| | | const res = await getClusterDevList(); |
| | | if (res && res.success) { |
| | | this.clusterData = res.data.clusterList; |
| | | if (res.data.clusterList <= 0 && res.data.devList <= 0) { |
| | | this.$confirm( |
| | | "系统检测到您还未添加设备, 请在设备管理页面维护", |
| | | "提示", |
| | | { |
| | | confirmButtonText: "跳转", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | this.$router.push("/manageCenter"); |
| | | }) |
| | | .catch(() => {}); |
| | | } |
| | | |
| | | res.data.clusterList.forEach((item) => { |
| | | this.clusterArr.push({ |
| | | label: item.cluster_name, |
| | | value: "0$$" + item.cluster_id, |
| | | }); |
| | | }); |
| | | |
| | | res.data.devList.forEach((item) => { |
| | | this.clusterArr.push({ |
| | | label: item.devName, |
| | | value: "1$$" + item.devId, |
| | | }); |
| | | }); |
| | | |
| | | this.cluster = this.clusterArr[0].value; |
| | | this.selectCluster(this.clusterArr[0].value); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | height: inherit; |
| | | } |
| | | |
| | | .search_cluster { |
| | | top: 12px; |
| | | left: 172px; |
| | | position: fixed; |
| | | width: 135px; |
| | | z-index: 4; |
| | | } |
| | | |
| | | /* Firefox只有下面一小块区域可以拉伸 */ |
| | | @supports (-moz-user-select: none) { |
| | | .resize-bar:hover ~ .resize-line, |