Parcourir la Source

[FE]修改提交 屏蔽视频标记

chenxr3 4 ans auparavant
Parent
commit
7040498e2c

+ 1 - 5
security-protection-platform/src/layout/index.vue

46
  },
46
  },
47
  mounted() {
47
  mounted() {
48
    // 镜屏调用
48
    // 镜屏调用
49
    this.connect()
49
    // this.connect()
50
  },
50
  },
51
  methods: {
51
  methods: {
52
    connect() {
52
    connect() {
53
      debugger
54
      if (this.stompClient == null || !this.stompClient.connected()) {
53
      if (this.stompClient == null || !this.stompClient.connected()) {
55
        this.stompClient = new StompClient('ws://10.19.90.34:7200/stomp')
54
        this.stompClient = new StompClient('ws://10.19.90.34:7200/stomp')
56
        this.stompClient.connect('zhangsan', '123456', () => { this.connectCallback() }, () => { this.errorCallback() })
55
        this.stompClient.connect('zhangsan', '123456', () => { this.connectCallback() }, () => { this.errorCallback() })
57
      } else {
56
      } else {
58
        debugger
59
        console.log('当前处于连接状态')
57
        console.log('当前处于连接状态')
60
      }
58
      }
61
    },
59
    },
62
    connectCallback() {
60
    connectCallback() {
63
      debugger
64
      console.log('connectCallback')
61
      console.log('connectCallback')
65
      this.stompClient.subscribe('sendAiData', (msg) => {
62
      this.stompClient.subscribe('sendAiData', (msg) => {
66
        console.log(msg)
63
        console.log(msg)
73
      EventBus.$emit('connected', true)
70
      EventBus.$emit('connected', true)
74
    },
71
    },
75
    errorCallback() {
72
    errorCallback() {
76
      debugger
77
      console.log('errorCallback')
73
      console.log('errorCallback')
78
      EventBus.$emit('connected', false)
74
      EventBus.$emit('connected', false)
79
      this.connect()
75
      this.connect()

+ 15 - 16
security-protection-platform/src/modules/dashboard/index.vue

179
    setInterval(() => { // 识别记录
179
    setInterval(() => { // 识别记录
180
      this.initRecognition()
180
      this.initRecognition()
181
    }, 5000)
181
    }, 5000)
182
    EventBus.$on('sendAiData', (msg) => { // 获取镜屏推送消息
183
      console.log('已接收镜屏消息...')
184
      var oDiv = document.getElementById("div111");
185
      var hkks = this.getByClass(oDiv,"hkk");
186
      hkks.forEach(e => {
187
        e.remove()
188
      })
189
190
      msg = JSON.parse(msg)
191
      JSON.parse(msg.idenResult).forEach(e => {
192
        if(e.box) {
193
          this.testHKK(e.box, e.alarmMemo)
194
        }
195
      })
196
    })
182
    // EventBus.$on('sendAiData', (msg) => { // 获取镜屏推送消息
183
    //   console.log('已接收镜屏消息...')
184
    //   var oDiv = document.getElementById("div111");
185
    //   var hkks = this.getByClass(oDiv,"hkk");
186
    //   hkks.forEach(e => {
187
    //     e.remove()
188
    //   })
189
    //
190
    //   msg = JSON.parse(msg)
191
    //   JSON.parse(msg.idenResult).forEach(e => {
192
    //     if(e.box) {
193
    //       this.testHKK(e.box, e.alarmMemo)
194
    //     }
195
    //   })
196
    // })
197
  },
197
  },
198
  methods: {
198
  methods: {
199
    testHKK(box, alarmMemo) {
199
    testHKK(box, alarmMemo) {
200
      debugger
201
      var width = box[2] - box[0]
200
      var width = box[2] - box[0]
202
      var height = box[3] - box[1]
201
      var height = box[3] - box[1]
203
      var oDiv = document.getElementById("div111");
202
      var oDiv = document.getElementById("div111");