Lou
2023-11-01 09ce53889f86561e555995f366c822182bedfd5e
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/jczz_app
8 files modified
2 files added
1715 ■■■■■ changed files
api/doorplateAddress/doorplateAddress.js 47 ●●●●● patch | view | raw | blame | history
pages.json 10 ●●●●● patch | view | raw | blame | history
subPackage/bs/components/form/rentForm.vue 60 ●●●●● patch | view | raw | blame | history
subPackage/bs/views/rentDetail.vue 484 ●●●● patch | view | raw | blame | history
subPackage/bs/views/zhsb.vue 316 ●●●● patch | view | raw | blame | history
subPackage/house/family/index.vue 2 ●●● patch | view | raw | blame | history
subPackage/house/roomControl/index.vue 90 ●●●●● patch | view | raw | blame | history
subPackage/house/roomDetails/index.vue 522 ●●●● patch | view | raw | blame | history
subPackage/user/password/index.vue 183 ●●●●● patch | view | raw | blame | history
vue.config.js 1 ●●●● patch | view | raw | blame | history
api/doorplateAddress/doorplateAddress.js
@@ -11,7 +11,7 @@
        }
    })
}
// 获取社区信息
export const getHouseList = (type, name) => {
    return http.request({
        url: '/blade-doorplateAddress/doorplateAddress/getHousesList',
@@ -23,6 +23,7 @@
    })
}
// 获取当前楼栋信息
export const getHouseInfoList = (type, code) => {
    return http.request({
        url: '/blade-doorplateAddress/doorplateAddress/getHousesList',
@@ -34,6 +35,7 @@
    })
}
// 获取当前房屋出租信息
export const getHouseRentInfo = (code) => {
    return http.request({
        url: '/blade-doorplateAddress/doorplateAddress/getHouseRentInfo',
@@ -42,4 +44,47 @@
            code
        }
    })
}
// 获取房屋标签信息
export const getHouseLabelList = () => {
    return http.request({
        url: '/blade-label/label/getLabelList',
        method: 'GET',
        params: {
            parentId: 1001
        }
    })
}
// 获取房屋详细信息
export const getHouseDetail = (houseCode) => {
    return http.request({
        url: '/blade-house/house/getHouseDetail',
        method: 'GET',
        params: {
            houseCode
        }
    })
}
// 获取房屋详细信息
export const addHouseRental = (data) => {
    return http.request({
        url: 'blade-houseRental/houseRental/add',
        method: 'POST',
        data
    })
}
export const uploadFile = (data) => {
    return http.request({
        url: '/blade-resource/oss/endpoint/put-file',
        method: 'post',
        custom: {
            Authorization: true
        },
        data
    })
}
pages.json
@@ -44,6 +44,16 @@
                        "navigationBarBackgroundColor": "#4586fe",
                        "navigationBarTextStyle": "white"
                    }
                },
                //修改密码
                {
                    "path": "password/index",
                    "style": {
                        "navigationBarTitleText": "修改密码",
                        "enablePullDownRefresh": false,
                        "navigationBarBackgroundColor": "#fff",
                        "navigationBarTextStyle": "black"
                    }
                }
            ]
        },
subPackage/bs/components/form/rentForm.vue
New file
@@ -0,0 +1,60 @@
<template>
    <u-form :model="form" class="form-box" :rules="rules">
        <u-form-item class="form-item" label="姓名" required prop="name" labelWidth="80">
            <u-input v-model="form.name" border="none" placeholder="姓名" />
        </u-form-item>
        <u-form-item class="form-item" label="联系方式" labelWidth="80">
            <u-input v-model="form.phone" border="none" placeholder="联系方式" />
        </u-form-item>
        <u-form-item class="form-item" label="身份证号码" required prop="idCard" labelWidth="80">
            <u-input v-model="form.idCard" border="none" placeholder="身份证号码" />
        </u-form-item>
        <u-form-item class="form-item" label="户籍地址" labelWidth="80">
            <u-input v-model="form.domicile" border="none" placeholder="选填" />
        </u-form-item>
        <u-form-item class="form-item" label="工作单位" labelWidth="80">
            <u-input v-model="form.workUnit" border="none" placeholder="选填" />
        </u-form-item>
    </u-form>
</template>
<script>
    export default {
        data() {
            return {
                form: {
                    name: '',
                    phone: '',
                    idCard: '',
                    domicile: '',
                    workUnit: ''
                },
                rules: {
                    name: [{
                        required: true,
                        message: '请输入姓名',
                        // 可以单个或者同时写两个触发验证方式
                        trigger: ['change', 'blur'],
                    }],
                    idCard: [{
                        required: true,
                        message: '请输入身份证号',
                        // 可以单个或者同时写两个触发验证方式
                        trigger: ['change', 'blur'],
                    }]
                }
            }
        }
    }
