|
@@ -13,7 +13,8 @@
|
|
|
</el-carousel>
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
- <div>设备名称:13号地1区太阳能测报灯</div>
|
|
|
+ <span>设备名称:13号地1区太阳能测报灯 </span>
|
|
|
+ <span><button class="dwbutton" @click="sbdw">定位</button></span>
|
|
|
<div>检测区域:13号地东区</div>
|
|
|
<div>识别数量:7</div>
|
|
|
<div>识别种类:5</div>
|
|
@@ -22,6 +23,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ Store
|
|
|
+ } from '@/store/index'
|
|
|
+ let store = Store();
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -38,6 +43,19 @@
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
+ methods: {
|
|
|
+ sbdw() {
|
|
|
+ store.isflyto = true
|
|
|
+ console.log(store.isflyto)
|
|
|
+ let PointObject = new this.jt3dSDK.PointObject(window.viewer);
|
|
|
+ PointObject.addPoint([120.623, 36.9157, 1800]).then(res1 => {
|
|
|
+ var LocateUtil = new this.jt3dSDK.LocateUtil(window["viewer"]);
|
|
|
+ LocateUtil.flyToEntity(res1).then(res2 => {
|
|
|
+ console.log('定位成功')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
@@ -73,4 +91,28 @@
|
|
|
font-size: 16rem;
|
|
|
text-align: left;
|
|
|
}
|
|
|
-</style>
|
|
|
+
|
|
|
+ .dwbutton {
|
|
|
+ display: inline-block;
|
|
|
+ font-size: 14rem;
|
|
|
+ cursor: pointer;
|
|
|
+ text-align: center;
|
|
|
+ text-decoration: none;
|
|
|
+ outline: none;
|
|
|
+ color: #fff;
|
|
|
+ background-color: rgba(29,191,205,1);
|
|
|
+ border: none;
|
|
|
+ border-radius: 15rem;
|
|
|
+ box-shadow: 0 4rem #ffff00;
|
|
|
+ }
|
|
|
+
|
|
|
+ .dwbutton:hover {
|
|
|
+ background-color: rgb(255, 0, 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ .dwbutton:active {
|
|
|
+ background-color: rgb(255, 0, 0);
|
|
|
+ box-shadow: 0 4rem #666;
|
|
|
+ transform: translateY(4rem);
|
|
|
+ }
|
|
|
+</style>
|