Lou
2023-11-21 940279c8542a73763692fd36d35bc7889e5992ac
我的家人功能编写
9 files modified
1 files added
910 ■■■■ changed files
common/setting.js 2 ●●● patch | view | raw | blame | history
subPackage/label/bail.vue 1 ●●●● patch | view | raw | blame | history
subPackage/label/form.vue 69 ●●●●● patch | view | raw | blame | history
subPackage/label/hotel.vue 1 ●●●● patch | view | raw | blame | history
subPackage/label/school.vue 1 ●●●● patch | view | raw | blame | history
subPackage/user/family/edit.vue 609 ●●●● patch | view | raw | blame | history
subPackage/user/family/edit2.vue 164 ●●●●● patch | view | raw | blame | history
subPackage/user/family/list.vue 45 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/patrol.vue 2 ●●● patch | view | raw | blame | history
subPackage/workbench/views/workLog.vue 16 ●●●● patch | view | raw | blame | history
common/setting.js
@@ -12,7 +12,7 @@
    // devUrl: 'https://sk.hubeishuiyi.cn',
    // devUrl: 'http://192.168.1.156:9528',
    // devUrl:'http://192.168.1.50:9528',
    devUrl: 'http://192.168.0.101:9528',
    devUrl: 'http://192.168.0.100:9528',
    // devUrl: 'http://192.168.0.102:9528',
    // devUrl: 'https://srgdjczzxtpt.com:2080/api',
    minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
subPackage/label/bail.vue
@@ -85,6 +85,7 @@
                    houseCode:"",
                    districtName:"",
                    checkUserId:"",
                    reportType:1
                },
                rules: {
                    'name': {
subPackage/label/form.vue
@@ -19,17 +19,17 @@
                <u-form-item label="交易位置" prop="localtion" borderBottom ref="localtion" required>
                    <!-- <u-input v-model="info.location" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input> -->
                        <view class="address-row flex">
                            <view class="address-content f-28" v-if="info.localtion">
                                {{info.localtion}}
                            </view>
                            <view class="address-content f-28 c-99" v-if="!info.localtion">
                                请选择位置
                            </view>
                            <view class="location-btn c-main f-24"  @click="getLocation()">
                                获取地址
                            </view>
                    <view class="address-row flex">
                        <view class="address-content f-28" v-if="info.localtion">
                            {{info.localtion}}
                        </view>
                        <view class="address-content f-28 c-99" v-if="!info.localtion">
                            请选择位置
                        </view>
                        <view class="location-btn c-main f-24" @click="getLocation()">
                            获取地址
                        </view>
                    </view>
                </u-form-item>
                <u-form-item label="交易过程" prop="transactionProcess" borderBottom>
                    <u-input v-model="info.transactionProcess" border="none" placeholder="请输入"
@@ -120,7 +120,7 @@
                },
                imageUrls: [],
                goodsImageUrls: [],
                eventType:1
                eventType: 1
            }
        },
        onLoad(option) {
@@ -131,6 +131,18 @@
                })
            }
            this.$set(this.info, "eventType", option.type);
            if(option.type == 1){
                this.$set(this.info, "reportType", 3);
            }else if(option.type == 2){
                this.$set(this.info, "reportType", 4);
            }else {
                this.$set(this.info, "reportType", 5);
            }
            let siteInfo = uni.getStorageSync("siteInfo");
            let userInfo = uni.getStorageSync("userInfo");
            this.$set(this.info, "houseCode", siteInfo.id);