</script>
<style lang="scss" scoped>
    .form-box {
        background: #fff;
        .form-item {
            padding: 5rpx 20rpx;
            border-bottom: 1px solid #eff1f3;
        }
    }
</style>
subPackage/bs/views/rentDetail.vue
@@ -1,219 +1,267 @@
<template>
    <view class="container">
        <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
            <view class="box-title">
                <box-title title="基础信息"></box-title>
            </view>
            <view class="basic-info">
                <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="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="form.rentTime" disabled disabledColor="#ffffff" placeholder="请选择">
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
            </view>
            <view class="box-title">
                <box-title title="合同上传"></box-title>
            </view>
            <view class="pic">
                <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                    :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
                    :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
                </u-upload>
            </view>
            <view class="box-title">
                <box-title title="租客信息"></box-title>
            </view>
            <view class="rent-info">
            </view>
        </u-form>
        <!-- 事件类型下拉框 -->
        <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>
    </view>
</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: "",
                    houseTyep: "",
                    rentTime: "",
                },
                rules: {},
                rentTimeShow: false,
                relationName: "",
                houseTypeName: "",
                rentalUseName: "",
                dataList: {
                    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
            }
        },
        created() {
        },
        mounted() {
        },
        onLoad(option) {
        },
        onShow() {
        },
        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>
<style scoped lang="scss">
    .container {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #F9F9FA;
        .box-title {
            padding: 10px 0;
        }
        .basic-info {
            .form-item {
                background-color: #ffffff;
                padding: 5rpx 20rpx;
                border-bottom: 1px solid #eff1f3;
            }
        }
        .pic {
            background-color: #ffffff;
            padding: 40rpx 30rpx;
        }
        .btn-group {
            padding: 30rpx;
            position: absolute;
            bottom: 28rpx;
            width: calc(100% - 60rpx);
            .btn {
                margin-bottom: 30rpx;
            }
        }
    }
<template>
    <view class="container">
        <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
            <view class="box-title">
                <box-title title="基础信息"></box-title>
            </view>
            <view class="basic-info">
                <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="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="form.rentTime" disabled disabledColor="#ffffff" placeholder="请选择">
                    </u--input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
            </view>
            <view class="box-title">
                <box-title title="合同上传"></box-title>
            </view>
            <view class="pic">
                <u-upload :fileList="imagesList"
                    :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
                    :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
                    @afterRead="afterReadImg" @delete="deletePic">
                </u-upload>
            </view>
            <view class="rent-info">
                <view v-for="item in rentFormNum" :key="item">
                    <view class="box-title">
                        <box-title :title="'租客信息-#'+item">
                            <template #titleMore v-if="item !== 1">
                                <u-icon size="25" name="trash" color='#EF0724'></u-icon>
                            </template>
                        </box-title>
                    </view>
                    <rentForm ref="rentform" />
                </view>
            </view>
        </u-form>
        <!-- 事件类型下拉框 -->
        <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"
            @confirm="rentTimeShow = false"></u-datetime-picker>
        <view class="bottom-tools">
            <u-button plain class="btn-item" type="success" @click="addRentForm">再加一人</u-button>
            <u-button class="btn-item" type="error" @click="decRentForm">删除</u-button>
            <u-button class="btn-item" type="primary" @click="save">保存</u-button>
        </view>
    </view>
</template>
<script>
    import selectBus from "@/components/my-components/selectBus.vue"
    import rentForm from '../components/form/rentForm.vue'
    import uploadMixin from "@/mixin/uploadMixin";
    import {
        uploadFile,
        addHouseRental
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        mixins: [uploadMixin],
        components: {
            selectBus,
            rentForm
        },
        data() {
            return {
                form: {
                    relation: "",
                    rentTime: "",
                },
                imagesList: [],
                rules: {},
                rentTimeShow: false,
                rentFormNum: 1,
                relationName: "",
                houseTypeName: "",
                rentalUseName: "",
                dataList: {
                    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,
                houseCode: ''
            }
        },
        created() {
        },
        mounted() {
        },
        onLoad(option) {
            this.houseCode = option.houseCode
        },
        onShow() {
        },
        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
            },
            beforeUpload(e) {
                console.log(e)
                return false
            },
            addRentForm() {
                this.rentFormNum++
            },
            decRentForm() {
                this.rentFormNum > 1 && this.rentFormNum--
            },
            async save() {
                let houseTenantVOList = []
                this.$refs.rentform.forEach(item => {
                    houseTenantVOList.push(item.form)
                })
                const relationIndex = this.dataList.relation.findIndex(item => item.name === this.relationName)
                const statusIndex = this.dataList.houseType.findIndex(item => item.name === this.houseTypeName)
                const rentalIndex = this.dataList.rentalUse.findIndex(item => item.name === this.rentalUseName)
                let params = {
                    houseCode: this.houseCode,
                    tenantRelationship: this.dataList.relation[relationIndex].value,
                    rentalTime: this.form.rentalTime,
                    houseStatus: this.dataList.houseType[statusIndex].value,
                    rentalUse: this.dataList.rentalUse[rentalIndex].value,
                    houseTenantVOList
                }
                const res = await addHouseRental(params)
                console.log(res)
            }
        }
    }
