22 changed files with 2890 additions and 133 deletions
@ -0,0 +1,152 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-news__housebusinessinfo}"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-form-item label="户主姓名"> |
||||
|
<el-input v-model.trim="dataForm.residentsName" |
||||
|
placeholder="请输入户主姓名" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="家庭类别" prop="familyCategory"> |
||||
|
<el-select v-model="dataForm.familyCategory" clearable> |
||||
|
<el-option v-for="item in familyCategoryList" |
||||
|
:key="item.dictValue" |
||||
|
:value="item.dictValue" |
||||
|
:label="item.dictName"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="救助情况" prop="helpStatus"> |
||||
|
<el-select v-model="dataForm.helpStatus" clearable> |
||||
|
<el-option v-for="item in helpStatusList" |
||||
|
:key="item.dictValue" |
||||
|
:value="item.dictValue" |
||||
|
:label="item.dictName"></el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="辖区范围"> |
||||
|
<el-cascader v-model="deptIdList" |
||||
|
:options="options" |
||||
|
:props="{ checkStrictly: true }" |
||||
|
clearable> |
||||
|
</el-cascader> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" |
||||
|
@click="exportHandle()">{{ $t('export') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
||||
|
<el-table-column label="序号" width="70px" header-align="center" align="center"><template slot-scope="scope">{{scope.$index+1}}</template></el-table-column> |
||||
|
<el-table-column prop="gridNames" label="辖区范围" header-align="center" align="center" width="300px"></el-table-column> |
||||
|
<el-table-column prop="residentsName" label="户主姓名" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="helpStatus" label="救助情况" header-align="center" align="center" :formatter="helpStatusFormat"></el-table-column> |
||||
|
<el-table-column prop="familyCategory" label="家庭类列" header-align="center" align="center" :formatter="familyCategoryFormat"></el-table-column> |
||||
|
<el-table-column prop="houseAddress" label="家庭住址" header-align="center" align="center" width="300px"></el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/custom/populationinformation/page', |
||||
|
getDataListIsPage: true, |
||||
|
exportURL: '/custom/populationinformation/getFamily/export' |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '' |
||||
|
}, |
||||
|
deptIdList: [], |
||||
|
options: [], |
||||
|
familyCategoryList: [], |
||||
|
helpStatusList: [] |
||||
|
} |
||||
|
}, |
||||
|
created: function () { |
||||
|
this.$http |
||||
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.options = res.data.options |
||||
|
}) |
||||
|
.catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/family_category`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.familyCategoryList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/help_status`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.helpStatusList = res.data |
||||
|
}).catch(() => { }) |
||||
|
}, |
||||
|
methods: { |
||||
|
familyCategoryFormat (row, column) { |
||||
|
if (row.familyCategory) { |
||||
|
let dict = this.familyCategoryList.filter(item => item.dictValue === row.familyCategory)[0] |
||||
|
if (dict) { |
||||
|
return dict.dictName |
||||
|
} |
||||
|
} |
||||
|
return '' |
||||
|
}, |
||||
|
helpStatusFormat (row, column) { |
||||
|
if (row.helpStatus) { |
||||
|
let dict = this.helpStatusList.filter(item => item.dictValue === row.helpStatus)[0] |
||||
|
if (dict) { |
||||
|
return dict.dictName |
||||
|
} |
||||
|
} |
||||
|
return '' |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
'deptIdList': function (val) { |
||||
|
if (val.length === 0) { |
||||
|
this.dataForm.streetId = '' |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 1) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 2) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 3) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = this.deptIdList[2] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,123 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-news__populationinformation}"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="backToHouseheadedit">{{"返回"}}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> |
||||
|
</el-form-item> |
||||
|
|
||||
|
</el-form> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
||||
|
<el-table-column label="序号" width="70px" header-align="center" align="center"><template slot-scope="scope">{{scope.$index+1}}</template></el-table-column> |
||||
|
<el-table-column prop="houseHeadRelation" label="与户主关系" header-align="center" align="center" :formatter="houseHeadRelationFormat"></el-table-column> |
||||
|
<el-table-column prop="residentsName" label="姓名" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="residentsSex" label="性别" header-align="center" align="center" :formatter="sexFormat"></el-table-column> |
||||
|
<el-table-column prop="residentsNation" label="民族" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="currentEmployer" label="工作单位/学校" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="currentAddress" label="现居住地址" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
||||
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
<!-- 弹窗, 新增 / 修改 --> |
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" :houseId="dataForm.houseId"></add-or-update> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
import AddOrUpdate from './houseresidentInfo-add-or-update' |
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/custom/houseresident/page', |
||||
|
getDataListIsPage: true, |
||||
|
deleteURL: '/custom/houseresident', |
||||
|
deleteIsBatch: true |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
houseId: '' |
||||
|
}, |
||||
|
houseHeadRelationList: [ |
||||
|
{ |
||||
|
label: '子女', |
||||
|
value: '0' |
||||
|
}, |
||||
|
{ |
||||
|
label: '夫妻', |
||||
|
value: '1' |
||||
|
}, |
||||
|
{ |
||||
|
label: '父母', |
||||
|
value: '2' |
||||
|
}, |
||||
|
{ |
||||
|
label: '其他', |
||||
|
value: '3' |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
AddOrUpdate |
||||
|
}, |
||||
|
created () { |
||||
|
this.$http.get(`/sys/dict/listSimple/education_level`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.educationLevelList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/politics_status`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.politicsStatusList = res.data |
||||
|
}).catch(() => { }) |
||||
|
}, |
||||
|
mounted () { |
||||
|
if (this.$route.query.id !== '' && this.$route.query.id != null) { |
||||
|
this.dataForm.houseId = this.$route.query.id |
||||
|
this.getDataList() |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
backToHouseheadedit () { |
||||
|
this.$emit('refreshDataList') |
||||
|
this.$parent.selectComponent = 'Househeadedit' |
||||
|
this.$router.push({ path: '/house-houseinfomationroute', query: { id: this.$route.query.id } }) |
||||
|
}, |
||||
|
sexFormat: function (row, column) { |
||||
|
return row.residentsSex === '0' ? '女' : '男' |
||||
|
}, |
||||
|
houseHeadRelationFormat: function (row, column) { |
||||
|
if (row.houseHeadRelation) { |
||||
|
let dict = this.houseHeadRelationList.filter(item => item.value === row.houseHeadRelation)[0] |
||||
|
if (dict) { |
||||
|
return dict.label |
||||
|
} |
||||
|
} |
||||
|
return '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,152 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
||||
|
<el-form-item label="企业名称" prop="enterpriseName"> |
||||
|
<el-input v-model="dataForm.enterpriseName" placeholder="企业名称"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="社会统一代码" prop="socialUniformCode"> |
||||
|
<el-input v-model="dataForm.socialUniformCode" placeholder="社会统一代码"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="法人代表" prop="legalRepresentative"> |
||||
|
<el-input v-model="dataForm.legalRepresentative" placeholder="法人代表"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="电话" prop="enterprisePhone"> |
||||
|
<el-input v-model="dataForm.enterprisePhone" placeholder="电话"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋ID" prop="houseId"> |
||||
|
<el-input v-model="dataForm.houseId" placeholder="房屋ID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="删除标识 (0:否 1:是)" prop="delFlag"> |
||||
|
<el-input v-model="dataForm.delFlag" placeholder="删除标识 (0:否 1:是)"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="乐观锁" prop="revision"> |
||||
|
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建人" prop="createdBy"> |
||||
|
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdTime"> |
||||
|
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新人" prop="updatedBy"> |
||||
|
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedTime"> |
||||
|
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<template slot="footer"> |
||||
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
||||
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import debounce from 'lodash/debounce' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
enterpriseName: '', |
||||
|
socialUniformCode: '', |
||||
|
legalRepresentative: '', |
||||
|
enterprisePhone: '', |
||||
|
houseId: '', |
||||
|
delFlag: '', |
||||
|
revision: '', |
||||
|
createdBy: '', |
||||
|
createdTime: '', |
||||
|
updatedBy: '', |
||||
|
updatedTime: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
enterpriseName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
socialUniformCode: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
legalRepresentative: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
enterprisePhone: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
houseId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
delFlag: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
revision: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/news/housebusinessinfo/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 表单提交 |
||||
|
dataFormSubmitHandle: debounce(function () { |
||||
|
this.$refs['dataForm'].validate((valid) => { |
||||
|
if (!valid) { |
||||
|
return false |
||||
|
} |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/news/housebusinessinfo/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, 1000, { 'leading': true, 'trailing': false }) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,117 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-news__housebusinessinfo}"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-form-item label="经营者姓名"> |
||||
|
<el-input v-model.trim="dataForm.legalRepresentative" |
||||
|
placeholder="请输入经营者姓名" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="企业名称"> |
||||
|
<el-input v-model.trim="dataForm.enterpriseName" |
||||
|
placeholder="请输入企业名称" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="企业注册号"> |
||||
|
<el-input v-model.trim="dataForm.socialUniformCode" |
||||
|
placeholder="请输入企业注册号" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="辖区范围"> |
||||
|
<el-cascader v-model="deptIdList" |
||||
|
:options="options" |
||||
|
:props="{ checkStrictly: true }" |
||||
|
clearable> |
||||
|
</el-cascader> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" |
||||
|
@click="exportHandle()">{{ $t('export') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
||||
|
<el-table-column label="序号" width="70px" header-align="center" align="center"><template slot-scope="scope">{{scope.$index+1}}</template></el-table-column> |
||||
|
<el-table-column prop="gridName" label="辖区范围" header-align="center" align="center" width="200px"></el-table-column> |
||||
|
<el-table-column prop="legalRepresentative" label="经营者姓名" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="enterprisePhone" label="联系电话" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="enterpriseName" label="企业名称" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="socialUniformCode" label="企业注册号" header-align="center" align="center"></el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
<!-- 弹窗, 新增 / 修改 --> |
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
import AddOrUpdate from './housebusinessinfo-add-or-update' |
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/custom/housebusinessinfo/page', |
||||
|
getDataListIsPage: true, |
||||
|
exportURL: '/custom/housebusinessinfo/export' |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '' |
||||
|
}, |
||||
|
deptIdList: [], |
||||
|
options: [] |
||||
|
} |
||||
|
}, |
||||
|
created: function () { |
||||
|
this.$http |
||||
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.options = res.data.options |
||||
|
}) |
||||
|
.catch(() => { }) |
||||
|
}, |
||||
|
components: { |
||||
|
AddOrUpdate |
||||
|
}, |
||||
|
watch: { |
||||
|
'deptIdList': function (val) { |
||||
|
if (val.length === 0) { |
||||
|
this.dataForm.streetId = '' |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 1) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 2) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 3) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = this.deptIdList[2] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,492 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" |
||||
|
class="aui-card--fill"> |
||||
|
<div class="mod-news__news}"> |
||||
|
<el-button type="primary" @click="backToUserRelationList">{{"返回"}}</el-button> |
||||
|
<el-button type="info" @click="getResidentsInfo">居住人信息</el-button> |
||||
|
|
||||
|
<el-button style="float:right" v-if="noEdit" type="primary" @click="editResidentInfo">{{"编辑"}}</el-button> |
||||
|
<el-button style="float:right" v-if="isEdit" type="primary" @click="submitResidentInfo">{{"保存"}}</el-button> |
||||
|
<el-button style="float:right" v-if="isEdit" type="primary" @click="cancelEditResidentInfo">{{"取消"}}</el-button> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'"> |
||||
|
<br> |
||||
|
<hr> |
||||
|
<fieldset :disabled="noEdit" style="border: 0"> |
||||
|
<el-form-item class="item" label="基本信息"> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="户主姓名" prop="residentsName" > |
||||
|
<el-input v-model.trim="dataForm.residentsName" placeholder="姓名" maxlength="10" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="民族" prop="residentsNation"> |
||||
|
<el-input v-model.trim="dataForm.residentsNation" placeholder="民族" maxlength="10" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证号码" prop="residentsIdentityNo" > |
||||
|
<el-input v-model.trim="dataForm.residentsIdentityNo" placeholder="身份证号码" @blur="getSexAndBirthDay" maxlength="18" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="性别" prop="residentsSex"> |
||||
|
<el-radio-group v-model="dataForm.residentsSex" :disabled="true"> |
||||
|
<el-radio label="0">女</el-radio> |
||||
|
<el-radio label="1">男</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="出生日期" prop="residentsBirthday"> |
||||
|
<el-date-picker |
||||
|
v-model="dataForm.residentsBirthday" |
||||
|
type="date" |
||||
|
placeholder="选择日期" |
||||
|
:disabled="true"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="文化程度" prop="educationLevel"> |
||||
|
<el-radio-group v-model="dataForm.educationLevel"> |
||||
|
<el-radio v-for="item in educationLevelList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="政治面貌" prop="politicsStatus"> |
||||
|
<el-radio-group v-model="dataForm.politicsStatus"> |
||||
|
<el-radio v-for="item in politicsStatusList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="入党时间" prop="joinTime" v-if="dataForm.politicsStatus === '1'"> |
||||
|
<el-input v-model.trim="dataForm.joinTime" placeholder="入党时间" maxlength="10" show-word-limit></el-input> |
||||
|
例:1990/1990-01/1990-01-01 |
||||
|
</el-form-item> |
||||
|
<el-form-item label="组织关系所在地" prop="organizationalRelationshipLocation" v-if="dataForm.politicsStatus === '1'"> |
||||
|
<el-input v-model.trim="dataForm.organizationalRelationshipLocation" placeholder="组织关系所在地" maxlength="20" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="联系电话" prop="residentsPhone"> |
||||
|
<el-input v-model.trim="dataForm.residentsPhone" placeholder="联系电话" maxlength="20" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="身体状况" prop="bodyStatus"> |
||||
|
<el-radio-group v-model="dataForm.bodyStatus"> |
||||
|
<el-radio v-for="item in bodyStatusList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="婚姻状况" prop="maritalStatus"> |
||||
|
<el-radio-group v-model="dataForm.maritalStatus"> |
||||
|
<el-radio v-for="item in maritalStatusList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="户口类型" prop="accountType"> |
||||
|
<el-radio-group v-model="dataForm.accountType"> |
||||
|
<el-radio v-for="item in accountTypeList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="服兵役" prop="militaryService"> |
||||
|
<el-radio-group v-model="dataForm.militaryService"> |
||||
|
<el-radio label="0">否</el-radio> |
||||
|
<el-radio label="1">是</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="户籍地" prop="householdRegistrationPlace"> |
||||
|
<el-input v-model.trim="dataForm.householdRegistrationPlace" placeholder="户籍地" style="width: 500px" maxlength="30" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<hr> |
||||
|
<el-form-item class="item" label="就业情况"> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="就业情况" prop="employmentStatus"> |
||||
|
<el-radio-group v-model="dataForm.employmentStatus"> |
||||
|
<el-radio v-for="item in employmentStatusList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="现工作单位" prop="currentEmployer" v-if="dataForm.employmentStatus === '0'"> |
||||
|
<el-input v-model.trim="dataForm.currentEmployer" placeholder="现工作单位" maxlength="30" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="现单位地址" prop="currentEmployerAddress" v-if="dataForm.employmentStatus === '0'"> |
||||
|
<el-input v-model.trim="dataForm.currentEmployerAddress" placeholder="现单位地址" maxlength="30" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="失业原因" prop="unemploymentReason" v-if="dataForm.employmentStatus === '1'"> |
||||
|
<el-radio-group v-model="dataForm.unemploymentReason"> |
||||
|
<el-radio v-for="item in unemploymentReasonList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="再就业优惠证" prop="reemploymentPermit" v-if="dataForm.employmentStatus === '1'"> |
||||
|
<el-radio-group v-model="dataForm.reemploymentPermit"> |
||||
|
<el-radio label="0">无</el-radio> |
||||
|
<el-radio label="1">有</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="失业登记" prop="unemploymentRegister" v-if="dataForm.employmentStatus === '1'"> |
||||
|
<el-radio-group v-model="dataForm.unemploymentRegister"> |
||||
|
<el-radio label="0">否</el-radio> |
||||
|
<el-radio label="1">是</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="失业登记时间" prop="unemploymentRegisterTime" v-if="dataForm.employmentStatus === '1' && dataForm.unemploymentRegister === '1'"> |
||||
|
<el-input v-model.trim="dataForm.unemploymentRegisterTime" placeholder="失业登记时间" maxlength="10" show-word-limit></el-input> |
||||
|
例:1990/1990-01/1990-01-01 |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<hr> |
||||
|
<el-form-item class="item" label="家庭情况"> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="家庭类别" prop="familyCategory"> |
||||
|
<el-radio-group v-model="dataForm.familyCategory"> |
||||
|
<el-radio v-for="item in familyCategoryList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="救助情况" prop="helpStatus"> |
||||
|
<el-radio-group v-model="dataForm.helpStatus"> |
||||
|
<el-radio v-for="item in helpStatusList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue">{{item.dictName}}</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="机动车数量"> |
||||
|
<el-input-number v-model="dataForm.motorVehicleNum" placeholder="机动车数量" :min="0"></el-input-number> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="机动车类型" prop="motorVehicleCategory"> |
||||
|
<el-checkbox-group v-model="dataForm.motorVehicleCategoryList"> |
||||
|
<el-checkbox v-for="item in motorVehicleCategoryList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictValue"> |
||||
|
{{item.dictName}} |
||||
|
</el-checkbox> |
||||
|
</el-checkbox-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="宠物犬状况" prop="dogStatus"> |
||||
|
<el-radio-group v-model="dataForm.dogStatus"> |
||||
|
<el-radio label="0">无</el-radio> |
||||
|
<el-radio label="1">有</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
</fieldset> |
||||
|
</el-form> |
||||
|
<template slot="footer"> |
||||
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
||||
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
||||
|
</template> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import debounce from 'lodash/debounce' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
residentsName: '', |
||||
|
residentsSex: '', |
||||
|
residentsNation: '', |
||||
|
residentsBirthday: '', |
||||
|
educationLevel: '', |
||||
|
politicsStatus: '', |
||||
|
joinTime: '', |
||||
|
organizationalRelationshipLocation: '', |
||||
|
residentsIdentityNo: '', |
||||
|
residentsPhone: '', |
||||
|
bodyStatus: '', |
||||
|
maritalStatus: '', |
||||
|
accountType: '', |
||||
|
militaryService: '', |
||||
|
householdRegistrationPlace: '', |
||||
|
employmentStatus: '', |
||||
|
currentEmployer: '', |
||||
|
currentEmployerAddress: '', |
||||
|
unemploymentReason: '', |
||||
|
reemploymentPermit: '', |
||||
|
unemploymentRegister: '', |
||||
|
unemploymentRegisterTime: '', |
||||
|
familyCategory: '', |
||||
|
helpStatus: '', |
||||
|
motorVehicleNum: '', |
||||
|
motorVehicleCategory: '', |
||||
|
motorVehicleCategoryList: [], |
||||
|
dogStatus: '', |
||||
|
familyMemberNum: '', |
||||
|
familyMemberOutNum: '', |
||||
|
familyMemberOutReason: '', |
||||
|
familyMemberOutMonth: '', |
||||
|
isSubmit: '0' |
||||
|
}, |
||||
|
educationLevelList: [], |
||||
|
politicsStatusList: [], |
||||
|
bodyStatusList: [], |
||||
|
maritalStatusList: [], |
||||
|
accountTypeList: [], |
||||
|
employmentStatusList: [], |
||||
|
unemploymentReasonList: [], |
||||
|
familyCategoryList: [], |
||||
|
helpStatusList: [], |
||||
|
motorVehicleCategoryList: [], |
||||
|
familyMemberOutReasonList: [], |
||||
|
noEdit: true, |
||||
|
isEdit: false |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
residentsName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
residentsBirthday: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
residentsSex: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
residentsIdentityNo: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
residentsPhone: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
mounted () { |
||||
|
if (this.$route.query.id !== '' && this.$route.query.id != null) { |
||||
|
this.dataForm.houseId = this.$route.query.id |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.getAllDict() |
||||
|
}, |
||||
|
methods: { |
||||
|
getSexAndBirthDay () { |
||||
|
// 先判断身份证是否合法 |
||||
|
this.$http.get(`/custom/populationinformation/isIdentifyNoLegal/${this.dataForm.residentsIdentityNo}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
this.dataForm.residentsIdentityNo = '' |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
let identifyNo = this.dataForm.residentsIdentityNo |
||||
|
this.dataForm.residentsSex = this.IdCard(identifyNo, 2) |
||||
|
this.dataForm.residentsBirthday = this.IdCard(identifyNo, 1) |
||||
|
}).catch(() => { }) |
||||
|
}, |
||||
|
IdCard (UUserCard, num) { |
||||
|
if (num === 1) { |
||||
|
// 获取出生日期 |
||||
|
return UUserCard.substring(6, 10) + '-' + UUserCard.substring(10, 12) + '-' + UUserCard.substring(12, 14) |
||||
|
} |
||||
|
if (num === 2) { |
||||
|
// 获取性别 |
||||
|
if (parseInt(UUserCard.substr(16, 1)) % 2 === 1) { |
||||
|
// 男 |
||||
|
return '1' |
||||
|
} else { |
||||
|
// 女 |
||||
|
return '0' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
getResidentsInfo () { |
||||
|
this.$parent.selectComponent = 'HouseResidentInfo' |
||||
|
this.$router.push({ path: '/house-houseinfomationroute', query: { id: this.$route.query.id } }) |
||||
|
}, |
||||
|
editResidentInfo () { |
||||
|
this.isEdit = true |
||||
|
this.noEdit = false |
||||
|
}, |
||||
|
cancelEditResidentInfo () { |
||||
|
this.$confirm('如果取消,之前编辑会丢失,确定取消吗?', '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.isEdit = false |
||||
|
this.noEdit = true |
||||
|
this.init() |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
submitResidentInfo () { |
||||
|
this.dataFormSubmitHandle() |
||||
|
}, |
||||
|
getAllDict () { |
||||
|
this.$http.get(`/sys/dict/listSimple/education_level`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.educationLevelList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/politics_status`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.politicsStatusList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/body_status`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.bodyStatusList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/marital_status`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.maritalStatusList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/account_type`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.accountTypeList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/employment_status`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.employmentStatusList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/unemployment_reason`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.unemploymentReasonList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/family_category`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.familyCategoryList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/help_status`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.helpStatusList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/motor_vehicle_category`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.motorVehicleCategoryList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/family_member_out_reason`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.familyMemberOutReasonList = res.data |
||||
|
}).catch(() => { }) |
||||
|
}, |
||||
|
backToUserRelationList () { |
||||
|
this.$emit('refreshDataList') |
||||
|
this.$parent.selectComponent = 'Housinginformation' |
||||
|
this.$router.push({ path: '/house-houseinfomationroute' }) |
||||
|
}, |
||||
|
init () { |
||||
|
this.dataForm.id = this.$route.query.id |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/custom/populationinformation/getHouseHeadInfo?id=` + this.dataForm.houseId).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 表单提交 |
||||
|
dataFormSubmitHandle: debounce(function () { |
||||
|
this.$refs['dataForm'].validate((valid) => { |
||||
|
if (!valid) { |
||||
|
return false |
||||
|
} |
||||
|
let motorVehicleCategoryStr = '' |
||||
|
if (this.dataForm.motorVehicleCategoryList.length > 0) { |
||||
|
for (let i = 0; i < this.dataForm.motorVehicleCategoryList.length; i++) { |
||||
|
motorVehicleCategoryStr += ',' + this.dataForm.motorVehicleCategoryList[i] |
||||
|
} |
||||
|
} |
||||
|
this.dataForm.motorVehicleCategory = motorVehicleCategoryStr.substr(1) |
||||
|
this.dataForm.isSubmit = '0' |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/custom/populationinformation/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
if (res.data !== '' && res.data !== undefined && res.data !== null) { |
||||
|
this.$confirm(res.data, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.dataForm.isSubmit = '1' |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/custom/populationinformation/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.isEdit = false |
||||
|
this.noEdit = true |
||||
|
this.init() |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}).catch(() => {}) |
||||
|
} else { |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.isEdit = false |
||||
|
this.noEdit = true |
||||
|
this.init() |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, 1000, { 'leading': true, 'trailing': false }) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style> |
||||
|
.item .el-form-item__label{ |
||||
|
font-size: 20px; |
||||
|
width: 50px; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,31 @@ |
|||||
|
<template> |
||||
|
<keep-alive include="housinginformation"> |
||||
|
<component :is="selectComponent"></component> |
||||
|
</keep-alive> |
||||
|
</template> |
||||
|
<script> |
||||
|
import Housinginformation from './housinginformation' |
||||
|
import Househeadedit from './househeadedit' |
||||
|
import HouseResidentInfo from './houseResidentInfo' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
selectComponent: Housinginformation |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
Housinginformation, |
||||
|
Househeadedit, |
||||
|
HouseResidentInfo |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.selectComponent = Housinginformation |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
|
||||
|
</style> |
||||
@ -0,0 +1,145 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> |
||||
|
<el-form-item label="承租人姓名" prop="tenantName"> |
||||
|
<el-input v-model="dataForm.tenantName" placeholder="承租人姓名"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="承租人电话" prop="tenantPhone"> |
||||
|
<el-input v-model="dataForm.tenantPhone" placeholder="承租人电话"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="承租人身份证号" prop="tenantIdentityNo"> |
||||
|
<el-input v-model="dataForm.tenantIdentityNo" placeholder="承租人身份证号"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋ID" prop="houseId"> |
||||
|
<el-input v-model="dataForm.houseId" placeholder="房屋ID"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="删除标识" prop="delFlag"> |
||||
|
<el-input v-model="dataForm.delFlag" placeholder="删除标识"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="乐观锁" prop="revision"> |
||||
|
<el-input v-model="dataForm.revision" placeholder="乐观锁"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建人" prop="createdBy"> |
||||
|
<el-input v-model="dataForm.createdBy" placeholder="创建人"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdTime"> |
||||
|
<el-input v-model="dataForm.createdTime" placeholder="创建时间"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新人" prop="updatedBy"> |
||||
|
<el-input v-model="dataForm.updatedBy" placeholder="更新人"></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedTime"> |
||||
|
<el-input v-model="dataForm.updatedTime" placeholder="更新时间"></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<template slot="footer"> |
||||
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
||||
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import debounce from 'lodash/debounce' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
tenantName: '', |
||||
|
tenantPhone: '', |
||||
|
tenantIdentityNo: '', |
||||
|
houseId: '', |
||||
|
delFlag: '', |
||||
|
revision: '', |
||||
|
createdBy: '', |
||||
|
createdTime: '', |
||||
|
updatedBy: '', |
||||
|
updatedTime: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
tenantName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
tenantPhone: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
tenantIdentityNo: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
houseId: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
delFlag: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
revision: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
createdTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedBy: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
updatedTime: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/news/houserentinfo/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 表单提交 |
||||
|
dataFormSubmitHandle: debounce(function () { |
||||
|
this.$refs['dataForm'].validate((valid) => { |
||||
|
if (!valid) { |
||||
|
return false |
||||
|
} |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/news/houserentinfo/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, 1000, { 'leading': true, 'trailing': false }) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,75 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-news__houserentinfo}"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-form-item> |
||||
|
<el-input v-model.trim="dataForm.id" placeholder="id" clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button v-if="$hasPermission('news:houserentinfo:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button v-if="$hasPermission('news:houserentinfo:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
||||
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> |
||||
|
<el-table-column prop="id" label="主键" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="tenantName" label="承租人姓名" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="tenantPhone" label="承租人电话" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="tenantIdentityNo" label="承租人身份证号" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="houseId" label="房屋ID" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="delFlag" label="删除标识" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="revision" label="乐观锁" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="createdBy" label="创建人" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="createdTime" label="创建时间" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="updatedBy" label="更新人" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="updatedTime" label="更新时间" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button v-if="$hasPermission('news:houserentinfo:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
||||
|
<el-button v-if="$hasPermission('news:houserentinfo:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
<!-- 弹窗, 新增 / 修改 --> |
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
import AddOrUpdate from './houserentinfo-add-or-update' |
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/news/houserentinfo/page', |
||||
|
getDataListIsPage: true, |
||||
|
deleteURL: '/news/houserentinfo', |
||||
|
deleteIsBatch: true |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
AddOrUpdate |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,193 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'"> |
||||
|
<el-form-item label="与户主关系" prop="houseHeadRelation"> |
||||
|
<el-select v-model="dataForm.houseHeadRelation"> |
||||
|
<el-option v-for="item in houseHeadRelationList" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="姓名" prop="residentsName" > |
||||
|
<el-input v-model.trim="dataForm.residentsName" placeholder="姓名" maxlength="10" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="性别" prop="residentsSex"> |
||||
|
<el-radio-group v-model="dataForm.residentsSex"> |
||||
|
<el-radio label="0">女</el-radio> |
||||
|
<el-radio label="1">男</el-radio> |
||||
|
</el-radio-group> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="民族" prop="residentsNation"> |
||||
|
<el-input v-model.trim="dataForm.residentsNation" placeholder="民族" maxlength="10" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="工作单位/学校" prop="currentEmployer"> |
||||
|
<el-input v-model.trim="dataForm.currentEmployer" placeholder="工作单位/学校" maxlength="30" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="现居住地址" prop="currentAddress"> |
||||
|
<el-input v-model.trim="dataForm.currentAddress" placeholder="现居住地址" maxlength="30" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<template slot="footer"> |
||||
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
||||
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import debounce from 'lodash/debounce' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
houseId: '', |
||||
|
residentsName: '', |
||||
|
residentsSex: '', |
||||
|
residentsNation: '', |
||||
|
educationLevel: '', |
||||
|
politicsStatus: '', |
||||
|
residentsIdentityNo: '', |
||||
|
residentsPhone: '', |
||||
|
currentEmployer: '', |
||||
|
currentAddress: '', |
||||
|
houseHeadRelation: '', |
||||
|
isEditResidentInfo: '', |
||||
|
residentId: '' |
||||
|
}, |
||||
|
educationLevelList: [], |
||||
|
politicsStatusList: [], |
||||
|
houseHeadRelationList: [ |
||||
|
{ |
||||
|
label: '子女', |
||||
|
value: '0' |
||||
|
}, |
||||
|
{ |
||||
|
label: '夫妻', |
||||
|
value: '1' |
||||
|
}, |
||||
|
{ |
||||
|
label: '父母', |
||||
|
value: '2' |
||||
|
}, |
||||
|
{ |
||||
|
label: '其他', |
||||
|
value: '3' |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
props: ['houseId'], |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
residentsName: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
houseHeadRelation: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
residentsSex: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
residentsNation: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
currentEmployer: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
currentAddress: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
this.$http.get(`/sys/dict/listSimple/education_level`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.educationLevelList = res.data |
||||
|
}).catch(() => { }) |
||||
|
this.$http.get(`/sys/dict/listSimple/politics_status`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.politicsStatusList = res.data |
||||
|
}).catch(() => { }) |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/custom/houseresident/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 表单提交 |
||||
|
dataFormSubmitHandle: debounce(function () { |
||||
|
this.$refs['dataForm'].validate((valid) => { |
||||
|
if (!valid) { |
||||
|
return false |
||||
|
} |
||||
|
this.dataForm.houseId = this.houseId |
||||
|
this.dataForm.isEditResidentInfo = '0' |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/custom/houseresident/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
if (res.data !== '' && res.data !== undefined && res.data !== null) { |
||||
|
this.$confirm(res.data, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
this.dataForm.isEditResidentInfo = '1' |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/custom/houseresident/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}).catch(() => {}) |
||||
|
} else { |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, 1000, { 'leading': true, 'trailing': false }) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,251 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '120px'"> |
||||
|
<el-form-item label="房屋地址" prop="houseAddress"> |
||||
|
<el-input v-model.trim="dataForm.houseAddress" placeholder="房屋地址" maxlength="30" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="购房时间" prop="buyingTime"> |
||||
|
<el-input v-model.trim="dataForm.buyingTime" placeholder="购房时间" maxlength="10" show-word-limit></el-input> |
||||
|
例:1990/1990-01/1990-01-01 |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋面积(m²)" prop="houseArea" width="50px"> |
||||
|
<el-input-number v-model="dataForm.houseArea" placeholder="房屋面积" :min="0"></el-input-number> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人" prop="propertyOwner"> |
||||
|
<el-input v-model.trim="dataForm.propertyOwner" placeholder="产权人" maxlength="10" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人联系电话" prop="propertyOwnerMobile"> |
||||
|
<el-input v-model.trim="dataForm.propertyOwnerMobile" placeholder="联系电话" maxlength="20" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人身份证号" prop="propertyOwnerIdentityNo"> |
||||
|
<el-input v-model.trim="dataForm.propertyOwnerIdentityNo" placeholder="产权人身份证号" maxlength="18" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="所属网格"> |
||||
|
<el-cascader v-model="deptIdList" |
||||
|
:options="options" |
||||
|
:props="{ checkStrictly: true }" |
||||
|
clearable> |
||||
|
</el-cascader> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋用途" prop="houseUse"> |
||||
|
<el-select v-model="dataForm.houseUse" placeholder="房屋用途" clearable> |
||||
|
<el-option |
||||
|
v-for="item in houseUseFlag" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<div v-if="dataForm.houseUse === '1'"> |
||||
|
<el-form-item label="承租人姓名" prop="tenantName"> |
||||
|
<el-input v-model.trim="dataForm.tenantName" placeholder="承租人姓名" maxlength="10" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="承租人电话" prop="tenantPhone"> |
||||
|
<el-input v-model.trim="dataForm.tenantPhone" placeholder="承租人电话" maxlength="20" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="承租人身份证号" prop="tenantIdentityNo"> |
||||
|
<el-input v-model.trim="dataForm.tenantIdentityNo" placeholder="承租人身份证号" maxlength="18" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
<div v-if="dataForm.houseUse === '2'"> |
||||
|
<el-form-item label="企业名称" prop="enterpriseName"> |
||||
|
<el-input v-model.trim="dataForm.enterpriseName" placeholder="企业名称" maxlength="30" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="社会统一代码" prop="socialUniformCode"> |
||||
|
<el-input v-model.trim="dataForm.socialUniformCode" placeholder="社会统一代码" maxlength="30" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="法人代表" prop="legalRepresentative"> |
||||
|
<el-input v-model.trim="dataForm.legalRepresentative" placeholder="法人代表" maxlength="10" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="电话" prop="enterprisePhone"> |
||||
|
<el-input v-model.trim="dataForm.enterprisePhone" placeholder="电话" maxlength="20" show-word-limit></el-input> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
<template slot="footer"> |
||||
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
||||
|
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import debounce from 'lodash/debounce' |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
houseAddress: '', |
||||
|
buyingTime: '', |
||||
|
houseArea: '', |
||||
|
propertyOwner: '', |
||||
|
propertyOwnerIdentityNo: '', |
||||
|
propertyOwnerMobile: '', |
||||
|
houseUse: '', |
||||
|
gridId: '', |
||||
|
streetId: '', |
||||
|
communityId: '', |
||||
|
deptIdList: [], |
||||
|
tenantName: '', |
||||
|
tenantPhone: '', |
||||
|
tenantIdentityNo: '', |
||||
|
enterpriseName: '', |
||||
|
socialUniformCode: '', |
||||
|
legalRepresentative: '', |
||||
|
enterprisePhone: '' |
||||
|
}, |
||||
|
houseUseFlag: [ |
||||
|
{ |
||||
|
value: '0', |
||||
|
label: '自住' |
||||
|
}, |
||||
|
{ |
||||
|
value: '1', |
||||
|
label: '租赁' |
||||
|
}, |
||||
|
{ |
||||
|
value: '2', |
||||
|
label: '经营' |
||||
|
} |
||||
|
], |
||||
|
options: [], |
||||
|
deptIdList: [] |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
houseAddress: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
propertyOwner: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
propertyOwnerIdentityNo: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
propertyOwnerMobile: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
], |
||||
|
houseUse: [ |
||||
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' } |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
'deptIdList': function (val) { |
||||
|
if (val.length === 0) { |
||||
|
this.dataForm.streetId = '' |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 1) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 2) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 3) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = this.deptIdList[2] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created: function () { |
||||
|
this.$http |
||||
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.options = res.data.options |
||||
|
}) |
||||
|
.catch(() => { }) |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} else { |
||||
|
this.deptIdList = [] |
||||
|
this.dataForm.tenantName = '' |
||||
|
this.dataForm.tenantPhone = '' |
||||
|
this.dataForm.tenantIdentityNo = '' |
||||
|
this.dataForm.enterpriseName = '' |
||||
|
this.dataForm.socialUniformCode = '' |
||||
|
this.dataForm.legalRepresentative = '' |
||||
|
this.dataForm.enterprisePhone = '' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/custom/housinginformation/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
this.deptIdList = this.dataForm.deptIdList |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 表单提交 |
||||
|
dataFormSubmitHandle: debounce(function () { |
||||
|
this.$refs['dataForm'].validate((valid) => { |
||||
|
if (!valid) { |
||||
|
return false |
||||
|
} |
||||
|
if (this.dataForm.gridId === '' || this.dataForm.gridId === undefined) { |
||||
|
return this.$message.error('请选择所属网格') |
||||
|
} |
||||
|
if (this.dataForm.houseUse === '1') { |
||||
|
if (this.dataForm.tenantName === '' || this.dataForm.tenantName === undefined) { |
||||
|
return this.$message.error('承租人姓名不能为空') |
||||
|
} |
||||
|
if (this.dataForm.tenantPhone === '' || this.dataForm.tenantPhone === undefined) { |
||||
|
return this.$message.error('承租人电话不能为空') |
||||
|
} |
||||
|
if (this.dataForm.tenantIdentityNo === '' || this.dataForm.tenantIdentityNo === undefined) { |
||||
|
return this.$message.error('承租人身份证号不能为空') |
||||
|
} |
||||
|
} else if (this.dataForm.houseUse === '2') { |
||||
|
if (this.dataForm.legalRepresentative === '' || this.dataForm.legalRepresentative === undefined) { |
||||
|
return this.$message.error('法人代表不能为空') |
||||
|
} |
||||
|
if (this.dataForm.enterprisePhone === '' || this.dataForm.enterprisePhone === undefined) { |
||||
|
return this.$message.error('电话不能为空') |
||||
|
} |
||||
|
} |
||||
|
this.$http[!this.dataForm.id ? 'post' : 'put']('/custom/housinginformation/', this.dataForm).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.visible = false |
||||
|
this.$emit('refreshDataList') |
||||
|
} |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}) |
||||
|
}, 1000, { 'leading': true, 'trailing': false }) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,143 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" title="详情" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '140px'"> |
||||
|
<el-form-item label="房屋地址:" prop="houseAddress"> |
||||
|
<span>{{dataForm.houseAddress}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="购房时间:" prop="buyingTime"> |
||||
|
<span>{{dataForm.buyingTime==null?dataForm.buyingTime:dataForm.buyingTime.substr(0,10)}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋面积(m²):" prop="houseArea" width="50px"> |
||||
|
<span>{{dataForm.houseArea}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人:" prop="propertyOwner"> |
||||
|
<span>{{dataForm.propertyOwner}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人联系电话:" prop="propertyOwnerMobile"> |
||||
|
<span>{{dataForm.propertyOwnerMobile}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人身份证号:" prop="propertyOwnerIdentityNo"> |
||||
|
<span>{{dataForm.propertyOwnerIdentityNo}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="所属网格:"> |
||||
|
<span>{{dataForm.gridName}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋用途:" prop="houseUse"> |
||||
|
<span>{{houseUse}}</span> |
||||
|
</el-form-item> |
||||
|
<div v-if="dataForm.houseUse === '1'"> |
||||
|
<el-form-item label="承租人姓名:" prop="tenantName"> |
||||
|
<span>{{dataForm.tenantName}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="承租人电话:" prop="tenantPhone"> |
||||
|
<span>{{dataForm.tenantPhone}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="承租人身份证号:" prop="tenantIdentityNo"> |
||||
|
<span>{{dataForm.tenantIdentityNo}}</span> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
<div v-if="dataForm.houseUse === '2'"> |
||||
|
<el-form-item label="企业名称:" prop="enterpriseName"> |
||||
|
<span>{{dataForm.enterpriseName}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="社会统一代码:" prop="socialUniformCode"> |
||||
|
<span>{{dataForm.socialUniformCode}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="法人代表:" prop="legalRepresentative"> |
||||
|
<span>{{dataForm.legalRepresentative}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="电话:" prop="enterprisePhone"> |
||||
|
<span>{{dataForm.enterprisePhone}}</span> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
houseAddress: '', |
||||
|
buyingTime: '', |
||||
|
houseArea: '', |
||||
|
propertyOwner: '', |
||||
|
propertyOwnerIdentityNo: '', |
||||
|
propertyOwnerMobile: '', |
||||
|
houseUse: '', |
||||
|
delFlag: '', |
||||
|
revision: '', |
||||
|
createdBy: '', |
||||
|
createdTime: '', |
||||
|
updatedBy: '', |
||||
|
updatedTime: '', |
||||
|
gridId: '', |
||||
|
parentDeptIds: '', |
||||
|
parentDeptNames: '', |
||||
|
allDeptIds: '', |
||||
|
allDeptNames: '', |
||||
|
deptIdList: [], |
||||
|
propertyOwnerCard: '' |
||||
|
}, |
||||
|
houseUseFlag: [ |
||||
|
{ |
||||
|
value: '0', |
||||
|
label: '自住' |
||||
|
}, |
||||
|
{ |
||||
|
value: '1', |
||||
|
label: '租赁' |
||||
|
}, |
||||
|
{ |
||||
|
value: '2', |
||||
|
label: '经营' |
||||
|
} |
||||
|
], |
||||
|
options: [], |
||||
|
deptIdList: [], |
||||
|
houseUse: '' |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} else { |
||||
|
this.deptIdList = [] |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/custom/housinginformation/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
if (this.dataForm.houseUse === '0') { |
||||
|
this.houseUse = '自住' |
||||
|
} else if (this.dataForm.houseUse === '1') { |
||||
|
this.houseUse = '租赁' |
||||
|
} else if (this.dataForm.houseUse === '2') { |
||||
|
this.houseUse = '经营' |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,270 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-news__housinginformation}"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-form-item label="房屋地址"> |
||||
|
<el-input v-model.trim="dataForm.houseAddress" |
||||
|
placeholder="请输入地址" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人"> |
||||
|
<el-input v-model.trim="dataForm.propertyOwner" |
||||
|
placeholder="请输入产权人" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="联系电话"> |
||||
|
<el-input v-model.trim="dataForm.propertyOwnerMobile" |
||||
|
placeholder="请输入联系电话" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<br> |
||||
|
<el-form-item label="所属机构"> |
||||
|
<el-cascader v-model="deptIdList" |
||||
|
:options="options" |
||||
|
:props="{ checkStrictly: true }" |
||||
|
clearable> |
||||
|
</el-cascader> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="房屋用途" prop="houseUse"> |
||||
|
<el-select v-model="dataForm.houseUse" placeholder="房屋用途" clearable> |
||||
|
<el-option |
||||
|
v-for="item in houseUseFlag" |
||||
|
:key="item.value" |
||||
|
:label="item.label" |
||||
|
:value="item.value"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="info" |
||||
|
@click="exportMoudleHandle()">导出模板</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-upload class="upload-demo" |
||||
|
ref="upload" |
||||
|
:before-upload="handlePreview" |
||||
|
:action="uploadUrl" |
||||
|
:limit="1" |
||||
|
:on-success='uploadSuccess' |
||||
|
:on-error='errorExceed'> |
||||
|
<el-button type="primary">点击上传</el-button> |
||||
|
</el-upload> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" |
||||
|
@click="exportHandle()">{{ $t('export') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
||||
|
<el-table-column label="序号" width="70px" header-align="center" align="center"><template slot-scope="scope">{{scope.$index+1}}</template></el-table-column> |
||||
|
<el-table-column prop="houseUse" label="房屋用途" header-align="center" align="center" :formatter="houseUseFormatter"></el-table-column> |
||||
|
<el-table-column prop="houseAddress" label="房屋地址" header-align="center" align="center" width="200px"></el-table-column> |
||||
|
<el-table-column prop="gridName" label="所属网格" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="propertyOwner" label="产权人" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="propertyOwnerMobile" label="联系电话" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="propertyOwnerIdentityNo" label="身份证号" header-align="center" align="center" width="180px"></el-table-column> |
||||
|
<el-table-column label="房屋信息" fixed="right" header-align="center" align="center" width="90"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="text" size="small" @click="lookHouseInfo(scope.row.id)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="居住人信息" fixed="right" header-align="center" align="center" width="95"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="text" size="small" @click="lookResidentInfo(scope.row.id)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button> |
||||
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
<!-- 弹窗, 新增 / 修改 --> |
||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> |
||||
|
<housinginformation-detail v-if="detailVisible" ref="housinginformationDetail" @refreshDataList="getDataList"></housinginformation-detail> |
||||
|
<!-- 错误信息 --> |
||||
|
<el-dialog :visible.sync="faultDataVisible" |
||||
|
title="请修改后重新提交"> |
||||
|
<el-table :data="errorDataList" |
||||
|
border |
||||
|
style="width: 100%;"> |
||||
|
<el-table-column prop="sheetName" |
||||
|
label="所属Sheet" |
||||
|
header-align="center" |
||||
|
align="center"></el-table-column> |
||||
|
<el-table-column prop="errorLine" |
||||
|
label="行数" |
||||
|
header-align="center" |
||||
|
align="center"></el-table-column> |
||||
|
<el-table-column prop="errorInfo" |
||||
|
label="错误信息" |
||||
|
header-align="center" |
||||
|
align="center"></el-table-column> |
||||
|
</el-table> |
||||
|
<template slot="footer"> |
||||
|
<el-button type="primary" |
||||
|
@click="faultDataVisible = false">确定</el-button> |
||||
|
</template> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
import AddOrUpdate from './housinginformation-add-or-update' |
||||
|
import HousinginformationDetail from './housinginformation-detail' |
||||
|
import Cookies from 'js-cookie' |
||||
|
|
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/custom/housinginformation/page', |
||||
|
getDataListIsPage: true, |
||||
|
deleteURL: '/custom/housinginformation', |
||||
|
deleteIsBatch: true, |
||||
|
exportURL: '/custom/housinginformation/export', |
||||
|
exportMoudle: '/custom/housinginformation/exportModule' |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
gridId: '' |
||||
|
}, |
||||
|
deptIdList: [], |
||||
|
options: [], |
||||
|
houseUseFlag: [ |
||||
|
{ |
||||
|
value: '0', |
||||
|
label: '自住' |
||||
|
}, |
||||
|
{ |
||||
|
value: '1', |
||||
|
label: '租赁' |
||||
|
}, |
||||
|
{ |
||||
|
value: '2', |
||||
|
label: '经营' |
||||
|
} |
||||
|
], |
||||
|
detailVisible: false, |
||||
|
uploadUrl: '', |
||||
|
faultDataVisible: false, |
||||
|
errorDataList: [] |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
AddOrUpdate, |
||||
|
HousinginformationDetail |
||||
|
}, |
||||
|
watch: { |
||||
|
'deptIdList': function (val) { |
||||
|
if (val.length === 0) { |
||||
|
this.dataForm.streetId = '' |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 1) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 2) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 3) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = this.deptIdList[2] |
||||
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/custom/housinginformation/importExcel?gridId=${this.deptIdList[2]}&token=${Cookies.get('token')}` |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created: function () { |
||||
|
this.$http |
||||
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.options = res.data.options |
||||
|
}) |
||||
|
.catch(() => { }) |
||||
|
this.getDataList() |
||||
|
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/custom/housinginformation/importExcel?gridId=${this.dataForm.gridId}&token=${Cookies.get('token')}` |
||||
|
}, |
||||
|
methods: { |
||||
|
houseUseFormatter: function (row, column) { |
||||
|
if (row.houseUse === '0') { |
||||
|
return '自住' |
||||
|
} else if (row.houseUse === '1') { |
||||
|
return '租赁' |
||||
|
} else if (row.houseUse === '2') { |
||||
|
return '经营' |
||||
|
} |
||||
|
return '' |
||||
|
}, |
||||
|
lookHouseInfo (id) { |
||||
|
this.detailVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.housinginformationDetail.dataForm.id = id |
||||
|
this.$refs.housinginformationDetail.init() |
||||
|
}) |
||||
|
}, |
||||
|
lookResidentInfo (id) { |
||||
|
this.$parent.selectComponent = 'Househeadedit' |
||||
|
this.$router.push({ path: '/house-houseinfomationroute', query: { id: id } }) |
||||
|
}, |
||||
|
errorExceed (file, fileList) { |
||||
|
this.$message.error('上传失败请重试') |
||||
|
}, |
||||
|
uploadError (error, file, fileList) { |
||||
|
this.$message.error(error) |
||||
|
}, |
||||
|
handlePreview (file) { |
||||
|
if (this.dataForm.gridId === undefined || this.dataForm.gridId === '') { |
||||
|
this.$message.error('请选择网格后导入') |
||||
|
return false |
||||
|
} |
||||
|
}, |
||||
|
uploadSuccess (response, file, fileList) { |
||||
|
this.$refs.upload.clearFiles() |
||||
|
if (response.code !== 0) { |
||||
|
return this.$message.error(response.msg) |
||||
|
} |
||||
|
if (response.data !== null && response.data.length > 0) { |
||||
|
this.faultDataVisible = true |
||||
|
this.errorDataList = response.data |
||||
|
return |
||||
|
} |
||||
|
this.$message({ |
||||
|
message: this.$t('prompt.success'), |
||||
|
type: 'success', |
||||
|
duration: 500, |
||||
|
onClose: () => { |
||||
|
this.getDataList() |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,211 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" |
||||
|
class="aui-card--fill"> |
||||
|
<div class="mod-sys__user"> |
||||
|
<table> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<p class="item">居住类型统计</p> |
||||
|
<div id="houseUse" |
||||
|
:style="{width: '600px', height: '290px'}"></div> |
||||
|
</td> |
||||
|
<td> |
||||
|
<p class="item">数据量统计</p> |
||||
|
<div |
||||
|
style="width: 600px;height: 290px"> |
||||
|
<div class="houseInfo" style="width: 300px;height: 200px;margin-left: 50px;margin-top: 30px"> |
||||
|
<table style=" border-spacing:0px 10px"> |
||||
|
<tr> |
||||
|
<td><label>房屋数量</label></td> |
||||
|
<td><span>{{this.resultData.houseNum}}</span></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td><label>人口数量</label></td> |
||||
|
<td><span>{{this.resultData.populationNum}}</span></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td><label>机动车数量</label></td> |
||||
|
<td><span>{{this.resultData.motorVehicleNum}}</span></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td><label>党员数量</label></td> |
||||
|
<td><span>{{this.resultData.partyMemberNum}}</span></td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td><label>企业数量</label></td> |
||||
|
<td><span>{{this.resultData.business}}</span></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td> |
||||
|
<p class="item">人员就业情况</p> |
||||
|
<div id="employStatus" |
||||
|
:style="{width: '600px', height: '290px'}"></div> |
||||
|
</td> |
||||
|
<td></td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
<script> |
||||
|
|
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
resultData: { |
||||
|
sinceTheLiving: 0, |
||||
|
rent: 0, |
||||
|
business: 0, |
||||
|
employment: 0, |
||||
|
unemployment: 0, |
||||
|
houseNum: 0, |
||||
|
populationNum: 0, |
||||
|
motorVehicleNum: 0, |
||||
|
partyMemberNum: 0 |
||||
|
}, |
||||
|
houseUse: '', |
||||
|
employStatus: '' |
||||
|
} |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.houseUse = this.$echarts.init(document.getElementById('houseUse')) |
||||
|
this.houseUse.setOption({ |
||||
|
tooltip: { |
||||
|
trigger: 'item', |
||||
|
formatter: '{a} <br/>{b}: {c} ({d}%)' |
||||
|
}, |
||||
|
legend: { |
||||
|
orient: 'vertical', |
||||
|
left: 10, |
||||
|
data: ['自住', '租赁', '经营'] |
||||
|
}, |
||||
|
series: [ |
||||
|
{ |
||||
|
name: '访问来源', |
||||
|
type: 'pie', |
||||
|
radius: ['50%', '70%'], |
||||
|
avoidLabelOverlap: false, |
||||
|
label: { |
||||
|
show: false, |
||||
|
position: 'center' |
||||
|
}, |
||||
|
emphasis: { |
||||
|
label: { |
||||
|
show: true, |
||||
|
fontSize: '30', |
||||
|
fontWeight: 'bold' |
||||
|
} |
||||
|
}, |
||||
|
labelLine: { |
||||
|
show: false |
||||
|
}, |
||||
|
data: [ |
||||
|
{ value: this.resultData.sinceTheLiving, name: '自住' }, |
||||
|
{ value: this.resultData.rent, name: '租赁' }, |
||||
|
{ value: this.resultData.business, name: '经营' } |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
}) |
||||
|
this.employStatus = this.$echarts.init(document.getElementById('employStatus')) |
||||
|
this.employStatus.setOption({ |
||||
|
tooltip: { |
||||
|
trigger: 'item', |
||||
|
formatter: '{a} <br/>{b}: {c} ({d}%)' |
||||
|
}, |
||||
|
legend: { |
||||
|
orient: 'vertical', |
||||
|
left: 10, |
||||
|
data: ['失业', '在岗'] |
||||
|
}, |
||||
|
series: [ |
||||
|
{ |
||||
|
name: '访问来源', |
||||
|
type: 'pie', |
||||
|
radius: ['50%', '70%'], |
||||
|
avoidLabelOverlap: false, |
||||
|
label: { |
||||
|
show: false, |
||||
|
position: 'center' |
||||
|
}, |
||||
|
emphasis: { |
||||
|
label: { |
||||
|
show: true, |
||||
|
fontSize: '30', |
||||
|
fontWeight: 'bold' |
||||
|
} |
||||
|
}, |
||||
|
labelLine: { |
||||
|
show: false |
||||
|
}, |
||||
|
data: [ |
||||
|
{ value: this.resultData.unemployment, name: '失业' }, |
||||
|
{ value: this.resultData.employment, name: '在岗' } |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
}) |
||||
|
}, |
||||
|
created () { |
||||
|
this.getPopulationInfoOverview() |
||||
|
}, |
||||
|
methods: { |
||||
|
getPopulationInfoOverview () { |
||||
|
this.$http |
||||
|
.get(`custom/populationinformation/getPopulationInfoOverview`) |
||||
|
.then(({ data: res }) => { |
||||
|
this.resultData = res |
||||
|
this.houseUse.setOption({ |
||||
|
series: [ |
||||
|
{ |
||||
|
data: [ |
||||
|
{ value: res.sinceTheLiving, name: '自住' }, |
||||
|
{ value: res.rent, name: '租赁' }, |
||||
|
{ value: res.business, name: '经营' } |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
}) |
||||
|
this.employStatus.setOption({ |
||||
|
series: [ |
||||
|
{ |
||||
|
data: [ |
||||
|
{ value: this.resultData.unemployment, name: '失业' }, |
||||
|
{ value: this.resultData.employment, name: '在岗' } |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
}) |
||||
|
}) |
||||
|
.catch(() => { }) |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
.item{ |
||||
|
font-size: 20px; |
||||
|
width: 200px; |
||||
|
font-weight: bold; |
||||
|
color: #0aa0bf; |
||||
|
} |
||||
|
.houseInfo span{ |
||||
|
font-size: 20px; |
||||
|
width: 200px; |
||||
|
margin-left: 50px; |
||||
|
} |
||||
|
.houseInfo label{ |
||||
|
font-size: 20px; |
||||
|
width: 200px; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,89 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-news__populationinformation}"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-form-item label="机动车类型"> |
||||
|
<el-select v-model="dataForm.motorVehicleCategory" clearable> |
||||
|
<el-option v-for="item in motorVehicleCategoryList" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictName" |
||||
|
:value="item.dictValue"> |
||||
|
|
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="车主姓名"> |
||||
|
<el-input v-model.trim="dataForm.residentsName" |
||||
|
placeholder="请输入车主姓名" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" |
||||
|
@click="exportHandle()">{{ $t('export') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
||||
|
<el-table-column label="序号" width="70px" header-align="center" align="center"><template slot-scope="scope">{{scope.$index+1}}</template></el-table-column> |
||||
|
<el-table-column prop="motorVehicleCategory" label="机动车类型" header-align="center" align="center" width="200px" :formatter="setMotorVehicleCategory"></el-table-column> |
||||
|
<el-table-column prop="residentsName" label="车主姓名" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="residentsPhone" label="联系电话" header-align="center" align="center"></el-table-column> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/custom/populationinformation/motorVehicle/page', |
||||
|
getDataListIsPage: true, |
||||
|
exportURL: '/custom/populationinformation/motorVehicle/export' |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '' |
||||
|
}, |
||||
|
motorVehicleCategoryList: [] |
||||
|
} |
||||
|
}, |
||||
|
created: function () { |
||||
|
this.$http.get(`/sys/dict/listSimple/motor_vehicle_category`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.motorVehicleCategoryList = res.data |
||||
|
}).catch(() => { }) |
||||
|
}, |
||||
|
methods: { |
||||
|
setMotorVehicleCategory (row, column) { |
||||
|
if (row.motorVehicleCategory) { |
||||
|
let returnName = '' |
||||
|
let motorVehicleCategoryArray = row.motorVehicleCategory.split(',') |
||||
|
for (let i = 0; i < motorVehicleCategoryArray.length; i++) { |
||||
|
let dict = this.motorVehicleCategoryList.filter(item => item.dictValue === motorVehicleCategoryArray[i])[0] |
||||
|
if (dict) { |
||||
|
returnName += ',' + dict.dictName |
||||
|
} |
||||
|
} |
||||
|
return returnName.substr(1) |
||||
|
} |
||||
|
return '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,102 @@ |
|||||
|
<template> |
||||
|
<el-dialog :visible.sync="visible" title="详情" :close-on-click-modal="false" :close-on-press-escape="false"> |
||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '140px'"> |
||||
|
<el-form-item class="item" label="户主信息"> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="户主姓名:" prop="residentsName"> |
||||
|
<span>{{dataForm.residentsName}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="户主性别:" prop="houseArea" width="50px"> |
||||
|
<span>{{dataForm.residentsSex === '1' ? '男' : '女'}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="户主联系电话:" prop="residentsPhone"> |
||||
|
<span>{{dataForm.residentsPhone}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="户主身份证号:" prop="residentsIdentityNo"> |
||||
|
<span>{{dataForm.residentsIdentityNo}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="户主民族:" prop="residentsNation"> |
||||
|
<span>{{dataForm.residentsNation}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="户籍地:" prop="householdRegistrationPlace"> |
||||
|
<span>{{dataForm.householdRegistrationPlace}}</span> |
||||
|
</el-form-item> |
||||
|
<hr> |
||||
|
<el-form-item class="item" label="房屋信息"> |
||||
|
</el-form-item> |
||||
|
<div :key="house.houseAddress" v-for="house in dataForm.housingInformationList"> |
||||
|
<el-form-item label="房屋地址:" prop="houseAddress"> |
||||
|
<span>{{house.houseAddress}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人:" prop="propertyOwner"> |
||||
|
<span>{{house.propertyOwner}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="产权人身份证号:" prop="propertyOwnerIdentityNo"> |
||||
|
<span>{{house.propertyOwnerIdentityNo}}</span> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="所属网格:" prop="gridName"> |
||||
|
<span>{{house.gridName}}</span> |
||||
|
</el-form-item> |
||||
|
</div> |
||||
|
</el-form> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
data () { |
||||
|
return { |
||||
|
visible: false, |
||||
|
dataForm: { |
||||
|
id: '', |
||||
|
householdRegistrationPlace: '', |
||||
|
residentsNation: '', |
||||
|
residentsIdentityNo: '', |
||||
|
residentsPhone: '', |
||||
|
residentsSex: '', |
||||
|
residentsName: '', |
||||
|
gridNames: '', |
||||
|
housingInformationList: [] |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
dataRule () { |
||||
|
return { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init () { |
||||
|
this.visible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['dataForm'].resetFields() |
||||
|
if (this.dataForm.id) { |
||||
|
this.getInfo() |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 获取信息 |
||||
|
getInfo () { |
||||
|
this.$http.get(`/custom/populationinformation/${this.dataForm.id}`).then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.dataForm = { |
||||
|
...this.dataForm, |
||||
|
...res.data |
||||
|
} |
||||
|
}).catch(() => {}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style> |
||||
|
.item .el-form-item__label{ |
||||
|
font-size: 20px; |
||||
|
width: 50px; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,220 @@ |
|||||
|
<template> |
||||
|
<el-card shadow="never" class="aui-card--fill"> |
||||
|
<div class="mod-news__populationinformation}"> |
||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> |
||||
|
<el-form-item label="辖区范围"> |
||||
|
<el-cascader v-model="deptIdList" |
||||
|
:options="options" |
||||
|
:props="{ checkStrictly: true }" |
||||
|
clearable> |
||||
|
</el-cascader> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="姓名"> |
||||
|
<el-input v-model.trim="dataForm.residentsName" |
||||
|
placeholder="请输入姓名" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="联系电话"> |
||||
|
<el-input v-model.trim="dataForm.residentsPhone" |
||||
|
placeholder="请输入联系电话" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证号"> |
||||
|
<el-input v-model.trim="dataForm.residentsIdentityNo" |
||||
|
placeholder="请输入身份证号" |
||||
|
clearable></el-input> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="特殊人群" |
||||
|
prop="specialCrowd"> |
||||
|
<el-select v-model="dataForm.specialCrowd" clearable |
||||
|
placeholder="请选择"> |
||||
|
<el-option v-for="item in specialCrowdOptions" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictName" |
||||
|
:value="item.dictValue"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="疫苗接种状态" label-width="100px" |
||||
|
prop="isInoculate"> |
||||
|
<el-select v-model="dataForm.isInoculate" clearable |
||||
|
placeholder="请选择"> |
||||
|
<el-option v-for="item in inoculateStateArr" |
||||
|
:key="item.dictValue" |
||||
|
:label="item.dictName" |
||||
|
:value="item.dictValue"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
<el-tooltip class="item" effect="light" placement="top-end"> |
||||
|
<div slot="content"> |
||||
|
未接种:从未接种过疫苗<br/> |
||||
|
接种中:接种过疫苗,但没有完成全程接种<br/> |
||||
|
接种完成:已经完成全程接种<br/> |
||||
|
接种过:有过接种疫苗记录,包括接种中和接种完成记录<br/> |
||||
|
第一针:没有完成全程接种,只接种过第一针<br/> |
||||
|
第二针:没有完成全程接种,接种过第一针和第二针<br/> |
||||
|
</div> |
||||
|
<i class="el-icon-question" /> |
||||
|
</el-tooltip> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="核酸检测状态" prop="checkState"> |
||||
|
<el-select v-model="dataForm.checkState" clearable placeholder="核酸检测状态"> |
||||
|
<el-option v-for="item in checkStateList" :key="item.dictValue" :label="item.dictName" :value="item.dictValue"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
||||
|
<el-table-column label="序号" width="70px" header-align="center" align="center"><template slot-scope="scope">{{scope.$index+1}}</template></el-table-column> |
||||
|
<!-- <el-table-column prop="gridNames" label="辖区范围" header-align="center" align="center" width="200px"></el-table-column> --> |
||||
|
<el-table-column prop="residentsName" label="姓名" header-align="center" align="center" width="120px"></el-table-column> |
||||
|
<el-table-column prop="residentsSex" label="性别" header-align="center" align="center" :formatter="sexFormat" width="65px"></el-table-column> |
||||
|
<el-table-column prop="residentsPhone" label="联系电话" header-align="center" align="center" width="120px"></el-table-column> |
||||
|
<el-table-column prop="residentsIdentityNo" label="身份证号码" header-align="center" align="center" width="200px"></el-table-column> |
||||
|
<el-table-column prop="residentsNation" label="民族" header-align="center" align="center" width="65px"></el-table-column> |
||||
|
<el-table-column prop="householdRegistrationPlace" label="户籍地" header-align="center" align="center"></el-table-column> |
||||
|
<el-table-column prop="vaccinationState" label="疫苗接种状态" header-align="center" align="center" width="120px"> |
||||
|
<template slot-scope="scope"> |
||||
|
<!-- <el-tag size="small" :type="scope.row.vaccinationState === 0 ? 'danger' : 'success'"> |
||||
|
{{scope.row.vaccinationState === 2 ? '接种完成' : scope.row.vaccinationState === 0 ? '未接种' : '第'+scope.row.vaccinationNum+'针'}} |
||||
|
</el-tag> --> |
||||
|
<el-tag v-if='scope.row.vaccinationState === 0' size="small" type="danger">未接种</el-tag> |
||||
|
<el-tag v-else-if='scope.row.vaccinationState === 1' size="small" type="yellow">第 {{scope.row.vaccinationNum}} 针</el-tag> |
||||
|
<el-tag v-else-if='scope.row.vaccinationState === 2' size="small" type="success">接种完成</el-tag> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="checkState" label="核酸检测状态" header-align="center" align="center" width="120px"> |
||||
|
<template slot-scope="scope"> |
||||
|
<!-- <el-tag size="small" :type="scope.row.vaccinationState === 0 ? 'danger' : 'success'"> |
||||
|
{{scope.row.vaccinationState === 2 ? '接种完成' : scope.row.vaccinationState === 0 ? '未接种' : '第'+scope.row.vaccinationNum+'针'}} |
||||
|
</el-tag> --> |
||||
|
<el-tag v-if="scope.row.checkState === '0'" size="small" type="success">已检测</el-tag> |
||||
|
<el-tag v-else-if="scope.row.checkState === '1'" size="small" type="yellow">未检测</el-tag> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="checkDate" label="核酸检测时间" header-align="center" align="center" width="120px"></el-table-column> |
||||
|
<!-- <el-table-column label="更多信息" fixed="right" header-align="center" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="text" size="small" @click="lookResidentInfo(scope.row.id)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> --> |
||||
|
</el-table> |
||||
|
<el-pagination |
||||
|
:current-page="page" |
||||
|
:page-sizes="[10, 20, 50, 100]" |
||||
|
:page-size="limit" |
||||
|
:total="total" |
||||
|
layout="total, sizes, prev, pager, next, jumper" |
||||
|
@size-change="pageSizeChangeHandle" |
||||
|
@current-change="pageCurrentChangeHandle"> |
||||
|
</el-pagination> |
||||
|
<!-- 弹窗, 新增 / 修改 --> |
||||
|
<populationinformation-detail v-if="detailVisible" ref="populationinformationDetail" @refreshDataList="getDataList"></populationinformation-detail> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import mixinViewModule from '@/mixins/view-module' |
||||
|
import PopulationinformationDetail from './populationinformation-detail' |
||||
|
|
||||
|
export default { |
||||
|
mixins: [mixinViewModule], |
||||
|
data () { |
||||
|
return { |
||||
|
mixinViewModuleOptions: { |
||||
|
getDataListURL: '/custom/populationinformation/pageV2', |
||||
|
getDataListIsPage: true, |
||||
|
deleteURL: '/custom/populationinformation', |
||||
|
deleteIsBatch: true |
||||
|
}, |
||||
|
dataForm: { |
||||
|
id: '' |
||||
|
}, |
||||
|
deptIdList: [], |
||||
|
options: [], |
||||
|
detailVisible: false, |
||||
|
checkStateList: [ |
||||
|
{dictValue: '0', dictName: '已检测'}, |
||||
|
{dictValue: '1', dictName: '未检测'}, |
||||
|
], |
||||
|
inoculateStateArr: [ |
||||
|
{ dictValue: '0', dictName: '未接种' }, |
||||
|
{ dictValue: '10', dictName: '接种中' }, |
||||
|
{ dictValue: '11', dictName: '接种完成' }, |
||||
|
{ dictValue: '12', dictName: '接种过' }, |
||||
|
{ dictValue: '1', dictName: '第一针' }, |
||||
|
{ dictValue: '2', dictName: '第二针' } |
||||
|
], |
||||
|
specialCrowdOptions: [ |
||||
|
{ dictValue: '刑满释放', dictName: '刑满释放' }, |
||||
|
{ dictValue: '社区矫正', dictName: '社区矫正' }, |
||||
|
{ dictValue: '精神病人', dictName: '精神病人' }, |
||||
|
{ dictValue: '吸毒人员', dictName: '吸毒人员' }, |
||||
|
{ dictValue: '艾滋病人', dictName: '艾滋病人' }, |
||||
|
{ dictValue: '上访老户', dictName: '上访老户' }, |
||||
|
{ dictValue: '涉恐人员', dictName: '涉恐人员' }, |
||||
|
{ dictValue: '涉稳人员', dictName: '涉稳人员' }, |
||||
|
{ dictValue: '涉师人员', dictName: '涉师人员' }, |
||||
|
{ dictValue: '邪教人员', dictName: '邪教人员' }, |
||||
|
{ dictValue: '涉军人员', dictName: '涉军人员' }, |
||||
|
{ dictValue: '重点青少年', dictName: '重点青少年' }, |
||||
|
{ dictValue: '其他', dictName: '其他' } |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
components: { |
||||
|
PopulationinformationDetail |
||||
|
}, |
||||
|
created: function () { |
||||
|
this.$http |
||||
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
||||
|
.then(({ data: res }) => { |
||||
|
if (res.code !== 0) { |
||||
|
return this.$message.error(res.msg) |
||||
|
} |
||||
|
this.options = res.data.options |
||||
|
}) |
||||
|
.catch(() => { }) |
||||
|
}, |
||||
|
methods: { |
||||
|
sexFormat (row, column) { |
||||
|
return row.residentsSex === '0' ? '女' : '男' |
||||
|
}, |
||||
|
lookResidentInfo (id) { |
||||
|
this.detailVisible = true |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.populationinformationDetail.dataForm.id = id |
||||
|
this.$refs.populationinformationDetail.init() |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
'deptIdList': function (val) { |
||||
|
if (val.length === 0) { |
||||
|
this.dataForm.streetId = '' |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 1) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = '' |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 2) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = '' |
||||
|
} |
||||
|
if (val.length === 3) { |
||||
|
this.dataForm.streetId = this.deptIdList[0] |
||||
|
this.dataForm.communityId = this.deptIdList[1] |
||||
|
this.dataForm.gridId = this.deptIdList[2] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
Loading…
Reference in new issue