Lou
2024-03-22 9f6b35252a6a7e097c6e2b8d6bbb34fdd3a18eba
更新
4 files modified
82 ■■■■ changed files
pages/home/index.vue 5 ●●●●● patch | view | raw | blame | history
subPackage/article/detail.vue 33 ●●●●● patch | view | raw | blame | history
subPackage/reside/detail.vue 9 ●●●● patch | view | raw | blame | history
subPackage/reside/edit.vue 35 ●●●● patch | view | raw | blame | history
pages/home/index.vue
@@ -1301,9 +1301,10 @@
            navToArticle(index) {
                if (index == 0 && this.roleType == 2) {
                let id = this.bannerList[index].articleId;
                if (id && this.roleType == 2) {
                    uni.navigateTo({
                        url: `/subPackage/article/detail?id=4293&type=4`
                        url: `/subPackage/article/detail?id=${id}&type=4`
                    })
                }
subPackage/article/detail.vue
@@ -96,7 +96,8 @@
                                    placement="column" v-model="item.selected" :disabled="isSubmit"
                                    @change="selectOption($event,index)" shape="circle" labelColor="#333">
                                    <view class="mb-30" v-for="(i,k) in item.children" :key="k">
                                        <u-checkbox :label="i.optionContent" :name="i.id"></u-checkbox>
                                        <u-checkbox :label="i.optionContent" :name="i.id"
                                            :disabled="i.disabled"></u-checkbox>
                                        <view class="flex j-c-s-b a-i-c mt-10">
                                            <view class="mt-10" style="width:80%;">
                                                <uv-line-progress v-if="item.selected" height="6" :showText="false"
@@ -396,8 +397,38 @@
            selectOption(id, index) {
                let item = this.voteTopicList[index];
                // if (item.optionNumber == item.selected.length) {
                //     this.$showTips(`最多只能选${item.optionNumber}项`);
                //     return;
                // }
                item.selected = id;
                let disableIndex = ""
                this.$set(this.voteTopicList, index, item);
                for (let i = 0, ii = item.selected.length; i < ii; i++) {
                    for (let k = 0, kk = item.children.length; k < kk; k++) {
                        if (item.selected[i] != item.children[k].id) {
                            if (item.selected.length == item.optionNumber) {
                                console.log("index ===>", k)
                                disableIndex = k;
                                break;
                                // item.children[k].disabled = true;
                            }
                        }
                    }
                }
                console.log("disableIndex ===>", disableIndex);
            },
            getParams(signPath) {
subPackage/reside/detail.vue
@@ -1,6 +1,13 @@
<template>
    <view class="">
        <view class="item-row flex j-c-s-b a-i-c" v-if="info.landlordName">
            <text>房东姓名</text>
            <text>{{info.landlordName}}</text>
        </view>
        <view class="item-row flex j-c-s-b a-i-c" v-if="info.landlordPhone">
            <text>房东电话号码</text>
            <text>{{info.landlordPhone}}</text>
        </view>
        <view class="item-row flex j-c-s-b a-i-c">
            <text>姓名</text>
            <text>{{info.name}}</text>
subPackage/reside/edit.vue
@@ -3,6 +3,18 @@
        <view class="content bgc-ff">
            <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
                :labelStyle="{fontSize:'28rpx'}">
                <u-form-item label="房东姓名" prop="landlordName" borderBottom required>
                    <u-input v-model="info.landlordName" border="none" disabled disabledColor="#fff"
                        placeholder="请输入房东姓名" placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="房东电话" prop="landlordPhone" borderBottom required>
                    <u-input v-model="info.landlordPhone" border="none" disabled disabledColor="#fff"
                        placeholder="请输入房东电话" placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="姓名" prop="name" borderBottom required>
                    <u-input v-model="info.name" border="none" placeholder="请输入姓名" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
@@ -61,7 +73,9 @@
                    idCard: "",
                    address: "",
                    remak: "",
                    houseCode: ""
                    houseCode: "",
                    landlordPhone: "",
                    landlordName: ""
                },
                rules: {
                    name: [{
@@ -119,11 +133,9 @@
                this.getDetail(option.id)
            } else {
                this.$set(this.info, "houseCode", uni.getStorageSync("siteInfo").houseCode)
                this.getHouseholdList();
                this.getHouseholdInfo()
            }
            this.getHouseholdList();
            this.getHouseholdInfo()
        },
        onReady() {
@@ -151,18 +163,27 @@
                }).then(res => {
                    console.log(res)
                    if (res.code == 200) {
                        this.houseHoldInfo = res.data[0]
                        this.$set(this.info, "landlordName", res.data.records[0].name)
                        this.$set(this.info, "landlordPhone", res.data.records[0].phoneNumber)
                    }
                })
            },
            //获取业主信息
            //获取租户信息
            getHouseholdInfo() {
                householdDetail({
                    houseCode: this.info.houseCode,
                    associatedUserId: uni.getStorageSync("userInfo").user_id
                }).then(res => {
                    console.log(res)
                    if (res.code == 200) {
                        for (let i in this.info) {
                            this.info[i] = res.data[i]
                        }
                        this.info.phone = res.data.phoneNumber;
                    }
                })