shuishen
2023-10-31 d6001eac15349a55a01b5ff781b1fcf285b32efe
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app
6 files modified
543 ■■■■ changed files
api/doorplateAddress/doorplateAddress.js 32 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 48 ●●●●● patch | view | raw | blame | history
subPackage/bs/views/rentDetail.vue 114 ●●●● patch | view | raw | blame | history
subPackage/house/family/index.vue 215 ●●●● patch | view | raw | blame | history
subPackage/house/list/index.vue 47 ●●●● patch | view | raw | blame | history
subPackage/house/roomDetails/index.vue 87 ●●●● patch | view | raw | blame | history
api/doorplateAddress/doorplateAddress.js
@@ -11,3 +11,35 @@
        }
    })
}
export const getHouseList = (type, name) => {
    return http.request({
        url: '/blade-doorplateAddress/doorplateAddress/getHousesList',
        method: 'GET',
        params: {
            type,
            name
        }
    })
}
export const getHouseInfoList = (type, code) => {
    return http.request({
        url: '/blade-doorplateAddress/doorplateAddress/getHousesList',
        method: 'GET',
        params: {
            type,
            code
        }
    })
}
export const getHouseRentInfo = (code) => {
    return http.request({
        url: '/blade-doorplateAddress/doorplateAddress/getHouseRentInfo',
        method: 'GET',
        params: {
            code
        }
    })
}
pages/home/index.vue
@@ -33,7 +33,8 @@
                <view v-if="hasMenu('楼盘表').length>0" class="house-box">
                    <box-title :title="'楼盘表'"></box-title>
                    <view class="content">
                        <grid-menu :gridData='item' v-for="(item, index) in houseDataList" :key='index'></grid-menu>
                        <grid-menu :gridData='item' v-for="(item, index) in houseDataList.slice(0, 6)" :key='index'
                            @click.native="pushPage(item)"></grid-menu>
                    </view>
                </view>
            </view>
@@ -92,7 +93,8 @@
    import menuList from "@/components/menuList/index.vue";
    import gridMenu from "@/components/gridMenu/index.vue";
    import {
        getFuncList
        getFuncList,
        getHouseList
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
@@ -125,24 +127,10 @@
                    }
                ],
                gridDataList: [],
                houseDataList: [{
                        title: '万达广场',
                    title: '-',
                        useSlot: true
                    },
                    {
                        title: '万达晶座',
                        useSlot: true
                    },
                    {
                        title: '万达华府',
                        useSlot: true
                    },
                    {
                        title: '万达华府',
                        useSlot: true
                    }
                ],
                }],
                liveList: [],
@@ -297,7 +285,20 @@
                })
            },
            // 获取楼盘表
            async getHouseDataList(name) {
                const res = await getHouseList(1, name)
                // 数据处理
                res.data.forEach(item => {
                    item.title = item.name
                    item.useSlot = true
                    delete item.name
                })
                this.houseDataList = res.data || [{
                    title: '-',
                    useSlot: true
                }]
            },
@@ -341,6 +342,15 @@
                console.log('confirm', e)
                this.curSelectSite = e.value[e.value.length - 1]
                this.selectBoxShow = false
                this.getHouseDataList(e.value[1].name)
            },
            // 页面跳转
            pushPage({id, title}) {
                if (id !== void 0) {
                    let url = `/subPackage/house/list/index?id=${id}&title=${title}`
                    this.$u.func.globalNavigator(url, "navTo")
                }
            }
        }
    }
