heyujie
2022-07-15 a0b5604fcefa0c7900ecc50830b718f77bba8f39
src/views/search/Searching.vue
@@ -37,7 +37,7 @@
              "
            ></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"
@@ -58,7 +58,7 @@
                :title="item.title"
              ></el-option>
            </el-select>
          </p>
          </p> -->
          <p class="p-task" style="width: 16%">
            <b>场景:</b>
            <el-select
@@ -89,9 +89,9 @@
              ></el-option>
            </el-select>
          </p>
          <p class="p-level" style="width: 18%">
          <p class="p-level" style="width: 18%; margin-right: 20px">
            <b>事件等级:</b>
            <!-- <el-select
            <el-select
              v-model="alarmValues"
              multiple
              @change="searchingBtn"
@@ -107,9 +107,9 @@
                :label="item.name"
                :value="item.value"
              ></el-option>
            </el-select> -->
            </el-select>
          </p>
          <p class="p-date" style="width: 19%; vertical-align: top">
          <p class="p-date" style="width: 22%; vertical-align: top">
            <el-date-picker
              size="mini"
              v-model="searchTime"
@@ -318,15 +318,16 @@
    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);
@@ -665,12 +666,18 @@
      ];
    },
    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,
@@ -682,23 +689,35 @@
      //处理搜索类型
      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());
      }
    },
@@ -769,6 +788,9 @@
      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();
@@ -808,7 +830,7 @@
};
</script>
<style lang="scss">
<style lang="scss" >
.searching-box {
  width: 100%;
  height: 100% !important;
@@ -984,9 +1006,6 @@
    right: 0px;
    bottom: 15px;
  }
}
.search {
  background-color: #eee;
}
</style>
<style lang="scss" scoped>