Browse Source

居民信息-单元,房号

preview
13176889840 4 years ago
parent
commit
f539f3f2df
  1. 54
      epmet-oper-web/src/views/components/editResi.vue
  2. 159
      epmet-oper-web/src/views/components/resiForm.vue
  3. 97
      epmet-oper-web/src/views/components/resiSearch.vue
  4. 10
      epmet-oper-web/src/views/modules/base/resi.vue

54
epmet-oper-web/src/views/components/editResi.vue

@ -194,7 +194,6 @@
:disabled="disabled"
clearable
size="small"
@blur="handleChange"
class="resi-cell-select">
</el-cascader>
<template v-else-if="n.itemType === 'radio'">
@ -449,7 +448,12 @@ export default {
// console.log('addList----111', this.addList)
}
// } this.addList.push(this.addCount++)
if (this.fixed) this.getOptionsList()
if (this.fixed) {
this.getGridList()
this.getValiheList()
this.getBuildList()
this.getUniList()
}
},
methods: {
initForm () {
@ -508,6 +512,33 @@ export default {
handleChange () {
// this.handleForm()
},
handleChangeGrid (val) {
console.log('val', val)
this.form.VILLAGE_ID = ''
this.form.BUILD_ID = ''
this.form.HOME_ID = ''
this.getValiheList()
if (!val) {
this.getBuildList()
this.getValiheList()
this.getUniList()
}
},
handleChangeV (val) {
console.log('val', val)
this.form.BUILD_ID = ''
this.form.HOME_ID = ''
this.getBuildList()
if (!val) {
this.getValiheList()
this.getUniList()
}
},
handleChangeB (val) {
console.log('val', val)
this.form.HOME_ID = ''
this.getUniList()
},
handlerMuscForm () {
let arr = []
this.addList.forEach(item => {
@ -606,7 +637,7 @@ export default {
})
return options
},
getOptionsList () {
getGridList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId })
@ -614,42 +645,53 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getValiheList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { GRID_ID: this.form.GRID_ID })
.post('/gov/org/icneighborhood/neighborhoodoption', { gridId: this.form.GRID_ID, agencyId: user.agencyId })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsV = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getBuildList () {
this.$http
.post('/gov/org/icbuilding/buildingoption', { VILLAGE_ID: this.form.VILLAGE_ID })
.post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsB = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getUniList () {
this.$http
.post('/gov/org/ichouse/houseoption', { BUILD_ID: this.form.BUILD_ID })
.post('/gov/org/ichouse/houseoption', { buildingId: this.form.BUILD_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsH = res.data
}
})

159
epmet-oper-web/src/views/components/resiForm.vue

@ -18,7 +18,7 @@
<!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value">
<el-select v-model="form.GRID_ID" placeholder="请选择网格" size="small"
clearable class="resi-cell-select"
clearable class="resi-cell-select" @change="handleChangeGrid"
>
<el-option
v-for="item in optionsG"
@ -31,13 +31,11 @@
<!-- </div> -->
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :prop="form.VILLAGE_ID" label="所属小区">
<!-- <div class="resi-cell"> -->
<!-- <div class="resi-cell-label">{{n.label}}</div> -->
<el-col :span="18">
<el-form-item :prop="form.VILLAGE_ID" label="所属家庭">
<div class="resi-cell-value">
<el-select v-model="form.VILLAGE_ID" placeholder="请选择小区" size="small"
clearable class="resi-cell-select"
clearable class="resi-cell-select" @change="handleChangeV"
>
<el-option
v-for="item in optionsV"
@ -46,17 +44,44 @@
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.BUILD_ID" placeholder="请选择楼号" size="small"
clearable class="resi-cell-select" @change="handleChangeB"
>
<el-option
v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.UNIT_ID" placeholder="请选择单元" size="small"
clearable class="resi-cell-select" @change="handleChangeD"
>
<el-option
v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.HOME_ID" placeholder="请选择房号" size="small"
clearable class="resi-cell-select"
>
<el-option
v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<!-- </div> -->
</el-form-item>
</el-col>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item :prop="form.BUILD_ID" label="所属楼宇">
<!-- <div class="resi-cell"> -->
<!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value">
<el-select v-model="form.BUILD_ID" placeholder="请选择楼号" size="small"
clearable class="resi-cell-select"
clearable class="resi-cell-select" @change="handleChangeB"
>
<el-option
v-for="item in optionsB"
@ -66,16 +91,23 @@
</el-option>
</el-select>
</div>
<!-- </div> -->
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :prop="form.HOME_ID" label="所属家庭">
<!-- <div class="resi-cell"> -->
<!-- <div class="resi-cell-label">{{n.label}}</div> -->
<div class="resi-cell-value">
<el-select v-model="form.HOME_ID" placeholder="请选择" size="small"
clearable class="resi-cell-select"
clearable class="resi-cell-select resi-cell-select-small"
>
<el-option
v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.HOME_ID" placeholder="请选择" size="small"
clearable class="resi-cell-select-small"
>
<el-option
v-for="item in optionsH"
@ -85,9 +117,8 @@
</el-option>
</el-select>
</div>
<!-- </div> -->
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row v-for="(item, index) in sliceList(formList, columns)" :key="index" class="resi-row">
<!-- <el-col v-for="n in item" :key="n.id" :span="n.itemType === 'textarea'&&24 || (24/columns)"> -->
@ -322,6 +353,7 @@ export default {
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
}
return {
@ -330,6 +362,7 @@ export default {
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
},
fixedList: {
@ -340,6 +373,7 @@ export default {
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
},
constForm,
@ -351,6 +385,7 @@ export default {
optionsV: [],
optionsB: [],
optionsH: [],
optionsD: [],
optionsG: [],
pickerOptions: {
shortcuts: [{
@ -439,7 +474,7 @@ export default {
// this.initForm()
// console.log('formInfo---ggg', this.form)
if (this.supportAdd) this.addList.push(this.addCount++)
if (this.fixed) this.getOptionsList()
if (this.fixed) this.getGridList()
},
methods: {
initForm () {
@ -476,6 +511,39 @@ export default {
}
})
},
handleChangeGrid (val) {
console.log('val', val)
this.form.VILLAGE_ID = ''
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getValiheList()
if (!val) {
this.getBuildList()
this.getUniList()
this.getHouseList()
}
},
handleChangeV (val) {
console.log('val', val)
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getBuildList()
this.getUniList()
this.getHouseList()
},
handleChangeB (val) {
console.log('val', val)
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getUniList()
this.getHouseList()
},
handleChangeD () {
this.form.HOME_ID = ''
this.getHouseList()
},
// form
handleChangeForm (val) {
if (this.fixed) {
@ -569,7 +637,7 @@ export default {
if (this.supportAdd) newForm = this.handlerMuscForm()
return newForm
},
getOptionsList () {
getGridList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId })
@ -577,38 +645,63 @@ export default {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsG = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getValiheList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { GRID_ID: this.form.GRID_ID })
.post('/gov/org/icneighborhood/neighborhoodoption', { gridId: this.form.GRID_ID, agencyId: user.agencyId })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsV = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getBuildList () {
this.$http
.post('/gov/org/icbuilding/buildingoption', { VILLAGE_ID: this.form.VILLAGE_ID })
.post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsB = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getUniList () {
this.$http
.post('/gov/org/icbuildingunit/unitoption', { buildingId: this.form.BUILD_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsD = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getHouseList () {
this.$http
.post('/gov/org/ichouse/houseoption', { BUILD_ID: this.form.BUILD_ID })
.post('/gov/org/ichouse/houseoption', { buildingId: this.form.BUILD_ID, unitId: this.form.UNIT_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -680,17 +773,17 @@ export default {
.resi-cell-value .resi-cell-textarea {
width: 300px;
}
// .resi-cell-select {
// width: 180px;
// box-sizing: border-box;
// margin-right: 10px;
// &-middle {
// width: 130px;
// }
// &-small {
// width: 88px;
// }
// }
.resi-cell-select {
width: 180px;
box-sizing: border-box;
margin-right: 10px;
&-middle {
width: 130px;
}
&-small {
width: 88px;
}
}
.resi-cell-select:last-child {
margin-right: 0;
}

97
epmet-oper-web/src/views/components/resiSearch.vue

@ -7,7 +7,8 @@
<div class="resi-cell">
<div class="resi-cell-label">所属网格</div>
<div class="resi-cell-value">
<el-select v-model="form.GRID_ID" placeholder="请选择" size="small" clearable class="resi-cell-select">
<el-select v-model="form.GRID_ID" placeholder="请选择" size="small" clearable class="resi-cell-select"
@change="handleChangeGrid">
<el-option
v-for="item in optionsG"
:key="item.value"
@ -24,7 +25,7 @@
<div class="resi-cell-value">
<el-select v-model="form.VILLAGE_ID" placeholder="请选择小区" size="small"
clearable class="resi-cell-select"
@clear="handleClearVillage">
@clear="handleClearVillage" @change="handleChangeV">
<el-option
v-for="item in optionsV"
:key="item.value"
@ -33,7 +34,7 @@
</el-option>
</el-select>
<el-select v-model="form.BUILD_ID" placeholder="楼号" size="small" clearable
class="resi-cell-select" :disabled="changeVDisabled" @clear="handleClearBuild">
class="resi-cell-select" :disabled="changeVDisabled" @clear="handleClearBuild" @change="handleChangeB">
<el-option
v-for="item in optionsB"
:key="item.value"
@ -41,7 +42,15 @@
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.HOME_ID" :disabled="changeBDisabled" placeholder="单元" size="small" clearable class="resi-cell-select">
<el-select v-model="form.UNIT_ID" :disabled="changeBDisabled" placeholder="单元" size="small" clearable class="resi-cell-select" @click="handleClearDan" @change="handleChangeD">
<el-option
v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="form.HOME_ID" :disabled="changeDDisabled" placeholder="楼号" size="small" clearable class="resi-cell-select">
<el-option
v-for="item in optionsH"
:key="item.value"
@ -584,6 +593,7 @@ export default {
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
}
return {
@ -592,6 +602,7 @@ export default {
optionsV: [],
optionsB: [],
optionsH: [],
optionsD: [],
optionsG: [],
options: [{
value: '选项1',
@ -615,6 +626,7 @@ export default {
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
},
constForm,
@ -623,6 +635,7 @@ export default {
GRID_ID: '',
VILLAGE_ID: '',
BUILD_ID: '',
UNIT_ID: '',
HOME_ID: ''
},
tempFormList,
@ -678,6 +691,9 @@ export default {
},
changeBDisabled () {
return !this.form.BUILD_ID
},
changeDDisabled () {
return !this.form.UNIT_ID
}
},
watch: {
@ -697,8 +713,8 @@ export default {
},
created () {
// this.initForm()
console.log('formcccc---', this.form)
this.getOptionsList()
// console.log('formcccc---', this.form)
this.getGridList()
},
methods: {
initForm () {
@ -713,6 +729,11 @@ export default {
},
handleClearBuild () {
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
},
handleClearDan () {
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
},
handleSearch () {
@ -737,24 +758,52 @@ export default {
handleOpenSearch () {
this.openSearch = !this.openSearch
},
handleChangeGrid (val) {
console.log('val', val)
this.form.VILLAGE_ID = ''
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getValiheList()
},
handleChangeV (val) {
console.log('val', val)
this.form.BUILD_ID = ''
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getBuildList()
},
handleChangeB (val) {
console.log('val', val)
this.form.UNIT_ID = ''
this.form.HOME_ID = ''
this.getUniList()
},
handleChangeD (val) {
console.log('val', val)
this.form.HOME_ID = ''
this.getHouseList()
},
// form
handleChangeForm (val) {
for (let n in this.fixedForm) {
if (n === val) {
if (this.fixedList.length > 0) {
let _item = {}
this.fixedList.forEach((item, index) => {
if (item.columnName === val) {
item.columnValue[0] = this.form[val]
} else {
let _item = {
_item = {
queryType: 'equal',
tableName: 'ic_resi_user',
columnName: val,
columnValue: [this.form[val]]
}
this.$set(this.fixedList, index, _item)
// this.$set(this.fixedList, index, _item)
}
})
if (Object.keys(_item).length > 0) this.fixedList.push(_item)
} else {
this.$set(this.fixedList, 0, {
queryType: 'equal',
@ -770,7 +819,7 @@ export default {
if (item.columnName === val) item.isChange = true
})
},
getOptionsList () {
getGridList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/customergrid/gridoption', { agencyId: user.agencyId })
@ -785,8 +834,11 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
},
getValiheList () {
const { user } = this.$store.state
this.$http
.post('/gov/org/icneighborhood/neighborhoodoption', { GRID_ID: this.form.GRID_ID })
.post('/gov/org/icneighborhood/neighborhoodoption', { gridId: this.form.GRID_ID, agencyId: user.agencyId })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -798,8 +850,10 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
},
getBuildList () {
this.$http
.post('/gov/org/icbuilding/buildingoption', { VILLAGE_ID: this.form.VILLAGE_ID })
.post('/gov/org/icbuilding/buildingoption', { neighborHoodId: this.form.VILLAGE_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -811,8 +865,25 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
},
getUniList () {
this.$http
.post('/gov/org/icbuildingunit/unitoption', { buildingId: this.form.BUILD_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
this.optionsD = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
getHouseList () {
this.$http
.post('/gov/org/ichouse/houseoption', { BUILD_ID: this.form.BUILD_ID })
.post('/gov/org/ichouse/houseoption', { unitId: this.form.UNIT_ID })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
@ -824,7 +895,7 @@ export default {
.catch(() => {
return this.$message.error('网络错误')
})
}
},
}
}
</script>

10
epmet-oper-web/src/views/modules/base/resi.vue

@ -11,7 +11,8 @@
<el-table
:data="tableData"
border
style="width: 100%">
style="width: 100%"
class="resi-table">
<el-table-column
type="index"
align="center"
@ -34,7 +35,7 @@
align="center"
width="120">
<template slot-scope="scope">
<el-button @click="handleLook(scope.row)" type="text" size="small">查看</el-button>
<el-button @click="handleLook(scope.row)" type="text" size="small" class="btn-color-look">查看</el-button>
<el-button @click="handleEdit(scope.row)" type="text" size="small" class="btn-color-edit">编辑</el-button>
<el-popconfirm
title="删除之后无法回复,确认删除?"
@ -613,7 +614,10 @@ export default {
}
}
.resi-card-table {
.resi-table {
.el-button--text {
text-decoration: underline;
}
.btn-color-del {
margin-left: 10px;
color: rgba(213, 16, 16, 1);

Loading…
Cancel
Save