Browse Source

搜索重置,网格修改

feature
马魁 3 years ago
parent
commit
0deaf7d0dd
  1. 362
      src/views/components/resiInfo.vue
  2. 6
      src/views/components/resiSearch.vue
  3. 13
      src/views/modules/base/resi.vue

362
src/views/components/resiInfo.vue

@ -1,165 +1,88 @@
<template> <template>
<div <div
class="g-main "> class="g-main ">
<el-form <div class=" title-small title_postion" >基础信息 </div>
class="resi-form m-search" <el-form class="resi-form m-search"
:model="form"
ref="formId"
> >
<el-form-item prop="gridId" :rules="rulesForm.gridId" <el-form-item prop="gridId" class="f-w50" label="所属组织" label-width="100px" >
label="所属组织" label-width="100px" > <div >
<el-select v-model.trim="form.gridId" {{resiDetailList.houseInfo.gridName!=null?resiDetailList.houseInfo.gridName:'--'}}
placeholder="请选择网格" </div>
size="small"
clearable
class="u-item-width-normal"
@change="handleChangeGrid">
<el-option v-for="item in optionsG"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属房屋" <el-form-item label="所属房屋" class="f-w50"
label-width="100px"> label-width="100px">
<div class="f-flex"> <div class="f-flex">
<el-form-item prop="villageId" class="u-item-width-communitycascader f-bto0" :rules="rulesForm.villageId" > {{resiDetailList.houseInfo.homeName?resiDetailList.houseInfo.homeName:'--'}}
<el-select v-model.trim="form.villageId" </div>
placeholder="请选择小区"
size="small"
class="u-item-width-communitycascader f-bto0"
clearable
@change="handleChangeV">
<el-option v-for="item in optionsV"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="buildId" :rules="rulesForm.buildId">
<el-select v-model.trim="form.buildId"
placeholder="楼号"
size="small"
clearable
class="u-item-width-buildcascader f-bto0"
@change="handleChangeB">
<el-option v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="unitId" :rules="rulesForm.unitId">
<el-select v-model.trim="form.unitId"
placeholder="单元"
size="small"
clearable
class="u-item-width-buildcascader f-bto0"
@change="handleChangeD">
<el-option v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="homeId" :rules="rulesForm.homeId">
<el-select v-model.trim="form.homeId"
placeholder="房号"
size="small"
clearable
class="u-item-width-buildcascader f-bto0"
@change="handleChangeH">
<el-option v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item v-for="(item,index) in basicInformation" :label-width="item.itemType!= 'title'?'100px':'24px'" :class="item.itemType != 'checkbox'?'f-w50':''" :label="item.label" :key="index" >
</div>
</el-form-item>
<el-form-item v-for="(item,index) in basicInformation" :label-width="'100px'" :label="item.label" :key="index" :class="item.itemType=='textarea'?'textareaDidth':''" :rules="item.rules" :prop="item.formName" >
<template v-if="item.itemType == 'radio'" > <template v-if="item.itemType == 'radio'" >
<section class="u-item-width-normal"> <section v-if="item.formName == 'localResidenceFlag'">
<el-radio v-for="ns in item.opction" {{resiDetailList.localResidenceFlag?resiDetailList.localResidenceFlag == 1?'是':'否':'--'}}
:key="ns.value" </section>
size="small" <section v-if="item.formName == 'gender'">
v-model.trim="form[item.formName]" {{resiDetailList.genderName?resiDetailList.genderName:'--'}}
:label="ns.value"
>
{{ ns.label }}
</el-radio>
</section> </section>
</template> </template>
<template v-if="item.itemType == 'input'" > <template v-if="item.itemType == 'input'" >
<el-input <section v-if="item.formName == 'name'">
clearable {{resiDetailList.name?resiDetailList.name:'--'}}
</section>
<section v-if="item.formName == 'mobile'">
{{resiDetailList.showMobile?resiDetailList.showMobile:resiDetailList.mobile?`${resiDetailList.mobile.substr(0,3)}`+ "****" +`${resiDetailList.mobile.substr(7,5)}`:'--'}}
<el-button v-if="resiDetailList.mobile"
style="margin-left: 10px"
type="text"
class="div-table-button--blue"
icon="el-icon-view"
size="small" size="small"
:placeholder="`请输入${item.label}`" @click="handleTuomin('mobile')">显示</el-button>
v-model.trim="form[item.formName]" </section>
class="u-item-width-normal" @blur="handleValidBlur(item)" <section v-if="item.formName == 'idNum'">
> {{resiDetailList.showIdNum?resiDetailList.showIdNum:resiDetailList.idNum?`${resiDetailList.idNum.substr(0, 11)}` +"******" +`${resiDetailList.idNum.substr(16, 2)}`:'--'}}
</el-input> <el-button v-if="resiDetailList.idNum"
style="margin-left: 10px"
type="text"
class="div-table-button--blue"
icon="el-icon-view"
size="small"
@click="handleTuomin('idCard')">显示</el-button>
</section>
<section v-if="item.formName == 'remark'">
{{resiDetailList.remark?resiDetailList.remark:'--'}}
</section>
</template> </template>
<template v-else-if="item.itemType == 'select'"> <template v-else-if="item.itemType == 'select'">
<el-select <section v-if="item.formName == 'nation'">
v-model="form[item.formName]" {{resiDetailList.nationName?resiDetailList.nationName:'--'}}
:placeholder="`请选择${item.label}`" </section>
size="small"
clearable
class="u-item-width-normal">
<el-option v-for="items in item.opction "
:key="items.value"
:label="items.label"
:value="items.value">
</el-option>
</el-select>
</template> </template>
<template v-else-if="item.itemType == 'textarea'">
<el-input
type="textarea"
placeholder="请输入内容"
class="item-width-textarea"
maxlength="120"
show-word-limit
resize="none"
rows="3"
v-model.trim="form[item.formName]"
> <!-- <template v-else-if="item.itemType == 'title'" >
</el-input> <div class="f-font14 title-small f-m0" style="position: relative;left: -10px;">分类信息 </div>
</template> -->
<template v-else-if="item.itemType == 'datepicker'" :label="item.label">
{{resiDetailList.birthday}}
</template> </template>
<template v-else-if="item.itemType == 'checkbox'" :label="item.label"> <template v-else-if="item.itemType == 'checkbox'" :label="item.label">
<el-checkbox v-for="(items,indexs) in item.opction" style="width:70px" :key="indexs" :label="items.label" :true-label="'1'" :false-label="'0'" <!-- 222 -->
size="small"
v-model="form[items.formName]"
@change="val => handleChangeCheckbox(val,items)"
>
</el-checkbox>
</template>
<template v-else-if="item.itemType == 'datepicker'" :label="item.label">
<el-date-picker
v-model.trim="form.birthday"
class="u-item-width-normal"
type="date"
size="small"
clearable
placeholder="选择日期"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd">
</el-date-picker>
</template> </template>
</el-form-item> </el-form-item>
<!-- <el-row>分类信息 </el-row> -->
<!-- <template :label="item.label">
<section >
<div v-for="items in item.opction" style="width:90px;display: inline-block;" v-show="resiDetailList.categoryInfo?resiDetailList.categoryInfo[items.formName]!=0:'' ||resiDetailList.categoryInfo?resiDetailList.categoryInfo[items.formName]!=null:''">
<span >{{items.label}}</span>
</div>
</section>
</template> -->
<!-- 这里开始就是底部的input了-------------------------------------------------------------------> <!-- 这里开始就是底部的input了------------------------------------------------------------------->
<!-- <div class="title-small title_postion">其他信息 </div> -->
<el-tabs v-model="activeName" <el-tabs v-model="activeName"
@tab-click="handleClick"> @tab-click="handleClick">
<el-tab-pane v-for="item in tabsList" <el-tab-pane v-for="item in tabsList"
@ -183,34 +106,14 @@
</section> </section>
</template> </template>
<template v-else-if="itemk.itemType=='select1'" > <template v-else-if="itemk.itemType=='select1'" >
<el-select <div v-if="item.groupId=='eduInfoDto'">
v-model="form[itemj.id][itemk.formName]" <div >
:placeholder="`请选择${itemk.label}`" {{ eduInfoDtoList == []?eduInfoDtoList.cultureLevel:'--'}}
size="small" </div>
:multiple="itemk.formName=='specialCategoryCode'" </div>
:collapse-tags="itemk.formName=='specialCategoryCode'"
clearable
class="u-item-width-normal">
<el-option v-for="items in itemk.opction"
:key="items.value"
:label="items.label"
:value="items.value">
</el-option>
</el-select>
</template> </template>
<template v-else-if="itemk.itemType=='textarea1'" > <template v-else-if="itemk.itemType=='textarea1'" >
<el-input {{eduInfoDtoList == []?eduInfoDtoList.eduRemark:'--'}}
type="textarea"
:placeholder="`请输入${itemk.label}`"
class="item-width-textarea"
maxlength="120"
show-word-limit
resize="none"
rows="3"
v-model.trim="form[itemj.id][itemk.formName]"
>
</el-input>
</template> </template>
<template v-else-if="itemk.itemType=='input1'" > <template v-else-if="itemk.itemType=='input1'" >
<el-input <el-input
@ -267,20 +170,21 @@
<script> <script>
import { isCard, isPassport, isMobile, isPhone } from '@/utils/validate' import { isCard, isPassport, isMobile, isPhone } from '@/utils/validate'
import { computedCard } from '@/utils/index' import { computedCard } from '@/utils/index'
import { requestPost, requestGet } from '@/js/dai/request'
export default { export default {
name: 'resiForm', name: 'resiForm',
props: { props: {
formId: { resiId: {
type: String, type: String,
default: 'resiForm'
}, },
}, },
data () { data () {
return { return {
optionsV: [], optionsV: [],
optionsB: [], optionsB: [],
optionsH: [], optionsH: [],
resiDetailList:{},
optionsD: [], optionsD: [],
optionsG: [], optionsG: [],
activeName: 'groupeduInfoDto', activeName: 'groupeduInfoDto',
@ -350,13 +254,13 @@ export default {
formName:'birthday' formName:'birthday'
},{ },{
label:'备注', label:'备注',
itemType:"textarea", itemType:"input",
formName:'remark' formName:'remark'
},{ },{
label:'居民分类', label:'居民分类',
itemType:"checkbox", itemType:"checkbox",
opction:[{label:'党员',value:'0', formName:"partyFlag",},{label:'低保人员',value:'0', formName:"subsistenceAllowanceFlag",},{label:'保障房人员',value:'0', formName:"ensureHouseFlag",},{label:'失业人员',value:'0', formName:"unemployedFlag",},{label:'育龄妇女',value:'0', formName:"fertileWomanFlag",},{label:'退役军人',value:'0', formName:"veteranFlag",},{label:'统战人员',value:'0', formName:"unitedFrontFlag",},{label:'信访人员',value:'0', formName:"petitionOfficerFlag",},{label:'志愿者',value:'0', formName:"volunteerFlag",},{label:'失独人员',value:'0', formName:"bereavedPersonFlag",},{label:'租户',value:'0', formName:"tenantFlag",},{label:'流动人口',value:'0', formName:"floatingFlag",},{label:'特殊人群',value:'0', formName:"specialCrowdFlag",},{label:'老年人',value:'0', formName:"oldPeopleFlag",},{label:'空巢老人',value:'0', formName:"emptyNesterFlag",},{label:'独居老人',value:'0', formName:"liveAloneFlag",},{label:'失能老人',value:'0', formName:"disabledFlag",},{label:'失智老人',value:'0', formName:"dementedFlag",},{label:'残疾',value:'0', formName:"disabilityFlag",},{label:'大病',value:'0', formName:"seriousIllnessFlag",},{label:'慢病',value:'0', formName:"chronicDiseaseFlag",}] opction:[{label:'党员',value:'0', formName:"partyFlag",},{label:'低保人员',value:'0', formName:"subsistenceAllowanceFlag",},{label:'保障房人员',value:'0', formName:"ensureHouseFlag",},{label:'失业人员',value:'0', formName:"unemployedFlag",},{label:'育龄妇女',value:'0', formName:"fertileWomanFlag",},{label:'退役军人',value:'0', formName:"veteranFlag",},{label:'统战人员',value:'0', formName:"unitedFrontFlag",},{label:'信访人员',value:'0', formName:"petitionOfficerFlag",},{label:'志愿者',value:'0', formName:"volunteerFlag",},{label:'失独人员',value:'0', formName:"bereavedPersonFlag",},{label:'租户',value:'0', formName:"tenantFlag",},{label:'流动人口',value:'0', formName:"floatingFlag",},{label:'特殊人群',value:'0', formName:"specialCrowdFlag",},{label:'老年人',value:'0', formName:"oldPeopleFlag",},{label:'空巢老人',value:'0', formName:"emptyNesterFlag",},{label:'独居老人',value:'0', formName:"liveAloneFlag",},{label:'失能老人',value:'0', formName:"disabledFlag",},{label:'失智老人',value:'0', formName:"dementedFlag",},{label:'残疾',value:'0', formName:"disabilityFlag",},{label:'大病',value:'0', formName:"seriousIllnessFlag",},{label:'慢病',value:'0', formName:"chronicDiseaseFlag",}]
} },
], ],
// input // input
footerInputList:[ footerInputList:[
@ -962,11 +866,9 @@ export default {
} }
], ],
form:{ form:{
agencyName:this.$store.state.user.agencyName, agencyName:this.$store.state.user.agencyName,
agencyId:this.$store.state.user.agencyId, agencyId:this.$store.state.user.agencyId,
gridName:'',
gridId:'', //id gridId:'', //id
villageId: '', //id villageId: '', //id
buildId: '', //id buildId: '', //id
@ -1129,11 +1031,21 @@ export default {
}, },
// tabs // tabs
tabsList:[ tabsList:[
{groupId:'eduInfoDto',label:'教育'},{groupId:'hobbyInfoDto',label:'兴趣爱好'},{groupId:'religionDto',label:'宗教信仰'},{groupId:'healthDto',label:'健康'},{groupId:'workInfoDto',label:'工作'},{groupId:'economyDto',label:'经济情况'},{groupId:'resideInfoDto',label:'居住'},{groupId:'familyInfoDto',label:'家庭'}, {groupId:'eduInfoDto',label:'教育信息'},{groupId:'hobbyInfoDto',label:'兴趣爱好'},{groupId:'religionDto',label:'宗教信仰'},{groupId:'healthDto',label:'健康'},{groupId:'workInfoDto',label:'工作'},{groupId:'economyDto',label:'经济情况'},{groupId:'resideInfoDto',label:'居住'},{groupId:'familyInfoDto',label:'家庭'},{groupId:'parymemberInfoDto',label:'党员信息'},{label:'保障房信息',groupId:'ensureHouseDto'},{label:'失业',id:'2',groupId:'unemployedDto'},{label:'退役军人',id:'3',groupId:'veteranDto'},{label:'统战',id:'4',groupId:'unitedFrontDto'},{label:'志愿者信息',id:'5',groupId:'volunteerDto'},{label:'老年人',id:'6',groupId:'oldPeopleDto'},{label:'特殊人群',id:'7',groupId:'specialDto'},{label:'出生人员',id:'7',groupId:'BirthRecord'},{label:'死亡人员',id:'7',groupId:'dentDeathRecord'},{label:'迁出信息',id:'7',groupId:'dentMoveOutRecord'}
] ],
eduInfoDtoList:[]
} }
}, },
computed: { computed: {
// filterList(item){
// let arr = []
// if(this.resiDetailList.categoryInfo){
// for (const key in item) {
// console.log(key);
// }
// }
// return arr
// }
}, },
watch: { watch: {
form:{ form:{
@ -1146,8 +1058,7 @@ export default {
}, },
created () { created () {
this.getGridList() this.getGridList()
this.getResiDetail()
this.getAllNation()
}, },
methods: { methods: {
@ -1184,6 +1095,35 @@ export default {
this.getPartyNation() this.getPartyNation()
this.getResidentNation() this.getResidentNation()
this.getHousing() this.getHousing()
},
async handleTuomin (type) {
const url = "/data/aggregator/epmetuser/detailByType";
const { data, code, msg } = await requestPost(url, {
id: this.resiId,
type: "checkIcResiUser",
});
if (code === 0) {
if (type === 'mobile') {
this.$set(this.resiDetailList, 'showMobile', data.mobile)
}
if (type === 'idCard') {
this.$set(this.resiDetailList, 'showIdNum', data.idCard)
}
} else {
this.$message.error(msg);
}
},
getResiDetail(){
this.$http.post(`/actual/base/residentBaseInfo/detail/${this.resiId}`).then(res=>{
this.resiDetailList = res.data.data
}).catch(err =>{
console.log(err);
})
}, },
getGridList () { getGridList () {
const { user } = this.$store.state const { user } = this.$store.state
@ -1232,7 +1172,6 @@ export default {
} catch (error) { } catch (error) {
console.log(error,'获取残疾字典'); console.log(error,'获取残疾字典');
} }
}, },
async getdisabilityNationClass(){ async getdisabilityNationClass(){
try { try {
@ -1451,24 +1390,7 @@ export default {
} }
}, },
handleChangeGrid (val) {
console.log('val', val)
for(let n of this.optionsG){
if(n.value == val){
this.form.gridName = n.label
}
}
this.form.villageId = ''
this.form.buildId = ''
this.form.unitId = ''
this.form.homeId = ''
this.getValiheList()
if (!val) {
this.getBuildList()
this.getUniList()
this.getHouseList()
}
},
validateIdcard (idCard, type) { validateIdcard (idCard, type) {
this.$http this.$http
.post('/epmetuser/icresiuser/getUserRoleByIdCard', { idCard }) .post('/epmetuser/icresiuser/getUserRoleByIdCard', { idCard })
@ -1491,30 +1413,6 @@ export default {
.catch(() => { .catch(() => {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
},
//
handleValidBlur (item) {
console.log('n---', item)
if (item.formName !== 'idNum') return
if (!isCard(this.form.idNum) && !isPassport(this.form.idNum)) return
const { user } = this.$store.state
let huji = '', i = 0
if (user.areaCodePath && user.areaCodePath.length > 0) {
i = user.areaCodePath.length - 1
huji = user.areaCodePath[i].length > 6 ? user.areaCodePath[i].substr(0, 6) : user.areaCodePath[i]
}
if (this.form.idNum.length === 18 || this.form.idNum.length === 15) {
const _id = this.form.idNum.substr(0, 6)
const { sex, birth, age } = computedCard(this.form.idNum)
this.form.birthday = birth
this.form.gender = sex == 1 ? '1' : '2'
this.form.oldPeopleFlag = age >= 60 ? 1 : 0
// this.form.IS_BDHJ = huji == _id ? '1' : ''
this.validateIdcard(this.form.idNum)
console.log('age-----', age, _id)
}
}, },
handleChangeV (val) { handleChangeV (val) {
console.log('val', val) console.log('val', val)
@ -1537,6 +1435,23 @@ export default {
this.getHouseList() this.getHouseList()
}, },
handleClick (tab, event) { handleClick (tab, event) {
if(tab.index==0){
this.getEduInfoDto()
}
},
//
async getEduInfoDto(){
try {
console.log(this.resiId);
const {data} = await this.$http.get(`/actual/base/residentEduInfo/detail/${this.resiId}`)
if(data.data == null){
this.eduInfoDtoList = []
}else{
this.eduInfoDtoList = data.data
}
} catch (error) {
console.log(error);
}
}, },
handleForm () { handleForm () {
let newForm = [] let newForm = []
@ -1717,6 +1632,17 @@ export default {
display: flex; display: flex;
} }
} }
.f-w50{
width: 50%;
}
.title_postion{
position: relative;
top: -20px;
}
.downLabel{
display: inline-block;
width: 70px;
}
.m-search{ .m-search{
padding: 0 !important; padding: 0 !important;
margin: 0 !important; margin: 0 !important;

6
src/views/components/resiSearch.vue

@ -730,16 +730,14 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
//
getValiheList() { getValiheList() {
const { user } = this.$store.state const { user } = this.$store.state
var agencyIdTemp = '' var agencyIdTemp = ''
if(this.form.agencyId.length == 0) { if(this.form.agencyId.length == 0) {
agencyIdTemp = '' agencyIdTemp = ''
} else { } else {
this.form.agencyId.forEach(element => { agencyIdTemp = this.form.agencyId.join(',')
agencyIdTemp =this.form.agencyId + ',' + element
});
} }
this.$http this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { .post('/gov/org/icneighborhood/neighborhoodoption', {

13
src/views/modules/base/resi.vue

@ -372,7 +372,6 @@
ref="resiInfo" ref="resiInfo"
:fixed="true" :fixed="true"
:resi-id="lookResiId" :resi-id="lookResiId"
:resiDetailList='resiDetailList'
/> />
</div> </div>
@ -848,14 +847,7 @@ export default {
this.selAllFlag = false; this.selAllFlag = false;
} }
}, },
getResiDetail(id){
this.$http.post(`/actual/base/residentBaseInfo/detail/${id}`).then(res=>{
this.resiDetailList = res.data.data
}).catch(err =>{
console.log(err);
})
},
deleteBatch() { deleteBatch() {
if (this.selection.length > 0) { if (this.selection.length > 0) {
this.$confirm("删除之后无法恢复,确认删除?", "提示", { this.$confirm("删除之后无法恢复,确认删除?", "提示", {
@ -901,7 +893,7 @@ export default {
}, },
resetSearchForm(formName) { resetSearchForm(formName) {
for(const n in this.form) { for(const n in this.$refs.myResiSearch.form) {
this.$refs.myResiSearch.form[n] = '' this.$refs.myResiSearch.form[n] = ''
} }
this.getTableData(); this.getTableData();
@ -1104,7 +1096,6 @@ export default {
async handleLook(row) { async handleLook(row) {
this.lookResiId = row.resiId; this.lookResiId = row.resiId;
this.dialogVisible2 = true; this.dialogVisible2 = true;
this.getResiDetail(row.resiId)
}, },
// //
@ -1382,8 +1373,6 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
...obj ...obj
}; };
console.log('1369->>>>>>>>>>>>',params);
this.tableLoading = true; this.tableLoading = true;
const { data, code, msg } = await requestPost( const { data, code, msg } = await requestPost(
"/actual/base/residentBaseInfo/page", "/actual/base/residentBaseInfo/page",

Loading…
Cancel
Save