Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
0fa4d4c204
BIN
src/assets/ibp_images/rotate_black.png
Normal file
BIN
src/assets/ibp_images/rotate_black.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
src/assets/ibp_images/rotate_red.png
Normal file
BIN
src/assets/ibp_images/rotate_red.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
@ -54,6 +54,7 @@ export default {
|
|||||||
trainWindow: 'train window',
|
trainWindow: 'train window',
|
||||||
line: 'line',
|
line: 'line',
|
||||||
text: 'text',
|
text: 'text',
|
||||||
|
button: 'button',
|
||||||
|
|
||||||
mapName: 'Name of the map:',
|
mapName: 'Name of the map:',
|
||||||
skinName: 'Skin style:',
|
skinName: 'Skin style:',
|
||||||
@ -189,6 +190,8 @@ export default {
|
|||||||
linkLp: 'Link Start point coordinates:',
|
linkLp: 'Link Start point coordinates:',
|
||||||
linkRp: 'Link End point coordinates:',
|
linkRp: 'Link End point coordinates:',
|
||||||
|
|
||||||
|
linePoint: 'point:',
|
||||||
|
|
||||||
rulesChange: 'The rules change',
|
rulesChange: 'The rules change',
|
||||||
splitMerge: 'Split/merge',
|
splitMerge: 'Split/merge',
|
||||||
linkSet: 'The Link set',
|
linkSet: 'The Link set',
|
||||||
|
@ -48,6 +48,7 @@ export default {
|
|||||||
zcZoneControl: 'zc区域控制',
|
zcZoneControl: 'zc区域控制',
|
||||||
temporaryLimit: '全线临时限速',
|
temporaryLimit: '全线临时限速',
|
||||||
lcControl: 'Lc控制',
|
lcControl: 'Lc控制',
|
||||||
|
buttonControl: '按钮',
|
||||||
image: '图片',
|
image: '图片',
|
||||||
station: '车站',
|
station: '车站',
|
||||||
controlMode: '控制模式',
|
controlMode: '控制模式',
|
||||||
@ -58,6 +59,7 @@ export default {
|
|||||||
trainWindow: '车次窗',
|
trainWindow: '车次窗',
|
||||||
line: '线条',
|
line: '线条',
|
||||||
text: '文字',
|
text: '文字',
|
||||||
|
button: '按钮',
|
||||||
|
|
||||||
mapName: '地图名称:',
|
mapName: '地图名称:',
|
||||||
skinName: '皮肤:',
|
skinName: '皮肤:',
|
||||||
@ -76,6 +78,7 @@ export default {
|
|||||||
lineCoding: '线条编码:',
|
lineCoding: '线条编码:',
|
||||||
lineType: '线条类型:',
|
lineType: '线条类型:',
|
||||||
lineWidth: '线条宽度:',
|
lineWidth: '线条宽度:',
|
||||||
|
linePoint: '坐标:',
|
||||||
segmentCoordinates: '区段显示坐标:',
|
segmentCoordinates: '区段显示坐标:',
|
||||||
|
|
||||||
publishMapCreation: '从发布地图创建',
|
publishMapCreation: '从发布地图创建',
|
||||||
@ -133,6 +136,8 @@ export default {
|
|||||||
failedCreateSignal: '创建自动信号失败',
|
failedCreateSignal: '创建自动信号失败',
|
||||||
automaticSignalUpdateSucceeded: '更新自动信号成功!',
|
automaticSignalUpdateSucceeded: '更新自动信号成功!',
|
||||||
automaticSignalUpdateFailed: '更新自动信号失败',
|
automaticSignalUpdateFailed: '更新自动信号失败',
|
||||||
|
interconnected: '联锁控名称',
|
||||||
|
buttonType: '所属类型',
|
||||||
|
|
||||||
stationName: '车站名称:',
|
stationName: '车站名称:',
|
||||||
|
|
||||||
@ -341,6 +346,7 @@ export default {
|
|||||||
delayUnlockPosition: '延迟解锁坐标:',
|
delayUnlockPosition: '延迟解锁坐标:',
|
||||||
trainWindowPoints: '车次窗坐标:',
|
trainWindowPoints: '车次窗坐标:',
|
||||||
textPoints: '坐标:',
|
textPoints: '坐标:',
|
||||||
|
buttonText: '内容',
|
||||||
|
|
||||||
textCode: '文字编码:',
|
textCode: '文字编码:',
|
||||||
textContent: '文本内容:',
|
textContent: '文本内容:',
|
||||||
|
@ -252,6 +252,9 @@ export default {
|
|||||||
|
|
||||||
enterScale: '请输入缩放比例',
|
enterScale: '请输入缩放比例',
|
||||||
enterXOffset: '请输入X偏移',
|
enterXOffset: '请输入X偏移',
|
||||||
enterYOffset: '请输入Y偏移'
|
enterYOffset: '请输入Y偏移',
|
||||||
|
|
||||||
|
pleaseSelectButtonType: '请选择按钮类型',
|
||||||
|
pleaseSelectButtonContent: '请输入内容'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
68
src/ibp/shape/rotateTip.js
Normal file
68
src/ibp/shape/rotateTip.js
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Image from 'zrender/src/graphic/Image';
|
||||||
|
import rotateBlack from '@/assets/ibp_images/rotate_black.png';
|
||||||
|
import rotateRed from '@/assets/ibp_images/rotate_red.png';
|
||||||
|
|
||||||
|
export default class rotateTip extends Group {
|
||||||
|
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.model = device.model;
|
||||||
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
this.imageBg = new Image({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
draggable: model.draggable || false,
|
||||||
|
style: {
|
||||||
|
image: this.getRotateColor(),
|
||||||
|
x: model.point.x,
|
||||||
|
y: model.point.y,
|
||||||
|
width: 70,
|
||||||
|
height: 74
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.add(this.imageBg);
|
||||||
|
}
|
||||||
|
|
||||||
|
getRotateColor() {
|
||||||
|
if (this.model.color) {
|
||||||
|
switch (this.model.color) {
|
||||||
|
case 'black': {
|
||||||
|
return rotateBlack;
|
||||||
|
}
|
||||||
|
case 'red': {
|
||||||
|
return rotateRed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return rotateBlack;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setDraggable() {
|
||||||
|
this.arrow.attr('draggable', true);
|
||||||
|
this.createMouseEvent();
|
||||||
|
}
|
||||||
|
createMouseEvent() {
|
||||||
|
this.on('mousedown', this.mousedown, this);
|
||||||
|
this.on('mousemove', this.mousemove, this);
|
||||||
|
this.on('mouseup', this.mouseup, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
mousedown(e) {
|
||||||
|
this.event.disable();
|
||||||
|
}
|
||||||
|
|
||||||
|
mousemove(e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
mouseup(e) {
|
||||||
|
this.event.enable();
|
||||||
|
this.model.point.x = this.model.point.x + e.offsetX;
|
||||||
|
this.model.point.y = this.model.point.y + e.offsetY;
|
||||||
|
}
|
||||||
|
}
|
@ -272,7 +272,7 @@ class SkinCode extends defaultStyle {
|
|||||||
emergencyControlShow: true, // 紧急站控显示
|
emergencyControlShow: true, // 紧急站控显示
|
||||||
centerControlShow: true, // 中控显示
|
centerControlShow: true, // 中控显示
|
||||||
substationControlShow: true, // 站控按钮显示
|
substationControlShow: true, // 站控按钮显示
|
||||||
turnedAroundControlShow: false // 按图折返显示
|
interconnectedControlShow: false // 联锁控显示
|
||||||
},
|
},
|
||||||
arrow: {
|
arrow: {
|
||||||
show: false // 控制模式箭头显隐
|
show: false // 控制模式箭头显隐
|
||||||
|
@ -276,7 +276,7 @@ class SkinCode extends defaultStyle {
|
|||||||
emergencyControlShow: true, // 紧急站控显示
|
emergencyControlShow: true, // 紧急站控显示
|
||||||
centerControlShow: true, // 中控显示
|
centerControlShow: true, // 中控显示
|
||||||
substationControlShow: true, // 站控按钮显示
|
substationControlShow: true, // 站控按钮显示
|
||||||
turnedAroundControlShow: true // 按图折返显示
|
interconnectedControlShow: true // 联锁控显示
|
||||||
},
|
},
|
||||||
arrow: {
|
arrow: {
|
||||||
show: false // 控制模式箭头显隐
|
show: false // 控制模式箭头显隐
|
||||||
@ -374,6 +374,18 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this[deviceType.ButtonControl] = {
|
||||||
|
text: {
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
distance: 5 // 灯跟文字距离
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
radiusR: 6, // 控制灯大小
|
||||||
|
controlColor: '#FFFF00' // 控制灯颜色
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this[deviceType.Line] = {
|
this[deviceType.Line] = {
|
||||||
lineColor: '#FFFFFF' // 线条颜色
|
lineColor: '#FFFFFF' // 线条颜色
|
||||||
};
|
};
|
||||||
|
@ -273,7 +273,7 @@ class SkinCode extends defaultStyle {
|
|||||||
emergencyControlShow: true, // 紧急站控显示
|
emergencyControlShow: true, // 紧急站控显示
|
||||||
centerControlShow: true, // 中控显示
|
centerControlShow: true, // 中控显示
|
||||||
substationControlShow: true, // 站控按钮显示
|
substationControlShow: true, // 站控按钮显示
|
||||||
turnedAroundControlShow: false // 按图折返显示
|
interconnectedControlShow: false // 联锁控显示
|
||||||
},
|
},
|
||||||
arrow: {
|
arrow: {
|
||||||
show: false // 控制模式箭头显隐
|
show: false // 控制模式箭头显隐
|
||||||
|
@ -255,7 +255,7 @@ class SkinCode extends defaultStyle {
|
|||||||
emergencyControlShow: false, // 紧急站控显示
|
emergencyControlShow: false, // 紧急站控显示
|
||||||
centerControlShow: true, // 中控显示
|
centerControlShow: true, // 中控显示
|
||||||
substationControlShow: true, // 站控按钮显示
|
substationControlShow: true, // 站控按钮显示
|
||||||
turnedAroundControlShow: false // 按图折返显示
|
interconnectedControlShow: false // 联锁控显示
|
||||||
},
|
},
|
||||||
arrow: {
|
arrow: {
|
||||||
show: true // 控制模式箭头显隐
|
show: true // 控制模式箭头显隐
|
||||||
|
@ -11,6 +11,7 @@ const deviceType = {
|
|||||||
StationStand: 'StationStand',
|
StationStand: 'StationStand',
|
||||||
StationControl: 'StationControl',
|
StationControl: 'StationControl',
|
||||||
StationCounter: 'StationCounter',
|
StationCounter: 'StationCounter',
|
||||||
|
ButtonControl: 'ButtonControl',
|
||||||
StationDelayUnlock: 'StationDelayUnlock',
|
StationDelayUnlock: 'StationDelayUnlock',
|
||||||
Train: 'Train',
|
Train: 'Train',
|
||||||
TrainWindow: 'TrainWindow',
|
TrainWindow: 'TrainWindow',
|
||||||
|
@ -292,6 +292,7 @@ class Jlmap {
|
|||||||
case deviceType.ZcControl: prop = 'zcControlList'; break;
|
case deviceType.ZcControl: prop = 'zcControlList'; break;
|
||||||
case deviceType.StationDelayUnlock: prop = 'stationDelayUnlockList'; break;
|
case deviceType.StationDelayUnlock: prop = 'stationDelayUnlockList'; break;
|
||||||
case deviceType.LcControl: prop = 'lcControlList'; break;
|
case deviceType.LcControl: prop = 'lcControlList'; break;
|
||||||
|
case deviceType.ButtonControl: prop = 'buttonList'; break;
|
||||||
case deviceType.LimitControl: prop = 'tempSpeedLimitList'; break;
|
case deviceType.LimitControl: prop = 'tempSpeedLimitList'; break;
|
||||||
case deviceType.ImageControl: prop = 'imageControl'; break;
|
case deviceType.ImageControl: prop = 'imageControl'; break;
|
||||||
case deviceType.Train: prop = 'trainList'; break;
|
case deviceType.Train: prop = 'trainList'; break;
|
||||||
|
67
src/jmap/shape/ButtonControl/index.js
Normal file
67
src/jmap/shape/ButtonControl/index.js
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
* lC区域控制模式
|
||||||
|
*/
|
||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import EControl from '../element/EControl';
|
||||||
|
|
||||||
|
export default class ButtonControl extends Group {
|
||||||
|
constructor(model, style) {
|
||||||
|
super();
|
||||||
|
this.z = 20;
|
||||||
|
this._code = model.code;
|
||||||
|
this._type = model._type;
|
||||||
|
this.zlevel = 10;
|
||||||
|
this.model = model;
|
||||||
|
this.style = style;
|
||||||
|
this.create();
|
||||||
|
this.setState(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
this.control = new EControl({
|
||||||
|
zlevel: this.zlevel,
|
||||||
|
z: this.z,
|
||||||
|
arc: {
|
||||||
|
shape: {
|
||||||
|
cx: model.position.x,
|
||||||
|
cy: model.position.y,
|
||||||
|
r: this.style.ButtonControl.lamp.radiusR
|
||||||
|
},
|
||||||
|
lineWidth: 0,
|
||||||
|
fill: this.style.ButtonControl.lamp.controlColor
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
position: [0, 0],
|
||||||
|
x: model.position.x,
|
||||||
|
y: model.position.y + this.style.ButtonControl.lamp.radiusR + this.style.ButtonControl.text.distance,
|
||||||
|
fontWeight: this.style.ButtonControl.text.fontWeight,
|
||||||
|
fontSize: this.style.ButtonControl.text.fontSize,
|
||||||
|
fontFamily: this.style.fontFamily,
|
||||||
|
text: model.text || '按图折返',
|
||||||
|
textFill: '#fff',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
},
|
||||||
|
style: this.style
|
||||||
|
});
|
||||||
|
|
||||||
|
this.add(this.control);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置状态
|
||||||
|
setState(model) {
|
||||||
|
}
|
||||||
|
|
||||||
|
getShapeTipPoint() {
|
||||||
|
if (this.control) {
|
||||||
|
var distance = 2;
|
||||||
|
var rect = this.control.getBoundingRect();
|
||||||
|
return {
|
||||||
|
x: rect.x + rect.width / 2,
|
||||||
|
y: rect.y - distance
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -73,10 +73,10 @@ export default class StationControl extends Group {
|
|||||||
});
|
});
|
||||||
this.add(this.substationControl);
|
this.add(this.substationControl);
|
||||||
}
|
}
|
||||||
// 按图折返
|
// 联锁控
|
||||||
if (this.style.StationControl.lamp.turnedAroundControlShow) {
|
if (this.style.StationControl.lamp.interconnectedControlShow) {
|
||||||
this.turnedAroundControl = new ESingleControl({
|
this.interconnectedControl = new ESingleControl({
|
||||||
_subType: 'turnedAround',
|
_subType: 'interconnected',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
@ -84,10 +84,10 @@ export default class StationControl extends Group {
|
|||||||
x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
||||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
y: model.position.y + this.style.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: '按图折返',
|
context: model.lskContent || '联锁控',
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.turnedAroundControl);
|
this.add(this.interconnectedControl);
|
||||||
}
|
}
|
||||||
// 箭头
|
// 箭头
|
||||||
if (this.style.StationControl.arrow.show) {
|
if (this.style.StationControl.arrow.show) {
|
||||||
|
@ -9,6 +9,7 @@ import LcControl from './LcControl/index.js';
|
|||||||
import LimitControl from './LimitControl/index.js';
|
import LimitControl from './LimitControl/index.js';
|
||||||
import Switch from './Switch/index.js';
|
import Switch from './Switch/index.js';
|
||||||
import ZcControl from './ZcControl/index.js';
|
import ZcControl from './ZcControl/index.js';
|
||||||
|
import ButtonControl from './ButtonControl/index.js';
|
||||||
import StationCounter from './StationCounter/index.js';
|
import StationCounter from './StationCounter/index.js';
|
||||||
import StationDelayUnlock from './StationDelayUnlock/index.js';
|
import StationDelayUnlock from './StationDelayUnlock/index.js';
|
||||||
import StationStand from './StationStand/index.js';
|
import StationStand from './StationStand/index.js';
|
||||||
@ -29,6 +30,7 @@ mapShape[deviceType.LcControl] = LcControl;
|
|||||||
mapShape[deviceType.LimitControl] = LimitControl;
|
mapShape[deviceType.LimitControl] = LimitControl;
|
||||||
mapShape[deviceType.Switch] = Switch;
|
mapShape[deviceType.Switch] = Switch;
|
||||||
mapShape[deviceType.ZcControl] = ZcControl;
|
mapShape[deviceType.ZcControl] = ZcControl;
|
||||||
|
mapShape[deviceType.ButtonControl] = ButtonControl;
|
||||||
mapShape[deviceType.StationCounter] = StationCounter;
|
mapShape[deviceType.StationCounter] = StationCounter;
|
||||||
mapShape[deviceType.StationDelayUnlock] = StationDelayUnlock;
|
mapShape[deviceType.StationDelayUnlock] = StationDelayUnlock;
|
||||||
mapShape[deviceType.StationStand] = StationStand;
|
mapShape[deviceType.StationStand] = StationStand;
|
||||||
|
@ -86,6 +86,10 @@ export function parser(data, skinCode) {
|
|||||||
mapDevice[elem.code] = createDevice(deviceType.ZcControl, elem, propConvert);
|
mapDevice[elem.code] = createDevice(deviceType.ZcControl, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
zrUtil.each(data.buttonList || [], elem => {
|
||||||
|
mapDevice[elem.code] = createDevice(deviceType.ButtonControl, elem, propConvert);
|
||||||
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.lcList || [], elem => {
|
zrUtil.each(data.lcList || [], elem => {
|
||||||
mapDevice[elem.code] = createDevice(deviceType.LcControl, elem, propConvert);
|
mapDevice[elem.code] = createDevice(deviceType.LcControl, elem, propConvert);
|
||||||
}, this);
|
}, this);
|
||||||
|
@ -248,6 +248,13 @@ const map = {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
buttonList: (state) => {
|
||||||
|
if (state.map) {
|
||||||
|
return state.map.buttonList;
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
},
|
||||||
signalList: (state) => {
|
signalList: (state) => {
|
||||||
if (state.map) {
|
if (state.map) {
|
||||||
return state.map.signalList;
|
return state.map.signalList;
|
||||||
|
@ -3,8 +3,8 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.9.255:9000'; // 袁琪
|
BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.4:9000' // 琰培
|
// BASE_API = 'http://192.168.3.4:9000' // 琰培
|
||||||
} else {
|
} else {
|
||||||
|
@ -38,6 +38,15 @@
|
|||||||
@setCenter="setCenter"
|
@setCenter="setCenter"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="路径单元" name="path">
|
||||||
|
<path-operate
|
||||||
|
ref="pathOperate"
|
||||||
|
:card-height="cardHeight+25"
|
||||||
|
:map-info="mapInfo"
|
||||||
|
:selected="selected"
|
||||||
|
@setCenter="setCenter"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="交路" name="routing">
|
<el-tab-pane label="交路" name="routing">
|
||||||
<routing-operate
|
<routing-operate
|
||||||
ref="routingOperate"
|
ref="routingOperate"
|
||||||
@ -65,15 +74,6 @@
|
|||||||
@setCenter="setCenter"
|
@setCenter="setCenter"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="路径单元" name="path">
|
|
||||||
<path-operate
|
|
||||||
ref="pathOperate"
|
|
||||||
:card-height="cardHeight+25"
|
|
||||||
:map-info="mapInfo"
|
|
||||||
:selected="selected"
|
|
||||||
@setCenter="setCenter"
|
|
||||||
/>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
style="width: 95%; margin: 0 auto"
|
style="width: 95%; margin: 0 auto"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" />
|
<el-table-column type="index" />
|
||||||
<el-table-column prop="routeCode" label="进路ID" />
|
<el-table-column prop="routeCode" label="进路code" />
|
||||||
<el-table-column prop="routeName" label="进路名称" />
|
<el-table-column prop="routeName" label="进路名称" />
|
||||||
<el-table-column fixed="right" :label="$t('map.operation')" width="50">
|
<el-table-column fixed="right" :label="$t('map.operation')" width="50">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -235,10 +235,8 @@ export default {
|
|||||||
data.forEach((element, index) => {
|
data.forEach((element, index) => {
|
||||||
this.addModel.mapRouteUnitRelList.push({
|
this.addModel.mapRouteUnitRelList.push({
|
||||||
routeCode: element.code,
|
routeCode: element.code,
|
||||||
routeName: element.name,
|
routeName: element.name
|
||||||
mapId: this.mapInfo.id,
|
// routeUnitCode: this.addModel.code
|
||||||
id: element.id,
|
|
||||||
routeUnitCode: this.addModel.code
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -274,15 +272,13 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
[
|
|
||||||
addRouteUnit(this.buildModel()).then(response => {
|
addRouteUnit(this.buildModel()).then(response => {
|
||||||
this.$message.success(this.$t('tip.createSuccess'));
|
this.$message.success(this.$t('tip.createSuccess'));
|
||||||
this.clear();
|
this.clear();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.operationAbnormal'));
|
this.$messageBox(this.$t('tip.operationAbnormal'));
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
});
|
||||||
];
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clear() {
|
clear() {
|
||||||
|
@ -515,8 +515,10 @@ export default {
|
|||||||
const model = Object.assign({}, this.addModel);
|
const model = Object.assign({}, this.addModel);
|
||||||
model['mapId'] = this.mapInfo.id;
|
model['mapId'] = this.mapInfo.id;
|
||||||
model['routeSectionList'] = this.addModel.routeSectionList.map(elem => { return { sectionCode: elem }; });
|
model['routeSectionList'] = this.addModel.routeSectionList.map(elem => { return { sectionCode: elem }; });
|
||||||
model['routeTriggerSectionList'] = this.addModel.routeTriggerSectionList.map(elem => { return { mapId: this.mapInfo.id, routeCode: model.code, sectionCode: elem }; });
|
// mapId: this.mapInfo.id, routeCode: model.code,
|
||||||
model['routeOverlapSectionList'] = this.addModel.routeOverlapSectionList.map(elem => { return { mapId: this.mapInfo.id, routeCode: model.code, sectionCode: elem }; });
|
model['routeTriggerSectionList'] = this.addModel.routeTriggerSectionList.map(elem => { return { sectionCode: elem }; });
|
||||||
|
// mapId: this.mapInfo.id, routeCode: model.code,
|
||||||
|
model['routeOverlapSectionList'] = this.addModel.routeOverlapSectionList.map(elem => { return { sectionCode: elem }; });
|
||||||
model['routeStandList'] = this.addModel.routeStandList.map(elem => { return { stationStandCode: elem }; });
|
model['routeStandList'] = this.addModel.routeStandList.map(elem => { return { stationStandCode: elem }; });
|
||||||
if (code) { model['code'] = code; }
|
if (code) { model['code'] = code; }
|
||||||
|
|
||||||
|
@ -120,8 +120,8 @@ export default {
|
|||||||
draw: {
|
draw: {
|
||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
{ prop: 'code', label: `${this.$t('map.image')}${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.resourceList, change: true, deviceChange: this.deviceChange },
|
{ prop: 'code', label: `${this.$t('map.image')}${this.$t('map.code')}`, type: 'select', optionLabel: 'code', optionValue: 'code', options: this.resourceList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'name', label: this.$t('map.imageName'), type: 'input' },
|
// { prop: 'name', label: this.$t('map.imageName'), type: 'input' },
|
||||||
{ prop: 'width', label: this.$t('map.imageWidth'), type: 'number', min: 0 },
|
{ prop: 'width', label: this.$t('map.imageWidth'), type: 'number', min: 0 },
|
||||||
{ prop: 'height', label: this.$t('map.imageHeight'), type: 'number', min: 0 },
|
{ prop: 'height', label: this.$t('map.imageHeight'), type: 'number', min: 0 },
|
||||||
{ prop: 'zIndex', label: this.$t('map.imageZindex'), type: 'number', min: 0 },
|
{ prop: 'zIndex', label: this.$t('map.imageZindex'), type: 'number', min: 0 },
|
||||||
|
308
src/views/map/mapdraft/mapedit/mapoperate/buttonDraft.vue
Normal file
308
src/views/map/mapdraft/mapedit/mapoperate/buttonDraft.vue
Normal file
@ -0,0 +1,308 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-tabs v-model="activeName" class="card">
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
|
<config-list ref="form" :form="form" :form-model="editModel" :rules="rules" />
|
||||||
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||||
|
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||||
|
<el-form ref="make" label-width="120px" :rules="createRules" :model="addModel" size="mini">
|
||||||
|
<!-- <el-form-item :label="$t('map.buttonText')+':'" prop="text">
|
||||||
|
<el-input v-model="addModel.text" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item :label="$t('map.buttonType')+ ':'" prop="type">
|
||||||
|
<el-select v-model="addModel.type" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in buttonTypeList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('map.belongsStation')" prop="stationCode">
|
||||||
|
<el-select v-model="addModel.stationCode" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in stationList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name + ' (' + item.code+ ')'"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="coordinate">
|
||||||
|
<span class="title" style="width: 120px">{{ $t('map.textPoints') }}</span>
|
||||||
|
<el-form-item
|
||||||
|
label="x:"
|
||||||
|
prop="position.x"
|
||||||
|
style="display: table; float: left; margin-right: 20px;"
|
||||||
|
label-width="25px"
|
||||||
|
>
|
||||||
|
<el-input-number v-model="addModel.position.x" label="x:" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="y:"
|
||||||
|
prop="position.y"
|
||||||
|
style="display: table; float: left;"
|
||||||
|
label-width="25px"
|
||||||
|
>
|
||||||
|
<el-input-number v-model="addModel.position.y" label="y:" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-scrollbar>
|
||||||
|
<div class="button_box">
|
||||||
|
<el-button-group class="map-draft-group">
|
||||||
|
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { getUID } from '@/jmap/utils/Uid';
|
||||||
|
import ConfigList from './config/list';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'LcControlDraft',
|
||||||
|
components: {
|
||||||
|
ConfigList
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
selected: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cardHeight: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName: 'first',
|
||||||
|
buttonTypeList: [
|
||||||
|
{ code: '01', name: '按图折返' }
|
||||||
|
],
|
||||||
|
mapData: null,
|
||||||
|
editModel: {
|
||||||
|
code: '',
|
||||||
|
text: '',
|
||||||
|
type: '',
|
||||||
|
stationCode: '',
|
||||||
|
position: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
addModel: {
|
||||||
|
type: '',
|
||||||
|
stationCode: '',
|
||||||
|
text: '',
|
||||||
|
position: {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
code: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectEncoding'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
tsxt: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseEnterStatusSignal'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.x': [
|
||||||
|
{ required: true, message: this.$t('map.pleaseEnterXCoordinate'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.y': [
|
||||||
|
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'stationList',
|
||||||
|
'buttonList'
|
||||||
|
]),
|
||||||
|
createRules: function () {
|
||||||
|
return {
|
||||||
|
text: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectButtonContent'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
type: [
|
||||||
|
{ required: true, message: this.$t('rules.pleaseSelectButtonType'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
stationCode: [
|
||||||
|
{ required: true, message: this.$t('rules.stationControlStationCode'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
'position.x': [
|
||||||
|
{ required: true, message: this.$t('map.pleaseEnterXCoordinate'), trigger: 'blur' }
|
||||||
|
],
|
||||||
|
'position.y': [
|
||||||
|
{ required: true, message: this.$t('map.pleaseEnterYCoordinate'), trigger: 'blur' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
form() {
|
||||||
|
const form = {
|
||||||
|
labelWidth: '140px',
|
||||||
|
items: {
|
||||||
|
code: {
|
||||||
|
name: '',
|
||||||
|
item: []
|
||||||
|
},
|
||||||
|
draw: {
|
||||||
|
name: this.$t('map.drawData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'code', label: `${this.$t('map.buttonControl')}${this.$t('map.code')}`, type: 'select', optionLabel: 'code', optionValue: 'code', options: this.buttonList, change: true, deviceChange: this.deviceChange },
|
||||||
|
// { prop: 'text', label: `${this.$t('map.buttonText')}:`, type: 'input' },
|
||||||
|
{ prop: 'type', label: `${this.$t('map.buttonType')}:`, type: 'select', optionLabel: 'name', optionValue: 'code', options: this.buttonTypeList },
|
||||||
|
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
|
||||||
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
|
||||||
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
|
] }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
map: {
|
||||||
|
name: this.$t('map.mapData'),
|
||||||
|
item: [
|
||||||
|
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return form;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
selected: function (val, oldVal) {
|
||||||
|
this.deviceSelect(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
deviceChange(code) {
|
||||||
|
this.$emit('setCenter', code);
|
||||||
|
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||||
|
},
|
||||||
|
deviceSelect(selected) {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
this.$refs.make.resetFields();
|
||||||
|
if (selected && selected._type.toUpperCase() == 'ButtonControl'.toUpperCase()) {
|
||||||
|
this.editModel.code = selected.code;
|
||||||
|
this.editModel.text = selected.text;
|
||||||
|
this.editModel.type = selected.type;
|
||||||
|
this.editModel.stationCode = selected.stationCode;
|
||||||
|
this.editModel.position = {
|
||||||
|
x: selected.position.x,
|
||||||
|
y: selected.position.y
|
||||||
|
};
|
||||||
|
this.activeName = 'first';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create() {
|
||||||
|
this.$refs.make.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const uid = getUID('ButtonControl');
|
||||||
|
const model = {
|
||||||
|
_type: 'ButtonControl',
|
||||||
|
code: uid,
|
||||||
|
type: this.addModel.type,
|
||||||
|
stationCode: this.addModel.stationCode,
|
||||||
|
text: this.addModel.text,
|
||||||
|
position: {
|
||||||
|
x: this.addModel.position.x,
|
||||||
|
y: this.addModel.position.y
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$emit('addOrUpdateMapModel', model);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 修改对象
|
||||||
|
edit() {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$emit('addOrUpdateMapModel', this.buildEditModel());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
buildEditModel() {
|
||||||
|
const model = {
|
||||||
|
_type: 'ButtonControl',
|
||||||
|
code: this.editModel.code,
|
||||||
|
text: this.editModel.text,
|
||||||
|
type: this.editModel.type,
|
||||||
|
stationCode: this.editModel.stationCode,
|
||||||
|
position: {
|
||||||
|
x: this.editModel.position.x,
|
||||||
|
y: this.editModel.position.y
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return model;
|
||||||
|
},
|
||||||
|
// 删除对象
|
||||||
|
deleteObj() {
|
||||||
|
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||||
|
if (selected && selected._type.toUpperCase() === 'LcControl'.toUpperCase()) {
|
||||||
|
const _that = this;
|
||||||
|
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
_that.$emit('delMapModel', selected);
|
||||||
|
_that.deviceSelect();
|
||||||
|
}).catch(() => {
|
||||||
|
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.button_box{
|
||||||
|
width: 100%;
|
||||||
|
background: #f0f0f0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.coordinate {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #606266;
|
||||||
|
line-height: 40px;
|
||||||
|
padding: 0 12px 0 0;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 28px;
|
||||||
|
width: 160px;
|
||||||
|
font-weight: bold;
|
||||||
|
display: block;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.map-draft-group {
|
||||||
|
color: #3E44BE;
|
||||||
|
}
|
||||||
|
</style>
|
@ -204,6 +204,16 @@
|
|||||||
@setCenter="setCenter"
|
@setCenter="setCenter"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="$t('map.button')" name="ButtonControl">
|
||||||
|
<button-draft
|
||||||
|
ref="ImageControl"
|
||||||
|
:card-height="cardHeights"
|
||||||
|
:selected="selected"
|
||||||
|
@addOrUpdateMapModel="addOrUpdateMapModel"
|
||||||
|
@delMapModel="delMapModel"
|
||||||
|
@setCenter="setCenter"
|
||||||
|
/>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@ -228,6 +238,7 @@ import ZcControlDraft from './zcControl';
|
|||||||
import LimitControlDraft from './limitControl';
|
import LimitControlDraft from './limitControl';
|
||||||
import LcControlDraft from './lcControl';
|
import LcControlDraft from './lcControl';
|
||||||
import ImageControlDraft from './ImageControl';
|
import ImageControlDraft from './ImageControl';
|
||||||
|
import ButtonDraft from './buttonDraft';
|
||||||
|
|
||||||
import { ViewMode } from '@/scripts/ConstDic';
|
import { ViewMode } from '@/scripts/ConstDic';
|
||||||
|
|
||||||
@ -250,7 +261,8 @@ export default {
|
|||||||
ZcControlDraft,
|
ZcControlDraft,
|
||||||
LimitControlDraft,
|
LimitControlDraft,
|
||||||
LcControlDraft,
|
LcControlDraft,
|
||||||
ImageControlDraft
|
ImageControlDraft,
|
||||||
|
ButtonDraft
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<el-input-number v-model="addModel.width" :min="1" />px
|
<el-input-number v-model="addModel.width" :min="1" />px
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="coordinate">
|
<div class="coordinate">
|
||||||
<span class="title">{{ $t('map.segmentCoordinates') }}</span>
|
<span class="title">{{ $t('map.linePoint') }}</span>
|
||||||
<div class="point-section">
|
<div class="point-section">
|
||||||
<template v-for="(point, index) in addModel.points">
|
<template v-for="(point, index) in addModel.points">
|
||||||
<div :key="index" style="overflow: hidden;">
|
<div :key="index" style="overflow: hidden;">
|
||||||
|
@ -74,7 +74,8 @@ export default {
|
|||||||
zakContent: '',
|
zakContent: '',
|
||||||
jjzkContent: '',
|
jjzkContent: '',
|
||||||
zbjkContent: '',
|
zbjkContent: '',
|
||||||
zzkContent: ''
|
zzkContent: '',
|
||||||
|
lskContent: ''
|
||||||
},
|
},
|
||||||
addModel: {
|
addModel: {
|
||||||
stationCode: ''
|
stationCode: ''
|
||||||
@ -104,11 +105,12 @@ export default {
|
|||||||
name: this.$t('map.drawData'),
|
name: this.$t('map.drawData'),
|
||||||
item: [
|
item: [
|
||||||
{ prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
|
{ prop: 'code', label: this.$t('map.stationControlCode'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.stationControlList, change: true, deviceChange: this.deviceChange },
|
||||||
{ prop: 'name', label: this.$t('map.stationControlName'), type: 'input' },
|
// { prop: 'name', label: this.$t('map.stationControlName'), type: 'input' },
|
||||||
{ prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
|
{ prop: 'zokContent', label: this.$t('map.zokContent'), type: 'input' },
|
||||||
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
|
{ prop: 'zakContent', label: this.$t('map.zakContent'), type: 'input' },
|
||||||
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
|
{ prop: 'jjzkContent', label: this.$t('map.jjzkContent'), type: 'input' },
|
||||||
{ prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' },
|
{ prop: 'zzkContent', label: this.$t('map.zzkContent'), type: 'input' },
|
||||||
|
{ prop: 'lskContent', label: `${this.$t('map.interconnected')}:`, type: 'input' },
|
||||||
{ prop: 'position', label: this.$t('map.stationControlPosition'), type: 'coordinate', width: '150px', children: [
|
{ prop: 'position', label: this.$t('map.stationControlPosition'), type: 'coordinate', width: '150px', children: [
|
||||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||||
@ -184,6 +186,7 @@ export default {
|
|||||||
this.editModel.zakContent = selected.zakContent;
|
this.editModel.zakContent = selected.zakContent;
|
||||||
this.editModel.jjzkContent = selected.jjzkContent;
|
this.editModel.jjzkContent = selected.jjzkContent;
|
||||||
this.editModel.zzkContent = selected.zzkContent;
|
this.editModel.zzkContent = selected.zzkContent;
|
||||||
|
this.editModel.lskContent = selected.lskContent;
|
||||||
this.editModel.stationCode = selected.stationCode;
|
this.editModel.stationCode = selected.stationCode;
|
||||||
this.editModel.zbjkContent = selected.zbjkContent;
|
this.editModel.zbjkContent = selected.zbjkContent;
|
||||||
if (selected.hasOwnProperty('position')) {
|
if (selected.hasOwnProperty('position')) {
|
||||||
@ -208,7 +211,8 @@ export default {
|
|||||||
zbjkContent: '总报警',
|
zbjkContent: '总报警',
|
||||||
zakContent: '站控',
|
zakContent: '站控',
|
||||||
jjzkContent: '紧急站控',
|
jjzkContent: '紧急站控',
|
||||||
zzkContent: '站中控按钮'
|
zzkContent: '站中控按钮',
|
||||||
|
lskContent: '连锁控'
|
||||||
};
|
};
|
||||||
this.stationList.forEach(elem => {
|
this.stationList.forEach(elem => {
|
||||||
if (elem.code === this.addModel.stationCode) {
|
if (elem.code === this.addModel.stationCode) {
|
||||||
@ -241,6 +245,7 @@ export default {
|
|||||||
zbjkContent: this.editModel.zbjkContent,
|
zbjkContent: this.editModel.zbjkContent,
|
||||||
zakContent: this.editModel.zakContent,
|
zakContent: this.editModel.zakContent,
|
||||||
jjzkContent: this.editModel.jjzkContent,
|
jjzkContent: this.editModel.jjzkContent,
|
||||||
|
lskContent: this.editModel.lskContent,
|
||||||
zzkContent: this.editModel.zzkContent,
|
zzkContent: this.editModel.zzkContent,
|
||||||
stationCode: this.editModel.stationCode,
|
stationCode: this.editModel.stationCode,
|
||||||
position: {
|
position: {
|
||||||
|
@ -86,13 +86,17 @@ export default {
|
|||||||
const list = [];
|
const list = [];
|
||||||
if (this.sectionList && this.sectionList.length) {
|
if (this.sectionList && this.sectionList.length) {
|
||||||
this.sectionList.forEach(elem => {
|
this.sectionList.forEach(elem => {
|
||||||
if (elem.type === '01') {
|
if (elem.type === '01' && elem.isSwitchSection) {
|
||||||
|
const link = this.findLinkData(elem.linkCode);
|
||||||
|
if ((link.leftFdCode && link.leftSdCode) || (link.rightFdCode && link.rightSdCode)) {
|
||||||
list.push({
|
list.push({
|
||||||
label: elem.name,
|
label: elem.name,
|
||||||
key: elem.code,
|
key: elem.code,
|
||||||
pinyin: elem.name
|
pinyin: elem.name
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
|
Loading…
Reference in New Issue
Block a user