增加非空校验
This commit is contained in:
parent
6ff30c5b63
commit
8431ff8cc4
@ -388,12 +388,13 @@ export default {
|
|||||||
changeSectionSelected(list, flag, type) {
|
changeSectionSelected(list, flag, type) {
|
||||||
list && list.forEach((item) => {
|
list && list.forEach((item) => {
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](item);
|
const section = this.$store.getters['map/getDeviceByCode'](item);
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
if (section && section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||||
section.logicSectionCodeList.forEach( (logicSectionCode) => {
|
section.logicSectionCodeList.forEach( (logicSectionCode) => {
|
||||||
this.$store.getters['map/getDeviceByCode'](logicSectionCode).instance.drawBatchSelected(flag, flag ? type : '');
|
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
|
||||||
|
logicSection && logicSection.instance.drawBatchSelected(flag, flag ? type : '');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
section.instance.drawBatchSelected(flag, flag ? type : '');
|
section && section.instance.drawBatchSelected(flag, flag ? type : '');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -512,13 +512,13 @@ export default {
|
|||||||
changeSectionSelected(list, flag, type) {
|
changeSectionSelected(list, flag, type) {
|
||||||
list && list.forEach((item) => {
|
list && list.forEach((item) => {
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](item);
|
const section = this.$store.getters['map/getDeviceByCode'](item);
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length > 0) {
|
if (section && section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||||
section.logicSectionCodeList.forEach( (logicSectionCode) => {
|
section.logicSectionCodeList.forEach( (logicSectionCode) => {
|
||||||
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
|
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
|
||||||
logicSection && logicSection.instance.drawBatchSelected(flag, flag ? type : '');
|
logicSection && logicSection.instance.drawBatchSelected(flag, flag ? type : '');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
section.instance.drawBatchSelected(flag, flag ? type : '');
|
section && section.instance.drawBatchSelected(flag, flag ? type : '');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -233,13 +233,13 @@ export default {
|
|||||||
changeSectionSelected(list, flag, type) {
|
changeSectionSelected(list, flag, type) {
|
||||||
list && list.forEach((item) => {
|
list && list.forEach((item) => {
|
||||||
const section = this.$store.getters['map/getDeviceByCode'](item);
|
const section = this.$store.getters['map/getDeviceByCode'](item);
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
if (section && section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||||
section.logicSectionCodeList.forEach( (logicSectionCode) => {
|
section.logicSectionCodeList.forEach( (logicSectionCode) => {
|
||||||
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
|
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
|
||||||
logicSection && logicSection.instance.drawBatchSelected(flag, flag ? type : '');
|
logicSection && logicSection.instance.drawBatchSelected(flag, flag ? type : '');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
section.instance.drawBatchSelected(flag, flag ? type : '');
|
section && section.instance.drawBatchSelected(flag, flag ? type : '');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user