# Conflicts:
#	src/iscs/shape/stateTable.js
This commit is contained in:
joylink_cuiweidong 2020-10-12 18:35:00 +08:00
commit 24d93e9c64
21 changed files with 436 additions and 336 deletions

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -41,6 +41,7 @@ export default class Tick extends Group {
this.iscsRect = new Polygon({ this.iscsRect = new Polygon({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z, z: model.z,
z2: model.z2 || 0,
shape: { shape: {
points: points points: points
}, },

View File

@ -20,8 +20,8 @@ import blowerRedRight from '@/assets/iscs_picture/gufengji-red-r.png';
import blowerGrayRight from '@/assets/iscs_picture/gufengji-gray-r.png'; import blowerGrayRight from '@/assets/iscs_picture/gufengji-gray-r.png';
import iscsAPF from '@/assets/iscs_picture/iscs_APF.png'; import iscsAPF from '@/assets/iscs_picture/iscs_APF.png';
import drum from '@/assets/iscs_picture/drum.png'; import drum from '@/assets/iscs_picture/drum.png';
import exhaustFanGray from '@/assets/iscs_picture/exhaustFan-gray.png' import exhaustFanGray from '@/assets/iscs_picture/exhaustFan-gray.png';
import exhaustFanGreen from '@/assets/iscs_picture/exhaustFan-green.png' import exhaustFanGreen from '@/assets/iscs_picture/exhaustFan-green.png';
import waterCooler from '@/assets/iscs_picture/ZSDF533.png'; import waterCooler from '@/assets/iscs_picture/ZSDF533.png';
import textBgBluePoint from '@/assets/iscs_picture/textBgBluePoint.png'; import textBgBluePoint from '@/assets/iscs_picture/textBgBluePoint.png';
import kongzhixiang from '@/assets/iscs_picture/iscs_kongzhixiang.png'; import kongzhixiang from '@/assets/iscs_picture/iscs_kongzhixiang.png';
@ -30,9 +30,18 @@ import escalator from '@/assets/iscs_picture/escalator.png';
import toUp from '@/assets/iscs_picture/to-up.png'; import toUp from '@/assets/iscs_picture/to-up.png';
import toDown from '@/assets/iscs_picture/to-down.png'; import toDown from '@/assets/iscs_picture/to-down.png';
import lift from '@/assets/iscs_picture/lift.png'; import lift from '@/assets/iscs_picture/lift.png';
import dewateringBlue from '@/assets/iscs_picture/dewatering-blue.png' import dewateringBlue from '@/assets/iscs_picture/dewatering-blue.png';
import dewateringGray from '@/assets/iscs_picture/dewatering-gray.png' import dewateringGray from '@/assets/iscs_picture/dewatering-gray.png';
import dewateringPurple from '@/assets/iscs_picture/dewatering-purple.png' import dewateringPurple from '@/assets/iscs_picture/dewatering-purple.png';
import exhaustFanLeft from '@/assets/iscs_picture/exhaustFan-left.png';
import exhaustFanRight from '@/assets/iscs_picture/exhaustFan-right.png';
import iscsMD from '@/assets/iscs_picture/iscs_MD.png';
import iscsMDRect from '@/assets/iscs_picture/iscs-MD-rect.png';
import iscsRAFEAFGreen from '@/assets/iscs_picture/iscs-RAF-EAF_green.png';
import iscsRAFEAFGray from '@/assets/iscs_picture/iscs-RAF-EAF_gray.png';
import iscsSEF from '@/assets/iscs_picture/iscs-SEF.png';
import iscsValue from '@/assets/iscs_picture/iscs-value.png';
import fanCoil from '@/assets/iscs_picture/fanCoil.png';
const pictureObj = { const pictureObj = {
'psdLeft': psdLeft, 'psdLeft': psdLeft,
@ -41,32 +50,41 @@ const pictureObj = {
'APF': iscsAPF, 'APF': iscsAPF,
'envPersonDoor': envPersonDoor, 'envPersonDoor': envPersonDoor,
's': fireBlue, 's': fireBlue,
'a': fireRed, 'a': fireRed,
hand, hand,
fmBlue, fmBlue,
fmGray, fmGray,
fmGreen, fmGreen,
airCond, airCond,
airCondMul, airCondMul,
setting, setting,
blowerRedLeft, blowerRedLeft,
blowerGrayLeft, blowerGrayLeft,
blowerRedRight, blowerRedRight,
blowerGrayRight, blowerGrayRight,
drum, drum,
exhaustFanGray, exhaustFanGray,
exhaustFanGreen, exhaustFanGreen,
waterCooler, waterCooler,
textBgBluePoint, textBgBluePoint,
ventilationFan, ventilationFan,
escalator, escalator,
toUp, toUp,
toDown, toDown,
lift, lift,
dewateringBlue, dewateringBlue,
dewateringGray, dewateringGray,
dewateringPurple, dewateringPurple,
kongzhixiang kongzhixiang,
exhaustFanLeft,
exhaustFanRight,
iscsMD,
iscsMDRect,
iscsRAFEAFGreen,
iscsRAFEAFGray,
iscsSEF,
iscsValue,
fanCoil
}; };
export default class Picture extends Group { export default class Picture extends Group {
constructor(device) { constructor(device) {
@ -87,10 +105,10 @@ export default class Picture extends Group {
}); });
this.imageButton = new Image({ this.imageButton = new Image({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z, z: model.z,
z2: model.z2||0, z2: model.z2 || 0,
origin: [model.width/2, model.height/2], origin: [model.width / 2, model.height / 2],
rotation: (model.rotation||0)*Math.PI/180, rotation: (model.rotation || 0) * Math.PI / 180,
style: { style: {
x: 0, x: 0,
y: 0, y: 0,

View File

@ -1,9 +1,9 @@
import Group from 'zrender/src/container/Group'; import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect'; import Rect from 'zrender/src/graphic/shape/Rect';
import Line from 'zrender/src/graphic/shape/Line'; // import Line from 'zrender/src/graphic/shape/Line';
import Text from 'zrender/src/graphic/Text'; import Text from 'zrender/src/graphic/Text';
import Circle from 'zrender/src/graphic/shape/Circle'; import Circle from 'zrender/src/graphic/shape/Circle';
import { merge } from 'lodash'; // import { merge } from 'lodash';
const stateMap = { const stateMap = {
slidingDoorEmergencyDoorOpenMalfunction : '滑动门&应急门开门故障', slidingDoorEmergencyDoorOpenMalfunction : '滑动门&应急门开门故障',
slidingDoorEmergencyDoorCloseMalfunction: '滑动门&应急门关门故障', slidingDoorEmergencyDoorCloseMalfunction: '滑动门&应急门关门故障',
@ -167,75 +167,75 @@ export default class StateTable extends Group {
this.create(); this.create();
} }
create() { create() {
const model = this.model; const model = this.model;
const sumWidth = model.columnWidthList.reduce((a,b) => {return a+b;}) const sumWidth = model.columnWidthList.reduce((a, b) => { return a + b; });
this.rectsArr = []; this.rectsArr = [];
this.contextsArr = []; this.contextsArr = [];
this.grouper = new Group({ this.grouper = new Group({
id: model.code, id: model.code,
position: [model.point.x, model.point.y] position: [model.point.x, model.point.y]
}); });
let rowNum = model.rowNum; // let rowNum = model.rowNum;
let contentIndex = 2; // let contentIndex = 2;
if (model.headerType === 'none') { if (model.headerType === 'none') {
rowNum = model.rowNum - 1; // rowNum = model.rowNum - 1;
contentIndex = 1; // contentIndex = 1;
} }
if (model.rowHeight||!model.rowHeightList) { if (model.rowHeight || !model.rowHeightList) {
model.rowHeightList = new Array(model.rowNum).fill(model.rowHeight); model.rowHeightList = new Array(model.rowNum).fill(model.rowHeight);
} }
let sumRowSize = 0; let sumRowSize = 0;
model.rowHeightList.forEach((height,i) => { model.rowHeightList.forEach((height, i) => {
const rects = []; const rects = [];
let sumColumnSize = 0; let sumColumnSize = 0;
let isMegerHeader = model.headerType === 'merge' && i == 0; const isMegerHeader = model.headerType === 'merge' && i == 0;
if (model.headerType === 'none' && i == 0) { if (model.headerType === 'none' && i == 0) {
return; return;
} }
model.columnWidthList.forEach((width,j) => { model.columnWidthList.forEach((width, j) => {
const defBg = model.bgColor||'rgba(0,0,0,0)' const defBg = model.bgColor || 'rgba(0,0,0,0)';
const rect = new Rect({ const rect = new Rect({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
shape: { z2: model.z2 || 0,
x: isMegerHeader? 0: sumColumnSize, shape: {
y: sumRowSize, x: isMegerHeader ? 0 : sumColumnSize,
width: isMegerHeader? sumWidth: width, y: sumRowSize,
height width: isMegerHeader ? sumWidth : width,
}, height
style: { },
stroke: model.borderColor || '#FFF', style: {
lineWidth: 1, stroke: model.borderColor || '#FFF',
fill: model.tableData[i-1]? model.tableData[i-1]['bg'+(j+1)]||defBg : defBg lineWidth: 1,
} fill: model.tableData[i - 1] ? model.tableData[i - 1]['bg' + (j + 1)] || defBg : defBg
}); }
});
rects.push(rect);
this.grouper.add(rect);
sumColumnSize += width;
});
this.rectsArr.push(rects);
sumRowSize += height;
})
rects.push(rect);
this.grouper.add(rect);
sumColumnSize += width;
});
this.rectsArr.push(rects);
sumRowSize += height;
});
this.header = []; this.header = [];
if (model.headerType === 'merge') { if (model.headerType === 'merge') {
const header = new Text({ const header = new Text({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z + 1, z: model.z + 1,
z2: model.z2 || 0,
style: { style: {
x: sumWidth / 2, x: sumWidth / 2,
y: model.rowHeightList[0] / 2, y: model.rowHeightList[0] / 2,
fontWeight: model.headerFontWeight||'normal', fontWeight: model.headerFontWeight || 'normal',
fontSize: model.headerFontSize, fontSize: model.headerFontSize,
fontFamily: 'consolas', fontFamily: 'consolas',
text: model.headerContextList[0], text: model.headerContextList[0],
@ -254,10 +254,11 @@ export default class StateTable extends Group {
const header = new Text({ const header = new Text({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z + 1, z: model.z + 1,
z2: model.z2 || 0,
style: { style: {
x: item / 2 + width, x: item / 2 + width,
y: model.rowHeightList[0] / 2, y: model.rowHeightList[0] / 2,
fontWeight: model.headerFontWeight||'normal', fontWeight: model.headerFontWeight || 'normal',
fontSize: model.headerFontSize, fontSize: model.headerFontSize,
fontFamily: 'consolas', fontFamily: 'consolas',
text: model.headerContextList[i], text: model.headerContextList[i],
@ -272,100 +273,103 @@ export default class StateTable extends Group {
this.grouper.add(header); this.grouper.add(header);
this.header.push(header); this.header.push(header);
}); });
} }
model.tableData.forEach((item, i)=> { model.tableData.forEach((item, i)=> {
const index = model.headerType === 'none'? i: i+1; const index = model.headerType === 'none' ? i : i + 1;
const rects = this.rectsArr[index] || []; const rects = this.rectsArr[index] || [];
const contexts = []; const contexts = [];
model.columnWidthList.forEach((elem, j) => { model.columnWidthList.forEach((elem, j) => {
const rect = rects[j]; const rect = rects[j];
if (rect) { if (rect) {
if (stateMap[item['column' + (j + 1)]] && if (stateMap[item['column' + (j + 1)]] &&
stateMap[item['column' + (j + 1)]].type === 'Circle') { stateMap[item['column' + (j + 1)]].type === 'Circle') {
const contextColor = stateMap[item['column' + (j + 1)]].color||item['color'+(j + 1)]||'#4CCDE4'; const contextColor = stateMap[item['column' + (j + 1)]].color || item['color' + (j + 1)] || '#4CCDE4';
const circle = new Circle({ const circle = new Circle({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z + 1, z: model.z + 1,
_subType: stateMap[item['column' + (j + 1)]], z2: model.z2 || 0,
shape: { _subType: stateMap[item['column' + (j + 1)]],
cx: rect.shape.x + rect.shape.width / 2, shape: {
cy: rect.shape.y + rect.shape.height / 2, cx: rect.shape.x + rect.shape.width / 2,
r: model.rowHeightList[index] / 3 cy: rect.shape.y + rect.shape.height / 2,
}, r: model.rowHeightList[index] / 3
style: { },
fill: contextColor style: {
} fill: contextColor
}); }
this.grouper.add(circle); });
contexts.push(circle); this.grouper.add(circle);
} else { contexts.push(circle);
const bg = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].background : null; } else {
const textPadding = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].textPadding : 0; const bg = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].background : null;
const context = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].default : item['column' + (j + 1)]; const textPadding = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].textPadding : 0;
const contextColor = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].color : item['color'+(j + 1)]||(this.model.textColor ? this.model.textColor : '#4CCDE4'); const context = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].default : item['column' + (j + 1)];
const contextWeight = stateMap[item['column' + (j + 1)]] ? 'normal': item['weight'+(j + 1)]||this.model.fontWeight||'normal'; const contextColor = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].color : item['color' + (j + 1)] || (this.model.textColor ? this.model.textColor : '#4CCDE4');
const unit = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unit : ''; const contextWeight = stateMap[item['column' + (j + 1)]] ? 'normal' : item['weight' + (j + 1)] || this.model.fontWeight || 'normal';
const unitColor = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unitColor : item['color'+(j + 1)]||(this.model.textColor ? this.model.textColor : '#4CCDE4') const unit = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unit : '';
const unitColor = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unitColor : item['color' + (j + 1)] || (this.model.textColor ? this.model.textColor : '#4CCDE4');
let text = null; let text = null;
if (stateMap[item['column' + (j + 1)]] && stateMap[item['column' + (j + 1)]].unit) { if (stateMap[item['column' + (j + 1)]] && stateMap[item['column' + (j + 1)]].unit) {
text = new Text({ text = new Text({
zlevel: model.zlevel, zlevel: model.zlevel,
z: model.z + 1, z: model.z + 1,
_subType: stateMap[item['column' + (j + 1)]], z2: model.z2 || 0,
style:{ _subType: stateMap[item['column' + (j + 1)]],
x: rect.shape.x + rect.shape.width / 2, style:{
y: rect.shape.y + rect.shape.height / 2, x: rect.shape.x + rect.shape.width / 2,
fontWeight: contextWeight, y: rect.shape.y + rect.shape.height / 2,
fontFamily: 'consolas', fontWeight: contextWeight,
fontSize: model.fontSize, fontFamily: 'consolas',
text: `{context|${context}} {unit|${unit}}`, fontSize: model.fontSize,
rich: { text: `{context|${context}} {unit|${unit}}`,
context: { rich: {
textFill: contextColor, context: {
}, textFill: contextColor
unit: { },
textFill: unitColor, unit: {
} textFill: unitColor
}, }
textBackgroundColor: bg, },
textLineHeight: model.fontSize, textBackgroundColor: bg,
textAlign: 'center', textLineHeight: model.fontSize,
textPosition: 'inside', textAlign: 'center',
textVerticalAlign: 'center', textPosition: 'inside',
textPadding textVerticalAlign: 'center',
} textPadding
}); }
} else { });
text = new Text({ } else {
zlevel: model.zlevel, text = new Text({
z: model.z + 1, zlevel: model.zlevel,
_subType: stateMap[item['column' + (j + 1)]], z: model.z + 1,
style:{ z2: model.z2 || 0,
x: rect.shape.x + rect.shape.width / 2, _subType: stateMap[item['column' + (j + 1)]],
y: rect.shape.y + rect.shape.height / 2, style:{
fontWeight: contextWeight, x: rect.shape.x + rect.shape.width / 2,
fontFamily: 'consolas', y: rect.shape.y + rect.shape.height / 2,
fontSize: model.fontSize, fontWeight: contextWeight,
text: context, fontFamily: 'consolas',
textFill: contextColor, fontSize: model.fontSize,
textBackgroundColor: bg, text: context,
textLineHeight: model.fontSize, textFill: contextColor,
textAlign: 'center', textBackgroundColor: bg,
textPosition: 'inside', textLineHeight: model.fontSize,
textVerticalAlign: 'center', textAlign: 'center',
textPadding textPosition: 'inside',
} textVerticalAlign: 'center',
}); textPadding
} }
this.grouper.add(text); });
contexts.push(text); }
} this.grouper.add(text);
} contexts.push(text);
}
}
}); });
this.contextsArr.push(contexts) this.contextsArr.push(contexts);
}); });
this.add(this.grouper); this.add(this.grouper);
} }
setModel(dx, dy) { setModel(dx, dy) {

View File

@ -125,7 +125,9 @@ class Status {
this.statusObj = { }; this.statusObj = { };
} }
handleDirectionRod(device) { handleDirectionRod(device) {
this.statusObj = { }; this.statusObj = {
reverse: device.reverse
};
} }
getStatus() { getStatus() {
return this.statusObj; return this.statusObj;

View File

@ -54,7 +54,7 @@ class Jlmap {
this.previewOrMapDraw = opts.showConfig.previewOrMapDraw; this.previewOrMapDraw = opts.showConfig.previewOrMapDraw;
this.$zr = zrender.init(opts.dom, deepAssign({ renderer, devicePixelRatio, width, height }, opts.config)); this.$zr = zrender.init(opts.dom, deepAssign({ renderer, devicePixelRatio, width, height }, opts.config));
this.$zr.dom.setAttribute('tabIndex', -1); this.$zr.dom.setAttribute('tabIndex', -1);
this.$options = new Options(deepAssign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放 this.$options = new Options(deepAssign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
this.$painter = new Painter(this); this.$painter = new Painter(this);
@ -501,6 +501,13 @@ class Jlmap {
psdDevice.fault = elem.fault; psdDevice.fault = elem.fault;
this.$painter.update(psdDevice); this.$painter.update(psdDevice);
} }
} else if (elem.deviceType === 'DIRECTION_ROD' && elem.uniqueCode) {
store.state.map.map.directionRodList.forEach(item => {
console.log(item, '====', elem.uniqueCode === `${item.startStationCode}-${item.endStationCode}-${item.right}`);
if (elem.uniqueCode === `${item.startStationCode}-${item.endStationCode}-${item.right}`) {
this.$painter.update(elem);
}
});
} }
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
if (elem.dispose) { if (elem.dispose) {

View File

@ -13,6 +13,7 @@ export default class DirectionRod extends Group {
this.model = model; this.model = model;
this.style = style; this.style = style;
this.isShowShape = true; this.isShowShape = true;
this.recoverValue = false;
if (isShowThePrdType(model.prdType, style.DirectionRod.displayCondition) || model.previewOrMapDraw) { if (isShowThePrdType(model.prdType, style.DirectionRod.displayCondition) || model.previewOrMapDraw) {
this.create(); this.create();
this.createMouseEvent(); this.createMouseEvent();
@ -73,8 +74,10 @@ export default class DirectionRod extends Group {
} }
// 设置状态 // 设置状态
setState(model) { setState(model) {
console.log(model, this.model, '888888');
// if (!this.isShowShape) return; // if (!this.isShowShape) return;
// this.recover(); // this.recover();
this.recoverValue = model.reverse;
if (model.reverse && this.model.right) { if (model.reverse && this.model.right) {
this.rod.attr('rotation', 0); this.rod.attr('rotation', 0);
} else if (!model.reverse && this.model.right) { } else if (!model.reverse && this.model.right) {
@ -97,6 +100,9 @@ export default class DirectionRod extends Group {
} else { } else {
this.hideMode(); this.hideMode();
} }
}
drawSelected() {
} }
setShowStation(stationCode) { setShowStation(stationCode) {
if (!stationCode || this.model.stationCode === stationCode) { if (!stationCode || this.model.stationCode === stationCode) {

View File

@ -103,7 +103,8 @@ export default {
signalParamList: [], signalParamList: [],
stationParamList: [], stationParamList: [],
standParamList: [], standParamList: [],
routeParamList: [] routeParamList: [],
directionRodParamList: []
}; };
}, },
computed: { computed: {
@ -153,6 +154,9 @@ export default {
case 'StationStand': case 'StationStand':
this.handleStandMenu(); this.handleStandMenu();
break; break;
case 'DirectionRod':
this.handleDirectionRodMenu();
break;
} }
} }
}).catch((error) => { }).catch((error) => {
@ -368,6 +372,32 @@ export default {
speedLimitValue: '5' speedLimitValue: '5'
}; };
}, },
handleDirectionRodMenu() {
this.clearAllMenuShow();
this.deviceHighLight(this.oldDevice, false);
this.deviceHighLight(this.selectedObj, true);
this.oldDevice = this.selectedObj;
this.centralizedStationList = new Array(15).fill({});
this.directionRodParamList.forEach((directionRod, index) => {
if (this.selectedObj.right && this.selectedObj.recoverValue && directionRod.name === '切换左向') {
directionRod['disabled'] = true;
} else if (!this.selectedObj.right && this.selectedObj.recoverValue && directionRod.name === '切换右向') {
directionRod['disabled'] = true;
} else if (this.selectedObj.right && !this.selectedObj.recoverValue && directionRod.name === '切换右向') {
directionRod['disabled'] = true;
} else if (!this.selectedObj.right && !this.selectedObj.recoverValue && directionRod.name === '切换左向') {
directionRod['disabled'] = true;
} else {
directionRod['disabled'] = false;
}
this.centralizedStationList[index] = directionRod;
});
this.tempData = [];
this.tempData.push(this.selectedObj);
this.param = {
code: `${this.selectedObj.startStationCode}-${this.selectedObj.endStationCode}-${this.selectedObj.right}`
};
},
handleBasicMenu() { handleBasicMenu() {
this.deviceHighLight(this.oldDevice, false); this.deviceHighLight(this.oldDevice, false);
if (this.oldClickObj) { if (this.oldClickObj) {
@ -479,7 +509,7 @@ export default {
this.clearAllMenuShow(); this.clearAllMenuShow();
}, },
initMenus() { initMenus() {
this.basicParamList = this.$store.state.training.prdType === '01' ? [ this.basicParamList = [
{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' }, { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' }, { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true }, { name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true },
@ -489,17 +519,15 @@ export default {
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false }, { name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
{ name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false }, { name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
{ name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false } { name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false }
] : []; ];
this.sectionParamList = this.$store.state.training.prdType === '01' ? [ this.sectionParamList = [
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, show: false }, { name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, show: false },
{ name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, show: false, securityCommand: true }, { name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, show: false, securityCommand: true },
{ name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, show: false, securityCommand: true }, { name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, show: false, securityCommand: true },
{ name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, show: false, securityCommand: true }, { name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, show: false, securityCommand: true },
{ name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, show: false, securityCommand: true } { name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, show: false, securityCommand: true }
] : [
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, show: false }
]; ];
this.switchParamList = this.$store.state.training.prdType === '01' ? [ this.switchParamList = [
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, show: false }, { name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, show: false },
{ name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, show: false, securityCommand: true }, { name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, show: false, securityCommand: true },
{ name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, show: false, securityCommand: true }, { name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, show: false, securityCommand: true },
@ -511,12 +539,6 @@ export default {
{ name: '轨区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, show: false, securityCommand: true }, { name: '轨区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, show: false, securityCommand: true },
{ name: '轨区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, show: false, securityCommand: true}, { name: '轨区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, show: false, securityCommand: true},
{ name: '强解区段', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, show: false, securityCommand: true } { name: '强解区段', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, show: false, securityCommand: true }
] : [
{ name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, show: false },
{ name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, show: false },
{ name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menuButton, show: false, disabledName: 'normalPosition' },
{ name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menuButton, show: false, disabledName: 'reversePosition' }
// { name: '', cmdType: CMD.Switch.CMD_SWITCH_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false }
]; ];
this.signalParamList = this.$store.state.training.prdType === '01' ? [ this.signalParamList = this.$store.state.training.prdType === '01' ? [
{ name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, show: false, disabledName: 'ciControl' }, { name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, show: false, disabledName: 'ciControl' },
@ -557,6 +579,10 @@ export default {
{ name: '越站', cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, operate: OperationEvent.StationStand.setJumpStop.menuButton, show: false, securityCommand: true }, { name: '越站', cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP, operate: OperationEvent.StationStand.setJumpStop.menuButton, show: false, securityCommand: true },
{ name: '取消越站', cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, operate: OperationEvent.StationStand.cancelJumpStop.menuButton, show: false, securityCommand: true } { name: '取消越站', cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP, operate: OperationEvent.StationStand.cancelJumpStop.menuButton, show: false, securityCommand: true }
]; ];
this.directionRodParamList = [
{ name: '切换左向', cmdType: CMD.DirectionRod.CMD_DIRECTION_CHANGE, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false },
{ name: '切换右向', cmdType: CMD.DirectionRod.CMD_DIRECTION_CHANGE, operate: OperationEvent.StationStand.setDetainTrain.menuButton, show: false }
];
}, },
initRouteMenus() { initRouteMenus() {
this.routeParamList = []; this.routeParamList = [];

View File

@ -1,6 +1,9 @@
<template> <template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;"> <div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;"> <el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" size="small" />
</el-form-item>
<el-form-item label="箭头大小:" prop="fontSize"> <el-form-item label="箭头大小:" prop="fontSize">
<el-input-number v-model="form.fontSize" controls-position="right" :min="1" size="small" /> <el-input-number v-model="form.fontSize" controls-position="right" :min="1" size="small" />
</el-form-item> </el-form-item>
@ -57,6 +60,7 @@ export default {
showDeleteButton: false, showDeleteButton: false,
form: { form: {
code: '', code: '',
z2: '',
fillColor: '#fff', fillColor: '#fff',
borderWidth: 0, borderWidth: 0,
fontSize: 10, fontSize: 10,
@ -91,6 +95,7 @@ export default {
this.showDeleteButton = true; this.showDeleteButton = true;
this.isUpdate = true; this.isUpdate = true;
this.form.code = model.code; this.form.code = model.code;
this.form.z2 = model.z2;
this.form.fillColor = model.fillColor; this.form.fillColor = model.fillColor;
this.form.borderWidth = model.borderWidth; this.form.borderWidth = model.borderWidth;
this.form.fontSize = model.fontSize; this.form.fontSize = model.fontSize;
@ -114,8 +119,9 @@ export default {
x: this.form.x, x: this.form.x,
y: this.form.y y: this.form.y
}, },
code: this.isUpdate ? this.form.code : getUID('IscsArrow', this.iscs.iscsRectList), code: this.isUpdate ? this.form.code : getUID('IscsArrow', this.iscs.iscsArrowList),
_type: 'IscsArrow', _type: 'IscsArrow',
z2: this.form.z2,
fillColor: this.form.fillColor, fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth, borderWidth: this.form.borderWidth,
fontSize: this.form.fontSize, fontSize: this.form.fontSize,
@ -152,6 +158,7 @@ export default {
this.showDeleteButton = false; this.showDeleteButton = false;
this.form = { this.form = {
code: '', code: '',
z2: '',
fillColor: '', fillColor: '',
borderWidth: 1, borderWidth: 1,
fontSize: 10, fontSize: 10,

View File

@ -1,9 +1,9 @@
<template> <template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;"> <div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;"> <el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2"> <el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" size="small" /> <el-input-number v-model="form.z2" controls-position="right" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="图片类型:" prop="type"> <el-form-item label="图片类型:" prop="type">
<el-select v-model="form.type" placeholder="请选择类型" size="small"> <el-select v-model="form.type" placeholder="请选择类型" size="small">
<el-option v-for="(item, index) in typeList" :key="index" :label="item.name" :value="item.value" /> <el-option v-for="(item, index) in typeList" :key="index" :label="item.name" :value="item.value" />
@ -47,8 +47,8 @@ export default {
showDeleteButton: false, showDeleteButton: false,
form: { form: {
code: '', code: '',
type: '', type: '',
z2: 0, z2: 0,
width: 50, width: 50,
height: 50, height: 50,
rotation: 0, rotation: 0,
@ -58,37 +58,46 @@ export default {
typeList: [ typeList: [
{ name: '车头', value: 'psdLeft' }, { name: '车头', value: 'psdLeft' },
{ name: '车尾', value: 'psdRight' }, { name: '车尾', value: 'psdRight' },
{ name: '车厢', value: 'psdSystem' }, { name: '车厢', value: 'psdSystem' },
{ name: '人防门', value: 'envPersonDoor'}, { name: '人防门', value: 'envPersonDoor'},
{ name: '蓝色FIRE', value: 's'}, { name: '蓝色FIRE', value: 's'},
{ name: '红色FIRE', value: 'a'}, { name: '红色FIRE', value: 'a'},
{ name: 'APF', value: 'APF'}, { name: 'APF', value: 'APF'},
{ name: '手动阀', value: 'hand'}, { name: '手动阀', value: 'hand'},
{ name: '蓝色-阀门', value: 'fmBlue'}, { name: '蓝色-阀门', value: 'fmBlue'},
{ name: '灰色-阀门', value: 'fmGray'}, { name: '灰色-阀门', value: 'fmGray'},
{ name: '绿色-阀门', value: 'fmGreen'}, { name: '绿色-阀门', value: 'fmGreen'},
{ name: '空调', value: 'airCond'}, { name: '空调', value: 'airCond'},
{ name: '多联空调', value: 'airCondMul'}, { name: '多联空调', value: 'airCondMul'},
{ name: '管件', value: 'setting'}, { name: '管件', value: 'setting'},
{ name: '汽包', value: 'drum' }, { name: '汽包', value: 'drum' },
{ name: '红色-左侧-鼓风机', value: 'blowerRedLeft'}, { name: '红色-左侧-鼓风机', value: 'blowerRedLeft'},
{ name: '灰色-左侧-鼓风机', value: 'blowerGrayLeft'}, { name: '灰色-左侧-鼓风机', value: 'blowerGrayLeft'},
{ name: '红色-右侧-鼓风机', value: 'blowerRedRight'}, { name: '红色-右侧-鼓风机', value: 'blowerRedRight'},
{ name: '灰色-右侧-鼓风机', value: 'blowerGrayRight'}, { name: '灰色-右侧-鼓风机', value: 'blowerGrayRight'},
{ name: '灰色-排风机', value: 'exhaustFanGray' }, { name: '灰色-排风机', value: 'exhaustFanGray' },
{ name: '绿色-排风机', value: 'exhaustFanGreen' }, { name: '绿色-排风机', value: 'exhaustFanGreen' },
{ name: '冷水机', value: 'waterCooler'}, { name: '排风机左侧', value: 'exhaustFanLeft' },
{ name: '顶部排风机', value: 'ventilationFan'}, { name: '排风机右侧', value: 'exhaustFanRight' },
{ name: '文字蓝色背景', value: 'textBgBluePoint'}, { name: '冷水机', value: 'waterCooler'},
{ name: '扶梯', value: 'escalator'}, { name: '顶部排风机', value: 'ventilationFan'},
{ name: '扶梯-朝上指示', value: 'toUp'}, { name: '文字蓝色背景', value: 'textBgBluePoint'},
{ name: '扶梯-朝下执行', value: 'toDown'}, { name: '扶梯', value: 'escalator'},
{ name: '电梯', value: 'lift' }, { name: '扶梯-朝上指示', value: 'toUp'},
{ name: '蓝色-排水', value: 'dewateringBlue' }, { name: '扶梯-朝下执行', value: 'toDown'},
{ name: '灰色-电梯', value: 'dewateringGray' }, { name: '电梯', value: 'lift' },
{ name: '紫色-电梯', value: 'dewateringPurple' }, { name: '蓝色-排水', value: 'dewateringBlue' },
{ name: '活塞风井', value: 'kongzhixiang'} { name: '灰色-电梯', value: 'dewateringGray' },
], { name: '紫色-电梯', value: 'dewateringPurple' },
{ name: '活塞风井', value: 'kongzhixiang'},
{ name: 'MD风阀', value: 'iscsMD' },
{ name: '排烟风阀', value: 'iscsMDRect' },
{ name: '排烟风机(箭头)-灰色', value: 'iscsRAFEAFGray' },
{ name: '排烟风机(箭头)-绿色', value: 'iscsRAFEAFGreen' },
{ name: '排烟风机', value: 'iscsSEF' },
{ name: '阀门', value: 'iscsValue' },
{ name: '风扇机', value: 'fanCoil'}
],
rules: { rules: {
strokeColor: [ strokeColor: [
@ -114,8 +123,8 @@ export default {
this.isUpdate = true; this.isUpdate = true;
this.form.code = model.code; this.form.code = model.code;
this.form.type = model.type; this.form.type = model.type;
this.form.z2 = model.z2; this.form.z2 = model.z2;
this.form.rotation = model.rotation; this.form.rotation = model.rotation;
this.form.width = model.width; this.form.width = model.width;
this.form.height = model.height; this.form.height = model.height;
this.form.x = model.point.x; this.form.x = model.point.x;
@ -136,8 +145,8 @@ export default {
code: this.isUpdate ? this.form.code : getUID('IscsPicture', this.iscs.iscsPictureList), code: this.isUpdate ? this.form.code : getUID('IscsPicture', this.iscs.iscsPictureList),
_type: 'IscsPicture', _type: 'IscsPicture',
type: this.form.type, type: this.form.type,
z2: this.form.z2, z2: this.form.z2,
rotation: this.form.rotation, rotation: this.form.rotation,
width: this.form.width, width: this.form.width,
height: this.form.height height: this.form.height
}; };
@ -157,8 +166,8 @@ export default {
code: this.form.code, code: this.form.code,
_type: 'IscsPicture', _type: 'IscsPicture',
type: this.form.type, type: this.form.type,
z2: this.form.z2, z2: this.form.z2,
rotation: this.form.rotation, rotation: this.form.rotation
}; };
this.$emit('deleteDataModel', rectModel); this.$emit('deleteDataModel', rectModel);
}, },
@ -169,8 +178,8 @@ export default {
this.form = { this.form = {
code: '', code: '',
type: '', type: '',
z2: 0, z2: 0,
rotation: 0, rotation: 0,
width: 50, width: 50,
height: 50, height: 50,
x: 10, x: 10,

View File

@ -1,6 +1,9 @@
<template> <template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;"> <div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rule="rules" :model="addModel" label-width="120px" size="small" style="width: 100%;padding: 10px 50px;"> <el-form ref="form" :rule="rules" :model="addModel" label-width="120px" size="small" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="addModel.z2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item v-if="isUpdate" label="表格编号:" prop="code"> <el-form-item v-if="isUpdate" label="表格编号:" prop="code">
<el-input v-model="addModel.code" :disabled="true" /> <el-input v-model="addModel.code" :disabled="true" />
</el-form-item> </el-form-item>
@ -10,7 +13,7 @@
<el-form-item label="y坐标:" prop="y"> <el-form-item label="y坐标:" prop="y">
<el-input-number v-model="addModel.y" controls-position="right" :min="1" size="small" /> <el-input-number v-model="addModel.y" controls-position="right" :min="1" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="背景颜色:"> <el-form-item label="背景颜色:">
<el-color-picker v-model="addModel.bgColor" size="small" show-alpha /> <el-color-picker v-model="addModel.bgColor" size="small" show-alpha />
</el-form-item> </el-form-item>
<el-form-item label="文字颜色:"> <el-form-item label="文字颜色:">
@ -30,7 +33,7 @@
<el-form-item label="行数:" prop="rowNum"> <el-form-item label="行数:" prop="rowNum">
<el-input-number v-model="addModel.rowNum" controls-position="right" :min="1" size="small" @change="changeRowNum" /> <el-input-number v-model="addModel.rowNum" controls-position="right" :min="1" size="small" @change="changeRowNum" />
</el-form-item> </el-form-item>
<el-form-item label="行高:" prop="height"> <el-form-item label="行高:" prop="height">
<template v-for="(item, index) in addModel.rowHeightList"> <template v-for="(item, index) in addModel.rowHeightList">
<el-input-number :key="index" v-model="addModel.rowHeightList[index]" style="display: block; margin-bottom: 5px" controls-position="right" :min="1" size="small" /> <el-input-number :key="index" v-model="addModel.rowHeightList[index]" style="display: block; margin-bottom: 5px" controls-position="right" :min="1" size="small" />
</template> </template>
@ -58,13 +61,13 @@
<el-form-item label="表头字体大小:" prop="headerFontSize"> <el-form-item label="表头字体大小:" prop="headerFontSize">
<el-input-number v-model="addModel.headerFontSize" controls-position="right" :min="1" size="small" /> <el-input-number v-model="addModel.headerFontSize" controls-position="right" :min="1" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="表头字体加粗:" prop="headerFontWeight"> <el-form-item label="表头字体加粗:" prop="headerFontWeight">
<el-input-number v-model="addModel.headerFontWeight" controls-position="right" :min="400" size="small" /> <el-input-number v-model="addModel.headerFontWeight" controls-position="right" :min="400" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="表格字体大小:" prop="fontSize"> <el-form-item label="表格字体大小:" prop="fontSize">
<el-input-number v-model="addModel.fontSize" controls-position="right" :min="1" size="small" /> <el-input-number v-model="addModel.fontSize" controls-position="right" :min="1" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="表格字体加粗:" prop="fontWeight"> <el-form-item label="表格字体加粗:" prop="fontWeight">
<el-input-number v-model="addModel.fontWeight" controls-position="right" :min="400" size="small" /> <el-input-number v-model="addModel.fontWeight" controls-position="right" :min="400" size="small" />
</el-form-item> </el-form-item>
<el-form-item label="表格内容:" prop="tableData"> <el-form-item label="表格内容:" prop="tableData">
@ -72,19 +75,19 @@
<template v-for="(item, i) in addModel.columnWidthList"> <template v-for="(item, i) in addModel.columnWidthList">
<el-table-column :key="i" :label="'列'+(i + 1)" :prop="'column'+ (i + 1)" width="140px"> <el-table-column :key="i" :label="'列'+(i + 1)" :prop="'column'+ (i + 1)" width="140px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" size="small"/> <el-input v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" size="small" />
<div style="display:flex;justify-content:space-around;align-items: center;"> <div style="display:flex;justify-content:space-around;align-items: center;">
<div>背景</div> <div>背景</div>
<el-color-picker v-model="addModel.tableData[scope.$index]['bg'+(i+1)]" size="small" show-alpha /> <el-color-picker v-model="addModel.tableData[scope.$index]['bg'+(i+1)]" size="small" show-alpha />
</div> </div>
<div style="display:flex;justify-content:space-around;align-items: center;"> <div style="display:flex;justify-content:space-around;align-items: center;">
<div>颜色</div> <div>颜色</div>
<el-color-picker v-model="addModel.tableData[scope.$index]['color'+(i+1)]" size="small" /> <el-color-picker v-model="addModel.tableData[scope.$index]['color'+(i+1)]" size="small" />
</div> </div>
<div style="display:flex;justify-content:space-around;align-items: center;"> <div style="display:flex;justify-content:space-around;align-items: center;">
<div>加粗</div> <div>加粗</div>
<el-input-number v-model="addModel.tableData[scope.$index]['weight'+(i+1)]" :min="400" size="small" /> <el-input-number v-model="addModel.tableData[scope.$index]['weight'+(i+1)]" :min="400" size="small" />
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
@ -108,23 +111,24 @@ export default {
data() { data() {
return { return {
addModel:{ addModel:{
z2: '',
code: '', code: '',
x: 10, x: 10,
y: 10, y: 10,
columnNum: 2, columnNum: 2,
rowNum: 2, rowNum: 2,
columnWidthList: [50, 50], columnWidthList: [50, 50],
rowHeightList: [25, 25], rowHeightList: [25, 25],
bgColor: '', bgColor: '',
textColor: '', textColor: '',
borderColor: '', borderColor: '',
headerType: 'normal', headerType: 'normal',
tableData: [{}], tableData: [{}],
headerContextList: [], headerContextList: [],
headerFontSize: 14, headerFontSize: 14,
headerFontWeight: 450, headerFontWeight: 450,
fontSize: 12, fontSize: 12,
fontWeight: 450, fontWeight: 450
}, },
headerTypeList: [ headerTypeList: [
@ -195,26 +199,27 @@ export default {
this.showDeleteButton = true; this.showDeleteButton = true;
this.isUpdate = true; this.isUpdate = true;
this.addModel.code = model.code; this.addModel.code = model.code;
this.addModel.z2 = model.z2;
this.addModel.x = model.point.x; this.addModel.x = model.point.x;
this.addModel.y = model.point.y; this.addModel.y = model.point.y;
this.addModel.columnNum = model.columnNum; this.addModel.columnNum = model.columnNum;
this.addModel.rowNum = model.rowNum; this.addModel.rowNum = model.rowNum;
this.addModel.bgColor = model.bgColor; this.addModel.bgColor = model.bgColor;
this.addModel.textColor = model.textColor; this.addModel.textColor = model.textColor;
this.addModel.borderColor = model.borderColor; this.addModel.borderColor = model.borderColor;
this.addModel.columnWidthList = model.columnWidthList; this.addModel.columnWidthList = model.columnWidthList;
this.addModel.rowHeightList = model.rowHeightList; this.addModel.rowHeightList = model.rowHeightList;
this.addModel.headerType = model.headerType; this.addModel.headerType = model.headerType;
this.addModel.tableData = model.tableData; this.addModel.tableData = model.tableData;
this.addModel.headerFontSize = model.headerFontSize; this.addModel.headerFontSize = model.headerFontSize;
this.addModel.headerFontWeight = model.headerFontWeight, this.addModel.headerFontWeight = model.headerFontWeight;
this.addModel.fontSize = model.fontSize; this.addModel.fontSize = model.fontSize;
this.addModel.fontWeight = model.fontWeight, this.addModel.fontWeight = model.fontWeight;
this.addModel.headerContextList = model.headerContextList; this.addModel.headerContextList = model.headerContextList;
if (model.rowHeight||!model.rowHeightList) { if (model.rowHeight || !model.rowHeightList) {
this.addModel.rowHeightList = new Array(model.rowNum).fill(model.rowHeight); this.addModel.rowHeightList = new Array(model.rowNum).fill(model.rowHeight);
this.addModel.rowHeight = model.rowHeight = 0; this.addModel.rowHeight = model.rowHeight = 0;
} }
} }
} }
@ -237,20 +242,21 @@ export default {
}, },
columnNum: this.addModel.columnNum, columnNum: this.addModel.columnNum,
rowNum: this.addModel.rowNum, rowNum: this.addModel.rowNum,
columnWidthList: this.addModel.columnWidthList, columnWidthList: this.addModel.columnWidthList,
rowHeightList: this.addModel.rowHeightList, rowHeightList: this.addModel.rowHeightList,
headerType: this.addModel.headerType, headerType: this.addModel.headerType,
tableData: this.addModel.tableData, tableData: this.addModel.tableData,
_type: 'StateTable', _type: 'StateTable',
bgColor: this.addModel.bgColor, bgColor: this.addModel.bgColor,
textColor: this.addModel.textColor, textColor: this.addModel.textColor,
borderColor: this.addModel.borderColor, borderColor: this.addModel.borderColor,
headerFontSize: this.addModel.headerFontSize, headerFontSize: this.addModel.headerFontSize,
headerFontWeight: this.addModel.headerFontWeight, headerFontWeight: this.addModel.headerFontWeight,
fontSize: this.addModel.fontSize, fontSize: this.addModel.fontSize,
fontWeight: this.addModel.fontWeight, fontWeight: this.addModel.fontWeight,
headerContextList: this.addModel.headerContextList, headerContextList: this.addModel.headerContextList,
code: this.isUpdate ? this.addModel.code : getUID('StateTable', this.iscs.stateTableList) code: this.isUpdate ? this.addModel.code : getUID('StateTable', this.iscs.stateTableList),
z2: this.addModel.z2
}; };
this.$emit('createDataModel', model); this.$emit('createDataModel', model);
this.initPage(); this.initPage();
@ -268,14 +274,14 @@ export default {
code: this.addModel.code, code: this.addModel.code,
columnNum: this.addModel.columnNum, columnNum: this.addModel.columnNum,
rowNum: this.addModel.rowNum, rowNum: this.addModel.rowNum,
columnWidthList: this.addModel.columnWidthList, columnWidthList: this.addModel.columnWidthList,
rowHeightList: this.addModel.rowHeightList, rowHeightList: this.addModel.rowHeightList,
headerType: this.addModel.headerType, headerType: this.addModel.headerType,
tableData: this.addModel.tableData, tableData: this.addModel.tableData,
headerFontSize: this.addModel.headerFontSize, headerFontSize: this.addModel.headerFontSize,
headerFontWeight: this.addModel.headerFontWeight, headerFontWeight: this.addModel.headerFontWeight,
fontSize: this.addModel.fontSize, fontSize: this.addModel.fontSize,
fontWeight: this.addModel.fontWeight, fontWeight: this.addModel.fontWeight,
headerContextList: this.addModel.headerContextList, headerContextList: this.addModel.headerContextList,
_type: 'StateTable' _type: 'StateTable'
}; };
@ -287,6 +293,7 @@ export default {
this.buttonText = '立即创建'; this.buttonText = '立即创建';
this.showDeleteButton = false; this.showDeleteButton = false;
this.addModel = { this.addModel = {
z2: '',
code: '', code: '',
x: 10, x: 10,
y: 10, y: 10,
@ -294,14 +301,14 @@ export default {
borderColor: '', borderColor: '',
columnNum: 2, columnNum: 2,
rowNum: 2, rowNum: 2,
columnWidthList: [50, 50], columnWidthList: [50, 50],
rowHeightList: [25, 25], rowHeightList: [25, 25],
headerType: 'normal', headerType: 'normal',
tableData: [{}, {}], tableData: [{}, {}],
headerFontSize: 14, headerFontSize: 14,
headerFontWeight: 450, headerFontWeight: 450,
fontSize: 12, fontSize: 12,
fontWeight: 450, fontWeight: 450,
headerContextList: [] headerContextList: []
}; };
}, },
@ -323,17 +330,17 @@ export default {
} }
}, },
changeRowNum(num) { changeRowNum(num) {
const len = this.addModel.rowHeightList.length; const len = this.addModel.rowHeightList.length;
const length = this.addModel.tableData.length; const length = this.addModel.tableData.length;
if (length + 1 > num) { if (length + 1 > num) {
this.addModel.rowHeightList.splice(num - 1, len - num); this.addModel.rowHeightList.splice(num - 1, len - num);
this.addModel.tableData.splice(num - 2, length + 1 - num); this.addModel.tableData.splice(num - 2, length + 1 - num);
} else if (length + 1 < num) { } else if (length + 1 < num) {
for (let i = 0; i < num - length - 1; i++) { for (let i = 0; i < num - length - 1; i++) {
this.addModel.rowHeightList.push(25); this.addModel.rowHeightList.push(25);
this.addModel.tableData.push({}); this.addModel.tableData.push({});
} }
} }
} }
} }

View File

@ -42,7 +42,7 @@
@deleteDataModel="deleteDataModel" @deleteDataModel="deleteDataModel"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="圆形" name="IscsCircle"> <el-tab-pane label="圆形" name="IscsCircle">
<iscs-circle <iscs-circle
ref="iscsCircle" ref="iscsCircle"
style="width: 100%;height: 100%;" style="width: 100%;height: 100%;"
@ -50,7 +50,7 @@
@deleteDataModel="deleteDataModel" @deleteDataModel="deleteDataModel"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="三角形" name="IscsTriangle"> <el-tab-pane label="三角形" name="IscsTriangle">
<iscs-triangle <iscs-triangle
ref="iscsTriangle" ref="iscsTriangle"
style="width: 100%;height: 100%;" style="width: 100%;height: 100%;"
@ -58,7 +58,7 @@
@deleteDataModel="deleteDataModel" @deleteDataModel="deleteDataModel"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="图片" name="IscsPicture"> <el-tab-pane label="图片" name="IscsPicture">
<iscs-picture <iscs-picture
ref="iscsPicture" ref="iscsPicture"
style="width: 100%;height: 100%;" style="width: 100%;height: 100%;"
@ -66,7 +66,7 @@
@deleteDataModel="deleteDataModel" @deleteDataModel="deleteDataModel"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="表格" name="StateTable"> <el-tab-pane label="表格" name="StateTable">
<state-table <state-table
ref="stateTable" ref="stateTable"
style="width: 100%;height: 100%;" style="width: 100%;height: 100%;"
@ -74,6 +74,14 @@
@deleteDataModel="deleteDataModel" @deleteDataModel="deleteDataModel"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="箭头" name="IscsArrow">
<iscs-arrow
ref="iscsArrow"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs> </el-tabs>
</el-card> </el-card>
</div> </div>
@ -86,22 +94,23 @@ import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect'; import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button'; import IscsButton from '../icscComponents/button';
import IscsCircle from '../icscComponents/circle'; import IscsCircle from '../icscComponents/circle';
import IscsArrow from '../icscComponents/arrow';
import IscsTriangle from '../icscComponents/triangle'; import IscsTriangle from '../icscComponents/triangle';
import IscsPicture from '../icscComponents/picture'; import IscsPicture from '../icscComponents/picture';
import StateTable from '../icscComponents/stateTable'; import StateTable from '../icscComponents/stateTable';
export default { export default {
name: 'IscsOperate', name: 'IscsOperate',
components: { components: {
IscsRect, IscsRect,
IscsLine, IscsLine,
IscsText, IscsText,
IscsButton, IscsButton,
IscsCircle, IscsArrow,
IscsTriangle, IscsCircle,
IscsPicture, IscsTriangle,
StateTable IscsPicture,
StateTable
}, },
mixins: [ mixins: [
], ],

View File

@ -16,14 +16,14 @@
<span>{{ covertFaultType(scope.row) }}</span> <span>{{ covertFaultType(scope.row) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="condition" label="触发方式"> <!--<el-table-column prop="condition" label="触发方式">-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
<span>{{ scope.row.condition.type === 'DEVICE'?'设备':'时间' }}</span> <!--<span>{{ scope.row.condition.type === 'DEVICE'?'设备':'时间' }}</span>-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column prop="condition" label="触发设备" width="150"> <el-table-column prop="condition" label="触发设备" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ `${deviceMap[scope.row.condition.triggerDeviceType]}${formatNameByCode(scope.row.condition.triggerDeviceCode)}` }}</span> <span>{{ `${deviceMap[scope.row.condition.triggerDeviceType] || ''}${formatNameByCode(scope.row.condition.triggerDeviceCode)}` }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="condition" label="触发状态"> <el-table-column prop="condition" label="触发状态">
@ -36,7 +36,7 @@
<span>{{ `${formatNameByCode(scope.row.condition.triggerAssociatedDeviceCode)}` }}</span> <span>{{ `${formatNameByCode(scope.row.condition.triggerAssociatedDeviceCode)}` }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="condition.triggeringTime" label="触发时间" /> <el-table-column prop="condition.triggerTime" label="触发时间" width="180" />
<el-table-column prop="triggeringTime" label="故障状态"> <el-table-column prop="triggeringTime" label="故障状态">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.triggeringTime? '已触发': '未触发' }}</span> <span>{{ scope.row.triggeringTime? '已触发': '未触发' }}</span>
@ -61,16 +61,16 @@
<el-input v-model="targetDevice.name || targetDevice.code" disabled size="small" class="inputModelClass" style="width: 200px;" /> <el-input v-model="targetDevice.name || targetDevice.code" disabled size="small" class="inputModelClass" style="width: 200px;" />
<!--<el-button :type="field === 'targetActive' ? 'danger' : 'primary'" size="small" @click="hover('targetActive')">{{ $t('map.activate') }}</el-button>--> <!--<el-button :type="field === 'targetActive' ? 'danger' : 'primary'" size="small" @click="hover('targetActive')">{{ $t('map.activate') }}</el-button>-->
</el-form-item> </el-form-item>
<el-form-item label="触发方式"> <!--<el-form-item label="触发方式">-->
<el-select v-model="triggerMode" size="small" style="width: 200px;" @change="changeTriggerMode"> <!--<el-select v-model="triggerMode" size="small" style="width: 200px;" @change="changeTriggerMode">-->
<el-option <!--<el-option-->
v-for="item in triggerModeList" <!--v-for="item in triggerModeList"-->
:key="item.value" <!--:key="item.value"-->
:label="item.label" <!--:label="item.label"-->
:value="item.value" <!--:value="item.value"-->
/> <!--/>-->
</el-select> <!--</el-select>-->
</el-form-item> <!--</el-form-item>-->
<el-form-item label="故障类型"> <el-form-item label="故障类型">
<el-select v-model="faultRule.faultType" placeholder="请选择" class="inputModelClass" size="small" style="width: 200px;"> <el-select v-model="faultRule.faultType" placeholder="请选择" class="inputModelClass" size="small" style="width: 200px;">
<el-option <el-option
@ -97,13 +97,13 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="triggerMode === 'DEVICE' && faultRule.condition.triggerDeviceType === 'TRAIN' && faultRule.condition.triggerDeviceStatus === 'Section'" label="关联设备"> <el-form-item v-if="triggerMode === 'DEVICE'" label="关联设备">
<el-input v-model="triggerAssociatedDevice" size="small" disabled class="inputModelClass" style="width: 140px;" /> <el-input v-model="triggerAssociatedDevice" size="small" disabled class="inputModelClass" style="width: 140px;" />
<el-button :type="field === 'triggerAssociated'? 'danger': 'primary'" size="small" @click="hover('triggerAssociated')">{{ $t('map.activate') }}</el-button> <el-button :type="field === 'triggerAssociated'? 'danger': 'primary'" size="small" @click="hover('triggerAssociated')">{{ $t('map.activate') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="triggerMode === 'TIME'" label="触发时间"> <el-form-item v-if="triggerMode === 'TIME'" label="触发时间">
<el-date-picker <el-date-picker
v-model="faultRule.condition.triggeringTime" v-model="faultRule.condition.triggerTime"
size="small" size="small"
format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@ -155,7 +155,7 @@ export default {
triggerDeviceStatus:'', triggerDeviceStatus:'',
triggerDeviceType :'', triggerDeviceType :'',
type:'DEVICE', type:'DEVICE',
triggeringTime: '', triggerTime: '',
triggerAssociatedDeviceCode: '' triggerAssociatedDeviceCode: ''
} }
}, },
@ -232,6 +232,9 @@ export default {
return name; return name;
}, },
formatTriggerStatus(condition) { formatTriggerStatus(condition) {
if (!condition.triggerDeviceType) {
return '';
}
const faultStatus = FaultStatusEnum[condition.triggerDeviceType]; const faultStatus = FaultStatusEnum[condition.triggerDeviceType];
return faultStatus[condition.triggerDeviceStatus]; return faultStatus[condition.triggerDeviceStatus];
}, },
@ -314,6 +317,7 @@ export default {
this.faultTypeList = deviceFaultType[this.targetDevice._type]; this.faultTypeList = deviceFaultType[this.targetDevice._type];
this.faultRule.targetDeviceCode = this.targetDevice.code; this.faultRule.targetDeviceCode = this.targetDevice.code;
this.faultRule.targetDeviceType = this.covertType(this.targetDevice._type); this.faultRule.targetDeviceType = this.covertType(this.targetDevice._type);
this.faultRule.faultType = (this.faultTypeList[0] || {}).value;
this.$nextTick(()=>{ this.$nextTick(()=>{
this.dragEvent(); this.dragEvent();
}); });
@ -332,7 +336,7 @@ export default {
triggerDeviceStatus:'', triggerDeviceStatus:'',
triggerDeviceType :'', triggerDeviceType :'',
type:'DEVICE', type:'DEVICE',
triggeringTime: '', triggerTime: '',
triggerAssociatedDeviceCode: '' triggerAssociatedDeviceCode: ''
} }
}; };
@ -391,7 +395,7 @@ export default {
this.$messageBox('请选择故障类型'); this.$messageBox('请选择故障类型');
return; return;
} }
if (this.triggerMode === 'TIME' && this.faultRule.condition.triggeringTime == '') { if (this.triggerMode === 'TIME' && this.faultRule.condition.triggerTime == '') {
this.$messageBox('请选择触发时间'); this.$messageBox('请选择触发时间');
return; return;
} }
@ -408,7 +412,7 @@ export default {
triggerDeviceStatus:this.faultRule.condition.triggerDeviceStatus || null, triggerDeviceStatus:this.faultRule.condition.triggerDeviceStatus || null,
triggerDeviceType :this.faultRule.condition.triggerDeviceType || null, triggerDeviceType :this.faultRule.condition.triggerDeviceType || null,
type:this.faultRule.condition.type, type:this.faultRule.condition.type,
triggeringTime: this.faultRule.condition.triggeringTime || null, triggerTime: this.faultRule.condition.triggerTime || null,
triggerAssociatedDeviceCode: this.faultRule.condition.triggerAssociatedDeviceCode || null triggerAssociatedDeviceCode: this.faultRule.condition.triggerAssociatedDeviceCode || null
} }
}; };
@ -420,7 +424,7 @@ export default {
}); });
}, },
deviceSelect(em) { deviceSelect(em) {
if (this.field.toUpperCase() === 'triggerAssociated'.toUpperCase()) { if (this.field.toUpperCase() === 'triggerAssociated'.toUpperCase() && em._type.toUpperCase() === 'Section'.toUpperCase()) {
// if (em._type == 'Station') { // if (em._type == 'Station') {
// em = this.$store.getters['map/getDeviceByCode'](em.zcCode); // em = this.$store.getters['map/getDeviceByCode'](em.zcCode);
// } // }
@ -432,7 +436,7 @@ export default {
this.triggerAssociatedDevice = em._type + '-' + em.name; this.triggerAssociatedDevice = em._type + '-' + em.name;
} }
this.faultRule.condition.triggerAssociatedDeviceCode = em.code; this.faultRule.condition.triggerAssociatedDeviceCode = em.code;
} else if (this.field.toUpperCase() === 'triggerActive'.toUpperCase()) { } else if (this.field.toUpperCase() === 'triggerActive'.toUpperCase() && em._type.toUpperCase() === 'Train'.toUpperCase()) {
this.faultRule.condition.triggerDeviceType = this.covertType(em._type); this.faultRule.condition.triggerDeviceType = this.covertType(em._type);
this.faultRule.condition.triggerDeviceCode = em.code; this.faultRule.condition.triggerDeviceCode = em.code;
if (em._type.toUpperCase() === 'Section'.toUpperCase() && em.parentName) { if (em._type.toUpperCase() === 'Section'.toUpperCase() && em.parentName) {
@ -451,7 +455,7 @@ export default {
}); });
} }
this.field = ''; this.field = '';
this.faultRule.condition.triggerDeviceStatus = ''; this.faultRule.condition.triggerDeviceStatus = (this.triggerStatusList[0] || {}).value;
} }
}, },
dragEvent() { dragEvent() {