</script>
<style scoped lang="scss">
    .container {
        position: relative;
        width: 100%;
        display: flex;
        flex-direction: column;
        background: #F9F9FA;
        padding-bottom: 200rpx;
        .box-title {
            padding: 10px 0;
        }
        .basic-info {
            .form-item {
                background-color: #ffffff;
                padding: 5rpx 20rpx;
                border-bottom: 1px solid #eff1f3;
            }
        }
        .pic {
            background-color: #ffffff;
            padding: 40rpx 30rpx;
        }
        .btn-group {
            padding: 30rpx;
            position: absolute;
            bottom: 28rpx;
            width: calc(100% - 60rpx);
            .btn {
                margin-bottom: 30rpx;
            }
        }
        .bottom-tools {
            display: flex;
            background-color: #ffffff;
            position: fixed;
            bottom: 0;
            width: 100%;
            border-top: 1rpx solid #e4e4e4;
            z-index: 999;
            .btn-item {
                margin: 40rpx;
            }
        }
    }
</style>
subPackage/bs/views/zhsb.vue
@@ -1,149 +1,169 @@
<template>
    <view class="container">
        <view class="content-box">
            <view class="info">
                <view class="item location">
                    <u-icon name="map" color="#000000" size="16"></u-icon>
                    <view class="location">
                        {{location}}
                    </view>
                </view>
                <view class="item statistics">
                    <view class="room">{{room}}</view>
                    <view class="num">{{`(共${num}人)`}}</view>
                </view>
            </view>
            <view class="box-title">
                <box-title title="出租管理"></box-title>
            </view>
            <view class="list">
                <rentList :list="rentList"></rentList>
            </view>
        </view>
        <view class="bottom">
            <view class="btn">
                <u-button @click="addRent" type="primary" :plain="true" text="添加租赁信息"></u-button>
            </view>
        </view>
    </view>
</template>
<script>
    import rentList from "@/subPackage/bs/components/list/rentList.vue"
    export default {
        components: {
            rentList
        },
        data() {
            return {
                location: "万达晶座:11栋楼",
                room: "一单元303室",
                num: "1",
                //出租列表
                rentList: [{
                        name: "张三",
                        num: "1",
                        startTime: "2022-01-01",
                        endTime: "2023-12-23",
                        status: "未到期"
                    },
                    {
                        name: "测试",
                        num: "2",
                        startTime: "2022-01-01",
                        endTime: "2023-12-23",
                        status: "未到期"
                    },
                    {
                        name: "张三",
                        num: "1",
                        startTime: "2022-01-01",
                        endTime: "2023-12-23",
                        status: "未到期"
                    }
                ]
            }
        },
        created() {
        },
        mounted() {
        },
        onLoad(option) {
        },
        onShow() {
        },
        methods: {
            addRent() {
                this.$u.func.globalNavigator("/subPackage/bs/views/rentDetail")
            }
        }
    }
</script>
<style scoped lang="scss">
    .container {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #F9F9FA;
        .content-box {
            height: 0;
            flex: 1;
            overflow-y: auto;
        }
        .list {
            // padding-bottom: 20px;
        }
        .item {
            display: flex;
            padding: 30rpx 20rpx;
            background-color: #ffffff;
            border-bottom: 1px solid #eff1f3;
        }
        .location {
            font-weight: 700;
        }
        .room {
            font-weight: 700;
        }
        .bottom {
            padding: 20rpx;
            background-color: #ffffff;
            display: flex;
            justify-content: center;
            align-items: center;
            .btn {
                // width: calc(100% - 40rpx);
            }
        }
    }
    .box-title {
        padding: 40rpx 0;
    }
    view {
        font-size: 32rpx;
    }
<template>
    <view class="container">
        <view class="content-box">
            <view class="info">
                <view class="item location">
                    <u-icon name="map" color="#000000" size="16"></u-icon>
                    <view class="location">
                        {{location}}
                    </view>
                </view>
                <view class="item statistics">
                    <view class="room">{{room}}</view>
                    <view class="num">{{`(共${num}人)`}}</view>
                </view>
            </view>
            <view class="box-title">
                <box-title title="出租管理"></box-title>
            </view>
            <view class="list">
                <rentList :list="rentList"></rentList>
            </view>
        </view>
        <view class="bottom">
            <view class="btn">
                <u-button @click="addRent" type="primary" :plain="true" text="添加租赁信息"></u-button>
            </view>
        </view>
    </view>
