From 663d43c5d2c1ad1b7be28b99e95b7eb97b41a937 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 23 Dec 2019 13:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=BB=B6=E6=97=B6=E8=A7=A3=E9=94=81=E5=88=9B=E5=BB=BA=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E8=A7=84=E5=88=99=EF=BC=88=E4=BB=85=E5=BD=93=E5=BB=B6?= =?UTF-8?q?=E7=BB=AD=E4=BF=9D=E6=8A=A4=E7=BA=BF=E8=B7=AF=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E8=BF=9B=E8=A1=8C=E8=A7=A3=E9=94=81=E5=8C=BA?= =?UTF-8?q?=E6=AE=B5=E8=A7=A3=E9=94=81=E6=97=B6=E9=97=B4=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=EF=BC=8C=E5=90=A6=E5=88=99=E7=9B=B4=E6=8E=A5=E6=94=BE=E5=BC=83?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=88=96=E5=88=A0=E9=99=A4=E5=BB=B6=E7=BB=AD?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataRelation/routeoperate/protect.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/views/newMap/newMapdraft/dataRelation/routeoperate/protect.vue b/src/views/newMap/newMapdraft/dataRelation/routeoperate/protect.vue index a43ee3a7b..fff426e13 100644 --- a/src/views/newMap/newMapdraft/dataRelation/routeoperate/protect.vue +++ b/src/views/newMap/newMapdraft/dataRelation/routeoperate/protect.vue @@ -277,40 +277,40 @@ export default { this.createProtect('saveProtectSuccess'); }, update() { - if (this.addModel.code && this.addModel.unlockSectionCode && this.addModel.relSectionSwitchList.length) { + if (this.addModel.code && this.addModel.unlockSectionCode && this.addModel.relSectionSwitchList.length && this.addModel.unlockTime) { const model = this.buildModel(); putContinueProtect(model).then(resp => { this.$emit('updateProtectSuccess', model.code); }).catch(() => { this.$messageBox('更新延续保护失败!'); }); - } else if (this.addModel.code && !this.addModel.unlockSectionCode && !this.addModel.relSectionSwitchList.length) { + } else if (this.addModel.code && !this.addModel.relSectionSwitchList.length) { delContinueProtect(this.addModel.id).then(resp => { this.$emit('updateProtectSuccess', ''); }); - } else if (this.addModel.code && !this.addModel.unlockSectionCode && this.addModel.relSectionSwitchList.length) { - this.$messageBox('请填写延续保护解锁区段或清除延续保护相关数据!'); - } else if (this.addModel.code && this.addModel.unlockSectionCode && !this.addModel.relSectionSwitchList.length) { - this.$messageBox('请生成延续保护线路或清除延续保护相关数据!'); + } else if (this.addModel.code && !this.addModel.unlockSectionCode) { + this.$messageBox('请填写延续保护解锁区段或清除延续保护线路相关数据!'); + } else if (this.addModel.code && this.addModel.unlockTime) { + this.$messageBox('请填写延续保护解锁时间或清除延续保护线路相关数据!'); } else { this.createProtect('updateProtectSuccess'); } }, createProtect(parentFunction) { - if (this.addModel.unlockSectionCode && this.addModel.relSectionSwitchList.length) { + if (this.addModel.unlockSectionCode && this.addModel.relSectionSwitchList.length && this.addModel.unlockTime) { const model = this.buildModel(setUID('Protect')); postContinueProtect(model).then(resp => { this.$emit(parentFunction, model.code); }).catch(() => { this.$messageBox('创建延续保护失败!'); }); - } else if (!this.addModel.unlockSectionCode && !this.addModel.relSectionSwitchList.length) { + } else if (!this.addModel.relSectionSwitchList.length) { this.$emit(parentFunction, ''); } else { if (!this.addModel.unlockSectionCode) { - this.$messageBox('请填写延续保护解锁区段或清除延续保护相关数据!'); - } else if (!this.addModel.relSectionSwitchList.length) { - this.$messageBox('请生成延续保护线路或清除延续保护相关数据!'); + this.$messageBox('请填写延续保护解锁区段或清除延续保护线路相关数据!'); + } else if (!this.addModel.unlockTime.length) { + this.$messageBox('请填写延续保护解锁时间或清除延续保护线路相关数据!'); } } },