Ver código fonte

* 桩机实时指标

chen.cheng 4 meses atrás
pai
commit
9e02e3d149

+ 1 - 0
src/assets/icons/svg/location.svg

@@ -0,0 +1 @@
+<svg t="1741414341083" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4562" width="256" height="256"><path d="M87.424 469.312a426.816 426.816 0 0 1 381.888-381.888V0h85.376v87.424a426.816 426.816 0 0 1 381.888 381.888H1024v85.376h-87.424a426.816 426.816 0 0 1-381.888 381.888V1024H469.312v-87.424a426.816 426.816 0 0 1-381.888-381.888H0V469.312h87.424z m424.576 384A341.312 341.312 0 1 0 512 170.688a341.312 341.312 0 0 0 0 682.624z m0-170.624a170.688 170.688 0 1 0 0-341.376 170.688 170.688 0 0 0 0 341.376z" fill="#ffffff" p-id="4563"></path></svg>

+ 7 - 0
src/views/cons/screen/ContentBlock.vue

@@ -2,6 +2,9 @@
   <div class="block-content">
     <div class="container-title">
       {{ title }}
+      <div class="container-title-right">
+        <slot name="title-right"></slot>
+      </div>
     </div>
     <slot name="content"></slot>
   </div>
@@ -44,6 +47,10 @@ export default {
     background: url("./img/block-header-bg.png") 100% 100% no-repeat;
     background-size: 100% 100%;
     letter-spacing: 1px;
+
+    .container-title-right {
+      margin-left: auto;
+    }
   }
 }
 </style>

+ 6 - 1
src/views/cons/screen/MachineIndex.vue

@@ -1,11 +1,16 @@
 <template>
   <content-block title="Piling Machine" class="pile-machine-status">
+    <template v-slot:title-right>
+      <slot name="title-right" :data="selectMachine">
+
+      </slot>
+    </template>
     <template v-slot:content>
       <div class="offset-status">
         <div class="offset-title">
           <span>Drill Rod Inclination</span>
           <span
-            :class="{'verticality-tolerance':true, 'warning': calcDeviation(machineLatextIndex.verticalDeviation) }">
+              :class="{'verticality-tolerance':true, 'warning': calcDeviation(machineLatextIndex.verticalDeviation) }">
                 verticality tolerance:
                 <span class="value">
                   {{ machineLatextIndex.verticalDeviation * 100 || 0 }} %

+ 26 - 1
src/views/cons/screen/index.vue

@@ -58,7 +58,26 @@
           </div>
         </template>
       </content-block>
-      <MachineIndex v-if="selectMachine" :select-machine="selectMachine"></MachineIndex>
+      <MachineIndex v-if="selectMachine" :select-machine="selectMachine">
+        <template v-slot:title-right="scop">
+          <el-tooltip
+              class="item"
+              effect="dark"
+              content="click to machine"
+              placement="top"
+          >
+            <svg-icon icon-class="location" @click="()=>{locationMachine(scop.data)}"/>
+          </el-tooltip>
+          <el-tooltip
+              class="item"
+              effect="dark"
+              content="close"
+              placement="top"
+          >
+            <i class="el-icon-close" @click="()=>{locationClose()}" style="margin-left: 5px"/>
+          </el-tooltip>
+        </template>
+      </MachineIndex>
     </div>
     <PileHoleDetail ref="pileHoleDialog"/>
   </div>
@@ -284,6 +303,12 @@ export default {
     },
     handleClick(e) {
     },
+    locationMachine(selectMachine) {
+      this.mapIns.flyToPoint([selectMachine.lng, selectMachine.lat], {duration: 1000})
+    },
+    locationClose() {
+      this.selectMachine = null
+    },
     pileHoleClick(pileHole) {
       this.$refs.pileHoleDialog.showDialog(pileHole)
     },