zhangzengfei
2023-06-30 db5872786c1e1697a59af41386136ee002bb68ad
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
          }
        },
        // 告警标记: "",
        // 整改描述: "",
        摄像机ID: "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 = []