GULIMMO
2023-11-10 551cba02c861b7f013322cd045ee899a7fa4ce03
场所维护页面更新
9 files modified
3 files added
218 ■■■■ changed files
api/place/place.js 8 ●●●●● patch | view | raw | blame | history
pages.json 2 ●●● patch | view | raw | blame | history
pages/home/index.vue 4 ●●●● patch | view | raw | blame | history
static/icon/blue_floor.png patch | view | raw | blame | history
static/icon/store.png patch | view | raw | blame | history
static/icon/way.png patch | view | raw | blame | history
subPackage/house/houseNumber/index.vue 3 ●●●● patch | view | raw | blame | history
subPackage/house/list/index.vue 16 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/cscj.vue 155 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/csjl.vue 8 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/examine.vue 12 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/rental.vue 10 ●●●● patch | view | raw | blame | history
api/place/place.js
@@ -15,3 +15,11 @@
        params
    })
}
export const getPlaceDetail = (params) => {
    return http.request({
        url: '/blade-place/place/getDetail',
        method: 'GET',
        params
    })
}
pages.json
@@ -255,7 +255,7 @@
                {
                    "path": "views/reportAudit",
                    "style": {
                        "navigationBarTitleText": "审核",
                        "navigationBarTitleText": "报事报修处理",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
pages/home/index.vue
@@ -575,8 +575,8 @@
                        let obj = that.getUrlParams(res.result)
                        console.log(obj)
                        let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId
                        console.log(url)
                        // let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId
                        let url = "/subPackage/workbench/views/cscj?houseCode=" + obj.stdId
                        that.$u.func.globalNavigator(url, "navTo")
static/icon/blue_floor.png
static/icon/store.png
static/icon/way.png
subPackage/house/houseNumber/index.vue
@@ -241,7 +241,8 @@
                })
            },
            cscjClick() {
                this.$u.func.globalNavigator('/subPackage/workbench/views/cscj?stdId=' + this.stdId)
                // this.$u.func.globalNavigator('/subPackage/workbench/views/cscj?stdId=' + this.stdId)
                this.$u.func.globalNavigator('/subPackage/workbench/views/cscj?houseCode=' + this.stdId)
            },
            csjlClick() {
                this.$u.func.globalNavigator('/subPackage/workbench/views/csjl?stdId=' + this.stdId)
subPackage/house/list/index.vue
@@ -1,10 +1,13 @@
<template>
    <view class="container">
        <view class="header">
            <u-icon name="map" size="32"></u-icon>
        </view>
        <view class="flex f-d-c main">
            <view class="flex house-container">
                <view class="house-list-box" v-if="isShowAoi" v-for="(item, index) in houseList" @click="pushPage(item)">
                    <view class="l">
                        <u-icon name="home" color="#fff"></u-icon>
                        <u-icon name="/static/icon/blue_floor.png"></u-icon>
                    </view>
                    <view class="r">
                        {{item.title}}栋
@@ -102,7 +105,8 @@
                }else{
                    // 跳转场所页面 addressType == 2
                    console.log(value,8888)
                    let url = `/subPackage/workbench/views/cscj?stdId=${id}`
                    // let url = `/subPackage/workbench/views/cscj?stdId=${id}`
                    let url = `/subPackage/workbench/views/cscj?houseCode=${id}`
                    this.$u.func.globalNavigator(url, "navTo")
                }
            }
