zhangzengfei
2021-02-04 0175cda6150656bc74b34c6f6c71edd1e1fc653c
src/pages/panoramicView/components/TracePlot.vue
@@ -51,7 +51,7 @@
import { getSearchList } from '@/api/search';
import { getPanoramaPic } from "@/api/panorama";
export default {
  data () {
  data() {
    return {
      cW: 0,
      cH: 0,
@@ -68,7 +68,7 @@
      pickerOptions: {
        shortcuts: [{
          text: '近一小时',
          onClick (picker) {
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 60 * 60 * 1000);
@@ -76,7 +76,7 @@
          }
        }, {
          text: '近三小时',
          onClick (picker) {
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 60 * 60 * 1000 * 3);
@@ -84,7 +84,7 @@
          }
        }, {
          text: '近六小时',
          onClick (picker) {
          onClick(picker) {
            const end = new Date();
            const start = new Date();
            start.setTime(start.getTime() - 60 * 60 * 1000 * 6);
@@ -106,18 +106,18 @@
      isInvert: false,
    }
  },
  mounted () {
  mounted() {
    this.searchData();
    //this.filterData();
    this.getPanorama();
  },
  beforeDestroy () {
  beforeDestroy() {
    console.log('beforeDestroy')
    clearInterval(this.timer);
  },
  methods: {
    checkTime () {
    checkTime() {
      if (!this.searchTime) {
        this.$notify({
          type: 'warning',
@@ -135,7 +135,7 @@
        this.searchData();
      }
    },
    filterData () {
    filterData() {
      let _this = this;
      var param = {
        page: 1,
@@ -181,13 +181,13 @@
        _this.drawTracePath();
      })
    },
    hideAllChange () {
    hideAllChange() {
      this.actObjs.forEach(target => {
        target.isHide = this.isHideAll;
      });
      this.drawTracePath();
    },
    invertChange () {
    invertChange() {
      console.log(this.isInvert)
      this.actObjs.forEach(target => {
        target.isHide = !target.isHide;
@@ -200,12 +200,12 @@
      }
      this.drawTracePath();
    },
    checkTarget (item) {
    checkTarget(item) {
      item.isHide = !item.isHide;
      this.isHideAll = item.isHide;
      this.drawTracePath();
    },
    getPanorama () {
    getPanorama() {
      let _this = this;
      getPanoramaPic().then(res => {
        let { panoramaPath, width, height } = res.data;
@@ -223,7 +223,7 @@
        }
      })
    },
    drawTracePath () {
    drawTracePath() {
      console.log(this.actObjs)
      let canvas = this.$refs['trackArea'];
      let ctx = canvas.getContext('2d');
@@ -256,7 +256,7 @@
        }
      })
    },
    searchData () {
    searchData() {
      let _this = this;
      var param = {
        page: 1,
@@ -269,7 +269,7 @@
        treeNodes: [],
        isAll: false
      };
      if((new Date() - _this.timeMark)<_this.intervalTime){
      if ((new Date() - _this.timeMark) < _this.intervalTime) {
        return
      }
      getSearchList(param).then(res => {