调整剧本内容判断
This commit is contained in:
parent
04c51b0aca
commit
a6a91bfcff
@ -159,29 +159,42 @@ export default {
|
||||
// const command = CommandHandler.getScriptDefinition(element.operationType);
|
||||
const commandName = element.operationType;
|
||||
if (commandName != 'Set_Fault' && commandName != 'Cancel_Fault' ) {
|
||||
const list = ['Train_Update_Type',
|
||||
'Train_Add_Train_Trace',
|
||||
'Train_Remove_Train_Trace',
|
||||
'Train_Move_Train_Trace',
|
||||
'Train_Set_Plan',
|
||||
'Train_Set_Head',
|
||||
'Train_Set_Manual',
|
||||
'Train_Set_Crew_Number',
|
||||
'Train_Tag_Atp_Cut',
|
||||
'Train_Tag_Atp_Recover',
|
||||
'Train_Allow_Pass',
|
||||
'Train_Info'];
|
||||
let operateType = commandName.split('_')[0];
|
||||
if (list.includes(commandName)) {
|
||||
operateType = 'TrainWindow';
|
||||
// const list = ['Train_Update_Type',
|
||||
// 'Train_Add_Train_Trace',
|
||||
// 'Train_Remove_Train_Trace',
|
||||
// 'Train_Move_Train_Trace',
|
||||
// 'Train_Set_Plan',
|
||||
// 'Train_Set_Head',
|
||||
// 'Train_Set_Manual',
|
||||
// 'Train_Set_Crew_Number',
|
||||
// 'Train_Tag_Atp_Cut',
|
||||
// 'Train_Tag_Atp_Recover',
|
||||
// 'Train_Allow_Pass',
|
||||
// 'Train_Info'];
|
||||
// let operateType = commandName.split('_')[0];
|
||||
// if (list.includes(commandName)) {
|
||||
// operateType = 'TrainWindow';
|
||||
// }
|
||||
// if (operateType == 'CM') {
|
||||
// operateType = 'ControlConvertMenu';
|
||||
// }
|
||||
let operateName = null;
|
||||
let operateType = '';
|
||||
Object.keys(CMD).forEach(key => {
|
||||
Object.values(CMD[key]).forEach(el => {
|
||||
if (el.value == commandName) {
|
||||
operateType = key;
|
||||
operateName = el;
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
// const operateName = Object.values(CMD[operateType]).find(res=>{ return res.value == commandName; });
|
||||
if (operateName) {
|
||||
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式', Driver:'司机', Train:'列车'};
|
||||
const operateTypeName = deviceTypeList[operateType];
|
||||
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false});
|
||||
}
|
||||
if (operateType == 'CM') {
|
||||
operateType = 'ControlConvertMenu';
|
||||
}
|
||||
const operateName = Object.values(CMD[operateType]).find(res=>{ return res.value == commandName; });
|
||||
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式', Driver:'司机', Train:'列车'};
|
||||
const operateTypeName = deviceTypeList[operateType];
|
||||
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false});
|
||||
} else {
|
||||
// deviceFaultType
|
||||
// element.operationParamMap.faultType;
|
||||
|
@ -24,28 +24,28 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-button-group class="button-group" v-if="!isReplaceBg">
|
||||
<el-button v-if="isPause" size="small" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button>
|
||||
<el-button v-else size="small" type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复</el-button>
|
||||
<el-button size="small" type="danger" :disabled="!backDisabled" @click="dumpScenesData">{{ $t('scriptRecord.resetScript') }}</el-button>
|
||||
<el-button size="small" type="primary" v-if="backDisabled" @click="startReplaceBg">{{ $t('scriptRecord.startReplaceBg') }}</el-button>
|
||||
<el-button size="small" type="primary" v-else :disabled="backDisabled" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button>
|
||||
<el-button size="small" type="success" :loading="isSavingScript" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-if="!isReplaceBg" class="button-group">
|
||||
<el-button v-if="isPause" size="small" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button>
|
||||
<el-button v-else size="small" type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复</el-button>
|
||||
<el-button size="small" type="danger" :disabled="!backDisabled" @click="dumpScenesData">{{ $t('scriptRecord.resetScript') }}</el-button>
|
||||
<el-button v-if="backDisabled" size="small" type="primary" @click="startReplaceBg">{{ $t('scriptRecord.startReplaceBg') }}</el-button>
|
||||
<el-button v-else size="small" type="primary" :disabled="backDisabled" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button>
|
||||
<el-button size="small" type="success" :loading="isSavingScript" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div class="scriptPanelRight">
|
||||
<get-action-new ref="getAction" :group="group" :size="size" :member-list="memberList" @showConditionManage="showConditionManage" />
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="isReplaceBg">
|
||||
<div class="mask"/>
|
||||
<el-button-group class="button-group">
|
||||
<el-button v-if="isPause" size="small" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button>
|
||||
<el-button v-else size="small" type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复</el-button>
|
||||
<el-button size="small" type="primary" @click="confirmReplaceBg">{{ $t('scriptRecord.confirmReplaceBg') }}</el-button>
|
||||
<el-button size="small" type="info" @click="cancelReplaceBg">{{ $t('scriptRecord.cancelReplaceBg') }}</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
<template v-if="isReplaceBg">
|
||||
<div class="mask" />
|
||||
<el-button-group class="button-group">
|
||||
<el-button v-if="isPause" size="small" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button>
|
||||
<el-button v-else size="small" type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复</el-button>
|
||||
<el-button size="small" type="primary" @click="confirmReplaceBg">{{ $t('scriptRecord.confirmReplaceBg') }}</el-button>
|
||||
<el-button size="small" type="info" @click="cancelReplaceBg">{{ $t('scriptRecord.cancelReplaceBg') }}</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="所有成员">
|
||||
<div class="eachScriptPanel">
|
||||
@ -60,10 +60,10 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="scriptRecordNewTitle" @click="minisize">
|
||||
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="scriptRecordNewTitle" @click="minisize">
|
||||
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" />
|
||||
<condition-manage ref="conditionManage" />
|
||||
@ -102,10 +102,10 @@ export default {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
isReplaceBg: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
isReplaceBg: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
},
|
||||
orignalUserRoleId() {
|
||||
return this.$store.state.training.orignalUserRoleId;
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
@ -535,32 +535,32 @@ export default {
|
||||
);
|
||||
this.oldMember = Object.assign({}, role);
|
||||
this.$refs.allScriptRole.updateLoading();
|
||||
},
|
||||
startReplaceBg() {
|
||||
startReplaceBg(this.group).then(resp => {
|
||||
this.$emit('setReplace', true);
|
||||
}).catch(error => {
|
||||
this.$messageBox(error.message);
|
||||
})
|
||||
},
|
||||
confirmReplaceBg() {
|
||||
confirmReplaceBg(this.group).then(resp => {
|
||||
this.$message.success('替换成功');
|
||||
this.$emit('setReplace', false);
|
||||
}).catch(error => {
|
||||
this.$messageBox(error.message);
|
||||
})
|
||||
},
|
||||
cancelReplaceBg() {
|
||||
cancelReplaceBg(this.group).then(resp => {
|
||||
this.$emit('setReplace', false);
|
||||
}).catch(error => {
|
||||
this.$messageBox(error.message);
|
||||
})
|
||||
},
|
||||
showConditionManage(actionInfo) {
|
||||
this.$refs.conditionManage.doShow(actionInfo);
|
||||
}
|
||||
},
|
||||
startReplaceBg() {
|
||||
startReplaceBg(this.group).then(resp => {
|
||||
this.$emit('setReplace', true);
|
||||
}).catch(error => {
|
||||
this.$messageBox(error.message);
|
||||
});
|
||||
},
|
||||
confirmReplaceBg() {
|
||||
confirmReplaceBg(this.group).then(resp => {
|
||||
this.$message.success('替换成功');
|
||||
this.$emit('setReplace', false);
|
||||
}).catch(error => {
|
||||
this.$messageBox(error.message);
|
||||
});
|
||||
},
|
||||
cancelReplaceBg() {
|
||||
cancelReplaceBg(this.group).then(resp => {
|
||||
this.$emit('setReplace', false);
|
||||
}).catch(error => {
|
||||
this.$messageBox(error.message);
|
||||
});
|
||||
},
|
||||
showConditionManage(actionInfo) {
|
||||
this.$refs.conditionManage.doShow(actionInfo);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user