|
|
|
@ -1,193 +1,327 @@
|
|
|
|
|
<template>
|
|
|
|
|
<transition>
|
|
|
|
|
<div class="house-container" :style="{ width: handlerWidth }" v-show="show">
|
|
|
|
|
<div class="house-header">
|
|
|
|
|
<div class="houser-data">
|
|
|
|
|
<div class="house-main-row">
|
|
|
|
|
<div class="house-name">
|
|
|
|
|
<span class="number-font">{{ houseItem.name }}</span>
|
|
|
|
|
室(共<span class="number-font"> {{ total }} </span>人)
|
|
|
|
|
</div>
|
|
|
|
|
<div class="house-type">{{ houseItem.typename }}</div>
|
|
|
|
|
<ColorCell :item="houseItem"
|
|
|
|
|
><span class="house-color">
|
|
|
|
|
{{ houseItem.color }}</span
|
|
|
|
|
></ColorCell
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #81204e; color: #e73388"
|
|
|
|
|
v-show="houseItem.isD == 1"
|
|
|
|
|
>
|
|
|
|
|
中共党员
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #734700; color: #e09100"
|
|
|
|
|
v-show="houseItem.isK == 1"
|
|
|
|
|
>
|
|
|
|
|
帮扶对象
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #00694c; color: #00c185"
|
|
|
|
|
v-show="houseItem.isX == 1"
|
|
|
|
|
>
|
|
|
|
|
重点人群
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #006382; color: #02b4e7"
|
|
|
|
|
v-show="houseItem.isJ == 1"
|
|
|
|
|
>
|
|
|
|
|
退伍军人
|
|
|
|
|
<div class="house-container" :style="{ width: handlerWidth }" v-show="show">
|
|
|
|
|
<transition>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="house-header">
|
|
|
|
|
<div class="houser-data">
|
|
|
|
|
<div class="house-main-row">
|
|
|
|
|
<div class="house-name">
|
|
|
|
|
<span class="number-font">{{ houseItem.name }}</span>
|
|
|
|
|
室(共<span class="number-font"> {{ total }} </span>人)
|
|
|
|
|
</div>
|
|
|
|
|
<div class="house-type">{{ houseData.typename }}</div>
|
|
|
|
|
<ColorCell :item="houseData"
|
|
|
|
|
><span class="house-color">
|
|
|
|
|
{{ houseData.color }}</span
|
|
|
|
|
></ColorCell
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #81204e; color: #e73388"
|
|
|
|
|
v-show="houseData.isD == 1"
|
|
|
|
|
>
|
|
|
|
|
中共党员
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #734700; color: #e09100"
|
|
|
|
|
v-show="houseData.isK == 1"
|
|
|
|
|
>
|
|
|
|
|
帮扶对象
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #00694c; color: #00c185"
|
|
|
|
|
v-show="houseData.isX == 1"
|
|
|
|
|
>
|
|
|
|
|
重点人群
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #006382; color: #02b4e7"
|
|
|
|
|
v-show="houseData.isJ == 1"
|
|
|
|
|
>
|
|
|
|
|
退伍军人
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
<div class="btn-gather" v-show="houseItem.color == 'NO'">
|
|
|
|
|
确认空关
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
<div class="btn-gather" v-show="houseData.color == 'NO'">
|
|
|
|
|
确认空关
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="btn-add"></div> -->
|
|
|
|
|
<imageButton size="small" @handlerClcik="addPerson()"
|
|
|
|
|
>添加居民</imageButton
|
|
|
|
|
>
|
|
|
|
|
<div class="btn-close" @click="handleClose()">关闭</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn-gather">房屋信息采集</div>
|
|
|
|
|
<div class="btn-add">添加居民</div>
|
|
|
|
|
<div class="btn-close" @click="handleClose()">关闭</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="house-address">公安地址:{{ houseData.address }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="house-address">公安地址:{{ houseItem.address }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="house-list" v-if="total > 0">
|
|
|
|
|
<div class="list-item" v-for="item in list" :key="item.id">
|
|
|
|
|
<div class="person-icon">
|
|
|
|
|
<img :src="filterIcon(item.credentialNo)" alt="" />
|
|
|
|
|
<div class="person-name">{{ item.name }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="person-data">
|
|
|
|
|
<div class="data-row">
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">
|
|
|
|
|
性別:{{ getGender(item.credentialNo) }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item-value"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">身份证号:</div>
|
|
|
|
|
<div class="row-item-value">{{ item.credentialNo }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">户籍:</div>
|
|
|
|
|
<div
|
|
|
|
|
class="row-item-value"
|
|
|
|
|
:style="{ color: item.type == 1 ? '#00C185' : '#E73388' }"
|
|
|
|
|
>
|
|
|
|
|
{{ item.typename }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="house-list" v-if="total > 0">
|
|
|
|
|
<div class="list-item" v-for="item in list" :key="item.id">
|
|
|
|
|
<div class="person-icon">
|
|
|
|
|
<img :src="filterIcon(item.credentialNo)" alt="" />
|
|
|
|
|
<div class="person-name">{{ item.name }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="data-row">
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">年龄:</div>
|
|
|
|
|
<div class="row-item-value">
|
|
|
|
|
{{ calculateAge(item.credentialNo) }}岁
|
|
|
|
|
<div class="person-data">
|
|
|
|
|
<div class="data-row">
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">
|
|
|
|
|
性別:{{ getGender(item.credentialNo) }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item-value"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">手机号:</div>
|
|
|
|
|
<div class="row-item-value">{{ item.phone }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">分色:</div>
|
|
|
|
|
<div class="row-item-value">
|
|
|
|
|
<ColorCell :item="item" size="small"
|
|
|
|
|
><span class="house-color">
|
|
|
|
|
{{ item.color }}</span
|
|
|
|
|
></ColorCell
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">身份证号:</div>
|
|
|
|
|
<div class="row-item-value">{{ item.credentialNo }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">户籍:</div>
|
|
|
|
|
<div
|
|
|
|
|
class="row-item-value"
|
|
|
|
|
:style="{ color: item.type == 1 ? '#00C185' : '#E73388' }"
|
|
|
|
|
>
|
|
|
|
|
{{ item.typename }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="data-row">
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">出生年月:</div>
|
|
|
|
|
<div class="row-item-value">
|
|
|
|
|
{{ extractBirthMonth(item.credentialNo) }}
|
|
|
|
|
<div class="data-row">
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">年龄:</div>
|
|
|
|
|
<div class="row-item-value">
|
|
|
|
|
{{ calculateAge(item.credentialNo) }}岁
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">数据更新时间:</div>
|
|
|
|
|
<div class="row-item-value" style="color: #ffb82f">
|
|
|
|
|
{{ item.updateTime }}
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">手机号:</div>
|
|
|
|
|
<div class="row-item-value">{{ item.phone }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">更新人员:</div>
|
|
|
|
|
<div class="row-item-value" style="color: #ffb82f">
|
|
|
|
|
{{ item.updateBy }}
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">分色:</div>
|
|
|
|
|
<div class="row-item-value">
|
|
|
|
|
<ColorCell :item="item" size="small"
|
|
|
|
|
><span class="house-color">
|
|
|
|
|
{{ item.color }}</span
|
|
|
|
|
></ColorCell
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="data-row last-row">
|
|
|
|
|
<div class="is-list">
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #81204e; color: #e73388"
|
|
|
|
|
v-show="item.isD == 1"
|
|
|
|
|
>
|
|
|
|
|
中共党员
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #734700; color: #e09100"
|
|
|
|
|
v-show="item.isK == 1"
|
|
|
|
|
>
|
|
|
|
|
帮扶对象
|
|
|
|
|
<div class="data-row">
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">出生年月:</div>
|
|
|
|
|
<div class="row-item-value">
|
|
|
|
|
{{ extractBirthMonth(item.credentialNo) }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #00694c; color: #00c185"
|
|
|
|
|
v-show="item.isX == 1"
|
|
|
|
|
>
|
|
|
|
|
重点人群
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">数据更新时间:</div>
|
|
|
|
|
<div class="row-item-value" style="color: #ffb82f">
|
|
|
|
|
{{ item.updateTime }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #006382; color: #02b4e7"
|
|
|
|
|
v-show="item.isJ == 1"
|
|
|
|
|
>
|
|
|
|
|
退伍军人
|
|
|
|
|
<div class="row-item">
|
|
|
|
|
<div class="row-item-lable">更新人员:</div>
|
|
|
|
|
<div class="row-item-value" style="color: #ffb82f">
|
|
|
|
|
{{ item.updateBy }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-btn">
|
|
|
|
|
<div>删除</div>
|
|
|
|
|
|
|
|
|
|
<div>修改</div>
|
|
|
|
|
<div>设为户主</div>
|
|
|
|
|
<div class="data-row last-row">
|
|
|
|
|
<div class="is-list">
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #81204e; color: #e73388"
|
|
|
|
|
v-show="item.isD == 1"
|
|
|
|
|
>
|
|
|
|
|
中共党员
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #734700; color: #e09100"
|
|
|
|
|
v-show="item.isK == 1"
|
|
|
|
|
>
|
|
|
|
|
帮扶对象
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #00694c; color: #00c185"
|
|
|
|
|
v-show="item.isX == 1"
|
|
|
|
|
>
|
|
|
|
|
重点人群
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="house-is"
|
|
|
|
|
style="border: 1px solid #006382; color: #02b4e7"
|
|
|
|
|
v-show="item.isJ == 1"
|
|
|
|
|
>
|
|
|
|
|
退伍军人
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row-btn">
|
|
|
|
|
<imageButton @handlerClcik="delPerson(item.id)"
|
|
|
|
|
>删除</imageButton
|
|
|
|
|
>
|
|
|
|
|
<imageButton @handlerClcik="getPersonInfo(item.id)"
|
|
|
|
|
>修改</imageButton
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-key" v-show="houseItem.holderId == item.id">
|
|
|
|
|
<span>户主</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="no-data">
|
|
|
|
|
<el-empty
|
|
|
|
|
:image="require('@/assets/images/ui/noData.png')"
|
|
|
|
|
description="暂无居民"
|
|
|
|
|
></el-empty>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="no-data">
|
|
|
|
|
<el-empty
|
|
|
|
|
:image="require('@/assets/images/ui/noData.png')"
|
|
|
|
|
description="暂无居民"
|
|
|
|
|
></el-empty>
|
|
|
|
|
</transition>
|
|
|
|
|
<!-- 添加修改居民 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
:visible.sync="open"
|
|
|
|
|
append-to-body
|
|
|
|
|
custom-class="taicang-dialog-small"
|
|
|
|
|
>
|
|
|
|
|
<div class="dialog-main">
|
|
|
|
|
<div class="dialog-title"><span></span> {{ title }}</div>
|
|
|
|
|
<el-form ref="form" :rules="rules" :model="form" label-position="top">
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="姓名" prop="name">
|
|
|
|
|
<el-input v-model="form.name"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="人员类型">
|
|
|
|
|
<el-checkbox-group v-model="multiple">
|
|
|
|
|
<el-checkbox label="中共党员"></el-checkbox>
|
|
|
|
|
<el-checkbox label="帮扶对象"></el-checkbox>
|
|
|
|
|
<el-checkbox label="重点人群"></el-checkbox>
|
|
|
|
|
<el-checkbox label="退伍军人"></el-checkbox>
|
|
|
|
|
</el-checkbox-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="身份证" prop="credentialNo">
|
|
|
|
|
<el-input v-model="form.credentialNo"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="工作单位">
|
|
|
|
|
<el-input v-model="form.workunit"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="手机号" prop="phone">
|
|
|
|
|
<el-input v-model="form.phone"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12"> </el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="户籍" prop="color">
|
|
|
|
|
<el-radio-group v-model="form.color">
|
|
|
|
|
<el-radio
|
|
|
|
|
:label="dict.value"
|
|
|
|
|
v-for="dict in dict.type.b_census_color_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
>{{ dict.value }}</el-radio
|
|
|
|
|
>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="流动" prop="color">
|
|
|
|
|
<el-radio-group v-model="form.color">
|
|
|
|
|
<el-radio
|
|
|
|
|
:label="dict.value"
|
|
|
|
|
v-for="dict in dict.type.b_flow_color_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
>{{ dict.value }}</el-radio
|
|
|
|
|
>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="备注">
|
|
|
|
|
<el-input type="textarea" v-model="form.remark"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<div class="dialog-btn-group">
|
|
|
|
|
<imageButton size="small" @handlerClcik="confirm()"
|
|
|
|
|
>确 定</imageButton
|
|
|
|
|
>
|
|
|
|
|
<imageButton size="small">取 消</imageButton>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
|
import { getHouse } from "@/api/taicangpop/house.js";
|
|
|
|
|
import { listPerson } from "@/api/taicangpop/person.js";
|
|
|
|
|
import {
|
|
|
|
|
listPerson,
|
|
|
|
|
addPerson,
|
|
|
|
|
updatePerson,
|
|
|
|
|
delPerson,
|
|
|
|
|
getPerson,
|
|
|
|
|
} from "@/api/taicangpop/person.js";
|
|
|
|
|
import { pxToVw, handleColor } from "@/utils/myFuntion.js";
|
|
|
|
|
import ColorCell from "@/components/ColorCell";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: { ColorCell },
|
|
|
|
|
dicts: ["b_census_color_type", "b_flow_color_type"],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
houseData: {},
|
|
|
|
|
form: {
|
|
|
|
|
name: undefined,
|
|
|
|
|
credentialNo: undefined,
|
|
|
|
|
workunit: undefined,
|
|
|
|
|
phone: undefined,
|
|
|
|
|
color: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
isD: undefined,
|
|
|
|
|
isK: undefined,
|
|
|
|
|
isJ: undefined,
|
|
|
|
|
isX: undefined,
|
|
|
|
|
userId: undefined,
|
|
|
|
|
houseId: undefined,
|
|
|
|
|
buildingId: undefined,
|
|
|
|
|
deptId: undefined,
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
|
|
|
|
credentialNo: [
|
|
|
|
|
{ required: true, message: "身份证不能为空", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
phone: [{ required: true, message: "手机号不能为空", trigger: "blur" }],
|
|
|
|
|
workunit: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: "工作单位不能为空",
|
|
|
|
|
trigger: "change",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
color: [{ required: true, message: "分色不能为空", trigger: "change" }],
|
|
|
|
|
},
|
|
|
|
|
multiple: [],
|
|
|
|
|
title: "",
|
|
|
|
|
open: false,
|
|
|
|
|
show: false,
|
|
|
|
|
total: 0,
|
|
|
|
|
list: [],
|
|
|
|
@ -204,13 +338,98 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
|
...mapGetters(["houseItem", "queryParamsXiaoqu"]),
|
|
|
|
|
...mapGetters(["houseItem", "queryParamsXiaoqu", "userId"]),
|
|
|
|
|
handlerWidth() {
|
|
|
|
|
return pxToVw(this.houseItem.buildingWidth);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
methods: {
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
name: undefined,
|
|
|
|
|
credentialNo: undefined,
|
|
|
|
|
workunit: undefined,
|
|
|
|
|
phone: undefined,
|
|
|
|
|
color: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
isD: undefined,
|
|
|
|
|
isK: undefined,
|
|
|
|
|
isJ: undefined,
|
|
|
|
|
isX: undefined,
|
|
|
|
|
userId: undefined,
|
|
|
|
|
houseId: undefined,
|
|
|
|
|
buildingId: undefined,
|
|
|
|
|
deptId: undefined,
|
|
|
|
|
};
|
|
|
|
|
this.multiple = [];
|
|
|
|
|
},
|
|
|
|
|
async getPersonInfo(id) {
|
|
|
|
|
let res = await getPerson(id);
|
|
|
|
|
this.reset();
|
|
|
|
|
this.title = "修改居民";
|
|
|
|
|
res.data.isD == "1" ? this.multiple.push("中共党员") : "";
|
|
|
|
|
res.data.isJ == "1" ? this.multiple.push("退伍军人") : "";
|
|
|
|
|
res.data.isK == "1" ? this.multiple.push("帮扶对象") : "";
|
|
|
|
|
res.data.isX == "1" ? this.multiple.push("重点人群") : "";
|
|
|
|
|
|
|
|
|
|
this.form = res.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
},
|
|
|
|
|
delPerson(ids) {
|
|
|
|
|
this.$modal
|
|
|
|
|
.confirm('是否确认删除居民管理编号为"' + ids + '"的数据项?')
|
|
|
|
|
.then(function () {
|
|
|
|
|
return delPerson(ids);
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.getPersonList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
confirm() {
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.form.isD = this.multiple.some((item) => item == "中共党员")
|
|
|
|
|
? 1
|
|
|
|
|
: 0;
|
|
|
|
|
this.form.isK = this.multiple.some((item) => item == "帮扶对象")
|
|
|
|
|
? 1
|
|
|
|
|
: 0;
|
|
|
|
|
this.form.isJ = this.multiple.some((item) => item == "退伍军人")
|
|
|
|
|
? 1
|
|
|
|
|
: 0;
|
|
|
|
|
this.form.isX = this.multiple.some((item) => item == "重点人群")
|
|
|
|
|
? 1
|
|
|
|
|
: 0;
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updatePerson(this.form).then((response) => {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getPersonList();
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.form.userId = this.userId;
|
|
|
|
|
this.form.buildingId = this.houseItem.buildingId;
|
|
|
|
|
this.form.houseId = this.houseItem.id;
|
|
|
|
|
this.form.deptId = this.houseItem.deptId;
|
|
|
|
|
addPerson(this.form).then((res) => {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getPersonList();
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
addPerson() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.title = "添加居民";
|
|
|
|
|
this.open = true;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
filterIcon(credentialNo) {
|
|
|
|
|
let sex = this.getGender(credentialNo);
|
|
|
|
|
if (sex == "男") {
|
|
|
|
@ -226,8 +445,12 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
async getPersonList() {
|
|
|
|
|
let result = await getHouse(this.houseItem.id);
|
|
|
|
|
this.houseItem.holderId = result.data.holderId; //户主
|
|
|
|
|
this.houseItem.address = result.data.address;
|
|
|
|
|
this.houseData = handleColor([result.data])[0];
|
|
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getList() {
|
|
|
|
|
let res = await listPerson({
|
|
|
|
|
buildingId: this.houseItem.buildingId,
|
|
|
|
|
houseId: this.houseItem.id,
|
|
|
|
@ -351,15 +574,20 @@ div {
|
|
|
|
|
top: 75px;
|
|
|
|
|
left: 0;
|
|
|
|
|
height: calc(100% - 75px);
|
|
|
|
|
display: flex;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
background: #113666;
|
|
|
|
|
border: 1px solid #2d6cad;
|
|
|
|
|
border-right: 0px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
|
|
|
|
|
& > div {
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
background: #113666;
|
|
|
|
|
border: 1px solid #2d6cad;
|
|
|
|
|
border-right: 0px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
padding: 15px;
|
|
|
|
|
}
|
|
|
|
|
.house-header {
|
|
|
|
|
.houser-data {
|
|
|
|
|
display: flex;
|
|
|
|
@ -478,26 +706,11 @@ div {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
.is-list > div {
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
.row-btn {
|
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
|
|
|
|
|
|
& > div {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
color: #fff;
|
|
|
|
|
margin: 0 0 0 10px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
|
|
background: url("~@/assets/images/ui/btn_1@2x.png");
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
padding: 3px 15px;
|
|
|
|
|
}
|
|
|
|
|
& > div:last-child {
|
|
|
|
|
background: url("~@/assets/images/ui/tab1.png");
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.is-list > div {
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.house-is {
|
|
|
|
@ -567,4 +780,31 @@ div {
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
|
background: transparent;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-form-item__label {
|
|
|
|
|
color: #7ff7ff;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-form-item__content {
|
|
|
|
|
background: #162841;
|
|
|
|
|
}
|
|
|
|
|
::v-deep .el-checkbox-group {
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
.el-checkbox__label {
|
|
|
|
|
padding-left: 3px;
|
|
|
|
|
color: #aabace;
|
|
|
|
|
}
|
|
|
|
|
.el-checkbox {
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-radio-group {
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
.el-radio__label {
|
|
|
|
|
padding-left: 3px;
|
|
|
|
|
color: #aabace;
|
|
|
|
|
}
|
|
|
|
|
.el-radio {
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|