From 6094c0ed1baa40ffa0ce587704660b2a6d493bbf Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Mon, 25 Jul 2022 19:15:38 +0800
Subject: [PATCH] #D
---
src/components/Tab/Plot.vue | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/src/components/Tab/Plot.vue b/src/components/Tab/Plot.vue
index d062258..02cc09e 100644
--- a/src/components/Tab/Plot.vue
+++ b/src/components/Tab/Plot.vue
@@ -44,12 +44,13 @@
circle
@click="() => focusHandle(label.attr.id)"
/>
- <el-button
- icon="el-icon-edit"
- size="mini"
- circle
- @click="() => editHandle(label)"
- />
+
+<!-- <el-button-->
+<!-- icon="el-icon-edit"-->
+<!-- size="mini"-->
+<!-- circle-->
+<!-- @click="() => editHandle(label)"-->
+<!-- />-->
<el-button
icon="el-icon-delete"
type="danger"
@@ -70,8 +71,8 @@
>
<p>请输入内容:</p>
<el-input v-model="label.name" placeholder="请输入内容" />
- <p>请输入内容:</p>
- <el-select v-model="color" placeholder="请输入内容" >
+ <p>请选择风险等级:</p>
+ <el-select v-model="color" placeholder="请选择" >
<el-option
v-for="item in colorList"
:key="item.id"
@@ -175,8 +176,8 @@
this.showCreatePanel = true;
},
removeHandle(label) {
- if (!global.map) return;
debugger
+ if (!global.map) return;
for(let i in this.colorMapList){
if(JSON.parse(this.colorMapList[i].properties).attr.id === label.attr.id){
deleteColorMap({id:this.colorMapList[i].id}).then(res =>{
@@ -193,7 +194,7 @@
})
}
}
-
+
},
closeCreateHandle() {
@@ -227,27 +228,27 @@
map.startDraw(
{
type: 'polygon',
- style: { text: name ,color:this.color},
+ style: { text: name ,color:this.color, clampToGround: true},
attr: {
name,
},
},
(entity) => {
- debugger
+ console.log(wutu3d.draw.attr.getCoordinates(entity));
this._initLabel();
this.$store.dispatch('map/updateTimestamp');
this.form = {
id:'',
etype:this.type,
"type": "Feature",
- "properties":
+ "properties":
JSON.stringify(entity.attribute),
"geometry": JSON.stringify({
"type": "Polygon",
"coordinates": [
-
+
wutu3d.draw.attr.getCoordinates(entity)
-
+
]
})
}
@@ -263,6 +264,7 @@
message:'四色图新增成功',
})
}
+ this.$emit('getList')
})
}
);
--
Gitblit v1.9.2