剧本接口调整(预览与 删除剧本开始执行接口)
This commit is contained in:
parent
ab94e1f981
commit
3ae8582f05
@ -27,6 +27,14 @@ export function setFailureModeNew(data, group) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 获取仿真待触发的故障列表*/
|
||||||
|
export function getSimulationFaultRules(group) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${group}/faultMode/faultRule`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 创建故障规则(新版)
|
// 创建故障规则(新版)
|
||||||
export function addFailureRule(data) {
|
export function addFailureRule(data) {
|
||||||
return request({
|
return request({
|
||||||
@ -345,14 +353,6 @@ export function selectScriptMembers(group, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 剧本开始执行(新版) */
|
|
||||||
export function scriptExecuteNew(group) {
|
|
||||||
return request({
|
|
||||||
url: `/api/scriptExecute/${group}`,
|
|
||||||
method: 'put'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 选择剧本演出成员角色 (新版地图)*/
|
/** 选择剧本演出成员角色 (新版地图)*/
|
||||||
export function selectScriptMembersNew(group, data) {
|
export function selectScriptMembersNew(group, data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -14,12 +14,12 @@
|
|||||||
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
||||||
<el-button v-if="notScript && runing && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
<el-button v-if="notScript && runing && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||||
<el-button v-if="!runing && notScript && !dataError" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
<el-button v-if="!runing && notScript && !dataError" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||||
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
|
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">自动故障设置</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
<el-radio-group v-if="!isScheduling && !dataError" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
<el-radio-group v-if="!isScheduling && !dataError" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">故障模式</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
|
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
|
||||||
@ -39,7 +39,7 @@ import { OperateMode } from '@/scripts/ConstDic';
|
|||||||
// import { getStationList } from '@/api/runplan';
|
// import { getStationList } from '@/api/runplan';
|
||||||
import { getByGroupStationList } from '@/api/jmap/map';
|
import { getByGroupStationList } from '@/api/jmap/map';
|
||||||
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
|
||||||
import { getEveryDayRunPlanNew, loadScriptNew, scriptExecuteNew } from '@/api/simulation';
|
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
// 右上角操作
|
// 右上角操作
|
||||||
@ -120,6 +120,10 @@ export default {
|
|||||||
},
|
},
|
||||||
isLocalStation() {
|
isLocalStation() {
|
||||||
return this.$store.state.training.prdType === '01';
|
return this.$store.state.training.prdType === '01';
|
||||||
|
},
|
||||||
|
drawWay() {
|
||||||
|
const drawWay = this.$route.query.drawWay;
|
||||||
|
return drawWay && JSON.parse(drawWay);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -201,6 +205,7 @@ export default {
|
|||||||
async selectQuest(row, id, mapLocation, roleName) {
|
async selectQuest(row, id, mapLocation, roleName) {
|
||||||
try {
|
try {
|
||||||
let res;
|
let res;
|
||||||
|
debugger;
|
||||||
if (this.isDesignPlatform) {
|
if (this.isDesignPlatform) {
|
||||||
res = this.drawWay ? await loadDraftScriptNew(id, this.group) : await loadDraftScript(row.id, id, this.group);
|
res = this.drawWay ? await loadDraftScriptNew(id, this.group) : await loadDraftScript(row.id, id, this.group);
|
||||||
} else {
|
} else {
|
||||||
@ -212,10 +217,6 @@ export default {
|
|||||||
const newMapLocation = {'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
const newMapLocation = {'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
||||||
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
||||||
}
|
}
|
||||||
scriptExecuteNew(this.group).then(data=>{
|
|
||||||
}).catch(error=>{
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.$emit('selectQuest', row);
|
this.$emit('selectQuest', row);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user