Jelajahi Sumber

Merge branch 'ZHNY_DCF' into ZHNY_WW

PC-20230501XVZZ\Administrator 1 tahun lalu
induk
melakukan
1465a717fe

+ 1 - 1
src/router/index.js

@@ -42,7 +42,7 @@ export const constantRoutes = [
 				name: 'Map3d',
 				component: () => import('../views/Map3d/Map3DMain.vue'),
 				meta: {
-					keepAlive: false // 需要缓存
+					keepAlive: true // 需要缓存
 				}
 			}, {
 				path: 'echarts',

+ 0 - 0
src/views/Map3d/components/DataTime.vue → src/views/Main/components/DataTime.vue


+ 2 - 2
src/views/Main/components/ZhHeader.vue

@@ -28,9 +28,9 @@
 </template>
 
 <script>
-	import DataTime from "../../Map3d/components/DataTime.vue";
+	import DataTime from "./DataTime.vue";
 
-	import weather from "../../Map3d/components/weather.vue"
+	import weather from "./weather.vue"
 
 	export default {
 		name: "ZhHeader",

+ 0 - 0
src/views/Map3d/components/weather.vue → src/views/Main/components/weather.vue


+ 29 - 64
src/views/Map3d/Map3DMain.vue

@@ -1,83 +1,48 @@
 <script setup>
-	/**
-	 * 业务组件,在components中进行注册
-	 */
-	//组件异步加载
-	// import {
-	// 	defineAsyncComponent
-	// } from 'vue';
 	import ggsbtj from "./components/ggsbtj.vue";
 	import ysltj from "./components/ysltj.vue";
 	import sbyxjc from "./components/sbyxjc.vue";
 	import qtnhzb from "./components/qtnhzb.vue";
 	import nhtbtj from "./components/nhtbtj.vue";
 	import znjk from "./components/znjk.vue";
-	import {
-		provide
-	} from "vue";
+
 	import {
 		Store
 	} from '@/store/index'
 	store = Store()
-
-	/**
-	 * 通过provide/inject可以轻松实现跨级访问父组件的数据
-	 * provide和inject是成对出现的
-	 * 必须放在setup内
-	 * 简单的来说就是在父组件中通过provider来提供变量,然后在子组件中通过inject来注入变量
-	 * provide 和 inject 绑定并不是可响应的。这是刻意为之的。
-	 * 代码执行顺序data->provide->created->mounted
-	 */
-	provide("getMapInstance", () => {
-		return jt3d;
-	});
 </script>
 
 <template>
-	<div class="jt-mapMain">
-		<!-- 地图组件 -->
-
-		<!-- 地图加载完成后,在加载其他组件 -->
-
-		
-
-		<!-- 弹出框组件,tabs组件测试 -->
-		<jt-popup title="地区导航" ref="refmapNavigate" :isEmit="true" @closeJTPopup="closeMapNavigate">
-			<mapNavigate ref="_refmapNavigate"></mapNavigate>
-		</jt-popup>
-
-		<!-- 关键字查询组件 -->
-		<!-- <queryKeyword ref="queryword" /> -->
+	<!-- 地图组件 -->
 
-		<jt-popup2 title="灌溉设备统计" ref="ggsbtj">
-			<ggsbtj ref="_ggsbtj"></ggsbtj>
-		</jt-popup2>
+	<!-- 地图加载完成后,在加载其他组件 -->
 
-		<jt-popup2 title="设备运行监测" top="calc(calc(100% - 115rem) / 3 + 90rem)" ref="sbyxjc">
-			<sbyxjc ref="_sbyxjc"></sbyxjc>
-		</jt-popup2>
+	<jt-popup2 title="灌溉设备统计" ref="ggsbtj">
+		<ggsbtj ref="_ggsbtj"></ggsbtj>
+	</jt-popup2>
 
-		<jt-popup2 title="灌溉水位监测" top="calc(calc(100% - 115rem) / 3 + calc(100% - 115rem) / 3 + 90rem)" ref="qtnhzb">
-			<qtnhzb ref="_qtnhzb"></qtnhzb>
-		</jt-popup2>
+	<jt-popup2 title="设备运行监测" top="calc(calc(100% - 115rem) / 3 + 90rem)" ref="sbyxjc">
+		<sbyxjc ref="_sbyxjc"></sbyxjc>
+	</jt-popup2>
 
-		<jt-popup3 title="用水量统计" ref="ysltj">
-			<ysltj ref="_ysltj"></ysltj>
-		</jt-popup3>
+	<jt-popup2 title="灌溉水位监测" top="calc(calc(100% - 115rem) / 3 + calc(100% - 115rem) / 3 + 90rem)" ref="qtnhzb">
+		<qtnhzb ref="_qtnhzb"></qtnhzb>
+	</jt-popup2>
 
-		<jt-popup3 title="能耗同比统计" top="calc(calc(100% - 115rem) / 3 + 90rem)" ref="nhtbtj">
-			<nhtbtj ref="_nhtbtj"></nhtbtj>
-		</jt-popup3>
+	<jt-popup3 title="用水量统计" ref="ysltj">
+		<ysltj ref="_ysltj"></ysltj>
+	</jt-popup3>
 
-		<jt-popup3 title="智能监控" top="calc(calc(100% - 115rem) / 3 + calc(100% - 115rem) / 3 + 90rem)" ref="znjk">
-			<znjk ref="_znjk"></znjk>
-		</jt-popup3>
+	<jt-popup3 title="能耗同比统计" top="calc(calc(100% - 115rem) / 3 + 90rem)" ref="nhtbtj">
+		<nhtbtj ref="_nhtbtj"></nhtbtj>
+	</jt-popup3>
 
-	</div>
+	<jt-popup3 title="智能监控" top="calc(calc(100% - 115rem) / 3 + calc(100% - 115rem) / 3 + 90rem)" ref="znjk">
+		<znjk ref="_znjk"></znjk>
+	</jt-popup3>
 </template>
 
 <script>
-	import * as echarts from "echarts";
 	let store = undefined
 	let jt3d = undefined;
 	let tipEntity = undefined;
@@ -115,12 +80,12 @@
 	};
 </script>
 <style lang="scss" scoped>
-	.jt-mapMain {
-		z-index: 15;
-		// position: absolute;
-		width: 100%;
-		height: 100%;
-		top: 0;
-		pointer-events: none;
-	}
+	// .jt-mapMain {
+	// 	z-index: 15;
+	// 	// position: absolute;
+	// 	width: 100%;
+	// 	height: 100%;
+	// 	top: 0;
+	// 	pointer-events: none;
+	// }
 </style>

+ 0 - 302
src/views/Map3d/components/qynhzb.vue

@@ -1,302 +0,0 @@
-<script setup>
-	import {
-		inject
-	} from "vue";
-	import html2canvas from 'html2canvas';
-	import {
-		blobToBase64,
-		base64ToBlob
-	} from '@/assets/js/blobtobase64';
-	const getMapInstance = inject("getMapInstance");
-	jt3d = getMapInstance();
-</script>
-
-<template>
-	<div class="mainview">
-		<div class="header">
-			
-		</div>
-		<div class="middleviewer">
-			<div class="viewer" v-for="(res,index) in ImgurlList" :key="index">
-				<div class="viewertop">
-					<img :src="res.url" @click="flyto(res.info)">
-				</div>
-				<div class="viewerbottom">
-					{{res.name}}
-					<img src="@/assets/images/delete.png" class="deleteImg" @click="deleteviewer(res,index)" />
-				</div>
-			</div>
-		</div>
-	</div>
-</template>
-
-<script>
-	let jt3d = undefined;
-	export default {
-		data() {
-			return {
-				// viewersName: '', //视角标签名称
-				// ImgurlList: [], //截图地址列表
-			}
-		},
-		methods: {
-			//获取输入框值
-			getName() {
-				this.viewersName = document.getElementById("inputValue").value;
-			},
-
-			//跳转方法
-			flyto(options) {
-				jt3d.LocateUtil.flyToPoint(options)
-			},
-
-			//删除方法,传keyvalue以及需要修改属性
-			deleteviewer(item, index) {
-				//删除对应数组内的对象
-				this.ImgurlList.splice(index, 1)
-				if (item.id) {
-					this.$http.get('/delete', {
-						tableName: 'sys_map_angle',
-						keyValue: item.id,
-					}).then(res => {
-						console.log(res.data)
-					})
-				}
-			},
-
-			//添加视角标签,当前页存数组,向数据库传入相机参数
-			addviewer() {
-				//获取当前界面截图方法
-				html2canvas(
-					this.$parent.$parent.$refs.refMap3d.$refs.cesiumContainer, {
-						// backgroundColor: null, //画出来的图片有白色的边框,不要可设置背景为透明色(null)
-						useCORS: true, //支持图片跨域
-						scale: 1 / 8, //设置放大的倍数
-					}
-				).then(canvas => {
-					//截图用img元素承装,显示在页面的上
-					let url = canvas.toDataURL('image/png')
-					//经纬度、高度
-					// 获取 相机姿态信息
-					let heading = window["viewer"].scene.camera.heading
-					let pitch = window["viewer"].scene.camera.pitch
-					let roll = window["viewer"].scene.camera.roll
-					let position = window["viewer"].scene.camera.positionCartographic
-					let longitude = Cesium.Math.toDegrees(position.longitude) //y
-					let latitude = Cesium.Math.toDegrees(position.latitude) //x
-					let height = position.height
-					let info = {
-						latitude: latitude,
-						longitude: longitude,
-						height: height,
-						pitch: Cesium.Math.toDegrees(pitch),
-						roll: Cesium.Math.toDegrees(roll),
-						heading: Cesium.Math.toDegrees(heading)
-					}
-					//dom for循环渲染列表
-					this.ImgurlList.unshift({
-						url: url,
-						name: this.viewersName,
-						info: info
-					})
-
-					//base64转换为二进制文件
-					// let blob = base64ToBlob(url)
-					// //文件转为文件流
-					// let formData = new FormData();
-					// formData.append('file',blob)
-
-					let data = {
-						name: this.viewersName,
-						x: latitude,
-						y: longitude,
-						z: height,
-						pitch: Cesium.Math.toDegrees(pitch),
-						roll: Cesium.Math.toDegrees(roll),
-						heading: Cesium.Math.toDegrees(heading),
-						screenshot: url,
-						userId: this.id,
-						// id:0
-					}
-
-					//添加数据接口
-					this.$http.post('/postSubmit', {
-						tableName: 'sys_map_angle',
-						keyValue: '',
-						formData: data,
-					}).then(res => {
-						console.log(res)
-						if (res.success == true) {
-
-						}
-					})
-				}).catch(err => {
-					console.log(err)
-				})
-			},
-			searchviewer() {
-				this.info = JSON.parse(localStorage.getItem('person'))
-				this.id = this.info.id
-				//获取所有图片数据
-				this.$http.get('/getTableList', {
-					tableName: 'sys_map_angle', //
-					sqlWhere: "name like '%" + this.viewersName + "%'",
-					orderByField: ''
-				}).then(res => {
-					console.log('获取图片', res.data)
-					this.ImgurlList = [];
-					res.data.forEach(item => {
-						let info = {
-							latitude: item.x,
-							longitude: item.y,
-							height: item.z,
-							pitch: item.pitch,
-							roll: item.roll,
-							heading: item.heading
-						}
-						// let url = blobToBase64(item.screenshot)
-						//dom for循环渲染列表
-						this.ImgurlList.push({
-							url: item.screenshot,
-							name: item.name,
-							info: info,
-							id: item.id
-						})
-					})
-
-					// console.log('img列表',this.ImgurlList)
-				})
-			}
-		},
-
-		mounted() {
-			this.info = JSON.parse(localStorage.getItem('person'))
-			this.id = this.info.id
-			//获取所有图片数据
-			this.$http.get('/getTableList', {
-				tableName: 'sys_map_angle', //
-				sqlWhere: '', //+ this.loginForm.id
-				orderByField: ''
-			}).then(res => {
-				console.log('获取图片', res.data)
-				res.data.forEach(item => {
-					let info = {
-						latitude: item.x,
-						longitude: item.y,
-						height: item.z,
-						pitch: item.pitch,
-						roll: item.roll,
-						heading: item.heading
-					}
-					// let url = blobToBase64(item.screenshot)
-					//dom for循环渲染列表
-					this.ImgurlList.push({
-						url: item.screenshot,
-						name: item.name,
-						info: info,
-						id: item.id
-					})
-				})
-
-				// console.log('img列表',this.ImgurlList)
-			})
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.mainview {
-		width: 100%;
-		height: 100%;
-
-		.header {
-			width: 100%;
-			display: flex;
-
-			input,
-			input:focus {
-				outline: none;
-				width: 185rem !important;
-				border: 1rem solid rgba(255, 255, 255, 0.8);
-				margin-right: 10rem;
-				height: 26rem !important;
-				color: rgba(255, 255, 255, 1);
-				background-color: rgba(255, 255, 255, 0) !important;
-				border-radius: 3rem;
-			}
-		}
-
-		.middleviewer {
-			width: 265rem;
-			height: 100%;
-			margin-left: 7rem;
-
-			.viewer {
-				width: 265rem !important;
-				height: 196rem !important;
-				margin-top: 15rem;
-				border: 1rem solid #ffffff !important;
-				border-radius: 1rem !important;
-
-				.viewertop {
-					width: 265rem !important;
-					height: 166rem !important;
-
-					img {
-						width: 100% !important;
-						height: 100% !important;
-					}
-				}
-
-				.viewerbottom {
-					line-height: 30rem !important;
-					text-align: center !important;
-					width: 265rem !important;
-					height: 30rem !important;
-					position: relative;
-					background-color: rgba(15, 145, 185, 0.7);
-
-					.deleteImg {
-						width: 24rem;
-						height: 24rem;
-						right: 5rem;
-						top: 3rem;
-						position: absolute;
-					}
-				}
-			}
-		}
-	}
-
-	::v-deep .el-input {
-		flex-grow: 0 !important;
-		width: 200rem !important;
-		// display: inline !important;
-		// margin-left: 5rem;
-		margin-right: 10rem;
-		height: 30rem !important;
-	}
-
-	//输入框文字颜色
-	::v-deep .el-input__inner {
-		color: rgba(255, 255, 255, 1)
-	}
-
-	//输入框背景色
-	::v-deep .el-input__wrapper {
-		background-color: rgba(255, 255, 255, 0) !important;
-	}
-
-	::v-deep .el-button {
-		border-radius: 3rem !important;
-
-	}
-
-	::v-deep .el-button--primary {
-		background-color: rgba(64, 158, 255, 0.6) !important;
-	}
-
-	::-webkit-scrollbar {
-		width: 0rem;
-	}
-</style>

+ 1 - 1
src/views/miaoqing/components/hczb.vue

@@ -182,7 +182,7 @@
 
 <style scoped>
 	#main3 {
-		width: 300rem;
+		width: 330rem;
 		height: 230rem;
 		margin-top: 15rem;
 	}

+ 4 - 3
src/views/test/components/disaster.vue

@@ -101,7 +101,7 @@
 					data: ["5/1", "5/2", "5/3", "5/4", "5/5"] //横坐标的标签文字
 				},
 				yAxis: {
-					type: "value",
+					// type: "category",
 					min: 0,
 					minInterval: 1,
 					nameGap: 0,
@@ -116,7 +116,7 @@
 
 					axisLabel: {
 						//x轴文字的配置
-						show: true,
+						show: false,
 						textStyle: {
 							color: "rgba(255,225,255,1)",
 						},
@@ -268,7 +268,8 @@
 </script>
 <style scoped>
 	#main {
-		width: 100%;
+		margin-left: 15rem;
+		width: calc(100% - 15rem);
 		height: 220rem;
 		margin-top: 15rem;
 	}