调整logicSectionCodeList赋值增加校验
This commit is contained in:
parent
6d82f466a6
commit
52eddbaa3d
@ -91,7 +91,7 @@ export default {
|
||||
counts += parseInt(ele.num);
|
||||
});
|
||||
if (count === 0 || allNotZeros) {
|
||||
const logicSectionCodeList = [];
|
||||
let logicSectionCodeList = [];
|
||||
models.forEach(item=> {
|
||||
logicSectionCodeList.push(item.code);
|
||||
});
|
||||
@ -102,10 +102,12 @@ export default {
|
||||
});
|
||||
if (count === 0) {
|
||||
logicSectionNumList = [];
|
||||
logicSectionCodeList = [];
|
||||
}
|
||||
this.editModel.logicSectionNum = [...logicSectionNumList];
|
||||
this.editModel.logicSectionCodeList = logicSectionCodeList;
|
||||
models.push(this.editModel);
|
||||
const model = deepAssign(this.editModel, {_type: 'Section'});
|
||||
model.logicSectionNum = [...logicSectionNumList];
|
||||
model.logicSectionCodeList = [...logicSectionCodeList];
|
||||
models.push(model);
|
||||
this.$emit('updateMapModel', models);
|
||||
} else {
|
||||
this.$messageBox('逻辑区段在个折线上数量要均为0或均不为0');
|
||||
|
Loading…
Reference in New Issue
Block a user