From 14901a50f2b06ea3a1edeaa99ed4e252643d3ef6 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 16 Aug 2019 14:37:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=89=A7=E6=9C=AC=E7=9A=84=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91?= =?UTF-8?q?=20=E7=BC=96=E5=88=B6=E5=89=A7=E6=9C=AC=E7=9A=84=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/display/scriptRecord/addAction.vue | 25 +++++++++++- src/views/display/scriptRecord/getAction.vue | 2 +- src/views/scriptManage/category/tree.vue | 41 ++++++++++++++------ src/views/scriptManage/home.vue | 9 ++++- src/views/scriptManage/index.vue | 9 +---- 5 files changed, 62 insertions(+), 24 deletions(-) diff --git a/src/views/display/scriptRecord/addAction.vue b/src/views/display/scriptRecord/addAction.vue index 2c1d223df..de2b3e7e2 100644 --- a/src/views/display/scriptRecord/addAction.vue +++ b/src/views/display/scriptRecord/addAction.vue @@ -19,7 +19,7 @@ - + @@ -97,7 +97,7 @@ { required: true, message: '请选择主体角色', trigger: 'change' } ], reply:[ - { required: true, message: '请输入回复消息', trigger: 'blur' } + { required: true, message: '请输入内容', trigger: 'blur' } ], targetId:[ { required: true, message: '请选择目标角色', trigger: 'change' } @@ -155,6 +155,7 @@ this.initActionData(); this.$message.success('添加动作成功'); this.$emit('create'); + this.resetDisabled(); }).catch(error => { this.$messageBox(`添加动作失败: ${error.message}`); }); @@ -178,6 +179,19 @@ } }); }, + resetDisabled(){ + if(this.$refs['modalData']) + { + debugger; + this.$refs['modalData'].resetFields(); + } + }, + clearValidate(){ + if(this.$refs['modalData']) + { + this.$refs['modalData'].clearValidate(); + } + }, initActionData(){ this.modalData.actionVO.memberId=""; this.modalData.actionVO.targetId=""; @@ -198,6 +212,7 @@ this.isConversitionAdd=true; this.isCommandAdd=false; this.isJinLu=false; + this.clearValidate(); break; } case "Command":{ @@ -212,12 +227,15 @@ { this.isJinLu=false; } + this.clearValidate(); break; } default:{ + this.clearValidate(); break; } } + }, changeCommand(index){ switch(index) @@ -225,13 +243,16 @@ case "Train_Manual_Route_Blocking_Drive":{ this.isJinLu=true; this.getDeviceCode(); + this.clearValidate(); break; } default:{ this.isJinLu=false; + this.clearValidate(); break; } } + }, doShow(data){ if(data) diff --git a/src/views/display/scriptRecord/getAction.vue b/src/views/display/scriptRecord/getAction.vue index b2c4fd04b..21844fee6 100644 --- a/src/views/display/scriptRecord/getAction.vue +++ b/src/views/display/scriptRecord/getAction.vue @@ -9,7 +9,7 @@ - + diff --git a/src/views/scriptManage/category/tree.vue b/src/views/scriptManage/category/tree.vue index 0b9ce255d..0d2ff960b 100644 --- a/src/views/scriptManage/category/tree.vue +++ b/src/views/scriptManage/category/tree.vue @@ -32,8 +32,6 @@