Browse Source

功能修改

gr 3 weeks ago
parent
commit
d48936737b

File diff suppressed because it is too large
+ 2883 - 0
pnpm-lock.yaml


+ 61 - 56
src/assets/styles/panel-form.scss

@@ -1,79 +1,84 @@
 // xx划设面板
 
 .p-main {
-  position: absolute;
-  left: 0;
-  top: 0;
-  width: 100%;
-  height: 100%;
-  overflow-y: auto;
-  padding-right: 10px;
+	position: absolute;
+	left: 0;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	overflow-y: auto;
+	padding-right: 10px;
 }
 
 .single-uplaod {
-  width: 100% !important;
+	width: 100% !important;
 
-  .el-upload {
-    width: 100%;
+	.el-upload {
+		width: 100%;
 
-    .upload-trigger {
-      display: flex;
-      align-items: center;
-      justify-content: center;
-      height: 38px;
-      width: 100%;
-      background: #62729489;
-      font-size: 16px;
+		.upload-trigger {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			height: 38px;
+			width: 100%;
+			background: #62729489;
+			font-size: 16px;
 
-      &::before {
-        content: '';
-        display: block;
-        width: 20px;
-        height: 20px;
-        margin-right: 5px;
-        background: url('@/assets/images/page/icon-upload.png');
-        background-size: cover;
-      }
-    }
-  }
+			&::before {
+				content: '';
+				display: block;
+				width: 20px;
+				height: 20px;
+				margin-right: 5px;
+				background: url('@/assets/images/page/icon-upload.png');
+				background-size: cover;
+			}
+		}
+	}
 }
 
 .msg-safe {
-  height: 32px;
-  border: 1px solid #007FBF;
-  background: #02264C;
-  line-height: 32px;
-  text-align: center;
+	height: 32px;
+	border: 1px solid #007fbf;
+	background: #02264c;
+	line-height: 32px;
+	text-align: center;
 }
 
 .risk-label {
-  font-size: 15px;
-  line-height: 15px;
-  padding: 5px 9px;
+	font-size: 15px;
+	line-height: 15px;
+	padding: 5px 9px;
 
-  &.green {
-    background: #69BB73;
-  }
+	&.green {
+		background: #69bb73;
+	}
 
-  &.orange {
-    background: #F16E46;
-  }
+	&.orange {
+		background: #f16e46;
+	}
 
-  &.red {
-    background: #ff0000;
-  }
+	&.red {
+		background: #ff0000;
+	}
 }
 
 .btn-inline {
-  display: block;
-  font-size: 16px;
-  line-height: 24px;
-  padding: 0 6px;
-  background: linear-gradient(to bottom, rgba(3, 0, 0, 0.34), rgba(255, 255, 255, 0.24));
-  border: 1px solid #5291F0;
-  cursor: pointer;
+	display: block;
+	font-size: 16px;
+	line-height: 24px;
+	padding: 0 6px;
+	background: linear-gradient(to bottom, rgba(3, 0, 0, 0.34), rgba(255, 255, 255, 0.24));
+	border: 1px solid #5291f0;
+	cursor: pointer;
 
-  &:hover {
-    filter: brightness(1.1);
-  }
+	&:hover {
+		filter: brightness(1.1);
+	}
+}
+
+.testt {
+	color: #ffff00;
+	color: #6eff25;
 }

+ 2 - 1
src/components/MapView.vue

