操作定义老地图处理
This commit is contained in:
parent
0adcf6dac1
commit
5036229c47
@ -216,7 +216,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
operationManage() {
|
operationManage() {
|
||||||
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, lineCode: this.$route.query.lineCode}});
|
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, lineCode: this.$route.query.lineCode, drawWay: this.$route.query.drawWay}});
|
||||||
},
|
},
|
||||||
revertLesson(index, row) {
|
revertLesson(index, row) {
|
||||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="height: 100%; overflow-y: auto;">
|
<div style="height: 100%; overflow-y: auto;">
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 98%;margin-left:1%;margin-top:20px;" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 98%;margin-left:1%;margin-top:20px;" />
|
||||||
<training-edit ref="create" type="ADD" @reloadTable="reloadTable" />
|
<training-edit ref="create" type="ADD" @reloadTable="reloadTable" />
|
||||||
<training-edit ref="edit" type="EDIT" @reloadTable="reloadTable" />
|
<training-edit ref="edit" type="EDIT" @reloadTable="reloadTable" />
|
||||||
<add-batch ref="addBatch" @reloadTable="reloadTable" />
|
<add-batch ref="addBatch" @reloadTable="reloadTable" />
|
||||||
@ -23,6 +23,9 @@ import TrainingEdit from './addEdit';
|
|||||||
import AddBatch from './addBatch';
|
import AddBatch from './addBatch';
|
||||||
import SaveAs from './saveAs.vue';
|
import SaveAs from './saveAs.vue';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
|
import Cookies from 'js-cookie';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainingRule',
|
name: 'TrainingRule',
|
||||||
@ -97,7 +100,7 @@ export default {
|
|||||||
return this.$convertField(
|
return this.$convertField(
|
||||||
row.operateType,
|
row.operateType,
|
||||||
this.trainingOperateTypeMap[row.trainingType],
|
this.trainingOperateTypeMap[row.trainingType],
|
||||||
['code', 'name']
|
['value', 'label']
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
tagType: row => {
|
tagType: row => {
|
||||||
@ -159,31 +162,106 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
this.trainingOperateTypeMap = {};
|
if (this.$route.query.drawWay + '' === 'true') {
|
||||||
this.$Dictionary.stationControl().then(list => {
|
this.trainingOperateTypeMap = {
|
||||||
this.trainingOperateTypeMap['01'] = list; // 控制权实训
|
Switch: [],
|
||||||
});
|
Section: [],
|
||||||
this.$Dictionary.signalOperation().then(list => {
|
Signal: [],
|
||||||
this.trainingOperateTypeMap['02'] = list; // 信号机实训
|
Stand: [],
|
||||||
});
|
Station: [],
|
||||||
this.$Dictionary.switchOperation().then(list => {
|
ControlConvertMenu: [],
|
||||||
this.trainingOperateTypeMap['03'] = list; // 道岔实训
|
TrainWindow: []
|
||||||
});
|
};
|
||||||
this.$Dictionary.sectionOperation().then(list => {
|
let val;
|
||||||
this.trainingOperateTypeMap['04'] = list; // 区段实训
|
for ( val in CMD['Switch']) {
|
||||||
});
|
this.trainingOperateTypeMap['Switch'].push(CMD['Switch'][val]);
|
||||||
this.$Dictionary.stationStandOperation().then(list => {
|
}
|
||||||
this.trainingOperateTypeMap['05'] = list; // 站台实训
|
for ( val in CMD['Section']) {
|
||||||
});
|
this.trainingOperateTypeMap['Section'].push(CMD['Section'][val]);
|
||||||
this.$Dictionary.trainPlanOperation().then(list => {
|
}
|
||||||
this.trainingOperateTypeMap['06'] = list; // 行车计划实训
|
for ( val in CMD['Signal']) {
|
||||||
});
|
this.trainingOperateTypeMap['Signal'].push(CMD['Signal'][val]);
|
||||||
this.$Dictionary.trainOperation().then(list => {
|
}
|
||||||
this.trainingOperateTypeMap['07'] = list; // 列车实训
|
for ( val in CMD['Stand']) {
|
||||||
});
|
this.trainingOperateTypeMap['Stand'].push(CMD['Stand'][val]);
|
||||||
this.$Dictionary.limitOperation().then(list => {
|
}
|
||||||
this.trainingOperateTypeMap['08'] = list; // 限速实训
|
for ( val in CMD['Station']) {
|
||||||
});
|
this.trainingOperateTypeMap['Station'].push(CMD['Station'][val]);
|
||||||
|
}
|
||||||
|
for ( val in CMD['ControlConvertMenu']) {
|
||||||
|
this.trainingOperateTypeMap['ControlConvertMenu'].push(CMD['ControlConvertMenu'][val]);
|
||||||
|
}
|
||||||
|
for ( val in CMD['Train']) {
|
||||||
|
this.trainingOperateTypeMap['TrainWindow'].push(CMD['Train'][val]);
|
||||||
|
}
|
||||||
|
const trainingDeviceTypeList = ConstConfig.ConstSelect.trainingDeviceType || {};
|
||||||
|
for (val in trainingDeviceTypeList) {
|
||||||
|
this.trainingTypeList.push({code: val, name: Cookies.get('user_lang') == 'en' ? trainingDeviceTypeList[val].enlabel : trainingDeviceTypeList[val].label});
|
||||||
|
this.queryForm.queryObject.trainingType.config.data.push({value: val, label: Cookies.get('user_lang') == 'en' ? trainingDeviceTypeList[val].enlabel : trainingDeviceTypeList[val].label});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.trainingOperateTypeMap = {};
|
||||||
|
this.$Dictionary.stationControl().then(list => {
|
||||||
|
this.trainingOperateTypeMap['01'] = []; // 控制权实训
|
||||||
|
list.forEach(item => {
|
||||||
|
this.trainingOperateTypeMap['01'].push({value: item.code, label: item.name});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$Dictionary.signalOperation().then(list => {
|
||||||
|
this.trainingOperateTypeMap['02'] = []; // 信号机实训
|
||||||
|
list.forEach(item => {
|
||||||
|
this.trainingOperateTypeMap['02'].push({value: item.code, label: item.name});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$Dictionary.switchOperation().then(list => {
|
||||||
|
this.trainingOperateTypeMap['03'] = []; // 道岔实训
|
||||||
|
list.forEach(item => {
|
||||||
|
this.trainingOperateTypeMap['03'].push({value: item.code, label: item.name});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$Dictionary.sectionOperation().then(list => {
|
||||||
|
this.trainingOperateTypeMap['04'] = []; // 区段实训
|
||||||
|
list.forEach(item => {
|
||||||
|
this.trainingOperateTypeMap['04'].push({value: item.code, label: item.name});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$Dictionary.stationStandOperation().then(list => {
|
||||||
|
this.trainingOperateTypeMap['05'] = []; // 站台实训
|
||||||
|
list.forEach(item => {
|
||||||
|
this.trainingOperateTypeMap['05'].push({value: item.code, label: item.name});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$Dictionary.trainPlanOperation().then(list => {
|
||||||
|
this.trainingOperateTypeMap['06'] = []; // 行车计划实训
|
||||||
|
list.forEach(item => {
|
||||||
|
this.trainingOperateTypeMap['06'].push({value: item.code, label: item.name});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$Dictionary.trainOperation().then(list => {
|
||||||
|
this.trainingOperateTypeMap['07'] = []; // 列车实训
|
||||||
|
list.forEach(item => {
|
||||||
|
this.trainingOperateTypeMap['07'].push({value: item.code, label: item.name});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.$Dictionary.limitOperation().then(list => {
|
||||||
|
this.trainingOperateTypeMap['08'] = []; // 限速实训
|
||||||
|
list.forEach(item => {
|
||||||
|
this.trainingOperateTypeMap['08'].push({value: item.code, label: item.name});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// 获取实训类型
|
||||||
|
this.trainingTypeList = [];
|
||||||
|
this.$Dictionary.trainingType().then(list => {
|
||||||
|
this.trainingTypeList = list;
|
||||||
|
list.forEach(elem => {
|
||||||
|
this.queryForm.queryObject.trainingType.config.data.push({
|
||||||
|
value: elem.code,
|
||||||
|
label: elem.name
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.placeholderMap = {};
|
this.placeholderMap = {};
|
||||||
getPlaceholderList({ trainingType: '' }).then(res => {
|
getPlaceholderList({ trainingType: '' }).then(res => {
|
||||||
res.data.forEach(item => {
|
res.data.forEach(item => {
|
||||||
@ -194,18 +272,6 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 获取实训类型
|
|
||||||
this.trainingTypeList = [];
|
|
||||||
this.$Dictionary.trainingType().then(list => {
|
|
||||||
this.trainingTypeList = list;
|
|
||||||
list.forEach(elem => {
|
|
||||||
this.queryForm.queryObject.trainingType.config.data.push({
|
|
||||||
value: elem.code,
|
|
||||||
label: elem.name
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
},
|
},
|
||||||
repliceName(fieldValue, enumList) {
|
repliceName(fieldValue, enumList) {
|
||||||
|
Loading…
Reference in New Issue
Block a user