From a8581d9c4c0c0a0d1ddf4fe5082d7f6200b321cc Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Tue, 17 May 2022 15:22:16 +0800
Subject: [PATCH] bug
---
src/components/mapSelect/index.vue | 156 -----------------------------
src/views/active/activity.vue | 25 +++--
src/views/resource/parking.vue | 17 +++-
3 files changed, 34 insertions(+), 164 deletions(-)
delete mode 100644 src/components/mapSelect/index.vue
diff --git a/src/components/mapSelect/index.vue b/src/components/mapSelect/index.vue
deleted file mode 100644
index 506ac0a..0000000
--- a/src/components/mapSelect/index.vue
+++ /dev/null
@@ -1,156 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索位置
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确认选择
-
-
-
-
-
-
-
-
-
diff --git a/src/views/active/activity.vue b/src/views/active/activity.vue
index 659245e..33a5b0a 100644
--- a/src/views/active/activity.vue
+++ b/src/views/active/activity.vue
@@ -390,7 +390,7 @@
}]
},
markerLayer: {},
- map: {},
+ map: null,
imgsrc: "/src/assets/imgs/ditu.png"
}
},
@@ -420,10 +420,10 @@
},
methods: {
initMap() {
- //如果地图存在,就销毁,下面会重新创建一个
- // if (!!this.map) {
- // this.map.destroy();
- // }
+ //如果地图存在,就销毁,下面会重新创建一个
+ if (this.map!=null) {
+ this.map.destroy()
+ }
this.$nextTick(() => {
let that = this;
console.log(window); // 通过window获取
@@ -433,7 +433,6 @@
zoom: 18, //设置地图缩放级别
center: center, //设置地图中心点坐标
});
- console.log(map);
this.map = map;
map.on("click", (e) => {
this.markerLayer.setGeometries([]);
@@ -523,7 +522,19 @@
},
submitForm(formName) {
var that = this;
- that.form.end_time = that.form.start_time.substring(0, 10) + " " + that.form.end_time;
+ that.form.end_time = that.form.start_time.substring(0, 10) + " " + that.form.end_time;
+ let listUrl = [];
+ for (var m of that.bannersList) {
+ if (m.response)
+ listUrl.push({
+ "upload_id": m.response.id
+ });
+ else
+ listUrl.push({
+ "upload_id": m.upload_id
+ });
+ }
+ that.form.banners_list = listUrl;
this.$refs[formName].validate((valid) => {
if (valid) {
if (that.form.id) {
diff --git a/src/views/resource/parking.vue b/src/views/resource/parking.vue
index 4b137c1..d7af5d5 100644
--- a/src/views/resource/parking.vue
+++ b/src/views/resource/parking.vue
@@ -7,7 +7,7 @@
-
+
@@ -234,6 +234,21 @@
required: true,
message: '请输入停车场名称',
trigger: 'blur'
+ }],
+ address: [{
+ required: true,
+ message: '请输入停车场地址',
+ trigger: 'blur'
+ }],
+ longitude: [{
+ required: true,
+ message: '请输入经度',
+ trigger: 'blur'
+ }],
+ latitude: [{
+ required: true,
+ message: '请输入纬度',
+ trigger: 'blur'
}]
},