添加子系统生成页面
This commit is contained in:
parent
fa4c7a6599
commit
534fa388e8
@ -25,3 +25,11 @@ export function getTrainingSystemListByMapId(mapId) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
export function generateMapSystem(mapId) {
|
||||
/** 根据mapId生成地图子系统 */
|
||||
return request({
|
||||
url: `/api/mapSystem/generate/${mapId}`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ export default {
|
||||
scriptPreview: 'Script Preview',
|
||||
passedScript: 'Passed Script',
|
||||
rejectScript: 'Reject Script',
|
||||
explanation: 'explanation',
|
||||
explanation: 'Explanation',
|
||||
inputScriptName: 'Please input script name',
|
||||
inputRejectExplanation: 'Please input reject explanation',
|
||||
passedScriptSuccess: 'Passed script success',
|
||||
|
@ -229,5 +229,6 @@ export default {
|
||||
editPlanningTrain: 'Edit planning train',
|
||||
runGraphName: 'Run graph name',
|
||||
tipOperationTime: '请先设置区段站间运行时间, 【文件】-> 【修改站间运行时间】',
|
||||
serverTrainNum: '表号车次号'
|
||||
serverTrainNum: '表号车次号',
|
||||
explanation: 'Explanation'
|
||||
};
|
||||
|
@ -66,5 +66,6 @@ export default {
|
||||
releaseApplication: 'Release application',
|
||||
courseApplication: 'Course release application',
|
||||
scriptReleaseApplication: 'Script release application',
|
||||
runGraphReleaseApplication: 'Run graph release application'
|
||||
runGraphReleaseApplication: 'Run graph release application',
|
||||
subsystemGeneration: 'Subsystem generation'
|
||||
};
|
||||
|
@ -232,5 +232,6 @@ export default {
|
||||
endTime: '终到时间',
|
||||
editPlanningTrain: '编辑计划车',
|
||||
tipOperationTime: '请先设置区段站间运行时间, 【文件】-> 【修改站间运行时间】',
|
||||
serverTrainNum: '表号车次号'
|
||||
serverTrainNum: '表号车次号',
|
||||
explanation: '驳回说明',
|
||||
};
|
||||
|
@ -67,5 +67,6 @@ export default {
|
||||
releaseApplication: '发布申请',
|
||||
courseApplication: '课程发布申请',
|
||||
scriptReleaseApplication: '剧本发布申请',
|
||||
runGraphReleaseApplication: '运行图发布申请'
|
||||
runGraphReleaseApplication: '运行图发布申请',
|
||||
subsystemGeneration: '子系统生成'
|
||||
};
|
||||
|
@ -110,7 +110,10 @@ import CacheControl from '@/views/management/cacheControl/index';
|
||||
|
||||
import LessonApproval from '@/views/approval/lesson/index';
|
||||
import ScriptApproval from '@/views/approval/script/index';
|
||||
import runPlanApproval from '@/views/approval/runPlan/index';
|
||||
import RunPlanApproval from '@/views/approval/runPlan/index';
|
||||
|
||||
import SystemGenerate from '@/views/systemGenerate/index';
|
||||
|
||||
import { loginTitle } from '@/scripts/ConstDic';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
@ -1045,6 +1048,13 @@ export const asyncRouter = [
|
||||
meta: {
|
||||
i18n: 'router.existingSimulation'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'systemGenerate',
|
||||
component: SystemGenerate,
|
||||
meta: {
|
||||
i18n: 'router.subsystemGeneration'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1072,7 +1082,7 @@ export const asyncRouter = [
|
||||
},
|
||||
{
|
||||
path: 'runGraph',
|
||||
component: runPlanApproval,
|
||||
component: RunPlanApproval,
|
||||
meta: {
|
||||
i18n: 'router.runGraphReleaseApplication'
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<el-card :style="{height: height+'px'}">
|
||||
<div class="runPlanHeader">
|
||||
<div class="runPlanList">运行图列表</div>
|
||||
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan" v-if="isCreate">创建运行图</el-button>
|
||||
<div class="runPlanList">{{$t('planMonitor.openRunPlan.runPlanList')}}</div>
|
||||
<el-button size="small" type="primary" @click="handleCreate" class="createRunPlan" v-if="isCreate">{{$t('planMonitor.createRunningDiagram')}}</el-button>
|
||||
</div>
|
||||
<el-table :data="runPlanList" height="600" stripe
|
||||
border
|
||||
style="width: 90%;margin-left:5%;margin-top:20px;display: inline-block;">
|
||||
<el-table-column prop="name" label="运行图名称" />
|
||||
<el-table-column label="状态">
|
||||
<el-table-column prop="name" :label="this.$t('planMonitor.runGraphName')" />
|
||||
<el-table-column :label="this.$('global.status')">
|
||||
<template slot-scope="scope">
|
||||
<span>{{handlerStatus(scope.row)}}</span>
|
||||
</template>
|
||||
|
62
src/views/systemGenerate/index.vue
Normal file
62
src/views/systemGenerate/index.vue
Normal file
@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>地图子系统生成</b>
|
||||
</div>
|
||||
<div style="margin:50px" :style="{ height: height - 160 +'px' }">
|
||||
<el-select v-model="mapId" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in mapList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button type="primary" @click="generate">生成</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { generateMapSystem } from '@/api/trainingPlatform';
|
||||
|
||||
export default {
|
||||
name: 'SystemGenerate',
|
||||
data() {
|
||||
return{
|
||||
mapList:[],
|
||||
mapId: ''
|
||||
}
|
||||
},
|
||||
created(){
|
||||
listPublishMap().then(response=>{
|
||||
response.data.forEach(elem => {
|
||||
this.mapList.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 50;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
generate() {
|
||||
if(!this.mapId){this.$messageBox('请选择要生成子系统的地图!'); return;}
|
||||
this.$confirm('此操作将生成该地图下子系统,是否继续?', this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
generateMapSystem(this.mapId).then(response => {
|
||||
this.$message.success('生成该地图下子系统成功!');
|
||||
}).catch(() => {
|
||||
this.$messageBox('生成该地图下子系统失败!');
|
||||
});
|
||||
}).catch(() => { });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user