代码调整

This commit is contained in:
fan 2023-07-11 14:17:13 +08:00
parent de898b77ed
commit 0093b8bae1
3 changed files with 25 additions and 25 deletions

View File

@ -867,12 +867,12 @@ class SkinCode extends defaultStyle {
type: '03', type: '03',
serviceNumber: '---', serviceNumber: '---',
// nameFormat: 'groupNumber:serviceNumber' // nameFormat: 'groupNumber:serviceNumber'
nameFormat:'tripNumber' nameFormat:'groupNumber'
}, },
{ {
type: '03', type: '03',
// nameFormat: 'serviceNumber:trainNumber' // nameFormat: 'serviceNumber:trainNumber'
nameFormat:'tripNumber' nameFormat:'groupNumber'
} }
], // 特殊列车类型需设置显示格式 ], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔 lrPadding: 4, // 两边间隔
@ -881,7 +881,7 @@ class SkinCode extends defaultStyle {
trainSidelineColor: '#F00', trainSidelineColor: '#F00',
trainSidelineStopColor: '#000', trainSidelineStopColor: '#000',
// trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式 // trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
trainNameFormat:'tripNumber' trainNameFormat:'groupNumber'
}, },
directionArrow: { directionArrow: {
}, },

View File

@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
import TrainBodyBox from './TrainBodyBox'; import TrainBodyBox from './TrainBodyBox';
// import '../StationStand/EDetain'; // import '../StationStand/EDetain';
import ETextName from '../element/ETextName'; // 名称文字 (共有) import ETextName from '../element/ETextName'; // 名称文字 (共有)
import EMouse from './EMouse'; // import EMouse from './EMouse';
import store from '@/store/index'; import store from '@/store/index';
import Circle from 'zrender/src/graphic/shape/Circle'; import Circle from 'zrender/src/graphic/shape/Circle';
import BoundingRect from 'zrender/src/core/BoundingRect'; import BoundingRect from 'zrender/src/core/BoundingRect';
@ -21,26 +21,26 @@ export default class TrainBody extends Group {
} }
createMouse() { createMouse() {
this.mouseEvent = new EMouse(this); // this.mouseEvent = new EMouse(this);
this.add(this.mouseEvent); // this.add(this.mouseEvent);
if (this.deviceModel.__down) { // if (this.deviceModel.__down) {
store.dispatch('map/setTrainDetails', this.deviceModel); // store.dispatch('map/setTrainDetails', this.deviceModel);
this.mouseEvent.mouseover(); // this.mouseEvent.mouseover();
} // }
if (this.deviceModel.__click) { // if (this.deviceModel.__click) {
this.mouseEvent.mouseClick(); // this.mouseEvent.mouseClick();
} // }
this.on('mouseover', () => { // this.on('mouseover', () => {
store.dispatch('map/setTrainDetails', this.deviceModel); // store.dispatch('map/setTrainDetails', this.deviceModel);
this.mouseEvent.mouseover(); // this.mouseEvent.mouseover();
}); // });
this.on('mouseout', () => { // this.on('mouseout', () => {
store.dispatch('map/setTrainDetails', null); // store.dispatch('map/setTrainDetails', null);
this.mouseEvent.mouseout(); // this.mouseEvent.mouseout();
}); // });
this.on('click', () => { // this.on('click', () => {
this.mouseEvent.mouseClick(); // this.mouseEvent.mouseClick();
}); // });
} }
create() { create() {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
title="Train operation" title="Train Control"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
:modal="false" :modal="false"