操作定义老地图处理
This commit is contained in:
parent
0adcf6dac1
commit
5036229c47
@ -216,7 +216,7 @@ export default {
|
||||
}
|
||||
},
|
||||
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) {
|
||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||
|
@ -23,6 +23,9 @@ import TrainingEdit from './addEdit';
|
||||
import AddBatch from './addBatch';
|
||||
import SaveAs from './saveAs.vue';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
|
||||
export default {
|
||||
name: 'TrainingRule',
|
||||
@ -97,7 +100,7 @@ export default {
|
||||
return this.$convertField(
|
||||
row.operateType,
|
||||
this.trainingOperateTypeMap[row.trainingType],
|
||||
['code', 'name']
|
||||
['value', 'label']
|
||||
);
|
||||
},
|
||||
tagType: row => {
|
||||
@ -159,41 +162,93 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
if (this.$route.query.drawWay + '' === 'true') {
|
||||
this.trainingOperateTypeMap = {
|
||||
Switch: [],
|
||||
Section: [],
|
||||
Signal: [],
|
||||
Stand: [],
|
||||
Station: [],
|
||||
ControlConvertMenu: [],
|
||||
TrainWindow: []
|
||||
};
|
||||
let val;
|
||||
for ( val in CMD['Switch']) {
|
||||
this.trainingOperateTypeMap['Switch'].push(CMD['Switch'][val]);
|
||||
}
|
||||
for ( val in CMD['Section']) {
|
||||
this.trainingOperateTypeMap['Section'].push(CMD['Section'][val]);
|
||||
}
|
||||
for ( val in CMD['Signal']) {
|
||||
this.trainingOperateTypeMap['Signal'].push(CMD['Signal'][val]);
|
||||
}
|
||||
for ( val in CMD['Stand']) {
|
||||
this.trainingOperateTypeMap['Stand'].push(CMD['Stand'][val]);
|
||||
}
|
||||
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; // 控制权实训
|
||||
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; // 信号机实训
|
||||
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; // 道岔实训
|
||||
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; // 区段实训
|
||||
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; // 站台实训
|
||||
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; // 行车计划实训
|
||||
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; // 列车实训
|
||||
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; // 限速实训
|
||||
});
|
||||
this.placeholderMap = {};
|
||||
getPlaceholderList({ trainingType: '' }).then(res => {
|
||||
res.data.forEach(item => {
|
||||
if (!this.placeholderMap[item.trainingType]) {
|
||||
this.placeholderMap[item.trainingType] = [];
|
||||
}
|
||||
this.placeholderMap[item.trainingType].push(item);
|
||||
this.trainingOperateTypeMap['08'] = []; // 限速实训
|
||||
list.forEach(item => {
|
||||
this.trainingOperateTypeMap['08'].push({value: item.code, label: item.name});
|
||||
});
|
||||
});
|
||||
|
||||
// 获取实训类型
|
||||
this.trainingTypeList = [];
|
||||
this.$Dictionary.trainingType().then(list => {
|
||||
@ -205,6 +260,17 @@ export default {
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
this.placeholderMap = {};
|
||||
getPlaceholderList({ trainingType: '' }).then(res => {
|
||||
res.data.forEach(item => {
|
||||
if (!this.placeholderMap[item.trainingType]) {
|
||||
this.placeholderMap[item.trainingType] = [];
|
||||
}
|
||||
this.placeholderMap[item.trainingType].push(item);
|
||||
});
|
||||
});
|
||||
|
||||
this.reloadTable();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user