剧本编制模块修改

This commit is contained in:
joylink_cuiweidong 2019-08-19 19:37:52 +08:00
parent 146be45957
commit d7bf9a172c
3 changed files with 25 additions and 19 deletions

View File

@ -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 => {

View File

@ -19,7 +19,7 @@
<el-form-item label="内容" class="conditionVO" prop="actionVO.reply" v-if="isConversitionAdd">
<el-input v-model="modalData.actionVO.reply" type="textarea" class="textareaStyle" rows="3" :disabled="isPause&&isNotModify"></el-input>
</el-form-item>
<el-form-item label="设备指令" class="conditionVO" prop="actionVO.type" v-if="isCommandAdd">
<el-form-item label="设备指令" class="conditionVO" prop="actionVO.deviceCommand" v-if="isCommandAdd">
<el-select v-model="modalData.actionVO.deviceCommand " placeholder="请选择设备指令" @change="changeCommand" class="inputStyle" :disabled="isPause&&isModify">
<el-option v-for="deviceCommand in deviceCommandList" :key="deviceCommand.deviceCommand" :label="deviceCommand.label" :value="deviceCommand.deviceCommand"></el-option>
</el-select>
@ -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":{

View File

@ -155,6 +155,7 @@
}).then(() => {
dumpScriptData(group).then(resp => {
// this.isSaveStage = true;
this.$parent.resetBeginTime();
this.$refs["getAction"].loadInitData();
this.initAutoSaveScript();
this.$message.success('清除数据成功');