线条颜色随机方式更改

This commit is contained in:
2024-09-02 13:51:14 +08:00
parent 68e1e34367
commit 9f54205cde
2 changed files with 33 additions and 25 deletions

View File

@ -40,13 +40,13 @@
<p>{{ item.dataset_name }} <span class="mileage">{{item.file_total}}</span></p> <p>{{ item.dataset_name }} <span class="mileage">{{item.file_total}}</span></p>
<span class="org">{{ item.create_time }}</span> <span class="org">{{ item.create_time }}</span>
</div> </div>
<ul v-if="currenId == item.tsy_id"> <ul v-if="currenId == item.tsy_id && fold">
<li <li
:class="sample.tsy_id == currenSample ? 'bg-color' : ''" :class="sample.tsy_id == currenSample ? 'bg-color' : ''"
class="sample" class="sample"
v-for="(sample, i) in item.sampleArray" v-for="(sample, i) in item.sampleArray"
:key="i" :key="i"
@click="onSample(sample)" @click.stop="onSample(sample)"
>{{sample.sample_name}}</li> >{{sample.sample_name}}</li>
</ul> </ul>
<div class="left4_list"> <div class="left4_list">
@ -134,7 +134,7 @@
<img src="../../static/images/arrow_nav1.png" alt=""> <img src="../../static/images/arrow_nav1.png" alt="">
</div> </div>
<div class="right"> <div class="right">
<div id="cesiumContainerData" style="height: 100%;width:100%;" /> <div id="cesiumContainerData" style="height: calc(100vh - 90px);width:100%;" />
</div> </div>
</div> </div>
<!-- 航次名称弹窗--> <!-- 航次名称弹窗-->
@ -322,6 +322,7 @@ export default {
ids: [], ids: [],
menuShow: true, menuShow: true,
currenId: null, currenId: null,
fold: false,
currenSample: null, currenSample: null,
previousEntityId: null, previousEntityId: null,
job: '', job: '',
@ -500,6 +501,8 @@ export default {
this.viewer.shadowMap.darkness = 0.8 this.viewer.shadowMap.darkness = 0.8
this.viewer.scene._sunBloom = false this.viewer.scene._sunBloom = false
this.viewer.scene.globe.showGroundAtmosphere = false this.viewer.scene.globe.showGroundAtmosphere = false
this.viewer.scene.postProcessStages.fxaa.enabled = true
// //
const earthMap = new Cesium.WebMapTileServiceImageryProvider( const earthMap = new Cesium.WebMapTileServiceImageryProvider(
{ {
@ -543,16 +546,11 @@ export default {
id: id, id: id,
polyline: { //polyline线 polyline: { //polyline线
positions: Cesium.Cartesian3.fromDegreesArray(degreeArr),// positions: Cesium.Cartesian3.fromDegreesArray(degreeArr),//
width: 5,//线
cusColor: this.color[index],
material: new Cesium.PolylineArrowMaterialProperty(
this.color[index]
//Cesium.Color.BLUE
// glowPower : 0.2,//线(0-1.0)
// color:Cesium.Color.BLUE //
),//
clampToGround: true, //, clampToGround: true, //,
zIndex: 1000 zIndex: 1000,
width: 2,
// 线
material: Cesium.Color.fromRandom({alpha: 0.5})
} }
}) })
this.viewer.camera.setView({ this.viewer.camera.setView({
@ -751,10 +749,15 @@ export default {
}, },
// //
openList(item) { openList(item) {
if (this.currenId == item.tsy_id) {
this.fold = !this.fold
} else {
this.fold = true
if (item.file_total) { if (item.file_total) {
this.currenId = item.tsy_id this.currenId = item.tsy_id
this.job = item.job_type this.job = item.job_type
} }
}
}, },
// //
onSample(sample) { onSample(sample) {
@ -798,7 +801,7 @@ export default {
height: 100%; height: 100%;
.shuju_con { .shuju_con {
width: 100%; width: 100%;
height: 995px; height: calc(100vh - 90px);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

View File

@ -393,6 +393,8 @@ export default {
this.viewer.shadowMap.darkness = 0.8 this.viewer.shadowMap.darkness = 0.8
this.viewer.scene._sunBloom = false this.viewer.scene._sunBloom = false
this.viewer.scene.globe.showGroundAtmosphere = false this.viewer.scene.globe.showGroundAtmosphere = false
this.viewer.scene.postProcessStages.fxaa.enabled = true
// //
// this.viewer.imageryLayers.get(0).show = false // this.viewer.imageryLayers.get(0).show = false
@ -439,16 +441,19 @@ export default {
id: id, id: id,
polyline: { //polyline线 polyline: { //polyline线
positions: Cesium.Cartesian3.fromDegreesArray(degreeArr),// positions: Cesium.Cartesian3.fromDegreesArray(degreeArr),//
width: 5,//线 // width: 5,//线
cusColor: this.color[index], // cusColor: this.color[index],
material: new Cesium.PolylineArrowMaterialProperty( // material: new Cesium.PolylineArrowMaterialProperty(
this.color[index] // this.color[index]
//Cesium.Color.BLUE // //Cesium.Color.BLUE
// glowPower : 0.2,//线(0-1.0) // // glowPower : 0.2,//线(0-1.0)
// color:Cesium.Color.BLUE // // // color:Cesium.Color.BLUE //
),// // ),//
clampToGround: true, //, clampToGround: true, //,
zIndex: 1000 zIndex: 1000,
width: 2,
// 线
material: Cesium.Color.fromRandom({alpha: 0.5})
} }
}) })
this.viewer.camera.setView({ this.viewer.camera.setView({