Browse Source

no message

PC-20230501XVZZ\Administrator 2 years ago
parent
commit
8dd1f67548
1 changed files with 39 additions and 4 deletions
  1. 39 4
      src/views/test/components/cqjcyj.vue

+ 39 - 4
src/views/test/components/cqjcyj.vue

@@ -45,13 +45,48 @@
 		},
 		methods: {
 			sbdw() {
-				store.isflyto = true
-				console.log(store.isflyto)
+				let that = this
 				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"]);
+				let Drawtools = new this.jt3dSDK.DrawTools(window.viewer)
+				//_createCircle
+				PointObject.addBillboard([120.624, 36.9158, 0], {
+					billboard: {
+						imgUrl: 'jt3dSDK/imgs/jijing1.png',
+						scale: 0.2,
+					}
+				}).then(res1 => {
 					var LocateUtil = new this.jt3dSDK.LocateUtil(window["viewer"]);
 					LocateUtil.flyToEntity(res1).then(res2 => {
-						console.log('定位成功')
+						let html = "";
+						html +=
+							"<div style='text-align: left;backfround-color:rgba(61, 198, 205, 0.6);width:300rem;height:150rem;font-family: TTTGB-Medium, sans-serif !important;'>";
+						html +=
+							"<div style='background-color: rgba(61, 198, 255, 0.4);line-height:30rem;height:30rem;margin:0;'>" +
+							"<span style='width:100rem'>设备名称:</span>" + "<span>13号地1区太阳能测报灯</span>" +
+							"</div>";
+						html +=
+							"<div style='background-color: rgba(0, 37, 98, 0.4);line-height:30rem;height:30rem;margin:0'>" +
+							"<span style='width:100rem'>设备编号:</span>" + "<span>01</span>" +
+							"</div>";
+						html +=
+							"<div style='background-color: rgba(61, 198, 255, 0.4);line-height:30rem;height:30rem;margin:0'>" +
+							"<span style='width:100rem'>电流:</span>" + "<span>10A</span>" +
+							"</div>";
+						html +=
+							"<div style='background-color: rgba(0, 37, 98, 0.4);line-height:30rem;height:30rem;margin:0'>" +
+							"<span style='width:100rem'>压力:</span>" + "<span>20Kpa</span>" +
+							"</div>";
+						html +=
+							"<div style='background-color: rgba(61, 198, 255, 0.4);line-height:30rem;height:30rem;margin:0'>" +
+							"<span style='width:100rem'>流量:</span>" + "<span>80m³/h</span>" +
+							"</div>";
+						html += "</div>";
+						let popup = new that.jt3dSDK.PopupWindow.HtmlWindow(window["viewer"], [120.624,
+							36.9158
+						], "设备信息", html, 50);
+						// this.createCircle()
+						// Drawtools._createCircle( Cesium.Cartesian3.fromDegrees(120.623, 36.9157),'dynamicCircle')
 					})
 				})
 			}