subPackage/bs/views/rentDetail.vue
@@ -6,17 +6,33 @@
            </view>
            <view class="basic-info">
                <u-form-item @click="showList.relation = true" class="form-item" labelWidth="100" label="租客关系:" required
                    prop="type">
                    <u--input border="none" v-model="nameList.relation" disabled disabledColor="#ffffff"
                        placeholder="请选择租客关系">
                <u-form-item @click="showSelectBus(dataList.relation, '租客关系', 'relationName','relation')"
                    class="form-item" labelWidth="100" label="租客关系" required prop="type">
                    <u--input border="none" v-model="relationName" disabled disabledColor="#ffffff" placeholder="请选择">
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item @click="typeShow = true" class="form-item" labelWidth="100" label="事件类型:" required
                <u-form-item @click="showSelectBus(dataList.houseType, '房屋状态', 'houseTypeName','houseType')"
                    class="form-item" labelWidth="100" label="房屋状态:" required prop="type">
                    <u--input border="none" v-model="houseTypeName" disabled disabledColor="#ffffff" placeholder="请选择">
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item @click="showSelectBus(dataList.rentalUse, '租房用途', 'rentalUseName','rentalUse')"
                    class="form-item" labelWidth="100" label="租房用途:" required prop="type">
                    <u--input border="none" v-model="rentalUseName" disabled disabledColor="#ffffff" placeholder="请选择">
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item @click="rentTimeShow = true" class="form-item" labelWidth="100" label="租房时间:" required
                    prop="type">
                    <u--input border="none" v-model="typeName" disabled disabledColor="#ffffff" placeholder="请选择事件类型">
                    <u--input border="none" v-model="form.rentTime" disabled disabledColor="#ffffff" placeholder="请选择">
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
@@ -48,11 +64,12 @@
        </u-form>
        <!-- 租客关系下拉框 -->
        <my-select v-if="showList.relation" :show="showList.relation" v-model="form.relation" type="radio"
            popupTitle="请选择租客关系" :dataLists="dataList.relation" @cancel="showList.relation = false">
        </my-select>
        <!-- 事件类型下拉框 -->
        <select-bus v-if="typeShow" :show="typeShow" v-model="form[selectBusModel]" type="radio"
            :popupTitle="selectBusTitle" :dataLists="selectBusList" @cancel="typeShow = false" @submit="typeSelect">
        </select-bus>
        <!--出租时间选择-->
        <u-datetime-picker :show="rentTimeShow" v-model="form.rentTime" mode="date"></u-datetime-picker>
@@ -62,23 +79,68 @@
</template>
<script>
    import selectBus from "@/components/my-components/selectBus.vue"
    import uploadMixin from "@/mixin/uploadMixin";
    export default {
        mixins: [uploadMixin],
        components: {
            selectBus
        },
        data() {
            return {
                form: {
                    relation: ""
                    relation: "",
                    houseTyep: "",
                    rentTime: "",
                },
                showList: {
                    relation: false
                },
                nameList: {
                    relation: ""
                },
                rules: {},
                rentTimeShow: false,
                relationName: "",
                houseTypeName: "",
                rentalUseName: "",
                dataList: {
                    relation: []
                    relation: [{
                            name: "同一户",
                            value: "1"
                        },
                        {
                            name: "不同户",
                            value: "2"
                }
                    ],
                    houseType: [{
                            name: "部分出租",
                            value: "1"
                        },
                        {
                            name: "全部出租",
                            value: "2"
                        }
                    ],
                    rentalUse: [{
                            name: "仓库",
                            value: "1"
                        },
                        {
                            name: "办公",
                            value: "2"
                        },
                        {
                            name: "商用",
                            value: "3"
                        },
                        {
                            name: "居住",
                            value: "4"
                        }
                    ]
                },
                selectBusList: [],
                selectBusTitle: '',
                selectBusModel: '',
                selectBusKey: '',
                typeShow: false
            }
@@ -96,7 +158,19 @@
        },
        methods: {
            showSelectBus(data, title, model, key) {
                this.selectBusList = data
                this.selectBusTitle = title
                this.selectBusModel = model
                this.selectBusKey = key
                this.typeShow = true
            },
            //类型选择确认
            typeSelect(item) {
                this[this.selectBusModel] = item.name
                this.form[this.selectBusKey] = item.value
                this.typeShow = !this.typeShow
            },
        }
    }
</script>
subPackage/house/family/index.vue
@@ -9,24 +9,23 @@
                <u-collapse :border="false">
                    <u-collapse-item style="border: none;" :title="item.unitName" :name="index"
                        v-for="(item, index) in buildingList" :key="index">
                        <view class="flex floor-content" v-for="(floor, floorIndex) in item.floorList"
                            :key="floorIndex">
                        <view class="flex floor-content" v-for="(cItem, cIndex) in item.children"
                            :key="cIndex">
                            <view class="floor-num-box flex a-i-c j-c-c">
                                {{floor.floorName}}
                                {{cItem.floor}}
                            </view>
                            <view class="room-content">
                                <u-grid class="flex flex-wrap" col="2" :border="true">
                                    <u-grid-item v-for="(family, familyIndex) in floor.familyList" :key="familyIndex">
                                    <u-grid-item v-for="(scItem, scIndex) in cItem.children" :key="scItem.id"  @click.native="pushPage(scItem)">
                                        <view class="room-box flex f-d-c">
                                            <view class="flex a-i-c j-c-s-b" v-show="family.resideStatus">
                                                <view class="l">{{family.houseHoldName}}</view>
                                            <view class="flex a-i-c j-c-s-b" v-show="scItem.resideStatus">
                                                <view class="l">{{scItem.realName}}</view>
                                                <view class="r flex">
                                                    <view v-show="family.resideStatus">
                                                    <view v-show="scItem.resideStatus">
                                                        <u-icon name="photo"></u-icon>
                                                    </view>
                                                    <view v-show="family.isOwner">
                                                    <view v-show="!!scItem.roleType === '业主'">
                                                        <u-icon name="photo"></u-icon>
                                                    </view>
                                                </view>
