| | |
| | | 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" |
| | |
| | | > |
| | | <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" |
| | |
| | | }, |
| | | removeHandle(label) { |
| | | if (!global.map) return; |
| | | debugger |
| | | 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 =>{ |
| | |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | closeCreateHandle() { |
| | |
| | | }; |
| | | }, |
| | | async createHandle() { |
| | | // debugger |
| | | // this.form.geometry = JSON.stringify(this.form.geometry) |
| | | // this.form.properties = JSON.stringify(this.form.properties) |
| | | // let res = await addMap(this.form) |
| | |
| | | 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) |
| | | |
| | | |
| | | ] |
| | | }) |
| | | } |
| | |
| | | message:'四色图新增成功', |
| | | }) |
| | | } |
| | | this.$emit('getList') |
| | | }) |
| | | } |
| | | ); |