@@ -153,7 +155,7 @@ export default {
triggerDeviceStatus:'',
triggerDeviceType :'',
type:'DEVICE',
- triggeringTime: '',
+ triggerTime: '',
triggerAssociatedDeviceCode: ''
}
},
@@ -230,6 +232,9 @@ export default {
return name;
},
formatTriggerStatus(condition) {
+ if (!condition.triggerDeviceType) {
+ return '';
+ }
const faultStatus = FaultStatusEnum[condition.triggerDeviceType];
return faultStatus[condition.triggerDeviceStatus];
},
@@ -330,7 +335,7 @@ export default {
triggerDeviceStatus:'',
triggerDeviceType :'',
type:'DEVICE',
- triggeringTime: '',
+ triggerTime: '',
triggerAssociatedDeviceCode: ''
}
};
@@ -385,11 +390,11 @@ export default {
this.$messageBox('请选择触发状态');
return;
}
- if (this.triggerMode === 'DEVICE' && this.faultRule.faultType == '') {
+ if (this.faultRule.faultType == '') {
this.$messageBox('请选择故障类型');
return;
}
- if (this.triggerMode === 'TIME' && this.faultRule.condition.triggeringTime) {
+ if (this.triggerMode === 'TIME' && this.faultRule.condition.triggerTime == '') {
this.$messageBox('请选择触发时间');
return;
}
@@ -397,7 +402,20 @@ export default {
this.$messageBox('请选择关联设备');
return;
}
- setFailureModeNew(this.faultRule, this.$route.query.group).then(res=>{
+ const param = {
+ targetDeviceCode:this.targetDevice.code,
+ targetDeviceType:this.covertType(this.targetDevice._type),
+ faultType: this.faultRule.faultType,
+ condition:{
+ triggerDeviceCode: this.faultRule.condition.triggerDeviceCode || null,
+ triggerDeviceStatus:this.faultRule.condition.triggerDeviceStatus || null,
+ triggerDeviceType :this.faultRule.condition.triggerDeviceType || null,
+ type:this.faultRule.condition.type,
+ triggerTime: this.faultRule.condition.triggerTime || null,
+ triggerAssociatedDeviceCode: this.faultRule.condition.triggerAssociatedDeviceCode || null
+ }
+ };
+ setFailureModeNew(param, this.$route.query.group).then(res=>{
this.$message.success('创建故障成功!');
this.resetForm();
}).catch((error)=>{
diff --git a/src/views/newMap/displayNew/dispatherContest/index.vue b/src/views/newMap/displayNew/dispatherContest/index.vue
index 64e94d8eb..959c1a1d3 100644
--- a/src/views/newMap/displayNew/dispatherContest/index.vue
+++ b/src/views/newMap/displayNew/dispatherContest/index.vue
@@ -256,6 +256,7 @@ export default {
clearTimeout(this.time);
}
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
+ this.$store.dispatch('scriptRecord/updateOperationalItemVOs', {});
this.$store.dispatch('map/resetActiveTrainList', true);
},
mounted() {
@@ -391,6 +392,7 @@ export default {
competitionPracticalSceneExit(this.group).then(resp => {
getSimulationInfoNew(this.group).then((res)=>{
EventBus.$emit('quitScene');
+ this.$store.dispatch('scriptRecord/updateOperationalItemVOs', {});
this.quitQuest();
// this.initLoadPage();
this.clearAllData();
diff --git a/src/views/newMap/displayNew/dispatherContest/operationalStatistic.vue b/src/views/newMap/displayNew/dispatherContest/operationalStatistic.vue
index a79759c66..644b966fb 100644
--- a/src/views/newMap/displayNew/dispatherContest/operationalStatistic.vue
+++ b/src/views/newMap/displayNew/dispatherContest/operationalStatistic.vue
@@ -10,6 +10,7 @@
{{ item.description+':' }}
{changeData(val,index)}) "
/>
+ {changeNoTimeData(val,index)}) " />