@@ -27,7 +27,8 @@ export default {
 				id: 'i_map',
 				// url: 'http://localhost:5173/map-tool-widget/',
 				// url: 'https://cimweb.zjw.sh.cegn.cn:2007/map-tool-widget/#/',
-				url: 'http://172.16.8.44:9250/map-tool-widget/#/jk_map',
+				// url: 'http://172.16.8.44:9250/map-tool-widget/#/jk_map',
+				url: 'http://10.1.80.67:5173/map-tool-widget/',
 				onReady: function () {
 					console.log('地图创建完成')
 				},

+ 2 - 1
src/router.js

@@ -4,7 +4,8 @@ import { createRouter, createWebHashHistory } from 'vue-router'
 const defaultRoutes = [
 	{
 		path: '/',
-		redirect: '/login',
+		// redirect: '/login',
+		redirect: '/navigation',
 	},
 	{
 		path: '/navigation',

+ 9 - 0
src/utils/map/addLayer.js

@@ -534,3 +534,12 @@ export function toggleFeaturesClickEvent(status) {
 		token: '',
 	})
 }
+
+// 空域栅格修改高度
+export function setKysgHeight({ minZ, maxZ }) {
+	invokeParams('ChangeScaleEventCubeHeight', {
+		minZ,
+		maxZ,
+		token: '',
+	})
+}

+ 49 - 5
src/views/home/cpns/FloatPanelKysg.vue

@@ -53,8 +53,9 @@
 		<!-- 范围选择滑动条 -->
 		<el-slider
 			class="slider-bg range-slider"
-			:class="{ disabled: form.meshRange === '自适应' }"
+			:class="{ disabled: form.meshRange === '自适应' && form.meshLevel !== 23 }"
 			v-model="form.meshHeights"
+			@change="handleSlide"
 			:min="0"
 			:max="600"
 			range
@@ -65,7 +66,7 @@
 
 <script setup>
 import { ref, onBeforeUnmount, watch, reactive, nextTick } from 'vue'
-import { addKysgScale, DrawPolygon, QueryDistrict, QueryCube, clearDraw } from '@/utils/map/addLayer.js'
+import { addKysgScale, DrawPolygon, QueryDistrict, QueryCube, clearDraw, setKysgHeight } from '@/utils/map/addLayer.js'
 import useLayoutStore from '@/store/layout'
 import { useMapStore } from '@/store/map'
 import { GetDistrictTree } from '@/service/http'
@@ -180,9 +181,19 @@ watch(
 	(val) => {
 		if (val) {
 			form.value.meshLevel = val
-			const maxHeight =
-				Number(val) > 20 ? 30 : Math.min(600, Number(DenseData.find((d) => d.level == val).des.slice(1, -2)))
-			form.value.meshHeights = [0, maxHeight]
+			let maxHeight
+			let minHeight = 0
+			if (val === 23) {
+				minHeight = 90
+				maxHeight = 120
+			} else if (val > 20) {
+				maxHeight = 30
+			} else {
+				maxHeight = Math.min(600, Number(DenseData.find((d) => d.level == val).des.slice(1, -2)))
+			}
+			form.value.meshHeights = [minHeight, maxHeight]
+
+			lastMeshHeights = [minHeight, maxHeight]
 		}
 	}
 )
@@ -346,6 +357,39 @@ function getMesh(status) {
 	})
 }
 
