|
@@ -6,18 +6,19 @@
|
|
|
Resource.ObserverInformation
|
|
|
}}</label> -->
|
|
|
|
|
|
-
|
|
|
<div class="boxchild">
|
|
|
- <el-button type="primary" size="mini" @click="createSmashing">倾斜压平</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="createSmashing"
|
|
|
+ >倾斜压平</el-button
|
|
|
+ >
|
|
|
<el-button type="primary" size="mini" @click="clear">{{
|
|
|
Resource.clear
|
|
|
}}</el-button>
|
|
|
</div>
|
|
|
- <el-select v-model="value" placeholder="请选择对象">
|
|
|
+ <!-- <el-select v-model="value" placeholder="请选择对象">
|
|
|
<el-option v-for="(item, index) in options" :key="index" :label="item.name" :value="item"
|
|
|
@click.native="test(item)">
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -51,7 +52,7 @@ export default {
|
|
|
return this.sharedState.toolBar[6];
|
|
|
},
|
|
|
},
|
|
|
- beforeDestroy() { },
|
|
|
+ beforeDestroy() {},
|
|
|
mounted() {
|
|
|
// store.state.S3MList.forEach((s) => {
|
|
|
// s.forEach((i) => {
|
|
@@ -66,14 +67,23 @@ export default {
|
|
|
this.value = val.name;
|
|
|
viewer.flyTo(val);
|
|
|
},
|
|
|
+ tempTest() {
|
|
|
+ let pos = [
|
|
|
+ 109.61859827027874, 18.321966806715164, -1.2607129544892512,
|
|
|
+ 109.62636359998885, 18.321805377984234, -1.2572823282163708,
|
|
|
+ 109.62492348975545, 18.299342421648266, -0.8778970374238814,
|
|
|
+ 109.62015920613872, 18.29884447877476, -0.8767527547718837,
|
|
|
+ ];
|
|
|
+ let aaa = store.state.tempLatData[0];
|
|
|
+ //遍历所有s3m图层,设置压平
|
|
|
+ for (var i = 0; i < aaa.length; i++) {
|
|
|
+ aaa[i].addFlattenRegion({
|
|
|
+ position: pos,
|
|
|
+ name: "flatten" + Cesium.createGuid(),
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
createSmashing() {
|
|
|
- // console.log(
|
|
|
- // store.state.modellayerlist,
|
|
|
- // "////",
|
|
|
- // store.state.S3MList,
|
|
|
- // "---",
|
|
|
- // store.state.tempLatData
|
|
|
- // );
|
|
|
//绘制多边形
|
|
|
const that = this;
|
|
|
let tooltip = createTooltip(document.body);
|
|
@@ -152,49 +162,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
viewer.scene.globe.removeAllExcavationRegion();
|
|
|
- // //调用压平api进行压平
|
|
|
- // store.state.tempLatData[0].forEach((el) => {
|
|
|
- // //获取时间戳
|
|
|
- // var date = new Date().getTime();
|
|
|
- // // that.flattenNames.push(date);
|
|
|
- // store.state.flattenNames.push(date);
|
|
|
- // //调用压平api进行压平
|
|
|
- // el.addFlattenRegion({
|
|
|
- // position: positions,
|
|
|
- // // name: "flatten" + Math.random(),
|
|
|
- // name: "flatten" + date,
|
|
|
- // });
|
|
|
- // });
|
|
|
-
|
|
|
- // store.state.S3MList.forEach((s) => {
|
|
|
- // //调用压平api进行压平
|
|
|
- // s.forEach((el) => {
|
|
|
- // //获取时间戳
|
|
|
- // var date = new Date().getTime();
|
|
|
- // // that.flattenNames.push(date);
|
|
|
- // store.state.flattenNames.push(date);
|
|
|
- // //调用压平api进行压平
|
|
|
- // el.addFlattenRegion({
|
|
|
- // position: positions,
|
|
|
- // // name: "flatten" + Math.random(),
|
|
|
- // name: "flatten" + date,
|
|
|
- // });
|
|
|
- // });
|
|
|
- // });
|
|
|
-
|
|
|
- //获取时间戳
|
|
|
- var date = new Date().getTime();
|
|
|
- // that.flattenNames.push(date);
|
|
|
- that.nameStr = date;
|
|
|
- store.state.flattenNames.push(date);
|
|
|
- //调用压平api进行压平
|
|
|
- // store.state.tempLatData.addFlattenRegion({
|
|
|
- // console.log(that.testLay, "this.testLay222");
|
|
|
- that.testLay.addFlattenRegion({
|
|
|
- position: positions,
|
|
|
- // name: "flatten" + Math.random(),
|
|
|
- name: "flatten" + that.nameStr,
|
|
|
- });
|
|
|
+ let aaa = store.state.tempLatData[0];
|
|
|
+ //遍历所有s3m图层,设置压平
|
|
|
+ for (var i = 0; i < aaa.length; i++) {
|
|
|
+ aaa[i].addFlattenRegion({
|
|
|
+ position: positions,
|
|
|
+ name: "flatten" + Cesium.createGuid(),
|
|
|
+ });
|
|
|
+ }
|
|
|
+ positions = [];
|
|
|
that.handler_Cut_fill.polygon.show = false;
|
|
|
that.handler_Cut_fill.polyline.show = false;
|
|
|
that.handler_Cut_fill.deactivate();
|
|
@@ -210,10 +186,7 @@ export default {
|
|
|
that.handler_Cut_fill = null;
|
|
|
that.value = "";
|
|
|
}
|
|
|
- if (that.nameStr != "") {
|
|
|
- that.testLay.removeFlattenRegion("flatten" + that.nameStr);
|
|
|
- store.state.flattenNames = [];
|
|
|
- }
|
|
|
+
|
|
|
// if (store.state.flattenNames.length) {
|
|
|
// store.state.flattenNames.forEach((el) => {
|
|
|
// that.testLay.removeFlattenRegion("flatten" + el);
|
|
@@ -231,9 +204,11 @@ export default {
|
|
|
Cesium.DrawMode.Polygon,
|
|
|
0
|
|
|
);
|
|
|
- this.handlerTemp = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
|
|
|
+ this.handlerTemp = new Cesium.ScreenSpaceEventHandler(
|
|
|
+ viewer.scene.canvas
|
|
|
+ );
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|