@@ -111,17 +115,23 @@
</script>
<style lang="scss" scoped>
    page {
        background-color: #f6f6f6;
    }
    .container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #F9F9FA;
        font-size: 26rpx;
        .header {
            background-color: #fff;
        }
        .main {
            border: 1px solid red;
            position: relative;
            height: 0;
            flex: 1;
subPackage/workbench/views/cscj.vue
@@ -5,7 +5,7 @@
                <box-title title="基础信息"></box-title>
            </view>
            <view class="item">
                <u-form-item v-if="!stdId" @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
                <u-form-item v-if="!currentId" @click="showPicker = true" class="form-item" labelWidth="100" label="楼栋:"
                    :required="isRequired" :disabled="isDisabled" prop="buildingCode">
                    <u--input border="none" disabledColor="#ffffff" v-model="form.building" placeholder="请选择">
                    </u--input>
@@ -95,7 +95,8 @@
            <lineItem :dataInfo="comprehensiveData.scene">
                <template v-slot:pic="{scope}">
                    <view class="image" v-if="scope.value !== ''">
                        <u--image @click="imgPreview(scope.value)" width="200rpx" height="200rpx" :src="scope.value"></u--image>
                        <u--image @click="imgPreview(scope.value)" width="200rpx" height="200rpx"
                            :src="scope.value"></u--image>
                    </view>
                </template>
            </lineItem>
@@ -127,7 +128,7 @@
        <view class="bottom">
            <view class="btn">
                <u-button @click="submit" type="primary" text="提交"></u-button>
                <u-button @click="submit" type="primary" text="提交" v-if="!currentId"></u-button>
            </view>
        </view>
@@ -159,8 +160,14 @@
        getDoorplateAddressList
    } from "@/api/doorplateAddress/doorplateAddress";
    import {
        getPlaceDetail
    } from '@/api/place/place.js'
    import {
        add
    } from "@/api/place/place";
    import {
        format
    } from "echarts";
    export default {
        mixins: [uploadMixin],
        components: {
@@ -183,7 +190,7 @@
                    label: "",
                    remark: "",
                    imageUrls: "",
                    placeName: ""
                    placeName: "",
                },
                rules: {
                    'buildingCode': {
@@ -294,7 +301,6 @@
                    ],
                    scene: [{
                            label: "消防照片",
                            value: "",
                            useSlot: "pic",
                        },
                        {
@@ -326,8 +332,8 @@
                activeIds: [],
                showLabelList: [],
                stdId: "",
                houseCode: "",
                currentId: ""
            }
        },
        watch: {
@@ -340,6 +346,9 @@
                handler(newVal) {
                    console.log(newVal)
                }
            },
            showLabelList(newVal) {
                console.log(newVal);
            }
        },
@@ -354,9 +363,13 @@
            styleIsolation: 'shared', // 解除样式隔离
        },
        onLoad(option) {
            this.stdId = option.stdId
            console.log(this.stdId, "----------")
            if (this.stdId) {
            const {
                houseCode,
                id
            } = option
            this.houseCode = houseCode
            this.currentId = id
            if (this.currentId || this.houseCode) {
                this.getBuildingDetail()
            }
@@ -368,48 +381,118 @@
        },
        methods: {
            getBuildingDetail(params = {}) {
                getDoorplateAddressDetail(Object.assign(params, {
                    stdId: this.stdId
                })).then(res => {
                    let data = res.data
                    this.form.buildingCode = data.buildingCode
            // getBuildingDetail(params = {}) {
            //     getDoorplateAddressDetail(Object.assign(params, {
            //         stdId: this.stdId
            //     })).then(res => {
            //         let data = res.data
            //         this.form.buildingCode = data.buildingCode
                    let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
                        data.buildingName
            //         let buildingNameArr = [data.townStreetName, data.neiName, data.streetRuName, data.aoiName,
            //             data.buildingName
            //         ]
            //         let arr = buildingNameArr.filter(e => {
            //             return e != null || e != ''
            //         })
            //         // 赋值
            //         // this.form.placeName = data['placeName']
            //         Object.keys(this.form).forEach(key => {
            //             if (!data[key]) {
            //                 this.form[key] = data.place[key]
            //             } else {
            //                 this.form[key] = data[key]
            //             }
            //         })
            //         this.form.building = arr.join("")
            //         Object.keys(this.comprehensiveData).forEach(key => {
            //             this.comprehensiveData[key].forEach(item => {
            //                 if (!data[item.name]) {
            //                     item.value = data.place[item.name] || '未完善'
            //                 } else {
            //                     item.value = data[item.name] || '未完善'
            //                 }
            //             })
            //             this.publicData[key].forEach(item => {
            //                 if (!data[item.name]) {
            //                     item.value = data.place[item.name] || '未完善'
            //                 } else {
            //                     item.value = data[item.name] || '未完善'
            //                 }
            //             })
            //         })
            //     })
            // },
            getBuildingDetail(params = {}) {
                let idorCodeParams = {}
                if (this.houseCode) {
                    idorCodeParams = {
                        houseCode: this.houseCode
                    }
                }
                if (this.currentId) {
                    idorCodeParams = {
                        id: this.currentId
                    }
                }
                getPlaceDetail({
                    ...params,
                    ...idorCodeParams
                }).then(({
                    code,
                    data
                }) => {
                    if (code !== 200) {
                        uni.showToast({
                            title: "数据加载失败",
                            icon: 'error'
                        })
                        return
                    }
                    const dpaEntity = data.doorplateAddressEntity
                    this.form.buildingCode = dpaEntity?.buildingCode
                    let buildingNameArr = [
                        dpaEntity?.townStreetName,
                        dpaEntity?.neiName,
                        dpaEntity?.streetRuName,
                        dpaEntity?.aoiName,
                        dpaEntity?.buildingName
                    ]
                    let arr = buildingNameArr.filter(e => {
                        return e != null || e != ''
                    })
                    // 赋值
                    // this.form.placeName = data['placeName']
                    this.form.placeName = data['placeName']
                    Object.keys(this.form).forEach(key => {
                        if (!data[key]) {
                            this.form[key] = data.place[key]
                        } else {
                            this.form[key] = data[key]
                        this.form[key] = data[key] || data.doorplateAddressEntity[key] || '未完善'
                        if (key === "images") {
                            this.form[key] = []
                        }
                    })
                    
                    this.form.building = arr.join("")
                    
                    Object.keys(this.comprehensiveData).forEach(key => {
                        console.log(key);
                        this.comprehensiveData[key].forEach(item => {
                            if (!data[item.name]) {
                                item.value = data.place[item.name] || '未完善'
                            } else {
                                item.value = data[item.name] || '未完善'
                            }
                            item.value = data[item.name] || data.doorplateAddressEntity[item
                                .name] || '未完善'
                        })
                        this.publicData[key].forEach(item => {
                            if (!data[item.name]) {
                                item.value = data.place[item.name] || '未完善'
                            } else {
                                item.value = data[item.name] || '未完善'
                            }
                            item.value = data[item.name] || data.doorplateAddressEntity[item
                                .name] || '未完善'
                        })
                    })
                    console.log(this.labelList);
                    this.showLabelList
                    placePoiLabelVOList.forEach(item => {
                        const label = this.labelList.find(sl => sl.text === item.labelName)
                        console.log(label);
                    })
                })
            },
@@ -418,7 +501,7 @@
                const that = this
                this.$refs.form.validate().then(valid => {
                    if (valid) {
                        if (this.form.images.length > 0) {
                        if (this.form?.images?.length > 0) {
                            let urls = []
                            this.form.images.forEach(e => {
                                urls.push(e.name)
subPackage/workbench/views/csjl.vue
@@ -118,17 +118,15 @@
                this.iptContext = ''
                this.searchConfirm()
            },
            pushPage({
                houseCode
            }) {
                if (!houseCode) {
            pushPage({ id }) {
                if (!id) {
                    uni.showToast({
                        title: "关键参数为空",
                        icon: "error"
                    })
                    return
                }
                let url = "/subPackage/workbench/views/cscj?stdId=" + houseCode
                let url = "/subPackage/workbench/views/cscj?id=" + id
                this.$u.func.globalNavigator(url)
            }
        }
subPackage/workbench/views/examine.vue
@@ -52,7 +52,7 @@
                <u-form labelWidth="70" :model="form" ref="form" class="form">
                    <u-form-item label="审核状态" @click="isPickerShow = true" class="form-item">
                        <u--input v-model="form.confirmFlag" disabled disabledColor="#ffffff" placeholder="请选择审核状态"
                            border="none"></u--input>
                            border="none" :placeholder="this.defaultPlaceholder"></u--input>
                        <u-icon slot="right" name="arrow-right"></u-icon>
                    </u-form-item>
                    <u-form-item label="备注" class="form-item">
@@ -64,7 +64,7 @@
        <view class="bottom-btn">
            <u-button type="primary" @click="submit">提交审核</u-button>
        </view>
        <u-picker :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
        <u-picker :defaultIndex="[this.defaultColumns]" :closeOnClickOverlay="true" @close="isPickerShow = false" :show="isPickerShow" ref="uPicker"
            :columns="columns" keyName="name" @cancel="isPickerShow = false" @confirm="handleConfirm"></u-picker>
    </view>
</template>
@@ -106,7 +106,7 @@
                ],
                placePersonList: [],
                form: {
                    confirmFlag: '待审核',
                    confirmFlag: '',
                    confirmNotion: ''
                },
                imageObj: {
@@ -133,6 +133,8 @@
                    placeId: '',
                    id: ''
                },
                defaultColumns: 0,
                defaultPlaceholder: ''
            }
        },
        onLoad(option) {
@@ -169,6 +171,10 @@
                this.basicData.forEach(item => {
                    item.value = data[item.name] || '未完善'
                })
                console.log(data);
                let columns = this.columns[0]
                this.defaultColumns = columns.findIndex(item => item.status == data.confirmFlag)
                this.defaultPlaceholder = columns[this.defaultColumns].name
                this.placePersonList = data.placePractitioner
            },
            async checkPlaceExt(data) {
subPackage/workbench/views/rental.vue
@@ -129,6 +129,7 @@
                    current: 1,
                    size: 10
                },
                selectParams: {},
                tenantStatus: [{
                        name: '未到期',
                        value: 0
@@ -184,8 +185,13 @@
                        floor: floor[0].value
                    }
                }
                this.getRentalHouseInfo(params)
                this.selectParams = params
                this.getRentalHouseInfo()
                this.getStatistics(auditStatus[0].value)
                // 回到顶部,避免触发触底加载
                uni.pageScrollTo({
                    scrollTop: 0, // 滚动到页面的目标位置(单位px)
                });
            },
            getStatistics(auditStatus = '') {
                let params = {}
@@ -215,7 +221,7 @@
                } = await getRentalHouseContent({
                    tenantName: this.keyword,
                    ...this.pagingParams,
                    ...params
                    ...this.selectParams
                })
                if (code !== 200) {
                    uni.showToast({