Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
34016219dd
@ -242,5 +242,22 @@ deviceRender[deviceType.StateTable] = {
|
|||||||
zlevel: 1,
|
zlevel: 1,
|
||||||
z: 5
|
z: 5
|
||||||
};
|
};
|
||||||
|
/** 照明组 */
|
||||||
|
deviceRender[deviceType.LightingGroup] = {
|
||||||
|
_type: deviceType.LightingGroup,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 5
|
||||||
|
};
|
||||||
|
/** 平衡电动阀 */
|
||||||
|
deviceRender[deviceType.BalancedElectric] = {
|
||||||
|
_type: deviceType.BalancedElectric,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 5
|
||||||
|
};
|
||||||
|
/** 电动蝶阀 */
|
||||||
|
deviceRender[deviceType.ElectricButterflyValve] = {
|
||||||
|
_type: deviceType.ElectricButterflyValve,
|
||||||
|
zlevel: 1,
|
||||||
|
z: 5
|
||||||
|
};
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -36,7 +36,10 @@ const deviceType = {
|
|||||||
SingleStaircase: 'SingleStaircase',
|
SingleStaircase: 'SingleStaircase',
|
||||||
ArcStatus: 'ArcStatus',
|
ArcStatus: 'ArcStatus',
|
||||||
IscsButton: 'IscsButton',
|
IscsButton: 'IscsButton',
|
||||||
StateTable: 'StateTable'
|
StateTable: 'StateTable',
|
||||||
|
LightingGroup: 'LightingGroup',
|
||||||
|
BalancedElectric: 'BalancedElectric',
|
||||||
|
ElectricButterflyValve: 'ElectricButterflyValve'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -22,6 +22,9 @@ export default class airConditioner extends Group {
|
|||||||
this.grouper.origin = [this.model.width / 2, this.model.width * 0.571 / 2];
|
this.grouper.origin = [this.model.width / 2, this.model.width * 0.571 / 2];
|
||||||
this.grouper.scale = [-1, -1];
|
this.grouper.scale = [-1, -1];
|
||||||
}
|
}
|
||||||
|
if (this.model.rotate) {
|
||||||
|
this.grouper.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||||
|
}
|
||||||
this.add(this.grouper);
|
this.add(this.grouper);
|
||||||
}
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
|
30
src/iscs/shape/bas/balancedElectric.js
Normal file
30
src/iscs/shape/bas/balancedElectric.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import createPathSvg from '../components/pathsvg';
|
||||||
|
|
||||||
|
export default class airConditioner extends Group {
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.model = device.model;
|
||||||
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
|
this._type = device.model._type;
|
||||||
|
this.code = device.model.code;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
create() {
|
||||||
|
this.grouper = new Group({
|
||||||
|
id: this.model.code,
|
||||||
|
position: [this.model.point.x, this.model.point.y]
|
||||||
|
});
|
||||||
|
this.path = createPathSvg(this.model);
|
||||||
|
this.grouper.add(this.path);
|
||||||
|
if (this.model.rotate) {
|
||||||
|
this.grouper.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||||
|
}
|
||||||
|
this.add(this.grouper);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
30
src/iscs/shape/bas/electricButterflyValve.js
Normal file
30
src/iscs/shape/bas/electricButterflyValve.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import createPathSvg from '../components/pathsvg';
|
||||||
|
|
||||||
|
export default class airConditioner extends Group {
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.model = device.model;
|
||||||
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
|
this._type = device.model._type;
|
||||||
|
this.code = device.model.code;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
create() {
|
||||||
|
this.grouper = new Group({
|
||||||
|
id: this.model.code,
|
||||||
|
position: [this.model.point.x, this.model.point.y]
|
||||||
|
});
|
||||||
|
this.path = createPathSvg(this.model);
|
||||||
|
this.grouper.add(this.path);
|
||||||
|
if (this.model.rotate) {
|
||||||
|
this.grouper.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||||
|
}
|
||||||
|
this.add(this.grouper);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
@ -48,6 +48,9 @@ export default class frozenPump extends Group {
|
|||||||
});
|
});
|
||||||
this.grouper.add(this.circleOutside);
|
this.grouper.add(this.circleOutside);
|
||||||
this.grouper.add(this.triangle);
|
this.grouper.add(this.triangle);
|
||||||
|
if (this.model.rotate) {
|
||||||
|
this.grouper.rotation = -Math.PI / 180 * Number(this.model.rotate);
|
||||||
|
}
|
||||||
this.add(this.grouper);
|
this.add(this.grouper);
|
||||||
}
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
|
@ -59,7 +59,15 @@ const map = {
|
|||||||
SingleStaircase: {
|
SingleStaircase: {
|
||||||
width: 58,
|
width: 58,
|
||||||
path: 'M0,32V24H5V8H0V0H58V8H51V24h7v8H0Zm8-8h3V8H8V24ZM55,5V3H3V5H55ZM14,8V24h2V8H14Zm5,0V24h3V8H19Zm6,0V24h2V8H25Zm5,0V24h2V8H30Zm5,0V24h2V8H35Zm5,0V24h3V8H40Zm6,0V24h2V8H46Zm9,19H3v2H55V27Z'
|
path: 'M0,32V24H5V8H0V0H58V8H51V24h7v8H0Zm8-8h3V8H8V24ZM55,5V3H3V5H55ZM14,8V24h2V8H14Zm5,0V24h3V8H19Zm6,0V24h2V8H25Zm5,0V24h2V8H30Zm5,0V24h2V8H35Zm5,0V24h3V8H40Zm6,0V24h2V8H46Zm9,19H3v2H55V27Z'
|
||||||
}
|
},
|
||||||
|
BalancedElectric: {
|
||||||
|
width: 73,
|
||||||
|
path: 'M77,24V61L63,55V71H55V52L40.476,45.165,30,50V71H22V53L4,61V24L37,40.923V34.835C28.523,33.828,22,27.8,22,20.5,22,12.492,29.835,6,39.5,6S57,12.492,57,20.5c0,7.3-6.523,13.328-15,14.335v7.113ZM50.8,22H47l-4,3-4-3H30l3-5h5l4,2,3-1h5.534C48.973,14.409,43.6,10.881,38,11c-6.646.141-11,5.858-11,10s4.516,9.141,13,9C47.178,29.88,50.075,25.771,50.8,22Z'
|
||||||
|
},
|
||||||
|
ElectricButterflyValve: {
|
||||||
|
width: 39,
|
||||||
|
path: 'M38,24V44H1V24H18.237L18,21s-6.5.6-9-8C7.705,8.542,10.288,2,20,2S31.849,8.083,31,13c-1.586,9.183-9,8-9,8v3H38Zm-3,4.077L24,34a4.361,4.361,0,0,1-3,5c-3.052,1.215-7,0-7,0L9,41H35V28.077ZM25.872,17.466A6.259,6.259,0,0,0,29,12a18.6,18.6,0,0,0-1-4L25,5H16L12.511,7.279C10.464,8.908,11.044,14.092,11,10.9a10.963,10.963,0,0,0,2.23,5.284L14,7h2l3.181,6.95L23,7h2Zm-1.924.915L23.261,10.13,19.91,17H18l-2.341-5.907L15.1,17.8A8.481,8.481,0,0,0,20,19C17.855,19.073,20.85,19.478,23.948,18.38ZM4,27V39.556L12,36a6.888,6.888,0,0,1,3-7c4.261-2.736,8,1,8,1l6-3H4Z'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function createPathSvg(model) {
|
export default function createPathSvg(model) {
|
||||||
|
@ -25,6 +25,7 @@ import SemiAutomaticTicketMachine from './semiAutomaticTicketMachine';
|
|||||||
import TicketMachine from './ticketMachine';
|
import TicketMachine from './ticketMachine';
|
||||||
import AirConditioner from './bas/airConditioner';
|
import AirConditioner from './bas/airConditioner';
|
||||||
import VolumeControlDamper from './bas/volumeControlDamper';
|
import VolumeControlDamper from './bas/volumeControlDamper';
|
||||||
|
import BalancedElectric from './bas/balancedElectric';
|
||||||
import IscsText from './text';
|
import IscsText from './text';
|
||||||
import IscsLine from './line';
|
import IscsLine from './line';
|
||||||
import IscsRect from './rect';
|
import IscsRect from './rect';
|
||||||
@ -37,6 +38,8 @@ import ArcStatus from './ArcStatus';
|
|||||||
import IscsButton from './button';
|
import IscsButton from './button';
|
||||||
import SmookExhaustFd from './bas/smookExhaustFd';
|
import SmookExhaustFd from './bas/smookExhaustFd';
|
||||||
import StateTable from './stateTable';
|
import StateTable from './stateTable';
|
||||||
|
import LightingGroup from './lighting';
|
||||||
|
import ElectricButterflyValve from './bas/electricButterflyValve';
|
||||||
|
|
||||||
const iscsShape = {};
|
const iscsShape = {};
|
||||||
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
|
iscsShape[deviceType.ManualAlarmButton] = ManualAlarmButton;
|
||||||
@ -78,6 +81,9 @@ iscsShape[deviceType.SingleStaircase] = SingleStaircase;
|
|||||||
iscsShape[deviceType.ArcStatus] = ArcStatus;
|
iscsShape[deviceType.ArcStatus] = ArcStatus;
|
||||||
iscsShape[deviceType.IscsButton] = IscsButton;
|
iscsShape[deviceType.IscsButton] = IscsButton;
|
||||||
iscsShape[deviceType.StateTable] = StateTable;
|
iscsShape[deviceType.StateTable] = StateTable;
|
||||||
|
iscsShape[deviceType.LightingGroup] = LightingGroup;
|
||||||
|
iscsShape[deviceType.BalancedElectric] = BalancedElectric;
|
||||||
|
iscsShape[deviceType.ElectricButterflyValve] = ElectricButterflyValve;
|
||||||
|
|
||||||
function shapefactory(device, iscs) {
|
function shapefactory(device, iscs) {
|
||||||
const type = device.model._type;
|
const type = device.model._type;
|
||||||
|
186
src/iscs/shape/lighting.js
Normal file
186
src/iscs/shape/lighting.js
Normal file
@ -0,0 +1,186 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||||
|
import Line from 'zrender/src/graphic/shape/Line';
|
||||||
|
import Text from 'zrender/src/graphic/Text';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
|
export default class lighting 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: model.code,
|
||||||
|
position: [model.point.x, model.point.y]
|
||||||
|
});
|
||||||
|
this.outsideRect = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
width: model.width,
|
||||||
|
height: model.height
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 2,
|
||||||
|
fill: 'rgba(0,0,0,0)',
|
||||||
|
stroke: '#4CCDE4'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.outsideRect);
|
||||||
|
this.verticalLine = new Line({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
x1: model.width * 2 / 5,
|
||||||
|
y1: 0,
|
||||||
|
x2: model.width * 2 / 5,
|
||||||
|
y2: model.height
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 2,
|
||||||
|
stroke: '#4CCDE4'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.verticalLine);
|
||||||
|
this.horizontalLine = new Line({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
x1: model.width * 2 / 5,
|
||||||
|
y1: model.height / 2,
|
||||||
|
x2: model.width,
|
||||||
|
y2: model.height / 2
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 2,
|
||||||
|
stroke: '#4CCDE4'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.horizontalLine);
|
||||||
|
this.insideCircle = new Circle({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 1,
|
||||||
|
shape: {
|
||||||
|
cx: model.width / 5,
|
||||||
|
cy: model.height / 2,
|
||||||
|
r: model.width / 10
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 1,
|
||||||
|
fill: 'rgba(0,0,0,0)',
|
||||||
|
stroke: '#0F0'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.insideCircle);
|
||||||
|
this.topCircle = new Circle({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 2,
|
||||||
|
shape: {
|
||||||
|
cx: model.width / 5,
|
||||||
|
cy: model.height / 2,
|
||||||
|
r: model.width / 10
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fill: '#45607B'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.topCircle);
|
||||||
|
this.underlyingRect = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 1,
|
||||||
|
shape: {
|
||||||
|
x: model.width * 7 / 40,
|
||||||
|
y: model.height / 2 - model.width / 5,
|
||||||
|
width: model.width / 20,
|
||||||
|
height: model.width / 5
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 1,
|
||||||
|
fill: 'rgba(0,0,0,0)',
|
||||||
|
stroke: '#0F0'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.underlyingRect);
|
||||||
|
this.topRect = new Rect({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z + 2,
|
||||||
|
shape: {
|
||||||
|
x: model.width * 7 / 40,
|
||||||
|
y: model.height / 2 - model.width / 5,
|
||||||
|
width: model.width / 20,
|
||||||
|
height: model.width / 5
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fill: '#45607B'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.topRect);
|
||||||
|
this.lines = [];
|
||||||
|
for (let i = 0; i < 7; i++) {
|
||||||
|
const lightingLine = new Line({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
shape: {
|
||||||
|
x1: model.width / 5 + Math.cos(Math.PI / 6 * i) * (model.width / 10 + 2),
|
||||||
|
y1: model.height / 2 + Math.sin(Math.PI / 6 * i) * (model.width / 10 + 2),
|
||||||
|
x2: model.width / 5 + Math.cos( Math.PI / 6 * i) * (model.width / 5 - 2),
|
||||||
|
y2: model.height / 2 + Math.sin(Math.PI / 6 * i) * (model.width / 5 - 2)
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: 1,
|
||||||
|
stroke: '#0F0'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(lightingLine);
|
||||||
|
this.lines.push(lightingLine);
|
||||||
|
}
|
||||||
|
this.topText = new Text({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
style: {
|
||||||
|
x: model.width * 7 / 10,
|
||||||
|
y: model.height / 4,
|
||||||
|
fontSize: model.topFontSize,
|
||||||
|
fontFamily: 'consolas',
|
||||||
|
text: model.topContext,
|
||||||
|
textFill: model.topTextFill,
|
||||||
|
textAlign: 'center',
|
||||||
|
textPosition: 'inside',
|
||||||
|
textVerticalAlign: 'middle',
|
||||||
|
textLineHeight: model.topFontSize
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.topText);
|
||||||
|
this.bottomText = new Text({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
style: {
|
||||||
|
x: model.width * 7 / 10,
|
||||||
|
y: model.height * 3 / 4,
|
||||||
|
fontSize: model.bottomFontSize,
|
||||||
|
fontFamily: 'consolas',
|
||||||
|
text: model.bottomContext,
|
||||||
|
textFill: model.bottomTextFill,
|
||||||
|
textAlign: 'center',
|
||||||
|
textPosition: 'inside',
|
||||||
|
textVerticalAlign: 'middle',
|
||||||
|
textLineHeight: model.bottomFontSize
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.bottomText);
|
||||||
|
this.add(this.grouper);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
}
|
@ -34,7 +34,7 @@ export default class line extends Group {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (model.classify == 'dashed') {
|
if (model.classify == 'dashed') {
|
||||||
this.iscsLine.setStyle('lineDash', [2, 2]);
|
this.iscsLine.setStyle('lineDash', [8, 6]);
|
||||||
}
|
}
|
||||||
this.grouper.add(this.iscsLine);
|
this.grouper.add(this.iscsLine);
|
||||||
this.add(this.grouper);
|
this.add(this.grouper);
|
||||||
|
@ -157,6 +157,15 @@ export function parser(data) {
|
|||||||
zrUtil.each(data.stateTableList || [], elem=> {
|
zrUtil.each(data.stateTableList || [], elem=> {
|
||||||
iscsDevice[elem.code] = deviceFactory(deviceType.StateTable, elem);
|
iscsDevice[elem.code] = deviceFactory(deviceType.StateTable, elem);
|
||||||
});
|
});
|
||||||
|
zrUtil.each( data.lightingGroupList || [], elem=> {
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.LightingGroup, elem);
|
||||||
|
});
|
||||||
|
zrUtil.each(data.balancedElectricList || [], elem => {
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.BalancedElectric, elem);
|
||||||
|
});
|
||||||
|
zrUtil.each(data.electricButterflyValveList || [], elem => {
|
||||||
|
iscsDevice[elem.code] = deviceFactory(deviceType.ElectricButterflyValve, elem);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return iscsDevice;
|
return iscsDevice;
|
||||||
@ -293,6 +302,15 @@ export function updateIscsData(state, device) {
|
|||||||
case deviceType.StateTable:
|
case deviceType.StateTable:
|
||||||
updateIscsListByDevice(state, 'stateTableList', device);
|
updateIscsListByDevice(state, 'stateTableList', device);
|
||||||
break;
|
break;
|
||||||
|
case deviceType.LightingGroup:
|
||||||
|
updateIscsListByDevice(state, 'lightingGroupList', device);
|
||||||
|
break;
|
||||||
|
case deviceType.BalancedElectric:
|
||||||
|
updateIscsListByDevice(state, 'balancedElectricList', device);
|
||||||
|
break;
|
||||||
|
case deviceType.ElectricButterflyValve:
|
||||||
|
updateIscsListByDevice(state, 'electricButterflyValveList', device);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// store.dispatch('iscs/setIscsData', state.iscs);
|
// store.dispatch('iscs/setIscsData', state.iscs);
|
||||||
}
|
}
|
||||||
|
@ -203,14 +203,14 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
|
|||||||
scope.modelmanager.switchmodel.code = data.code;
|
scope.modelmanager.switchmodel.code = data.code;
|
||||||
scope.showmodel = scope.modelmanager.switchmodel.mesh;
|
scope.showmodel = scope.modelmanager.switchmodel.mesh;
|
||||||
scope.scene.add(scope.showmodel);
|
scope.scene.add(scope.showmodel);
|
||||||
// scope.devicetext.initdevicetext(scope.modelmanager.switchmodel.mesh);
|
scope.devicetext.initdevicetext(scope.modelmanager.switchmodel.mesh);
|
||||||
scope.nowobject = scope.modelmanager.switchmodel.mesh;
|
scope.nowobject = scope.modelmanager.switchmodel.mesh;
|
||||||
// updatemenulist(scope.devicetext.devicelist);
|
updatemenulist(scope.devicetext.devicelist);
|
||||||
scope.raycasterstatus = true;
|
scope.raycasterstatus = true;
|
||||||
}else{
|
}else{
|
||||||
scope.raycasterstatus = false;
|
scope.raycasterstatus = false;
|
||||||
scope.nowobject = "";
|
scope.nowobject = "";
|
||||||
// updatemenulist();
|
updatemenulist();
|
||||||
}
|
}
|
||||||
if (data.type == "SIGNAL") {
|
if (data.type == "SIGNAL") {
|
||||||
scope.modelmanager.signalmodel.code = data.code;
|
scope.modelmanager.signalmodel.code = data.code;
|
||||||
|
85
src/jlmap3d/jl3dpassflow/connect/passflowconnect.js
Normal file
85
src/jlmap3d/jl3dpassflow/connect/passflowconnect.js
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
import StompClient from '@/utils/sock';
|
||||||
|
import { getBaseUrl } from '@/utils/baseUrl'
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
|
|
||||||
|
// 定于仿真socket接口
|
||||||
|
export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,routegroup) {
|
||||||
|
const scope = this;
|
||||||
|
|
||||||
|
this.controlstation = nowstation;
|
||||||
|
this.teststomp = new StompClient();
|
||||||
|
|
||||||
|
let trainleftnow = null;
|
||||||
|
let trainrightnow = null;
|
||||||
|
let topic = '/user/queue/simulation/jl3d/'+routegroup;
|
||||||
|
let header = {'X-Token': getToken() };
|
||||||
|
|
||||||
|
socketon(topic);
|
||||||
|
|
||||||
|
function socketon(topic) {
|
||||||
|
try {
|
||||||
|
scope.teststomp.subscribe(topic, callback, header);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('websocket订阅失败');
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
this.socketoff = function(topic) {
|
||||||
|
scope.teststomp.unsubscribe(topic);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 仿真socket接口回调函数
|
||||||
|
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.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{
|
||||||
|
deviceaction.down.action.reset();
|
||||||
|
deviceaction.down.action.time = 0;
|
||||||
|
deviceaction.down.action.timeScale = 1;
|
||||||
|
deviceaction.down.action.play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(data.body.code == nowstation.downpsd){
|
||||||
|
if(data.body.open == 0){
|
||||||
|
deviceaction.top.action.reset();
|
||||||
|
deviceaction.top.action.time =deviceaction.top.action._clip.duration;
|
||||||
|
deviceaction.top.action.timeScale = -1;
|
||||||
|
deviceaction.top.action.play();
|
||||||
|
}else{
|
||||||
|
deviceaction.top.action.reset();
|
||||||
|
deviceaction.top.action.time = 0;
|
||||||
|
deviceaction.top.action.timeScale = 1;
|
||||||
|
deviceaction.top.action.play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(data.body.type == "TRAIN_DOOR"){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(data.type == "TrainRun_3D"){
|
||||||
|
console.log(data.body);
|
||||||
|
console.log(nowstation);
|
||||||
|
for(let i=0,leni = data.body.length;i<leni;i++){
|
||||||
|
if(data.body[i].section == scope.controlstation.topsection){
|
||||||
|
|
||||||
|
}
|
||||||
|
if(data.body[i].section == scope.controlstation.downsection){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -26,6 +26,8 @@ let originhuman1 = null;
|
|||||||
let originhuman2 = null;
|
let originhuman2 = null;
|
||||||
let originanima1 = null;
|
let originanima1 = null;
|
||||||
let originanima2 = null;
|
let originanima2 = null;
|
||||||
|
let lefttrain = null;
|
||||||
|
let righttrain = null;
|
||||||
let moveanimatelist = [];
|
let moveanimatelist = [];
|
||||||
|
|
||||||
let zhajiin = [];
|
let zhajiin = [];
|
||||||
@ -805,7 +807,7 @@ export function Jl3dpassflow(dom) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function zhajicontrol(type,door){
|
function zhajicontrol(type,door){
|
||||||
|
|
||||||
let devicenum = door-1;
|
let devicenum = door-1;
|
||||||
if(type == "in"){
|
if(type == "in"){
|
||||||
deviceaction[zhajiin[devicenum].id].action.reset();
|
deviceaction[zhajiin[devicenum].id].action.reset();
|
||||||
|
@ -14,6 +14,7 @@ import { ZoneManager } from '@/jlmap3d/jl3dpassflow/model/zonemanager.js';
|
|||||||
|
|
||||||
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
import { getPublishMapVersion, getPublishMapDetail,getPublish3dMapDetail} from '@/api/jlmap3d/load3ddata';
|
||||||
|
|
||||||
|
import { PassflowConnect } from '@/jlmap3d/jl3dpassflow/connect/passflowconnect.js';
|
||||||
import StompClient from '@/utils/sock';
|
import StompClient from '@/utils/sock';
|
||||||
import { Loading } from 'element-ui';
|
import { Loading } from 'element-ui';
|
||||||
|
|
||||||
@ -40,7 +41,8 @@ let originhuman1 = null;
|
|||||||
let originhuman2 = null;
|
let originhuman2 = null;
|
||||||
let originanima1 = null;
|
let originanima1 = null;
|
||||||
let originanima2 = null;
|
let originanima2 = null;
|
||||||
|
let lefttrain = null;
|
||||||
|
let righttrain = null;
|
||||||
let zhajiin = [];
|
let zhajiin = [];
|
||||||
let zhajiout = [];
|
let zhajiout = [];
|
||||||
|
|
||||||
@ -145,7 +147,7 @@ var views = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export function Jl3dpassflow(dom,skinCode) {
|
export function Jl3dpassflow(dom,skinCode,routegroup) {
|
||||||
var scope = this;
|
var scope = this;
|
||||||
|
|
||||||
this.dom = dom;
|
this.dom = dom;
|
||||||
@ -238,26 +240,6 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let raycaster = new THREE.Raycaster();
|
let raycaster = new THREE.Raycaster();
|
||||||
|
|
||||||
|
|
||||||
getPublishMapDetail(skinCode).then(netdata => {
|
|
||||||
|
|
||||||
// let assetsdata = JSON.parse(netdata.data.sections);
|
|
||||||
console.log(netdata);
|
|
||||||
// if(assetsdata.link){
|
|
||||||
// scope.datatype = "old";
|
|
||||||
// scope.jsonwebwork = new Worker("../../static/workertest/jsonworker.js");
|
|
||||||
// scope.Subscribe = new Jlmap3dSubscribe(scope,routegroup,scope.jsonwebwork);
|
|
||||||
// scope.Subscribe.socketon(scope.Subscribe.topic);
|
|
||||||
// SimulationLoad(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
|
|
||||||
//
|
|
||||||
// }else{
|
|
||||||
// scope.datatype = "new";
|
|
||||||
// scope.jsonwebworknew = new Worker("../../static/workertest/jsonworkernew.js");
|
|
||||||
// scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
|
|
||||||
// scope.Subscribe.socketon(scope.Subscribe.topic);
|
|
||||||
// SimulationLoadNew(mapnetdata,scope,netdata.data,mapdata,camera,controls,scenesimulation,storemod);
|
|
||||||
// }
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
var loader = new THREE.OBJLoader();
|
var loader = new THREE.OBJLoader();
|
||||||
@ -383,13 +365,20 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
|
|
||||||
this.modelmanager = new ModelManager();
|
this.modelmanager = new ModelManager();
|
||||||
let loadingInstance = Loading.service({ fullscreen: true });
|
let loadingInstance = Loading.service({ fullscreen: true });
|
||||||
|
|
||||||
|
let nowstation = null;
|
||||||
|
let stationlist = [];
|
||||||
|
let socktest = null;
|
||||||
|
|
||||||
this.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
this.modelmanager.loadpromise(Staticmodel, scope.mixers).then(function (data) {
|
||||||
// console.log(scope.modelmanager);
|
console.log(scope.modelmanager);
|
||||||
initstationanimation(scope.modelmanager.station.mesh);
|
initstationanimation(scope.modelmanager.station.mesh);
|
||||||
initzhajiinaimation(scope.modelmanager.zhajiin.mesh);
|
initzhajiinaimation(scope.modelmanager.zhajiin.mesh);
|
||||||
initzhajioutanimation(scope.modelmanager.zhajiout.mesh);
|
initzhajioutanimation(scope.modelmanager.zhajiout.mesh);
|
||||||
|
inittrain(scope.modelmanager.train.mesh);
|
||||||
scene.add(scope.modelmanager.section.mesh);
|
scene.add(scope.modelmanager.section.mesh);
|
||||||
// scene.add(scope.modelmanager.train.mesh);
|
// scene.add(scope.modelmanager.train.mesh);
|
||||||
|
|
||||||
level = scope.modelmanager.station.mesh;
|
level = scope.modelmanager.station.mesh;
|
||||||
|
|
||||||
monitor = scope.modelmanager.monitor.mesh;
|
monitor = scope.modelmanager.monitor.mesh;
|
||||||
@ -402,7 +391,14 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
|
|
||||||
loadingInstance.close();
|
loadingInstance.close();
|
||||||
|
|
||||||
scope.switchrender(true);
|
scope.switchrender(false);
|
||||||
|
|
||||||
|
|
||||||
|
getPublishMapDetail(skinCode).then(netdata => {
|
||||||
|
console.log(netdata);
|
||||||
|
initstationlist(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList);
|
||||||
|
socktest = new PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,routegroup);
|
||||||
|
});
|
||||||
|
|
||||||
animate();
|
animate();
|
||||||
})
|
})
|
||||||
@ -471,15 +467,14 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
newhumancreate(stationzon.getinitposition("entergate"),2);
|
newhumancreate(stationzon.getinitposition("entergate"),2);
|
||||||
}
|
}
|
||||||
for(let i=0;i<6;i++){
|
for(let i=0;i<6;i++){
|
||||||
newhumancreate(stationzon.getinitposition("standtop"),3);
|
newhumancreate(stationzon.getinitposition("standtop"),4);
|
||||||
}
|
}
|
||||||
for(let i=0;i<6;i++){
|
for(let i=0;i<6;i++){
|
||||||
newhumancreate(stationzon.getinitposition("standdown"),3);
|
newhumancreate(stationzon.getinitposition("standdown"),4);
|
||||||
}
|
}
|
||||||
for(let i=0;i<5;i++){
|
for(let i=0;i<5;i++){
|
||||||
newhumancreate(stationzon.getinitposition("exitgate"),4);
|
newhumancreate(stationzon.getinitposition("exitgate"),4);
|
||||||
}
|
}
|
||||||
console.log(humanlist);
|
|
||||||
}
|
}
|
||||||
function startWorker(){
|
function startWorker(){
|
||||||
initpasser();
|
initpasser();
|
||||||
@ -495,6 +490,11 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
mixers[i].update( delta );
|
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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
stationwebwork.onmessage = function (event) {
|
stationwebwork.onmessage = function (event) {
|
||||||
@ -576,6 +576,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
var direct = Math.floor(Math.random()*(3-1+1))+1;
|
var direct = Math.floor(Math.random()*(3-1+1))+1;
|
||||||
let points = [];
|
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));
|
||||||
|
// points.push(new THREE.Vector3(11.81,9.8,13.11));
|
||||||
|
|
||||||
//1--top
|
//1--top
|
||||||
//2-- down
|
//2-- down
|
||||||
@ -588,13 +589,15 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
targetPosition = stationzon.getzoneposition("standdown");
|
targetPosition = stationzon.getzoneposition("standdown");
|
||||||
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
|
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
|
||||||
}
|
}
|
||||||
if(path == null){
|
if(path[0].y<9.84){
|
||||||
console.log(points);
|
points.push(new THREE.Vector3(11.81,9.8,13.11));
|
||||||
console.log(path);
|
points.push(new THREE.Vector3(29.5,1.77,13.16));
|
||||||
|
|
||||||
}
|
}
|
||||||
for(let i=0;i<path.length;i++){
|
for(let i=0;i<path.length;i++){
|
||||||
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
|
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
|
||||||
}
|
}
|
||||||
|
|
||||||
moveanimateinit(humanlist.children[i],i,points,i);
|
moveanimateinit(humanlist.children[i],i,points,i);
|
||||||
}
|
}
|
||||||
// //出站
|
// //出站
|
||||||
@ -635,10 +638,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
groupID = pathfinder.getGroup( ZONE, points[0] );
|
groupID = pathfinder.getGroup( ZONE, points[0] );
|
||||||
targetPosition = stationzon.getzoneposition("exitgate");
|
targetPosition = stationzon.getzoneposition("exitgate");
|
||||||
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
|
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
|
||||||
if(path == null){
|
|
||||||
console.log(points[0]);
|
|
||||||
console.log(targetPosition);
|
|
||||||
}
|
|
||||||
for(let i=0;i<path.length;i++){
|
for(let i=0;i<path.length;i++){
|
||||||
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
|
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
|
||||||
}
|
}
|
||||||
@ -668,10 +668,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
targetPosition = stationzon.getzoneposition("exit2");
|
targetPosition = stationzon.getzoneposition("exit2");
|
||||||
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
|
path = pathfinder.findPath( points[0], targetPosition, ZONE, groupID );
|
||||||
}
|
}
|
||||||
if(path == null){
|
|
||||||
console.log(points[0]);
|
|
||||||
console.log(targetPosition);
|
|
||||||
}
|
|
||||||
for(let i=0;i<path.length;i++){
|
for(let i=0;i<path.length;i++){
|
||||||
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
|
points.push(new THREE.Vector3(path[i].x,path[i].y,path[i].z));
|
||||||
}
|
}
|
||||||
@ -686,7 +683,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
function moveanimateinit(model,name,points,index){
|
function moveanimateinit(model,name,points,index){
|
||||||
model.status = 1;
|
model.status = 1;
|
||||||
let curve = new THREE.CatmullRomCurve3(points);
|
let curve = new THREE.CatmullRomCurve3(points);
|
||||||
curve.curvrtype = "centripetal";
|
curve.curvrtype = "catmullrom";
|
||||||
// curve.getLength();
|
// curve.getLength();
|
||||||
// curve动画轨迹
|
// curve动画轨迹
|
||||||
// progress动画进度
|
// progress动画进度
|
||||||
@ -813,11 +810,149 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
newhuman.mixer = mixer;
|
newhuman.mixer = mixer;
|
||||||
newhuman.runrail = null;
|
newhuman.runrail = null;
|
||||||
newhuman.speed = 0;
|
newhuman.speed = 0;
|
||||||
mixers.push(mixer);
|
newhuman.mixer = mixer;
|
||||||
humanlist.add(newhuman);
|
humanlist.add(newhuman);
|
||||||
|
// console.log(humanlist.children.length);
|
||||||
|
}
|
||||||
|
function initstationlist(stationdata,standdata,psddata){
|
||||||
|
|
||||||
|
let list = [];
|
||||||
|
for(let i=0,leni = standdata.length;i<leni;i++){
|
||||||
|
for(let j=0,lenj = psddata.length;j<lenj;j++){
|
||||||
|
if(standdata[i].code == psddata[j].standCode){
|
||||||
|
standdata[i].name = psddata[j].code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(let i=0,leni = stationdata.length;i<leni;i++){
|
||||||
|
if(stationdata[i].depot == false){
|
||||||
|
list[stationdata[i].name] = [];
|
||||||
|
for(let j=0,lenj = standdata.length;j<lenj;j++){
|
||||||
|
if(standdata[j].stationCode == stationdata[i].code){
|
||||||
|
list[stationdata[i].name].push(standdata[j]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for(let k in list){
|
||||||
|
if(list[k].length>0){
|
||||||
|
let stationobject = {
|
||||||
|
code : list[k][0].stationCode,
|
||||||
|
name : k,
|
||||||
|
toppsd:null,
|
||||||
|
downpsd:null,
|
||||||
|
topsection:null,
|
||||||
|
downsection:null,
|
||||||
|
};
|
||||||
|
if(list[k][0].position.y>list[k][1].position.y){
|
||||||
|
stationobject.toppsd = list[k][0].name;
|
||||||
|
stationobject.downpsd = list[k][1].name;
|
||||||
|
stationobject.topsection = list[k][0].standTrackCode;
|
||||||
|
stationobject.downsection = list[k][1].standTrackCode;
|
||||||
|
}else{
|
||||||
|
stationobject.toppsd = list[k][1].name;
|
||||||
|
stationobject.downpsd = list[k][0].name;
|
||||||
|
stationobject.topsection = list[k][1].standTrackCode;
|
||||||
|
stationobject.downsection = list[k][0].standTrackCode;
|
||||||
|
}
|
||||||
|
stationlist.push(stationobject);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
nowstation = stationlist[0];
|
||||||
|
updatestationlist(stationlist);
|
||||||
|
console.log(nowstation);
|
||||||
|
}
|
||||||
|
function inittrain(object){
|
||||||
|
let ntracks1,ntracks2,tclip,fclip;
|
||||||
|
|
||||||
|
ntracks1 = object.animations.slice(16,27);
|
||||||
|
|
||||||
|
tclip = new THREE.AnimationClip("three",2,ntracks1);
|
||||||
|
|
||||||
|
ntracks2 = object.animations.slice(0,15);
|
||||||
|
|
||||||
|
fclip = new THREE.AnimationClip("four",2,ntracks2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lefttrain = object.clone(true);
|
||||||
|
lefttrain.action = {
|
||||||
|
top:[],
|
||||||
|
down:[]
|
||||||
|
};
|
||||||
|
|
||||||
|
righttrain = object.clone(true);
|
||||||
|
righttrain.action = {
|
||||||
|
top:[],
|
||||||
|
down:[]
|
||||||
|
};
|
||||||
|
inittrainanimation(lefttrain,tclip,fclip);
|
||||||
|
inittrainanimation(righttrain,tclip,fclip);
|
||||||
|
lefttrain.position.z = 30;
|
||||||
|
righttrain.position.z = -10;
|
||||||
|
// scene.add(lefttrain);
|
||||||
|
// scene.add(righttrain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function inittrainanimation(train,tclip,fclip){
|
||||||
|
for(let j=0;j<train.children.length;j++){
|
||||||
|
if(train.children[j].name == "c1" || train.children[j].name == "c6"){
|
||||||
|
for(let n=0,lenn = train.children[j].children.length;n<lenn;n++){
|
||||||
|
if(train.children[j].children[n].name == "top"){
|
||||||
|
train.children[j].children[n].animations = [];
|
||||||
|
train.children[j].children[n].animations.push(tclip.clone());
|
||||||
|
let mixer = new THREE.AnimationMixer( train.children[j].children[n] );
|
||||||
|
mixers.push(mixer);
|
||||||
|
let action = mixer.clipAction( train.children[j].children[n].animations[ 0 ] );
|
||||||
|
action.setLoop(THREE.LoopOnce);
|
||||||
|
action.clampWhenFinished = true;
|
||||||
|
train.action.top.push(action);
|
||||||
|
mixers.push(mixer);
|
||||||
|
}
|
||||||
|
if(train.children[j].children[n].name == "down"){
|
||||||
|
train.children[j].children[n].animations = [];
|
||||||
|
train.children[j].children[n].animations.push(tclip.clone());
|
||||||
|
let mixer = new THREE.AnimationMixer( train.children[j].children[n] );
|
||||||
|
mixers.push(mixer);
|
||||||
|
let action = mixer.clipAction( train.children[j].children[n].animations[ 0 ] );
|
||||||
|
action.setLoop(THREE.LoopOnce);
|
||||||
|
action.clampWhenFinished = true;
|
||||||
|
train.action.down.push(action);
|
||||||
|
mixers.push(mixer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
for(let n=0,lenn = train.children[j].children.length;n<lenn;n++){
|
||||||
|
if(train.children[j].children[n].name == "top"){
|
||||||
|
train.children[j].children[n].animations = [];
|
||||||
|
train.children[j].children[n].animations.push(fclip.clone());
|
||||||
|
let mixer = new THREE.AnimationMixer( train.children[j].children[n] );
|
||||||
|
mixers.push(mixer);
|
||||||
|
let action = mixer.clipAction( train.children[j].children[n].animations[ 0 ] );
|
||||||
|
action.setLoop(THREE.LoopOnce);
|
||||||
|
action.clampWhenFinished = true;
|
||||||
|
train.action.top.push(action);
|
||||||
|
mixers.push(mixer);
|
||||||
|
}
|
||||||
|
if(train.children[j].children[n].name == "down"){
|
||||||
|
train.children[j].children[n].animations = [];
|
||||||
|
train.children[j].children[n].animations.push(fclip.clone());
|
||||||
|
let mixer = new THREE.AnimationMixer( train.children[j].children[n] );
|
||||||
|
mixers.push(mixer);
|
||||||
|
let action = mixer.clipAction( train.children[j].children[n].animations[ 0 ] );
|
||||||
|
action.setLoop(THREE.LoopOnce);
|
||||||
|
action.clampWhenFinished = true;
|
||||||
|
train.action.down.push(action);
|
||||||
|
mixers.push(mixer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
function initstationanimation(object){
|
function initstationanimation(object){
|
||||||
let mixer = new THREE.AnimationMixer( object );
|
let mixer = new THREE.AnimationMixer( object );
|
||||||
|
|
||||||
@ -834,7 +969,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
// action.play();
|
// action.play();
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -853,7 +988,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
// action.play();
|
// action.play();
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -863,6 +998,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
station = object;
|
station = object;
|
||||||
|
// console.log(deviceaction);
|
||||||
scene.add(object);
|
scene.add(object);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -881,7 +1017,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -898,7 +1034,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -915,7 +1051,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -932,7 +1068,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -949,7 +1085,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -979,7 +1115,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -996,7 +1132,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -1013,7 +1149,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -1030,7 +1166,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
@ -1047,7 +1183,7 @@ export function Jl3dpassflow(dom,skinCode) {
|
|||||||
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
let action =mixer.clipAction( newzhaji.children[i].animations[0]);
|
||||||
action.setLoop(THREE.LoopOnce);
|
action.setLoop(THREE.LoopOnce);
|
||||||
action.clampWhenFinished = true;
|
action.clampWhenFinished = true;
|
||||||
mixer.runplay = true;
|
|
||||||
mixers.push(mixer);
|
mixers.push(mixer);
|
||||||
let device = {
|
let device = {
|
||||||
action:action,
|
action:action,
|
||||||
|
@ -20,6 +20,7 @@ export function ModelManager(){
|
|||||||
this.station = {
|
this.station = {
|
||||||
code:null,
|
code:null,
|
||||||
screenDoorOpenStatus:"01",
|
screenDoorOpenStatus:"01",
|
||||||
|
animations:null,
|
||||||
mesh:null,
|
mesh:null,
|
||||||
action:null
|
action:null
|
||||||
};
|
};
|
||||||
@ -27,12 +28,14 @@ export function ModelManager(){
|
|||||||
this.zhajiin = {
|
this.zhajiin = {
|
||||||
code:null,
|
code:null,
|
||||||
screenDoorOpenStatus:"01",
|
screenDoorOpenStatus:"01",
|
||||||
|
animations:null,
|
||||||
mesh:null,
|
mesh:null,
|
||||||
action:null
|
action:null
|
||||||
};
|
};
|
||||||
this.zhajiout = {
|
this.zhajiout = {
|
||||||
code:null,
|
code:null,
|
||||||
screenDoorOpenStatus:"01",
|
screenDoorOpenStatus:"01",
|
||||||
|
animations:null,
|
||||||
mesh:null,
|
mesh:null,
|
||||||
action:null
|
action:null
|
||||||
};
|
};
|
||||||
@ -40,6 +43,7 @@ export function ModelManager(){
|
|||||||
this.monitor = {
|
this.monitor = {
|
||||||
code:null,
|
code:null,
|
||||||
screenDoorOpenStatus:"01",
|
screenDoorOpenStatus:"01",
|
||||||
|
animations:null,
|
||||||
mesh:null,
|
mesh:null,
|
||||||
action:null
|
action:null
|
||||||
};
|
};
|
||||||
@ -47,6 +51,7 @@ export function ModelManager(){
|
|||||||
this.train = {
|
this.train = {
|
||||||
code:null,
|
code:null,
|
||||||
screenDoorOpenStatus:"01",
|
screenDoorOpenStatus:"01",
|
||||||
|
animations:null,
|
||||||
mesh:null,
|
mesh:null,
|
||||||
action:null
|
action:null
|
||||||
};
|
};
|
||||||
@ -55,6 +60,7 @@ export function ModelManager(){
|
|||||||
this.section = {
|
this.section = {
|
||||||
code:null,
|
code:null,
|
||||||
screenDoorOpenStatus:"01",
|
screenDoorOpenStatus:"01",
|
||||||
|
animations:null,
|
||||||
mesh:null,
|
mesh:null,
|
||||||
action:null
|
action:null
|
||||||
};
|
};
|
||||||
@ -95,8 +101,28 @@ function fbxpromise(asset,mixers,model){
|
|||||||
// child.receiveShadow = true;
|
// child.receiveShadow = true;
|
||||||
// }
|
// }
|
||||||
// } );
|
// } );
|
||||||
|
if(asset.deviceType == "train"){
|
||||||
|
// let mixer = new THREE.AnimationMixer( object );
|
||||||
|
let realtrain = new THREE.Group();
|
||||||
|
for(let j=6;j>0;j--){
|
||||||
|
let name = "c"+j;
|
||||||
|
for(let i=0;i<object.children.length;i++){
|
||||||
|
if(object.children[i].name == name){
|
||||||
|
|
||||||
model.mesh = object;
|
object.children[i].position.x = object.children[i].position.x;
|
||||||
|
//object.children[i].position.y = j*10;
|
||||||
|
realtrain.add(object.children[i]);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
model.mesh = realtrain;
|
||||||
|
model.mesh.animations = object.animations[0].tracks;
|
||||||
|
//
|
||||||
|
}else{
|
||||||
|
model.mesh = object;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -588,10 +588,15 @@ class Signal extends Group {
|
|||||||
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
|
||||||
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
|
||||||
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
|
||||||
/** 进路交人工控或自动控 */
|
|
||||||
!model.atsControl && this.setArtificialRouteClose();
|
|
||||||
// 联锁自动进路通过
|
// 联锁自动进路通过
|
||||||
model.fleetMode && this.setAutoRouteOpen();
|
model.fleetMode && this.setAutoRouteOpen();
|
||||||
|
// 联锁自动触发
|
||||||
|
if (model.ciControl) {
|
||||||
|
this.setAutoTriggerOpen();
|
||||||
|
} else {
|
||||||
|
!model.atsControl && this.setArtificialRouteClose(); /** 进路交人工控或自动控 */
|
||||||
|
}
|
||||||
// 设置点灯类型 必须在最后设置不能放前面 logicLight 0 物理点灯 1 逻辑点灯
|
// 设置点灯类型 必须在最后设置不能放前面 logicLight 0 物理点灯 1 逻辑点灯
|
||||||
if (model.logicLight) {
|
if (model.logicLight) {
|
||||||
this.logicalLight(); // 设置逻辑点灯
|
this.logicalLight(); // 设置逻辑点灯
|
||||||
|
@ -194,8 +194,8 @@ export default class TrainBody extends Group {
|
|||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
textAlign: 'center',
|
textAlign: 'left',
|
||||||
textVerticalAlign: 'middle'
|
textVerticalAlign: 'top'
|
||||||
});
|
});
|
||||||
this.add(this.travelSigns);
|
this.add(this.travelSigns);
|
||||||
}
|
}
|
||||||
@ -211,8 +211,8 @@ export default class TrainBody extends Group {
|
|||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
textAlign: 'center',
|
textAlign: 'left',
|
||||||
textVerticalAlign: 'middle'
|
textVerticalAlign: 'top'
|
||||||
});
|
});
|
||||||
this.add(this.crewNum);
|
this.add(this.crewNum);
|
||||||
}
|
}
|
||||||
@ -228,8 +228,8 @@ export default class TrainBody extends Group {
|
|||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
textAlign: 'center',
|
textAlign: 'left',
|
||||||
textVerticalAlign: 'middle'
|
textVerticalAlign: 'top'
|
||||||
});
|
});
|
||||||
this.add(this.travelNum);
|
this.add(this.travelNum);
|
||||||
}
|
}
|
||||||
@ -245,8 +245,8 @@ export default class TrainBody extends Group {
|
|||||||
textStrokeWidth: 0,
|
textStrokeWidth: 0,
|
||||||
fontSize: model.fontSize,
|
fontSize: model.fontSize,
|
||||||
fontFamily: style.Train.common.fontFamily,
|
fontFamily: style.Train.common.fontFamily,
|
||||||
textAlign: 'center',
|
textAlign: 'left',
|
||||||
textVerticalAlign: 'middle'
|
textVerticalAlign: 'top'
|
||||||
});
|
});
|
||||||
this.add(this.delayTime);
|
this.add(this.delayTime);
|
||||||
}
|
}
|
||||||
|
@ -146,12 +146,16 @@ export default {
|
|||||||
// 取消列车进路
|
// 取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 2).then(({valid})=>{
|
commitOperate(menuOperate.Signal.cancelTrainRoute, {}, 1).then(({valid, operate})=>{
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
operate['messages'] = `取消以信号机${this.selected.name}为始端的进路,该进路即将由自动信号模式转为人工模式!`;
|
||||||
|
this.$refs.confirmControl.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch((error) => {
|
||||||
|
console.log(error);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
@ -198,7 +202,7 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -218,7 +222,7 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -238,7 +242,7 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -259,7 +263,7 @@ export default {
|
|||||||
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -166,7 +166,7 @@ export default {
|
|||||||
// 车站扣车
|
// 车站扣车
|
||||||
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
|
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
|
||||||
// 停站时间
|
// 停站时间
|
||||||
this.treeData[0].children[2].value = selected.parkingTime == 0 ? '自动' : `${selected.parkingTime} 秒`;
|
this.treeData[0].children[2].value = selected.parkingTime <= 0 ? '自动' : `${selected.parkingTime} 秒`;
|
||||||
// 跳停
|
// 跳停
|
||||||
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
|
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
|
||||||
// if (selected.direction == '01') {
|
// if (selected.direction == '01') {
|
||||||
|
@ -71,13 +71,18 @@ export default {
|
|||||||
handler: this.unlock,
|
handler: this.unlock,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: '信号关灯',
|
||||||
|
handler: this.signalClose,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '信号重开',
|
label: '信号重开',
|
||||||
handler: this.reopenSignal,
|
handler: this.reopenSignal,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '进路引导',
|
label: '引导进路办理',
|
||||||
handler: this.guide,
|
handler: this.guide,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||||
},
|
},
|
||||||
@ -102,9 +107,19 @@ export default {
|
|||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号关灯',
|
label: '进路交人工控',
|
||||||
handler: this.signalClose,
|
handler: this.humanControl,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '进路交ATS自动控',
|
||||||
|
handler: this.atsAutoControl,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '查询进路状态',
|
||||||
|
handler: this.detail,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
Center: [
|
Center: [
|
||||||
@ -314,6 +329,22 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 设置联锁自动触发
|
||||||
|
setAutoTrigger() {
|
||||||
|
commitOperate(menuOperate.Signal.setAutoTrigger, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消联锁自动触发
|
||||||
|
cancelAutoTrigger() {
|
||||||
|
commitOperate(menuOperate.Signal.cancelAutoTrigger, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.routeControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 信号关灯
|
// 信号关灯
|
||||||
signalClose() {
|
signalClose() {
|
||||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||||
|
@ -43,6 +43,11 @@ export default {
|
|||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
|
{
|
||||||
|
label: '上电解锁',
|
||||||
|
handler: this.powerUnLock,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '全站设置联锁自动触发',
|
label: '全站设置联锁自动触发',
|
||||||
handler: this.setAutoTrigger,
|
handler: this.setAutoTrigger,
|
||||||
@ -52,13 +57,18 @@ export default {
|
|||||||
label: '全站取消联锁自动触发',
|
label: '全站取消联锁自动触发',
|
||||||
handler: this.cancelAutoTrigger,
|
handler: this.cancelAutoTrigger,
|
||||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所有进路交ATS自动控',
|
||||||
|
handler: this.atsAutoControlALL,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '所有进路交人工控',
|
||||||
|
handler: this.humanControlALL,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
// label: '上电解锁',
|
|
||||||
// handler: this.powerUnLock,
|
|
||||||
// cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '执行关键操作测试',
|
// label: '执行关键操作测试',
|
||||||
// handler: this.execKeyOperationTest,
|
// handler: this.execKeyOperationTest,
|
||||||
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
|
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
|
||||||
@ -188,14 +198,15 @@ export default {
|
|||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
operation: OperationEvent.Station.setAutoTrigger.menu.operation,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(error => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow(error.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 全站取消联锁自动触发
|
// 全站取消联锁自动触发
|
||||||
@ -204,14 +215,15 @@ export default {
|
|||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation,
|
||||||
|
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(error => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow(error.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 上电解锁
|
// 上电解锁
|
||||||
@ -226,6 +238,8 @@ export default {
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
this.$refs.noticeInfo.doShow(error.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 执行关键操作测试
|
// 执行关键操作测试
|
||||||
|
@ -68,7 +68,7 @@ export default {
|
|||||||
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
cmdType:CMD.Switch.CMD_SWITCH_TURN
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '故障解锁',
|
label: '道岔故障解锁',
|
||||||
handler: this.fault,
|
handler: this.fault,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
cmdType:CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||||
},
|
},
|
||||||
@ -88,12 +88,12 @@ export default {
|
|||||||
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
cmdType:CMD.Switch.CMD_SWITCH_ACTIVE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置限速',
|
label: '道岔设置限速',
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消限速',
|
label: '道岔取消限速',
|
||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||||
}
|
}
|
||||||
|
@ -98,12 +98,12 @@ export const menuOperate = {
|
|||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||||
},
|
},
|
||||||
setAutoInterlock:{
|
setAutoInterlock:{
|
||||||
// 设置通过模式
|
// 设置通过模式 设置联锁自动进路
|
||||||
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||||
},
|
},
|
||||||
cancelAutoInterlock:{
|
cancelAutoInterlock:{
|
||||||
// 取消通过模式
|
// 取消通过模式 取消联锁自动进路
|
||||||
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||||
},
|
},
|
||||||
@ -125,6 +125,16 @@ export const menuOperate = {
|
|||||||
// 取消自动折返
|
// 取消自动折返
|
||||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||||
|
},
|
||||||
|
setAutoTrigger: {
|
||||||
|
// 设置联锁自动触发
|
||||||
|
operation: OperationEvent.Signal.setAutoTrigger.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||||
|
},
|
||||||
|
cancelAutoTrigger: {
|
||||||
|
// 取消联锁自动触发
|
||||||
|
operation: OperationEvent.Signal.cancelAutoTrigger.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Switch:{
|
Switch:{
|
||||||
|
@ -199,10 +199,10 @@ export default {
|
|||||||
CMD_STATION_SET_MASTER_GUIDE_LOCK: {value: 'Station_Set_Master_Guide_Lock', label: '设置引导总锁'},
|
CMD_STATION_SET_MASTER_GUIDE_LOCK: {value: 'Station_Set_Master_Guide_Lock', label: '设置引导总锁'},
|
||||||
/** 取消引导总锁 */
|
/** 取消引导总锁 */
|
||||||
CMD_STATION_CANCEL_MASTER_GUIDE_LOCK: {value: 'Station_Cancel_Master_Guide_Lock', label: '取消引导总锁'},
|
CMD_STATION_CANCEL_MASTER_GUIDE_LOCK: {value: 'Station_Cancel_Master_Guide_Lock', label: '取消引导总锁'},
|
||||||
/** 封锁车站所有信号机 */
|
// /** 封锁车站所有信号机 */
|
||||||
CMD_STATION_CANCEL_MASTER_GUIDE: {value: 'Station_Cancel_Master_Guide_Lock', label: '封锁集中站信号'},
|
// CMD_STATION_CANCEL_MASTER_GUIDE: {value: 'Station_Cancel_Master_Guide_Lock', label: '封锁集中站信号'},
|
||||||
/** 上电解锁 */
|
/** 上电解锁 */
|
||||||
CMD_STATION_POWER_ON_UNLOCK: {value: ' Station_Power_On_Unlock', label: '上电解锁'},
|
CMD_STATION_POWER_ON_UNLOCK: {value: 'Station_Power_On_Unlock', label: '上电解锁'},
|
||||||
/** 执行关键操作测试 */
|
/** 执行关键操作测试 */
|
||||||
CMD_STATION_KEY_OPERATION_TEST: {value: 'Station_Key_Operation_Test', label: '执行关键操作测试'}
|
CMD_STATION_KEY_OPERATION_TEST: {value: 'Station_Key_Operation_Test', label: '执行关键操作测试'}
|
||||||
},
|
},
|
||||||
|
@ -133,6 +133,18 @@ export default {
|
|||||||
mode: 'bas',
|
mode: 'bas',
|
||||||
id: '23',
|
id: '23',
|
||||||
type: 'interface'
|
type: 'interface'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '照明',
|
||||||
|
mode: 'bas',
|
||||||
|
id: '24',
|
||||||
|
type: 'interface'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'EPS系统',
|
||||||
|
mode: 'bas',
|
||||||
|
id: '25',
|
||||||
|
type: 'interface'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
<el-form-item label="空调机朝右" prop="isRight">
|
<el-form-item label="空调机朝右" prop="isRight">
|
||||||
<el-checkbox v-model="form.isRight" />
|
<el-checkbox v-model="form.isRight" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="旋转角度" prop="rotate">
|
||||||
|
<el-input-number v-model="form.rotate" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="X轴坐标" prop="x">
|
<el-form-item label="X轴坐标" prop="x">
|
||||||
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -38,6 +41,7 @@ export default {
|
|||||||
code:'',
|
code:'',
|
||||||
isRight:true,
|
isRight:true,
|
||||||
width: 40,
|
width: 40,
|
||||||
|
rotate: 0,
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
},
|
},
|
||||||
@ -71,6 +75,7 @@ export default {
|
|||||||
this.isUpdate = true;
|
this.isUpdate = true;
|
||||||
this.form.code = model.code;
|
this.form.code = model.code;
|
||||||
this.form.width = model.width;
|
this.form.width = model.width;
|
||||||
|
this.form.rotate = model.rotate || 0;
|
||||||
this.form.x = model.point.x;
|
this.form.x = model.point.x;
|
||||||
this.form.y = model.point.y;
|
this.form.y = model.point.y;
|
||||||
this.form.isRight = model.isRight;
|
this.form.isRight = model.isRight;
|
||||||
@ -92,7 +97,8 @@ export default {
|
|||||||
_type: 'AirConditioner',
|
_type: 'AirConditioner',
|
||||||
code: this.isUpdate ? this.form.code : getUID('AirConditioner', this.iscs.airConditionerList),
|
code: this.isUpdate ? this.form.code : getUID('AirConditioner', this.iscs.airConditionerList),
|
||||||
width: this.form.width,
|
width: this.form.width,
|
||||||
isRight:this.form.isRight,
|
isRight: this.form.isRight,
|
||||||
|
rotate: this.form.rotate,
|
||||||
color:'#00ff00'
|
color:'#00ff00'
|
||||||
};
|
};
|
||||||
this.$emit('createAirConditioner', airConditionerModel);
|
this.$emit('createAirConditioner', airConditionerModel);
|
||||||
|
134
src/views/iscs/iscsDraw/iscsBasOperate/balancedElectric.vue
Normal file
134
src/views/iscs/iscsDraw/iscsBasOperate/balancedElectric.vue
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||||
|
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||||
|
<el-input v-model="form.code" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图形宽度" prop="width">
|
||||||
|
<el-input-number v-model="form.width" :min="10" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="旋转角度" prop="rotate">
|
||||||
|
<el-input-number v-model="form.rotate" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标" prop="x">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标" prop="y">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">{{ $t('global.cancel') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
|
export default {
|
||||||
|
name:'AirConditioner',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isUpdate:false,
|
||||||
|
showDeleteButton: false,
|
||||||
|
buttonText: '立即创建',
|
||||||
|
form:{
|
||||||
|
code:'',
|
||||||
|
width: 20,
|
||||||
|
rotate: 0,
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message:'请生成设备图形的编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
width:[
|
||||||
|
{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
x: [
|
||||||
|
{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
y: [
|
||||||
|
{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'iscs'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'BalancedElectric' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.rotate = model.rotate || 0;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const model = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'BalancedElectric',
|
||||||
|
code: this.isUpdate ? this.form.code : getUID('BalancedElectric', this.iscs.balancedElectricList || []),
|
||||||
|
width: this.form.width,
|
||||||
|
rotate: this.form.rotate,
|
||||||
|
color:'#00ff00'
|
||||||
|
};
|
||||||
|
this.$emit('createDataModel', model);
|
||||||
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
initPage() {
|
||||||
|
this.isUpdate = false;
|
||||||
|
this.buttonText = '立即创建';
|
||||||
|
this.showDeleteButton = false;
|
||||||
|
this.form = {
|
||||||
|
code:'',
|
||||||
|
width: 20,
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
};
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
},
|
||||||
|
deleteDevice() {
|
||||||
|
const airConditionerModel = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'BalancedElectric',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form.width,
|
||||||
|
color:'#00ff00'
|
||||||
|
};
|
||||||
|
this.$emit('deleteDataModel', airConditionerModel );
|
||||||
|
this.initPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -0,0 +1,134 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||||
|
<el-form-item v-if="isUpdate" label="编号" prop="code">
|
||||||
|
<el-input v-model="form.code" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图形宽度" prop="width">
|
||||||
|
<el-input-number v-model="form.width" :min="10" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="旋转角度" prop="rotate">
|
||||||
|
<el-input-number v-model="form.rotate" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标" prop="x">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标" prop="y">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">{{ $t('global.cancel') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
|
export default {
|
||||||
|
name:'AirConditioner',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isUpdate:false,
|
||||||
|
showDeleteButton: false,
|
||||||
|
buttonText: '立即创建',
|
||||||
|
form:{
|
||||||
|
code:'',
|
||||||
|
width: 20,
|
||||||
|
rotate: 0,
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message:'请生成设备图形的编码', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
width:[
|
||||||
|
{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
x: [
|
||||||
|
{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
y: [
|
||||||
|
{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'iscs'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'ElectricButterflyValve' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.rotate = model.rotate || 0;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const model = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'ElectricButterflyValve',
|
||||||
|
code: this.isUpdate ? this.form.code : getUID('ElectricButterflyValve', this.iscs.electricButterflyValveList || []),
|
||||||
|
width: this.form.width,
|
||||||
|
rotate: this.form.rotate,
|
||||||
|
color:'#00ff00'
|
||||||
|
};
|
||||||
|
this.$emit('createDataModel', model);
|
||||||
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
initPage() {
|
||||||
|
this.isUpdate = false;
|
||||||
|
this.buttonText = '立即创建';
|
||||||
|
this.showDeleteButton = false;
|
||||||
|
this.form = {
|
||||||
|
code:'',
|
||||||
|
width: 20,
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
};
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
},
|
||||||
|
deleteDevice() {
|
||||||
|
const airConditionerModel = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'ElectricButterflyValve',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form.width,
|
||||||
|
color:'#00ff00'
|
||||||
|
};
|
||||||
|
this.$emit('deleteDataModel', airConditionerModel );
|
||||||
|
this.initPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -13,6 +13,9 @@
|
|||||||
<el-form-item label="图形宽度" prop="width">
|
<el-form-item label="图形宽度" prop="width">
|
||||||
<el-input-number v-model="form.width" :min="10" />
|
<el-input-number v-model="form.width" :min="10" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="旋转角度" prop="rotate">
|
||||||
|
<el-input-number v-model="form.rotate" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="X轴坐标" prop="x">
|
<el-form-item label="X轴坐标" prop="x">
|
||||||
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -41,6 +44,7 @@ export default {
|
|||||||
code:'',
|
code:'',
|
||||||
type:'',
|
type:'',
|
||||||
width: 25,
|
width: 25,
|
||||||
|
rotate: 0,
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10
|
||||||
},
|
},
|
||||||
@ -77,7 +81,8 @@ export default {
|
|||||||
this.isUpdate = true;
|
this.isUpdate = true;
|
||||||
this.form.code = model.code;
|
this.form.code = model.code;
|
||||||
this.form.width = model.width;
|
this.form.width = model.width;
|
||||||
this.form.pumpType = model.pumpType;
|
this.form.type = model.pumpType;
|
||||||
|
this.form.rotate = model.rotate || 0;
|
||||||
this.form.x = model.point.x;
|
this.form.x = model.point.x;
|
||||||
this.form.y = model.point.y;
|
this.form.y = model.point.y;
|
||||||
}
|
}
|
||||||
@ -99,7 +104,8 @@ export default {
|
|||||||
code: this.isUpdate ? this.form.code : getUID('FrozenPump', this.iscs.frozenPumpList),
|
code: this.isUpdate ? this.form.code : getUID('FrozenPump', this.iscs.frozenPumpList),
|
||||||
width: this.form.width,
|
width: this.form.width,
|
||||||
color:'#00ff00',
|
color:'#00ff00',
|
||||||
pumpType:this.form.type
|
rotate: this.form.rotate,
|
||||||
|
pumpType: this.form.type
|
||||||
};
|
};
|
||||||
this.$emit('createFrozenPump', frozenPumpModel);
|
this.$emit('createFrozenPump', frozenPumpModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
@ -107,6 +107,31 @@
|
|||||||
@deleteDataModel="deleteDataModel"
|
@deleteDataModel="deleteDataModel"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="平衡电动阀" name="BalancedElectric">
|
||||||
|
<balanced-electric
|
||||||
|
ref="balancedElectric"
|
||||||
|
style="width: 90%"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="电动蝶阀" name="ElectricButterflyValve">
|
||||||
|
<electric-butterfly-valve
|
||||||
|
ref="electricButterflyValve"
|
||||||
|
style="width: 90%"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
|
<el-tab-pane label="照明组" name="LightingGroup">
|
||||||
|
<lighting-group
|
||||||
|
ref="lightingGroup"
|
||||||
|
style="width: 100%;height: 100%;"
|
||||||
|
@createDataModel="createDataModel"
|
||||||
|
@deleteDataModel="deleteDataModel"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="按钮" name="IscsButton">
|
<el-tab-pane label="按钮" name="IscsButton">
|
||||||
<iscs-button
|
<iscs-button
|
||||||
ref="iscsButton"
|
ref="iscsButton"
|
||||||
@ -162,6 +187,9 @@ import IscsLine from '../iscsCommonElem/line';
|
|||||||
import IscsText from '../iscsCommonElem/text';
|
import IscsText from '../iscsCommonElem/text';
|
||||||
import IscsRect from '../iscsCommonElem/rect';
|
import IscsRect from '../iscsCommonElem/rect';
|
||||||
import SmookExhaustFd from './smookExhaustFd';
|
import SmookExhaustFd from './smookExhaustFd';
|
||||||
|
import LightingGroup from './lightingGroup';
|
||||||
|
import BalancedElectric from './balancedElectric';
|
||||||
|
import ElectricButterflyValve from './electricButterflyValve';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'IscsOperate',
|
name: 'IscsOperate',
|
||||||
@ -181,7 +209,10 @@ export default {
|
|||||||
IscsButton,
|
IscsButton,
|
||||||
IscsText,
|
IscsText,
|
||||||
IscsRect,
|
IscsRect,
|
||||||
IscsLine
|
IscsLine,
|
||||||
|
LightingGroup,
|
||||||
|
BalancedElectric,
|
||||||
|
ElectricButterflyValve
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
],
|
],
|
||||||
@ -218,5 +249,66 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.map-control {
|
||||||
|
float: right;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
.border-card{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.mapEdit{
|
||||||
|
height: calc(100% - 47px);
|
||||||
|
.tab_pane_box{
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/deep/ .el-card__body{
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
/deep/ {
|
||||||
|
.mapEdit .el-tabs__nav-wrap.is-scrollable {
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
.mapEdit .el-tabs__header .el-tabs__item.is-active {
|
||||||
|
border-bottom-color: #f5f7fa;
|
||||||
|
background: #f5f7fa;
|
||||||
|
}
|
||||||
|
.mapEdit .el-tabs__active-bar{
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.mapEdit .el-tabs__content {
|
||||||
|
height: calc(100% - 56px);
|
||||||
|
}
|
||||||
|
.mapEdit .el-tab-pane {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.card .el-tabs__nav .el-tabs__item.is-active {
|
||||||
|
border-bottom: 2px solid #E4E7ED;
|
||||||
|
background: #409eff;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.card .el-tabs__nav .el-tabs__item{
|
||||||
|
padding: 0 20px!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mapEdit .el-tabs__nav-prev {
|
||||||
|
width: 20px;
|
||||||
|
height: 41px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
box-shadow: 1px 1px 4px #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mapEdit .el-tabs__nav-next {
|
||||||
|
width: 20px;
|
||||||
|
height: 41px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
box-shadow: 1px 1px 4px #ccc;
|
||||||
|
}
|
||||||
|
}
|
||||||
.heightClass{height:100%;}
|
.heightClass{height:100%;}
|
||||||
</style>
|
</style>
|
||||||
|
200
src/views/iscs/iscsDraw/iscsBasOperate/lightingGroup.vue
Normal file
200
src/views/iscs/iscsDraw/iscsBasOperate/lightingGroup.vue
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
<template>
|
||||||
|
<div style="overflow-y: scroll;height: calc(100% - 46px);">
|
||||||
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
|
||||||
|
<el-form-item v-if="isUpdate" label="编号:" prop="code">
|
||||||
|
<el-input v-model="form.code" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="宽度:" prop="width">
|
||||||
|
<el-input-number v-model="form.width" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="高度:" prop="height">
|
||||||
|
<el-input-number v-model="form.height" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="顶部文字内容:" prop="topContext">
|
||||||
|
<el-input v-model="form.topContext" type="textarea" :rows="2" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="顶部字体大小:" prop="topFontSize">
|
||||||
|
<el-input-number v-model="form.topFontSize" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="顶部字体颜色:" prop="topTextFill">
|
||||||
|
<el-color-picker v-model="form.topTextFill" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="底部文字内容:" prop="bottomContext">
|
||||||
|
<el-input v-model="form.bottomContext" type="textarea" :row="2" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="底部字体大小:" prop="bottomFontSize">
|
||||||
|
<el-input-number v-model="form.bottomFontSize" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="底部字体颜色:" prop="bottomTextFill">
|
||||||
|
<el-color-picker v-model="form.bottomTextFill" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="X轴坐标:" prop="x">
|
||||||
|
<el-input-number v-model="form.x" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Y轴坐标:" prop="y">
|
||||||
|
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||||
|
<el-button v-show="showDeleteButton" @click="initPage">{{ $t('global.cancel') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import {getUID} from '@/iscs/utils/Uid';
|
||||||
|
export default {
|
||||||
|
name:'AirConditioner',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isUpdate:false,
|
||||||
|
showDeleteButton: false,
|
||||||
|
buttonText: '立即创建',
|
||||||
|
form:{
|
||||||
|
code:'',
|
||||||
|
width: 110,
|
||||||
|
height: 60,
|
||||||
|
topContext: '',
|
||||||
|
topFontSize: 10,
|
||||||
|
topTextFill: '#B4AF5B',
|
||||||
|
bottomContext: '',
|
||||||
|
bottomFontSize: 18,
|
||||||
|
bottomTextFill: '#FFFFFF',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
width:[
|
||||||
|
{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
height: [
|
||||||
|
{ required: true, message: '请输入设备图形高度', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
topContext: [
|
||||||
|
{ required: true, message: '请输入顶部文字内容', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
topFontSize: [
|
||||||
|
{required: true, message: '请输入顶部字体大小', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
topTextFill: [
|
||||||
|
{required: true, message: '请输入顶部字体颜色', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
bottomContext: [
|
||||||
|
{required: true, message: '请输入底部文字内容', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
bottomFontSize: [
|
||||||
|
{required: true, message: '请输入底部字体大小', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
bottomTextFill: [
|
||||||
|
{required: true, message: '请输入底部字体颜色', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
x: [
|
||||||
|
{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
y: [
|
||||||
|
{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('iscs', [
|
||||||
|
'iscs'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
watch:{
|
||||||
|
'$store.state.iscs.rightClickCount': function (val) {
|
||||||
|
const model = this.$store.getters['iscs/updateDeviceData'];
|
||||||
|
if (model._type === 'LightingGroup' ) {
|
||||||
|
this.buttonText = '修改';
|
||||||
|
this.showDeleteButton = true;
|
||||||
|
this.isUpdate = true;
|
||||||
|
this.form.code = model.code;
|
||||||
|
this.form.width = model.width;
|
||||||
|
this.form.x = model.point.x;
|
||||||
|
this.form.y = model.point.y;
|
||||||
|
this.form.height = model.height;
|
||||||
|
this.form.topContext = model.topContext;
|
||||||
|
this.form.topFontSize = model.topFontSize;
|
||||||
|
this.form.topTextFill = model.topTextFill;
|
||||||
|
this.form.bottomContext = model.bottomContext;
|
||||||
|
this.form.bottomFontSize = model.bottomFontSize;
|
||||||
|
this.form.bottomTextFill = model.bottomTextFill;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
onSubmit(form) {
|
||||||
|
this.$refs[form].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const airConditionerModel = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'LightingGroup',
|
||||||
|
code: this.isUpdate ? this.form.code : getUID('LightingGroup', this.iscs.lightingGroupList),
|
||||||
|
width: this.form.width,
|
||||||
|
height:this.form.height,
|
||||||
|
topContext: this.form.topContext,
|
||||||
|
topFontSize: this.form.topFontSize,
|
||||||
|
topTextFill: this.form.topTextFill,
|
||||||
|
bottomContext: this.form.bottomContext,
|
||||||
|
bottomFontSize: this.form.bottomFontSize,
|
||||||
|
bottomTextFill: this.form.bottomTextFill
|
||||||
|
};
|
||||||
|
this.$emit('createDataModel', airConditionerModel);
|
||||||
|
this.initPage();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
initPage() {
|
||||||
|
this.isUpdate = false;
|
||||||
|
this.buttonText = '立即创建';
|
||||||
|
this.showDeleteButton = false;
|
||||||
|
this.form = {
|
||||||
|
code:'',
|
||||||
|
width: 110,
|
||||||
|
height: 60,
|
||||||
|
topContext: '',
|
||||||
|
topFontSize: 10,
|
||||||
|
topTextFill: '#B4AF5B',
|
||||||
|
bottomContext: '',
|
||||||
|
bottomFontSize: 18,
|
||||||
|
bottomTextFill: '#FFFFFF',
|
||||||
|
x: 10,
|
||||||
|
y: 10
|
||||||
|
};
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
},
|
||||||
|
deleteDevice() {
|
||||||
|
const lightingGroupModel = {
|
||||||
|
point: {
|
||||||
|
x: this.form.x,
|
||||||
|
y: this.form.y
|
||||||
|
},
|
||||||
|
_type: 'LightingGroup',
|
||||||
|
code: this.form.code,
|
||||||
|
width: this.form.width,
|
||||||
|
height:this.form.height,
|
||||||
|
topContext: this.form.topContext,
|
||||||
|
topFontSize: this.form.topFontSize,
|
||||||
|
topTextFill: this.form.topTextFill,
|
||||||
|
bottomContext: this.form.bottomContext,
|
||||||
|
bottomFontSize: this.form.bottomFontSize,
|
||||||
|
bottomTextFill: this.form.bottomTextFill
|
||||||
|
};
|
||||||
|
this.$emit('deleteDataModel', lightingGroupModel );
|
||||||
|
this.initPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -56,7 +56,9 @@ export default {
|
|||||||
functionList: [
|
functionList: [
|
||||||
{label: '图元说明', value: 'GraphicEle'},
|
{label: '图元说明', value: 'GraphicEle'},
|
||||||
{label: '公共区域', value: 'PublicArea'},
|
{label: '公共区域', value: 'PublicArea'},
|
||||||
{label: '返回', value: 'GoBack'}
|
{label: '操作按钮', value: 'OperatingButton'},
|
||||||
|
{label: '返回', value: 'GoBack'},
|
||||||
|
{label: '至EPS系统及导向照明', value: 'GoEPS'}
|
||||||
],
|
],
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
|
37
src/views/iscs/iscsSystem/config/bas/lightingSystem.vue
Normal file
37
src/views/iscs/iscsSystem/config/bas/lightingSystem.vue
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div class="bigSystemBox">
|
||||||
|
<div class="title-name">{{ $route.query.stationName }}机电照明</div>
|
||||||
|
<div class="">
|
||||||
|
<iscsSystem ref="iscsPlate" :width-canvas="1220" :canvas-height="650" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import iscsSystem from '../canvas/iscsCanvas';
|
||||||
|
export default {
|
||||||
|
name: 'LightingSystem',
|
||||||
|
components: {
|
||||||
|
iscsSystem
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mes: '1111'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$refs.iscsPlate.show('24');
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.title-name{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26px;
|
||||||
|
margin-top: 30px;
|
||||||
|
color: #56E5DE;
|
||||||
|
}
|
||||||
|
</style>
|
@ -21,10 +21,10 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.iscs.selectedCount': function() {
|
'$store.state.iscs.selectedCount': function() {
|
||||||
const device = this.$store.state.iscs.selected;
|
const device = this.$store.state.iscs.selected;
|
||||||
if (device._type === 'IscsButton' && device.function === 'PublicArea') {
|
if (device && device._type === 'IscsButton' && device.function === 'PublicArea') {
|
||||||
this.width = 1520;
|
this.width = 1520;
|
||||||
this.$refs.iscsPlate.show('12');
|
this.$refs.iscsPlate.show('12');
|
||||||
} else if (device._type === 'IscsButton' && device.function === 'GoBack') {
|
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||||
this.width = 1100;
|
this.width = 1100;
|
||||||
this.$refs.iscsPlate.show('14');
|
this.$refs.iscsPlate.show('14');
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
<big-system v-else-if="mode==='bigSystem'" />
|
<big-system v-else-if="mode==='bigSystem'" />
|
||||||
<small-system v-else-if="mode==='smallSystem'" />
|
<small-system v-else-if="mode==='smallSystem'" />
|
||||||
<water-system v-else-if="mode==='waterSystem'" />
|
<water-system v-else-if="mode==='waterSystem'" />
|
||||||
|
<lighting-system v-else-if="mode === 'lighting'" />
|
||||||
<graphic-ele ref="graphicEle" />
|
<graphic-ele ref="graphicEle" />
|
||||||
<device-control ref="deviceControl" />
|
<device-control ref="deviceControl" />
|
||||||
</div>
|
</div>
|
||||||
@ -60,6 +61,7 @@ import Sensor from './bas/sensor';
|
|||||||
import BigSystem from './bas/bigSystem';
|
import BigSystem from './bas/bigSystem';
|
||||||
import SmallSystem from './bas/smallSystem';
|
import SmallSystem from './bas/smallSystem';
|
||||||
import waterSystem from './bas/waterSystem';
|
import waterSystem from './bas/waterSystem';
|
||||||
|
import LightingSystem from './bas/lightingSystem';
|
||||||
import GraphicEle from './graphicEle';
|
import GraphicEle from './graphicEle';
|
||||||
import DeviceControl from './deviceControl';
|
import DeviceControl from './deviceControl';
|
||||||
|
|
||||||
@ -93,7 +95,8 @@ export default {
|
|||||||
DeviceControl,
|
DeviceControl,
|
||||||
SmallSystem,
|
SmallSystem,
|
||||||
BigSystem,
|
BigSystem,
|
||||||
waterSystem
|
waterSystem,
|
||||||
|
LightingSystem
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -145,7 +145,7 @@ export default {
|
|||||||
y: this.selected.point.y + 10
|
y: this.selected.point.y + 10
|
||||||
};
|
};
|
||||||
const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1); // .toLowerCase()
|
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']);
|
this.copyModel.code = getUID(this.selected._type, this.iscs[type1 + 'List'] || []);
|
||||||
} break;
|
} break;
|
||||||
case 'Ctrl_V':
|
case 'Ctrl_V':
|
||||||
this.copyModel.code && this.createDataModel(this.copyModel);
|
this.copyModel.code && this.createDataModel(this.copyModel);
|
||||||
|
@ -84,7 +84,7 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
float:right;
|
float:right;
|
||||||
left:2%;
|
left:2%;
|
||||||
top:6%;
|
top:7%;
|
||||||
width: 20%;
|
width: 20%;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
// background-color: #FFFFFF;
|
// background-color: #FFFFFF;
|
||||||
|
154
src/views/jlmap3d/maintainer/component/devicelist.vue
Normal file
154
src/views/jlmap3d/maintainer/component/devicelist.vue
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<template>
|
||||||
|
<div class="editassets">
|
||||||
|
<div class="asset-list">
|
||||||
|
<!-- <el-tabs v-model="activeName"> -->
|
||||||
|
<div class="devicelisttop">
|
||||||
|
<p style="font-size:20px;color:#FFFFFF;">设备部件</p>
|
||||||
|
</div>
|
||||||
|
<div class="devicelistbottom">
|
||||||
|
<div class="displaylist " v-for="(part,index) in devicelist" @click="deviceselect(index,part)" v-show="true" >
|
||||||
|
<div >
|
||||||
|
<p style="border:1px solid #FFFFFF;">{{part.text}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- </el-tabs> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Jl3ddeviceList',
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
props: ['devicelist'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'train',
|
||||||
|
filterText: '',
|
||||||
|
defaultProps: {
|
||||||
|
children: 'children',
|
||||||
|
label: 'label'
|
||||||
|
},
|
||||||
|
devicetype:true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
filterText(val) {
|
||||||
|
this.$refs.tree2.filter(val);
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
deviceselect(index,train){
|
||||||
|
this.$emit('sdevice',train);
|
||||||
|
},
|
||||||
|
filterNode(value, data) {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.label.indexOf(value) !== -1;
|
||||||
|
},
|
||||||
|
init: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
back() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.editassets {
|
||||||
|
position: absolute;
|
||||||
|
float:right;
|
||||||
|
right:15px;
|
||||||
|
top:7%;
|
||||||
|
width: 20%;
|
||||||
|
height: 75%;
|
||||||
|
// background-color: #FFFFFF;
|
||||||
|
|
||||||
|
// border-radius:5px;
|
||||||
|
background-image:url("/static/texture/devicelistpane.png");
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
overflow: hidden;
|
||||||
|
background-size:90% 100%;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.asset-list{
|
||||||
|
// position:absolute;
|
||||||
|
|
||||||
|
width: 85%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.el-tabs{
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-scrollbar__wrap.default-scrollbar__wrap {
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.devicelisttop{
|
||||||
|
height:10%;
|
||||||
|
width:100%;
|
||||||
|
top:0;
|
||||||
|
}
|
||||||
|
.devicelistbottom{
|
||||||
|
height:85%;
|
||||||
|
width:100%;
|
||||||
|
top:10%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.displaylist {
|
||||||
|
float:left;
|
||||||
|
position: relative;
|
||||||
|
width:90px;
|
||||||
|
// height:20px;
|
||||||
|
font-size:19px;
|
||||||
|
color:#FFFFFF;
|
||||||
|
margin:0px 5px 0px 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.modelpic{
|
||||||
|
left:0;
|
||||||
|
position: absolute;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modeltop{
|
||||||
|
bottom:0;
|
||||||
|
z-index:0;
|
||||||
|
}
|
||||||
|
.modeldown{
|
||||||
|
top:0;
|
||||||
|
z-index:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
96
src/views/jlmap3d/maintainer/component/devicemsg.vue
Normal file
96
src/views/jlmap3d/maintainer/component/devicemsg.vue
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<template>
|
||||||
|
<div class="devicemsg" v-show="msgshow">
|
||||||
|
<div class="msgtop">
|
||||||
|
{{devicename}}
|
||||||
|
</div>
|
||||||
|
<div class="msgdown">
|
||||||
|
{{devicemsg}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Jl3ddeviceMsg',
|
||||||
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
msgshow:false,
|
||||||
|
devicename:"",
|
||||||
|
devicemsg:"",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
updatemsg(name,text) {
|
||||||
|
// console.log(name);
|
||||||
|
// console.log(text);
|
||||||
|
if(name){
|
||||||
|
this.msgshow = true;
|
||||||
|
this.devicename = name;
|
||||||
|
this.devicemsg = text;
|
||||||
|
}else{
|
||||||
|
this.msgshow = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
window.updatemsg = this.updatemsg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
|
||||||
|
.devicemsg{
|
||||||
|
position: absolute;
|
||||||
|
float:left;
|
||||||
|
left:23%;
|
||||||
|
top:7%;
|
||||||
|
width: 20%;
|
||||||
|
height: 50%;
|
||||||
|
z-index: 10;
|
||||||
|
background-image:url("/static/texture/devicemsgpane.png");
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
background-size: 90% 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.msgtop{
|
||||||
|
text-align: center;
|
||||||
|
width: 80%;
|
||||||
|
height:10%;
|
||||||
|
float: left;
|
||||||
|
position: absolute;
|
||||||
|
top:10%;
|
||||||
|
font-size:20px;
|
||||||
|
color:#FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.msgdown{
|
||||||
|
position: absolute;
|
||||||
|
top:20%;
|
||||||
|
left:5%;
|
||||||
|
width: 80%;
|
||||||
|
height:75%;
|
||||||
|
float: left;
|
||||||
|
font-size:19px;
|
||||||
|
color:#FFFFFF;
|
||||||
|
word-wrap:break-word;
|
||||||
|
letter-spacing:2px;
|
||||||
|
overflow-y:scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
@ -11,12 +11,28 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
<div id="jl3ddevicerepir" class="repirbutton" @click="devicerepir"></div>
|
<div id="jl3ddevicerepir" class="repirbutton" @click="devicerepir"></div>
|
||||||
<div id="jl3dclose" class="backbutton" @click="close3ddeviceview"></div>
|
<div id="jl3dclose" class="backbutton" @click="close3ddeviceview"></div>
|
||||||
|
<Jl3ddevice-Msg v-show="isswitch">
|
||||||
|
</Jl3ddevice-Msg>
|
||||||
|
<Jl3ddevice-List v-show="isswitch" :devicelist="equiplist" @sdevice="sdevice">
|
||||||
|
</Jl3ddevice-List>
|
||||||
|
<canvas id="canvastexture" />
|
||||||
|
<div class="jl3dcontrolpane" v-show="isswitch">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button type="primary" @click="initdevice">初始化</el-button>
|
||||||
|
<el-button type="primary" @click="alldisper">{{disperreset}}</el-button>
|
||||||
|
<el-button type="primary" @click="dispersed">{{devicestats}}</el-button>
|
||||||
|
<el-button type="primary" @click="switchhide">{{switchshow}}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { Jl3dfaultdevice } from '@/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js';
|
import { Jl3dfaultdevice } from '@/jlmap3d/jl3dmaintainer/Jl3dfaultdevice.js';
|
||||||
|
|
||||||
|
import Jl3ddeviceMsg from '@/views/jlmap3d/maintainer/component/devicemsg';
|
||||||
|
import Jl3ddeviceList from '@/views/jlmap3d/maintainer/component/devicelist';
|
||||||
|
|
||||||
import { sendCommandNew } from '@/api/jmap/training';
|
import { sendCommandNew } from '@/api/jmap/training';
|
||||||
import Command from '@/scripts/cmdPlugin/Command';
|
import Command from '@/scripts/cmdPlugin/Command';
|
||||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
@ -24,6 +40,9 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'FaultDevice',
|
name: 'FaultDevice',
|
||||||
components: {
|
components: {
|
||||||
|
//设备详细信息暂时
|
||||||
|
Jl3ddeviceMsg,
|
||||||
|
Jl3ddeviceList
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -31,13 +50,15 @@
|
|||||||
jl3d: null,
|
jl3d: null,
|
||||||
psdlist:this.$store.state.map.map.psdList,
|
psdlist:this.$store.state.map.map.psdList,
|
||||||
windowstatus:false,
|
windowstatus:false,
|
||||||
devicelist:[],
|
nowdevice:null,
|
||||||
|
|
||||||
|
//设备详细信息暂时
|
||||||
|
equiplist:[],
|
||||||
|
switchstatus:true,
|
||||||
|
isswitch:false,
|
||||||
devicestats:"分步拆解",
|
devicestats:"分步拆解",
|
||||||
disperreset:"整体拆解",
|
disperreset:"整体拆解",
|
||||||
switchshow:"隐藏轨道",
|
switchshow:"隐藏轨道",
|
||||||
switchstatus:true,
|
|
||||||
isswitch:false,
|
|
||||||
nowdevice:null,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -194,6 +215,42 @@
|
|||||||
back(){
|
back(){
|
||||||
this.jl3d.resetmodel();
|
this.jl3d.resetmodel();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//设备详细信息暂时
|
||||||
|
sdevice(changedata) {
|
||||||
|
this.jl3d.updateselect(changedata);
|
||||||
|
},
|
||||||
|
dispersed(){
|
||||||
|
this.jl3d.disperdevice1();
|
||||||
|
},
|
||||||
|
alldisper(){
|
||||||
|
this.jl3d.disperdevice2();
|
||||||
|
},
|
||||||
|
initdevice(){
|
||||||
|
this.jl3d.resetmodel();
|
||||||
|
},
|
||||||
|
switchhide(){
|
||||||
|
if(this.switchstatus){
|
||||||
|
this.switchstatus = false;
|
||||||
|
this.switchshow = "显示轨道";
|
||||||
|
this.jl3d.hideswitch(this.switchstatus);
|
||||||
|
}else{
|
||||||
|
this.switchstatus = true;
|
||||||
|
this.switchshow = "隐藏轨道";
|
||||||
|
this.jl3d.hideswitch(this.switchstatus);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updatemenulist(equiplist) {
|
||||||
|
if(equiplist){
|
||||||
|
this.equiplist = equiplist;
|
||||||
|
this.isswitch = true;
|
||||||
|
}else{
|
||||||
|
this.equiplist = [];
|
||||||
|
this.isswitch = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -251,7 +308,8 @@
|
|||||||
.jl3dcontrolpane{
|
.jl3dcontrolpane{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top:0;
|
top:0;
|
||||||
left:0;
|
right:85px;
|
||||||
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -48,9 +51,11 @@
|
|||||||
// import { UrlConfig } from '@/router/index';
|
// import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
import { JLmap3dMaintainer } from '@/jlmap3d/jl3dmaintainer/jlmap3dmaintainer.js';
|
import { JLmap3dMaintainer } from '@/jlmap3d/jl3dmaintainer/jlmap3dmaintainer.js';
|
||||||
|
|
||||||
import DevicefaultList from '@/views/jlmap3d/maintainer/component/devicefaultlist';
|
import DevicefaultList from '@/views/jlmap3d/maintainer/component/devicefaultlist';
|
||||||
import FaultDevice from '@/views/jlmap3d/maintainer/component/faultdevice';
|
import FaultDevice from '@/views/jlmap3d/maintainer/component/faultdevice';
|
||||||
|
|
||||||
|
|
||||||
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
|
||||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
||||||
|
|
||||||
@ -61,7 +66,8 @@ export default {
|
|||||||
name: 'Jl3dMaintainer',
|
name: 'Jl3dMaintainer',
|
||||||
components: {
|
components: {
|
||||||
DevicefaultList,
|
DevicefaultList,
|
||||||
FaultDevice
|
FaultDevice,
|
||||||
|
|
||||||
// Jlmap3dMsg
|
// Jlmap3dMsg
|
||||||
// ShowProperty
|
// ShowProperty
|
||||||
},
|
},
|
||||||
@ -84,6 +90,7 @@ export default {
|
|||||||
deviceShow:true,
|
deviceShow:true,
|
||||||
msgshow:false,
|
msgshow:false,
|
||||||
controlmsg:"",
|
controlmsg:"",
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -204,7 +211,8 @@ export default {
|
|||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
this.$emit('back');
|
this.$emit('back');
|
||||||
}
|
this.isswitch = false;
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -296,4 +304,6 @@ export default {
|
|||||||
left: 0;
|
left: 0;
|
||||||
z-index: -12;
|
z-index: -12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -3,11 +3,25 @@
|
|||||||
<div id="jl3d" class="jl3ddraw">
|
<div id="jl3d" class="jl3ddraw">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="menutop">
|
<div class = "station">
|
||||||
|
<div style="margin-top:5%;font-size: 30px;">当前车站:</div>
|
||||||
|
<el-select class="listmenu" v-model="value" placeholder="当前车站" >
|
||||||
|
<el-option
|
||||||
|
v-for="item in stationlist"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.name"
|
||||||
|
:disabled="item.disabled"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="menutop">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="switchrender">{{rendermode}}</el-button>
|
<el-button type="primary" @click="switchrender">{{rendermode}}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="menudown">
|
<div class="menudown">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="back">退出</el-button>
|
<el-button type="primary" @click="back">退出</el-button>
|
||||||
@ -30,7 +44,9 @@ export default {
|
|||||||
return {
|
return {
|
||||||
jl3d: null,
|
jl3d: null,
|
||||||
rendermode:'监控视角',
|
rendermode:'监控视角',
|
||||||
renderswitch:false
|
renderswitch:false,
|
||||||
|
stationlist:[],
|
||||||
|
value:"",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -46,6 +62,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
|
window.updatestationlist = this.updatestationlist;
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -54,7 +71,7 @@ export default {
|
|||||||
init: function () {
|
init: function () {
|
||||||
// let mapdata = this.$store.state.socket.device;
|
// let mapdata = this.$store.state.socket.device;
|
||||||
const dom = document.getElementById('jl3d');
|
const dom = document.getElementById('jl3d');
|
||||||
this.jl3d = new Jl3dpassflow(dom,this.$route.query.mapid);
|
this.jl3d = new Jl3dpassflow(dom,this.$route.query.mapid,this.$route.query.group);
|
||||||
},
|
},
|
||||||
switchrender() {
|
switchrender() {
|
||||||
if (this.renderswitch == true) {
|
if (this.renderswitch == true) {
|
||||||
@ -67,9 +84,14 @@ export default {
|
|||||||
this.jl3d.switchrender(this.renderswitch);
|
this.jl3d.switchrender(this.renderswitch);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
updatestationlist(list){
|
||||||
|
console.log(list);
|
||||||
|
this.value = list[0].name
|
||||||
|
this.stationlist = list;
|
||||||
|
},
|
||||||
back() {
|
back() {
|
||||||
window.close();
|
window.close();
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -91,6 +113,22 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
.station{
|
||||||
|
width:250px;
|
||||||
|
height:100px;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
text-align: center;
|
||||||
|
/* right:500px; */
|
||||||
|
/* bottom:0; */
|
||||||
|
position: absolute;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-image: url('/static/texture/scene.png');
|
||||||
|
border-radius:10px;
|
||||||
|
}
|
||||||
|
.listmenu{
|
||||||
|
top:50%;
|
||||||
|
}
|
||||||
.menutop{
|
.menutop{
|
||||||
top:0;
|
top:0;
|
||||||
right:0;
|
right:0;
|
||||||
|
@ -627,6 +627,7 @@ export default {
|
|||||||
path:'/jlmap3d/passengerflow',
|
path:'/jlmap3d/passengerflow',
|
||||||
query:{
|
query:{
|
||||||
mapid:this.mapId,
|
mapid:this.mapId,
|
||||||
|
group:this.group,
|
||||||
project: this.project
|
project: this.project
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -27,9 +27,9 @@ export default {
|
|||||||
expression:''
|
expression:''
|
||||||
},
|
},
|
||||||
expressionList:[
|
expressionList:[
|
||||||
{label:'等于',value:'eq'},
|
{label:'等于', value:'eq'},
|
||||||
{label:'不等于', value:'neq'},
|
{label:'不等于', value:'neq'}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -38,7 +38,7 @@ export default {
|
|||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'name', label: '参数名', type: 'text' },
|
{ prop: 'name', label: '参数名', type: 'text' },
|
||||||
{ prop: 'expression', label:'操作符', type: 'select',options:this.expressionList},
|
{ prop: 'expression', label:'操作符', type: 'select', options:this.expressionList},
|
||||||
{ prop: 'value', label: '参数值', type: 'text' }
|
{ prop: 'value', label: '参数值', type: 'text' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -90,7 +90,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
name: this.formModel.name,
|
name: this.formModel.name,
|
||||||
value: this.formModel.value,
|
value: this.formModel.value,
|
||||||
expression:this.formModel.expression,
|
expression:this.formModel.expression
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCommandList, delCommand } from '@/api/management/dictionary';
|
import { createCommand, getCommandList, delCommand } from '@/api/management/dictionary';
|
||||||
import { getLineCodeList } from '@/api/management/mapline';
|
import { getLineCodeList } from '@/api/management/mapline';
|
||||||
import CommandEnum from '@/scripts/cmdPlugin/CommandEnum';
|
import CommandEnum from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import ShowCondition from './showCondition';
|
import ShowCondition from './showCondition';
|
||||||
@ -105,6 +105,10 @@ export default {
|
|||||||
name: this.$t('global.edit'),
|
name: this.$t('global.edit'),
|
||||||
handleClick: this.handleEdit
|
handleClick: this.handleEdit
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '复制',
|
||||||
|
handleClick: this.handleCopy
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('global.delete'),
|
name: this.$t('global.delete'),
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
@ -187,6 +191,21 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleCopy(index, row) { // 复制指令
|
||||||
|
this.$confirm('您是否确认复制该指令?', this.$t('global.tips'), {
|
||||||
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
const param = row;
|
||||||
|
createCommand(param).then(response => {
|
||||||
|
this.$message.success('复制指令成功!');
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
this.$message.error('复制指令失败!');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
}
|
}
|
||||||
|
BIN
static/texture/scene.png
Normal file
BIN
static/texture/scene.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
Loading…
Reference in New Issue
Block a user