+let lastMeshHeights
+
+function handleSlide(val) {
+	console.log('lastMeshHeights:', lastMeshHeights)
+	console.log('handleSlide:', val)
+	// form.value.meshHeights[1] = Math.min(val[0] + 30, 120)
+
+	let minHeight
+	let maxHeight
+
+	if (val[0] === lastMeshHeights[0]) {
+		maxHeight = Math.min(120, val[1])
+		minHeight = Math.max(0, maxHeight - 30)
+	} else if (val[1] === lastMeshHeights[1]) {
+		minHeight = val[0]
+		maxHeight = Math.min(120, minHeight + 30)
+	} else if (val[0] === lastMeshHeights[1]) {
+		minHeight = Math.min(120, val[1])
+		if (minHeight + 30 > 120) {
+			maxHeight = minHeight
+			minHeight = minHeight - 30
+		} else {
+			maxHeight = Math.min(120, minHeight + 30)
+		}
+	} else if (val[1] === lastMeshHeights[0]) {
+		maxHeight = Math.min(120, val[0])
+		minHeight = Math.max(0, maxHeight - 30)
+	}
+
+	form.value.meshHeights = [minHeight, maxHeight]
+	lastMeshHeights = [minHeight, maxHeight]
+}
+
 onBeforeUnmount(() => {
 	addKysgScale(false)
 	getMesh('hide')

+ 16 - 8
src/views/home/cpns/FloatPanelTsjs.vue

@@ -232,17 +232,25 @@ onBeforeMount(() => {
 				const { electricityWarning, weatherWarning, collision, noFlyZone, clearZone, nearstAircraft, routeDeviate } =
 					msg.Data.flightDataStatus
 
-				alertInfo.value.power.show = electricityWarning !== 'SAFE' && electricityWarning !== ''
+				if (electricityWarning === 'SAFE' || electricityWarning === '') {
+					alertInfo.value.power.show = false
+				}
 
-				alertInfo.value.weather.show = weatherWarning !== 'SAFE' && weatherWarning !== ''
+				if (weatherWarning === 'SAFE' || weatherWarning === '') {
+					alertInfo.value.weather.show = false
+				}
 
-				alertInfo.value.collision.show =
-					(nearstAircraft !== 'SAFE' && nearstAircraft !== '') || (collision !== 'SAFE' && collision !== '')
+				if ((nearstAircraft === 'SAFE' || nearstAircraft === '') && (collision === 'SAFE' || collision === '')) {
+					alertInfo.value.collision.show = false
+				}
 
-				alertInfo.value.area.show =
-					(noFlyZone !== 'SAFE' && noFlyZone !== '') || (clearZone !== 'SAFE' && clearZone !== '')
+				if ((noFlyZone === 'SAFE' || noFlyZone === '') && (clearZone === 'SAFE' || clearZone === '')) {
+					alertInfo.value.area.show = false
+				}
 
-				alertInfo.value.offCourse.show = routeDeviate
+				if (!routeDeviate) {
+					alertInfo.value.offCourse.show = false
+				}
 
 				if (!uavInfoShow.value) uavInfoShow.value = true
 				if (layoutStore.sceneLoading) layoutStore.sceneLoading = false
@@ -274,8 +282,8 @@ onBeforeMount(() => {
 			}
 			case 'BreakInto': {
 				alertInfo.value.area.show = true
+				alertInfo.value.area.type = msg.Data.name.includes('净空区') ? '净空区' : '禁飞区'
 				alertInfo.value.area.name = msg.Data.name
-				alertInfo.value.area.type = msg.Data.name
 				break
 			}
 			case 'Electricity': {

+ 23 - 1
src/views/home/cpns/FloatPanelUav.vue

@@ -71,6 +71,7 @@
 			</ul>
 
 			<ul class="alerts flex justify-center mt-5 mb-1">
+				<span class="btn-send" v-if="hasAlert" @click="handleSend">发送</span>
 				<template v-for="item in alertTypes">
 					<li v-if="alert[item.id].show" :class="{ active: currentActive === item.id }" @click="handlePickAlert(item)">
 						<img
@@ -215,7 +216,7 @@ const props = defineProps({
 			},
 			weather: {
 				show: false,
-				// type: '大风',
+				type: '大风',
 				// type: '大雨',
 				// type: '雾霾',
 			},
@@ -255,6 +256,10 @@ function handleClose() {
 	emit('close')
 }
 
+function handleSend() {
+	ElMessage({ type: 'success', message: '预警信息已发送', offset: 90 })
+}
+
 watch(
 	() => props.alert,
 	(val) => {
@@ -327,6 +332,23 @@ const localShowLine = computed({
 }
 
 .alerts {
+	position: relative;
+	.btn-send {
+		position: absolute;
+		right: 0;
+		top: -10px;
+		display: block;
+		padding: 0 8px;
+		font-size: 15px;
+		line-height: 24px;
+		background: linear-gradient(to bottom, rgba(3, 0, 0, 0.34), rgba(255, 255, 255, 0.24));
+		border: 1px solid #5291f0;
+		cursor: pointer;
+
+		&:hover {
+			filter: brightness(1.2);
+		}
+	}
 	li {
 		cursor: pointer;
 		&:not(:last-child) {

+ 20 - 5
src/views/home/cpns/PanelSjwg.vue

@@ -8,7 +8,7 @@
 		</div>
 
 		<Transition>
-			<div v-if="contentShow.b1" v-collapse="'scroll'" class="pr-1" style="flex: 2">
+			<div v-if="contentShow.b1" v-collapse="'scroll'" class="pr-1" style="flex: 1">
 				<template v-for="item in basicList">
 					<div class="title-shade">
 						<span>{{ item.label }}</span>
@@ -37,7 +37,7 @@
 		</div>
 
 		<Transition>
-			<div v-if="contentShow.b2" v-collapse="'scroll'" class="pr-1" style="flex: 3">
+			<div v-if="contentShow.b2" v-collapse="'scroll'" class="pr-1" style="flex: 1">
 				<template v-for="item in featureLists">
 					<div class="title-shade">
 						<span @click="handleCheckShiFei(item.label)">{{ item.label }}</span>
@@ -160,7 +160,7 @@ function getLists() {
 					showWarning('起降场列表查询失败')
 					return
 				}
-				featureLists.value[5].children = res.data.data.map((row) => ({
+				featureLists.value[6].children = res.data.data.map((row) => ({
 					...row,
 					check: false,
 					mesh: false,
@@ -257,7 +257,16 @@ const featureLists = ref([
 		children: [],
 		colors: { '120米以下': '#ccff66', '300米以下': '#ffcc66', '600米以下': '#feb2b2' },
 	},
-	{ label: '航线', type: 'route', show: false, check: false, icon: 'hxian', children: [], color: '#ffff00' },
+	{
+		label: '航线',
+		type: 'route',
+		show: false,
+		check: false,
+		icon: 'hxian',
+		children: [],
+		colors: { 已批复: '#6eff25', 未批复: '#ffff00' },
+	},
+	{ label: '航路', type: 'hanglu', show: false, check: false, icon: 'hxian', children: [], color: '#c195ff' },
 	{ label: '起降场', type: 'plot', show: false, check: false, icon: 'qjchang', children: [], color: '#45dcb5' },
 ])
 
@@ -352,7 +361,13 @@ function handleCheck(item, type) {
 			}
 			break
 		case 'route':
-			color = hexToRgb(featureLists.value.find((i) => i.type === 'route').color, 0.5)
+			const colors = featureLists.value.find((i) => i.type === 'route').colors
+			color = hexToRgb(
+				['复旦第三教学楼', '互联宝地', '黄兴公园', '国正中心'].some((i) => item.name.includes(i))
+					? colors['已批复']
+					: colors['未批复'],
+				0.5
+			)
 	}
 	const data = [
 		{

+ 7 - 1
src/views/nav/Index.vue

@@ -4,7 +4,7 @@
 		<div class="btn-home" @click.stop="toHome">首页</div>
 		<div class="btn-right" @click.stop="handleClickScene">
 			<img src="../../assets/images/layout/module-scene.png" alt="" />
-			<span>专题场景</span>
+			<span>应用场景</span>
 
 			<Transition name="emerge-right">
 				<ul class="sub-nav sub-scene" v-if="showSceneSub">
@@ -97,6 +97,12 @@ const navList = ref([
 const sceneSubList = ref([
 	{ label: '复杂商圈城市配送', value: '' },
 	{ label: '无人机表演', value: '' },
+
+	{ label: '个人消费飞行', value: '' },
+	{ label: '低空城市配送', value: '' },
+	{ label: '无人机编队表演', value: '' },
+	{ label: '低空物流运输', value: '' },
+	{ label: '低空城市巡检', value: '' },
 ])
 
 function handleClickNav(item) {