2c336f84 by jikai

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/index.html
#	src/components/yyAnslysis.vue
#	src/views/Home.vue
2 parents 40e47cbe c1a321b5
......@@ -27,4 +27,26 @@
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script src="https://cesium.com/downloads/cesiumjs/releases/1.71/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.71/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
......
......@@ -2,16 +2,16 @@
<template>
<div class="container">
<div class="wrapper">
<div class="nav-box" :class="[isYZT?'selected':'no-selected']" @click="jumpNav('isYZT')">
<div class="nav-box" :class="[isYZT?'selected':'no-selected']" @click="jumpNav('isYZT', '一张图')">
<span>一张图</span>
</div>
<div class="nav-box" :class="[isCGSC?'selected':'no-selected']" @click="jumpNav('isCGSC')">
<span>成果审查管理</span>
<div class="nav-box" :class="[isCGSC?'selected':'no-selected']" @click="jumpNav('isCGSC', '1')">
<span>规划成果审查</span>
</div>
<div class="nav-box" :class="[isSSJD?'selected':'no-selected']" @click="jumpNav('isSSJD')">
<div class="nav-box" :class="[isSSJD?'selected':'no-selected']" @click="jumpNav('isSSJD', '2')">
<span>实施监督预警</span>
</div>
<div class="nav-box" :class="[isPGJG?'selected':'no-selected']" @click="jumpNav('isPGJG')">
<div class="nav-box" :class="[isPGJG?'selected':'no-selected']" @click="jumpNav('isPGJG', '3')">
<span>批后监管</span>
</div>
</div>
......@@ -33,12 +33,30 @@
},
mounted() {},
methods: {
jumpNav(val) {
this.flagArr.forEach(ele => {
if (ele == val) this[val] = true;
else this[ele] = false;
});
jumpNav(val, label) {
// this.flagArr.forEach(ele => {
// if (ele == val) this[val] = true;
// else this[ele] = false;
// });
if(val != 'isYZT') {
this.login(val, label);
};
},
login(val, label) {
$.ajax({
type:"POST",
url: this.config.loginUrl + '/api/v1/user/login',
dataType:"json",
async:false,
data:{username:'案件查处',password:'123'},
success:(res) => {
window.open(`http://10.6.144.88:10001/frontweb/index.jsp?type=${label}`)
},
fail: () => {
}
})
}
}
}
</script>
......
......@@ -10,12 +10,10 @@
<span>控高分析</span>
<span @click="closePop" class="close">×</span>
</div>
<div class="" style="padding: 18px 24px 0px 24px;">
<el-slider v-model="height" :min='0' :max='1000' :format-tooltip="formatTooltip"
@change='EheightChange'></el-slider>
</div>
<div class="func-btn">
<div class="btn-wrapper add-bg" @click="startAnalysis">
<img style="width: 20px; height: 20px; margin: 0 5px 0 44px" src="../assets/icon_开始分析.png" alt="">
......@@ -26,7 +24,6 @@
<span>清除分析结果</span>
</div>
</div>
<div class="table-box" style="padding: 18px 24px 30px 24px;">
<el-table :data="tableData" :highlight-current-row='false' height="242" border style="width: 100%">
<el-table-column prop="name" label="名称" align='center'>
......@@ -64,7 +61,7 @@
name: '1号楼',
height: '34',
superelevation: '4'
}, ]
},]
}
},
mounted() {},
......
......@@ -102,6 +102,12 @@
</el-tooltip>
</div>
<!--可视域分析 -->
<div class="func-ico" :class="[visualField?'selected':'']" @click="handlevisualField('visualField')">
<el-tooltip class="item" effect="dark" content="可视域分析" placement="left">
<img src="../assets/一张图/icon_通视.png" alt="">
</el-tooltip>
</div>
<!-- <div class="func-ico" :class="[is2D?'selected':'']" @click="handleIs2D()">
<img src="../assets/toolbar_icon_ 展开.png" alt="">
......@@ -117,8 +123,8 @@
components: {},
props: ['isReturn', 'enlarge', 'narrow', 'coordinate', 'distance',
'area', 'marker', 'rollerShutter', 'splitScreen', 'toNorth',
'topSee', 'roundSee', 'horizon', 'allSee','ymAnslysis',
'tjxAnslysis', 'yyAnslysis', 'kgAnalusis'
'topSee', 'roundSee', 'horizon', 'allSee', 'ymAnslysis',
'tjxAnslysis', 'yyAnslysis', 'kgAnalusis', 'visualField'
],
data() {
return {}
......@@ -181,6 +187,9 @@
},
handlekgAnalusis(val) {
this.$emit('kgAnalusis', val, this.kgAnalusis);
},
handlevisualField(val) {
this.$emit('visualField', val, this.visualField);
}
}
}
......
......@@ -21,7 +21,7 @@
</div>
</div>
<div class="kg-img">
<div class="kg-img">
<div class="kg-box">
<img :src="src" alt="" style="width: 100%; height: 100%;">
<div class="btn-wrapper2">
......@@ -46,7 +46,7 @@
components: {},
data() {
return {
src: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3820738330,1510784229&fm=26&gp=0.jpg'
src: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3820738330,1510784229&fm=26&gp=0.jpg'
}
},
mounted() {},
......@@ -198,15 +198,15 @@
}
.kg-img {
width: 410px;
padding: 0px 24px 0px 24px;
width: 410px;
padding: 0px 24px 0px 24px;
padding-bottom: 10px;
}
.kg-box {
width: 100%;
height: 180px;
position: relative;
width: 100%;
height: 180px;
position: relative;
margin-bottom: 20px;
}
......
// 淹没分析弹窗
<template>
<div class="container">
<div class="wrapper">
<div class="box">
</div>
</div>
<div class="mian">
<div class="title">
<span>可视域分析</span>
<span @click="closePop" class="close">×</span>
</div>
<div class="func-input">
<span class="width-class">方向</span>
<el-slider style="width: 150px;" v-model="direction" :min='0' :max='360' :step='1'></el-slider>
<el-input-number v-model="direction" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span class="width-class">翻转</span>
<el-slider style="width: 150px;" v-model="flip" :min='0' :max='360' :step='1'></el-slider>
<el-input-number v-model="flip" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span class="width-class">距离</span>
<el-slider style="width: 150px;" v-model="distance" :min='0' :max='10000' :step='1'></el-slider>
<el-input-number v-model="distance" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="10000">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span class="width-class">水平视场角</span>
<el-slider style="width: 150px;" v-model="level" :min='0' :max='360' :step='1'></el-slider>
<el-input-number v-model="level" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span class="width-class">垂直视场角</span>
<el-slider style="width: 150px;" v-model="vertical" :min='0' :max='360' :step='1'></el-slider>
<el-input-number v-model="vertical" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="select-color">
<div class="block">
<div class="demonstration">可见区域颜色</div>
<el-color-picker v-model="yesColor"></el-color-picker>
</div>
<div class="block">
<div class="demonstration">不可见区域颜色</div>
<el-color-picker v-model="noColor"></el-color-picker>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'allSee',
components: {},
data() {
return {
step: 1,
num: 1,
direction: 180, // 方向
flip: 90, // 翻转
distance: 0, // 距离
level: 180, // 水平视场角
vertical: 180, // 垂直视场角
yesColor: 'red', // 可见区域颜色
noColor: 'rgba(255, 69, 0, 0.68)', // 不可见区域颜色
isXmbj: true,
// isAnalysis: true
}
},
mounted() {},
methods: {
closePop() {
this.$emit('closePop', 'visualField')
},
handleChange() {
},
startAnalysis() {
// this.isAnalysis = true;
},
stopAnalysis() {
// this.isAnalysis = false;
},
handleIsXmbj(flag) {
this.isXmbj = flag;
}
}
}
</script>
<style scoped>
.container {
position: relative;
color: #fff;
font-size: 16px;
width: 450px;
}
.wrapper {
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
border: 1px solid rgba(151, 151, 151, 0.58);
}
.box {
background: rgba(4, 10, 10, 0.58);
box-shadow: 0px 4px 9px 0px rgba(0, 0, 0, 0.5);
/* filter: blur(10px); */
height: 100px;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
}
.mian {
position: relative;
width: 100%;
height: 100%;
z-index: 1000;
}
.list-box span:nth-of-type(1) {
display: inline-block;
width: 98px;
margin-right: 20px;
color: rgba(255, 255, 255, .7);
}
.list-box span:nth-of-type(2) {
margin-top: 14px;
display: inline-block;
}
.title {
display: flex;
justify-content: space-between;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
padding: 18px 24px;
font-size: 20px;
}
.func-input {
display: flex;
align-items: center;
/* justify-content: space-between; */
padding: 18px 24px 0px 24px;
font-size: 18px;
cursor: pointer;
}
.func {
padding: 18px 24px;
}
.func-btn {
display: flex;
padding: 18px 24px 37px 24px;
align-items: center;
font-size: 18px;
cursor: pointer;
}
.btn-wrapper {
display: flex;
align-items: center;
width: 190px;
height: 36px;
background-image: url('../assets/弹窗按钮背景-默认.png');
background-size: 100% 100%;
background-repeat: no-repeat;
line-height: 36px;
}
.add-bg {
background-image: url('../assets/弹窗按钮背景-选中.png');
}
.btn-wrapper2 {
display: flex;
align-items: center;
width: 116px;
height: 38px;
background-image: url('../assets/一张图/bg_专题分析.png');
background-size: 100% 100%;
background-repeat: no-repeat;
text-align: center;
line-height: 38px;
margin-left: 13px;
}
.add-bg2 {
background-image: url('../assets/一张图/bg_资源目录.png');
}
.close {
cursor: pointer;
}
.center {
display: inline-block;
width: 100%;
height: 100%;
text-align: center;
}
.width-class {
width: 90px;
font-size: 16px;
}
.select-color {
display: flex;
justify-content: space-around;
text-align: center;
padding: 30px 0px;
}
.demonstration {
margin-bottom: 10px;
font-size: 16px;
}
>>>input::-webkit-input-placeholder {
font-size: 16px;
color: rgba(255, 255, 255, 0.78) !important;
}
>>>.el-input__inner {
background: rgba(4, 10, 10, 0.58) !important;
border: 1px solid rgba(23, 34, 38, 0.57);
color: #fff;
}
>>>.el-input-number.is-controls-right .el-input__inner {
text-align: left;
}
>>>.el-input__suffix {
color: #fff;
font-size: 17px;
}
>>>.el-input-number__increase,
>>>.el-input-number__decrease {
background: rgba(4, 10, 10, 0.58);
}
>>>.el-input-number.is-controls-right .el-input-number__decrease,
>>>.el-input-number__increase {
border-left: 1px solid rgba(4, 10, 10, 0.58);
}
>>>.el-icon-arrow-up:before,
>>>.el-icon-arrow-down:before {
color: #fff;
}
>>>.el-input-number.is-controls-right .el-input-number__increase {
border-bottom: 1px solid rgba(4, 10, 10, 0.58);
}
</style>
\ No newline at end of file
......@@ -10,7 +10,6 @@
<span>淹没分析</span>
<span @click="closePop" class="close">×</span>
</div>
<div class="func-input">
<span>分析区域</span>
<div class="btn-wrapper2" :class="[isXmbj?'add-bg2': '']" @click="handleIsXmbj(true)">
......@@ -20,7 +19,6 @@
<span class="center">绘制</span>
</div>
</div>
<div class="func-input">
<span>水底高程</span>
<el-input-number v-model="sdgc" controls-position="right"
......@@ -28,7 +26,6 @@
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span>水位深度</span>
<el-input-number v-model="swsd" controls-position="right"
......@@ -43,7 +40,6 @@
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span>当前水位</span>
<span style="margin-left: 36px;">1263.7米</span>
......@@ -58,7 +54,6 @@
<span>暂停分析</span>
</div>
</div>
</div>
</div>
</template>
......
......@@ -16,7 +16,38 @@
<el-date-picker v-model="anslysisTime" type="date" style="margin-left: 12px; width: 245px;"
placeholder="选择分析日期">
</el-date-picker>
</div>
</div>
<div class="func-input">
<span>开始时间</span>
<el-time-picker style="margin:0 12px; width: 245px;" v-model="staTime"
:picker-options="pickerOptions" placeholder="选择开始时间">
</el-time-picker>
</div>
<div class="func-input">
<span>结束时间</span>
<el-time-picker style="margin:0 12px; width: 245px;" v-model="endTime"
:picker-options="pickerOptions" placeholder="选择结束时间">
</el-time-picker>
</div>
<!-- <div class="func-input">
<div class="btn-wrapper2" :class="[isCF?'add-bg2': '']" @click="handleIsXmbj('isCF')">
<span class="center">春分</span>
</div>
<div class="btn-wrapper2" :class="[isXZ?'add-bg2': '']" @click="handleIsXmbj('isXZ')">
<span class="center">夏至</span>
</div>
<div class="btn-wrapper2" :class="[isQF?'add-bg2': '']" @click="handleIsXmbj('isQF')">
<span class="center">秋分</span>
</div>
<div class="btn-wrapper2" :class="[isLD?'add-bg2': '']" @click="handleIsXmbj('isLD')">
<span class="center">立冬</span>
</div>
<div class="btn-wrapper2" :class="[isDZ?'add-bg2': '']" @click="handleIsXmbj('isDZ')">
<span class="center">冬至</span>
</div>
</div> -->
<div class="func-input">
<span>时间间隔 </span>
......@@ -45,7 +76,6 @@
</template>
<script>
import shadow from "../assets/js/map/shadow";
let maxW = 24 * 60 * 60 * 1000 - 1 * 60 * 1000
export default {
name: 'yyAnslysis',
......@@ -62,7 +92,7 @@
anslysisTime: '',
timeS: 30, // 时间间隔
time: 0 * 60 * 60 * 1000, // 滑块时间
max: (24 * 60 * 60 * 1000 - 1* 60 * 1000),
max: (24 * 60 * 60 * 1000 - 1 * 60 * 1000),
marks: {
0: '0:00',
[maxW]: '23:59',
......@@ -72,9 +102,17 @@
// },
// label: this.$createElement('strong', '50%')
// }
}
},
pickerOptions: { // 时间选择器 时间范围限制
selectableRange: '00:00:00 - 23:59:59'
},
staTime: '', // 开始时间
endTime: '', // 结束时间
}
},
watch: {
},
mounted() {
this.shadow instanceof shadow || (this.shadow = new shadow());
},
......@@ -112,7 +150,7 @@
formatTooltip(val) {
let nowTime = this.commons.dateZhuan('yyyy-MM-dd 00:00:00', new Date());
let nowSjc = new Date(nowTime).getTime();
nowSjc+=val;
nowSjc += val;
let sfd = this.commons.dateZhuan('hh:mm', new Date(nowSjc));
return sfd;
}
......@@ -283,6 +321,7 @@
>>>.el-icon-arrow-up:before,
>>>.el-icon-arrow-down:before {
color: #fff;
cursor: pointer;
}
>>>.el-input-number.is-controls-right .el-input-number__increase {
......@@ -295,7 +334,7 @@
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.20);
}
>>> .el-slider__marks-text {
>>>.el-slider__marks-text {
color: #fff;
}
</style>
\ No newline at end of file
......
......@@ -6,5 +6,6 @@
*/
export default {
url: '',
loginUrl: 'http://10.6.144.88:10001/orup',
mapToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhMzMwMjAwZS1lODRmLTRhNzQtODBkOS01YjZkM2ZkYzRmOGMiLCJpZCI6MzE3MzEsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1OTU5MDA0Njd9.K5Rnvdzv5vDjlEbBH-2vEPMJYPgBDs__uvQHZz6jXTc'
}
\ No newline at end of file
......
......@@ -10,8 +10,29 @@
@isClear='isClear'
@searchRoat='searchRoat'></rightTopFunc>
</div>
<div class="rightFunc">
<rightFunc @isReturn='EisReturn'
@enlarge='Eenlarge'
@narrow='narrow'
@coordinate='Ecoordinate'
@distance='Edistance'
@area='Earea'
@marker='Emarker'
@rollerShutter='ErollerShutter'
@splitScreen='EsplitScreen'
@toNorth='EtoNorth'
@topSee='EtopSee'
@roundSee='EroundSee'
@horizon='Ehorizon'
@allSee='EallSee'
@ymAnslysis='EymAnslysis'
@tjxAnslysis='EtjxAnslysis'
@visualField='EvisualField'
@yyAnslysis='EyyAnslysis'
@kgAnalusis='EkgAnalusis'
<div class="rightFunc">
<rightFunc @isReturn='EisReturn'
<rightFunc @isReturn='EisReturn'
@enlarge='Eenlarge'
@narrow='narrow'
@coordinate='Ecoordinate'
......@@ -25,12 +46,30 @@
@roundSee='EroundSee'
@horizon='Ehorizon'
@allSee='EallSee'
@ymAnslysis='EymAnslysis'
@tjxAnslysis='EtjxAnslysis'
@yyAnslysis='EyyAnslysis'
@kgAnalusis='EkgAnalusis'
:enlarge='enlarge'
:narrow='narrow'
:coordinate='coordinate'
:distance='distance'
:area='area'
:marker='marker'
:rollerShutter='rollerShutter'
:splitScreen='splitScreen'
:toNorth='toNorth'
:topSee='topSee'
:roundSee='roundSee'
:horizon='horizon'
:allSee='allSee'
:ymAnslysis='ymAnslysis'
:tjxAnslysis='tjxAnslysis'
:visualField='visualField'
:yyAnslysis='yyAnslysis'
:kgAnalusis='kgAnalusis'></rightFunc>
:enlarge='enlarge'
:narrow='narrow'
:coordinate='coordinate'
......@@ -57,7 +96,7 @@
</div> -->
<!-- <div class="mapPop">
<mapPop></mapPop>
</div> -->
</div>
<div class="allSee" v-if='allSee'>
<allSee @closePop='closePop'></allSee>
</div>
......@@ -73,6 +112,12 @@
<div class="allSee tjx-anslysis" v-if='tjxAnslysis'>
<tjxAnslysis @closePop='closePop'></tjxAnslysis>
</div>
<div class="allSee tjx-anslysis" v-if='visualField'>
<visualField @closePop='closePop'></visualField>
</div>
<div class="allSee" v-if='yyAnslysis'>
<yyAnslysis @closePop='closePop'></yyAnslysis>
</div>
......@@ -80,7 +125,7 @@
<div class="allSee tjx-anslysis" v-if='kgAnalusis'>
<kgAnalusis @closePop='closePop'></kgAnalusis>
</div>
<div id="cesiumContainer">
<div id="vertical-slider" style="display: none;"></div>
<div id="horizontal-slider" style="display: none;"></div>
......@@ -120,7 +165,7 @@
import flood from "../assets/js/map/flood";
import viewpoint from "../assets/js/map/viewpoint";
import visual from "../assets/js/map/visual";
import TopTitle from '../components/topTitle';
import rightTopFunc from '../components/rightTopFunc';
......@@ -137,6 +182,7 @@
import kgAnalusis from '../components/kgAnalusis'; // 控高分析
import URL_CONFIG from "./../config/urlConfig.vue";
const Cesium = window.Cesium;
import visualField from '../components/visualField' //可视域分析
export default {
components: {
......@@ -151,6 +197,7 @@
ymAnslysis,
horizon,
tjxAnslysis,
visualField,
yyAnslysis,
kgAnalusis,
},
......@@ -174,12 +221,13 @@
allSee: false, // 通视
ymAnslysis: false, // 淹没分析
tjxAnslysis: false, // 天际线分析
visualField: false, // 可视域分析
yyAnslysis: false, // 阴影分析
kgAnalusis: false, // 控高分析
keepArr: ['isReturn', 'enlarge', 'narrow', 'coordinate', 'distance',
'area', 'marker', 'rollerShutter', 'splitScreen', 'toNorth',
'topSee', 'roundSee', 'horizon', 'allSee', 'ymAnslysis',
'tjxAnslysis', 'yyAnslysis', 'kgAnalusis']
'tjxAnslysis', 'yyAnslysis', 'kgAnalusis', 'visualField']
}
},
mounted() {
......@@ -190,7 +238,7 @@
// }));
let scene = this.viewer.scene
scene.shadowMap.darkness = 1.275; //设置第二重烘焙纹理的效果(明暗程度)
scene.skyAtmosphere.brightnessShift=0.4;
scene.skyAtmosphere.brightnessShift=0.4;
scene.debugShowFramesPerSecond = true;
scene.hdrEnabled = false;
scene.sun.show = false;
......@@ -199,7 +247,7 @@
scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_GROUND1, {
name: 'ground'
}),
scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BUILD, {
scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BUILD, {
name: 'build'
})
], layer => {
......@@ -295,7 +343,93 @@
,EtopSee() {}
// 环视
,EroundSee() {
// this.visual instanceof visual || (this.visual = new visual(this.viewer));
// var parentEntity = this.viewer.entities.add(new Cesium.Entity()), positions = [], cartesian, polyline;
// this.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas)
// this.handler.setInputAction(evt => {
// cartesian = this.viewer.scene.pickPosition(evt.position);
// // cartesian = this.draw.getCatesian3FromPX(evt.position, this.viewer, []);
// positions.push(cartesian.clone());
// // addCompany.createPoint.call(this, {position: cartesian})
// if(positions.length === 1) {
// this.handler.setInputAction(moveEvent => {
// positions[1] = this.viewer.scene.pickPosition(moveEvent.endPosition);
// // positions[1] = this.draw.getCatesian3FromPX(moveEvent.endPosition, this.viewer, []);
// !polyline && (polyline = addCompany.createPolyline.call(this, positions));
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
// return;
// }
// this.handler.destroy();
// // console.log(Cesium.Cartesian3.distance(positions[0], positions[1]));
// // var cartesian = this.draw.getCatesian3FromPX(evt.position, this.viewer, []);
// var viewPointEntity = this.viewer.entities.add({
// parent: parentEntity,
// position: positions[0],
// ellipsoid: {
// radii: new Cesium.Cartesian3(5, 5, 5),
// material: Cesium.Color.GREEN
// }
// });
// // // 世界坐标转换为投影坐标
// var webMercatorProjection = new Cesium.WebMercatorProjection(this.viewer.scene.globe.ellipsoid);
// var viewPointWebMercator = webMercatorProjection.project(Cesium.Cartographic.fromCartesian(positions[0]));
// // // 排除碰撞监测的对象
// var objectsToExclude = [viewPointEntity];
// // 目标点集合
// var destPoints = [];
// // 视域点和目标点的距离
// var radius = Cesium.Cartesian3.distance(positions[0], positions[1]); // 视距1000米
// // 计算一圈
// for (var i = 0; i <= 30; i++) {
// // 度数转弧度
// var radians = Cesium.Math.toRadians(i);
// // 计算目标点
// var toPoint = new Cesium.Cartesian3(viewPointWebMercator.x + radius * Math.cos(radians), viewPointWebMercator.y + radius * Math.sin(radians), 10);
// // 投影坐标转世界坐标
// toPoint = webMercatorProjection.unproject(toPoint);
// destPoints.push(Cesium.Cartographic.toCartesian(toPoint.clone()));
// }
// let viewer = this.viewer;
// // 绘制线
// function drawLine(leftPoint, secPoint, color) {
// viewer.entities.add({
// polyline: {
// positions: [leftPoint, secPoint],
// arcType: Cesium.ArcType.NONE,
// width: 5,
// material: color,
// depthFailMaterial: color
// }
// })
// }
// pickFromRay.call(this);
// function pickFromRay() {
// for (var i = 0; i < destPoints.length; i++) {
// // 计算射线的方向,目标点left 视域点right
// var direction = Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(destPoints[i], positions[0], new Cesium.Cartesian3()), new Cesium.Cartesian3());
// console.log(direction);
// // 建立射线
// var ray = new Cesium.Ray(positions[0], direction);
// var result = viewer.scene.pickFromRay(ray, objectsToExclude); // 计算交互点,返回第一个
// showIntersection(result, destPoints[i], positions[0]);
// }
// }
// // 处理交互点
// function showIntersection(result, destPoint, cartesian) {
// // 如果是场景模型的交互点,排除交互点是地球表面
// if (Cesium.defined(result) && Cesium.defined(result.object)) {
// drawLine(result.position, cartesian, Cesium.Color.GREEN); // 可视区域
// drawLine(result.position, destPoint, Cesium.Color.RED); // 不可视区域
// } else {
// drawLine(cartesian, destPoint, Cesium.Color.GREEN);
// }
// }
// this.handler.destroy();
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
}
// 视域
,Ehorizon(val) {
......@@ -319,6 +453,11 @@
this[val] = !this[val];
this.onlySelect(val);
},
// 可视化分析
EvisualField(val) {
this[val] = !this[val];
this.onlySelect(val);
},
// 阴影分析
EyyAnslysis(val) {
this[val] = !this[val];
......