</template>
<script>
    import rentList from "@/subPackage/bs/components/list/rentList.vue"
    import {
        getHouseRentInfo
    } from "@/api/doorplateAddress/doorplateAddress";
    import {
        logAdd
    } from "../../../api/system/logManage";
    export default {
        components: {
            rentList
        },
        data() {
            return {
                houseCode: '',
                location: "万达晶座:11栋楼",
                room: "一单元303室",
                num: "1",
                //出租列表
                rentList: [{
                    name: "张三",
                    num: "1",
                    startTime: "2022-01-01",
                    endTime: "2023-12-23",
                    status: "未到期"
                }]
            }
        },
        created() {
        },
        mounted() {
            console.log(this.$store)
        },
        onLoad(option) {
            const {
                houseCode
            } = option
            this.houseCode = houseCode
        },
        onShow() {
            this.getHouseRent()
        },
        methods: {
            async getHouseRent() {
                const res = await getHouseRentInfo(this.houseCode)
                const {
                    aoiName,
                    buildingName,
                    doorplateName,
                    unitName,
                    houseRentalList: {
                        houseTenantVOList
                    }
                } = res.data
                console.log(res.data)
                this.location = aoiName + buildingName
                this.room = unitName + doorplateName + "室"
                this.rentList = houseTenantVOList || []
                this.rentList.length !== 0 && this.rentList.forEach(item => {
                    if (!item.houseTenantVOList) {
                        num += item.houseTenantVOList.length
                    }
                    // 事件格式处理
                    item.startTime = item.rentalTime.split(' ')[0]
                    item.endTime = item.dueTime.split(' ')[0]
                    item.status === 1 ? '未到期' : '到期'
                    item.num = item.houseTenantVOList.length
                })
            },
            addRent() {
                this.$u.func.globalNavigator("/subPackage/bs/views/rentDetail?houseCode="+this.houseCode)
            }
        }
    }
</script>
<style scoped lang="scss">
    .container {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #F9F9FA;
        .content-box {
            height: 0;
            flex: 1;
            overflow-y: auto;
        }
        .list {
            // padding-bottom: 20px;
        }
        .item {
            display: flex;
            padding: 30rpx 20rpx;
            background-color: #ffffff;
            border-bottom: 1px solid #eff1f3;
        }
        .location {
            font-weight: 700;
        }
        .room {
            font-weight: 700;
        }
        .bottom {
            padding: 20rpx;
            background-color: #ffffff;
            display: flex;
            justify-content: center;
            align-items: center;
            .btn {
                // width: calc(100% - 40rpx);
            }
        }
    }
    .box-title {
        padding: 40rpx 0;
    }
    view {
        font-size: 32rpx;
    }
</style>
subPackage/house/family/index.vue
@@ -18,7 +18,7 @@
                                <u-grid class="flex flex-wrap" col="2" :border="true">
                                    <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="scItem.residentialStatus">
                                            <view class="flex a-i-c j-c-s-b">
                                                <view class="l">{{scItem.realName}}</view>
                                                <view class="r flex">
                                                    <view v-show="scItem.residentialStatus">
subPackage/house/roomControl/index.vue
@@ -2,34 +2,34 @@
    <view class="container">
        <view class="main">
            <view class="content">
                <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
                <u-form labelWidth="70" :model="form" ref="form">
                    <box-title title=""></box-title>
                    <view class="basic-info mt-20">
                        <u-form-item class="form-item" labelWidth="100" label="绑定手机" required prop="location">
                            <u--input border="none" v-model="form.location" placeholder="请输入">
                        <u-form-item class="form-item" labelWidth="100" label="绑定手机" required>
                            <u--input border="none" v-model="form.phone" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="地址" required prop="location">
                            <u--input border="none" v-model="form.location">
                        <u-form-item class="form-item" labelWidth="100" label="地址" required>
                            <u--input border="none" v-model="form.address">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="物业月费" required prop="location">
                            <u--input border="none" v-model="form.location">
                        <u-form-item class="form-item" labelWidth="100" label="物业月费" required>
                            <u--input border="none" v-model="form.property_price">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="到期时间" required prop="location">
                            <u--input border="none" v-model="form.location">
                        <u-form-item class="form-item" labelWidth="100" label="到期时间" required>
                            <u--input border="none" v-model="form.service_due">
                            </u--input>
                        </u-form-item>
                    </view>
                    <box-title class="mt-20" title="房屋外观"></box-title>
                    <view class="pic mt-20">
                        <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
                        <u-upload :fileList="form.image_urls" :previewFullImage="uploadConfig.previewFullImage"
                            :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
                            :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
                            @delete="deletePic">
