shuishen
2024-01-05 7c53a17cab68c2e1c86f0487c7b72ea5d929b2e5
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()
@@ -455,13 +474,23 @@
                imageUrls = urls.join(",")
            }
            let label = this.form.label
            if (this.form.smallLabel != '') {
                label = label + ',' + this.form.smallLabel
            }
            delete this.form.smallLabel
            this.$refs.baseForm.validate((valid, done, msg) => {
                if (valid) {
                    that.$axios.all([
                        update({
                            // ...this.placeElement.curRow,
                            ...this.form,
                            imageUrls
                            imageUrls,
                            label,
                            ...this.locationDispose(this.form.location)
                        }),
                        updatePlaceExt(this.placeForm)
                    ]).then(that.$axios.spread(function () {