Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
b56cbb47d0
@ -479,7 +479,7 @@ export function scriptPause(group) {
|
||||
/** 暂停仿真 */
|
||||
export function simulationPause(group) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/pause`,
|
||||
url: `/simulation/${group}/pause`,
|
||||
method: 'PUT'
|
||||
});
|
||||
}
|
||||
@ -542,6 +542,14 @@ export function scriptDraftRecordNotify(scriptId) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 预览脚本仿真(新版)*/
|
||||
export function scriptDraftRecordNotifyNew(scriptId) {
|
||||
return request({
|
||||
url: `/api/scriptSimulation/${scriptId}/preview`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
/** 新版地图创建仿真 */
|
||||
export function createSimulationNew(params) {
|
||||
return request({
|
||||
|
@ -18,6 +18,7 @@ const Jlmap3dTrain = () => import('@/views/jlmap3d/devicetrain/jl3ddevicetrain')
|
||||
const Display = () => import('@/views/display/index');
|
||||
const DisplayNew = () => import('@/views/newMap/displayNew/index');
|
||||
const DesignDisplay = () => import('@/views/display/designIndex');
|
||||
const DesignDisplayNew = () => import('@/views/newMap/displayNew/designIndex');
|
||||
|
||||
const TrainRoom = () => import('@/views/trainRoom/index');
|
||||
const JointTraining = () => import('@/views/jointTraining/index');
|
||||
@ -402,6 +403,13 @@ export const asyncRouter = [
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/design/displayNew/:mode',
|
||||
component: DesignDisplayNew,
|
||||
meta: {
|
||||
},
|
||||
hidden: true
|
||||
},
|
||||
{ // 剧本编辑 战场图
|
||||
path: '/scriptDisplay/:mode',
|
||||
component: ScriptDisplay,
|
||||
|
@ -2240,6 +2240,7 @@ export const UrlConfig = {
|
||||
runPlan: '/design/runPlan/detail',
|
||||
scriptHome: '/design/script/home',
|
||||
display: '/design/display',
|
||||
displayNew: '/design/displayNew',
|
||||
mapPreview: '/design/mapPreview',
|
||||
mapPreviewNew: '/design/mapPreviewNew',
|
||||
ibpHome: '/design/ibp/home'
|
||||
|
@ -48,12 +48,11 @@
|
||||
import RunPlanLoad from './demon/runPlanLoad';
|
||||
import RunPlanView from './demon/runPlanView';
|
||||
import FaultChoose from './demon/faultChoose';
|
||||
import MapSystemDraft from '@/views/mapsystem/index';
|
||||
import MenuLesson from '@/views/display/menuLesson';
|
||||
import MenuDemon from '@/views/display/menuDemon';
|
||||
import MenuSchema from '@/views/display/menuSchema';
|
||||
import MenuSystemTime from '@/views/display/menuSystemTime';
|
||||
import MenuScript from '@/views/display/menuScript';
|
||||
import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
||||
import MenuDemon from '@/views/newMap/displayNew/menuDemon';
|
||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import MenuScript from '@/views/newMap/displayNew/menuScript';
|
||||
import AddQuest from './demon/addQuest';
|
||||
import Scheduling from './demon/scheduling';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -77,7 +76,6 @@ export default {
|
||||
RunPlanView,
|
||||
FaultChoose,
|
||||
AddQuest,
|
||||
MenuLesson,
|
||||
MapSystemDraft,
|
||||
MenuDemon,
|
||||
MenuScript,
|
||||
|
@ -18,7 +18,7 @@ import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import { admin, superAdmin} from '@/router/index_APP_TARGET';
|
||||
import {retractScript, publishScript, updateScript, deleteScript, getScriptPageList, createScript} from '@/api/script';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { scriptDraftRecordNotify, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation';
|
||||
import { scriptDraftRecordNotify, scriptDraftRecordNotifyNew, scriptRecordNotify, scriptRecordNotifyNew } from '@/api/simulation';
|
||||
import CreateScript from './create';
|
||||
import ScriptPublish from './publish';
|
||||
|
||||
@ -264,13 +264,24 @@ export default {
|
||||
}).catch(() => { });
|
||||
},
|
||||
previewScript(index, row) {
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
scriptDraftRecordNotifyNew(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.displayNew}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
} else {
|
||||
scriptDraftRecordNotify(row.id).then(resp => {
|
||||
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
|
||||
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -30,7 +30,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card v-if="this.$route.query.drawWay == 'false'" class="commandCard">
|
||||
<el-card v-if="this.$route.query.drawWay != 'true'" class="commandCard">
|
||||
<div class="addCommand">{{ $t('scriptRecord.addCommand') }}</div>
|
||||
<el-form ref="commandData" size="mini" :model="commandData" :rules="commandRules" label-width="120px" class="actionInfo" label-position="right">
|
||||
<el-form-item :label="$t('scriptRecord.executor')" class="conditionVO" prop="action.memberId">
|
||||
@ -112,7 +112,7 @@ export default {
|
||||
action:{
|
||||
memberId:'',
|
||||
operationType:'',
|
||||
commandParamList:{},
|
||||
operationParamMap:{},
|
||||
type:'Command'
|
||||
}
|
||||
},
|
||||
@ -191,10 +191,18 @@ export default {
|
||||
this.isPause = !(this.$store.state.scriptRecord.simulationPause);
|
||||
this.$parent.$parent.$parent.setIsParse(this.isPause);
|
||||
this.$refs['modalData'].clearValidate();
|
||||
this.$refs['commandData'].clearValidate();
|
||||
if (!val) {
|
||||
this.initActionData();
|
||||
this.initCommandActionData();
|
||||
if (this.$route.query.drawWay == 'true') {
|
||||
this.$refs['commandDataNew'].clearValidate();
|
||||
if (!val) {
|
||||
this.initActionData();
|
||||
this.initCommandActionData();
|
||||
}
|
||||
} else {
|
||||
this.$refs['commandData'].clearValidate();
|
||||
if (!val) {
|
||||
this.initActionData();
|
||||
this.initCommandActionData();
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.scriptRecord.scriptCommand':function (val) {
|
||||
@ -205,7 +213,7 @@ export default {
|
||||
this.executeCommandName = operateTypeName + '(' + val.cmdType.label + ')';
|
||||
this.commandDataNew.action.operationType = val.cmdType.value;
|
||||
this.commandDataNew.action.operationId = val.operationId;
|
||||
this.commandDataNew.action.commandParamList = val.param;
|
||||
this.commandDataNew.action.operationParamMap = val.param;
|
||||
this.messageTips2 = '';
|
||||
}
|
||||
},
|
||||
@ -352,7 +360,7 @@ export default {
|
||||
} else if (this.commandDataNew.action.operationType == '') {
|
||||
this.messageTips2 = '请在右侧的地图中选择操作';
|
||||
return false;
|
||||
} else if (Object.keys(this.commandDataNew.action.commandParamList).length === 0) {
|
||||
} else if (Object.keys(this.commandDataNew.action.operationParamMap).length === 0) {
|
||||
this.messageTips2 = '请在右侧的地图中选择操作';
|
||||
return false;
|
||||
} else {
|
||||
@ -504,7 +512,7 @@ export default {
|
||||
}
|
||||
},
|
||||
resetData() {
|
||||
if (this.$route.query.drawWay == 'false') {
|
||||
if (this.$route.query.drawWay != 'true') {
|
||||
this.$refs.command.resetData();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user