shuishen
2024-01-03 7cef46a5e85fc015463ae1a0aa65efee689a8dcc
场所管理,位置相关调整
2 files modified
45 ■■■■ changed files
src/views/place/components/baseAllInfo.vue 42 ●●●● patch | view | raw | blame | history
src/views/place/index.vue 3 ●●●● patch | view | raw | blame | history
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 () {
src/views/place/index.vue
@@ -607,6 +607,8 @@
                getPlace(this.form.id).then((res) => {
                    this.form = res.data.data
                    this.form.location = [this.form.lng, this.form.lat, this.form.location].join(',')
                    if (this.form.imageUrls.length) {
                        this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website.minioUrl + item).join(',')
                    }
@@ -626,7 +628,6 @@
                    }
                    done()
                })
            } else {
                done()