@@ -145,16 +157,14 @@
                    return "二手车交易"
                }
            },
            getLocation(){
            getLocation() {
                uni.chooseLocation({
                    success:(res)=>{
                        this.$set(this.info,"localtion",res.address);
                    success: (res) => {
                        this.$set(this.info, "localtion", res.address);
                    }
                })
            },
            confirmDate(e) {
                console.log(e);
                this.showSelectDate = false;
@@ -289,23 +299,26 @@
        color: #fff;
        margin-top: 50rpx;
    }
    .address-row{
        flex:1;
    .address-row {
        flex: 1;
        justify-content: flex-end;
        align-items:center;
        align-items: center;
    }
    .address-content{
        width:calc(100% - 116rpx - 20rpx);
        margin-right:20rpx;
    .address-content {
        width: calc(100% - 116rpx - 20rpx);
        margin-right: 20rpx;
        text-align: right;
    }
    .location-btn{
        width:116rpx;
        height:46rpx;
    .location-btn {
        width: 116rpx;
        height: 46rpx;
        line-height: 46rpx;
        border-radius: 4rpx;
        border:1px solid currentColor;
        padding:0;
        border: 1px solid currentColor;
        padding: 0;
        background-color: #fff;
        text-align: center;
    }
subPackage/label/hotel.vue
@@ -198,6 +198,7 @@
                    realName: "",
                    houseCode: "",
                    checkUserId: "",
                    reportType:2
                },
                rules: {
                    'districtName': {
subPackage/label/school.vue
@@ -230,6 +230,7 @@
                    highAltitudeMonitor: '',
                    houseCode: "",
                    checkUserId: "",
                    reportType:6
                },
                rules: {
                    'districtName': {
subPackage/user/family/edit.vue
@@ -1,139 +1,536 @@
<template>
    <view class="">
    <view class="container">
        <view class="main">
            <view class="content">
                <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
                    <view class="event-info">
                        <!-- <view class="box-title">
                            <box-title title="基础信息"></box-title>
                        </view> -->
                        <u-form-item @click="showSelectBus(dataList.roleList, '角色', 'roleTypeName','roleType')" class="form-item"
                            labelWidth="100" label="角色" required prop="roleType">
                            <u--input border="none" v-model="roleTypeName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
        <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="100"
            :labelStyle="{fontSize:'28rpx'}">
            <view class="form-row">
                <u-form-item label="地址" prop="districtName" borderBottom required>
                    <view class="content-name f-28">
                        {{info.districtName}}
                        <u-form-item @click="showSelectBus(dataList.relationshipList, '角色关系', 'relationshipName','relationship')"
                            class="form-item" labelWidth="100" label="角色关系" required prop="relationship">
                            <u--input border="none" v-model="relationshipName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="姓名" required prop="name">
                            <u--input border="none" v-model="form.name" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="身份证" prop="idCard">
                            <u--input border="none" v-model="form.idCard" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item @click="showSelectBus(dataList.genderList, '性别', 'genderName','gender')"
                         class="form-item" labelWidth="100" label="性别" prop="gender">
                            <u--input border="none" v-model="genderName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="手机号码" prop="phoneNumber">
                            <u--input border="none" v-model="form.phoneNumber" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="其他联系方式" prop="otherContact">
                            <u--input border="none" v-model="form.otherContact" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item @click="showSelectBus(dataList.isPrimaryContactList, '是否主要联系人', 'isPrimaryContactName','isPrimaryContact')"
                        class="form-item" labelWidth="110" label="是否主要联系人"
                         prop="isPrimaryContact">
                            <u--input border="none" v-model="isPrimaryContactName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item @click="showSelectBus(dataList.residentialStatusList, '居住情况', 'residentialStatusName','residentialStatus')"
                        class="form-item" labelWidth="100" label="居住情况"
                            prop="residentialStatus">
                            <u--input border="none" v-model="residentialStatusName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="港澳台通行证"  prop="hkmtPass">
                            <u--input border="none" v-model="form.hkmtPass" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="护照"  prop="passport">
                            <u--input border="none" v-model="form.passport" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="现居住地"  prop="currentAddress">
                            <u--input border="none" v-model="form.currentAddress" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item @click="showSelectBus(dataList.ethnicityList, '民族', 'ethnicityName','ethnicity')"
                        class="form-item" labelWidth="100" label="民族" prop="ethnicity">
                            <u--input border="none" v-model="ethnicityName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item @click="showSelectBus(dataList.educationList, '学历', 'educationName','education')"
                        class="form-item" labelWidth="100" label="学历" prop="education">
                            <u--input border="none" v-model="educationName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item @click="showSelectBus(dataList.partyEmberList, '是否党员', 'partyEmberName','partyEmber')"
                        class="form-item" labelWidth="100" label="是否党员" prop="partyEmber">
                            <u--input border="none" v-model="partyEmberName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="工作单位" prop="employer">
                            <u--input border="none" v-model="form.employer" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item @click="showSelectBus(dataList.workStatusList, '工作状态', 'workStatusName','workStatus')"
                        class="form-item" labelWidth="100" label="工作状态" prop="workStatus">
                            <u--input border="none" v-model="workStatusName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item @click="showSelectBus(dataList.maritalStatusList, '婚姻状态', 'maritalStatusName','maritalStatus')"
                        class="form-item" labelWidth="100" label="婚姻状态" prop="maritalStatus">
                            <u--input border="none" v-model="maritalStatusName" disabled disabledColor="#ffffff"
                                placeholder="请选择">
                            </u--input>
                            <u-icon slot="right" name="arrow-right"></u-icon>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="户籍登记地" prop="hukouRegistration">
                            <u--input border="none" v-model="form.hukouRegistration" placeholder="请输入">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="车牌号" prop="cardNumber">
                            <u--input border="none" v-model="form.cardNumber" placeholder="多个用中划线(-)隔开">
                            </u--input>
                        </u-form-item>
                        <u-form-item class="form-item" labelWidth="100" label="备注" prop="remark">
                            <u--input border="none" v-model="form.remark" placeholder="补充说明">
                            </u--input>
                        </u-form-item>
                    </view>
                </u-form-item>
                <u-form-item label="姓名" prop="checkUserName" borderBottom required>
                    <u-input v-model="info.checkUserName" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="手机" prop="checkTelephone" borderBottom required>
                    <u-input v-model="info.checkTelephone" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="性别" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item label="生日" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item label="民族" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item label="是否党员" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item label="与业主关系" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                </u-form>
            </view>
        </u-form>
        <view class="footer flex j-c-s-b a-i-c" v-if="id">
            <button class="del-btn footer-btn">删除</button>
            <button class="save-btn footer-btn">保存</button>
            <!-- <view class="btn-group b-c-w">
                <view>
                    <u-button @click="submit" type="primary" :text="addOrUpdateTitle" width="120px"></u-button>
                </view>
                <view>
                    <u-button @click="navigator" type="primary" :plain="true" text="返回首页"></u-button>
                </view>
            </view> -->
            <view class="footer flex j-c-s-b a-i-c bgc-ff" v-if="type == 2">
                <button class="del-btn footer-btn"  @click="delAction">删除</button>
                <button class="save-btn footer-btn"   @click="submit">保存</button>
            </view>
            <view class="footer flex j-c-s-b a-i-c bgc-ff" v-if="type == 1">
                <button class="add-btn footer-btn"   @click="submit">提交</button>
            </view>
        </view>
        <view class="footer flex j-c-s-b a-i-c" v-if="!id">
            <button class="add-btn footer-btn">提交</button>
        </view>
        <!-- 事件类型下拉框 -->
    <!--     <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-picker :closeOnClickOverlay="true" v-if="typeShow" :show="typeShow" :columns="[selectBusList]"
            @close="typeShow = false" @cancel="typeShow = false" keyName="name" @confirm="typeSelect"></u-picker>
    </view>
</template>
<script>
    import selectBus from "@/components/my-components/selectBus.vue"
    import uploadMixin from "@/mixin/uploadMixin";
    import {
        saveOrUpdateHousehold,removeHousehold
    } from '@/api/house/household.js'
    import {
        bizDictionary
    } from '@/api/system/dict.js'
    export default {
        components: {
            selectBus,
        },
        mixins: [uploadMixin],
        data() {
            return {
                info: {
                    checkUserName: "",
                    checkTelephone: "",
                    applyName: "",
                    applyTime: '',
                addOrUpdateTitle:"添加",
                houseCode:"",
                form: {
                    roleName: "",
                    relationName: '',
                    location: "",
                    houseCode: "",
                    districtName: "",
                    checkUserId: "",
                    title: "",
                    roleType:null,
                    description: "",
                },
                rules: {
                    'name': {
                        type: 'string',
                    // roleType: [{
                    //     required: true,
                    //     message: '请选择角色'
                    // }],
                    name: [{
                        required: true,
                        message: '请输入姓名',
                        trigger: ['blur', 'change']
                    },
                    'checkName': {
                        type: 'string',
                        required: true,
                        message: '请输入手机',
                        trigger: ['blur', 'change']
                    },
                    'checkPhone': {
                        type: 'number',
                        required: true,
                        message: '请输入名称',
                        trigger: ['blur', 'change']
                    },
                    'location': {
                        type: 'string',
                        required: true,
                        message: '请输入位置',
                        trigger: ['blur', 'change']
                    }
                        message: '请填写姓名'
                    }],
                },
                id: ""
                typeShow: false,
                roleName: "",
                dataList: {
                    roleList: [],
                    relationshipList: [],
                    genderList:[
                        {
                            value: 1,
                            name: '男',
                        },
                        {
                            value: 0,
                            name: '女',
                        },
                        {
                            value: 2,
                            name: '未知',
                        }
                    ],
                    isPrimaryContactList:[
                        {
                            value: 1,
                            name: '是',
                        },
                        {
                            value: 0,
                            name: '否',
                        }
                    ],
                    residentialStatusList:[
                        {
                            value: 1,
                            name: '是',
                        },
                        {
                            value: 0,
                            name: '否',
                        }
                    ],
                    ethnicityList:[
                    ],
                    educationList:[
                    ],
                    partyEmberList:[
                        {
                            value: 1,
                            name: '是',
                        },
                        {
                            value: 2,
                            name: '否',
                        }
                    ],
                    workStatusList:[
                    ],
                    maritalStatusList:[
                    ]
                },
                roleTypeName: '',
                relationshipName: '',
                genderName: '',
                residentialStatusName:"",
                isPrimaryContactName: '',
                ethnicityName: '',
                educationName: '',
                partyEmberName: '',
                workStatusName: '',
                maritalStatusName: '',
                // 下拉变量
                selectBusList: [],
                selectBusVal: '',
                selectBusTitle: '',
                selectBusModel: '',
                type:  1  //1添加  ,2编辑
            }
        },
        onLoad(option) {
            this.id = option.id;
        created() {
            this.getHeader()
        },
        mounted() {
        },
        onLoad(option) {
            this.type = option.type;
            // this.houseCode = data.houseCode
            this.houseCode = uni.getStorageSync("siteInfo").houseCode;
            if(option.type == 1){
                this.addOrUpdateTitle = "保存"
                this.getAllBizDict()
            }
            if(option.type == 2){
                this.addOrUpdateTitle = "修改"
                const data = JSON.parse(option.data)
                this.getHouseholdInfo(data)
            }
        },
        onShow() {
        },
        methods: {
            confirmDate(e) {
                this.showSelectDate = false;
                this.info.applyTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
            async getAllBizDict(){
                // 获取角色关系字典
                await this.getBizDict('roleRelation',this.dataList.relationshipList)
                // 获取角色字典
                await this.getBizDict('roleType',this.dataList.roleList)
                // 获取民族字典
                await this.getBizDict('nationType',this.dataList.ethnicityList)
                // 获取学历字典
                await this.getBizDict('educationType',this.dataList.educationList)
                // 获取工作状态字典
                await this.getBizDict('workStatusType',this.dataList.workStatusList)
                // 获取婚姻状态字典
                await this.getBizDict('marriageStatusType',this.dataList.maritalStatusList)
            },
            // 获取业务字典
            async getBizDict(code,list){
                const param = {
                    code: code
                }
                const res = await bizDictionary(param)
                res.data.forEach(e=>{
                    list.push({
                        name:e.dictValue,
                        value:Number(e.dictKey)
                    })
                })
            },
            // 获取住户信息
            async getHouseholdInfo(data){
                // 获取所有字典
                await this.getAllBizDict()
                this.form = data
                this.roleTypeName = this.findObjValue(data.roleType, this.dataList.roleList)
                this.relationshipName = this.findObjValue(data.relationship, this.dataList.relationshipList)
                this.genderName = this.findObjValue(data.gender, this.dataList.genderList)
                this.isPrimaryContactName = this.findObjValue(data.isPrimaryContact, this.dataList.isPrimaryContactList)
                this.ethnicityName = this.findObjValue(data.ethnicity, this.dataList.ethnicityList)
                this.educationName = this.findObjValue(data.education, this.dataList.educationList)
                this.partyEmberName = this.findObjValue(data.partyEmber, this.dataList.partyEmberList)
                this.workStatusName = this.findObjValue(data.workStatus, this.dataList.workStatusList)
                this.maritalStatusName = this.findObjValue(data.maritalStatus, this.dataList.maritalStatusList)
            },
            // 显示选择弹框
            showSelectBus(data, title, model, key) {
                this.selectBusList = data
                this.selectBusTitle = title
                this.selectBusModel = model
                this.selectBusKey = key
                this.typeShow = true
            },
            //类型选择确认
            typeSelect(item) {
                const [ result ] = e.value
                this[this.selectBusModel] = result.name
                this.form[this.selectBusKey] = result.value
                this.typeShow = !this.typeShow
            },
            //表单提交
            submit() {
                this.$refs.form.validate().then(res => {
                    this.saveOrUpdate();
                })
            },
            // 新增更新操作
            async saveOrUpdate() {
                this.form['houseCode'] = this.houseCode
                // 字典解析
                const roleTypeIndex = this.dataList.roleList.findIndex(item => item.name === this.roleTypeName)
                const relationshipIndex = this.dataList.relationshipList.findIndex(item => item.name === this.relationshipName)
                const genderIndex = this.dataList.genderList.findIndex(item => item.name === this.genderName)
                const isPrimaryContactIndex = this.dataList.isPrimaryContactList.findIndex(item => item.name === this.isPrimaryContactName)
                const ethnicityIndex = this.dataList.ethnicityList.findIndex(item => item.name === this.ethnicityName)
                const educationIndex = this.dataList.educationList.findIndex(item => item.name === this.educationName)
                const partyEmberIndex = this.dataList.partyEmberList.findIndex(item => item.name === this.partyEmberName)
                const workStatusIndex = this.dataList.workStatusList.findIndex(item => item.name === this.workStatusName)
                const maritalStatusIndex = this.dataList.maritalStatusList.findIndex(item => item.name === this.maritalStatusName)
                this.form['roleType'] = roleTypeIndex >0 ? this.dataList.roleList[roleTypeIndex].value : ""
                this.form['relationship'] = relationshipIndex >0 ? this.dataList.relationshipList[relationshipIndex].value: ""
                this.form['gender'] = genderIndex >0 ?this.dataList.genderList[genderIndex].value: ""
                this.form['isPrimaryContact'] = isPrimaryContactIndex >0 ?this.dataList.isPrimaryContactList[isPrimaryContactIndex].value: ""
                this.form['ethnicity'] = ethnicityIndex >0 ?this.dataList.ethnicityList[ethnicityIndex].value: ""
                this.form['education'] = educationIndex >0 ?this.dataList.educationList[educationIndex].value: ""
                this.form['partyEmber'] = partyEmberIndex >0 ?this.dataList.partyEmberList[partyEmberIndex].value:""
                this.form['workStatus'] = workStatusIndex >0 ?this.dataList.workStatusList[workStatusIndex].value:""
                this.form['maritalStatus'] = maritalStatusIndex >0 ?this.dataList.maritalStatusList[maritalStatusIndex].value:""
                const res = await saveOrUpdateHousehold(this.form)
                if (res.code !== 200) {
                    uni.showToast({
                        title: "保存失败",
                        icon: "error",
                        duration: 1500
                    })
                    return
                }
                uni.showToast({
                    title: "保存成功",
                    icon: "success",
                    duration: 1500,
                    success: () => {
                        setTimeout(() => {
                            uni.navigateBack()
                        }, 1500)
                    }
                })
            },
            findObjValue(value, obj) {
                if(value){
                    const res = obj.find(item => {
                        return item.value == value
                    })
                    return res.name
                }
                return ""
            },
            delAction(){
                uni.showModal({
                    title:"提示!",
                    content:"是否要删除该家人信息?",
                    success:(res)=>{
                        if(res.confirm){
                            this.ddelActionRequest()
                        }
                    }
                })
            },
            ddelActionRequest(){
                removeHousehold(this.form.id).then(res=>{
                    if(res.code == 200){
                        setTimeout(()=>{
                            uni.navigateBack();
                        },1000)
                    }else {
                        uni.showToast({
                            title: "删除失败",
                            icon: "error",
                            duration: 1500
                        })
                    }
                })
            }
        }
    }
</script>
<style lang="scss">
    page {
        background-color: #F5F5F5;
    }
    .form-row {
        margin: 20rpx 30rpx;
        padding: 0 30rpx;
        background-color: #fff;
        .content-name {
<style scoped lang="scss">
    .container {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: #F5F5F5;
        .main {
            position: relative;
            height: 0;
            flex: 1;
            text-align: right;
            display: flex;
            flex-direction: column;
            .content {
                height: 0;
                flex: 1;
                overflow-y: auto;
                padding-bottom: 120rpx;
                // padding-bottom: 36rpx;
            }
            .btn-group {
                display: flex;
                justify-content: space-around;
                align-items: center;
                height: 116rpx;
                position: fixed;
                left: 0;
                bottom: 0;
                width: 100%;
            }
        }
        // .box-title {
        //     padding: 10rpx 10rpx;
        // }
        .event-info {
            background-color: #ffffff;
            margin: 20rpx 30rpx;
            padding: 30rpx;
            border-radius: 8rpx;
            /deep/ .u-form-item {
                background-color: #ffffff;
                padding: 5px 20px;
                border-bottom: 1rpx solid #eff1f3;
            }
        }
        .event-pic {
            background-color: #ffffff;
            padding: 40rpx 30rpx;
        }
    }
    .footer {
        width: 100%;
        padding: 30rpx;
        box-sizing: border-box;
        z-index: 10;
        position:fixed;
        position:fixed;
        bottom:0;
        left:0;
        backgroun-color:#fff;
@@ -144,18 +541,18 @@
            font-size: 32rpx;
            color: #fff;
        }
        .add-btn {
            width: 100%;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
        }
        .del-btn {
            width: 236rpx;
            background: linear-gradient(163deg, #FE6C5C 0%, #EA1F1F 99%);
        }
        .save-btn {
            width: 424rpx;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
subPackage/user/family/edit2.vue
New file
@@ -0,0 +1,164 @@
<template>
    <view class="">
        <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="100"
            :labelStyle="{fontSize:'28rpx'}">
            <view class="form-row">
                <u-form-item label="地址" prop="districtName" borderBottom required>
                    <view class="content-name f-28">
                        {{info.districtName}}
                    </view>
                </u-form-item>
                <u-form-item label="姓名" prop="checkUserName" borderBottom required>
                    <u-input v-model="info.checkUserName" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="手机" prop="checkTelephone" borderBottom required>
                    <u-input v-model="info.checkTelephone" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="性别" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item label="生日" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item label="民族" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item label="是否党员" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
                <u-form-item label="与业主关系" prop="applyTime" borderBottom required @click="showSelectDate = true">
                    <u-input v-model="info.applyTime" disabled disabledColor="#ffffff" border="none" placeholder="请输入"
                        placeholderClass="f-28 c-99" inputAlign="right"></u-input>
                    <u-icon slot="right" name="arrow-right"></u-icon>
                </u-form-item>
            </view>
        </u-form>
        <view class="footer flex j-c-s-b a-i-c" v-if="id">
            <button class="del-btn footer-btn">删除</button>
            <button class="save-btn footer-btn">保存</button>
        </view>
        <view class="footer flex j-c-s-b a-i-c" v-if="!id">
            <button class="add-btn footer-btn">提交</button>
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                info: {
                    checkUserName: "",
                    checkTelephone: "",
                    applyName: "",
                    applyTime: '',
                    location: "",
                    houseCode: "",
                    districtName: "",
                    checkUserId: "",
                },
                rules: {
                    'name': {
                        type: 'string',
                        required: true,
                        message: '请输入姓名',
                        trigger: ['blur', 'change']
                    },
                    'checkName': {
                        type: 'string',
                        required: true,
                        message: '请输入手机',
                        trigger: ['blur', 'change']
                    },
                    'checkPhone': {
                        type: 'number',
                        required: true,
                        message: '请输入名称',
                        trigger: ['blur', 'change']
                    },
                    'location': {
                        type: 'string',
                        required: true,
                        message: '请输入位置',
                        trigger: ['blur', 'change']
                    }
                },
                id: ""
            }
        },
        onLoad(option) {
            this.id = option.id;
        },
        methods: {
            confirmDate(e) {
                this.showSelectDate = false;
                this.info.applyTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
            },
        }
    }
</script>
<style lang="scss">
    page {
        background-color: #F5F5F5;
    }
    .form-row {
        margin: 20rpx 30rpx;
        padding: 0 30rpx;
        background-color: #fff;
        .content-name {
            flex: 1;
            text-align: right;
        }
    }
    .footer {
        width: 100%;
        padding: 30rpx;
        box-sizing: border-box;
        z-index: 10;
        position:fixed;
        bottom:0;
        left:0;
        backgroun-color:#fff;
        .footer-btn {
            height: 78rpx;
            line-height: 78rpx;
            border-radius: 8rpx 8rpx 8rpx 8rpx;
            font-size: 32rpx;
            color: #fff;
        }
        .add-btn {
            width: 100%;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
        }
        .del-btn {
            width: 236rpx;
            background: linear-gradient(163deg, #FE6C5C 0%, #EA1F1F 99%);
        }
        .save-btn {
            width: 424rpx;
            background: linear-gradient(163deg, #01BDFC 0%, #017BFC 100%);
        }
    }
</style>
subPackage/user/family/list.vue
@@ -2,39 +2,64 @@
    <view class="">
        
        <view class="list">
           <view class="list-item flex j-c-s-b a-i-c"  v-for="i in 3">
           <view class="list-item flex j-c-s-b a-i-c"  v-for="(item,index) in list" :key="index">
                   <view class="flex">
                    <u-avatar  src="/static/icon/user-01.png"  size="44"></u-avatar>
                       <view class="flex f-d-c ml-40 j-c-s-b">
                           <text class="f-28">张三</text>
                        <view class="flex a-i-c">
                           <text class="f-28">{{item.name}}</text>
                        <!-- <view class="flex a-i-c">
                            <u-icon name="phone-fill"   color="#017BFC"></u-icon>
                            <text class="f-24 ml-10 c-99">13807937200</text>
                        </view>
                        </view> -->
                       </view>    
                   </view>
                <button class="action-btn c-main f-24"   @click="navTo()">管理</button>
                <button class="action-btn c-main f-24"   @click="navTo(2,item)">管理</button>
           </view>            
        </view>
        
        <view class="footer">
            <button class="footer-btn"  @click="navTo()">添加成员</button>
            <button class="footer-btn"  @click="navTo(1)">添加成员</button>
        </view>
    </view>
</template>
<script>
    import {
        getHouseRentInfo
    } from "@/api/doorplateAddress/doorplateAddress";
    export default {
        data(){
            return {
                list:[]
            }
        },
        onShow(){
            this.getList()
        },
        methods:{
            navTo(){
                uni.navigateTo({
                    url:'edit'
            getList(){
                let code = uni.getStorageSync("siteInfo").houseCode
                getHouseRentInfo(code).then(res=>{
                    console.log(res);
                    if(res.code == 200){
                        this.list = res.data.householdList;
                    }
                })
            },
            navTo(type,item){
                if(type == 2){
                    uni.navigateTo({
                        url:`edit?type=${type}&data=${JSON.stringify(item)}`
                    })
                }else {
                    uni.navigateTo({
                        url:`edit?type=${type}`
                    })
                }
            }
        }
    }
subPackage/workbench/views/patrol.vue
@@ -9,7 +9,7 @@
                </u-form-item>
                <u-form-item label="巡查内容" borderBottom prop="context"  required>
                    <u-input type="textarea" v-model="info.context" border="none" placeholderClass="f-28 c-99"
                        inputAlign="right">
                        inputAlign="right" placeholder="请输入巡查内容" >
                    </u-input>
                </u-form-item>
subPackage/workbench/views/workLog.vue
@@ -4,16 +4,16 @@
            <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90"
                :labelStyle="{fontSize:'28rpx'}">
                <u-form-item label="姓名" prop="info.name" borderBottom required>
                    <u-input v-model="info.name" border="none" placeholder="请输入标题" placeholderClass="f-28 c-99"
                    <u-input v-model="info.name" border="none" placeholder="请输入" placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="手机号" prop="phone" borderBottom  required>
                    <u-input v-model="info.phone" border="none" placeholder="请输入标题"   placeholderClass="f-28 c-99"
                    <u-input v-model="info.phone" border="none" placeholder="请输入手机号"   placeholderClass="f-28 c-99"
                        inputAlign="right"></u-input>
                </u-form-item>
                <u-form-item label="内容" borderBottom  required>
                    <u-input type="textarea" v-model="info.context" border="none"  placeholderClass="f-28 c-99"
                        inputAlign="right">
                        inputAlign="right"  placeholder="请输入内容">
                    </u-input>
                </u-form-item>
                <u-form-item label="走访时间" prop="workTime" :borderBottom="false" required @click="showSelectDate = true">
@@ -96,11 +96,11 @@
                houseIndex: [0]
            }
        },
        onLoad() {
            let userInfo = uni.getStorageSync("userInfo");
            this.$set(this.info, "name", userInfo.real_name);
            this.$set(this.info, "phone", userInfo.phone);
        },
        // onLoad() {
        //     let userInfo = uni.getStorageSync("userInfo");
        //     this.$set(this.info, "name", userInfo.real_name);
        //     this.$set(this.info, "phone", userInfo.phone);
        // },
        methods: {
            confirmDate(e) {