|
@@ -24,9 +24,9 @@
|
|
|
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column fixed="right" label="操作" width="90">
|
|
|
|
|
|
+ <el-table-column fixed="right" label="操作" width="50">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button @click="info(scope.row)" type="text" size="small">详情</el-button>
|
|
|
|
|
|
+ <!-- <el-button @click="info(scope.row)" type="text" size="small">详情</el-button> -->
|
|
<el-button @click="go(scope.row)" type="text" size="small">定位</el-button>
|
|
<el-button @click="go(scope.row)" type="text" size="small">定位</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -42,7 +42,7 @@ import * as tdsy from "@/views/cockpit/js/tdsy";
|
|
import * as wellknown from "wellknown";
|
|
import * as wellknown from "wellknown";
|
|
import * as turf from "@turf/turf";
|
|
import * as turf from "@turf/turf";
|
|
|
|
|
|
-let pick_entity = null;
|
|
|
|
|
|
+let BoxCommonVector_entity = null;
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -83,7 +83,7 @@ export default {
|
|
},
|
|
},
|
|
info() { },
|
|
info() { },
|
|
switch_show(flag) {
|
|
switch_show(flag) {
|
|
- pick_entity.entities.values.forEach((res) => {
|
|
|
|
|
|
+ BoxCommonVector_entity.entities.values.forEach((res) => {
|
|
res.show = flag;
|
|
res.show = flag;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -93,7 +93,7 @@ export default {
|
|
const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
|
|
const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
|
|
console.log('oneDArray: ', oneDArray);
|
|
console.log('oneDArray: ', oneDArray);
|
|
|
|
|
|
- pick_entity.entities.add({
|
|
|
|
|
|
+ BoxCommonVector_entity.entities.add({
|
|
polygon: {
|
|
polygon: {
|
|
// 获取指定属性(positions,holes(图形内需要挖空的区域))
|
|
// 获取指定属性(positions,holes(图形内需要挖空的区域))
|
|
hierarchy: {
|
|
hierarchy: {
|
|
@@ -147,8 +147,8 @@ export default {
|
|
go(item) {
|
|
go(item) {
|
|
let arr = [];
|
|
let arr = [];
|
|
const that = this;
|
|
const that = this;
|
|
- pick_entity = new Cesium.CustomDataSource("pick_entity");
|
|
|
|
- viewer.dataSources.add(pick_entity);
|
|
|
|
|
|
+ BoxCommonVector_entity = new Cesium.CustomDataSource("BoxCommonVector_entity");
|
|
|
|
+ viewer.dataSources.add(BoxCommonVector_entity);
|
|
|
|
|
|
Object.keys(item).forEach(key => {
|
|
Object.keys(item).forEach(key => {
|
|
|
|
|
|
@@ -168,7 +168,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
const twoDArray = geojson.coordinates[0];
|
|
const twoDArray = geojson.coordinates[0];
|
|
const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
|
|
const oneDArray = twoDArray.reduce((accumulator, currentValue) => accumulator.concat(currentValue), []);
|
|
- pick_entity.entities.add({
|
|
|
|
|
|
+ BoxCommonVector_entity.entities.add({
|
|
polygon: {
|
|
polygon: {
|
|
// 获取指定属性(positions,holes(图形内需要挖空的区域))
|
|
// 获取指定属性(positions,holes(图形内需要挖空的区域))
|
|
hierarchy: {
|
|
hierarchy: {
|
|
@@ -224,13 +224,17 @@ export default {
|
|
that.switch_show(flag);
|
|
that.switch_show(flag);
|
|
}, 500);
|
|
}, 500);
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- clearInterval(time);
|
|
|
|
- console.log("s");
|
|
|
|
- console.log(pick_entity);
|
|
|
|
- viewer.dataSources.remove(pick_entity);
|
|
|
|
|
|
+ // clearInterval(time);
|
|
|
|
+ console.log(BoxCommonVector_entity);
|
|
|
|
+ try {
|
|
|
|
+ viewer.dataSources.remove(BoxCommonVector_entity);
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log('error: ', error);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
- }, 6000)
|
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -296,8 +300,8 @@ export default {
|
|
const that = this;
|
|
const that = this;
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
|
|
|
- pick_entity = new Cesium.CustomDataSource("pick_entity");
|
|
|
|
- viewer.dataSources.add(pick_entity);
|
|
|
|
|
|
+ // BoxCommonVector_entity = new Cesium.CustomDataSource("BoxCommonVector_entity");
|
|
|
|
+ // viewer.dataSources.add(BoxCommonVector_entity);
|
|
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|