Merge remote-tracking branch 'origin/test'

This commit is contained in:
program-walker 2020-06-09 16:36:51 +08:00
commit 8d25428411
96 changed files with 2392 additions and 1213 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -37,6 +37,7 @@ export default {
washCarModel: 'Wash',
forcedAirCompressor: 'Compressor Forced Start',
ATBStart: 'ATB',
ChangeHead: 'Change Head',
forcedRelieve: 'Forced Relief',
closeLeftDoor: 'L Door Close',
openLeftDoor: 'L Door Open',

View File

@ -37,6 +37,7 @@ export default {
washCarModel: '洗车模式',
forcedAirCompressor: '空压机强迫启动',
ATBStart: 'ATB启动',
ChangeHead: '换端',
forcedRelieve: '强迫缓解',
closeLeftDoor: '关左门',
openLeftDoor: '开左门',

View File

@ -3,127 +3,127 @@ import Sector from 'zrender/src/graphic/shape/Sector';
import Rect from 'zrender/src/graphic/shape/Rect';
export default class AppendageBox extends Group {
constructor(device) {
super();
this.model = device.model;
this._type = device.model._type;
this._code = device.model.code;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.create();
}
constructor(device) {
super();
this.model = device.model;
this._type = device.model._type;
this._code = device.model.code;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.create();
}
create() {
this.grouper=new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
const spaceHeight = (this.model.height-this.model.borderWidth*3)/2;
this.rect1 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 0,
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.rect2 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: this.model.borderWidth + spaceHeight,
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.rect3 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 2*this.model.borderWidth + 2*spaceHeight,
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.rect4 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 0,
width: this.model.borderWidth,
height: this.model.height
},
style: {
fill: '#34383A'
}
});
this.sector1 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: this.model.borderWidth,
r: this.model.borderWidth,
startAngle: 1.5*Math.PI,
endAngle: 2*Math.PI
},
style: {
fill: '#34383A'
}
});
this.sector2 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: 2*this.model.borderWidth + spaceHeight,
r: this.model.borderWidth,
startAngle: 1.5*Math.PI,
endAngle: 2*Math.PI
},
style: {
fill: '#34383A'
}
});
this.sector3 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: 3*this.model.borderWidth + 2*spaceHeight,
r: this.model.borderWidth,
startAngle: 1.5*Math.PI,
endAngle: 2*Math.PI
},
style: {
fill: '#34383A'
}
});
this.grouper.add(this.rect1);
this.grouper.add(this.rect2);
this.grouper.add(this.rect3);
this.grouper.add(this.rect4);
this.grouper.add(this.sector1);
this.grouper.add(this.sector2);
this.grouper.add(this.sector3);
this.add(this.grouper);
}
setModel(dx, dy) {
this.model.point.x+=dx;
this.model.point.y+=dy;
}
create() {
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
const spaceHeight = (this.model.height - this.model.borderWidth * 3) / 2;
this.rect1 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 0,
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.rect2 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: this.model.borderWidth + spaceHeight,
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.rect3 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 2 * this.model.borderWidth + 2 * spaceHeight,
width: this.model.width - this.model.borderWidth,
height: this.model.borderWidth
},
style: {
fill: '#34383A'
}
});
this.rect4 = new Rect({
zlevel: this.zlevel,
z: this.z,
shape: {
x: 0,
y: 0,
width: this.model.borderWidth,
height: this.model.height
},
style: {
fill: '#34383A'
}
});
this.sector1 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: this.model.borderWidth,
r: this.model.borderWidth,
startAngle: 1.5 * Math.PI,
endAngle: 2 * Math.PI
},
style: {
fill: '#34383A'
}
});
this.sector2 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: 2 * this.model.borderWidth + spaceHeight,
r: this.model.borderWidth,
startAngle: 1.5 * Math.PI,
endAngle: 2 * Math.PI
},
style: {
fill: '#34383A'
}
});
this.sector3 = new Sector({
zlevel: this.zlevel,
z: this.z,
shape: {
cx: this.model.width - this.model.borderWidth,
cy: 3 * this.model.borderWidth + 2 * spaceHeight,
r: this.model.borderWidth,
startAngle: 1.5 * Math.PI,
endAngle: 2 * Math.PI
},
style: {
fill: '#34383A'
}
});
this.grouper.add(this.rect1);
this.grouper.add(this.rect2);
this.grouper.add(this.rect3);
this.grouper.add(this.rect4);
this.grouper.add(this.sector1);
this.grouper.add(this.sector2);
this.grouper.add(this.sector3);
this.add(this.grouper);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -13,106 +13,106 @@ import grayButtonPicOn from '@/assets/ibp_images/gray_button_on.png';
export default class button extends Group {
static colors = new Map([
['red_on', [redButtonPicOn]],
['red_off', [redButtonPic]],
['green_on', [greenButtonPicOn]],
['green_off', [greenButtonPic]],
['blue_on', [blueButtonPicOn]],
['blue_off', [blueButtonPic]],
['yellow_on', [yellowButtonPicOn]],
['yellow_off', [yellowButtonPic]],
['gray_on', [grayButtonPicOn]],
['gray_off', [grayButtonPic]]
['red_on', [redButtonPicOn]],
['red_off', [redButtonPic]],
['green_on', [greenButtonPicOn]],
['green_off', [greenButtonPic]],
['blue_on', [blueButtonPicOn]],
['blue_off', [blueButtonPic]],
['yellow_on', [yellowButtonPicOn]],
['yellow_off', [yellowButtonPic]],
['gray_on', [grayButtonPicOn]],
['gray_off', [grayButtonPic]]
]);
constructor(device) {
super();
this._type = device.model._type;
this._code = device.model.code;
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.create();
super();
this._type = device.model._type;
this._code = device.model.code;
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.create();
}
create() {
this.grouper=new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.imageBg = new Image({
zlevel: this.zlevel,
z: this.z,
draggable: false,
style: {
image: this.getImagePic(),
x: 0,
y: 0,
width: 70,
height: 80
}
});
this.grouper.add(this.imageBg);
this.add(this.grouper);
this.transformScale();
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.imageBg = new Image({
zlevel: this.zlevel,
z: this.z,
draggable: false,
style: {
image: this.getImagePic(),
x: 0,
y: 0,
width: 70,
height: 80
}
});
this.grouper.add(this.imageBg);
this.add(this.grouper);
this.transformScale();
}
/** 缩放按钮 */
transformScale() {
this.imageBg.origin = [0, 0];
this.imageBg.scale =[this.model.width/70, this.model.width/70];
this.imageBg.dirty();
this.imageBg.origin = [0, 0];
this.imageBg.scale = [this.model.width / 70, this.model.width / 70];
this.imageBg.dirty();
}
getImagePic() {
const color = button.colors.get(`${this.model.color}_${this.model.status}`);
return color[0];
const color = button.colors.get(`${this.model.color}_${this.model.status}`);
return color[0];
}
// 设置按钮状态
setState(model) {
switch (model.status) {
case 'on': {
// 开放
this.open();
this.model.status='on';
break;
}
case 'off': {
// 关闭
this.close();
this.model.status='off';
break;
}
}
switch (model.status) {
case 'on': {
// 开放
this.open();
this.model.status = 'on';
break;
}
case 'off': {
// 关闭
this.close();
this.model.status = 'off';
break;
}
}
}
onclick() {
// if (!this.model.draggable) {
// switch (this.model.status) {
// case 'off': {
// this.open();
// this.model.status='on';
// break;
// }
// case 'on': {
// this.close();
// this.model.status='off';
// break;
// }
// }
// }
// if (!this.model.draggable) {
// switch (this.model.status) {
// case 'off': {
// this.open();
// this.model.status='on';
// break;
// }
// case 'on': {
// this.close();
// this.model.status='off';
// break;
// }
// }
// }
}
// 关闭
close() {
const color = button.colors.get(`${this.model.color}_off`);
this.imageBg.setStyle({image: color[0]});
const color = button.colors.get(`${this.model.color}_off`);
this.imageBg.setStyle({image: color[0]});
}
// 开放
open() {
const color = button.colors.get(`${this.model.color}_on`);
this.imageBg.setStyle({image: color[0]});
const color = button.colors.get(`${this.model.color}_on`);
this.imageBg.setStyle({image: color[0]});
}
setModel(dx, dy) {
this.model.point.x+=dx;
this.model.point.y+=dy;
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -14,248 +14,248 @@ import clockBg from '@/assets/ibp_images/clock/clock_bg.png';
import clockColon from '@/assets/ibp_images/clock/clock_colon.png';
export default class clock extends Group {
constructor(device) {
super();
this._type = device.model._type;
this._code = device.model.code;
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.initTime = 0;
this.create();
constructor(device) {
super();
this._type = device.model._type;
this._code = device.model.code;
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.initTime = 0;
this.create();
}
create() {
this.grouper=new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.clockBg = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: clockBg,
x: 0,
y: 0,
width: this.model.width,
height: this.model.width/493*156
}
});
this.num1 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width*0.098,
y: this.model.width*0.062,
width: this.model.width*0.095,
height: this.model.width*0.095/37*74
}
});
this.num2 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width*0.22,
y: this.model.width*0.062,
width: this.model.width*0.095,
height: this.model.width*0.095/37*74
}
});
this.num3 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width*0.395,
y: this.model.width*0.062,
width: this.model.width*0.095,
height: this.model.width*0.095/37*74
}
});
this.num4 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width*0.52,
y: this.model.width*0.062,
width: this.model.width*0.095,
height: this.model.width*0.095/37*74
}
});
this.num5 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width*0.69,
y: this.model.width*0.062,
width: this.model.width*0.095,
height: this.model.width*0.095/37*74
}
});
this.num6 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width*0.816,
y: this.model.width*0.062,
width: this.model.width*0.095,
height: this.model.width*0.095/37*74
}
});
this.clockColon1 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: clockColon,
x: +this.model.width*0.183,
y: -this.model.width*0.017,
width: this.model.width*0.34,
height: this.model.width/1*0.34
}
});
this.clockColon2 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: clockColon,
x: +this.model.width*0.48,
y: -this.model.width*0.017,
width: this.model.width*0.34,
height: this.model.width/1*0.34
}
});
this.grouper.add(this.clockBg);
this.grouper.add(this.num1);
this.grouper.add(this.num2);
this.grouper.add(this.num3);
this.grouper.add(this.num4);
this.grouper.add(this.num5);
this.grouper.add(this.num6);
this.grouper.add(this.clockColon1);
this.grouper.add(this.clockColon2);
this.add(this.grouper);
}
getImagePic(context) {
let pic = clock0;
switch (context) {
case '0':
pic = clock0;
break;
case '1':
pic = clock1;
break;
case '2':
pic = clock2;
break;
case '3':
pic = clock3;
break;
case '4':
pic = clock4;
break;
case '5':
pic = clock5;
break;
case '6':
pic = clock6;
break;
case '7':
pic = clock7;
break;
case '8':
pic = clock8;
break;
case '9':
pic = clock9;
break;
}
return pic;
}
setClockStart(started) {
const _this = this;
if (started) {
this.timer&&clearInterval(this.timer);
this.timer = setInterval(() => {
_this.handleClock(_this);
}, 1000);
} else {
this.timer&&clearInterval(this.timer);
}
}
handleClock(_this) {
_this.initTime += 1000;
const newDate = new Date();
newDate.setTime(_this.initTime);
let seconds = newDate.getSeconds() +'';
let minutes = newDate.getMinutes() + '';
let hours = newDate.getHours() + '';
if (seconds.length<2) {
seconds = '0' + seconds;
}
if (minutes.length<2) {
minutes = '0' + minutes;
}
if (hours.length<2) {
hours = '0'+ hours;
}
_this.setNumPic(6, seconds.charAt(1));
_this.setNumPic(5, seconds.charAt(0));
_this.setNumPic(4, minutes.charAt(1));
_this.setNumPic(3, minutes.charAt(0));
_this.setNumPic(2, hours.charAt(1));
_this.setNumPic(1, hours.charAt(0));
}
setNumPic(num, context) {
switch (num) {
case 1:
this.num1.setStyle('image', this.getImagePic(context));
break;
case 2:
this.num2.setStyle('image', this.getImagePic(context));
break;
case 3:
this.num3.setStyle('image', this.getImagePic(context));
break;
case 4:
this.num4.setStyle('image', this.getImagePic(context));
break;
case 5:
this.num5.setStyle('image', this.getImagePic(context));
break;
case 6:
this.num6.setStyle('image', this.getImagePic(context));
}
}
setClockTime(initTime) {
this.initTime = initTime;
const newDate = new Date();
newDate.setTime(initTime);
let seconds = newDate.getSeconds() +'';
let minutes = newDate.getMinutes() + '';
let hours = newDate.getHours() + '';
if (seconds.length<2) {
seconds = '0' + seconds;
}
if (minutes.length<2) {
minutes = '0' + minutes;
}
if (hours.length<2) {
hours = '0'+ hours;
}
this.setNumPic(6, seconds.charAt(1));
this.setNumPic(5, seconds.charAt(0));
this.setNumPic(4, minutes.charAt(1));
this.setNumPic(3, minutes.charAt(0));
this.setNumPic(2, hours.charAt(1));
this.setNumPic(1, hours.charAt(0));
}
setModel(dx, dy) {
this.model.point.x+=dx;
this.model.point.y+=dy;
}
}
create() {
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.clockBg = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: clockBg,
x: 0,
y: 0,
width: this.model.width,
height: this.model.width / 493 * 156
}
});
this.num1 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width * 0.098,
y: this.model.width * 0.062,
width: this.model.width * 0.095,
height: this.model.width * 0.095 / 37 * 74
}
});
this.num2 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width * 0.22,
y: this.model.width * 0.062,
width: this.model.width * 0.095,
height: this.model.width * 0.095 / 37 * 74
}
});
this.num3 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width * 0.395,
y: this.model.width * 0.062,
width: this.model.width * 0.095,
height: this.model.width * 0.095 / 37 * 74
}
});
this.num4 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width * 0.52,
y: this.model.width * 0.062,
width: this.model.width * 0.095,
height: this.model.width * 0.095 / 37 * 74
}
});
this.num5 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width * 0.69,
y: this.model.width * 0.062,
width: this.model.width * 0.095,
height: this.model.width * 0.095 / 37 * 74
}
});
this.num6 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: this.getImagePic('0'),
x: this.model.width * 0.816,
y: this.model.width * 0.062,
width: this.model.width * 0.095,
height: this.model.width * 0.095 / 37 * 74
}
});
this.clockColon1 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: clockColon,
x: +this.model.width * 0.183,
y: -this.model.width * 0.017,
width: this.model.width * 0.34,
height: this.model.width / 1 * 0.34
}
});
this.clockColon2 = new Image({
zlevel: this.zlevel,
z: this.z,
style: {
image: clockColon,
x: +this.model.width * 0.48,
y: -this.model.width * 0.017,
width: this.model.width * 0.34,
height: this.model.width / 1 * 0.34
}
});
this.grouper.add(this.clockBg);
this.grouper.add(this.num1);
this.grouper.add(this.num2);
this.grouper.add(this.num3);
this.grouper.add(this.num4);
this.grouper.add(this.num5);
this.grouper.add(this.num6);
this.grouper.add(this.clockColon1);
this.grouper.add(this.clockColon2);
this.add(this.grouper);
}
getImagePic(context) {
let pic = clock0;
switch (context) {
case '0':
pic = clock0;
break;
case '1':
pic = clock1;
break;
case '2':
pic = clock2;
break;
case '3':
pic = clock3;
break;
case '4':
pic = clock4;
break;
case '5':
pic = clock5;
break;
case '6':
pic = clock6;
break;
case '7':
pic = clock7;
break;
case '8':
pic = clock8;
break;
case '9':
pic = clock9;
break;
}
return pic;
}
setClockStart(started) {
const _this = this;
if (started) {
this.timer && clearInterval(this.timer);
this.timer = setInterval(() => {
_this.handleClock(_this);
}, 1000);
} else {
this.timer && clearInterval(this.timer);
}
}
handleClock(_this) {
_this.initTime += 1000;
const newDate = new Date();
newDate.setTime(_this.initTime);
let seconds = newDate.getSeconds() + '';
let minutes = newDate.getMinutes() + '';
let hours = newDate.getHours() + '';
if (seconds.length < 2) {
seconds = '0' + seconds;
}
if (minutes.length < 2) {
minutes = '0' + minutes;
}
if (hours.length < 2) {
hours = '0' + hours;
}
_this.setNumPic(6, seconds.charAt(1));
_this.setNumPic(5, seconds.charAt(0));
_this.setNumPic(4, minutes.charAt(1));
_this.setNumPic(3, minutes.charAt(0));
_this.setNumPic(2, hours.charAt(1));
_this.setNumPic(1, hours.charAt(0));
}
setNumPic(num, context) {
switch (num) {
case 1:
this.num1.setStyle('image', this.getImagePic(context));
break;
case 2:
this.num2.setStyle('image', this.getImagePic(context));
break;
case 3:
this.num3.setStyle('image', this.getImagePic(context));
break;
case 4:
this.num4.setStyle('image', this.getImagePic(context));
break;
case 5:
this.num5.setStyle('image', this.getImagePic(context));
break;
case 6:
this.num6.setStyle('image', this.getImagePic(context));
}
}
setClockTime(initTime) {
this.initTime = initTime;
const newDate = new Date();
newDate.setTime(initTime);
let seconds = newDate.getSeconds() + '';
let minutes = newDate.getMinutes() + '';
let hours = newDate.getHours() + '';
if (seconds.length < 2) {
seconds = '0' + seconds;
}
if (minutes.length < 2) {
minutes = '0' + minutes;
}
if (hours.length < 2) {
hours = '0' + hours;
}
this.setNumPic(6, seconds.charAt(1));
this.setNumPic(5, seconds.charAt(0));
this.setNumPic(4, minutes.charAt(1));
this.setNumPic(3, minutes.charAt(0));
this.setNumPic(2, hours.charAt(1));
this.setNumPic(1, hours.charAt(0));
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -1,66 +1,66 @@
import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
import Rect from 'zrender/src/graphic/shape/Rect';
// import Rect from 'zrender/src/graphic/shape/Rect';
export default class ibpText extends Group {
constructor(device) {
super();
this.model = device.model;
this._type = device.model._type;
this._code = device.model.code;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.create();
}
create() {
const model = this.model;
this.grouper=new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.textName = new Text({
zlevel: model.zlevel,
z: model.z,
silent: model.silent || false,
draggable: false,
style: {
x: 0,
y: 0,
fontWeight: model.fontWeight,
fontSize: model.fontSize,
fontFamily: model.fontFamily,
text: model.context,
textStrokeWidth: model.textStrokeWidth,
textFill: model.textFill,
textAlign: model.textAlign,
textPosition: model.textPosition || 'inside',
textVerticalAlign: model.textVerticalAlign || null,
textLineHeight: model.fontSize
}
});
// if ( model.hasRect) {
// this.grouper.add(this.tip);
// this.tip = new Rect({
// zlevel: model.zlevel,
// z: model.z-1,
// draggable: false,
// shape: {
// x: model.textRect.x- model.point.x,
// y: model.textRect.x - model.point.y,
// width: model.textRect.width,
// height: model.textRect.height
// },
// style: {
// fill: model.textBackgroundColor
// }
// });
// }
this.grouper.add(this.textName);
constructor(device) {
super();
this.model = device.model;
this._type = device.model._type;
this._code = device.model.code;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.create();
}
create() {
const model = this.model;
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.textName = new Text({
zlevel: model.zlevel,
z: model.z,
silent: model.silent || false,
draggable: false,
style: {
x: 0,
y: 0,
fontWeight: model.fontWeight,
fontSize: model.fontSize,
fontFamily: model.fontFamily,
text: model.context,
textStrokeWidth: model.textStrokeWidth,
textFill: model.textFill,
textAlign: model.textAlign,
textPosition: model.textPosition || 'inside',
textVerticalAlign: model.textVerticalAlign || null,
textLineHeight: model.fontSize
}
});
// if ( model.hasRect) {
// this.grouper.add(this.tip);
// this.tip = new Rect({
// zlevel: model.zlevel,
// z: model.z-1,
// draggable: false,
// shape: {
// x: model.textRect.x- model.point.x,
// y: model.textRect.x - model.point.y,
// width: model.textRect.width,
// height: model.textRect.height
// },
// style: {
// fill: model.textBackgroundColor
// }
// });
// }
this.grouper.add(this.textName);
this.add(this.grouper);
}
setModel(dx, dy) {
this.model.point.x+=dx;
this.model.point.y+=dy;
}
this.add(this.grouper);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

File diff suppressed because one or more lines are too long

View File

@ -224,6 +224,17 @@ class Iscs {
return this.iscsDevice[code];
}
copySelect(list) {
this.copyList = list.map(item => {
if (item._type != 'CheckBox') {
return item.model;
}
});
}
getCopyList() {
return this.copyList;
}
resize(opt) {
this.$iscsZr.resize(opt);
this.$painter.updateZrSize(opt);

View File

@ -7,7 +7,6 @@ class KeyboardController extends Eventful {
this.$iscs = iscs;
this.$zr = iscs.getZr();
this.events = iscs.getEvents();
this.initData();
this.initHandler(this.$zr);
}
@ -32,10 +31,6 @@ class KeyboardController extends Eventful {
}
}
initData() {
}
keydown(e) {
if (this._keyOnDownUp && !e.repeat) {
const currentEvent = keyboardEvents[e.key.toUpperCase()];

View File

@ -97,8 +97,6 @@ class MouseController extends Eventful {
this.handleMouseDownRight(e);
} else if (e.which === 1) {
this.handleMouseDownLeft(e);
} else if (e.which === 2) {
this.handleMouseDownWheel(e);
}
}
@ -119,27 +117,11 @@ class MouseController extends Eventful {
}
mouseup(e) {
if (eventTool.notLeftMouse(e) || !this.eventTarget ) {
return;
if (e.which === 3) {
this.handleMouseUpRight(e);
} else if (e.which === 1) {
this.handleMouseUpLeft(e);
}
if (this.deviceList.length) {
this.deviceList.forEach(item => {
item.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
});
this.deviceList = [];
this.$iscs.deleteCheckBox('check_box');
this.eventTarget = '';
this._dragging = false;
this.deviceList = [];
return;
}
if (this.isAllowDragging) {
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
this.eventTarget.dirty();
}
this.eventTarget = '';
this._dragging = false;
this.deviceList = [];
}
contextmenu(e) {
@ -195,24 +177,31 @@ class MouseController extends Eventful {
}
/** 处理鼠标右键按下事件 */
handleMouseDownRight(e) {
this.deviceList = [];
this.eventTarget = '';
this.$iscs.deleteCheckBox('check_box'); // 清空上次操作
this.$iscs.copySelect(this.deviceList);
this.rightClickPoint.x = e.offsetX;
this.rightClickPoint.y = e.offsetY;
}
/** 处理鼠标左键按下事件 */
handleMouseDownLeft(e) {
if (this.eventTarget && this.eventTarget._type === deviceType.CheckBox) {
this.handleBoundingRect(this.eventTarget);
if (this.$iscs.iscsDevice['check_box']) { // 判断点击点是否在 checkBox 范围
const boundingRect = this.$iscs.iscsDevice['check_box'].instance.getBoundingRect().clone();
const x1 = e.event.zrX + this.$iscs.$options.offsetX;
const y1 = e.event.zrY + this.$iscs.$options.offsetY;
if (!this.contain(boundingRect, x1, y1)) {
this._dragging = false;
this.deviceList = [];
this.eventTarget = '';
this.$iscs.deleteCheckBox('check_box'); // 清空上次操作
this.$iscs.copySelect(this.deviceList);
}
} else {
this.$iscs.deleteCheckBox('check_box');
}
}
/** 处理滚轮按下事件 */
handleMouseDownWheel(e) {
this.deviceList = [];
Object.values(this.$iscs.iscsDevice).forEach(item => {
this.deviceList.push(item.instance);
});
}
/** 处理右键拖动事件--- 改变选中区域大小 */
handleMouseMoveRight(point2) {
const point1 = this.rightClickPoint;
@ -244,35 +233,80 @@ class MouseController extends Eventful {
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
}
}
// 右键抬起事件
handleMouseUpRight() {
if (this.$iscs.iscsDevice['check_box']) {
this.handleBoundingRect(this.$iscs.iscsDevice['check_box'].instance);
}
}
// 左键抬起事件
handleMouseUpLeft(e) {
if (this.deviceList.length) {
this.deviceList.forEach(item => {
item.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
});
return;
}
if (this.isAllowDragging && this.eventTarget) {
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
this.eventTarget.dirty();
}
}
/** 通过包围盒筛选选中区域的元素 */
handleBoundingRect(eventTarget) {
this.deviceList = [];
let boundingRect = eventTarget.grouper.getBoundingRect();
let boundingRect = eventTarget.grouper.getBoundingRect().clone();
boundingRect = this.createFakeBoundingRect(eventTarget, boundingRect);
const deviceList = Object.values(this.$iscs.iscsDevice);
const includeDeviceList = [];
deviceList.forEach( item =>{
let deviceBoundingRect = item.instance.grouper.getBoundingRect();
deviceList.forEach(item =>{
let deviceBoundingRect = item.instance.grouper.getBoundingRect().clone();
deviceBoundingRect = this.createFakeBoundingRect(item.instance, deviceBoundingRect);
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
includeDeviceList.push(item.instance);
if (this.whetherInclude(boundingRect, deviceBoundingRect)) {
this.deviceList.push(item.instance);
}
});
this.deviceList = includeDeviceList;
this.$iscs.copySelect(this.deviceList);
}
/** 创建假包围盒对象 */
createFakeBoundingRect(instance, boundingRect) {
const x1 = instance.model.point.x;
const y1 = instance.model.point.y;
return {
x1: instance.model.point.x + boundingRect.x,
y1: instance.model.point.y + boundingRect.y,
x2: instance.model.point.x + boundingRect.width,
y2: instance.model.point.y + boundingRect.height
// x: x1 + boundingRect.x,
// y: y1 + boundingRect.y,
// width: boundingRect.width,
// height: boundingRect.height
x1: x1 + boundingRect.x,
y1: y1 + boundingRect.y,
x2: x1 + boundingRect.width,
y2: y1 + boundingRect.height
};
}
/** 判断元素包围盒是否在选中区域 */
whetherInclude(boundingRect1, boundingRect2) {
return boundingRect1.x1 <= boundingRect2.x1 && boundingRect1.y1 <= boundingRect2.y1 && boundingRect1.x2 >= boundingRect2.x2 && boundingRect1.y2 >= boundingRect2.y2;
}
// 判断元素包围盒是否在选中区域
intersect(a, b) {
var ax0 = a.x;
var ax1 = a.x + a.width;
var ay0 = a.y;
var ay1 = a.y + a.height;
var bx0 = b.x;
var bx1 = b.x + b.width;
var by0 = b.y;
var by1 = b.y + b.height;
return !(ax1 < bx0 || bx1 < ax0 || ay1 < by0 || by1 < ay0);
}
contain (rect, x, y) {
return x >= rect.x &&
x <= (rect.x + rect.width) &&
y >= rect.y &&
y <= (rect.y + rect.height);
}
}
export default MouseController;

View File

@ -29,7 +29,7 @@ class MouseController extends Eventful {
this.$zr = iscs.getZr();
this.isAllowDragging = iscs.isAllowDragging || false; // 是否在绘图中,仅绘图状态下可拖拽
this.events = iscs.getEvents();
// this._dragging = false; // 是否在拖拽状态
this._dragging = false; // 是否在拖拽状态
this.deviceList = [];
this.rightClickPoint = {
x: 0,
@ -75,7 +75,7 @@ class MouseController extends Eventful {
this.disable();
};
// this.isDragging = function () { return this._dragging; };
this.isDragging = function () { return this._dragging; };
}
}
@ -92,14 +92,14 @@ class MouseController extends Eventful {
this._offsetY = e.offsetY;
this._x = e.offsetX;
this._y = e.offsetY;
// this._dragging = true;
console.log(e, e.which);
this._dragging = true;
if (e.which === 3) {
this.handleMouseDownRight(e);
} else if (e.which === 1) {
this.handleMouseDownLeft(e);
} else if (e.which === 2) {
this.handleMouseDownWheel(e);
}
console.log(this.deviceList);
}
mousemove(e) {
@ -119,28 +119,27 @@ class MouseController extends Eventful {
}
mouseup(e) {
console.log(e);
if (eventTool.notLeftMouse(e) || !this.eventTarget ) {
return;
}
// if (this.deviceList.length) {
// this.deviceList.forEach(item => {
// item.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
// });
// this.deviceList = [];
// this.$iscs.deleteCheckBox('check_box');
// this.eventTarget = '';
// // this._dragging = false;
// this.deviceList = [];
// return;
// }
// if (this.isAllowDragging) {
// this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
// this.eventTarget.dirty();
// }
// this.eventTarget = '';
// // this._dragging = false;
// this.deviceList = [];
if (this.deviceList.length) {
this.deviceList.forEach(item => {
item.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
});
this.deviceList = [];
this.$iscs.deleteCheckBox('check_box');
this.eventTarget = '';
this._dragging = false;
this.deviceList = [];
return;
}
if (this.isAllowDragging) {
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
this.eventTarget.dirty();
}
this.eventTarget = '';
this._dragging = false;
this.deviceList = [];
}
contextmenu(e) {
@ -196,9 +195,6 @@ class MouseController extends Eventful {
}
/** 处理鼠标右键按下事件 */
handleMouseDownRight(e) {
this.deviceList = [];
this.$iscs.deleteCheckBox('check_box'); // 清空上次操作
this.rightClickPoint.x = e.offsetX;
this.rightClickPoint.y = e.offsetY;
}
@ -210,6 +206,13 @@ class MouseController extends Eventful {
this.$iscs.deleteCheckBox('check_box');
}
}
/** 处理滚轮按下事件 */
handleMouseDownWheel(e) {
this.deviceList = [];
Object.values(this.$iscs.iscsDevice).forEach(item => {
this.deviceList.push(item.instance);
});
}
/** 处理右键拖动事件--- 改变选中区域大小 */
handleMouseMoveRight(point2) {
const point1 = this.rightClickPoint;
@ -221,25 +224,25 @@ class MouseController extends Eventful {
}
/** 处理左键拖动事件--- 图形移动 */
handleMouseMoveLeft(e, dx, dy, oldX, oldY) {
// if (!this._moveOnMouseMove || !this._dragging || !this.isAllowDragging) {
// return;
// }
if (!this._moveOnMouseMove || !this._dragging || !this.isAllowDragging) {
return;
}
// 选中区域图形移动
// if (this.deviceList.length) {
// this.deviceList.forEach(item => {
// item.grouper.drift(dx, dy, e);
// });
// } else if (this._dragging && this.eventTarget) { // 选中元素图形移动
// if (!this.isAllowDragging) {
// this._preventDefaultMouseMove && eventTool.stop(e.event);
// this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
// } else if (this.isAllowDragging) {
// this.eventTarget.grouper.drift(dx, dy, e);
// }
// } else if (this._dragging) {
// this._preventDefaultMouseMove && eventTool.stop(e.event);
// this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
// }
if (this.deviceList.length) {
this.deviceList.forEach(item => {
item.grouper.drift(dx, dy, e);
});
} else if (this._dragging && this.eventTarget) { // 选中元素图形移动
if (!this.isAllowDragging) {
this._preventDefaultMouseMove && eventTool.stop(e.event);
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
} else if (this.isAllowDragging) {
this.eventTarget.grouper.drift(dx, dy, e);
}
} else if (this._dragging) {
this._preventDefaultMouseMove && eventTool.stop(e.event);
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
}
}
/** 通过包围盒筛选选中区域的元素 */
handleBoundingRect(eventTarget) {

View File

@ -1,5 +1,5 @@
import Group from 'zrender/src/container/Group';
import Text from 'zrender/src/graphic/Text';
// import Text from 'zrender/src/graphic/Text';
import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line';
import PsdClose from './psdClose';

View File

@ -19,7 +19,7 @@ export default class StairControl extends Group {
this.path = createPathSvg(this.model);
this.add(this.grouper);
if (this.model.isRight) {
this.grouper.origin = [this.model.width / 2, this.model.width * 0.83 / 2 ];
this.grouper.origin = [this.model.width / 2, this.model.width * 0.83 / 2];
this.grouper.scale = [-1, 1];
}
this.grouper.add(this.path);

View File

@ -190,7 +190,8 @@ export function StationStandList() {
if(jlmapstanddata[j].code == standsdata[i].direction1.code){
if(standsdata[i].code != "Station96090"){
if(jlmapstanddata[j].inside == true){
if(standsdata[i].inside == true){
newstationmesh = assetloader.modellist[num].mesh.clone(true);
}else{
newstationmesh = assetloader.modellist[num2].mesh.clone(true);
@ -202,7 +203,7 @@ export function StationStandList() {
newstationstand.direction1.name = standsdata[i].direction1.name;
newstationstand.direction2.code = standsdata[i].direction2.code;
newstationstand.direction2.name = standsdata[i].direction2.name;
newstationstand.inside = jlmapstanddata[j].inside;
newstationstand.inside = standsdata[i].inside;
// console.log(standsdata[i]);
newstationmesh.position.x = standsdata[i].position.x;
newstationmesh.position.y = standsdata[i].position.y;

View File

@ -129,3 +129,12 @@ export function trainSimulationAto(group,groupNumber) {
params: ''
})
}
//换端
export function trainSimulationChangeHead(group,groupNumber) {
return request({
url: `/simulation/driving/${group}/train/${groupNumber}/changeHead`,
method: 'put',
params: ''
})
}

View File

@ -42,7 +42,9 @@ var clock = new THREE.Clock();
export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,project) {
let scope = this;
let stats =null;
// let stats = new Stats();
// dom.appendChild( stats.dom );
//界面更新函数
let updatemmi = {};
this.dom = dom;
@ -232,9 +234,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
// getPublish3dMapDetail(mapId).then(netdata => {
// DriverLoad(data, scope, netdata.data, sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails, camera, controls3, scene,mixers,storemod);
// });
let stats =null;
// let stats = new Stats();
// dom.appendChild( stats.dom );
// 开启渲染
animate();
startWorker();
@ -269,9 +269,6 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
controls3.getObject().position.x = trainlisttest.list[drivingcode].matrixWorld.elements[12]-27;
controls3.getObject().position.y=5;
controls3.getObject().position.z = trainlisttest.list[drivingcode].children[0].matrixWorld.elements[14];
// console.log(controls3);
}
}

View File

@ -94,11 +94,11 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
// 对象化数据
let data = JSON.parse(Response.body);
// stats.update();
// 遍历后台数据
// console.log(data);
if(data.type == "Train_Position"){
// stats.update();
trainrun(data.body);
return;

View File

@ -256,6 +256,9 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
if (data.type == "SWITCH") {
scope.modelmanager.switchmodel.normalPosition = "0";
scope.showmodel = scope.modelmanager.switchmodel.mesh;
scope.devicetext.initdevicetext(scope.modelmanager.switchmodel.mesh);
scope.nowobject = scope.modelmanager.switchmodel.mesh;
updatemenulist(scope.devicetext.devicelist);
scope.scene.add(scope.showmodel);
// if (data.normalPosition == "0") {
// scope.modelmanager.switchmodel.normalPosition = "0";

View File

@ -3,14 +3,10 @@ import { getBaseUrl } from '@/utils/baseUrl'
import { getToken } from '@/utils/auth';
// 定于仿真socket接口
export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,routegroup) {
export function PassflowConnect(jl3dpass,deviceaction,toptrain,downtrain,routegroup) {
const scope = this;
this.controlstation = nowstation;
this.teststomp = new StompClient();
let traintopnow = null;
let traindownnow = null;
let topic = '/user/queue/simulation/jl3d/'+routegroup;
let header = {'X-Token': getToken() };
@ -33,9 +29,8 @@ export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,route
function callback(Response) {
const data = JSON.parse(Response.body);
if(data.type == "DeviceCtrl_3D"){
//PS目前模型车门位置颠倒
if(data.body.type == "PSD"){
if(data.body.code == nowstation.toppsd){
if(data.body.code == jl3dpass.nowstation.toppsd){
if(data.body.open == 0){
deviceaction.top.action.reset();
@ -43,19 +38,21 @@ export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,route
deviceaction.top.action.timeScale = -1;
deviceaction.top.action.play();
}else{
jl3dpass.passerout("top")
deviceaction.top.action.reset();
deviceaction.top.action.time = 0;
deviceaction.top.action.timeScale = 1;
deviceaction.top.action.play();
}
}
if(data.body.code == nowstation.downpsd){
if(data.body.code == jl3dpass.nowstation.downpsd){
if(data.body.open == 0){
deviceaction.down.action.reset();
deviceaction.down.action.time = deviceaction.down.action._clip.duration;
deviceaction.down.action.timeScale = -1;
deviceaction.down.action.play();
}else{
jl3dpass.passerout("down");
deviceaction.down.action.reset();
deviceaction.down.action.time = 0;
deviceaction.down.action.timeScale = 1;
@ -65,23 +62,27 @@ export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,route
}
}
if(data.body.type == "TRAIN_DOOR"){
if(traintopnow == data.body.code){
if(toptrain.nowcode == data.body.code){
if(data.body.open == "0"){
closetraindoor(toptrain,data.body.doorCode,"top");
}else{
opentraindoor(toptrain,data.body.doorCode,"top");
;
}
}
if(traindownnow == data.body.code){
if(downtrain.nowcode == data.body.code){
// console.log(data.body);
if(data.body.open == "0"){
closetraindoor(downtrain,data.body.doorCode,"down");
}else{
opentraindoor(downtrain,data.body.doorCode,"down");
}
}
}
}
@ -89,10 +90,9 @@ export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,route
if(data.type == "TrainRun_3D"){
for(let i=0,leni = data.body.length;i<leni;i++){
if(data.body[i].section == scope.controlstation.topsection){
console.log("top:"+data.body[i].offset);
if(traintopnow != data.body[i].code){
traintopnow = data.body[i].code;
if(data.body[i].section == jl3dpass.nowstation.topsection){
if(toptrain.nowcode != data.body[i].code){
toptrain.nowcode = data.body[i].code;
}
toptrain.position.copy(toptrain.curve.getPointAt(data.body[i].offset));
@ -101,21 +101,20 @@ export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,route
//
// }
}else{
if(traindownnow == data.body[i].code){
if(downtrain.nowcode == data.body[i].code){
toptrain.position.x -= 1;
}
}
if(data.body[i].section == scope.controlstation.downsection){
console.log("down:"+data.body[i].offset);
if(traindownnow != data.body[i].code){
traindownnow = data.body[i].code;
if(data.body[i].section == jl3dpass.nowstation.downsection){
if(downtrain.nowcode != data.body[i].code){
downtrain.nowcode = data.body[i].code;
}
downtrain.position.copy(downtrain.curve.getPointAt(data.body[i].offset));
}else{
if(traindownnow == data.body[i].code){
if(downtrain.nowcode == data.body[i].code){
downtrain.position.x += 1;
}
}
@ -152,22 +151,23 @@ export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,route
}
}
function closetraindoor(train,doorcode,direct){
if(direct == "top"){
if(doorcode == "1"){
actions = train.action.down;
}
if(doorcode == "2"){
actions = train.action.top;
}
toptrain.nowcode = null;
}else{
if(doorcode == "1"){
actions = train.action.top;
}
if(doorcode == "2"){
actions = train.action.down;
}
downtrain.nowcode = null;
}
for(let an=actions.length-1;an>=0;an--){

View File

@ -19,20 +19,21 @@ import StompClient from '@/utils/sock';
import { Loading } from 'element-ui';
// const Pathfinding = window.threePathfinding.Pathfinding;
var clock = new THREE.Clock();
let clock = new THREE.Clock();
let delta;
let scene,camerass,renderer;
let rendermode = 0;
let aiswitch = 0;
var mixers = [];
var testmesh1,testmesh2;
var humans = [];
var checkdoor1 = [];
var checkdoor2 = [];
var station;
var zhajiinmodel;
var zhajioutmodel;
var monitor;
let mixers = [];
let testmesh1,testmesh2;
let humans = [];
let checkdoor1 = [];
let checkdoor2 = [];
let station;
let zhajiinmodel;
let zhajioutmodel;
let monitor;
let ids = 0;
let humanlist = new THREE.Group();
@ -101,9 +102,9 @@ for(let i=0;i<22;i++){
stationright.push(sr);
}
var windowWidth = window.innerWidth ;
var windowHeight = window.innerHeight;
var views = [
let windowWidth = window.innerWidth ;
let windowHeight = window.innerHeight;
let views4 = [
{
left: 0,
bottom: 0,
@ -146,9 +147,30 @@ var views = [
}
];
let views2 = [
{
left: 0,
bottom: 0,
width: 0.5,
height: 1,
background: new THREE.Color( 0.5, 0.5, 0.7 ),
eye: [ 3.7, 16, 26 ],
up: [3.7, 10 ,16 ],
fov: 60
},
{
left: 0.5,
bottom: 0,
width: 0.5,
height: 1,
background: new THREE.Color( 0.7, 0.5, 0.5 ),
eye: [ -60, 6,11],
up: [ -59, 5.9,11 ],
fov: 60
},
];
export function Jl3dpassflow(dom,skinCode,routegroup) {
var scope = this;
let scope = this;
this.dom = dom;
this.nowcode = null;
@ -171,15 +193,24 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
camerass.aspect = dom.offsetWidth / dom.offsetHeight;
camerass.updateProjectionMatrix();
for ( var ii = 0; ii < views.length; ++ ii ) {
for ( let ii = 0; ii < views4.length; ++ ii ) {
var view = views[ ii ];
var camera = new THREE.PerspectiveCamera( view.fov, window.innerWidth / window.innerHeight, 1, 200 );
camera.position.fromArray( view.eye );
camera.lookAt( view.up[0],view.up[1],view.up[2] );
view.camera = camera;
let view = views4[ ii ];
let camera = new THREE.PerspectiveCamera( view.fov, window.innerWidth / window.innerHeight, 1, 200 );
camera.position.fromArray( view.eye );
camera.lookAt( view.up[0],view.up[1],view.up[2] );
view.camera = camera;
}
}
for ( let ii = 0; ii < views2.length; ++ ii ) {
let view = views2[ ii ];
let camera = new THREE.PerspectiveCamera( view.fov, window.innerWidth / window.innerHeight, 1, 200 );
camera.position.fromArray( view.eye );
camera.lookAt( view.up[0],view.up[1],view.up[2] );
view.camera = camera;
}
@ -187,12 +218,12 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
scene = new THREE.Scene();
scene.background = new THREE.Color(0xa0a0a0);
var mesh = new THREE.Mesh(new THREE.PlaneBufferGeometry(200, 200), new THREE.MeshPhongMaterial({ color: 0x999999, depthWrite: false }));
let mesh = new THREE.Mesh(new THREE.PlaneBufferGeometry(200, 200), new THREE.MeshPhongMaterial({ color: 0x999999, depthWrite: false }));
mesh.rotation.x = - Math.PI / 2;
mesh.receiveShadow = true;
scene.add(mesh);
var grid = new THREE.GridHelper(200, 20, 0x000000, 0x000000);
let grid = new THREE.GridHelper(200, 20, 0x000000, 0x000000);
grid.material.opacity = 0.2;
grid.material.transparent = true;
scene.add(grid);
@ -203,7 +234,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
scene.add(ambientLight);
//
// var spotLight = new THREE.SpotLight(0xffffff);
// let spotLight = new THREE.SpotLight(0xffffff);
// spotLight.position.set(-50, 60, 15);
// spotLight.castShadow = true;
// spotLight.shadow.mapSize.width = 1024;
@ -239,10 +270,15 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
let mouse = new THREE.Vector2();
let raycaster = new THREE.Raycaster();
//上车控制开关
let toppasserin = false;
let downpasserin = false;
//下车控制开关
let toppasseron = false;
let downpasseron = false;
var loader = new THREE.OBJLoader();
let loader = new THREE.OBJLoader();
// load a resource
loader.load(
@ -285,7 +321,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
}
);
document.addEventListener( 'mouseup', onDocumentMouseUp, false );
// document.addEventListener( 'mouseup', onDocumentMouseUp, false );
function onDocumentMouseUp (event) {
@ -366,12 +402,12 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
this.modelmanager = new ModelManager();
let loadingInstance = Loading.service({ fullscreen: true });
let nowstation = null;
this.nowstation = null;
let stationlist = [];
let socktest = null;
this.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
console.log(scope.modelmanager);
// console.log(scope.modelmanager);
initstationanimation(scope.modelmanager.station.mesh);
initzhajiinaimation(scope.modelmanager.zhajiin.mesh);
initzhajioutanimation(scope.modelmanager.zhajiout.mesh);
@ -391,41 +427,35 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
loadingInstance.close();
scope.switchrender(false);
scope.switchviews(4);
getPublishMapDetail(skinCode).then(netdata => {
// console.log(netdata);
initstationlist(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList);
socktest = new PassflowConnect(nowstation,deviceaction,toptrain,downtrain,routegroup);
socktest = new PassflowConnect(scope,deviceaction,toptrain,downtrain,routegroup);
});
animate();
})
function inithumans(){
originhuman1 = scope.modelmanager.man1.mesh;
originhuman1.progress = 1;
scene.add(originhuman1);
// scene.add(originhuman1);
originhuman2 = scope.modelmanager.man2.mesh;
let mixer1 = new THREE.AnimationMixer( originhuman1 );
let mixer2 = new THREE.AnimationMixer( originhuman2 );
originanima1 = originhuman1.animations[ 0 ];
originanima2 = originhuman2.animations[ 0 ];
originhuman1.remove(originhuman1.children[2]);
scene.add(humanlist);
scene.add(scope.modelmanager.man1.mesh);
// scene.add(scope.modelmanager.man1.mesh);
}
let checkobject = setInterval(function(){
// console.log(originhuman1);
if(originhuman1){
console.log("start");
clearInterval(checkobject);
//进站控制
startWorker();
@ -434,11 +464,126 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
};
},1000);
this.changestation = function(stationname){
for(let i=0,leni=stationlist.length;i<leni;i++){
if(stationlist[i].name == stationname){
scope.nowstation = stationlist[i];
scope.resetscene();
i=leni;
}
}
}
this.resetscene = function(){
aiswitch = 1;
toppasserin = false;
downpasserin = false;
//下车控制开关
toppasseron = false;
downpasseron = false;
toptrain.nowcode = null;
downtrain.nowcode = null;
// humanlist = new THREE.Group();
for(let j=0; j<humanlist.children.length;j++){
// scope.uncache(humanlist.children[j]);
humanlist.remove(humanlist.children[j]);
j--;
// j--;
}
toptrain.position.y = -20000;
downtrain.position.y = -20000;
deviceaction.down.action.reset();
deviceaction.down.action.time = deviceaction.down.action._clip.duration;
deviceaction.down.action.timeScale = -1;
deviceaction.down.action.play();
deviceaction.top.action.reset();
deviceaction.top.action.time = deviceaction.down.action._clip.duration;
deviceaction.top.action.timeScale = -1;
deviceaction.top.action.play();
for(let an=toptrain.action.top.length-1;an>=0;an--){
toptrain.action.top[an].reset();
toptrain.action.top[an].time = toptrain.action.top[an]._clip.duration;
toptrain.action.top[an].timeScale = -1;
toptrain.action.top[an].play();
}
for(let an=toptrain.action.down.length-1;an>=0;an--){
toptrain.action.down[an].reset();
toptrain.action.down[an].time = toptrain.action.down[an]._clip.duration;
toptrain.action.down[an].timeScale = -1;
toptrain.action.down[an].play();
}
// for(let an=actions.length-1;an>=0;an--){
// actions[an].reset();
// actions[an].time = actions[an]._clip.duration;
// actions[an].timeScale = -1;
// actions[an].play();
// }
setTimeout(function(){
initpasser();
aiswitch = 0;
}, 2000);
}
this.uncache = function(uncachemodel){
if(uncachemodel){
uncachemodel.mixer.uncacheAction();
uncachemodel.traverse( function ( child ) {
if ( child.isMesh ) {
child.geometry.dispose();
child.material.dispose();
}
} );
}
}
this.passerout = function(direct){
// console.log(direct);
if(direct == "top"){
// console.log("toppasser");
// console.log(stationzon.list["standtop"]);
toppasseron = true;
setTimeout(function(){
toppasseron = false
toppasserin = true;
setTimeout(function(){
toppasserin = false;
}, 20000);
}, 5000);
}
if(direct == "down"){
// console.log("downpasser");
// console.log(stationzon.list["standdown"]);
downpasseron = true;
setTimeout(function(){
downpasseron = false;
downpasserin = true;
setTimeout(function(){
downpasserin = false;
}, 20000);
}, 5000);
}
}
this.switchviews = function(viewmode){
if(viewmode == 4){
rendermode = 4;
}
if(viewmode == 2){
rendermode = 2;
}
if(viewmode == 1){
rendermode = 1;
}
if(viewmode == "auto"){
this.switchrender = function(mode){
if(mode){
rendermode = 0;
renderer.setViewport( 0, 0, scope.dom.offsetWidth, scope.dom.offsetHeight );
renderer.setScissor( 0, 0, scope.dom.offsetWidth, scope.dom.offsetHeight );
@ -446,8 +591,6 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
renderer.setSize(scope.dom.offsetWidth, scope.dom.offsetHeight);
camerass.aspect = dom.offsetWidth / dom.offsetHeight;
camerass.updateProjectionMatrix();
}else{
rendermode = 1;
}
}
@ -463,53 +606,72 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
for(let i=0;i<3;i++){
newhumancreate(stationzon.getinitposition("security"),1);
}
for(let i=0;i<2;i++){
newhumancreate(stationzon.getinitposition("entergate"),2);
// for(let i=0;i<2;i++){
// // newhumancreate(stationzon.getinitposition("entergate"),3);
// }
for(let i=0;i<6;i++){
let standdata = stationzon.getstandposition("standtop");
newhumancreate(standdata.point,4,"top",standdata.door);
}
for(let i=0;i<6;i++){
newhumancreate(stationzon.getinitposition("standtop"),4);
}
for(let i=0;i<6;i++){
newhumancreate(stationzon.getinitposition("standdown"),4);
}
for(let i=0;i<5;i++){
newhumancreate(stationzon.getinitposition("exitgate"),4);
let standdata = stationzon.getstandposition("standdown");
newhumancreate(standdata.point,4,"down",standdata.door);
}
// for(let i=0;i<5;i++){
// // newhumancreate(stationzon.getinitposition("exitgate"),6);
// }
}
function startWorker(){
initpasser();
passerwebwork.onmessage = function (event) {
moveanimateupdate();
passerai();
if(aiswitch == 0){
moveanimateupdate();
passerai();
delta = clock.getDelta();
// tick(delta);
delta = clock.getDelta();
// tick(delta);
for(let i=mixers.length-1;i>=0;i--){
if(mixers[i]._actions[0].isRunning()){
mixers[i].update( delta );
for(let i=mixers.length-1;i>=0;i--){
if(mixers[i]._actions[0].isRunning()){
mixers[i].update( delta );
}
}
}
for(let i=humanlist.children.length-1;i>=0;i--){
if(humanlist.children[i].mixer._actions[0].isRunning()){
humanlist.children[i].mixer.update( delta );
for(let i=humanlist.children.length-1;i>=0;i--){
if(humanlist.children[i].mixer._actions[0].isRunning()){
humanlist.children[i].mixer.update( delta );
}
}
}
}
};
stationwebwork.onmessage = function (event) {
// console.log("stationwebwork");
// if(humans.length<200){
var direct = Math.floor(Math.random()*(3-1+1))+1;
//1--top
//2-- down
if(direct == 1){
newhumancreate(stationzon.getzoneposition("enter1"),0);
}else{
newhumancreate(stationzon.getzoneposition("enter2"),0);
if(aiswitch == 0){
let direct = Math.floor(Math.random()*(3-1+1))+1;
//1--top
//2-- down
if(direct == 1){
newhumancreate(stationzon.getzoneposition("enter1"),0);
}else{
newhumancreate(stationzon.getzoneposition("enter2"),0);
}
if(toppasseron){
for(let i=0,leni=stationzon.list["standtop"].doorpoints.length;i<leni;i++ ){
setTimeout(function(){
newhumancreate(stationzon.list["standtop"].doorpoints[i],5,"top",i);
}, Math.random()*1000);
}
}
if(downpasseron){
for(let i=0,leni=stationzon.list["standdown"].doorpoints.length;i<leni;i++ ){
setTimeout(function(){
newhumancreate(stationzon.list["standdown"].doorpoints[i],5,"down",i);
}, Math.random()*1000);
}
}
}
// }
};
}
@ -517,11 +679,17 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
//循环渲染函数
function animate() {
// console.log(rendermode);
if(rendermode == 0){
if(rendermode == 4){
render4view();
}else if(rendermode == 2){
render2view();
}
// else if(rendermode == 1){
// render4view();
// }
else if(rendermode == 0){
renderer.render(scene, camerass);
scope.controls.update();
}else{
monitorrender();
}
// delta = clock.getDelta();
@ -535,6 +703,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
// console.log(humans[i]);
if(humanlist.children[i].status == 0){
//stage = 0 进入车站
if(humanlist.children[i].stage == 0){
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
@ -550,30 +719,35 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
// console.log(path);
}
//stage = 1 前往进站闸机
if(humanlist.children[i].stage == 1){
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
groupID = pathfinder.getGroup( ZONE, points[0] );
targetPosition = stationzon.getzoneposition("entergate");
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
targetPosition = stationzon.getgateposition("entergate");
path = pathfinder.findPath( points[0], targetPosition.point, ZONE, groupID );
humanlist.children[i].door = targetPosition.door;
for(let i=0;i<path.length;i++){
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
}
moveanimateinit(humanlist.children[i],i,points,i);
}
//stage = 2 过闸机
if(humanlist.children[i].stage == 2){
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z-5));
// zhajicontrol("in",humans[i].doors);
zhajicontrol("in",humanlist.children[i].door);
moveanimateinit(humanlist.children[i],i,points,i);
}
//stage = 3 前往站台
if(humanlist.children[i].stage == 3){
var direct = Math.floor(Math.random()*(3-1+1))+1;
let direct = Math.floor(Math.random()*(2))+1;
// console.log(direct);
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
// points.push(new THREE.Vector3(11.81,9.8,13.11));
@ -582,12 +756,14 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
//2-- down
if(direct == 1){
groupID = pathfinder.getGroup( ZONE, points[0] );
targetPosition = stationzon.getzoneposition("standtop");
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
targetPosition = stationzon.getstandposition("standtop");
path = pathfinder.findPath( points[0], targetPosition.point, ZONE, groupID );
humanlist.children[i].direct = "top";
}else{
groupID = pathfinder.getGroup( ZONE, points[0] );
targetPosition = stationzon.getzoneposition("standdown");
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
targetPosition = stationzon.getstandposition("standdown");
path = pathfinder.findPath( points[0], targetPosition.point, ZONE, groupID );
humanlist.children[i].direct = "down";
}
if(path[0].y<9.84){
points.push(new THREE.Vector3(11.81,9.8,13.11));
@ -597,63 +773,92 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
for(let i=0;i<path.length;i++){
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
}
humanlist.children[i].door = targetPosition.door;
moveanimateinit(humanlist.children[i],i,points,i);
}
// //出站
// if(humanlist.children[i].stage == 3){
// // let points = [];
// // points.push(new THREE.Vector3(humans[i].mesh.position.x,humans[i].mesh.position.y,humans[i].mesh.position.z));
// // if(humans[i].doors<11){
// // if(humans[i].direct == 1){
// // points.push(new THREE.Vector3(10,1.7,17));
// // }else{
// // points.push(new THREE.Vector3(8,1.7,5));
// // }
// // points.push(new THREE.Vector3(8,1.7,13));
// // points.push(new THREE.Vector3(5,1.7,13));
// // points.push(new THREE.Vector3(-4,6,13));
// // }else{
// // if(humans[i].direct == 1){
// // points.push(new THREE.Vector3(-19,1.7,17));
// // }else{
// // points.push(new THREE.Vector3(-18,1.7,6.4));
// // }
// // points.push(new THREE.Vector3(-18,1.7,13));
// // points.push(new THREE.Vector3(-12,1.7,13));
// // points.push(new THREE.Vector3(-7,6.8,12));
// // }
// // points.push(new THREE.Vector3(-5,10,4));
// // points.push(new THREE.Vector3(14,10,3));
// // var j = Math.floor(Math.random()*(4-1+1))+1;
// // points.push(new THREE.Vector3(19,10,-2+j*1.4));
// //
// // humans[i].doors = j;
// // moveanimateinit(humans[i],i,points,i,0.002);
// }
//stage = 4 上车
if(humanlist.children[i].stage == 4){
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
if(toppasserin && humanlist.children[i].direct == "top"){
groupID = pathfinder.getGroup( ZONE, points[0] );
targetPosition = stationzon.getzoneposition("exitgate");
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
for(let i=0;i<path.length;i++){
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
points.push(stationzon.list["standtop"].doorpoints[humanlist.children[i].door]);
if(points[1] == undefined){
}else{
moveanimateinit(humanlist.children[i],i,points,i);
}
moveanimateinit(humanlist.children[i],i,points,i);
}
if(downpasserin && humanlist.children[i].direct == "down"){
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
points.push(stationzon.list["standdown"].doorpoints[humanlist.children[i].door]);
if(points[1] == undefined){
}else{
moveanimateinit(humanlist.children[i],i,points,i);
}
// console.log(points);
}
}
//stage = 5 下车
if(humanlist.children[i].stage == 5){
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
if(humanlist.children[i].direct == "top"){
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z+5));
}
if(humanlist.children[i].direct == "down"){
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z-5));
}
groupID = pathfinder.getGroup( ZONE, points[1] );
targetPosition = stationzon.getgateposition("exitgate");
path = pathfinder.findPath( points[1], targetPosition.point, ZONE, groupID );
humanlist.children[i].door = targetPosition.door;
for(let i=0;i<path.length;i++){
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
}
moveanimateinit(humanlist.children[i],i,points,i);
}
//stage = 6 前往出站闸机
// if(humanlist.children[i].stage == 6){
// let points = [];
// points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
//
// groupID = pathfinder.getGroup( ZONE, points[0] );
// targetPosition = stationzon.getgateposition("exitgate");
// path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
//
// for(let i=0;i<path.length;i++){
// points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
// }
// moveanimateinit(humanlist.children[i],i,points,i);
// }
//stage = 7 出闸机
if(humanlist.children[i].stage == 7){
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
points.push(new THREE.Vector3(humanlist.children[i].position.x+5,humanlist.children[i].position.y,humanlist.children[i].position.z));
// zhajicontrol("in",humans[i].doors);
zhajicontrol("out",humanlist.children[i].door);
moveanimateinit(humanlist.children[i],i,points,i);
}
if(humanlist.children[i].stage == 6){
var direct = Math.floor(Math.random()*(3-1+1))+1;
//stage = 8 出站
if(humanlist.children[i].stage == 8){
let direct = Math.floor(Math.random()*(3-1+1))+1;
let points = [];
points.push(new THREE.Vector3(humanlist.children[i].position.x,humanlist.children[i].position.y,humanlist.children[i].position.z));
@ -694,66 +899,54 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
model.action.play();
model.progress = 0;
model.runrail = curve;
model.speed = 0.1/curve.getLength();
model.speed = 0.2/curve.getLength();
}
function moveanimateupdate(){
for(let i=0;i<humanlist.children.length;i++){
if(humanlist.children[i].status == 1){
if(humanlist.children[i].progress>=1){
// let point = humans[i].runrail.curve.getPointAt(1);
//更新模型坐标
if(humanlist.children[i].status == 1){
// humanlist.children[i].runrail.enable = false;
// if(humanlist.children[i].stage == 4){
//
// humanlist.remove(humanlist.children[i].mesh);
// // humans.splice(i,1);
// }
//
humanlist.children[i].progress = 1;
// humanlist.children[i].mixer.runplay = false;
humanlist.children[i].action.stop();
humanlist.children[i].status = 0;
if(humanlist.children[i].stage == 6){
if(humanlist.children[i].stage == 8){
scope.uncache(humanlist.children[i]);
humanlist.remove(humanlist.children[i]);
// humanlist.children[i].stage = 7;
i--;
}else if(humanlist.children[i].stage == 7){
humanlist.children[i].stage = 8;
}
// else if(humanlist.children[i].stage == 6){
//
// humanlist.children[i].stage = 7;
//
// }
else if(humanlist.children[i].stage == 5){
if(humanlist.children[i].stage == 5){
humanlist.children[i].stage = 7;
humanlist.children[i].stage = 6;
}
if(humanlist.children[i].stage == 4){
humanlist.children[i].stage = 5;
}
if(humanlist.children[i].stage == 3){
}else if(humanlist.children[i].stage == 4){
scope.uncache(humanlist.children[i]);
humanlist.remove(humanlist.children[i]);
i--;
}else if(humanlist.children[i].stage == 3){
humanlist.children[i].stage = 4;
}
//
if(humanlist.children[i].stage == 2){
}else if(humanlist.children[i].stage == 2){
humanlist.children[i].stage = 3;
}
if(humanlist.children[i].stage == 1){
}else if(humanlist.children[i].stage == 1){
humanlist.children[i].stage = 2;
}
if(humanlist.children[i].stage == 0){
}else if(humanlist.children[i].stage == 0){
// // console.log(humans[i].doors);
// zhajiin[humanlist.children[i].doors].waiting = 0;
humanlist.children[i].stage = 1;
@ -785,8 +978,8 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
}
}
function newhumancreate(position,stage,){
var mantype = Math.floor(Math.random()*(3-1+1))+1;
function newhumancreate(position,stage,direct,door){
let mantype = Math.floor(Math.random()*(3-1+1))+1;
let newhuman;
if(mantype == 1){
newhuman = THREE.SkeletonUtils.clone( originhuman1 );
@ -803,9 +996,22 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
newhuman.status = 0;
newhuman.stage = stage;
newhuman.direct = null;
if(direct){
if(direct == "top"){
newhuman.rotation.y = Math.PI;
}
newhuman.direct = direct;
}else{
newhuman.direct = null;
}
newhuman.doorstatus = null;
newhuman.doors = null;
if(door){
newhuman.door = door;
}else{
newhuman.door = null;
}
newhuman.action = mixer.clipAction( newhuman.animations[ 0 ] );
newhuman.mixer = mixer;
newhuman.runrail = null;
@ -862,9 +1068,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
}
nowstation = stationlist[0];
scope.nowstation = stationlist[0];
updatestationlist(stationlist);
// console.log(nowstation);
// console.log(scope.nowstation);
}
function inittrain(object){
let ntracks1,ntracks2,tclip,fclip;
@ -880,6 +1086,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
toptrain = object.clone(true);
toptrain.nowcode = null;
toptrain.action = {
top:[],
down:[]
@ -892,6 +1099,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
toptrain.curve = new THREE.CatmullRomCurve3(points1);
downtrain = object.clone(true);
downtrain.nowcode = null;
downtrain.action = {
top:[],
down:[]
@ -977,9 +1185,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
for(let j=0;j<object.children.length;j++){
if(object.children[j].name == "top"){
// var geometry = new THREE.BoxBufferGeometry( 50, 50, 50 );
// var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
// var cube = new THREE.Mesh( geometry, material );
// let geometry = new THREE.BoxBufferGeometry( 50, 50, 50 );
// let material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );
// let cube = new THREE.Mesh( geometry, material );
// cube.position.copy(object.children[j].position);
// scene.add( cube );
object.children[j].animations = [];
@ -1222,7 +1430,8 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
function zhajicontrol(type,door){
// console.log(door);
// console.log(zhajiin);
let devicenum = door-1;
let devicenum = door;
if(type == "in"){
deviceaction[zhajiin[devicenum].id].action.reset();
deviceaction[zhajiin[devicenum].id].action.time = 0;
@ -1237,21 +1446,50 @@ export function Jl3dpassflow(dom,skinCode,routegroup) {
}
function monitorrender() {
function render4view() {
// updateSize();
for ( var ii = 0; ii < views.length; ++ ii ) {
for ( let ii = 0; ii < views4.length; ++ ii ) {
var view = views[ ii ];
var camera = view.camera;
let view = views4[ ii ];
let camera = view.camera;
// view.updateCamera( camera, scene, mouseX, mouseY );
var left = Math.floor( windowWidth * view.left );
var bottom = Math.floor( windowHeight * view.bottom );
var width = Math.floor( windowWidth * view.width );
var height = Math.floor( windowHeight * view.height );
let left = Math.floor( windowWidth * view.left );
let bottom = Math.floor( windowHeight * view.bottom );
let width = Math.floor( windowWidth * view.width );
let height = Math.floor( windowHeight * view.height );
renderer.setViewport( left, bottom, width, height );
renderer.setScissor( left, bottom, width, height );
renderer.setScissorTest( true );
camera.aspect = width / height;
camera.updateProjectionMatrix();
renderer.render( scene, camera );
}
}
function render2view() {
// updateSize();
for ( let ii = 0; ii < views2.length; ++ ii ) {
let view = views2[ ii ];
let camera = view.camera;
// view.updateCamera( camera, scene, mouseX, mouseY );
let left = Math.floor( windowWidth * view.left );
let bottom = Math.floor( windowHeight * view.bottom );
let width = Math.floor( windowWidth * view.width );
let height = Math.floor( windowHeight * view.height );
renderer.setViewport( left, bottom, width, height );
renderer.setScissor( left, bottom, width, height );

View File

@ -161,7 +161,8 @@ let exit2 = {
new THREE.Vector3(30.2,9.8,28)
]
};
let enternum = 0;
let exitnum = 0;
export function ZoneManager() {
var scope = this;
@ -221,6 +222,62 @@ export function ZoneManager() {
return randompoint;
}
this.getstandposition = function(name){
let n = Math.round(Math.random()*20);
if(n>=1){
n=n;
}else{
n=0;
}
let randompoint = new THREE.Vector3(0,scope.list[name].doorpoints[n].y,0);
if(name == "standtop"){
randompoint.x = scope.list[name].doorpoints[n].x + Math.random()*3;
randompoint.z = scope.list[name].doorpoints[n].z +5;
}
if(name == "standdown"){
randompoint.x = scope.list[name].doorpoints[n].x + Math.random()*3;
randompoint.z = scope.list[name].doorpoints[n].z -5;
}
let standdata = {
door:n,
point:randompoint
};
return standdata;
}
this.getgateposition = function(name){
let randompoint = new THREE.Vector3(0,0,0);
let standdata = {
door:null,
point:null
};
if(name == "entergate"){
randompoint.x = scope.list[name].railpoints[enternum].x ;
randompoint.y = scope.list[name].railpoints[enternum].y ;
randompoint.z = scope.list[name].railpoints[enternum].z ;
standdata.door = 4-enternum;
enternum += 1;
if(enternum>4){
enternum = 0;
}
}
if(name == "exitgate"){
randompoint.x = scope.list[name].railpoints[exitnum].x ;
randompoint.y = scope.list[name].railpoints[exitnum].y ;
randompoint.z = scope.list[name].railpoints[exitnum].z ;
standdata.door = 4-exitnum;
exitnum += 1;
if(exitnum>4){
exitnum = 0;
}
}
standdata.point = randompoint;
return standdata;
}
this.getzoneposition = function(name){
// let random = Math.random();

View File

@ -12,5 +12,9 @@ export function ZoneModel(data) {
this.railpoints = data.railpoints;
this.railline = new THREE.CatmullRomCurve3(data.railpoints);
if(data.doorpoints){
this.doorpoints = data.doorpoints;
}else{
this.doorpoints = null;
}
}

View File

@ -147,7 +147,7 @@ this.loadpromise = function(sectionList,sectiondata,rails,scene,assetloader){
let height = Math.random()/1000;
var closedSpline = new THREE.CatmullRomCurve3( [
new THREE.Vector3(newsection.railpoint[0].x,height,newsection.railpoint[0].z),
new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[1].z),
new THREE.Vector3(newsection.railpoint[1].x,height,newsection.railpoint[0].z),
] );
closedSpline.type = 'catmullrom';

View File

@ -537,7 +537,7 @@ class SkinCode extends defaultStyle {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 0, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [
{
type: '03',
@ -592,7 +592,7 @@ class SkinCode extends defaultStyle {
},
common: {
useSelfFormat: true,
useSelfText: true,
useSelfText: false,
trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth:62, // 列车长度

View File

@ -508,7 +508,7 @@ class SkinCode extends defaultStyle {
radiusR: 6 // 控制灯大小
},
text: {
fontWeight: 'normal',
fontWeight: 580,
fontSize: 12,
distance: 10
},

View File

@ -39,7 +39,7 @@ class EMouse extends Group {
if (Vue.prototype.$jlmap.lineCode == '11' || Vue.prototype.$jlmap.lineCode == '10') {
text = `列车类型: ${trainType}\n\0\0\0\0源:人工标记\n\0\0号: ${this.device.model.groupNumber}\n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.parentName : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: CTC车\n最高信号系统控制: CTC\n驾驶模式: SM模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
} else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.parentName : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
}
}
const trainTip = this.device.style.Train.common.trainTip;

View File

@ -84,6 +84,8 @@ export default class Train extends Group {
type: model.type,
speed: model.speed,
maLen: model.maLen,
hold:model.hold,
jump:model.jump,
dt: model.dt,
model: model
});

View File

@ -1,7 +1,7 @@
<template>
<el-dialog
v-dialogDrag
class="foshan-01__schedule stand-detain-train-all"
class="foshan-01__systerm stand-detain-train-all"
:title="title"
:visible.sync="show"
width="340px"

View File

@ -21,7 +21,7 @@
</div>
<el-radio :id="control === '02'? '': domIdChoose1" label="02">全人工</el-radio>
</el-radio-group>
<!-- <el-input-number
<el-input-number
:id="domIdInput"
v-model="time"
:disabled="disabledInput"
@ -31,7 +31,7 @@
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;"
@change="inputTime"
/>
<div style="float: left;margin-top: 22px; margin-left: 5px;"></div> -->
<div style="float: left;margin-top: 22px; margin-left: 5px;"></div>
</div>
</div>
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
@ -72,7 +72,7 @@ export default {
return {
dialogShow: false,
loading: false,
// time: 0,
time: 0,
control: '01',
direction: '01',
effective: '0',
@ -143,7 +143,7 @@ export default {
}
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
// this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
// this.effective = tempDate.parkingValidStatus ? true : false;
this.effective = tempDate.parkingValidStatus ? '1' : '0';
this.direction = selected.direction;
@ -187,18 +187,18 @@ export default {
}
});
},
// inputTime() {
// const operate = {
// repeat: true,
// operation: OperationEvent.StationStand.setStopTime.input.operation
// };
inputTime() {
const operate = {
repeat: true,
operation: OperationEvent.StationStand.setStopTime.input.operation
};
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// }
// });
// },
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
const operate = {
send: true,
@ -206,7 +206,7 @@ export default {
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
param: {
parkingTime: this.control == '01' ? -1 : 1,
// runLevelTime: this.time,
runLevelTime: this.time,
parkingAlwaysValid: this.effective == '1'
}
// messages: [`: ${this.stationName} - ${this.standName}, ${this.control == '01' ? '' : this.time + ''}, ${this.effective == false ? '' : ''}`]

View File

@ -29,7 +29,7 @@
<div>道岔</div>
<el-col :span="11">
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
<el-option v-for="option in switchList" :key="option.code" :label="option.name" :value="option.name" />
<el-option v-for="option in switchList" :key="option.code" :label="option.name" :value="option.code" />
</el-select>
</el-col>
<el-col :span="8" :offset="1">
@ -49,7 +49,7 @@
</div>
<div class="body_cont">
<div class="status_text">状态</div>
<div class="textarea_content" />
<div class="textarea_content">{{ message }}</div>
</div>
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
@ -73,7 +73,7 @@ export default {
dialogShow: false,
selected: null,
operation: null,
message:'',
messageText1: '',
messageText2: '',
timeCountConfirm: -1,
@ -124,6 +124,7 @@ export default {
},
methods: {
doShow(operate, selected) {
this.message = '';
this.selected = selected;
if (!this.dialogShow) {
this.messageText1 = selected.name;
@ -139,6 +140,7 @@ export default {
this.dialogShow = false;
this.messageText1 = '';
this.messageText2 = '';
this.message = '';
this.timeCountConfirm = -1;
this.disabledConfirm1 = false;
this.disabledConfirm2 = true;
@ -147,6 +149,7 @@ export default {
},
SelectChange() {
this.message = '';
const operate = {
operation: '',
val: this.messageText2
@ -192,32 +195,36 @@ export default {
});
},
confirm2() {
const operate = {
operation: '',
cmdType: ''
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.messageText2 = '*****';
this.disabledConfirm2 = true;
this.timeCountConfirm = -1;
if (this.selected.code == this.messageText2) {
const operate = {
over: true,
operation: '',
cmdType: ''
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
});
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.messageText2 = '*****';
this.disabledConfirm2 = true;
this.timeCountConfirm = -1;
this.message = '操作成功';
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
});
} else {
this.message = '请选择正确的道岔';
}
},
commit() {
const operate = {
over: true,
operation: ''
};
@ -316,6 +323,7 @@ export default {
width: 100%;
border: 2px solid #E9E9E9;
box-shadow: 2px 2px #959595 inset;
padding:5px;
}
}
}

View File

@ -87,6 +87,7 @@
</template>
</div>
<station-control ref="stationControl" />
<view-train-id ref="viewTrainId" />
<detain-train-contorl ref="detainTrainContorl" />
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
<notice-info ref="noticeInfo" />
@ -105,6 +106,7 @@ import StationControl from './menuDialog/stationControl';
import DetainTrainContorl from './menuDialog/detainTrainContorl';
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
import TrainAdd from './menuDialog/trainAdd';
import ViewTrainId from './menuDialog/viewTrainId';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import ManageUser from './menuDialog/manageUser';
@ -123,6 +125,7 @@ export default {
TrainTranstalet,
TrainDelete,
ManageUser,
ViewTrainId,
HelpAbout
},
props: {
@ -187,6 +190,27 @@ export default {
}
]
},
{
title: this.$t('menu.menuBar.display'),
operate: OperationEvent.Command.mBar.view,
children: [
{
title: this.$t('menu.menuBar.setTrainIdDisplay'),
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
}
// {
// title: this.$t('menu.menuBar.setNameDisplay'),
// click: this.setNameDisplay,
// operate: OperationEvent.Command.view.setNameDisplay
// },
// {
// title: this.$t('menu.menuBar.setDeviceDisplay'),
// click: this.setDeviceDisplay,
// operate: OperationEvent.Command.view.setDeviceDisplay
// }
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
@ -432,6 +456,27 @@ export default {
}
]
},
{
title: this.$t('menu.menuBar.display'),
operate: OperationEvent.Command.mBar.view,
children: [
{
title: this.$t('menu.menuBar.setTrainIdDisplay'),
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
}
// {
// title: this.$t('menu.menuBar.setNameDisplay'),
// click: this.setNameDisplay,
// operate: OperationEvent.Command.view.setNameDisplay
// },
// {
// title: this.$t('menu.menuBar.setDeviceDisplay'),
// click: this.setDeviceDisplay,
// operate: OperationEvent.Command.view.setDeviceDisplay
// }
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
@ -797,6 +842,19 @@ export default {
this.closeMenu(true);
}
},
//
setTrainIdDisplay(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewTrainId.doShow(operate);
}
});
},
//
stationRemoteControl(order) {
const operate = {

View File

@ -43,8 +43,8 @@ export default {
disabledCommit: false,
control: '01',
controlProps: {
'01': '取消上行扣车',
'02': '取消下行扣车'
'01': '取消上行全线扣车',
'02': '取消下行全线扣车'
}
};
@ -63,9 +63,9 @@ export default {
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
return '取消上行扣车';
return '取消上行全线扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
return '取消下行扣车';
return '取消下行全线扣车';
}
}
},

View File

@ -0,0 +1,208 @@
<template>
<el-dialog
v-dialogDrag
class="foshan-01__systerm view-train-id"
:title="$t('menu.menuDialog.trainIDDisplaySetting')"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{ $t('menu.menuDialog.plantrainDisplayMode') }}</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="5">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">{{ $t('menu.menuDialog.headCodeStationDisplayMode') }}</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="6" :offset="4">
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{ $t('menu.menuDialog.fontSize') }}</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">{{ $t('menu.menuDialog.range') }}</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import deviceType from '@/jmap/constant/deviceType';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 19
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(() => {
this.loading = false;
});
},
setTrainDispaly() {
const updatlist = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
trainList.forEach(elem => {
updatlist.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameFormat, nameFontSize }));
});
this.$store.dispatch('map/updateMapDevices', updatlist);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
}
return ''; //
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ {
.el-dialog .el-radio__label{
width: 150px ;
white-space: pre-wrap ;
display: inline-block ;
}
.el-radio__input{
vertical-align: top;
}
}
.elrow{
margin-top:4px;
}
</style>

View File

@ -21,7 +21,7 @@
</el-table-column>
<el-table-column prop="canSetting" :label="this.$t('global.status')" :width="100">
<template slot-scope="scope">
<span v-if="scope.row.canSetting">{{ $t('menu.allowSelection') }}</span>
<span v-if="scope.row.settable">{{ $t('menu.allowSelection') }}</span>
<span v-else>{{ $t('menu.notAllowSelection') }}</span>
</template>
</el-table-column>

View File

@ -129,16 +129,14 @@ export const menuOperate = {
},
Switch:{
lock:{
// 道岔单锁(联锁)
// 道岔单锁
operation: OperationEvent.Switch.lock.menu.operation,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
unlock:{
// 道岔解锁(联锁)
// 道岔解锁
operation: OperationEvent.Switch.unlock.menu.operation,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
block:{
// 道岔封锁
@ -150,15 +148,10 @@ export const menuOperate = {
operation: OperationEvent.Switch.unblock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
npChain:{
// 道岔定操(联动)
operation: OperationEvent.Switch.locate.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
},
rpChain:{
// 道岔反操(联动)
operation: OperationEvent.Switch.reverse.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
turnout:{
// 道岔转动
operation: OperationEvent.Switch.turnout.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN
},
split:{
// 区段切除

View File

@ -129,16 +129,14 @@ export const menuOperate = {
},
Switch:{
lock:{
// 道岔单锁(联锁)
// 道岔单锁
operation: OperationEvent.Switch.lock.menu.operation,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
unlock:{
// 道岔解锁(联锁)
// 道岔解锁
operation: OperationEvent.Switch.unlock.menu.operation,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
block:{
// 道岔封锁
@ -150,15 +148,15 @@ export const menuOperate = {
operation: OperationEvent.Switch.unblock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
npChain:{
// 道岔定操(联动)
locate:{
// 道岔定操
operation: OperationEvent.Switch.locate.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
cmdType:CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
rpChain:{
// 道岔反操(联动)
reverse:{
// 道岔反操
operation: OperationEvent.Switch.reverse.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
cmdType:CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
split:{
// 区段切除

View File

@ -199,11 +199,11 @@ export default {
},
//
locate() {
this.sendCommand(menuOperate.Switch.npChain);
this.sendCommand(menuOperate.Switch.locate);
},
//
reverse() {
this.sendCommand(menuOperate.Switch.rpChain);
this.sendCommand(menuOperate.Switch.reverse);
},
//
split() {

View File

@ -180,6 +180,7 @@ export default {
val: this.messageText2
};
this.message = '';
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
operate.operation = OperationEvent.Switch.unlock.choose.operation;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
@ -221,13 +222,15 @@ export default {
},
confirm2() {
if (this.messageText2 == this.switchCode) {
this.message = '';
const operate = {
over: true,
operation: '',
cmdType: ''
};
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN;
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK;
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
@ -239,17 +242,17 @@ export default {
this.messageText2 = '*****';
this.disabledConfirm2 = true;
this.timeCountConfirm = -1;
this.message = '操作成功';
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
} else {
this.message = '选择道岔错误';
this.message = '选择正确的道岔';
}
},
commit() {
const operate = {
over: true,
operation: ''
};
@ -348,6 +351,7 @@ export default {
width: 100%;
border: 2px solid #E9E9E9;
box-shadow: 2px 2px #959595 inset;
padding:5px;
}
}
}

View File

@ -49,22 +49,22 @@ export default {
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
label: '道岔单锁',
handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
{
label: '道岔单解',
handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
{
label: '道岔封锁',
@ -81,12 +81,12 @@ export default {
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
type: 'separator'
@ -185,7 +185,7 @@ export default {
},
//
locate() {
commitOperate(menuOperate.Switch.npChain, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}
@ -193,7 +193,7 @@ export default {
},
//
reverse() {
commitOperate(menuOperate.Switch.rpChain, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}

View File

@ -131,14 +131,12 @@ export const menuOperate = {
lock:{
// 道岔单锁(联锁)
operation: OperationEvent.Switch.lock.menu.operation,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
unlock:{
// 道岔解锁(联锁)
operation: OperationEvent.Switch.unlock.menu.operation,
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
block:{
// 道岔封锁
@ -150,15 +148,15 @@ export const menuOperate = {
operation: OperationEvent.Switch.unblock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
npChain:{
locate:{
// 道岔定操(联动)
operation: OperationEvent.Switch.locate.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
cmdType:CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
rpChain:{
reverse:{
// 道岔反操(联动)
operation: OperationEvent.Switch.reverse.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
cmdType:CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
split:{
// 区段切除

View File

@ -358,7 +358,7 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Turn_NP_Chain',
operateType: 'Switch_Normal_Position',
skinCode: '06',
trainingName: '定操({7})',
trainingRemark: '定操({7})',
@ -372,7 +372,7 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Turn_RP_Chain', // 0313 新增定位字典
operateType: 'Switch_Reverse_Position', // 0313 新增定位字典
skinCode: '06',
trainingName: '反操({7})',
trainingRemark: '反操({7})',

View File

@ -218,7 +218,7 @@ export default {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
};
this.loading = true;

View File

@ -21,7 +21,7 @@
</el-table-column>
<el-table-column prop="canSetting" :label="this.$t('global.status')" :width="100">
<template slot-scope="scope">
<span v-if="scope.row.canSetting">{{ $t('menu.allowSelection') }}</span>
<span v-if="scope.row.settable">{{ $t('menu.allowSelection') }}</span>
<span v-else>{{ $t('menu.notAllowSelection') }}</span>
</template>
</el-table-column>

View File

@ -127,7 +127,7 @@ export default {
},
//
turnout() {
this.sendCommand(menuOperate.Switch.switchTurnout);
this.sendCommand(menuOperate.Switch.turnout);
},
//
split() {
@ -144,10 +144,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch(() => {
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
this.$refs.noticeInfo.doShow(error.message);
});
},

View File

@ -59,7 +59,7 @@ export default {
{
label: '进路取消',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '信号封锁',
@ -131,7 +131,7 @@ export default {
{
label: '进路取消',
handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
{
label: '信号封锁',

View File

@ -263,7 +263,7 @@ export default {
},
//
switchTurnout() {
commitOperate(menuOperate.Switch.switchTurnout, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.Switch.turnout, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.switchControl.doShow(operate, this.selected);
}

View File

@ -60,7 +60,7 @@ export const menuOperate = {
cancelTrainRoute:{
// 取消进路
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
lock:{
// 信号封锁
@ -158,7 +158,7 @@ export const menuOperate = {
operation: OperationEvent.Switch.unblock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
switchTurnout: {
turnout: {
// 道岔转动
operation: OperationEvent.Switch.turnout.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_TURN
@ -278,7 +278,7 @@ export const menuOperate = {
// 设置折返策略
operation: OperationEvent.Station.setBackStrategy.menu.operation,
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
},
}
},
TrainWindow: {
editTrainId: {

View File

@ -52,12 +52,12 @@ export default {
{
label: '定操',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '反操',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
label: '道岔单锁',
@ -84,12 +84,12 @@ export default {
{
label: '道岔定位',
handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
{
label: '道岔反位',
handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
{
label: '道岔单锁',
@ -256,7 +256,7 @@ export default {
},
//
locate() {
commitOperate(menuOperate.Switch.npChain, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,
@ -269,7 +269,7 @@ export default {
},
//
reverse() {
commitOperate(menuOperate.Switch.rpChain, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) {
this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected,

View File

@ -144,15 +144,15 @@ export const menuOperate = {
operation: OperationEvent.Switch.unblock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
},
npChain:{
// 道岔定操(联动)
locate:{
// 道岔定操
operation: OperationEvent.Switch.locate.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN_NP_CHAIN
cmdType:CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
rpChain:{
// 道岔反操(联动)
reverse:{
// 道岔反操
operation: OperationEvent.Switch.reverse.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_TURN_RP_CHAIN
cmdType:CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
split:{
// 区段切除

View File

@ -358,7 +358,7 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Turn_NP_Chain',
operateType: 'Switch_Normal_Position',
skinCode: '06',
trainingName: '定操({7})',
trainingRemark: '定操({7})',
@ -372,7 +372,7 @@ export default {
{
maxDuration: 15,
minDuration: 8,
operateType: 'Switch_Turn_RP_Chain', // 0313 新增定位字典
operateType: 'Switch_Reverse_Position', // 0313 新增定位字典
skinCode: '06',
trainingName: '反操({7})',
trainingRemark: '反操({7})',

View File

@ -25,7 +25,9 @@ function isDesignPage(toRoutePath) {
return designPageRegex.some(item => item.test(toRoutePath) );
}
for (const val in PermissionParam) {
whiteList.push(PermissionParam[val].whitePage);
if (PermissionParam[val].whitePage) {
whiteList.push(PermissionParam[val].whitePage);
}
}
const loginPage = whiteList[0];
const loginDesignPage = whiteList[1];

View File

@ -8,10 +8,10 @@ export default {
CMD_SWITCH_SINGLE_LOCK: {value:'Switch_Single_Lock', label: '单锁'},
/** 单解 */
CMD_SWITCH_SINGLE_UNLOCK: {value:'Switch_Single_Unlock', label: '单解'},
/** 单锁(联动) */
CMD_SWITCH_SINGLE_LOCK_CHAIN: {value:'Switch_Single_Lock_Chain', label: '单锁(联动)'},
/** 单解(联动) */
CMD_SWITCH_SINGLE_UNLOCK_CHAIN: {value:'Switch_Single_Unlock_Chain', label: '单解(联动)'},
// /** 单锁(联动) */
// CMD_SWITCH_SINGLE_LOCK_CHAIN: {value:'Switch_Single_Lock_Chain', label: '单锁(联动)'},
// /** 单解(联动) */
// CMD_SWITCH_SINGLE_UNLOCK_CHAIN: {value:'Switch_Single_Unlock_Chain', label: '单解(联动)'},
/** 封锁 */
CMD_SWITCH_BLOCK: {value:'Switch_Block', label: '封锁'},
/** 解封 */
@ -38,10 +38,10 @@ export default {
CMD_SWITCH_NORMAL_POSITION:{value:'Switch_Normal_Position', label:'单操到定位'},
/** 反位(反操) */
CMD_SWITCH_REVERSE_POSITION:{value:'Switch_Reverse_Position', label:'单操到反位'},
/** 道岔定操(联动) */
CMD_SWITCH_TURN_NP_CHAIN: {value: 'Switch_Turn_NP_Chain', label: '道岔定操(联动)'},
/** 道岔反操(联动)*/
CMD_SWITCH_TURN_RP_CHAIN: {value: 'Switch_Turn_RP_Chain', label: '道岔反操(联动)'},
// /** 道岔定操(联动) */
// CMD_SWITCH_TURN_NP_CHAIN: {value: 'Switch_Turn_NP_Chain', label: '道岔定操(联动)'},
// /** 道岔反操(联动)*/
// CMD_SWITCH_TURN_RP_CHAIN: {value: 'Switch_Turn_RP_Chain', label: '道岔反操(联动)'},
/** 道岔区段封锁 */
CMD_SWITCH_SECTION_BLOCK: {value: 'Switch_Section_Block', label: '道岔区段封锁'},
/** 道岔区段解封 */
@ -78,8 +78,8 @@ export default {
CMD_SIGNAL_SET_ROUTE: {value:'Signal_Set_Route', label: '排列进路'},
/** 取消进路 */
CMD_SIGNAL_CANCEL_ROUTE: {value:'Signal_Cancel_Route', label: '取消进路'},
/** 强制取消进路 */
CMD_SIGNAL_FORCE_CANCEL_ROUTE: {value: 'Signal_Force_Cancel_Route', label: '强制取消进路'},
// /** 强制取消进路 */
// CMD_SIGNAL_FORCE_CANCEL_ROUTE: {value: 'Signal_Force_Cancel_Route', label: '强制取消进路'},
/** 人解进路 */
CMD_SIGNAL_HUMAN_RELEASE_ROUTE: {value:'Signal_Human_Release_Route', label: '人解进路'},
/** 信号关灯 */

View File

@ -165,7 +165,6 @@ const iscs = {
commit('iscsRender', models);
resolve(models);
});
},
setUpdateDeviceData: ({ commit }, models) => {

View File

@ -165,7 +165,7 @@ function handleSimulationInfo(state, data) {
self: isSelf,
message: data.message,
voice: data.isAudio,
src: data.isAudio ? `/jlcloud/audio/${data.audioPath}` : '',
src: data.isAudio ? `/audio/${data.audioPath}` : '',
member:data.member,
memberOnline:data.member.online,
chatTime: data.chatTime,

View File

@ -1,8 +1,8 @@
<template>
<div class="control-bas-box">
<div class="title-name">{{ $route.query.stationName }}大系统模式表</div>
<div class="title-name">{{ $route.query.stationName + modeName }}</div>
<div class="control-bas">
<el-table :data="tableData" :header-row-style="tableTitleStyle" :cell-style="rowStyle" :span-method="objectSpanMethod" style="float: left;">
<el-table v-if="mode==='bigSystem'" ref="table1" :data="tableData" :header-row-style="tableTitleStyle" :cell-style="rowStyle" :span-method="objectSpanMethod" style="float: left;">
<el-table-column label="日期" width="300">
<template slot="header">
<div class="title-0">全年运行工况</div>
@ -17,10 +17,10 @@
<div>运行</div>
</div>
<div class="right">
<div class="button-box" @click="SmallAirConditioning">小新风空调</div>
<div class="button-box">全新风空调</div>
<div class="button-box">非空调季节</div>
<div class="button-box">冬季模式</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(0)">小新风空调</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(1)">全新风空调</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(2)">非空调季节</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(3)">冬季模式</div>
</div>
</div>
<div v-if="scope.$index == 4" class="table-4-top">
@ -29,11 +29,11 @@
<div>模式</div>
</div>
<div class="right">
<div class="button-box">站厅公共区火灾</div>
<div class="button-box">站台公共区火灾</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(4)">站厅公共区火灾</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(5)">站台公共区火灾</div>
</div>
<div class="button-box">非火灾工况突发事件</div>
<div class="button-box">全修模式</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(6)">非火灾工况突发事件</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(7)">全停模式</div>
</div>
<div v-if="scope.$index == 8" class="table-8-top">设备实际运行状态</div>
<div v-if="scope.$index == 9" class="table-9-top">状态比较</div>
@ -75,27 +75,205 @@
</el-table-column>
</el-table-column>
</el-table>
<el-table v-else-if="mode === 'smallSystem1'" ref="table2" :data="tableData1" :header-row-style="tableTitleStyle" :cell-style="rowStyle" :span-method="objectSpanMethod1" style="float: left;">
<el-table-column type="index" width="20" class-name="index-column">
<template slot="header">
<div style="width: 100%;height: 26px;background: #FFF" />
<div class="index-column-cell">1</div>
<div class="index-column-cell">2</div>
<div class="index-column-cell">3</div>
</template>
<template slot-scope="scope">
<div class="index-column-cell">{{ scope.$index + 4 }}</div>
</template>
</el-table-column>
<el-table-column width="300">
<template slot="header">
<div style="font-size: 0;text-align: center;">
<div class="index-row-cell">1</div>
<div class="index-row-cell">2</div>
<div class="index-row-cell">3</div>
</div>
<div class="title-0">全年运行工况</div>
<div class="title-0">运行模式号</div>
<div class="title-0">模式状态</div>
<div class="title-0">火灾指示灯:</div>
</template>
<template slot-scope="scope">
<div v-if="scope.$index == 0" class="table-0-top">
<div class="left" style="width: 100px;">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div class="right" style="width: 195px;">
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(0)">小新风空调</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(1)">小新风空调</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(2)">非空调工况</div>
<div class="button-box" style="width: 100%;height: 27px;line-height: 27px;" @click="showModeDialog(3)">35KV开关柜室事故排风</div>
</div>
</div>
<div v-if="scope.$index == 4" style="display: flex;">
<div style="width: 100px;display: inline-block;margin: auto;">
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div style="width: 100px;display: inline-block;">
<div style="height: 56px; border: 1px solid #FFF;">控制室</div>
<div style="height: 56px; border: 1px solid #FFF;">
<div>35KV</div>
<div>开关柜室</div>
</div>
<div style="height: 56px; border: 1px solid #FFF;">
<div>整流变频</div>
<div>压器室1</div>
</div>
<div style="height: 56px; border: 1px solid #FFF;">
<div>整流变频</div>
<div>压器室2</div>
</div>
<div style="height: 56px; border: 1px solid #FFF;">
<div>直流开</div>
<div>关柜室</div>
</div>
<div style="height: 56px; border: 1px solid #FFF;">
<div>0.4KV</div>
<div>低压柜室</div>
</div>
</div>
<div style="width: 100px;display: inline-block;">
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(4)">灭火</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(5)">排气</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(4)">灭火</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(5)">排气</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(4)">灭火</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(5)">排气</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(4)">灭火</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(5)">排气</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(4)">灭火</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(5)">排气</div>
<div class="button-box" style="width: 100%;height: 28px;line-height: 28px;" @click="showModeDialog(4)">灭火</div>
<div class="button-box" style="width: 100%;height: 27px;line-height: 27px;" @click="showModeDialog(5)">排气</div>
</div>
</div>
<div v-if="scope.$index === 16" style="height: 28px;line-height: 28px;">设备实际运行状态</div>
<div v-if="scope.$index === 17">状态比较</div>
</template>
</el-table-column>
<el-table-column :key="11" prop="code" label="模式编号" width="90">
<template slot="header">
<div style="font-size: 0;text-align: center;height: 100%;">
<div class="index-row-cell" style="width: 90px;margin-left: -1px;">4</div>
<div style="font-size: 14px;height: 80px;line-height: 80px;">模式编号</div>
</div>
</template>
</el-table-column>
<el-table-column prop="smallSystem1">
<template slot="header">
<div style="font-size: 0;text-align: center;height: 100%;">
<div class="index-row-cell" style="width: 90px;">5</div>
<div class="index-row-cell" style="width: 90px;">6</div>
<div class="index-row-cell" style="width: 90px;">7</div>
<div class="index-row-cell" style="width: 90px;">8</div>
<div class="index-row-cell" style="width: 90px;">9</div>
<div class="index-row-cell" style="width: 90px;">10</div>
<div class="index-row-cell" style="width: 90px;">11</div>
<div class="index-row-cell" style="width: 89px;">12</div>
<div style="font-size: 14px;">小系统1</div>
</div>
</template>
<el-table-column prop="airConditioner" label="空调机">
<el-table-column prop="ahu1" width="90" label="AHU-B101" />
</el-table-column>
<el-table-column prop="exhaustFan" label="回排风机">
<el-table-column prop="raf1" width="90" label="RAF-B101" />
</el-table-column>
<el-table-column prop="flowControl" label="电动风量调节阀">
<el-table-column prop="md1" width="90" label="MD-B101" />
<el-table-column prop="md2" width="90" label="MD-B102" />
<el-table-column prop="md3" width="90" label="MD-B103" />
<el-table-column prop="md4" width="90" label="MD-B104" />
<el-table-column prop="md5" width="90" label="MD-B105" />
<el-table-column prop="md6" width="90" label="MD-B106" />
</el-table-column>
</el-table-column>
<el-table-column prop="smallSystem2">
<template slot="header">
<div style="font-size: 0;text-align: center;height: 100%;">
<div class="index-row-cell" style="width: 90px;">13</div>
<div class="index-row-cell" style="width: 99px;">14</div>
<div style="font-size: 14px;">小系统2</div>
</div>
</template>
<el-table-column prop="exhaustFan" label="排风机">
<el-table-column prop="eaf" width="90" label="EAF-B201" />
</el-table-column>
<el-table-column prop="flowControl" label="电动风量调节阀">
<el-table-column prop="md7" width="100" label="MD-B201" />
</el-table-column>
</el-table-column>
<el-table-column prop="smallSystem4">
<template slot="header">
<div style="font-size: 0;text-align: center;height: 100%;">
<div class="index-row-cell" style="width: 90px;">15</div>
<div class="index-row-cell" style="width: 90px;">16</div>
<div class="index-row-cell" style="width: 90px;">17</div>
<div class="index-row-cell" style="width: 90px;">18</div>
<div class="index-row-cell" style="width: 90px;">19</div>
<div class="index-row-cell" style="width: 90px;">20</div>
<div class="index-row-cell" style="width: 89px;">21</div>
<div style="font-size: 14px;">小系统4</div>
</div>
</template>
<el-table-column prop="airConditioner" label="空调机">
<el-table-column prop="ahu2" width="90" label="AHU-B401" />
</el-table-column>
<el-table-column prop="exhaustFan" label="回排风机">
<el-table-column prop="raf2" width="90" label="RAF-B401" />
</el-table-column>
<el-table-column prop="flowControl" label="电动风量调节阀">
<el-table-column prop="md8" width="90" label="MD-B401" />
<el-table-column prop="md9" width="90" label="MD-B402" />
<el-table-column prop="md10" width="90" label="MD-B403" />
<el-table-column prop="md11" width="90" label="MD-B404" />
<el-table-column prop="md12" width="90" label="MD-B405" />
</el-table-column>
</el-table-column>
</el-table>
</div>
<el-dialog title="" :visible.sync="dialogVisible" width="600px" class="dialog-div">
<div style="width: 100%;display:flex;justify-content:space-around;">
<div class="button-box" style="padding: 5px;" @click="switchedSystems('bigSystem')">至大系统模式表</div>
<div class="button-box" style="padding: 5px;" @click="switchedSystems('smallSystem1')">至小系统模式表()</div>
<div class="button-box" style="padding: 5px;" @click="switchedSystems('smallSystem2')">至小系统模式表()</div>
<div class="button-box" style="padding: 5px;" @click="switchedSystems('ventilation')">至隧道通风系模式表</div>
<div class="button-box" style="padding: 5px;" @click="switchedSystems('ventilation1')">至隧道通风系模式表1</div>
<div class="button-box" style="padding: 5px;" @click="switchedSystems('ventilation2')">至隧道通风系模式表2</div>
<div class="button-box" style="padding: 5px;" @click="switchedSystems('ventilation3')">至隧道通风系模式表3</div>
<div class="button-box" style="padding: 5px;" @click="switchedSystems('lightingSystem')">至照明模式表</div>
</div>
<el-dialog title="" :visible.sync="dialogVisible" width="600px" class="iscs_device_control_dialog">
<div>
<div class="dialog-box">
<div class="title">模式类别</div>
<div class="content">
<div class="stand-title">会展中心站</div>
<div class="stand-control">系统模式控制</div>
<div class="stand-title">{{ modeModel.stationName }}</div>
<div class="stand-control">{{ modeModel.controlName }}</div>
</div>
</div>
<div class="dialog-box">
<div class="title">启动模式号</div>
<div class="content">
<div class="model">101</div>
<div class="model">{{ modeModel.modeCode }}</div>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<div class="dialog-footer" style="margin-top: 20px; text-align: center;">
<el-button style="margin-right: 13px;" @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</div>
</el-dialog>
</div>
</template>
@ -103,7 +281,13 @@
export default {
data() {
return {
mode:'bigSystem',
dialogVisible: false,
modeModel: {
stationName: this.$route.query.stationName,
controlName: '系统模式控制',
modeCode: ''
},
tableTitleStyle: {'text-align': 'center', 'height': '28px', 'padding': '0', 'background': '#45607B'},
rowStyle: {'text-align': 'center', 'height': '28px', 'padding': '0', 'background': '#45607B' },
tableData: [{
@ -196,9 +380,58 @@ export default {
raf1: '打开',
raf2: '打开',
md1: '打开'
}]
}],
tableData1: [
{code: '301', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '302', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '303', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '304', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '305', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '306', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '307', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '308', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '309', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '310', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '311', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '312', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '313', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '314', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '315', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '316', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{code: '', ahu1: '打开', raf1: '打开', md1: '半开', md2: '半开', md3: '半开', md4: '打开', md5: '打开', md6: '关闭', eaf: '打开', md7: '打开', ahu2: '打开', raf2: '打开', md8: '打开', md9: '打开', md10: '打开', md11: '打开', md12: '打开'},
{}
]
};
},
computed: {
modeName() {
let name = '';
switch (this.mode) {
case 'bigSystem':
name = '大系统模式表';
break;
case 'smallSystem1':
name = '小系统模式表(一)';
break;
case 'ventilation':
name = '隧道通风系模式表';
break;
case 'ventilation1':
name = '隧道通风系模式表(一)';
break;
case 'ventilation2':
name = '隧道通风系模式表(二)';
break;
case 'ventilation3':
name = '隧道通风系模式表(三)';
break;
case 'lightingSystem':
name = '照明模式表';
break;
}
return name;
}
},
methods: {
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) { //
@ -228,9 +461,49 @@ export default {
}
}
},
SmallAirConditioning(item) {
console.log(item);
objectSpanMethod1( {row, column, rowIndex, columnIndex}) {
if (columnIndex === 1) {
if (rowIndex === 0) {
return {
rowspan: 4,
colspan: 1
};
} else if (rowIndex === 4) {
return {
rowspan: 12,
colspan: 1
};
} else if (rowIndex === 16 || rowIndex === 17) {
return {
rowspan: 1,
colspan: 2
};
} else {
return {
rowspan: 0,
colspan: 0
};
}
} else if (columnIndex === 2) {
if (rowIndex === 16 || rowIndex === 17) {
return {
rowspan: 0,
colspan: 0
};
} else {
return {
rowspan: 1,
colspan: 1
};
}
}
},
showModeDialog(index) {
this.modeModel.modeCode = this.tableData[index].code;
this.dialogVisible = true;
},
switchedSystems(mode) {
this.mode = mode;
}
}
};
@ -275,10 +548,7 @@ export default {
}
}
.button-box{
width: 100%;
height: 28px;
text-align: center;
line-height: 28px;
background-color: #ccc;
float: left;
font-size: 12px;
@ -307,6 +577,8 @@ export default {
float: left;
width: 90px;
text-align: left;
color:#6F49FE;
font-size: 14px;
}
.content{
float: left;
@ -319,15 +591,21 @@ export default {
margin-right: 50px;
height: 40px;
line-height: 40px;
color:#6F49FE;
font-size: 14px;
}
.stand-control{
float: left;
height: 40px;
line-height: 40px;
color:#6F49FE;
font-size: 14px;
}
.model{
height: 40px;
line-height: 40px;
color:#6F49FE;
font-size: 14px;
}
}
}
@ -349,15 +627,39 @@ export default {
margin-top: 30px;
color: #56E5DE;
}
.index-column-cell {
text-align:center;
width: 100%;
height: 28px;
border-top: 1px solid #203244;
border-left: 2px solid #A3A3A3;
border-bottom: 1px solid #203244;
border-right: 1px solid #203244;
}
.index-row-cell {
width: 99px;
height: 20px;
font-size: 14px;
line-height: 20px;
display: inline-block;
border-top: 2px solid #A3A3A3;
border-left: 1px solid #203244;
border-bottom: 2px solid #203244;
border-right: 1px solid #203244;
}
/deep/{
.el-table--border{
background: #45607B;
width: 100%;
border: none;
}
.index-column{
border: 0 !important;
}
.el-table th, .el-table tr{
background: #45607B;
color: #fff;
padding: 0;
}
.el-table::before{
background: #45607B;
@ -370,7 +672,7 @@ export default {
text-align: center;
}
.el-table--scrollable-x .el-table__body-wrapper{
height: 400px;
/*height: 400px;*/
}
.el-table .cell,
.el-table th div,
@ -378,8 +680,72 @@ export default {
.el-table--border th:first-child .cell{
padding: 0;
}
.dialog-div .el-dialog__body{
padding-bottom: 0px;
}
}
</style>
<style>
.iscs_device_control_dialog .el-dialog .el-dialog__header {
width: 100%;
height: 30px;
background-image: linear-gradient(#F0DBCE,#ECB85E, #F0DBCE);
}
.iscs_device_control_dialog .el-dialog .el-dialog__headerbtn{
position: absolute;
top: 5px;
right: 10px;
padding: 0;
background: 0 0;
outline: 0;
cursor: pointer;
font-size: 16px;
border: 1px solid #FFF;
width: 20px;
height: 18px;
}
.iscs_device_control_dialog .el-dialog .el-dialog__body {
padding: 30px 20px;
color: #606266;
font-size: 14px;
word-break: break-all;
background: #CDC6C0;
}
.iscs_device_control_dialog .el-dialog .el-button {
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #CACACA;
border-top: 1px solid #3D3B39;
border-left: 1px solid #3D3B39;
border-bottom: 1px solid #847B77;
border-right: 1px solid #847B77;
color: #000;
-webkit-appearance: none;
text-align: center;
-webkit-box-sizing: border-box;
box-sizing: border-box;
outline: 0;
margin: 0;
-webkit-transition: .1s;
transition: .1s;
padding: 0;
font-weight: 500;
font-size: 12px;
height: 30px;
width: 70px;
border-radius: 0;
position: relative;
}
.iscs_device_control_dialog .el-dialog .el-button :before {
content: '';
width: 70px;
height: 30px;
border-top: 1px solid #FFF;
border-left: 1px solid #FFF;
position: absolute;
top: -2px;
left: -2px;
}
.iscs_device_control_dialog .el-dialog .el-button:hover {
background-image: linear-gradient(#E2E4E5,#D5D6D8,#E2E4E5);
}
</style>

View File

@ -100,13 +100,20 @@ export default {
FireHydranAlarmButton: '点型火灾探测器',
GasFireControl:'气体灭火控制器',
LightingGroup: '照明',
Electrically: '',
VolumeControlDamper: '电动风阀',
SmookExhaustFd: '排烟防火阀',
Ventilator: '普通风机',
AirConditioner: '组合式空调机组',
FireDamper: '防火阀',
SmookProofFd: '防烟防火阀'
SmookProofFd: '防烟防火阀',
CoolTower: '冷却塔',
Chiller: '冷水机组',
ElectricButterflyValve: '电动蝶阀',
BalancedElectric: '动态平衡电动调节阀',
FrozenPump: '冷冻泵、冷却泵',
TunnelFan: '隧道风机',
OrbitalVentilator: '排热风机',
Draught: '水泵'
},
modeMap: {
standFAS: '火灾报警',

View File

@ -3,7 +3,7 @@
v-dialogDrag
:visible.sync="dialogShow"
class="graphic_element_dialog"
width="480px"
:width="width"
:before-close="doClose"
:z-index="2000"
:modal="false"
@ -18,12 +18,24 @@
>
<template slot-scope="scope">
<img style="height: 30px" :src="graphicEleMap[scope.row.graphicEle]">
<div class="shorthand">{{ scope.row.shorthand }}</div>
</template>
</el-table-column>
<el-table-column prop="deviceType" label="设备类型" />
<el-table-column
v-if="isDoubleRow"
prop="graphicEle1"
label="图元"
>
<template slot-scope="scope">
<img style="height: 30px" :src="graphicEleMap[scope.row.graphicEle1]">
<div class="shorthand">{{ scope.row.shorthand1 }}</div>
</template>
</el-table-column>
<el-table-column v-if="isDoubleRow" prop="deviceType1" label="设备类型" />
</el-table>
<div style="color: #0DC8DE;font-size: 14px;margin-top: 20px;"><span>:图元颜色含义</span></div>
<div style="color: #0DC8DE;font-size: 14px;margin-left: 20px;"><span>绿色:正常红色:报警</span></div>
<div style="color: #0DC8DE;font-size: 14px;margin-left: 20px;"><span>{{ meaning }}</span></div>
</el-dialog>
</template>
@ -32,6 +44,19 @@ import ManualAlarm from '@/assets/iscs_icon/manual_alarm.png';
import FireHydrant from '@/assets/iscs_icon/fire_hydrant.png';
import SmokeDetector from '@/assets/iscs_icon/smoke_detector.png';
import GasFireControl from '@/assets/iscs_icon/gas_fire_control.png';
import AirConditioner from '@/assets/iscs_icon/air_conditioner.png';
import Ventilator from '@/assets/iscs_icon/ventilator.png';
import TunnelFan from '@/assets/iscs_icon/tunnel_fan.png';
import OrbitalVentilator from '@/assets/iscs_icon/orbital_ventilator.png';
import FireDamper from '@/assets/iscs_icon/fire_damper.png';
import SmookExhaustFd from '@/assets/iscs_icon/smook_exhaust_fd.png';
import VolumeControlDamper from '@/assets/iscs_icon/volume_control_damper.png';
import SmookProofFd from '@/assets/iscs_icon/smook_proof_fd.png';
import CoolTower from '@/assets/iscs_icon/cool_tower.png';
import Chiller from '@/assets/iscs_icon/chiller.png';
import ElectricButterflyValve from '@/assets/iscs_icon/electric_butterfly_value.png';
import BalancedElectric from '@/assets/iscs_icon/balanced_electric.png';
import FrozenPump from '@/assets/iscs_icon/frozen_pump.png';
export default {
name: 'GraphicEle',
@ -40,31 +65,38 @@ export default {
dialogShow: false,
loading: false,
standFASData: [
{graphicEle: 'manualAlarm', deviceType: '手动报警按钮'},
{graphicEle: 'fireHydrant', deviceType: '消火栓按钮'},
{graphicEle: 'smokeDetector', deviceType: '点型火灾探测器'},
{graphicEle: 'gasFireControl', deviceType: '气体灭火控制器'}
{graphicEle: 'manualAlarm', deviceType: '手动报警按钮', shorthand: ''},
{graphicEle: 'fireHydrant', deviceType: '消火栓按钮', shorthand: ''},
{graphicEle: 'smokeDetector', deviceType: '点型火灾探测器', shorthand: ''},
{graphicEle: 'gasFireControl', deviceType: '气体灭火控制器', shorthand: ''}
],
basData: [
{graphicEle: 'AirConditioner', deviceType: '组合式空调机组、空调器'},
{graphicEle: 'Ventilator', deviceType: '普通风机'},
{graphicEle: '', deviceType: '隧道风机'},
{graphicEle: '', deviceType: '排热风机'},
{graphicEle: 'FireDamper', deviceType: '防火阀'},
{graphicEle: 'SmookExhaustFd', deviceType: '排烟防火阀'},
{graphicEle: 'VolumeControlDamper', deviceType: '电动风阀'},
{graphicEle: 'SmookProofFd', deviceType: '防烟防火阀'},
{graphicEle: '', deviceType: '冷却塔'},
{graphicEle: '', deviceType: '冷水机组'},
{graphicEle: '', deviceType: '电动蝶阀'},
{graphicEle: '', deviceType: '动态平衡电动调节阀'},
{graphicEle: '', deviceType: '冷冻泵、冷却泵'}
{graphicEle: 'AirConditioner', deviceType: '组合式空调机组、空调器', shorthand: '', graphicEle1: 'CoolTower', deviceType1: '冷却塔', shorthand1: ''},
{graphicEle: 'Ventilator', deviceType: '普通风机', shorthand: '', graphicEle1: 'Chiller', deviceType1: '冷水机组', shorthand1: ''},
{graphicEle: 'TunnelFan', deviceType: '隧道风机', shorthand: '', graphicEle1: 'ElectricButterflyValve', deviceType1: '电动蝶阀', shorthand1: 'MV'},
{graphicEle: 'OrbitalVentilator', deviceType: '排热风机', shorthand: '', graphicEle1: 'BalancedElectric', deviceType1: '动态平衡电动调节阀', shorthand1:'BV'},
{graphicEle: 'FireDamper', deviceType: '防火阀', shorthand: 'FD1', graphicEle1: 'FrozenPump', deviceType1: '冷冻泵、冷却泵', shorthand1: 'LD、LQ'},
{graphicEle: 'SmookExhaustFd', deviceType: '排烟防火阀', shorthand: 'FD2', graphicEle1: 'SmookProofFd', deviceType1: '防烟防火阀', shorthand1: 'SFD'},
{graphicEle: 'VolumeControlDamper', deviceType: '电动风阀', shorthand: 'MD'}
],
graphicEleMap: {
manualAlarm: ManualAlarm,
fireHydrant: FireHydrant,
smokeDetector: SmokeDetector,
gasFireControl: GasFireControl
gasFireControl: GasFireControl,
AirConditioner: AirConditioner,
Ventilator: Ventilator,
TunnelFan: TunnelFan,
OrbitalVentilator: OrbitalVentilator,
FireDamper: FireDamper,
SmookExhaustFd: SmookExhaustFd,
VolumeControlDamper: VolumeControlDamper,
SmookProofFd: SmookProofFd,
CoolTower: CoolTower,
Chiller: Chiller,
ElectricButterflyValve: ElectricButterflyValve,
BalancedElectric: BalancedElectric,
FrozenPump:FrozenPump
},
styleObject: {
background: '#465F79',
@ -72,30 +104,26 @@ export default {
borderBottom: '2px solid #FFF',
borderRight: '2px solid #FFF',
textAlign: 'center'
}
},
tableData: [],
title: '',
meaning: '',
width: '480px',
doubleRowList: ['bigSystem', 'waterSystem']
};
},
computed: {
title() {
let title = '';
switch (this.$route.params.mode) {
case 'standFAS':
title = 'fAS火灾图元详情';
}
return title;
},
tableData() {
let tableData = [];
switch (this.$route.params.mode) {
case 'standFAS':
case 'stationHallFAS':
tableData = this.standFASData;
break;
}
return tableData;
isDoubleRow() {
return this.doubleRowList.includes(this.$route.params.mode);
}
},
watch: {
'$route.params.mode':function() {
this.initData();
}
},
mounted() {
this.initData();
},
methods: {
doShow() {
@ -104,6 +132,24 @@ export default {
doClose() {
this.loading = false;
this.dialogShow = false;
},
initData() {
switch (this.$route.params.mode) {
case 'standFAS':
case 'stationHallFAS':
this.title = 'fAS火灾图元详情';
this.tableData = this.standFASData;
this.meaning = '绿色:正常。红色:报警';
this.width = '480px';
break;
case 'bigSystem':
case 'waterSystem':
this.title = 'BAS通风空调图元详情';
this.width = '600px';
this.tableData = this.basData;
this.meaning = '白色:关闭/停止。绿色:打开/运行。红色:报警。黄色:故障。';
break;
}
}
}
};
@ -135,4 +181,10 @@ export default {
background: #465F79;
border: 3px solid #FFF;
}
.shorthand {
display: inline-block ;
color: #0DC8DE;
font-size: 14px;
margin-right: 5px;
}
</style>

View File

@ -119,7 +119,15 @@ export default {
'Ventilator',
'AirConditioner',
'FireDamper',
'SmookProofFd'
'SmookProofFd',
'CoolTower',
'Chiller',
'ElectricButterflyValve',
'BalancedElectric',
'FrozenPump',
'TunnelFan',
'OrbitalVentilator',
'Draught'
]
};
},
@ -129,7 +137,6 @@ export default {
},
'$store.state.iscs.selectedCount': function() {
const device = this.$store.state.iscs.selected;
console.log(device, '11111111111111');
if (device && device._type === 'IscsButton' && device.function === 'GraphicEle') {
this.$refs.graphicEle.doShow();
} else if (device && this.deviceList.includes(device._type)) {

View File

@ -45,6 +45,7 @@ export default {
},
selected: null, //
copyModel: {}, //
copyList: [],
showBackButton: true,
initTime: '',
started: false,
@ -139,21 +140,41 @@ export default {
if (this.selected && this.selected.code) {
switch (hook) {
case 'Ctrl_C': {
if (this.selected._type != "CheckBox") {
this.copyModel = deepAssign({}, this.selected);
this.copyModel.point = {
x: this.selected.point.x + 10,
y: this.selected.point.y + 10
};
const list = this.getSelectList();
if (list.length) {
this.copyList = [];
const mapIscs = {};
list.forEach(item => {
if (item && item.code) {
const copyModel = this.copyModelInfo(item, 30);
const type1 = item._type.charAt(0).toLowerCase() + item._type.slice(1); // .toLowerCase()
if (!mapIscs[type1 + 'List']) {
mapIscs[type1 + 'List'] = this.iscs[type1 + 'List'] || [];
}
const list = mapIscs[type1 + 'List'] || [];
copyModel.code = getUID(item._type, list);
mapIscs[type1 + 'List'].push(copyModel);
this.copyList.push(copyModel);
}
});
} else if (this.selected._type != 'CheckBox') {
this.copyModel = this.copyModelInfo(this.selected, 10);
const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1); // .toLowerCase()
this.copyModel.code = getUID(this.selected._type, this.iscs[type1 + 'List'] || []);
} else {
this.copyModel = {}
this.copyModel = {};
}
} break;
case 'Ctrl_V': {
const list = this.getSelectList();
if (list.length) {
this.copyList.forEach(item => {
item.code && this.createDataModel(item);
});
} else {
this.copyModel.code && this.createDataModel(this.copyModel);
}
} break;
case 'Ctrl_V':
this.copyModel.code && this.createDataModel(this.copyModel);
break;
// case 'Delete': this.$store.dispatch('map/setDeleteCount');
// break;
// case 'Update':
@ -163,6 +184,27 @@ export default {
}
}
},
copyModelInfo(model, length) { // copy
const copyModel = deepAssign({}, model);
if (copyModel._type == 'IscsLine') {
copyModel.point1 = {
x: model.point1.x + length,
y: model.point1.y + length
};
copyModel.point2 = {
x: model.point2.x + length,
y: model.point2.y + length
};
}
copyModel.point = {
x: model.point.x + length,
y: model.point.y + length
};
return copyModel;
},
getSelectList() {
return this.$iscs.getCopyList() || [];
},
createDataModel(model) {
const newModel = deviceFactory(model._type, model);
this.$store.dispatch('iscs/updateIscsDevices', newModel.model);

View File

@ -1,6 +1,6 @@
<template>
<div style="width:100%;height:50%;position:absolute;bottom:4%">
<div id="start" class="panebutton2" style="bottom:1%;left:5%;">
<div id="start" class="panebutton2" style="bottom:1%;left:5%;" >
<img class="buttonimg2" :src="start" />
</div>

View File

@ -141,7 +141,6 @@ import axios from 'axios';
}
},
updatetrainlist(){
console.log(this.group);
getSimulationTrainlistNew(this.group).then(netdata => {
this.options = [];
this.trainlist = netdata.data;
@ -168,9 +167,16 @@ import axios from 'axios';
this.options.push(option);
}
this.options.sort(
function(obj1,obj2) {
let val1 = obj1.value;
let val2 = obj2.value;
return val1 - val2;
}
);
});
},
}
},
}
</script>

View File

@ -4,8 +4,16 @@
<!-- <div id="atb" class="panebutton" style="top:8%;left:3%;" @click="atbclick">
<img class="buttonimg" :src="greenimg" />
<div class="buttontext">{{ $t('jlmap3d.ATBStart') }}</div>
</div> -->
<!-- 换端 -->
<div id="ch" class="panebutton" style="top:8%;left:3%;"@click="changehead">
<img class="buttonimg" :src="greenimg" />
<div class="buttontext">{{ $t('jlmap3d.ChangeHead') }}</div>
</div>
<!-- BM/CBTC -->
<div id="bmcbtc" class="panebutton" style="top:8%;left:17%;" @click="bmcbtcclick">
<img class="buttonimg" :src="cbtcbuttonimg" />
<div class="buttontext">BM/CBTC</div>
@ -132,7 +140,7 @@
<script>
import Vue from 'vue';
// import { sendSimulationCommand } from '@/api/simulation.js';
import { trainSimulationDriveMode, trainSimulationAto ,trainSimulationAtp } from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
import { trainSimulationDriveMode, trainSimulationAto ,trainSimulationAtp,trainSimulationChangeHead } from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
export default {
name: 'TopRightPane',
@ -171,9 +179,13 @@
driverlighttf:"rotate(0deg)",
headlighttf:"rotate(0deg)",
atoOn:null,
atobuttonimg:"/static/jl3d/control/green.png",
driveMode:null,
rmbuttonimg:"/static/jl3d/control/green.png",
runLevel:null,
cbtcbuttonimg:"/static/jl3d/control/green.png",
}
},
watch: {
@ -342,6 +354,11 @@
atbclick: function (e){
},
changehead: function(e){
trainSimulationChangeHead(this.group,this.groupNum).then(netdata => {
console.log(netdata);
});
},
bmcbtcclick: function (e){
trainSimulationDriveMode(this.group,this.groupNum,"CM").then(netdata => {
@ -375,22 +392,29 @@
},
updatabuttonlight: function (data){
// console.log(data);
if(data.runLevel == "CBTC"){
this.cbtcbuttonimg = this.greenlimg;
}else{
this.cbtcbuttonimg = this.greenimg;
if(data.runLevel!= this.runLevel){
this.runLevel = data.runLevel;
if(data.runLevel == "CBTC"){
this.cbtcbuttonimg = this.greenlimg;
}else{
this.cbtcbuttonimg = this.greenimg;
}
}
if(data.driveMode == "RM"){
this.rmbuttonimg = this.greenlimg;
}else{
this.rmbuttonimg = this.greenimg;
if(data.driveMode!= this.driveMode){
this.driveMode = data.driveMode;
if(data.driveMode == "RM"){
this.rmbuttonimg = this.greenlimg;
}else{
this.rmbuttonimg = this.greenimg;
}
}
if(data.atoOn){
this.atobuttonimg = this.greenlimg;
}else{
this.atobuttonimg = this.greenimg;
if(data.atoOn!= this.atoOn){
this.atoOn = data.atoOn;
if(data.atoOn){
this.atobuttonimg = this.greenlimg;
}else{
this.atobuttonimg = this.greenimg;
}
}
}

View File

@ -118,9 +118,9 @@ export default {
nimage:null,
dstate:"info",
dimage:null,
m1state:"rm",
m1state:null,
m1image:null,
m2state:"cbtc",
m2state:"null",
m2image:null,
m3state:"zhefan",
m3image:null,
@ -134,7 +134,8 @@ export default {
m7image:null,
m8state:"jinjizhidong",
m8image:null,
m9state:"ato",
m9state1:null,
m9state2:null,
m9image:null,
m10state:"jinduan",
m10image:null,
@ -202,7 +203,6 @@ export default {
},
updatetrainstatus(newdata){
//
// console.log(newdata);
this.updatespeed(newdata.v);
this.updateatpspeed(newdata.pv);
@ -243,136 +243,128 @@ export default {
},
updatedrivedata(drivedata){
// console.log(drivedata);
if(drivedata == "breaker"){
}
if(drivedata == "carwash"){
}
if(drivedata == "aircom"){
}
if(drivedata == "atb"){
}
if(drivedata == "bm"){
}
if(drivedata == "rm"){
if(this.m1state == "start"){
this.m1state = 'rm';
this.m1image = this.images.m1[this.m1state];
}else if(this.m1state == "rm"){
this.m1state = 'am';
this.m1image = this.images.m1[this.m1state];
}else if(this.m1state == "am"){
this.m1state = 'cm';
this.m1image = this.images.m1[this.m1state];
}else if(this.m1state == "cm"){
this.m1state = 'start';
this.m1image = this.images.m1[this.m1state];
}
}
if(drivedata == "cbtc"){
if(this.m2state == "start"){
this.m2state = 'il';
this.m2image = this.images.m2[this.m2state];
}else if(this.m2state == "il"){
this.m2state = 'itc';
this.m2image = this.images.m2[this.m2state];
}else if(this.m2state == "itc"){
this.m2state = 'cbtc';
this.m2image = this.images.m2[this.m2state];
}else if(this.m2state == "cbtc"){
this.m2state = 'start';
this.m2image = this.images.m2[this.m2state];
}
}
//doormode
if(drivedata == "AA"){
this.m7state = 'aoac';
this.m7image = this.images.m7[this.m7state];
}
if(drivedata == "AM"){
this.m7state = 'aomc';
this.m7image = this.images.m7[this.m7state];
}
if(drivedata == "MM"){
this.m7state = 'momc';
this.m7image = this.images.m7[this.m7state];
}
if(drivedata == "elflute"){
}
if(drivedata == "relieve"){
}
// // console.log(drivedata);
// if(drivedata == "breaker"){
//
// }
// if(drivedata == "carwash"){
//
// }
// if(drivedata == "aircom"){
//
// }
// if(drivedata == "atb"){
//
// }
// if(drivedata == "bm"){
//
// }
// if(drivedata == "rm"){
// if(this.m1state == "start"){
// this.m1state = 'rm';
// this.m1image = this.images.m1[this.m1state];
// }else if(this.m1state == "rm"){
// this.m1state = 'am';
// this.m1image = this.images.m1[this.m1state];
// }else if(this.m1state == "am"){
// this.m1state = 'cm';
// this.m1image = this.images.m1[this.m1state];
// }else if(this.m1state == "cm"){
// this.m1state = 'start';
// this.m1image = this.images.m1[this.m1state];
// }
//
// }
// if(drivedata == "cbtc"){
// if(this.m2state == "start"){
// this.m2state = 'il';
// this.m2image = this.images.m2[this.m2state];
// }else if(this.m2state == "il"){
// this.m2state = 'itc';
// this.m2image = this.images.m2[this.m2state];
// }else if(this.m2state == "itc"){
// this.m2state = 'cbtc';
// this.m2image = this.images.m2[this.m2state];
// }else if(this.m2state == "cbtc"){
// this.m2state = 'start';
// this.m2image = this.images.m2[this.m2state];
// }
// }
// //doormode
// if(drivedata == "AA"){
// this.m7state = 'aoac';
// this.m7image = this.images.m7[this.m7state];
// }
// if(drivedata == "AM"){
// this.m7state = 'aomc';
// this.m7image = this.images.m7[this.m7state];
// }
// if(drivedata == "MM"){
// this.m7state = 'momc';
// this.m7image = this.images.m7[this.m7state];
// }
//
// if(drivedata == "elflute"){
//
// }
// if(drivedata == "relieve"){
//
// }
},
updatarunlevel(drivedata){
if(drivedata == "CBTC"){
this.m2state = 'cbtc';
this.m2image = this.images.m2[this.m2state];
// if(this.m2state == "start"){
// this.m2state = 'il';
// this.m2image = this.images.m2[this.m2state];
// }else if(this.m2state == "il"){
// this.m2state = 'itc';
// this.m2image = this.images.m2[this.m2state];
// }else if(this.m2state == "itc"){
// }else if(this.m2state == "cbtc"){
// this.m2state = 'start';
// this.m2image = this.images.m2[this.m2state];
// }
}else if(drivedata == "IL"){
this.m2state = 'il';
this.m2image = this.images.m2[this.m2state];
}else{
this.m2state = 'start';
this.m2image = this.images.m2[this.m2state];
if(drivedata != this.m2state){
if(drivedata == "CBTC"){
this.m2state = drivedata;
this.m2image = this.images.m2['cbtc'];
}else if(drivedata == "IL"){
this.m2state = drivedata;
this.m2image = this.images.m2['il'];
}else{
this.m2state = drivedata;
this.m2image = this.images.m2['start'];
}
}
},
updatedrivemode(drivedata){
if(drivedata == "CM"){
this.m1state = 'cm';
this.m1image = this.images.m1[this.m1state];
}else if(drivedata == "RM"){
this.m1state = 'rm';
this.m1image = this.images.m1[this.m1state];
}else if(drivedata == "AM"){
this.m1state = 'am';
this.m1image = this.images.m1[this.m1state];
}else{
this.m1state = 'start';
this.m1image = this.images.m1[this.m1state];
if(drivedata != this.m1state){
if(drivedata == "CM"){
this.m1state = drivedata;
this.m1image = this.images.m1['cm'];
}else if(drivedata == "RM"){
this.m1state = drivedata;
this.m1image = this.images.m1['rm'];
}else if(drivedata == "AM"){
this.m1state = drivedata;
this.m1image = this.images.m1['am'];
}else{
this.m1state = null;
this.m1image = this.images.m1['start'];
}
}
// if(this.m1state == "start"){
// this.m1state = 'rm';
// this.m1image = this.images.m1[this.m1state];
// }else if(this.m1state == "rm"){
// this.m1state = 'am';
// this.m1image = this.images.m1[this.m1state];
// }else if(this.m1state == "am"){
// this.m1state = 'cm';
// this.m1image = this.images.m1[this.m1state];
// }else if(this.m1state == "cm"){
// this.m1state = 'start';
// this.m1image = this.images.m1[this.m1state];
// }
},
updateatoatp(atoon,atpon){
if(!atoon){
this.m9state = "ato";
this.m9image = this.images.m9["ato"];
//
if(this.m9state1 != atoon){
this.m9state1 = atoon;
if(atoon){
}else{
this.m9image = this.images.m9["ato"];
}
}
if(!atpon){
this.m9state = "atp";
this.m9image = this.images.m9["atp"];
if(this.m9state2 != atpon){
this.m9state2 = atpon;
if(atpon){
}else{
this.m9image = this.images.m9["atp"];
}
}
},
updatelen(len) {
@ -409,8 +401,11 @@ export default {
}
},
updatestation(end,next){
this.endstation = end;
this.nextstation = next;
if(next != this.nextstation || end != this.endstation){
this.endstation = end;
this.nextstation = next;
}
},
},
mounted() {

View File

@ -197,16 +197,16 @@
});
}
},
updatemenulist(devicelist) {
if(devicelist){
this.devicelist = devicelist;
this.isswitch = true;
}else{
this.devicelist = [];
this.isswitch = false;
}
},
// updatemenulist(devicelist) {
// if(devicelist){
// this.devicelist = devicelist;
// this.isswitch = true;
// }else{
// this.devicelist = [];
// this.isswitch = false;
// }
//
// },
showmodel(devicedata){
this.jl3d.updatewindowstatus('1');
this.jl3d.selectmodel(devicedata);
@ -242,6 +242,7 @@
}
},
updatemenulist(equiplist) {
console.log(equiplist);
if(equiplist){
this.equiplist = equiplist;
this.isswitch = true;

View File

@ -197,6 +197,7 @@ export default {
},
selectdevice(divicedata){
this.deviceShow = true;
// console.log(divicedata);
this.$refs.faultdevice.showmodel(divicedata);
},
warningmsg(nowmsg){

View File

@ -5,7 +5,7 @@
</div>
<div class = "station">
<div style="margin-top:5%;font-size: 30px;">当前车站:</div>
<el-select class="listmenu" v-model="value" placeholder="当前车站" >
<el-select class="listmenu" v-model="value" placeholder="当前车站" @change="currentsel" >
<el-option
v-for="item in stationlist"
:key="item.name"
@ -17,11 +17,14 @@
</el-select>
</div>
<!-- <div class="menutop">
<div class="menutop">
<el-button-group>
<el-button type="primary" @click="switchrender">{{rendermode}}</el-button>
<el-button type="primary" @click="switch4view">四画面</el-button>
<el-button type="primary" @click="switch2view">双画面</el-button>
<el-button type="primary" @click="switchauto">自由视角</el-button>
<!-- <el-button type="primary" @click="switchrender">{{rendermode}}</el-button> -->
</el-button-group>
</div> -->
</div>
<div class="menudown">
<el-button-group>
<el-button type="primary" @click="back">退出</el-button>
@ -77,18 +80,32 @@ export default {
if (this.renderswitch == true) {
this.rendermode = '退出监控';
this.renderswitch = false;
this.jl3d.switchrender(this.renderswitch);
this.jl3d.switchviews("auto");
} else {
this.rendermode = '监控视角';
this.renderswitch = true;
this.jl3d.switchrender(this.renderswitch);
this.jl3d.switchviews(4);
}
},
switch4view(){
this.jl3d.switchviews(4);
},
switch2view(){
this.jl3d.switchviews(2);
},
switchauto(){
this.jl3d.switchviews("auto");
},
updatestationlist(list){
// console.log(list);
this.value = list[0].name
this.stationlist = list;
},
currentsel(selVal){
this.jl3d.changestation(selVal);
// let oldgroupnum = this.groupnum;
// this.value = selVal;
},
back() {
window.close();
},

View File

@ -7,15 +7,16 @@
<div v-if="chatContent.all&& !chatContent.self" class="userName">{{ covertName(chatContent.member) }}</div>
<div :class="chatContent.self?'userChatTime textRight':'userChatTime'">{{ formatTime(chatContent.chatTime) }}</div>
</div>
<div class="userBubble" @click="playAudio('audio'+index)">
<!-- @click="playAudio('audio'+index) -->
<div class="userBubble" @click="playAudio(baseUrl+chatContent.src)">
<div class="userMessage">
<!-- &&!(chatContent.self) -->
<span v-if="chatContent.all">@{{ covertName(chatContent.targetUser) }}</span>
<span class="el-icon-video-play playicon" />
<span class="messageText">{{ chatContent.message }}</span>
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />
</div>
</div>
<audio id="audioPlay" style="display:none" />
</div>
</div>
</div>
@ -136,8 +137,9 @@ export default {
const memberName = data.name ? '-' + data.name : '';
return '@' + data.role + deviceName + memberName;
},
playAudio(id) {
document.querySelector('#' + id).play();
playAudio(audioUrl) {
document.querySelector('#audioPlay').src = audioUrl;
document.querySelector('#audioPlay').play();
}
// reloadData(currentCoversition) {
// this.chatContentList = [];

View File

@ -2,7 +2,7 @@
<!-- v-quickMenuDrag -->
<div class="chatBox" :style="{'bottom':bottom+'px'}">
<div v-show="!minimize" class="chat-box">
<chat-member-list v-if="project!='refereeJsxt'" ref="chatMemberList" :group="group" :current-coversition="currentCoversition" />
<chat-member-list v-if="project!='refereeJsxt'|| IsAnswering" ref="chatMemberList" :group="group" :current-coversition="currentCoversition" />
<div class="chat-box-main">
<chat-coversition-list ref="chatCoversitionList" :user-role="userRole" @hideAddCoversition="hideAddCoversition" @setCurrentCoversition="setCurrentCoversition" @setHeadTitle="setHeadTitle" />
<div class="chat-window">
@ -19,7 +19,7 @@
</div>
</div>
<div class="chat-box-content">
<chat-content ref="chatContent" :project="project" :current-coversition="currentCoversition" @changeCoversition="changeCoversition" />
<chat-content ref="chatContent" :project="project" :is-answering="IsAnswering" :current-coversition="currentCoversition" @changeCoversition="changeCoversition" />
<div v-if="recordSending" class="chat_record_tip">
<div id="record_progress_bar" :style="'width:'+100/60*seconds+'%'" />
<div class="record_icon" />
@ -79,7 +79,7 @@ export default {
},
data() {
return {
minimize:false,
minimize:true,
bottom:15,
recordSending:false,
currentCoversition:{},
@ -105,6 +105,9 @@ export default {
},
project() {
return getSessionStorage('project');
},
IsAnswering() {
return !(this.$route.path.includes('refereeJsxtDisplay'));
}
},
watch:{

View File

@ -36,6 +36,10 @@ export default {
project:{
type:String,
required:true
},
isAnswering:{
type:Boolean,
required:true
}
},
data() {
@ -59,6 +63,7 @@ export default {
this.chatContentList.push(simulationText);
if (simulationText.member.userId != this.$store.state.user.id) {
this.currentAudioList.push(this.baseUrl + simulationText.src);
console.log(this.isPlay);
if (!this.isPlay) {
this.isPlay = true;
this.playAllAudio();
@ -66,13 +71,13 @@ export default {
}
this.scrollTop();
} else {
// debugger;
if (!simulationText.all) {
this.$emit('changeCoversition', simulationText);
// this.$emit('addCoversition', {data:simulationText, headerTitle:''});
this.chatContentList.push(simulationText);
if (simulationText.member.userId != this.$store.state.user.id) {
this.currentAudioList.push(this.baseUrl + simulationText.src);
console.log(this.isPlay);
if (!this.isPlay) {
this.isPlay = true;
this.playAllAudio();
@ -91,7 +96,7 @@ export default {
this.inintData();
},
currentCoversition:function (val, old) {
if (val && this.project != 'refereeJsxt') {
if (val && (this.project != 'refereeJsxt' || this.isAnswering)) {
this.chatContentList = [];
this.coversition = this.currentCoversition;
this.inintData();
@ -144,8 +149,8 @@ export default {
const that = this;
document.querySelector('#audioPlay').onended = function() {
that.currentAudioList.shift();
console.log(that.currentAudioList.length);
if (that.currentAudioList.length > 0) {
that.currentAudioIndex++;
that.playEachAudio(that.currentAudioList[that.currentAudioIndex]);
} else {
that.isPlay = false;

View File

@ -7,6 +7,7 @@
<transition name="el-zoom-in-bottom">
<map-system-draft ref="mapCanvas" @back="back" />
</transition>
<menu-demon-joint
ref="demonMenu"
:group="group"
@ -18,6 +19,7 @@
@hidepanel="hidepanel"
@showIbp="showIbp"
@startCounting="startCounting"
@hidejl3dcctv="hidejl3dcctv"
/>
<menu-demon-schema
ref="menuSchema"
@ -518,12 +520,25 @@ export default {
this.$refs.ibpPlate.show(deviceCode, this.ibpPart);
}
},
hidejl3dcctv(){
const routeData = this.$router.resolve({
path:'/jlmap3d/passengerflow',
query:{
mapid:this.mapId,
group:this.group,
project: this.project
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
hidepanel() {
this.panelShow = false;
this.drivingShow = true;
this.ibpShow = false;
this.$refs.Jl3dDrive.show(this.mapId, this.group);
},
hideIbp() {
Message.closeAll();
this.drivingShow = false;

View File

@ -5,6 +5,7 @@
<el-button-group>
<el-button v-if="isProject && !dataError " type="primary" @click="setRelDevice">{{ $t('joinTraining.connectRealDevices') }}</el-button>
<el-button v-if="isDriver && !dataError" type="jumpjlmap3d" @click="jumpjlmap3d">{{ $t('joinTraining.driverPerspective') }}</el-button>
<el-button v-if="isStationSupervisor && !dataError" type="jmap3dcctv" @click="jlmap3dcctv">cctv</el-button>
<template v-if="isAdmin && project != 'refereeJsxt'">
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('joinTraining.drivingByPlan') }}</el-button>
<el-button type="danger" :disabled="!isDisable" @click="end">{{ $t('joinTraining.exitPlan') }}</el-button>
@ -94,6 +95,10 @@ export default {
isSpeaking() {
return this.userRole != 'DRIVER' && this.userRole != '';
},
isStationSupervisor(){
console.log(this.userRole);
return this.userRole == 'STATION_SUPERVISOR';
},
isDriver() {
return this.userRole == 'DRIVER';
},
@ -144,6 +149,7 @@ export default {
this.backLoading = false;
await this.initLoadPage();
this.isDisable = this.$store.state.map.runPlanStatus;
console.log(this.userRole);
},
beforeDestroy() {
this.$store.dispatch('training/setGroup', '');
@ -305,6 +311,9 @@ export default {
jumpjlmap3d() {
this.$emit('hidepanel');
},
jlmap3dcctv(){
this.$emit('hidejl3dcctv');
},
setRelDevice() {
this.$refs.realDevice.doShow();
},

View File

@ -70,9 +70,9 @@ export default {
height: 800,
roadData: [],
focus: false,
booleanList: ['lockFirst', 'switchSingleHandle'],
booleanList: ['lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute'],
selectList: ['upDirection'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute'],
numberList: [],
optionsMap: {
upDirection: [{label: 'right', value: 'right'}, {label: 'left', value: 'left'}]
@ -80,7 +80,10 @@ export default {
remarkMap: {
lockFirst: '是否先锁闭——办理过程直接先锁闭区段',
upDirection: '上行方向',
switchSingleHandle: '道岔区段状态改变按单个道岔处理'
switchSingleHandle: '道岔区段状态改变按单个道岔处理',
switchNRTurnChain:'道岔正/反操是否联动',
switchSingleLockChain:'道岔单解/锁是否联动',
signalForceCancelRoute:'是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路'
}
};
},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@ function timedCount(){
if(e.data == "on"){
update = setInterval("passerupdate()", 50);
update = setInterval("passerupdate()", 100);
}
if(e.data == "off"){

View File

@ -7,7 +7,7 @@ function timedCount(){
if(e.data == "on"){
console.log("on");
update = setInterval("stationupdate()", 3000);
update = setInterval("stationupdate()", 2000);
}
if(e.data == "off"){