From d7bf9a172c90cda7098f99f15ae4e73e7eb4c96f Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 19 Aug 2019 19:37:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E6=9C=AC=E7=BC=96=E5=88=B6=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/display/menuScript.vue | 3 ++ src/views/display/scriptRecord/addAction.vue | 40 ++++++++++---------- src/views/display/tipScriptRecord.vue | 1 + 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/views/display/menuScript.vue b/src/views/display/menuScript.vue index 68ef4e807..40fd70bdd 100644 --- a/src/views/display/menuScript.vue +++ b/src/views/display/menuScript.vue @@ -101,6 +101,9 @@ export default { selectBeginTime() { this.$refs.setTime.doShow(); }, + resetBeginTime(){ + this.isDisable = false; + }, start(model) { this.isDisable = true; runDiagramStart(model, this.group).then(res => { diff --git a/src/views/display/scriptRecord/addAction.vue b/src/views/display/scriptRecord/addAction.vue index cdc037566..ce2b3000e 100644 --- a/src/views/display/scriptRecord/addAction.vue +++ b/src/views/display/scriptRecord/addAction.vue @@ -19,7 +19,7 @@ - + @@ -177,10 +177,10 @@ { addScriptAction(group,data).then(response=>{ this.modifying=false; - this.initActionData(); this.$message.success('添加动作成功'); this.$emit('create'); - this.resetDisabled(); + // this.resetDisabled(); + this.initActionData(); }).catch(error => { this.modifying=false; this.$messageBox(`添加动作失败: ${error.message}`); @@ -191,13 +191,14 @@ let actionId=this.modalData.actionVO.id; modifyScriptAction(group,actionId,data).then(response=>{ this.modifying=false; - this.initActionData(); + this.isNotModify=true; this.$parent.$parent.$parent.setDisabled(this.isNotModify); this.$emit('modifyButtonName'); this.$message.success('修改动作成功'); this.$emit('create'); - this.resetDisabled(); + // this.resetDisabled(); + this.initActionData(); }).catch(error => { this.modifying=false; this.$messageBox(`修改动作失败: ${error.message}`); @@ -214,6 +215,19 @@ if(this.$refs['modalData']) { this.$refs['modalData'].resetFields(); + // this.$nextTick(function(){ + this.deviceTypeReadOnly=false; + // this.modalData.actionVO.type="Conversation"; + // this.modalData.actionVO.memberId=""; + // this.modalData.actionVO.targetId=""; + // this.modalData.actionVO.deviceCommand=""; + // this.modalData.actionVO.reply=""; + // this.modalData.param.startStation=""; + this.isConversitionAdd=true; + this.isCommandAdd=false; + this.isJinLu=false; + // this.modalData.param.endStation=""; + // }); } }, clearValidate(){ @@ -223,20 +237,7 @@ } }, initActionData(){ - this.deviceTypeReadOnly=false; - this.modalData.actionVO.memberId=""; - this.modalData.actionVO.targetId=""; - this.$nextTick(function(){ - this.modalData.actionVO.type="Conversation"; - }); - // this.modalData.actionVO.time=0; - this.modalData.actionVO.reply=""; - this.modalData.param.startStation=""; - this.isConversitionAdd=true; - this.isCommandAdd=false; - this.isJinLu=false; - this.modalData.actionVO.deviceCommand=null; - this.modalData.param.endStation=""; + this.resetDisabled(); }, changeType(index){ switch(index) @@ -271,6 +272,7 @@ }, changeCommand(index){ + this.modalData.actionVO.deviceCommand switch(index) { case "Train_Manual_Route_Blocking_Drive":{ diff --git a/src/views/display/tipScriptRecord.vue b/src/views/display/tipScriptRecord.vue index 804564828..1db46d317 100644 --- a/src/views/display/tipScriptRecord.vue +++ b/src/views/display/tipScriptRecord.vue @@ -155,6 +155,7 @@ }).then(() => { dumpScriptData(group).then(resp => { // this.isSaveStage = true; + this.$parent.resetBeginTime(); this.$refs["getAction"].loadInitData(); this.initAutoSaveScript(); this.$message.success('清除数据成功');