|
|
@ -32,10 +32,8 @@ |
|
|
|
<!-- </div> --> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item :prop="form.VILLAGE_ID" label="所属小区"> |
|
|
|
<!-- <div class="resi-cell"> --> |
|
|
|
<!-- <div class="resi-cell-label">{{n.label}}</div> --> |
|
|
|
<div class="resi-cell-value"> |
|
|
|
<el-select v-model="form.VILLAGE_ID" :disabled="disabled" placeholder="请选择小区" size="small" |
|
|
|
clearable class="resi-cell-select" |
|
|
@ -47,14 +45,41 @@ |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-select v-model="form.BUILD_ID" :disabled="disabled" 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" :disabled="disabled" 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" :disabled="disabled" 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" :disabled="disabled" placeholder="请选择楼号" size="small" |
|
|
|
clearable class="resi-cell-select" |
|
|
@ -67,13 +92,10 @@ |
|
|
|
</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" :disabled="disabled" placeholder="请选择" size="small" |
|
|
|
clearable class="resi-cell-select" |
|
|
@ -86,9 +108,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)"> --> |
|
|
@ -341,6 +362,7 @@ export default { |
|
|
|
GRID_ID: '', |
|
|
|
VILLAGE_ID: '', |
|
|
|
BUILD_ID: '', |
|
|
|
UNIT_ID: '', |
|
|
|
HOME_ID: '' |
|
|
|
}, |
|
|
|
fixedList: {}, |
|
|
@ -357,6 +379,7 @@ export default { |
|
|
|
optionsB: [], |
|
|
|
optionsH: [], |
|
|
|
optionsG: [], |
|
|
|
optionsD: [], |
|
|
|
pickerOptions: { |
|
|
|
shortcuts: [{ |
|
|
|
text: '最近一周', |
|
|
@ -453,6 +476,7 @@ export default { |
|
|
|
this.getValiheList() |
|
|
|
this.getBuildList() |
|
|
|
this.getUniList() |
|
|
|
this.getHouseList() |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -516,28 +540,32 @@ export default { |
|
|
|
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.getValiheList() |
|
|
|
this.getUniList() |
|
|
|
} |
|
|
|
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() |
|
|
|
if (!val) { |
|
|
|
this.getValiheList() |
|
|
|
this.getUniList() |
|
|
|
} |
|
|
|
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() |
|
|
|
}, |
|
|
|
handlerMuscForm () { |
|
|
|
let arr = [] |
|
|
@ -575,6 +603,7 @@ export default { |
|
|
|
var hash = {} |
|
|
|
var i = 0 |
|
|
|
var res = [] |
|
|
|
let ID = this.tempFormList[0].ID |
|
|
|
this.tempFormList.forEach(function (item) { |
|
|
|
var name = item.tableName |
|
|
|
hash[name] ? res[hash[name] - 1].list.push(item) : hash[name] = ++i && res.push({ |
|
|
@ -586,7 +615,6 @@ export default { |
|
|
|
// console.log('resssssss', res) |
|
|
|
res.forEach(item => { |
|
|
|
let _form = {} |
|
|
|
// let ID = item.list[0].ID |
|
|
|
item.list.filter(n => n.isChange).forEach(r => { |
|
|
|
_form[r.columnName] = r.multiSelect || r.itemType === 'cascader' ? this.form[r.columnName].toString() : this.form[r.columnName] |
|
|
|
if (r.ID) { |
|
|
@ -599,10 +627,11 @@ export default { |
|
|
|
_form[n] = this.fixedList[n] |
|
|
|
} |
|
|
|
if (Object.keys(_form).length > 0) { |
|
|
|
_form.AGENCY_ID = this.$store.state.user.agencyId |
|
|
|
if (!_form.AGENCY_ID) _form.AGENCY_ID = this.$store.state.user.agencyId |
|
|
|
if (!_form.ID) _form.ID = ID |
|
|
|
} |
|
|
|
} |
|
|
|
// console.log('objeckeyssss', Object.keys(_form), _form, this.form) |
|
|
|
console.log('objeckeyssss', Object.keys(_form), _form) |
|
|
|
newForm.push({ |
|
|
|
tableName: item.tableName, |
|
|
|
supportAdd: this.supportAdd, |
|
|
@ -610,7 +639,7 @@ export default { |
|
|
|
list: Object.keys(_form).length > 0 ? [{ ..._form }] : [] |
|
|
|
}) |
|
|
|
}) |
|
|
|
// console.log('newFormhhhhh', newForm) |
|
|
|
console.log('newFormhhhhh', newForm) |
|
|
|
return newForm |
|
|
|
} else { |
|
|
|
console.log('error submit!!') |
|
|
@ -686,7 +715,22 @@ export default { |
|
|
|
}, |
|
|
|
getUniList () { |
|
|
|
this.$http |
|
|
|
.post('/gov/org/ichouse/houseoption', { buildingId: this.form.BUILD_ID }) |
|
|
|
.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', { unitId: this.form.UNIT_ID }) |
|
|
|
.then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
@ -741,17 +785,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; |
|
|
|
} |
|
|
|