From 0dbf19e9f92f5cb1d5ca9a06fd268d3b16e466e3 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 07 十二月 2022 15:22:01 +0800
Subject: [PATCH] 完善断流监控,集群和设备详情的查询
---
src/views/search/Searching.vue | 106 ++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 93 insertions(+), 13 deletions(-)
diff --git a/src/views/search/Searching.vue b/src/views/search/Searching.vue
index bdf982c..07f201e 100644
--- a/src/views/search/Searching.vue
+++ b/src/views/search/Searching.vue
@@ -12,7 +12,7 @@
</div>
<div class="searching-right-content">
<div class="top">
- <el-tooltip content="浠ュ浘鎼滃浘" placement="bottom" popper-class="atooltip">
+ <!-- <el-tooltip content="浠ュ浘鎼滃浘" placement="bottom" popper-class="atooltip">
<el-button
@click="showUpload"
type="primary"
@@ -25,7 +25,7 @@
: 'margin-right: 20px;background-color:#cccccc;border-color:#cccccc'
"
></el-button>
- </el-tooltip>
+ </el-tooltip> -->
<!-- <p class="p-label" style="width: 16%">
<b>鏍囩锛�</b>
<el-select
@@ -78,7 +78,7 @@
></el-option>
</el-select>
</p>
- <p class="p-level" style="width: 18%; margin-right: 20px">
+ <p class="p-level" style="width: 14%; margin-left: 10px">
<b>浜嬩欢绛夌骇锛�</b>
<el-select
v-model="alarmValues"
@@ -87,11 +87,28 @@
:disabled="isDisabled"
collapse-tags
size="mini"
- style="width: calc(100% - 64px); min-width: 120px"
+ style="width: calc(100% - 90px); min-width: 120px"
placeholder="璇烽�夋嫨"
>
<el-option
v-for="item in VideoPhotoData.dictionary.ALARMLEVEL"
+ :key="item.id"
+ :label="item.name"
+ :value="item.value"
+ ></el-option>
+ </el-select>
+ </p>
+ <p class="p-level" style="width: 14%; margin-right: 20px">
+ <b>鎺掓煡绫诲瀷锛�</b>
+ <el-select
+ v-model="warningFlag"
+ @change="searchingBtn"
+ size="mini"
+ style="width: calc(100% - 90px); min-width: 120px"
+ placeholder="璇烽�夋嫨"
+ >
+ <el-option
+ v-for="item in waningOptions"
:key="item.id"
:label="item.name"
:value="item.value"
@@ -144,7 +161,7 @@
class="export-excel-wrapper"
:data="VideoPhotoData.cards"
:fields="json_fields"
- :name="'瑙嗛鍒嗘瀽鎶ヨ缁熻' + searchTimeFormated + '.xls'"
+ :name="'瑙嗛鍒嗘瀽鎶ヨ缁熻' + searchTimeFormated + '.xlsx'"
>
<!-- 涓婇潰鍙互鑷畾涔夎嚜宸辩殑鏍峰紡锛岃繕鍙互寮曠敤鍏朵粬缁勪欢button -->
<!-- <el-button type="primary" size="small">瀵煎嚭EXCEL</el-button> -->
@@ -266,12 +283,19 @@
import bus from "@/main"
import { getUrlKey } from "@/api/utils.ts"
import SetBox from "@/views/search/components/SetBox"
+import { saveWarning } from "@/api/es"
+
export default {
name: "RightSide",
components: {
Card,
UploadImg,
SetBox
+ },
+ computed: {
+ searchTimeFormated() {
+ return this.format(this.searchTime)
+ }
},
data() {
return {
@@ -285,6 +309,7 @@
searchImgCardWidth: "",
tagValues: [],
alarmValues: [],
+ warningFlag: 0,
taskValues: [],
showDownBox: false,
searchTime: [this.$moment().format("YYYY-MM-DD 00:00:00"), this.$moment().format("YYYY-MM-DD HH:mm:ss")],
@@ -292,7 +317,17 @@
currentPage: 1,
showSetBox: false,
json_fields: {
- // 閮ㄩ棬: "",
+ 閮ㄩ棬: {
+ field: "activeObject.cameraId",
+ //鑷畾涔夊洖璋冨嚱鏁�
+ callback: (value) => {
+ let org = ""
+ if (this.TreeDataPool.cameraParents.hasOwnProperty(value)) {
+ org = this.TreeDataPool.cameraParents[value]
+ }
+ return org
+ }
+ },
// 鍛婅鏍囪: "",
// 鏁存敼鎻忚堪: "",
鎽勫儚鏈篒D: "activeObject.cameraId",
@@ -328,12 +363,39 @@
return value.length ? value[0].areaName : ""
}
}
- }
- }
- },
- computed: {
- searchTimeFormated() {
- return this.format(this.searchTime)
+ },
+ waningOptions: [
+ {
+ id: 0,
+ name: "鍏ㄩ儴",
+ value: 0
+ },
+ {
+ id: 1,
+ name: "璇姤",
+ value: 1
+ },
+ {
+ id: 2,
+ name: "宸叉暣鏀�",
+ value: 2
+ },
+ {
+ id: 3,
+ name: "鏈暣鏀�",
+ value: 3
+ },
+ {
+ id: 4,
+ name: "宸叉帓鏌�",
+ value: 4
+ },
+ {
+ id: 5,
+ name: "鏈帓鏌�",
+ value: 5
+ }
+ ]
}
},
created() {
@@ -611,7 +673,21 @@
this.VideoPhotoData.selectWhites = []
})
},
+
getDetails(ev, index) {
+ // 鏍囪宸叉帓鏌�
+ if (this.VideoPhotoData.cards[index].activeObject.warningFlag == 0) {
+ saveWarning({
+ warningFlag: 4,
+ id: this.VideoPhotoData.cards[index].activeObject.id,
+ correctionDescription: ""
+ }).then((rsp) => {
+ if (rsp && rsp.success) {
+ this.VideoPhotoData.cards[index].activeObject.warningFlag = 4
+ }
+ })
+ }
+
//let obj = this.CardList.datalist[index];
this.CardList.datalist = this.VideoPhotoData.cards
let obj = this.CardList.datalist[index]
@@ -686,7 +762,11 @@
this.VideoPhotoData.queryAlarmlevel = this.stringToNum()
+ // 鏃堕棿鑼冨洿
this.VideoPhotoData.searchTime = this.format(this.searchTime)
+
+ // 鎺掓煡鐧昏
+ this.VideoPhotoData.warningFlag = this.warningFlag
//this.VideoPhotoData.inputValue = this.searchText;
this.VideoPhotoData.showType = this.showType
@@ -697,7 +777,6 @@
} else {
this.setLoadSearch(this.VideoPhotoData.findPersonByPage())
}
- console.log("cards", this.VideoPhotoData.cards)
},
stringToNum() {
var arr = []
@@ -761,6 +840,7 @@
this.tagValues = []
this.taskValues = []
this.alarmValues = []
+ this.warningFlag = 0
this.VideoPhotoData.queryTabs = []
this.VideoPhotoData.queryTasks = []
this.VideoPhotoData.queryAlarmlevel = []
--
Gitblit v1.8.0