Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test_ls
This commit is contained in:
commit
5fa020edcd
@ -175,9 +175,9 @@ export default {
|
||||
'D':'上下行'
|
||||
},
|
||||
typeMap:{
|
||||
'VAN':'客车',
|
||||
'VAN':'客货车',
|
||||
'GOODS_VAN':'货车',
|
||||
'PASSENGER':'客货车'
|
||||
'PASSENGER':'客车'
|
||||
},
|
||||
transfiniteTypeMap:{
|
||||
'NO':'不能接发超限列车',
|
||||
|
@ -147,9 +147,9 @@ export default {
|
||||
{label:'上下行', value:'D'}
|
||||
],
|
||||
typeList:[
|
||||
{label:'客车', value:'VAN'},
|
||||
{label:'客货车', value:'VAN'},
|
||||
{label:'货车', value:'GOODS_VAN'},
|
||||
{label:'客货车', value:'PASSENGER'}
|
||||
{label:'客车', value:'PASSENGER'}
|
||||
],
|
||||
transfiniteTypeList:[
|
||||
{label:'不能接发超限列车', value:'NO'},
|
||||
|
@ -6,9 +6,9 @@
|
||||
<el-button size="small" class="fault-button" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<div class="trainBack">
|
||||
<el-button-group>
|
||||
<el-button type="danger" size="small" @click="init">初始化</el-button>
|
||||
<el-button v-if="!isPause" size="small" type="primary" @click="pauseScript">暂停</el-button>
|
||||
<el-button v-else size="small" type="primary" @click="executePlayScript">恢复</el-button>
|
||||
<el-button v-if="record" v-loading="loading" type="danger" :disabled="loading" size="small" @click="init">初始化</el-button>
|
||||
<el-button v-if="!isPause && record" size="small" type="primary" @click="pauseScript">暂停</el-button>
|
||||
<el-button v-if="isPause && record" size="small" type="primary" @click="executePlayScript">恢复</el-button>
|
||||
<el-button v-if="!trainingSwitch && trainingDetail" type="success" size="small" @click="handlerStart">开始</el-button>
|
||||
<el-button v-if="trainingSwitch" type="danger" size="small" @click="handlerEnd">结束</el-button>
|
||||
<el-button type="primary" size="small" @click="back">返回</el-button>
|
||||
@ -33,11 +33,14 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
groupModel: '',
|
||||
loading: false,
|
||||
faultMode: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
record() { // 编制
|
||||
return this.$route.query.record;
|
||||
},
|
||||
mapId() {
|
||||
return this.$route.query.mapId;
|
||||
},
|
||||
@ -76,6 +79,7 @@ export default {
|
||||
this.$store.dispatch('trainingNew/clearStepOrder');
|
||||
this.$store.dispatch('trainingNew/clearOperateOrder');
|
||||
this.$store.dispatch('trainingNew/changeTeachMode', '');
|
||||
this.$store.dispatch('trainingNew/setSimulationPause', false);
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
@ -148,7 +152,6 @@ export default {
|
||||
this.$store.dispatch('socket/clearTrainingStepTip');
|
||||
this.$store.dispatch('trainingNew/clearStepOrder');
|
||||
this.$store.dispatch('trainingNew/changeTeachMode', '');
|
||||
this.$store.dispatch('trainingNew/setSimulationPause', false);
|
||||
}).catch(() => {
|
||||
this.$message.error('结束实训失败!');
|
||||
});
|
||||
@ -182,6 +185,6 @@ export default {
|
||||
.fault-button{
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 32px;
|
||||
right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -7,7 +7,8 @@
|
||||
</el-button-group>
|
||||
</div>
|
||||
<TrainingList ref="trainingList" @updateDetails="updateDetails" @gradeRules="gradeRules" />
|
||||
<EditDetails ref="editDetails" v-dialogDrag :edit-data="editData" @openEditOperate="openEditOperate" />
|
||||
<EditDetails ref="editDetails" v-dialogDrag :edit-data="editData" @openEditOperate="openEditOperate" @handleCondition="handleCondition" />
|
||||
<EditCondition ref="editCondition" v-dialogDrag :materials-list="materialsList" @editConditionFn="editConditionFn" />
|
||||
<edit-operate ref="editOperate" v-dialogDrag @backStepList="backStepList" />
|
||||
<grade-rules ref="gradeRules" />
|
||||
</div>
|
||||
@ -15,14 +16,17 @@
|
||||
<script>
|
||||
import TrainingList from './trainingList.vue';
|
||||
import EditDetails from './editDetails.vue';
|
||||
import EditCondition from './editCondition.vue';
|
||||
import EditOperate from './editOperate.vue';
|
||||
import GradeRules from './gradeRules.vue';
|
||||
import { getTrainingMaterials } from '@/api/trainingManage';
|
||||
|
||||
export default {
|
||||
name:'DemonMenu',
|
||||
components:{
|
||||
TrainingList,
|
||||
EditDetails,
|
||||
EditCondition,
|
||||
EditOperate,
|
||||
GradeRules
|
||||
},
|
||||
@ -32,6 +36,7 @@ export default {
|
||||
return {
|
||||
hoverBtn: false,
|
||||
btnWidth: -600,
|
||||
materialsList: [],
|
||||
editData: {}
|
||||
};
|
||||
},
|
||||
@ -47,8 +52,24 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getMaterials();
|
||||
},
|
||||
methods:{
|
||||
editConditionFn(data, index, key) {
|
||||
this.$refs.editDetails.editConditionFn(data, index, key);
|
||||
},
|
||||
handleCondition(index, row, key) {
|
||||
this.$refs.editCondition.doShow(row[key], index, key);
|
||||
},
|
||||
getMaterials() {
|
||||
getTrainingMaterials().then(res => {
|
||||
console.log(res, 'Materials');
|
||||
this.materialsList = res.data;
|
||||
}).catch(err => {
|
||||
console.log(err, 'Materials----');
|
||||
this.materialsList = [];
|
||||
});
|
||||
},
|
||||
menuClick() {
|
||||
this.hoverBtn = !this.hoverBtn;
|
||||
if (this.hoverBtn) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="editContentTab">
|
||||
<div v-if="tabVisible" class="editContentTabLable" @click="minisize">
|
||||
<div v-if="tabVisible && record" class="editContentTabLable" @click="minisize">
|
||||
<span class="titleStyle">{{ $t('trainingManage.editTagTitle') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -63,22 +63,18 @@
|
||||
<el-button size="small" type="success" @click="saveStepData">{{ $t('trainingManage.saveStepData') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<EditCondition ref="editCondition" v-dialogDrag :materials-list="materialsList" @editConditionFn="editConditionFn" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateTrainingStep, getTrainingAll, updateTrainingBackgroud, getTrainingStepList, updateTrainingMaplocation, getTrainingMaterials } from '@/api/trainingManage';
|
||||
import { updateTrainingStep, getTrainingAll, updateTrainingBackgroud, getTrainingStepList, updateTrainingMaplocation } from '@/api/trainingManage';
|
||||
import { assignUsersPlayRoles } from '@/api/jointSimulation';
|
||||
import Vue from 'vue';
|
||||
import {covertMemberData} from '@/views/newMap/displayNew/utils';
|
||||
import EditCondition from './editCondition.vue';
|
||||
|
||||
export default {
|
||||
name: 'EditDetails',
|
||||
components:{
|
||||
EditCondition
|
||||
},
|
||||
components:{},
|
||||
props: {
|
||||
editData: {
|
||||
type: Object,
|
||||
@ -94,7 +90,6 @@ export default {
|
||||
dialogVisible: false,
|
||||
roleList: [],
|
||||
tableData: [],
|
||||
materialsList: [],
|
||||
formModel: {
|
||||
mapLocationJson: '',
|
||||
// runPlanId:'',
|
||||
@ -108,6 +103,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
record() { // 编制
|
||||
return this.$route.query.record;
|
||||
},
|
||||
title() {
|
||||
const t = this.$t('trainingManage.editTagTitle');
|
||||
return t;
|
||||
@ -206,7 +204,7 @@ export default {
|
||||
},
|
||||
handleCondition(index, row, key) {
|
||||
console.log(key, '条件', index, row);
|
||||
this.$refs.editCondition.doShow(row[key], index, key);
|
||||
this.$emit('handleCondition', index, row, key);
|
||||
this.doClose();
|
||||
},
|
||||
handleEditOperate(index, row) {
|
||||
@ -227,16 +225,6 @@ export default {
|
||||
this.getStepList(data);
|
||||
this.dialogVisible = true;
|
||||
this.tabVisible = true;
|
||||
this.getMaterials();
|
||||
},
|
||||
getMaterials() {
|
||||
getTrainingMaterials().then(res => {
|
||||
console.log(res, 'Materials');
|
||||
this.materialsList = res.data;
|
||||
}).catch(err => {
|
||||
console.log(err, 'Materials----');
|
||||
this.materialsList = [];
|
||||
});
|
||||
},
|
||||
saveStepData() {
|
||||
const list = [];
|
||||
|
@ -182,7 +182,14 @@ export default {
|
||||
return list;
|
||||
},
|
||||
drawUp(index, row) {
|
||||
console.log('编辑', index, row);
|
||||
if (this.trainingSwitch) {
|
||||
this.$message.error('请先结束当前实训再编制!');
|
||||
return;
|
||||
}
|
||||
const qObj = {...this.$route.query};
|
||||
qObj.record = true;
|
||||
this.$router.push({ query:{...qObj}});
|
||||
console.log('编辑', qObj, index, row);
|
||||
getTrainingAll(row.id).then(resp => {
|
||||
this.$store.dispatch('trainingNew/setTrainingDetail', null);
|
||||
if (resp.data && resp.data.mapLocationJson) {
|
||||
@ -239,6 +246,9 @@ export default {
|
||||
this.$message.error('请先结束当前实训后再加载新的实训!');
|
||||
return;
|
||||
}
|
||||
const qObj = {...this.$route.query};
|
||||
delete qObj.record;
|
||||
this.$router.push({ query:{...qObj}});
|
||||
try {
|
||||
const detailResp = await getTrainingAll(data.id);
|
||||
this.training = detailResp.data;
|
||||
|
Loading…
Reference in New Issue
Block a user