<template>
    <div class=''>
        <div class="item f-font14">
            <span class="label gray">居住地址：</span><span class="value">{{ resiInfo.fullName||"--" }}</span>
        </div>
        <div class="item f-font14">
            <span class="label gray">联系电话：</span><span class="value">{{ resiInfo.mobile||"--" }}</span>
        </div>
        <div class="item f-font14">
            <span class="label gray">所属网格：</span><span class="value">{{ resiInfo.gridName||"--" }}</span>
        </div>
        <div class="item f-font14">
            <span class="label gray">入户状况：</span><span class="value">{{ resiInfo.householdSituation||"--" }}</span>
        </div>
        <div class="item f-font14">
            <!-- 居住类型,与子女同住,空巢,独居,其他 字段没有返回-->
            <span class="label gray">居住类型：</span><span class="value">{{ resiInfo.resideSituation || "--" }}</span>
        </div>
        <div class="item f-font14">
            <span class="label gray">家庭预警：</span>
            <span class="value">{{resiInfo.riskyFlag === '1' ? '满意度风险家庭' : '--'}}</span>
        </div>
    </div>
</template>

<script>
import { requestPost, requestGet } from '@/js/dai/request'
export default {
    //数据
    data() {
        return {
            resiInfo: {}
        };
    },
    //创建前
    created() {
    },
    mounted() {
        this.getPersonalFile()
    },
    props: {
        resiId: {
            type: String,
            default: ''
        },
    },
    watch: {
        resiId: {
            handler(newVal, oldVal) {
                this.getPersonalFile()
            }
        }
    },
    //方法
    methods: {
        async getPersonalFile() {
            let url = `/actual/base/peopleRoomOverview/getPersonalFile?resid=` + this.resiId
            let { code, data, msg } = await requestPost(url)
            if (code == 0) {
                this.resiInfo = data
                console.log(this.resiInfo);
            } else {
                this.$message.error(msg)
            }
        }
    },
    //子组件注册
    components: {},
    //计算
    computed: {},
    //监听
    watch: {},
}
</script>

<style lang="scss" scoped>
@import "@/assets/scss/pages/huaxiang";
@import "@/assets/scss/modules/management/list-main.scss";
</style>
