Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
# Conflicts: # src/jmapNew/config/skinCode/haerbin_01.js
This commit is contained in:
commit
751a8e792c
@ -127,7 +127,7 @@ class SkinCode extends defaultStyle {
|
|||||||
color: '#3149C3' // 区段边界符颜色
|
color: '#3149C3' // 区段边界符颜色
|
||||||
},
|
},
|
||||||
block: {
|
block: {
|
||||||
special: true, // 区段特殊显示
|
special: true // 区段特殊显示
|
||||||
},
|
},
|
||||||
trainPosition:{
|
trainPosition:{
|
||||||
display: false // 列车实时位置显示
|
display: false // 列车实时位置显示
|
||||||
@ -381,7 +381,7 @@ class SkinCode extends defaultStyle {
|
|||||||
nameBorderShow: false, // 道岔名称是否有包围框 显示
|
nameBorderShow: false, // 道岔名称是否有包围框 显示
|
||||||
contentRectShow: false, // 道岔封锁显示
|
contentRectShow: false, // 道岔封锁显示
|
||||||
contentRectColor: '#fff', // 道岔封锁名称颜色
|
contentRectColor: '#fff', // 道岔封锁名称颜色
|
||||||
rhomboidShow: true, // 道岔单独显示
|
rhomboidShow: true // 道岔单独显示
|
||||||
},
|
},
|
||||||
monolock: { // 道岔单锁配置
|
monolock: { // 道岔单锁配置
|
||||||
locationColor: '#fff', // 道岔单锁定位颜色 (红色)
|
locationColor: '#fff', // 道岔单锁定位颜色 (红色)
|
||||||
@ -514,11 +514,12 @@ class SkinCode extends defaultStyle {
|
|||||||
textAContent: '警' // textA文本
|
textAContent: '警' // textA文本
|
||||||
},
|
},
|
||||||
trainAtrStatus: {
|
trainAtrStatus: {
|
||||||
trainAtrStatusOffset: { x: 68, y: 9},
|
trainAtrStatusOffset: { x: 74, y: 8},
|
||||||
r: 5
|
r: 5
|
||||||
},
|
},
|
||||||
travelSigns: {
|
travelSigns: {
|
||||||
trainTravelSignsOffset: { x:3, y: 3}
|
trainTravelLeftSignsOffset: { x:3, y: 3},
|
||||||
|
trainTravelRightSignsOffset: { x: 62, y: 3}
|
||||||
},
|
},
|
||||||
delayTime: {
|
delayTime: {
|
||||||
trainDelayTimeOffset: { x:5, y: 14}
|
trainDelayTimeOffset: { x:5, y: 14}
|
||||||
@ -573,7 +574,7 @@ class SkinCode extends defaultStyle {
|
|||||||
fixedCoordinates: true, // 列车车组号等固定坐标
|
fixedCoordinates: true, // 列车车组号等固定坐标
|
||||||
trainHeight: 40, // 列车高度
|
trainHeight: 40, // 列车高度
|
||||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||||
trainWidth: 76, // 列车长度
|
trainWidth: 82, // 列车长度
|
||||||
trainTextFontSize: 12, // 列车字号
|
trainTextFontSize: 12, // 列车字号
|
||||||
fontFamily: 'consolas', // 默认字体 族类
|
fontFamily: 'consolas', // 默认字体 族类
|
||||||
nameFontSize: 12, // 字体大小
|
nameFontSize: 12, // 字体大小
|
||||||
|
@ -24,10 +24,6 @@ export default class Station extends Group {
|
|||||||
this.create();
|
this.create();
|
||||||
this.createTurnBack(); // 创建按图折返
|
this.createTurnBack(); // 创建按图折返
|
||||||
const path = window.location.href;
|
const path = window.location.href;
|
||||||
if (!path.includes('/map/draw')) {
|
|
||||||
this.createGuideTotalLock(); // 创建引导总锁
|
|
||||||
}
|
|
||||||
this.prdType = '';
|
|
||||||
if (path.includes('?')) {
|
if (path.includes('?')) {
|
||||||
const arr = window.location.href.split('?')[1].split('&');
|
const arr = window.location.href.split('?')[1].split('&');
|
||||||
arr.forEach(elem => {
|
arr.forEach(elem => {
|
||||||
@ -36,6 +32,9 @@ export default class Station extends Group {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if ((!this.prdType || this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1) && model.guideTotalLockPoint) {
|
||||||
|
this.createGuideTotalLock(); // 创建引导总锁
|
||||||
|
}
|
||||||
this.createControlMode();
|
this.createControlMode();
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
this.checkIsDrawMap();
|
this.checkIsDrawMap();
|
||||||
@ -121,7 +120,7 @@ export default class Station extends Group {
|
|||||||
createGuideTotalLock() { // 创建引导总锁
|
createGuideTotalLock() { // 创建引导总锁
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.style;
|
const style = this.style;
|
||||||
if (model.guideTotalLock || (!this.prdType && style.Station.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) {
|
if (model.guideTotalLock) {
|
||||||
this.guideLamp = new EControl({
|
this.guideLamp = new EControl({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
|
@ -35,7 +35,7 @@ class StationStand extends Group {
|
|||||||
}
|
}
|
||||||
this.create();
|
this.create();
|
||||||
this.createMouseEvent();
|
this.createMouseEvent();
|
||||||
if (!this.prdType || (this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1 && model.guideTotalLockPoint)) {
|
if (!this.prdType || this.style.StationStand.common.functionButtonShow.indexOf(this.prdType) !== -1) {
|
||||||
this.createFunctionButton();
|
this.createFunctionButton();
|
||||||
}
|
}
|
||||||
this.setVisible(model.visible);
|
this.setVisible(model.visible);
|
||||||
|
@ -5,7 +5,7 @@ import ETextName from '../element/ETextName'; // 名称文字 (共有)
|
|||||||
import EMouse from './EMouse';
|
import EMouse from './EMouse';
|
||||||
import store from '@/store';
|
import store from '@/store';
|
||||||
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';
|
||||||
|
|
||||||
/** 车身*/
|
/** 车身*/
|
||||||
export default class TrainBody extends Group {
|
export default class TrainBody extends Group {
|
||||||
@ -180,12 +180,14 @@ export default class TrainBody extends Group {
|
|||||||
});
|
});
|
||||||
// this.add(this.atrStatus);
|
// this.add(this.atrStatus);
|
||||||
}
|
}
|
||||||
|
const travelSignsOffsetX = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.x : style.Train.travelSigns.trainTravelLeftSignsOffset.x;
|
||||||
|
const travelSignsOffsetY = this.deviceModel.right ? style.Train.travelSigns.trainTravelRightSignsOffset.y : style.Train.travelSigns.trainTravelLeftSignsOffset.y;
|
||||||
if (style.Train.common.hasTravelSigns) {
|
if (style.Train.common.hasTravelSigns) {
|
||||||
this.travelSigns = new ETextName({
|
this.travelSigns = new ETextName({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z + 1,
|
z: model.z + 1,
|
||||||
x: parseInt(model.point.x + style.Train.travelSigns.trainTravelSignsOffset.x),
|
x: parseInt(model.point.x + travelSignsOffsetX),
|
||||||
y: parseInt(model.point.y + style.Train.travelSigns.trainTravelSignsOffset.y),
|
y: parseInt(model.point.y + travelSignsOffsetY),
|
||||||
text: this.deviceModel.right ? '>' : '<',
|
text: this.deviceModel.right ? '>' : '<',
|
||||||
textFill: '#00C300',
|
textFill: '#00C300',
|
||||||
textStroke: style.trainTextColor,
|
textStroke: style.trainTextColor,
|
||||||
|
@ -2,7 +2,7 @@ import store from '@/store';
|
|||||||
import { Notification } from 'element-ui';
|
import { Notification } from 'element-ui';
|
||||||
|
|
||||||
function handle(state, data) {
|
function handle(state, data) {
|
||||||
console.log(data, 'socket订阅');
|
// console.log(data, 'socket订阅');
|
||||||
const msg = data.body;
|
const msg = data.body;
|
||||||
const path = window.location.href;
|
const path = window.location.href;
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
|
@ -22,7 +22,7 @@ export function creatSubscribe(topic, header) {
|
|||||||
function callback(Response) {
|
function callback(Response) {
|
||||||
if (store) {
|
if (store) {
|
||||||
var data = JSON.parse(Response.body);
|
var data = JSON.parse(Response.body);
|
||||||
// console.log(data);
|
// console.log(Response.body);
|
||||||
store.dispatch('socket/setStomp', data);
|
store.dispatch('socket/setStomp', data);
|
||||||
} else {
|
} else {
|
||||||
callback(Response);
|
callback(Response);
|
||||||
|
@ -322,6 +322,16 @@ export default {
|
|||||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
|
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
|
||||||
this.questId = Number(resp.data.questId) || 0;
|
this.questId = Number(resp.data.questId) || 0;
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(resp.data.systemTime)}`));
|
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(resp.data.systemTime)}`));
|
||||||
|
if (resp.data.planRunning) {
|
||||||
|
this.$store.dispatch('training/simulationStart');
|
||||||
|
} else {
|
||||||
|
this.$store.dispatch('training/over');
|
||||||
|
}
|
||||||
|
if (this.isDemon) {
|
||||||
|
this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning);
|
||||||
|
} else if (this.isScript) {
|
||||||
|
this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 加载地图数据
|
// 加载地图数据
|
||||||
|
@ -113,21 +113,14 @@ export default {
|
|||||||
if (this.try != '0') {
|
if (this.try != '0') {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
}
|
}
|
||||||
|
|
||||||
const resp = '';// await runDiagramIsStart(this.group);
|
|
||||||
if (resp && resp.data) {
|
|
||||||
this.isDisable = true;
|
|
||||||
this.$store.dispatch('training/simulationStart');
|
|
||||||
} else {
|
|
||||||
this.isDisable = false;
|
|
||||||
this.$store.dispatch('training/over');
|
|
||||||
}
|
|
||||||
|
|
||||||
this.change3dname();
|
this.change3dname();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
initPlannedDriving(isDisable) {
|
||||||
|
this.isDisable = isDisable;
|
||||||
|
},
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
const data = {
|
const data = {
|
||||||
mapId: this.$route.query.mapId,
|
mapId: this.$route.query.mapId,
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
import SetTime from './demon/setTime';
|
import SetTime from './demon/setTime';
|
||||||
import { Notification } from 'element-ui';
|
import { Notification } from 'element-ui';
|
||||||
import { ranAsPlan, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
|
import { ranAsPlan, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
|
||||||
import { runDiagramIsStart } from '@/api/simulation';
|
|
||||||
import { timeFormat } from '@/utils/date';
|
import { timeFormat } from '@/utils/date';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
|
||||||
@ -76,20 +75,14 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async initLoadPage() {
|
async initLoadPage() {
|
||||||
try {
|
try {
|
||||||
const resp = '';// await runDiagramIsStart(this.group);
|
|
||||||
if (resp && resp.data) {
|
|
||||||
this.isDisable = true;
|
|
||||||
this.$store.dispatch('training/simulationStart');
|
|
||||||
} else {
|
|
||||||
this.isDisable = false;
|
|
||||||
this.$store.dispatch('training/over');
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.loadSystemTime();
|
await this.loadSystemTime();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
initPlannedDriving(isDisable) {
|
||||||
|
this.isDisable = isDisable;
|
||||||
|
},
|
||||||
selectBeginTime() {
|
selectBeginTime() {
|
||||||
this.$refs.setTime.doShow();
|
this.$refs.setTime.doShow();
|
||||||
},
|
},
|
||||||
|
@ -115,7 +115,7 @@ export default {
|
|||||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||||
] },
|
] },
|
||||||
{ prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList },
|
{ prop:'cycleCode', label: '自动折返进路code:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: [
|
items: [
|
||||||
{ prop:'cycleCode', label: '自动折返进路:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.autoList },
|
{ prop:'cycleCode', label: '自动折返进路:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.autoList },
|
||||||
{ prop: 'name', label: '自动折返名称:', type: 'input' },
|
{ prop: 'name', label: '自动折返名称:', type: 'input' },
|
||||||
{ prop: 'subtitleName', label: '副标题名称:', type: 'input' },
|
{ prop: 'subtitleName', label: '副标题名称:', type: 'input' },
|
||||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [
|
||||||
|
Loading…
Reference in New Issue
Block a user