GULIMMO
2023-11-11 c77f5973192a8d22ff0ed34207f2397232c3e0d2
场所维护、房屋管理页面更新
3 files modified
128 ■■■■ changed files
subPackage/house/roomControl/index.vue 13 ●●●●● patch | view | raw | blame | history
subPackage/house/roomDetails/index.vue 2 ●●● patch | view | raw | blame | history
subPackage/workbench/views/editExamine.vue 113 ●●●● patch | view | raw | blame | history
subPackage/house/roomControl/index.vue
@@ -57,7 +57,7 @@
                    {{ labelModelInfo.title }}
                </view>
                <u-radio-group class="mt-40" v-model="labelValue" placement="row">
                <u-radio-group v-model="" class="mt-40" v-model="labelValue" placement="row">
                    <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in labelList" :key="index"
                        :label="item.name" :labelColor="item.color" :name="item.name" :activeColor="item.color" @change="radioChange(item)">
                    </u-radio>
@@ -178,10 +178,11 @@
                    title: '',
                    selectedColor: ''
                },
                labelValue: '',
                labelValue: "",
                remark: '',
                // 标记
                number: 0
                number: 0
            }
        },
        created() {
@@ -306,9 +307,11 @@
                this.labelModelInfo.title = item.name
                this.currentLabelInfo = item
                // 遍历标签集合
                this.labelList.forEach(e => {
                this.labelList.forEach(e => {
                    console.log(e.color,item.color);
                    if (e.color == item.color) {
                        this.labelValue = e.name
                        this.labelValue = e.name
                        console.log(e);
                        this.remark = item.remark
                        this.number = 1
                    }
subPackage/house/roomDetails/index.vue
@@ -62,7 +62,7 @@
                        <view class="l flex">
                            <u-icon name="/static/icon/selected.png" size="16"></u-icon>
                            <!-- u-icon name="photo"></u-icon> -->
                            <view class="owner-img-box">主</view>
                            <view class="owner-img-box" v-if="item.relationship == 1">主</view>
                        </view>
                        <view class="r">
                            <u-icon name="/static/icon/delete.png" size="16" @click="removeHouseholdSub(item)"></u-icon>
subPackage/workbench/views/editExamine.vue
@@ -102,13 +102,13 @@
            // this.getLocation()
        },
        methods: {
            getLocation() {
                uni.chooseLocation({
                    success: (res) => {
                        console.log(res);
                    }
                })
            },
            // getLocation() {
            //     uni.chooseLocation({
            //         success: (res) => {
            //             console.log(res);
            //         }
            //     })
            // },
            getCsDetails() {
                getPlaceDetail({
                    placeId: this.curSelectSite.id
@@ -128,10 +128,19 @@
                    Object.keys(this.form).forEach(key => {
                        this.form[key] = data[key]
                        if (key === 'imageUrls' || key === 'planImageUrls') {
                            this.form[key] = []
                            !!data[key] && this.form[key].push(data[key])
                            this.form[key] = []
                            if (!!data[key]) {
                                data[key] = JSON.parse(data[key])
                                if (Array.isArray(data[key])) {
                                    this.form[key] = data[key]
                                }
                            } else {
                                this.form[key].push(data[key])
                            }
                        }
                    })
                    })
                    console.log(this.form);
                    this.personNum = placePractitioner.length
                    this.$nextTick(() => {
                        console.log(placePractitioner);
@@ -140,49 +149,49 @@
                        })
                    })
                })
            },
            updatePlaceExt(data) {
                data['imageUrls'] = data['imageUrls'].join('、')
                data['planImageUrls'] = data['planImageUrls'].join('、')
                updatePlaceExtData({
                    ...data
                }).then(res => {
                    const {
                        code
                    } = res
                    if (code !== 200) {
                        uni.showToast({
                            title: '提交失败',
                            icon: 'error'
                        })
                        return
                    }
                    uni.showToast({
                        title: '提交成功',
                        icon: 'success',
                        complete() {
                            setTimeout(() => {
                                uni.navigateBack()
                            }, 1500)
                        }
                    })
                })
            },
            addPerson() {
                this.personNum++
            },
            submit() {
                const placePractitioner = []
                this.$refs.formItemRef.forEach(item => {
                    item.form.placeId = this.form.placeId
                    placePractitioner.push(item.form)
                })
                this.form.placePractitioner = placePractitioner
                this.updatePlaceExt(this.form)
            },
            pushPage() {
                this.$u.func.globalNavigator('/subPackage/workbench/views/cshw')
            }
        },
        updatePlaceExt(data) {
            data['imageUrls'] = JSON.stringify(data['imageUrls'])
            data['planImageUrls'] = JSON.stringify(data['planImageUrls'])
            updatePlaceExtData({
                ...data
            }).then(res => {
                const {
                    code
                } = res
                if (code !== 200) {
                    uni.showToast({
                        title: '提交失败',
                        icon: 'error'
                    })
                    return
                }
                uni.showToast({
                    title: '提交成功',
                    icon: 'success',
                    complete() {
                        setTimeout(() => {
                            uni.navigateBack()
                        }, 1500)
                    }
                })
            })
        },
        addPerson() {
            this.personNum++
        },
        submit() {
            const placePractitioner = []
            this.$refs.formItemRef.forEach(item => {
                item.form.placeId = this.form.placeId
                placePractitioner.push(item.form)
            })
            this.form.placePractitioner = placePractitioner
            this.updatePlaceExt(this.form)
        },
        pushPage() {
            this.$u.func.globalNavigator('/subPackage/workbench/views/cshw')
        }
    }
</script>