综合空间分析工具
parent
df1240a026
commit
c9eebefb9b
@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<div class="measureView bufferMeasureContatiner">
|
||||
<el-row>
|
||||
<el-col :span="6" class="ta-r">
|
||||
<span class="analysisMeasureLabel">缓冲半径:</span>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1" style="line-height:50px;">
|
||||
<el-input
|
||||
type="number"
|
||||
@change="bufferNumChange"
|
||||
v-model="dataSet.baseValue"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<span class="analysisMeasureLabel">公里</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6" class="ta-r">
|
||||
<span class="analysisMeasureLabel">绘制:</span>
|
||||
</el-col>
|
||||
<el-col :span="16" :offset="1" style="line-height:50px;">
|
||||
<el-button size="mini" type="primary" @click="bufferClick('point')">点</el-button>
|
||||
<el-button size="mini" type="primary" @click="bufferClick('line')">线</el-button>
|
||||
<el-button size="mini" type="primary" @click="bufferClick('polygon')">面</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, getCurrentInstance,reactive } from "vue";
|
||||
import * as mars3d from "mars3d";
|
||||
import '../map.less'
|
||||
const Cesium = mars3d.Cesium;
|
||||
const instance = getCurrentInstance();
|
||||
const dataSet = reactive({
|
||||
baseValue: 1
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
});
|
||||
window.onresize = function () {
|
||||
|
||||
};
|
||||
|
||||
const bufferClick = (e) => {
|
||||
instance?.proxy?.$emitter.emit("bufferbtnClick",e);
|
||||
};
|
||||
const bufferNumChange = () => {
|
||||
instance?.proxy?.$emitter.emit("bufferNumChange",dataSet.baseValue);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<div class="measureView bufferMeasureContatiner" style="width:320px;">
|
||||
<el-row>
|
||||
<el-col :span="24" class="">
|
||||
<span class="analysisMeasureLabel">日照效果:</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="fz-14">
|
||||
<el-col :span="6" class="ta-r">
|
||||
<span class="analysisMeasureLabel">日期选择:</span>
|
||||
</el-col>
|
||||
<el-col :span="16" :offset="1" style="line-height:50px;">
|
||||
<el-date-picker
|
||||
style="width: 100%;"
|
||||
v-model="dataSet.currDate"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="fz-14">
|
||||
<el-col :span="6" class="ta-r">
|
||||
<span class="analysisMeasureLabel">时间选择:</span>
|
||||
</el-col>
|
||||
<el-col :span="16" :offset="1" class="flex ai-c">
|
||||
<el-slider @change="onChangeShadowTime" v-model="dataSet.timeVal" :min="0" :max="1440" :step="1" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="fz-14">
|
||||
<el-col :span="6" class="ta-r">
|
||||
<span class="analysisMeasureLabel">当前时间:</span>
|
||||
</el-col>
|
||||
<el-col :span="16" :offset="1" class="flex ai-c">
|
||||
<span class="analysisMeasureLabel">{{ dataSet.currDate }} {{ dataSet.hours }} 时 {{ dataSet.minutes }}分</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="fz-14">
|
||||
<el-col :span="6" class="ta-r">
|
||||
<span class="analysisMeasureLabel">自动播放:</span>
|
||||
</el-col>
|
||||
<el-col :span="16" :offset="1" style="line-height:50px;">
|
||||
<el-button size="mini" type="primary" @click="startPlaySunshine">播放</el-button>
|
||||
<el-button size="mini" type="primary" @click="stopPlaySunshine">暂停</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24" class="">
|
||||
<span class="analysisMeasureLabel">阴影率分析:</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="fz-14">
|
||||
<el-col :span="6" class="ta-r">
|
||||
|
||||
</el-col>
|
||||
<el-col :span="16" :offset="1" style="line-height:50px;">
|
||||
<el-button size="mini" type="primary" @click="drawPolygonShadow">绘制面</el-button>
|
||||
<el-button size="mini" type="primary" @click="clearPolygonShadow">清除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, getCurrentInstance,reactive } from "vue";
|
||||
import * as mars3d from "mars3d";
|
||||
import '../map.less'
|
||||
const Cesium = mars3d.Cesium;
|
||||
const instance = getCurrentInstance();
|
||||
const dataSet = reactive({
|
||||
currDate: '',
|
||||
timeVal: '',
|
||||
hours: '',
|
||||
minutes: ''
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
let yy = new Date().getFullYear();
|
||||
var mm =
|
||||
new Date().getMonth() < 9
|
||||
? "0" + (new Date().getMonth() + 1)
|
||||
: new Date().getMonth() + 1;
|
||||
var dd =
|
||||
new Date().getDate() < 10
|
||||
? "0" + new Date().getDate()
|
||||
: new Date().getDate();
|
||||
let hh = new Date().getHours();
|
||||
let mf =
|
||||
new Date().getMinutes() < 10
|
||||
? "0" + new Date().getMinutes()
|
||||
: new Date().getMinutes();
|
||||
let ss =
|
||||
new Date().getSeconds() < 10
|
||||
? "0" + new Date().getSeconds()
|
||||
: new Date().getSeconds();
|
||||
dataSet.currDate = yy + '-' + mm + '-' + dd
|
||||
dataSet.hours = hh
|
||||
dataSet.minutes = mf
|
||||
dataSet.timeVal = hh*60 + mf
|
||||
console.log('dataSet.timeVa',dataSet.timeVal)
|
||||
});
|
||||
|
||||
instance?.proxy?.$emitter.on("onSunShadowRotateEmit", (e) => {
|
||||
dataSet.timeVal = e
|
||||
});
|
||||
|
||||
const stopPlaySunshine = (e) => {
|
||||
instance?.proxy?.$emitter.emit("stopPlaySunshine");
|
||||
};
|
||||
const startPlaySunshine = () => {
|
||||
let param = {
|
||||
date: dataSet.currDate,
|
||||
hours: dataSet.hours,
|
||||
minutes: dataSet.minutes,
|
||||
}
|
||||
instance?.proxy?.$emitter.emit("startPlaySunshine",param);
|
||||
};
|
||||
const onChangeShadowTime = (e) => {
|
||||
let time = dataSet.timeVal/60
|
||||
dataSet.hours = Math.floor(time)
|
||||
dataSet.minutes = dataSet.timeVal % 60
|
||||
let param = {
|
||||
date: dataSet.currDate,
|
||||
hours: Math.floor(time),
|
||||
minutes: dataSet.timeVal % 60,
|
||||
}
|
||||
instance?.proxy?.$emitter.emit("onChangeShadowTime",param);
|
||||
};
|
||||
const drawPolygonShadow = (e) => {
|
||||
instance?.proxy?.$emitter.emit("drawPolygonShadow",dataSet.currDate);
|
||||
};
|
||||
const clearPolygonShadow = (e) => {
|
||||
instance?.proxy?.$emitter.emit("clearPolygonShadow");
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<div class="measureView bufferMeasureContatiner" style="width:320px;">
|
||||
<el-row>
|
||||
<el-col :span="8" class="jc-e flex ai-c">
|
||||
<span class="analysisMeasureLabel fz-14">水平张角:</span>
|
||||
</el-col>
|
||||
<el-col :span="14" :offset="1" class="flex ai-c">
|
||||
<el-slider @change="onChangeAngle" v-model="dataSet.cameraAngle" :min="1" :max="60" :step="0.1" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8" class="jc-e flex ai-c">
|
||||
<span class="analysisMeasureLabel fz-14">垂直张角:</span>
|
||||
</el-col>
|
||||
<el-col :span="14" :offset="1" class="flex ai-c">
|
||||
<el-slider @change="onChangeAngle2" v-model="dataSet.cameraAngle2" :min="1" :max="30" :step="0.1" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8" class="jc-e flex ai-c">
|
||||
<span class="analysisMeasureLabel fz-14">投射距离:</span>
|
||||
</el-col>
|
||||
<el-col :span="14" :offset="1" class="flex ai-c">
|
||||
<el-slider @change="onChangeDistance" v-model="dataSet.distanceValue" :min="1" :max="9999" :step="1" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8" class="jc-e flex ai-c">
|
||||
<span class="analysisMeasureLabel fz-14">四周方向:</span>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1" class="flex ai-c">
|
||||
<el-slider @change="onChangeHeading" v-model="dataSet.heading" :min="-180" :max="180" :step="0.1" />
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1" class="jc-e flex ai-c">
|
||||
<el-button size="mini" type="primary" @click="onClickSelView">图上选点</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8" class="jc-e flex ai-c">
|
||||
<span class="analysisMeasureLabel fz-14">俯仰角度:</span>
|
||||
</el-col>
|
||||
<el-col :span="14" :offset="1" class="flex ai-c">
|
||||
<el-slider @change="onChangePitch" v-model="dataSet.pitchValue" :min="1" :max="60" :step="0.1" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8" class="jc-e flex ai-c">
|
||||
<span class="analysisMeasureLabel fz-14">视椎框线:</span>
|
||||
</el-col>
|
||||
<el-col :span="14" :offset="1" class="flex ai-c">
|
||||
<el-checkbox @change="showFrustum" v-model="dataSet.showFrustum" label="是否显示" size="large" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8" class="jc-e flex ai-c">
|
||||
<span class="analysisMeasureLabel fz-14">可视域透明度:</span>
|
||||
</el-col>
|
||||
<el-col :span="14" :offset="1" class="flex ai-c">
|
||||
<el-slider @change="onChangeOpacity" v-model="dataSet.opacity" :min="0" :max="1" :step="0.1" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, getCurrentInstance,reactive } from "vue";
|
||||
import * as mars3d from "mars3d";
|
||||
import '../map.less'
|
||||
const Cesium = mars3d.Cesium;
|
||||
const instance = getCurrentInstance();
|
||||
const dataSet = reactive({
|
||||
cameraAngle: 60,
|
||||
cameraAngle2: 30,
|
||||
distanceValue: 57,
|
||||
heading: 109,
|
||||
pitchValue: 2,
|
||||
showFrustum: false,
|
||||
opacity: 0.6
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
});
|
||||
window.onresize = function () {
|
||||
|
||||
};
|
||||
|
||||
|
||||
const onChangeAngle = (e) => {
|
||||
instance?.proxy?.$emitter.emit("onChangeAngle",dataSet.cameraAngle);
|
||||
};
|
||||
const onChangeAngle2 = (e) => {
|
||||
instance?.proxy?.$emitter.emit("onChangeAngle2",dataSet.cameraAngle2);
|
||||
};
|
||||
const onChangeDistance = (e) => {
|
||||
instance?.proxy?.$emitter.emit("onChangeDistance",dataSet.distanceValue);
|
||||
};
|
||||
const onChangeHeading = (e) => {
|
||||
instance?.proxy?.$emitter.emit("onChangeHeading",dataSet.heading);
|
||||
};
|
||||
const onChangePitch = (e) => {
|
||||
instance?.proxy?.$emitter.emit("onChangePitch",dataSet.pitchValue);
|
||||
};
|
||||
const showFrustum = (e) => {
|
||||
instance?.proxy?.$emitter.emit("showFrustum",dataSet.showFrustum);
|
||||
};
|
||||
const onClickSelView = (e) => {
|
||||
instance?.proxy?.$emitter.emit("onClickSelView");
|
||||
};
|
||||
const onChangeOpacity = (e) => {
|
||||
instance?.proxy?.$emitter.emit("onChangeOpacity",dataSet.opacity);
|
||||
};
|
||||
|
||||
|
||||
|
||||
instance?.proxy?.$emitter.on("viewshedgraphicLayer", (data) => {
|
||||
console.log('ddd',data)
|
||||
|
||||
|
||||
// video.cameraAngle = graphic.angle
|
||||
// video.cameraAngle2 = graphic.angle2
|
||||
// video.distanceValue = graphic.distance
|
||||
// video.pitchValue = graphic.pitch
|
||||
// video.opacity = graphic.opacity
|
||||
// video.heading = graphic.heading
|
||||
// video.showFrustum = graphic.showFrustum
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.el-checkbox__label{
|
||||
color: #fff;
|
||||
}
|
||||
.el-slider__button{
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue