From 7cef46a5e85fc015463ae1a0aa65efee689a8dcc Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 03 Jan 2024 09:35:46 +0800
Subject: [PATCH] 场所管理,位置相关调整
---
src/views/place/components/baseAllInfo.vue | 42 +++++++++++++++++++++++++++++++-----------
1 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/src/views/place/components/baseAllInfo.vue b/src/views/place/components/baseAllInfo.vue
index 89855bb..06842f8 100644
--- a/src/views/place/components/baseAllInfo.vue
+++ b/src/views/place/components/baseAllInfo.vue
@@ -175,18 +175,25 @@
},
span: 24,
},
+
{
- label: "场所位置",
- prop: "localtion",
- span: 24,
- minWidth: 220,
+ width: 160,
overHidden: true,
- // rules: [{
- // required: true,
- // message: "请输入区域",
- // trigger: "blur",
- // },],
- }
+ slot: true,
+ label: "位置",
+ prop: "location",
+ type: 'map',
+ dataType: "string",
+ span: 24,
+ value: [117.966460, 28.431002, ""],
+ rules: [
+ {
+ required: true,
+ message: "请选择位置",
+ trigger: "blur",
+ },
+ ],
+ },
]
},
@@ -297,6 +304,8 @@
]).then(that.$axios.spread(function (baseInfo, restInfo) {
that.form = baseInfo.data.data
+ that.form.location = [that.form.lng, that.form.lat, that.form.location].join(',')
+
if (that.form.imageUrls && that.form.imageUrls.length) {
that.form.imageUrls = that.form.imageUrls.split(",").filter(item => item != '').map(item => website.minioUrl + item).join(',')
}
@@ -346,6 +355,16 @@
},
methods: {
+ locationDispose (data) {
+ data = data.split(',')
+
+ return {
+ longitude: data[0],
+ latitude: data[1],
+ location: data[2]
+ }
+ },
+
selectionClear () {
this.$nextTick(() => {
this.$refs.crud && this.$refs.crud.toggleSelection()
@@ -470,7 +489,8 @@
// ...this.placeElement.curRow,
...this.form,
imageUrls,
- label
+ label,
+ ...this.locationDispose(this.form.location)
}),
updatePlaceExt(this.placeForm)
]).then(that.$axios.spread(function () {
--
Gitblit v1.9.3