xuhongjie
严飞永 3 months ago
parent 86cc25ecb0
commit bb0401c177

@ -133,12 +133,12 @@ export default {
dialogVisible: false, dialogVisible: false,
dialogTitle: '编辑项目', dialogTitle: '编辑项目',
form: { form: {
type: '外部', // type: '外部',
images: [], // images: [],
}, },
fileList: [], // fileList: [], //
map: null, // map: null, //
markerIcon: require('@/assets/images/detailsicon/icon-定位@2x.png'), // 使 require markerIcon: require('@/assets/images/detailsicon/icon-定位@2x.png'),
}; };
}, },
methods: { methods: {
@ -167,16 +167,14 @@ export default {
handleEdit() { handleEdit() {
this.dialogTitle = '编辑项目'; this.dialogTitle = '编辑项目';
this.dialogVisible = true; this.dialogVisible = true;
//
this.form = { this.form = {
type: '外部', // type: '外部',
images: [], // images: [],
}; };
}, },
// //
handleSubmit() { handleSubmit() {
this.dialogVisible = false; this.dialogVisible = false;
// API
addxmt(this.form).then((res) => { addxmt(this.form).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success('数据提交成功!'); this.$message.success('数据提交成功!');
@ -196,15 +194,14 @@ export default {
}, },
addTestMarker() { addTestMarker() {
const graphic = new mars2d.graphic.Marker({ const graphic = new mars2d.graphic.Marker({
latlng: [31.3256, 120.7457], //xxxx latlng: [31.3256, 120.7457],
style: { style: {
image: this.markerIcon, // 使 image: this.markerIcon,
width: 46, width: 46,
height: 60, height: 60,
horizontalOrigin: mars2d.HorizontalOrigin.CENTER, horizontalOrigin: mars2d.HorizontalOrigin.CENTER,
verticalOrigin: mars2d.VerticalOrigin.BOTTOM verticalOrigin: mars2d.VerticalOrigin.BOTTOM
}, },
// attr: { remark: "xxxx" }
}); });
this.map.graphicLayer.addGraphic(graphic); this.map.graphicLayer.addGraphic(graphic);
} }

Loading…
Cancel
Save