@@ -53,12 +53,12 @@
        <u-modal style="flex: none;" :show="popupShow" :closeOnClickOverlay="true" showCancelButton @cancel="popupShow = false" @confirm="popupConfirm">
            <view class="slot-content">
                <view class="flex_base">
                    安置房
                    {{ labelModelInfo.title }}
                </view>
                <u-radio-group class="mt-40" v-model="labelValue" placement="row">
                    <u-radio :customStyle="{marginBottom: '8px'}" v-for="(item, index) in labelList" :key="index"
                        :label="item.name" :name="item.name" :activeColor="item.color" @change="radioChange">
                        :label="item.name" :name="item.name" :activeColor="item.color" @change="radioChange(item)">
                    </u-radio>
                </u-radio-group>
@@ -76,12 +76,21 @@
<script>
    import uploadMixin from "@/mixin/uploadMixin";
    import {
        getHouseDetail,
        getHouseLabelList
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        mixins: [uploadMixin],
        data() {
            return {
                houseCode: '',
                form: {
                    relation: ""
                    phone: "",
                    address: "",
                    property_price: "",
                    service_due: "",
                    image_urls: []
                },
                showList: {
                    relation: false
@@ -95,26 +104,8 @@
                popupShow: false,
                labelBtnList: [{
                        name: '商品房'
                    },
                    {
                        name: '自建房'
                    },
                    {
                        name: '安置房'
                    },
                    {
                        name: '公房'
                    },
                    {
                        name: '危房'
                    },
                    {
                        name: '出租房'
                    },
                ],
                labelBtnList: [],
                // 安置房弹框中
                labelList: [{
                        name: '撤销',
@@ -136,7 +127,12 @@
                        color: '#EE0A24'
                    }
                ],
                labelModelInfo: {
                    title: '',
                    selectedColor: ''
                },
                labelValue: '苹果',
                value1: ''
            }
        },
        created() {
@@ -146,18 +142,42 @@
        },
        onLoad(option) {
            const { code } = option
            this.houseCode = code
        },
        onShow() {
            this.getLabelList()
        },
        methods: {
            showLabelPopup(item) {
                this.popupShow = true
                this.labelModelInfo.title = item.name
            },
            
            popupConfirm(){
                this.popupShow = false
            },
            radioChange(item) {
            },
            async getHouseDetailInfo() {
                const res = await getHouseDetail()
                const { phone, address, property_price, service_due, image_urls } = res.data
                this.form = {
                    phone,
                    address,
                    property_price,
                    service_due,
                    image_urls: [
                        image_urls
                    ]
                }
            },
            async getLabelList() {
                const res = await getHouseLabelList()
                this.labelBtnList = res.data
            }
        }
    }
subPackage/house/roomDetails/index.vue
@@ -1,251 +1,273 @@
<template>
    <view class="container">
        <view class="main">
            <view class="content">
                <view class="base b-c-w">
                    <view class="flex a-i-c">
                        <u-icon name="photo"></u-icon> {{ houseTitle }}
                    </view>
                    <view class="flex j-c-s-b">
                        <view>
                            {{ unitName }}单元 {{ houseName }}室
                            <!-- (共2人) -->
                        </view>
                        <view class="flex a-i-c">
                            <u-button size='small' shape="circle" type="primary" :plain="true" text="房屋管理"></u-button>
                        </view>
                    </view>
                </view>
                <view class="mt-40 owner-box b-c-w" v-for="(item, index) in ownerInfoList" :key="index">
                    <view class="flex">
                        <view class="l flex-1 flex">
                            <view class="flex_base">
                                <view class="head-img flex_base">
                                    <u--image shape="circle" :showLoading="true" :src="item.src" width="120rpx"
                                        height="120rpx"></u--image>
                                </view>
                            </view>
                            <view class="info">
                                <view>姓名:{{item.name}}</view>
                                <view class="flex">
                                    手机:{{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.relationship" size="mini"
                                            :bgColor="item.residentialStatus == 1 ? '#07C160' : '#1989FA'"></u-tag>
                                    </view>
                                </view>
                            </view>
                        </view>
                        <view class="r flex f-d-c j-c-s-a">
                            <view>
                                <u-button size='small' type="primary" :plain="true" text="资料管理"></u-button>
                            </view>
                            <view>
                                <u-button size='small' type="primary" :plain="true" text="标签管理"></u-button>
                            </view>
                        </view>
                    </view>
                    <view class="flex a-i-c j-c-s-b">
                        <view class="l flex">
                            <u-icon name="photo"></u-icon>
                            <u-icon name="photo"></u-icon>
                        </view>
                        <view class="r">
                            <u-icon name="trash-fill" color="red"></u-icon>
                        </view>
                    </view>
                </view>
                <view class="mt-20 rent-out-box">
                    <box-title :title="'出租管理'"></box-title>
                    <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.tenant}}(共{{item.allNum}}人)
                            </view>
                            <view class="r">
                                <u-icon name="trash-fill" color="red"></u-icon>
                            </view>
                        </view>
                        <view class="t flex j-c-s-b a-i-c">
                            <view class="l">
                                {{item.rentalTime}} - {{item.dueTime}}
                            </view>
                            <view class="r">
                                {{item.status == 1 ? '已到期' : '未到期'}}
                            </view>
                        </view>
                        <view class="btn-box flex j-c-s-a">
                            <u-button color="#CDF3DF" text="修改"></u-button>
                            <u-button color="#DAE7FF" text="续租"></u-button>
                            <u-button color="#FCCED3" text="终止"></u-button>
                        </view>
                    </view>
                </view>
                <u-divider text="已经到底了"></u-divider>
            </view>
            <view class="edit-btn">
                <view>
                    <u-button type="primary" text="添加成员"></u-button>
                </view>
                <view>
                    <u-button type="primary" :plain="true" text="添加租赁信息"></u-button>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        getHouseRentInfo
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        components: {},
        data() {
            return {
                houseTitle: '',
                currentId: '',
                houseName: '',
                unitName: '',
                ownerInfoList: [],
                rentOutList: []
            }
        },
        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>
    .container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #F9F9FA;
        font-size: 26rpx;
        .main {
            position: relative;
            height: 0;
            flex: 1;
            display: flex;
            flex-direction: column;
            .content {
                height: 0;
                flex: 1;
                overflow-y: auto;
                .base {
                    &>view {
                        padding: 0 10rpx;
                        height: 96rpx;
                        line-height: 96rpx;
                        border-bottom: 1rpx solid #EBEDF0;
                    }
                }
                .owner-box {
                    .l {
                        align-items: center;
                        .head-img {
                            width: 164rpx;
                            height: 164rpx;
                            background: #EBEDF0;
                            border-radius: 50%;
                        }
                        .info {
                            margin-left: 16rpx;
                            &>view {
                                height: 66rpx;
                                line-height: 66rpx;
                            }
                        }
                    }
                    &>view {
                        padding: 10px;
                    }
                    &>view:last-child {
                        height: 44rpx;
                        border-top: 1rpx solid #EBEDF0;
                    }
                }
                .rent-out-box {
                    .rent-out-list {
                        padding: 20rpx 16rpx;
                        .t {
                            height: 72rpx;
                        }
                        .btn-box {
                            &>.u-button {
                                margin: 0 16rpx;
                            }
                        }
                    }
                }
            }
            .edit-btn {
                height: 116rpx;
                display: flex;
                justify-content: space-around;
                align-items: center;
                background: #fff;
                border-top: 1rpx solid #ccc;
            }
        }
    }
