This commit is contained in:
zyy 2020-03-07 19:12:45 +08:00
commit 482df0de33
11 changed files with 307 additions and 67 deletions

View File

@ -90,21 +90,21 @@ class SkinCode extends defaultStyle {
width: 5, // 区段宽度
beyondWidth: 0, // 区段宽超出宽度
invadeColor: '#FFFFFF', // 区段侵入颜色
spareColor: '#5578B6', // 区段空闲颜色
communicationOccupiedColor: 'lightpink', // 区段通信车占用颜色
unCommunicationOccupiedColor: 'red', // 区段非通讯车占用颜色
routeLockColor: 'rgba(0, 255, 0, 1)', // 区段路由锁定颜色
faultLockColor: 'white', // 区段故障锁定颜色
spareColor: '#618cc3', // 区段空闲颜色
communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色
unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色
routeLockColor: '#3FFD46', // 区段进路锁定颜色
faultLockColor: '#006400', // 区段故障锁定颜色
undefinedColor: '#0071C1', // 区段未定义颜色
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
blockColor: 'pink', // 区段封锁颜色
protectionLockedColor: '#3FFD46', // 保护区段锁闭
blockColor: '#00FF00', // 区段封锁颜色
atcExcisionColor: '#A0522D', // 区段atc切除颜色
atsExcisionColor: '#A0522D', // 区段ats切除颜色
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
protectiveLockColor: '#92D14F', // 区段保护锁闭
protectiveLockColor: '#FFFF00', // 区段保护锁闭
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
logicalTextColor: 'white' // 逻辑区段名称颜色 (未用)
logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用)
},
axle: {
radius: 3, // 计轴 半径

View File

@ -501,10 +501,17 @@ class SkinCode extends defaultStyle {
lrPadding: 1, // 两边间隔
upPadding: 1, // 上边距离
trainBodyFillColor: '#000000', // 列车车身填充颜色
trainSidelineColor: '#FFFF00',
trainNameFormat: 'tripNumber:serviceNumber:groupNumber'// 列车显示格式
},
hsda: {
trainHSDATextFontSize: 8// 列车HDSA字号
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 20, // HSDA上边距离
trainHSDATextFontSize: 8, // 列车HDSA字号
textHContent: '扣', // textH文本
textSContent: '跳', // textS文本
textDContent: '门', // textD文本
textAContent: '警' // textA文本
},
trainAtrStatus: {
trainAtrStatusOffset: { x: 68, y: 9},
@ -531,13 +538,15 @@ class SkinCode extends defaultStyle {
trainServer: {
serviceNumberPrefix: '00', // 服务号(表号)前缀
defaultServiceNumber: 'BB', // 默认服务号(表号)
trainServerOffset: { x: 35, y: 3 }// 列车服务号偏移
trainServerOffset: { x: 35, y: 3 }, // 列车服务号偏移
fontColor: '#00C300'
},
trainTarget: {
tripNumberPrefix: '000', // 车次号前缀
defaultDirectionCode: '', // 默认车次号1
defaultTripNumber: 'CCC', // 默认车次号2
trainTargetOffset: { x: 10, y: 3 }// 列车车次号偏移
trainTargetOffset: { x: 10, y: 3 }, // 列车车次号偏移
fontColor: '#00C300'
},
trainTargetNumber: {
groupNumberPrefix: '000', // 车组号前缀

View File

@ -113,6 +113,9 @@ class Status {
handleMapCycleButtonVO(device) {
this.statusObj = { };
}
handleAutomaticRoute(device) {
this.statusObj = { };
}
handleOutFrame(device) {
this.statusObj = { };
}

View File

@ -110,7 +110,7 @@ export default class TrainBody extends Group {
x: parseInt(model.point.x + style.Train.trainServer.trainServerOffset.x),
y: parseInt(model.point.y + style.Train.trainServer.trainServerOffset.y),
text: serviceNumber.substring(serviceNumber.length - style.Train.trainServer.serviceNumberPrefix.length),
textFill: style.trainTextColor,
textFill: model.style.Train.trainServer.fontColor || style.trainTextColor,
fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily,
textAlign: 'left',
@ -122,7 +122,7 @@ export default class TrainBody extends Group {
x: parseInt(model.point.x + model.style.Train.trainTarget.trainTargetOffset.x),
y: parseInt(model.point.y + model.style.Train.trainTarget.trainTargetOffset.y),
text: tripNumber.substring(tripNumber.length - style.Train.trainTarget.tripNumberPrefix.length),
textFill: style.trainTextColor,
textFill: model.style.Train.trainTarget.fontColor || style.trainTextColor,
fontSize: model.fontSize,
fontFamily: style.Train.common.fontFamily,
textAlign: style.Train.trainTarget.trainTargetTextAlign,
@ -178,7 +178,7 @@ export default class TrainBody extends Group {
fill: '#ff0000'
}
});
this.add(this.atrStatus);
// this.add(this.atrStatus);
}
if (style.Train.common.hasTravelSigns) {
this.travelSigns = new ETextName({
@ -186,8 +186,8 @@ export default class TrainBody extends Group {
z: model.z + 1,
x: parseInt(model.point.x + style.Train.travelSigns.trainTravelSignsOffset.x),
y: parseInt(model.point.y + style.Train.travelSigns.trainTravelSignsOffset.y),
text: '<',
textFill: style.trainTextColor,
text: this.deviceModel.right ? '>' : '<',
textFill: '#00C300',
textStroke: style.trainTextColor,
textStrokeWidth: 0,
fontSize: model.fontSize,
@ -221,7 +221,7 @@ export default class TrainBody extends Group {
x: parseInt(model.point.x + style.Train.travelNum.trainTravelNumOffset.x),
y: parseInt(model.point.y + style.Train.travelNum.trainTravelNumOffset.y),
text: 'AA',
textFill: style.trainTextColor,
textFill: '#00C300',
textStroke: style.trainTextColor,
textStrokeWidth: 0,
fontSize: model.fontSize,
@ -238,7 +238,7 @@ export default class TrainBody extends Group {
x: parseInt(model.point.x + style.Train.delayTime.trainDelayTimeOffset.x),
y: parseInt(model.point.y + style.Train.delayTime.trainDelayTimeOffset.y),
text: '0',
textFill: style.trainTextColor,
textFill: '#DADA00',
textStroke: style.trainTextColor,
textStrokeWidth: 0,
fontSize: model.fontSize,

View File

@ -29,7 +29,7 @@ class Model {
nameFontSize: 10 // 字体大小
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true
trainWindowShow: false
};
}

View File

@ -0,0 +1,226 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="300px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules" label-position="left">
<el-form-item prop="trainCode" label="车组号:">
<!--<el-input v-model="addModel.trainCode"/>-->
<el-select v-model="addModel.trainCode" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.code"
/>
</el-select>
</el-form-item>
<el-form-item label="车次号:" prop="tripNumber">
<!--<el-input v-model="addModel.tripNumber"/>-->
<el-select v-model="addModel.tripNumber" @change="tripNumberChange" filterable>
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服务号:" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
export default {
name: 'TrainCreateNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
sectionName: '',
tripNumberList: [],
serviceNumberList: [],
addModel: {
trainCode:'',
tripNumber:'',
serviceNumber: ''
},
rules: {
trainCode: [
{ required: true, message: '请输入列车编码', trigger: 'blur'}
],
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'change'}
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'blur'}
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
},
title() {
return '新建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
});
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
},
doShow(operate, selected) {
this.selected = selected;
//
this.addModel = {
trainCode:'',
tripNumber:'',
serviceNumber: ''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
param: {
sectionCode: this.trainWindowSectionCode,
trainCode: this.addModel.trainCode, //
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
this.$messageBox(error.message);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 200px;
overflow: auto;
}
</style>

View File

@ -7,6 +7,7 @@
<train-move ref="trainMove" />
<train-switch ref="trainSwitch" />
<train-edit-number ref="trainEditNumber" />
<train-init-plan ref="trainInitPlan"/>
</div>
</template>
@ -22,6 +23,7 @@ import TrainDelete from './dialog/trainDelete';
import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
import TrainInitPlan from './dialog/trainInitPlan';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
@ -33,7 +35,8 @@ export default {
TrainDelete,
TrainMove,
TrainSwitch,
TrainEditNumber
TrainEditNumber,
TrainInitPlan
},
props: {
selected: {
@ -47,44 +50,19 @@ export default {
return {
menu: [],
menuNormal: {
Local: [],
Local: [
{
label: '新建计划列车',
handler: this.createPlanTrain,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
}
],
Center: [
// {
// label: this.$t('menu.menuTrain.addTrainId'),
// handler: this.addTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.deleteTrainId'),
// handler: this.delTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.editTrainId'),
// handler: this.editTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.editTrainNo'),
// handler: this.editTrainNo,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.moveTrainId'),
// handler: this.moveTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// },
// {
// label: this.$t('menu.menuTrain.switchTrainId'),
// handler: this.switchTrainId,
// auth: { station: true, center: true },
// cmdType:CMD.Train.CMD_SWITCH_REMOVE_FAULT
// }
{
label: '新建计划列车',
handler: this.createPlanTrain,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
}
]
},
menuForce: [
@ -162,6 +140,23 @@ export default {
// this.$store.dispatch('map/setTrainWindowShow', false);
}
},
createPlanTrain() {
const step = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
param: {
trainWindowCode: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainInitPlan.doShow(step, this.selected);
}
});
},
//
setStoppage() {
const step = {

View File

@ -114,6 +114,13 @@ export default {
tagType: (row) => { return ''; }
},
{
title: '是否自动进路',
prop: 'flt',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.flt, this.turnBackList, ['value', 'label']); },
tagType: (row) => { return ''; }
},
{
title: this.$t('map.startingSignalName'),
prop: 'startSignalCode'

View File

@ -10,14 +10,14 @@
<el-option v-for="item in interBlockStationList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item :label="$t('map.routeArc') + ':'" prop="ciControl">
<el-radio-group v-model="addModel.ciControl">
<el-form-item :label="$t('map.routeArc') + ':'" prop="arc">
<el-radio-group v-model="addModel.arc">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('map.routeFlt') + ':'" prop="setFleetMode">
<el-radio-group v-model="addModel.setFleetMode">
<el-form-item :label="$t('map.routeFlt') + ':'" prop="flt">
<el-radio-group v-model="addModel.flt">
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
</el-radio-group>
@ -250,8 +250,8 @@ export default {
code: '',
name: '', //
stationCode: '', //
ciControl: false, // /
setFleetMode: false, // /
arc: false, // /
flt: false, // /
lockFirst:false, //
delayReleaseTime: '', //
turnBack: false, //
@ -421,6 +421,7 @@ export default {
list.splice(index, 1);
},
buildModel(overlapCode, code) {
console.log(this.addModel, '=======');
const model = Object.assign({}, this.addModel);
model['mapId'] = this.mapInfo.id;
if (code) { model['code'] = code; }

View File

@ -190,7 +190,6 @@ export default {
//
create() {
this.$refs.make.validate((valid) => {
console.log(valid, this.addModel, this.editModel);
if (valid) {
const uid = getUID('AutomaticRoute', this.automaticRouteButtonList);
let models = [];

View File

@ -100,9 +100,9 @@
@setCenter="setCenter"
/>
</el-tab-pane>
<el-tab-pane label="自动进路" class="tab_pane_box" name="AutomacticRoute">
<el-tab-pane label="自动进路" class="tab_pane_box" name="AutomaticRoute">
<automatic-route
ref="AutomacticRoute"
ref="AutomaticRoute"
:selected="selected"
@updateMapModel="updateMapModel"
@setCenter="setCenter"