|
|
@ -34,7 +34,7 @@ |
|
|
|
<el-cascader |
|
|
|
size="small" |
|
|
|
class="u-item-width-normal" |
|
|
|
v-model.trim="form.attentionCrowds" |
|
|
|
v-model.trim="form.attentionCrowds" @change="handleChange" |
|
|
|
:options="resiClass" |
|
|
|
:props="{ multiple: true,checkStrictly: true,emitPath:false}" |
|
|
|
collapse-tags |
|
|
@ -892,8 +892,30 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
'form.attentionCrowds': { |
|
|
|
handler(newVal, oldVal) { |
|
|
|
console.log('attentionCrowds changed from', oldVal, 'to', newVal); |
|
|
|
let cancelledValues = oldVal.filter(val => !newVal.includes(val)); |
|
|
|
console.log(cancelledValues, "cancelledValues"); |
|
|
|
cancelledValues.forEach(val => { |
|
|
|
if (['FLOATING_FLAG', 'OLD_PEOPLE_FLAG','OLD_PEOPLE_FLAG', 'LIVE_ALONE_FLAG', 'DEMENTED_FLAG', 'EMPTY_NESTER_FLAG', |
|
|
|
'DISABLED_FLAG', 'SUBSISTENCE_ALLOWANCE_FLAG', 'ENSURE_HOUSE_FLAG', 'VETERAN_FLAG', 'FERTILE_WOMAN_FLAG', |
|
|
|
'SPECIAL_SUPPORT_FLAG', 'NEW_STRATUM_FLAG','NEG_FLAG', 'LBC_FLAG', 'AIDS_FLAG'].includes(val)) { |
|
|
|
// formCopy.attentionCrowds = formCopy.attentionCrowds.filter(item => item !== val); |
|
|
|
this.categoryAll |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// this.form.attentionCrowds.filter(item => item === val) |
|
|
|
// this.handleCategoryChange(newVal, oldVal) |
|
|
|
// 这里可以添加你想要在 attentionCrowds 变化时执行的代码 |
|
|
|
}, |
|
|
|
deep: true, // 如果需要深度监听对象或数组,必须添加 deep: true |
|
|
|
}, |
|
|
|
form: { |
|
|
|
handler(val, val2) { |
|
|
|
console.log(val, val2, "F"); |
|
|
|
for (let n in val) { |
|
|
|
if (this.constForm[n] !== val[n]) { |
|
|
|
this.handleChangeForm(n) |
|
|
@ -912,11 +934,18 @@ export default { |
|
|
|
}, |
|
|
|
categoryAll: { |
|
|
|
handler(val, val2) { |
|
|
|
console.log(val,val2,"dslkkldjsf"); |
|
|
|
this.handleCategoryChange(val, val2) |
|
|
|
console.log(val,val2,"F"); |
|
|
|
this.handleCategoryChange(val, val2) |
|
|
|
}, |
|
|
|
deep: true |
|
|
|
}, |
|
|
|
// form.attentionCrowds: { |
|
|
|
// handler(val, val2) { |
|
|
|
// console.log(val,val2,"F"); |
|
|
|
// this.handleCategoryChange(val, val2) |
|
|
|
// }, |
|
|
|
// deep: true |
|
|
|
// }, |
|
|
|
}, |
|
|
|
directives: { |
|
|
|
"el-select-loadmore": { |
|
|
@ -963,6 +992,14 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleChange(val){ |
|
|
|
console.log(this.form.attentionCrowds,"dskljldsks"); |
|
|
|
|
|
|
|
console.log(val,"dslkjflkdsklfjdskl"); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleCategoryChange(newVal, oldVal) { |
|
|
|
console.log(newVal, oldVal,"slkdfjlfj"); |
|
|
|
let formCopy = JSON.parse(JSON.stringify(this.form)); |
|
|
@ -1012,6 +1049,8 @@ export default { |
|
|
|
|
|
|
|
// 更新表单数据 |
|
|
|
this.form = formCopy; |
|
|
|
console.log(this.form,"dl;sfjlfjs"); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handelWatchStartDate(val) { |
|
|
@ -1130,7 +1169,10 @@ export default { |
|
|
|
}, |
|
|
|
// 监听基础form |
|
|
|
handleChangeForm(val) { |
|
|
|
console.log(val,"skldjfklsjf"); |
|
|
|
for (let n in this.fixedForm) { |
|
|
|
console.log("324234"); |
|
|
|
|
|
|
|
if (n === val) { |
|
|
|
if (this.fixedList.length > 0) { |
|
|
|
let _item = {} |
|
|
|