<template>
    <view class="container">
        <view class="main">
            <view class="content">
                <view class="base b-c-w">
                    <view class="flex a-i-c">
                        <u-icon name="photo"></u-icon> {{ houseInfo.houseTitle }}
                    </view>
                    <view class="flex j-c-s-b">
                        <view>
                            {{ houseInfo.unitName }}单元 {{ houseInfo.houseName }}室(共{{ houseInfo.allNum }}人)
                        </view>
                        <view class="flex a-i-c">
                            <u-button @click="pushPage" size='small' shape="circle" type="primary" :plain="true"
                                text="房屋管理"></u-button>
                        </view>
                    </view>
                </view>
                <view class="mt-40 owner-box b-c-w" v-for="(item, index) in ownerInfoList" :key="index">
                    <view class="flex">
                        <view class="l flex-1 flex">
                            <view class="flex_base">
                                <view class="head-img flex_base">
                                    <u--image shape="circle" :showLoading="true" :src="item.src" width="120rpx"
                                        height="120rpx"></u--image>
                                </view>
                            </view>
                            <view class="info">
                                <view>姓名:{{item.name}}</view>
                                <view class="flex">
                                    手机:{{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.relationship" size="mini"
                                            :bgColor="item.residentialStatus == 1 ? '#07C160' : '#1989FA'"></u-tag>
                                    </view>
                                </view>
                            </view>
                        </view>
                        <view class="r flex f-d-c j-c-s-a">
                            <view>
                                <u-button size='small' type="primary" :plain="true" text="资料管理"></u-button>
                            </view>
                            <view>
                                <u-button size='small' type="primary" :plain="true" text="标签管理"></u-button>
                            </view>
                        </view>
                    </view>
                    <view class="flex a-i-c j-c-s-b">
                        <view class="l flex">
                            <u-icon name="photo"></u-icon>
                            <u-icon name="photo"></u-icon>
                        </view>
                        <view class="r">
                            <u-icon name="trash-fill" color="red"></u-icon>
                        </view>
                    </view>
                </view>
                <view class="mt-20 rent-out-box">
                    <box-title :title="'出租管理'"></box-title>
                    <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.tenant}}(共{{item.allNum}}人)
                            </view>
                            <view class="r">
                                <u-icon name="trash-fill" color="red"></u-icon>
                            </view>
                        </view>
                        <view class="t flex j-c-s-b a-i-c">
                            <view class="l">
                                {{item.rentalTime}} - {{item.dueTime}}
                            </view>
                            <view class="r">
                                {{item.status == 1 ? '已到期' : '未到期'}}
                            </view>
                        </view>
                        <view class="btn-box flex j-c-s-a">
                            <u-button color="#CDF3DF" text="修改"></u-button>
                            <u-button color="#DAE7FF" text="续租"></u-button>
                            <u-button color="#FCCED3" text="终止"></u-button>
                        </view>
                    </view>
                </view>
                <u-divider text="已经到底了"></u-divider>
            </view>
            <view class="edit-btn">
                <view>
                    <u-button type="primary" text="添加成员"></u-button>
                </view>
                <view>
                    <u-button type="primary" :plain="true" text="添加租赁信息"></u-button>
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import {
        getHouseRentInfo
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        components: {},
        data() {
            return {
                currentId: '',
                houseInfo: {
                    // 房间号
                    houseName: '',
                    // 单元号
                    unitName: '',
                    houseTitle: '',
                    // 人员数量
                    allNum: 0
                },
                ownerInfoList: [],
                rentOutList: []
            }
        },
        onLoad(e) {
            const {
                id
            } = e
            this.currentId = id
        },
        onShow() {
            this.getHouseRentInfoList()
        },
        methods: {
            async getHouseRentInfoList() {
                const res = await getHouseRentInfo(this.currentId)
                const {
                    aoiName,
                    buildingName,
                    houseName,
                    unitName,
                    houseRentalList,
                    householdList
                } = res.data
                console.log(res.data)
                this.rentOutList = houseRentalList
                this.ownerInfoList = householdList
                this.houseInfo.houseName = houseName
                this.houseInfo.unitName = unitName
                this.houseInfo.houseTitle = aoiName + ':' + buildingName
                // 判断当前租客有没有过期
                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 : ''
                })
                this.houseInfo.allNum = householdList.length
                console.log(res.data)
            },
            pushPage() {
                const url = `/subPackage/house/roomControl/index?code=${this.currentId}`
                this.$u.func.globalNavigator(url, "navTo")
            }
        }
    }