@@ -35,7 +34,7 @@
                                            <view class="flex">
                                                <view class="l flex">
                                                    <u-icon name="home" color="blue"></u-icon>
                                                    {{family.roomNumber}}
                                                    {{scItem.houseNo}}
                                                </view>
                                                <view class="r">
                                                    
@@ -57,182 +56,44 @@
</template>
<script>
    import {
        getHouseInfoList
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        components: {},
        data() {
            return {
                housingName: '万达晶座',
                buildingName: 11,
                buildingList: [{
                        unitName: '一单元',
                        floorList: [{
                                floorName: '1层',
                                familyList: [{
                                        houseHoldName: '王子豪1',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪2',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪3',
                                        resideStatus: 0, // 1居住,0未居住
                                        isOwner: 0, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪4',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪5',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪6',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    }
                                ]
                            },
                            {
                                floorName: '2层',
                                familyList: [{
                                        houseHoldName: '王子豪1',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪2',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪3',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪4',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪5',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪6',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        unitName: '二单元',
                        floorList: [{
                                floorName: '1层',
                                familyList: [{
                                    houseHoldName: '王子豪1',
                                    resideStatus: 0, // 1居住,0未居住
                                    isOwner: 0, // 1业主, 0不是业主
                                    roomNumber: 301
                                }]
                            },
                            {
                                floorName: '2层',
                                familyList: [{
                                        houseHoldName: '王子豪1',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪2',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪3',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪4',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪5',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪6',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    },
                                    {
                                        houseHoldName: '王子豪',
                                        resideStatus: 1, // 1居住,0未居住
                                        isOwner: 1, // 1业主, 0不是业主
                                        roomNumber: 301
                                    }
                                ]
                            }
                        ]
                    }
                ]
                currentId: '',
                housingName: '',
                buildingName: 0,
                buildingList: []
            }
        },
        onLoad(e) {
            const { id, housingName, buildingName } = e
            this.currentId = id
            this.housingName = housingName
            this.buildingName = buildingName
        onShow() {},
        },
        onShow() {
            this.getBuildingList()
        },
        methods: {
            async getBuildingList() {
                const res = await getHouseInfoList(3, '9cedfffba380fc19f88ede2323aca651')
                res.data.forEach(item => {
                    item.children && item.children.sort((a, b) => a.floor - b.floor)
                })
                console.log(res.data)
                this.buildingList = res.data || []
            },
            pushPage(value) {
                const { addressCode } = value
                let url = `/subPackage/house/roomDetails/index?id=${addressCode}`
                this.$u.func.globalNavigator(url, "navTo")
            }
        }
    }
</script>
subPackage/house/list/index.vue
@@ -2,7 +2,7 @@
    <view class="container">
        <view class="flex f-d-c main">
            <view class="flex house-container">
                <view class="house-list-box" v-for="(item, index) in houseList">
                <view class="house-list-box" v-for="(item, index) in houseList" @click="pushPage(item)">
                    <view class="l">
                        <u-icon name="home" color="#fff"></u-icon>
                    </view>
@@ -18,28 +18,51 @@
</template>
<script>
    import {
        getHouseInfoList
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        components: {},
        data() {
            return {
                currentId: '',
                curHouseTitle: '',
                houseList: [{
                        title: 11
                    },
                    {
                        title: 12
                    },
                    {
                        title: 13
                    }
                ]
                    title: '-'
                }]
            }
        },
        onLoad(e) {
            const { id, title } = e
            this.currentId = id
            this.curHouseTitle = title
        onShow() {},
        },
        onShow() {
            this.getHouseInfo()
        },
        methods: {
            async getHouseInfo() {
                const res = await getHouseInfoList(2, this.currentId)
                // 删除栋字
                const reg = new RegExp('栋', 'g')
                res.data.forEach(item => {
                    item.title = item['name'].replace(reg, '')
                    delete item.name
                })
                this.houseList = res.data || [{
                    title: '-'
                }]
            },
            pushPage(value) {
                const { id, title } = value
                if (id !== void 0) {
                    let url = `/subPackage/house/family/index?id=${id}&housingName=${this.curHouseTitle}&buildingName=${title}`
                    this.$u.func.globalNavigator(url, "navTo")
                }
            }
        }
    }
</script>
subPackage/house/roomDetails/index.vue
@@ -4,11 +4,12 @@
            <view class="content">
                <view class="base b-c-w">
                    <view class="flex a-i-c">
                        <u-icon name="photo"></u-icon> 万达晶座:11栋
                        <u-icon name="photo"></u-icon> {{ houseTitle }}
                    </view>
                    <view class="flex j-c-s-b">
                        <view>
                            一单元单元 2901室(共2人)
                            {{ unitName }}单元 {{ houseName }}室
                            <!-- (共2人) -->
                        </view>
                        <view class="flex a-i-c">
                            <u-button size='small' shape="circle" type="primary" :plain="true" text="房屋管理"></u-button>
@@ -28,13 +29,13 @@
                            <view class="info">
                                <view>姓名:{{item.name}}</view>
                                <view class="flex">
                                    手机:{{item.phone}} <u-icon name="phone-fill" color="#4586FE"></u-icon>
                                    手机:{{item.phoneNumber}} <u-icon name="phone-fill" color="#4586FE"></u-icon>
                                </view>
                                <view class="flex">
                                    关系:
                                    <view class="flex a-i-c">
                                        <u-tag :text="item.relation" size="mini"
                                            :bgColor="item.relationType == 1 ? '#07C160' : '#1989FA'"></u-tag>
                                        <u-tag :text="item.relationship" size="mini"
                                            :bgColor="item.residentialStatus == 1 ? '#07C160' : '#1989FA'"></u-tag>
                                    </view>
                                </view>
                            </view>
@@ -65,7 +66,7 @@
                    <view class="mt-40 rent-out-list b-c-w" v-for="(item, index) in rentOutList" :key="index">
                        <view class="t flex j-c-s-b a-i-c">
                            <view class="l">
                                租客:{{item.name}}(共{{item.allNum}}人)
                                租客:{{item.tenant}}(共{{item.allNum}}人)
                            </view>
                            <view class="r">
                                <u-icon name="trash-fill" color="red"></u-icon>
@@ -73,7 +74,7 @@
                        </view>
                        <view class="t flex j-c-s-b a-i-c">
                            <view class="l">
                                {{item.startTime}} - {{item.endTime}}
                                {{item.rentalTime}} - {{item.dueTime}}
                            </view>
                            <view class="r">
                                {{item.status == 1 ? '已到期' : '未到期'}}
@@ -91,9 +92,9 @@
            </view>
            <view class="edit-btn">
                <veiw>
                <view>
                    <u-button type="primary" text="添加成员"></u-button>
                </veiw>
                </view>
                <view>
                    <u-button type="primary" :plain="true" text="添加租赁信息"></u-button>
@@ -104,52 +105,54 @@
</template>
<script>
    import {
        getHouseRentInfo
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        components: {},
        data() {
            return {
                ownerInfoList: [{
                        src: 'https://cdn.uviewui.com/uview/album/1.jpg',
                        name: '郑洪峰',
                        phone: 13566687549,
                        relationType: 1,
                        relation: '业主'
                    },
                    {
                        src: 'https://cdn.uviewui.com/uview/album/1.jpg',
                        name: '郑小峰',
                        phone: 13547687549,
                        relationType: 3,
                        relation: '儿子'
                    }
                ],
                rentOutList: [
                    {
                        name: '皇阿玛',
                        startTime: '2023-01-01',
                        endTime: '2024-01-01',
                        status: 0, // 0 未到期,1已到期
                        allNum: 1
                    },
                    {
                        name: '皇阿玛two',
                        startTime: '2023-01-01',
                        endTime: '2024-01-01',
                        status: 0, // 0 未到期,1已到期
                        allNum: 2
                    }
                ]
                houseTitle: '',
                currentId: '',
                houseName: '',
                unitName: '',
                ownerInfoList: [],
                rentOutList: []
            }
        },
        onShow() {},
        onLoad(e) {
            const { id } = e
            this.currentId = id
        },
        onShow() {
            this.getHouseRentInfoList()
        },
        methods: {
            async getHouseRentInfoList() {
                const res = await getHouseRentInfo(this.currentId)
                const { districtName, doorplateName, buildingName, houseName, unitName, houseRentalList, householdList } = res.data
                this.houseTitle = districtName + ':' + buildingName
                this.rentOutList = houseRentalList
                this.ownerInfoList = householdList
                this.houseName = houseName
                this.unitName = unitName
                // 判断当前租客有没有过期
                this.rentOutList.forEach(item => {
                    // 事件格式处理
                    item.rentalTime = item.rentalTime.split(' ')[0]
                    item.dueTime = item.dueTime.split(' ')[0]
                    // 当前房间租客数量
                    item.allNum = item.houseTenantVOList.length
                    // 多人个租客将第一个作为显示
                    item.tenant = item.houseTenantVOList.length > 0 ? item.houseTenantVOList[0].name : ''
                })
        }
    }
    }
</script>
<style lang="scss" scoped>