宁波调整

This commit is contained in:
fan 2020-03-25 17:32:57 +08:00
parent 1210496ecb
commit 5bcb42e0f2
18 changed files with 115 additions and 29 deletions

View File

@ -543,6 +543,8 @@ class SkinCode extends defaultStyle {
trainBodyFillColor: '#725A64', // 列车车身填充颜色
trainNameFormat: 'serviceNumber:tripNumber'// 列车显示格式
},
directionArrow: {
},
hsda: {
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 4, // HSDA上边距离

View File

@ -488,6 +488,8 @@ class SkinCode extends defaultStyle {
trainBodyFillColor: '#000099', // 列车车身填充颜色
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
},
directionArrow: {
},
hsda: {
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 4, // HSDA上边距离

View File

@ -666,6 +666,8 @@ class SkinCode extends defaultStyle {
trainBodyFillColor: '#000099', // 列车车身填充颜色
trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
},
directionArrow: {
},
hsda: {
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 4, // HSDA上边距离

View File

@ -528,6 +528,8 @@ class SkinCode extends defaultStyle {
trainBodyFillColor: '#000000', // 列车车身填充颜色
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
},
directionArrow: {
},
hsda: {
trainHSDATextFontSize: 8// 列车HDSA字号
},

View File

@ -514,6 +514,8 @@ class SkinCode extends defaultStyle {
trainBodyFillColor: '#000000', // 列车车身填充颜色
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
},
directionArrow: {
},
hsda: {
trainHSDATextFontSize: 8// 列车HDSA字号
},

View File

@ -540,6 +540,8 @@ class SkinCode extends defaultStyle {
trainSidelineColor: '#FFFF00',
trainNameFormat: 'tripNumber:serviceNumber:groupNumber'// 列车显示格式
},
directionArrow: {
},
hsda: {
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 20, // HSDA上边距离

View File

@ -527,6 +527,14 @@ class SkinCode extends defaultStyle {
trainBodyFillColor: '#A388B1', // 列车车身填充颜色
trainNameFormat: 'serviceNumber:tripNumber:targetCode'// 列车显示格式
},
directionArrow: {
hasArrow: true,
width: 6,
radiusR: 4,
fillColor: '#00FF00',
distanceTop: 15,
distanceBottom: 35
},
hsda: {
lrPaddingHSDA: 3, // HSDA两边间隔
upPaddingHSDA: 4, // HSDA上边距离

View File

@ -0,0 +1,53 @@
import Polygon from 'zrender/src/graphic/shape/Polygon';
import Group from 'zrender/src/container/Group';
import { arrow } from '../utils/ShapePoints';
class EDirection extends Group {
constructor(model) {
super();
this.model = model;
this.create();
}
create() {
const model = this.model;
const style = this.model.style;
const rotation = model.right != 1 ? 0 : Math.PI;
this.arrow = new Polygon({
zlevel: model.zlevel,
z: model.z,
origin: [model.x, model.y],
rotation: rotation,
shape: {
points: arrow(model.x, model.y, style.Train.directionArrow.width, style.Train.directionArrow.radiusR * 0.8)
},
style: {
stroke: style.Train.directionArrow.fillColor,
lineWidth: 2,
fill: style.Train.directionArrow.fillColor
}
});
this.add(this.arrow);
}
// 箭头颜色
setColor(color) {
this.create();
this.arrow.setStyle('fill', color);
}
// 隐藏
hide() {
this.create();
this.arrow.hide();
}
// 显示
show() {
this.create();
this.arrow.show();
}
}
export default EDirection;

View File

@ -5,6 +5,7 @@ import BoundingRect from 'zrender/src/core/BoundingRect';
import Rect from 'zrender/src/graphic/shape/Rect';
import ETriangle from '../Train/ETriangle';
import store from '@/store';
import EDirection from './EDirection';
/** 列车 */
export default class Train extends Group {
@ -153,6 +154,22 @@ export default class Train extends Group {
if (style.Train.common.haveTrainBorder) {
this.createTrainBorder();
}
if (style.Train.directionArrow.hasArrow) {
const arrowPoint = {x: 0, y: 0};
if (model.trainWindowModel) {
arrowPoint.x = model.trainWindowModel.point.x;
arrowPoint.y = model.right ? model.trainWindowModel.point.y + style.Train.directionArrow.distanceBottom : model.trainWindowModel.point.y - style.Train.directionArrow.distanceTop;
}
this.directionArrow = new EDirection({
zlevel: this.zlevel,
z:10,
right: model.right,
x: arrowPoint.x,
y: arrowPoint.y,
style: style
});
this.add(this.directionArrow);
}
}
// 获取设备提示坐标

View File

@ -16,10 +16,10 @@
</el-row>
<el-row>
<el-col :span="11">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
</el-col>
<el-col :span="11" :offset="2">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.serialNumber" size="mini" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>
@ -27,7 +27,7 @@
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.targetCode" />
<el-input v-model="addModel.targetCode" size="mini" />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
@ -59,7 +59,7 @@ export default {
addModel: {
groupNumber: '',
targetCode: '',
tripNumber: ''
serialNumber: ''
},
dialogShow: false,
loading: false

View File

@ -15,7 +15,7 @@
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="addModel.groupNumber" />
<el-input v-model="addModel.groupNumber" size="mini" />
</el-col>
</el-row>
<el-row>
@ -24,10 +24,10 @@
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="addModel.serialNumber" />
<el-input v-model="addModel.serialNumber" size="mini" />
</el-col>
<el-col :span="11" :offset="2">
<el-input :id="domIdInput" v-model="addModel.tripNumber" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.tripNumber" @change="inputGroupNumber" size="mini" />
</el-col>
</el-row>

View File

@ -13,7 +13,7 @@
<el-row>
<el-col :span="6" style="line-height: 44px;">车组号:</el-col>
<el-col :span="18">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row justify="center" class="button-group">

View File

@ -15,7 +15,7 @@
</el-row>
<el-row>
<el-col :span="18">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>

View File

@ -19,19 +19,15 @@
<script>
import PopMenu from '@/components/PopMenu';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
import { MenuDisabledState } from './utils/menuItemStatus';
import TrainDelete from './dialog/trainDelete';
import TrainDefine from './dialog/trainDefine';
import TrainMove from './dialog/trainMove';
// import TrainEdit from './dialog/trainEdit';
import TrainSetPlan from './dialog/trainSetPlan';
import TrainAddPlan from './dialog/trainAddPlan';
// import TrainMoveEvently from './dialog/trainMoveEvently';
// import TrainDeletePlan from './dialog/trainDeletePlan';
import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork';
import trainSetWorkATP from './dialog/trainSetWorkATP';
// import TrainFlag from './dialog/trainFlag';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -47,11 +43,8 @@ export default {
TrainDelete,
TrainDefine,
TrainMove,
// TrainEdit,
TrainSetPlan,
TrainAddPlan,
// TrainMoveEvently,
// TrainDeletePlan,
TrainSetHead,
TrainSetWork,
trainSetWorkATP
@ -361,7 +354,7 @@ export default {
sectionCode: this.$store.state.map.trainWindowSectionCode
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -102,7 +102,7 @@ export const DeviceMenu = {
StationStand: '06',
Train: '07',
Station: '08',
TrainWindow: '09',
TrainWindow: '07',
LimitControl: '10',
AutoTurnBack: '11',
AxleReset: '12',

View File

@ -20,6 +20,8 @@ class MenuContextHandler {
} else if (selected._type == 'Station') {
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.code);
} else if (selected._type == 'Train') { // 车次窗单独处理
control = store.getters['map/getStationCodeByTrain'](selected);
} else if (selected._type == 'TrainWindow') {
control = store.getters['map/getDeviceTrainWindowCodeByStationCode'](selected.code);
} else {
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.stationCode);
@ -91,11 +93,11 @@ class MenuContextHandler {
const selected = this.getCurrentStateObject();
let menu = [];
const control = this.getStationControl(selected);
if (control) {
if (this.getPrdType() != '') {
const type = State2SimulationMap[this.getPrdType()];
const status = State2ControlMap[control.controlMode]; // 判断当前模式
// const status = 'LocalStationControl';
menu = [...menuList[type]];
// 特殊处理站台的右键操作( 因为小站台不允许有操作 )
if (selected._type == 'StationStand') {

View File

@ -527,7 +527,14 @@ const map = {
return device;
},
getStationCodeByTrain: (state) => (train) => {
if (train && train.sectionCode) {
const section = state.mapDevice[train.sectionCode];
if (section && section.stationCode) {
return state.mapDevice[section.stationCode];
}
}
},
// 通过循环区段来获取控制模式
getDeviceTrainWindowCodeByStationCode: (state) => (code) => {
let device = null;
@ -537,13 +544,7 @@ const map = {
state.map.sectionList.forEach(elem => {
if (elem.trainWindowCode == code) {
state.trainWindowSectionCode = elem.code;
if (state.map.stationList && state.map.stationList.length) {
state.map.stationList.forEach(elems => {
if (elems.code == elem.stationCode) {
device = state.mapDevice[elems.code];
}
});
}
device = state.mapDevice[elem.stationCode];
}
});
}

View File

@ -118,7 +118,7 @@ export default {
this.point = { x: em.clientX, y: em.clientY };
const lineCode = this.$store.getters['map/lineCode'];
if (em.subType === 'TrainWindow') {
device = { _type: deviceType.Train, code: em.deviceCode };
device = { _type: deviceType.TrainWindow, code: em.deviceCode };
this.$store.dispatch('map/setTrainWindowShow', true);
} else if (em.subType == 'button' && em.deviceType == 'Station') { // 线
const equipment = this.getDeviceByEm(em);