Browse Source

老年人不能查询

feature
是小王呀\24601 11 months ago
parent
commit
7ea41a4d58
  1. 46
      src/views/components/resiSearch.vue

46
src/views/components/resiSearch.vue

@ -34,7 +34,7 @@
<el-cascader <el-cascader
size="small" size="small"
class="u-item-width-normal" class="u-item-width-normal"
v-model.trim="form.attentionCrowds" v-model.trim="form.attentionCrowds" @change="handleChange"
:options="resiClass" :options="resiClass"
:props="{ multiple: true,checkStrictly: true,emitPath:false}" :props="{ multiple: true,checkStrictly: true,emitPath:false}"
collapse-tags collapse-tags
@ -892,8 +892,30 @@ export default {
}, },
}, },
watch: { 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: { form: {
handler(val, val2) { handler(val, val2) {
console.log(val, val2, "F");
for (let n in val) { for (let n in val) {
if (this.constForm[n] !== val[n]) { if (this.constForm[n] !== val[n]) {
this.handleChangeForm(n) this.handleChangeForm(n)
@ -912,11 +934,18 @@ export default {
}, },
categoryAll: { categoryAll: {
handler(val, val2) { handler(val, val2) {
console.log(val,val2,"dslkkldjsf"); console.log(val,val2,"F");
this.handleCategoryChange(val, val2) this.handleCategoryChange(val, val2)
}, },
deep: true deep: true
}, },
// form.attentionCrowds: {
// handler(val, val2) {
// console.log(val,val2,"F");
// this.handleCategoryChange(val, val2)
// },
// deep: true
// },
}, },
directives: { directives: {
"el-select-loadmore": { "el-select-loadmore": {
@ -963,6 +992,14 @@ export default {
}) })
}, },
methods: { methods: {
handleChange(val){
console.log(this.form.attentionCrowds,"dskljldsks");
console.log(val,"dslkjflkdsklfjdskl");
},
handleCategoryChange(newVal, oldVal) { handleCategoryChange(newVal, oldVal) {
console.log(newVal, oldVal,"slkdfjlfj"); console.log(newVal, oldVal,"slkdfjlfj");
let formCopy = JSON.parse(JSON.stringify(this.form)); let formCopy = JSON.parse(JSON.stringify(this.form));
@ -1012,6 +1049,8 @@ export default {
// //
this.form = formCopy; this.form = formCopy;
console.log(this.form,"dl;sfjlfjs");
}, },
handelWatchStartDate(val) { handelWatchStartDate(val) {
@ -1130,7 +1169,10 @@ export default {
}, },
// form // form
handleChangeForm(val) { handleChangeForm(val) {
console.log(val,"skldjfklsjf");
for (let n in this.fixedForm) { for (let n in this.fixedForm) {
console.log("324234");
if (n === val) { if (n === val) {
if (this.fixedList.length > 0) { if (this.fixedList.length > 0) {
let _item = {} let _item = {}

Loading…
Cancel
Save