Просмотр исходного кода

短信接口,截图上传方法

qinhouyu 1 год назад
Родитель
Сommit
fe337a5438
3 измененных файлов с 37 добавлено и 37 удалено
  1. 19 19
      src/components/supermap.vue
  2. 13 13
      src/views/eventdetailsdialog.vue
  3. 5 5
      src/views/firespread.vue

+ 19 - 19
src/components/supermap.vue

@@ -1,28 +1,28 @@
 <template>
   <div v-bind:id="mapDivId" ref="map" style="width: 100%; height: 100%;background: none;">
     <transition-group
-      appear
-      name="animate__animated animate__bounce"
-      enter-active-class="animate__backInLeft"
-      leave-active-class="animate__backOutLeft"
-    >
-      <div id="toolbar" v-if="isdynamicPlotting" class="panel panel-primary" v-show="mapToolShowBH" key="mapFlash"
-           style="position:absolute;z-index: 9999;top:4rem;left: 1rem; border-radius: 4px; width: fit-content;height:635px;overflow-y:scroll;background:#040b1f">
-        <div class="panel-heading" id="panelheading">
-          <h5 style=" color: #2bacf7;font-size: 1rem;padding:.5rem;">鼠标标绘</h5>
-        </div>
-        <div class="panel-body content" id="panelbodycontent" style="margin-bottom: .5rem;padding-right: .5rem;">
-          <div align="right" class="button-group">
-            <el-button type="success" @click="PlottingDrawCancel">取消标绘</el-button>
-            &nbsp;&nbsp;
-            <el-button type="success" @click="clearLayers">清空标绘</el-button>
-          </div>
+                  appear
+                  name="animate__animated animate__bounce"
+                  enter-active-class="animate__backInLeft"
+                  leave-active-class="animate__backOutLeft"
+                >
+    <div id="toolbar" v-if="isdynamicPlotting" class="panel panel-primary" v-show="mapToolShowBH" key="mapFlash"
+         style="position:absolute;z-index: 9999;top:4rem;left: 1rem; border-radius: 4px; width: fit-content;height:635px;overflow-y:scroll;background:#040b1f" data-html2canvas-ignore>
+      <div class="panel-heading" id="panelheading">
+        <h5 style=" color: #2bacf7;font-size: 1rem;padding:.5rem;">鼠标标绘</h5>
+      </div>
+      <div class="panel-body content" id="panelbodycontent" style="margin-bottom: .5rem;padding-right: .5rem;">
+        <div align="right" class="button-group">
+          <el-button type="success" @click="PlottingDrawCancel">取消标绘</el-button>
+          &nbsp;&nbsp;
+          <el-button type="success" @click="clearLayers">清空标绘</el-button>
         </div>
-        <div id="plottingPanel">
-          <div id="plotPanel" style="width: 15rem;height:50%;overflow-y:scroll;">
-          </div>
+      </div>
+      <div id="plottingPanel">
+        <div id="plotPanel" style="width: 15rem;height:50%;overflow-y:scroll;">
         </div>
       </div>
+    </div>
     </transition-group>
     <div id="toolbar-heat" v-if="isheatPlotting" class="panel panel-primary"
          style="position:absolute;z-index: 9999; padding: 1rem; bottom:3rem;right: 1rem; border-radius: 4px; width: fit-content;height:fit-content;overflow-y:scroll;background:#040b1f">

+ 13 - 13
src/views/eventdetailsdialog.vue

@@ -2175,9 +2175,9 @@ export default {
       },
       table1: {
         reportUnit: null,
-        reportTimeY: null,
-        reportTimeM: null,
-        reportTimeD: null,
+        reportTimeY: new Date().getFullYear(),
+        reportTimeM: new Date().getMonth() + 1,
+        reportTimeD: new Date().getDate(),
         forestFireLossTotal: null,
         fireLossTotal: null,
         forestArea: null,
@@ -2218,11 +2218,11 @@ export default {
         fireSource: null,
         fireType: null,
         fireLevel: null,
-        areaTotal: null,
+        areaTotal: 0,
         forestLossAreaTotal: null,
         originalForestArea: null,
         artificialForestArea: null,
-        peopleTotal: null,
+        peopleTotal: 0,
         blazesTeamNumber: null,
         policeNumber: null,
         armyNumber: null,
@@ -2231,9 +2231,9 @@ export default {
         secondTool: null,
         waterGun: null,
         elseThings: null,
-        forestComposition: null,
-        forestToken: null,
-        porosities: null,
+        forestComposition: "无",
+        forestToken: "无",
+        porosities: "无",
         weather: null,
         temperature: null,
         fireInsuranceLevel: null,
@@ -3756,10 +3756,10 @@ export default {
       // imageTofile是给截图范围内的父级元素自定义的ref名称
       // let canvasBox = this.$refs.imageTofile
       let canvasBox = document.getElementById("forestWarmSuperMap");
-      let toolbar = document.getElementById("toolbar");
-      if (toolbar != null) {
-        canvasBox.removeChild(toolbar);
-      }
+      // let toolbar = document.getElementById("toolbar");
+      // if (toolbar != null) {
+      //   canvasBox.removeChild(toolbar);
+      // }
       // 获取父级的宽高
       const width = parseInt(window.getComputedStyle(canvasBox).width);
       const height = parseInt(window.getComputedStyle(canvasBox).height);
@@ -3781,7 +3781,7 @@ export default {
         let dataBase64 = canvas.toDataURL("image/png");
         this.uploadBase64(dataBase64);
       });
-      canvasBox.appendChild(toolbar);
+      // canvasBox.appendChild(toolbar);
     },
     uploadBase64(dataBase64) {
       //事件详情截图直接上传日志

+ 5 - 5
src/views/firespread.vue

@@ -3257,10 +3257,10 @@ export default {
       // imageTofile是给截图范围内的父级元素自定义的ref名称
       // let canvasBox = this.$refs.imageTofile
       let canvasBox = document.getElementById('forestWarmSuperMap')
-      let toolbar = document.getElementById('toolbar')
-      if (toolbar != null) {
-        canvasBox.removeChild(toolbar)
-      }
+      // let toolbar = document.getElementById('toolbar')
+      // if (toolbar != null) {
+      //   canvasBox.removeChild(toolbar)
+      // }
       // 获取父级的宽高
       const width = parseInt(window.getComputedStyle(canvasBox).width)
       const height = parseInt(window.getComputedStyle(canvasBox).height)
@@ -3282,7 +3282,7 @@ export default {
         let dataBase64 = canvas.toDataURL('image/png')
         this.uploadBase64(dataBase64)
       })
-      canvasBox.appendChild(toolbar)
+      // canvasBox.appendChild(toolbar)
     },
     uploadBase64(dataBase64) {
       //事件详情截图直接上传日志