</script>
<style lang="scss" scoped>
    .container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #F9F9FA;
        font-size: 26rpx;
        .main {
            position: relative;
            height: 0;
            flex: 1;
            display: flex;
            flex-direction: column;
            .content {
                height: 0;
                flex: 1;
                overflow-y: auto;
                .base {
                    &>view {
                        padding: 0 10rpx;
                        height: 96rpx;
                        line-height: 96rpx;
                        border-bottom: 1rpx solid #EBEDF0;
                    }
                }
                .owner-box {
                    .l {
                        align-items: center;
                        .head-img {
                            width: 164rpx;
                            height: 164rpx;
                            background: #EBEDF0;
                            border-radius: 50%;
                        }
                        .info {
                            margin-left: 16rpx;
                            &>view {
                                height: 66rpx;
                                line-height: 66rpx;
                            }
                        }
                    }
                    &>view {
                        padding: 10px;
                    }
                    &>view:last-child {
                        height: 44rpx;
                        border-top: 1rpx solid #EBEDF0;
                    }
                }
                .rent-out-box {
                    .rent-out-list {
                        padding: 20rpx 16rpx;
                        .t {
                            height: 72rpx;
                        }
                        .btn-box {
                            &>.u-button {
                                margin: 0 16rpx;
                            }
                        }
                    }
                }
            }
            .edit-btn {
                height: 116rpx;
                display: flex;
                justify-content: space-around;
                align-items: center;
                background: #fff;
                border-top: 1rpx solid #ccc;
            }
        }
    }
</style>
subPackage/user/password/index.vue
New file
@@ -0,0 +1,183 @@
<template>
    <view class="password">
        <view class="form-card">
            <!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
            <u--form labelPosition="left" :model="model" :rules="rules" ref="uForm">
                <u-form-item labelWidth='200rpx' label="原密码" prop="oldPassword" borderBottom ref="item1">
                    <u--input v-model="model.oldPassword" placeholder='请输入原密码' border="none"></u--input>
                </u-form-item>
                <u-form-item labelWidth='200rpx' label="新密码" prop="newPassword" borderBottom ref="item1">
                    <u--input v-model="model.newPassword" placeholder='请输入新密码' border="none"></u--input>
                </u-form-item>
                <u-form-item labelWidth='280rpx' label="请再次输入新密码" prop="newPassword1" ref="item1">
                    <u--input v-model="model.newPassword1" placeholder='请再次输入新密码' border="none"></u--input>
                </u-form-item>
            </u--form>
        </view>
        <button class="confirm_btn" @click="confirm">保存</button>
    </view>
