<template>
|
<div class="box">
|
<ul>
|
<li
|
style="margin-left: 20px"
|
@click="changePlot(item)"
|
v-for="item in itemsOne"
|
>
|
<div class="divli">
|
<div :class="item.class" class="backimge8"></div>
|
</div>
|
<div class="div_li">{{ $t(item.name) }}</div>
|
</li>
|
</ul>
|
<terrainDig ref="terrainDig" />
|
<modelPress ref="modelPress" />
|
</div>
|
</template>
|
|
<script>
|
// 测量-信息弹窗
|
import terrainDig from '../Tools/terrainDig.vue';
|
import modelPress from '../Tools/modelPress.vue';
|
export default {
|
components: { terrainDig, modelPress },
|
data() {
|
return {
|
itemsOne: [
|
{
|
id: '1',
|
name: 'synthesis.point',
|
class: 'h1',
|
},
|
{
|
id: '2',
|
name: 'synthesis.line',
|
class: 'h2',
|
},
|
{
|
id: '3',
|
name: 'synthesis.rectangle',
|
class: 'h3',
|
},
|
{
|
id: '4',
|
name: 'synthesis.polygon',
|
class: 'h4',
|
},
|
{
|
id: '7',
|
name: 'synthesis.symboliclabel',
|
class: 'h7',
|
},
|
{
|
id: '5',
|
name: 'synthesis.flatterrain',
|
class: 'h5',
|
},
|
{
|
id: '6',
|
name: 'synthesis.terrainexcavation',
|
class: 'h6',
|
},
|
{
|
id: '8',
|
name: 'synthesis.removepaint',
|
class: 'h8',
|
},
|
],
|
};
|
},
|
methods: {
|
changePlot(res) {
|
switch (res.id) {
|
case '1':
|
sgworld.Creator.createSimpleGraphic(
|
'point',
|
{},
|
function (entity) {}
|
);
|
break;
|
case '2':
|
sgworld.Creator.createSimpleGraphic(
|
'polyline',
|
{},
|
function (entity) {}
|
);
|
break;
|
case '3':
|
sgworld.Creator.createSimpleGraphic(
|
'rectangle',
|
{},
|
function (entity) {}
|
);
|
break;
|
case '4':
|
sgworld.Creator.createSimpleGraphic(
|
'polygon',
|
{},
|
function (entity) {}
|
);
|
break;
|
case '6':
|
if (window.Excavation) {
|
window.Excavation.clear();
|
window.Excavation = null;
|
} else {
|
this.$refs.terrainDig.open();
|
}
|
|
break;
|
case '5':
|
if (window.TerrainFlattening) {
|
window.TerrainFlattening.remove();
|
window.TerrainFlattening = null;
|
} else {
|
this.$refs.modelPress.open();
|
}
|
|
break;
|
case '7':
|
sgworld.Creator.createModelLibrary();
|
break;
|
case '8':
|
this.clearAll();
|
break;
|
}
|
},
|
clearAll() {
|
sgworld.Creator.SimpleGraphic.clear();
|
if (window.Excavation) {
|
window.Excavation.clear();
|
window.Excavation = null;
|
}
|
if (window.TerrainFlattening) {
|
window.TerrainFlattening.remove();
|
window.TerrainFlattening = null;
|
}
|
},
|
},
|
};
|
</script>
|
|
<style>
|
.box {
|
width: 100%;
|
height: 100%;
|
position: relative;
|
}
|
.box li {
|
list-style: none;
|
float: left;
|
height: 60px;
|
text-align: center;
|
margin: 2px;
|
position: relative;
|
cursor: pointer;
|
margin-top: 5px;
|
}
|
.box ul {
|
margin: 0px;
|
}
|
.h1 {
|
background: url('../../assets/img/synthesis/椭圆 5 拷贝 3.png') no-repeat
|
center;
|
}
|
.h2 {
|
background: url('../../assets/img/synthesis/椭圆 3 拷贝 16.png') no-repeat
|
center;
|
}
|
.h3 {
|
background: url('../../assets/img/synthesis/椭圆 3 拷贝 20.png') no-repeat
|
center;
|
}
|
.h4 {
|
background: url('../../assets/img/synthesis/椭圆 3 拷贝 23.png') no-repeat
|
center;
|
}
|
.h5 {
|
background: url('../../assets/img/synthesis/矩形 14 拷贝.png') no-repeat
|
center;
|
}
|
.h6 {
|
background: url('../../assets/img/synthesis/矩形 14 拷贝 7.png') no-repeat
|
center;
|
}
|
.h7 {
|
background: url('../../assets/img/synthesis/文本风格.png') no-repeat center;
|
}
|
.h8 {
|
background: url('../../assets/img/synthesis/清除.png') no-repeat center;
|
}
|
.backimge8 {
|
width: 30px;
|
height: 30px;
|
position: absolute;
|
background-size: 100% 100%;
|
margin: 0% 30%;
|
}
|
.divli {
|
width: 100%;
|
height: 50%;
|
position: relative;
|
}
|
</style>
|