瀏覽代碼

应急截图上传

qinhouyu 2 年之前
父節點
當前提交
32c43293f8
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 3 1
      src/views/eventdetailsdialog.vue
  2. 3 2
      src/views/firespread.vue

+ 3 - 1
src/views/eventdetailsdialog.vue

@@ -2406,7 +2406,9 @@ console.log(this.dutysystemTableData)
       // let canvasBox = this.$refs.imageTofile
       let canvasBox = document.getElementById('forestWarmSuperMap')
       let toolbar = document.getElementById('toolbar')
-      canvasBox.removeChild(toolbar)
+      if(toolbar!=null){
+        canvasBox.removeChild(toolbar)
+      }
       // 获取父级的宽高
       const width = parseInt(window.getComputedStyle(canvasBox).width)
       const height = parseInt(window.getComputedStyle(canvasBox).height)

+ 3 - 2
src/views/firespread.vue

@@ -3056,8 +3056,9 @@ export default {
       // let canvasBox = this.$refs.imageTofile
       let canvasBox = document.getElementById('forestWarmSuperMap')
       let toolbar = document.getElementById('toolbar')
-      canvasBox.removeChild(toolbar)
-      // 获取父级的宽高
+      if(toolbar!=null){
+        canvasBox.removeChild(toolbar)
+      }      // 获取父级的宽高
       const width = parseInt(window.getComputedStyle(canvasBox).width)
       const height = parseInt(window.getComputedStyle(canvasBox).height)