</template>
<script>
    import {
        updatePassword
    } from "@/api/system/user"
    import md5 from "../../../utils/md5.js"
    var result = ""
    export default {
        data() {
            var newPassword = (rule, value, callback) => {
                if (value === '') {
                    callback(new Error('请输入密码'));
                } else {
                    if (this.model.newPassword !== '') {
                        this.$refs.uForm.validateField('newPassword1');
                    }
                    callback();
                }
            };
            var newPassword1 = (rule, value, callback) => {
                if (value === '') {
                    callback(new Error('请再次输入密码'));
                } else if (value !== this.model.newPassword) {
                    callback(new Error('两次输入密码不一致!'));
                } else {
                    callback();
                }
            };
            var checkPassWord = (rule, value, callback) => {
                let level = []
                if (!value) {
                    return callback('密码不能为空')
                }
                if (value.length < 8) {
                    return callback('密码不少于8位')
                }
                if (value.length > 16) {
                    return callback('密码不大于16位')
                }
                // 是数字
                let isDigit = /^.*[0-9]+.*/;
                // isLowerCase 小写字母
                let isLowerCase = /^.*[a-z]+.*/;
                // isUpperCase 大写字母
                let isUpperCase = /^.*[A-Z]+.*/;
                // 特殊字符
                let regEx = /^.*[^a-zA-Z0-9]+.*/;
                // 记录匹配的次数
                let num = 0;
                if (isDigit.test(value)) {
                    num = num + 1;
                }
                if (isLowerCase.test(value)) {
                    num = num + 1;
                }
                if (isUpperCase.test(value)) {
                    num = num + 1;
                }
                if (regEx.test(value)) {
                    num = num + 1;
                }
                if (num <= 2) {
                    return callback("密码强度不足,密码至少包含三种:(1)大写字母、(2)小写字母、(3)数字、(4)特殊符号");
                }
                return callback()
            }
            return {
                showSex: false,
                model: {
                    oldPassword: '',
                    newPassword: "",
                    newPassword1: '',
                },
                rules: {
                    'oldPassword': [{
                        type: 'string',
                        required: true,
                        message: '请输入原密码',
                        trigger: ['blur', 'change']
                    }],
                    "newPassword": [{
                            type: 'string',
                            required: true,
                            message: '请输入新密码',
                            trigger: ['blur', 'change']
                        }, {
                            validator: newPassword,
                            trigger: 'blur'
                        },
                        {
                            validator: checkPassWord,
                            trigger: 'blur'
                        },
                    ],
                    "newPassword1": [{
                            type: 'string',
                            required: true,
                            message: '请输入新密码',
                            trigger: ['blur']
                        },
                        {
                            validator: newPassword1,
                            trigger: 'blur'
                        }
                    ],
                },
                radio: '',
                switchVal: false
            };
        },
        methods: {
            confirm() {
                this.$refs.uForm.validate().then(async res => {
                    const obj = {
                        newPassword: md5(this.model.newPassword),
                        oldPassword: md5(this.model.oldPassword),
                        newPassword1: md5(this.model.newPassword1),
                    }
                    const data = await updatePassword(obj).catch(err => {
                        const {
                            data
                        } = err
                        return uni.$u.toast(data.msg || "验证失败")
                    })
                    if (data.code != 200) return uni.$u.toast(data.msg)
                    uni.$u.toast("修改成功")
                    setTimeout(() => {
                        this.$u.func.globalNavigator("", "navBack")
                    }, 1500)
                })
            }
        },
        onReady() {
            //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
            this.$refs.uForm.setRules(this.rules)
        },
    };
</script>
<style lang="scss" scoped>
    .password {
        background-color: #e6edfa;
        padding: 20rpx 0;
        height: 100vh;
        .form-card {
            background-color: #fff;
            border-radius: 16rpx;
            margin: 0 20rpx;
            padding: 0 20rpx;
        }
        .confirm_btn {
            background: #1180ff;
            color: #fff;
            height: 72rpx;
            line-height: 72rpx;
            width: 90%;
            margin-top: 200rpx;
            border-radius: 20rpx;
        }
    }
</style>
vue.config.js
@@ -11,7 +11,6 @@
    devServer: {
        proxy: {
            // 业务平台接口
            "/api": {
                target: "http://172.16.13.129:9528",