# 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({
zlevel: model.zlevel,
z: model.z,
z2: model.z2 || 0,
shape: {
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 iscsAPF from '@/assets/iscs_picture/iscs_APF.png';
import drum from '@/assets/iscs_picture/drum.png';
import exhaustFanGray from '@/assets/iscs_picture/exhaustFan-gray.png'
import exhaustFanGreen from '@/assets/iscs_picture/exhaustFan-green.png'
import exhaustFanGray from '@/assets/iscs_picture/exhaustFan-gray.png';
import exhaustFanGreen from '@/assets/iscs_picture/exhaustFan-green.png';
import waterCooler from '@/assets/iscs_picture/ZSDF533.png';
import textBgBluePoint from '@/assets/iscs_picture/textBgBluePoint.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 toDown from '@/assets/iscs_picture/to-down.png';
import lift from '@/assets/iscs_picture/lift.png';
import dewateringBlue from '@/assets/iscs_picture/dewatering-blue.png'
import dewateringGray from '@/assets/iscs_picture/dewatering-gray.png'
import dewateringPurple from '@/assets/iscs_picture/dewatering-purple.png'
import dewateringBlue from '@/assets/iscs_picture/dewatering-blue.png';
import dewateringGray from '@/assets/iscs_picture/dewatering-gray.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 = {
'psdLeft': psdLeft,
@ -66,7 +75,16 @@ const pictureObj = {
dewateringBlue,
dewateringGray,
dewateringPurple,
kongzhixiang
kongzhixiang,
exhaustFanLeft,
exhaustFanRight,
iscsMD,
iscsMDRect,
iscsRAFEAFGreen,
iscsRAFEAFGray,
iscsSEF,
iscsValue,
fanCoil
};
export default class Picture extends Group {
constructor(device) {
@ -88,9 +106,9 @@ export default class Picture extends Group {
this.imageButton = new Image({
zlevel: model.zlevel,
z: model.z,
z2: model.z2||0,
origin: [model.width/2, model.height/2],
rotation: (model.rotation||0)*Math.PI/180,
z2: model.z2 || 0,
origin: [model.width / 2, model.height / 2],
rotation: (model.rotation || 0) * Math.PI / 180,
style: {
x: 0,
y: 0,

View File

@ -1,9 +1,9 @@
import Group from 'zrender/src/container/Group';
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 Circle from 'zrender/src/graphic/shape/Circle';
import { merge } from 'lodash';
// import { merge } from 'lodash';
const stateMap = {
slidingDoorEmergencyDoorOpenMalfunction : '滑动门&应急门开门故障',
slidingDoorEmergencyDoorCloseMalfunction: '滑动门&应急门关门故障',
@ -168,7 +168,7 @@ export default class StateTable extends Group {
}
create() {
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.contextsArr = [];
@ -177,42 +177,43 @@ export default class StateTable extends Group {
position: [model.point.x, model.point.y]
});
let rowNum = model.rowNum;
let contentIndex = 2;
// let rowNum = model.rowNum;
// let contentIndex = 2;
if (model.headerType === 'none') {
rowNum = model.rowNum - 1;
contentIndex = 1;
// rowNum = model.rowNum - 1;
// contentIndex = 1;
}
if (model.rowHeight||!model.rowHeightList) {
if (model.rowHeight || !model.rowHeightList) {
model.rowHeightList = new Array(model.rowNum).fill(model.rowHeight);
}
let sumRowSize = 0;
model.rowHeightList.forEach((height,i) => {
model.rowHeightList.forEach((height, i) => {
const rects = [];
let sumColumnSize = 0;
let isMegerHeader = model.headerType === 'merge' && i == 0;
const isMegerHeader = model.headerType === 'merge' && i == 0;
if (model.headerType === 'none' && i == 0) {
return;
}
model.columnWidthList.forEach((width,j) => {
const defBg = model.bgColor||'rgba(0,0,0,0)'
model.columnWidthList.forEach((width, j) => {
const defBg = model.bgColor || 'rgba(0,0,0,0)';
const rect = new Rect({
zlevel: this.zlevel,
z: this.z,
z2: model.z2 || 0,
shape: {
x: isMegerHeader? 0: sumColumnSize,
x: isMegerHeader ? 0 : sumColumnSize,
y: sumRowSize,
width: isMegerHeader? sumWidth: width,
width: isMegerHeader ? sumWidth : width,
height
},
style: {
stroke: model.borderColor || '#FFF',
lineWidth: 1,
fill: model.tableData[i-1]? model.tableData[i-1]['bg'+(j+1)]||defBg : defBg
fill: model.tableData[i - 1] ? model.tableData[i - 1]['bg' + (j + 1)] || defBg : defBg
}
});
@ -223,19 +224,18 @@ export default class StateTable extends Group {
this.rectsArr.push(rects);
sumRowSize += height;
})
});
this.header = [];
if (model.headerType === 'merge') {
const header = new Text({
zlevel: model.zlevel,
z: model.z + 1,
z2: model.z2 || 0,
style: {
x: sumWidth / 2,
y: model.rowHeightList[0] / 2,
fontWeight: model.headerFontWeight||'normal',
fontWeight: model.headerFontWeight || 'normal',
fontSize: model.headerFontSize,
fontFamily: 'consolas',
text: model.headerContextList[0],
@ -254,10 +254,11 @@ export default class StateTable extends Group {
const header = new Text({
zlevel: model.zlevel,
z: model.z + 1,
z2: model.z2 || 0,
style: {
x: item / 2 + width,
y: model.rowHeightList[0] / 2,
fontWeight: model.headerFontWeight||'normal',
fontWeight: model.headerFontWeight || 'normal',
fontSize: model.headerFontSize,
fontFamily: 'consolas',
text: model.headerContextList[i],
@ -275,7 +276,7 @@ export default class StateTable extends Group {
}
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 contexts = [];
model.columnWidthList.forEach((elem, j) => {
@ -283,10 +284,11 @@ export default class StateTable extends Group {
if (rect) {
if (stateMap[item['column' + (j + 1)]] &&
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({
zlevel: model.zlevel,
z: model.z + 1,
z2: model.z2 || 0,
_subType: stateMap[item['column' + (j + 1)]],
shape: {
cx: rect.shape.x + rect.shape.width / 2,
@ -303,16 +305,17 @@ export default class StateTable extends Group {
const bg = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].background : null;
const textPadding = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].textPadding : 0;
const context = stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].default : item['column' + (j + 1)];
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 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 contextWeight = stateMap[item['column' + (j + 1)]] ? 'normal' : item['weight' + (j + 1)] || this.model.fontWeight || 'normal';
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')
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;
if (stateMap[item['column' + (j + 1)]] && stateMap[item['column' + (j + 1)]].unit) {
text = new Text({
zlevel: model.zlevel,
z: model.z + 1,
z2: model.z2 || 0,
_subType: stateMap[item['column' + (j + 1)]],
style:{
x: rect.shape.x + rect.shape.width / 2,
@ -323,10 +326,10 @@ export default class StateTable extends Group {
text: `{context|${context}} {unit|${unit}}`,
rich: {
context: {
textFill: contextColor,
textFill: contextColor
},
unit: {
textFill: unitColor,
textFill: unitColor
}
},
textBackgroundColor: bg,
@ -341,6 +344,7 @@ export default class StateTable extends Group {
text = new Text({
zlevel: model.zlevel,
z: model.z + 1,
z2: model.z2 || 0,
_subType: stateMap[item['column' + (j + 1)]],
style:{
x: rect.shape.x + rect.shape.width / 2,
@ -364,7 +368,7 @@ export default class StateTable extends Group {
}
}
});
this.contextsArr.push(contexts)
this.contextsArr.push(contexts);
});
this.add(this.grouper);
}

View File

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

View File

@ -501,6 +501,13 @@ class Jlmap {
psdDevice.fault = elem.fault;
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);
if (elem.dispose) {

View File

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

View File

@ -103,7 +103,8 @@ export default {
signalParamList: [],
stationParamList: [],
standParamList: [],
routeParamList: []
routeParamList: [],
directionRodParamList: []
};
},
computed: {
@ -153,6 +154,9 @@ export default {
case 'StationStand':
this.handleStandMenu();
break;
case 'DirectionRod':
this.handleDirectionRodMenu();
break;
}
}
}).catch((error) => {
@ -368,6 +372,32 @@ export default {
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() {
this.deviceHighLight(this.oldDevice, false);
if (this.oldClickObj) {
@ -479,7 +509,7 @@ export default {
this.clearAllMenuShow();
},
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_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 },
@ -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_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 }
] : [];
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_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_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_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_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 },
@ -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_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_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' ? [
{ 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_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() {
this.routeParamList = [];

View File

@ -1,6 +1,9 @@
<template>
<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-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-input-number v-model="form.fontSize" controls-position="right" :min="1" size="small" />
</el-form-item>
@ -57,6 +60,7 @@ export default {
showDeleteButton: false,
form: {
code: '',
z2: '',
fillColor: '#fff',
borderWidth: 0,
fontSize: 10,
@ -91,6 +95,7 @@ export default {
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.z2 = model.z2;
this.form.fillColor = model.fillColor;
this.form.borderWidth = model.borderWidth;
this.form.fontSize = model.fontSize;
@ -114,8 +119,9 @@ export default {
x: this.form.x,
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',
z2: this.form.z2,
fillColor: this.form.fillColor,
borderWidth: this.form.borderWidth,
fontSize: this.form.fontSize,
@ -152,6 +158,7 @@ export default {
this.showDeleteButton = false;
this.form = {
code: '',
z2: '',
fillColor: '',
borderWidth: 1,
fontSize: 10,

View File

@ -77,6 +77,8 @@ export default {
{ name: '灰色-右侧-鼓风机', value: 'blowerGrayRight'},
{ name: '灰色-排风机', value: 'exhaustFanGray' },
{ name: '绿色-排风机', value: 'exhaustFanGreen' },
{ name: '排风机左侧', value: 'exhaustFanLeft' },
{ name: '排风机右侧', value: 'exhaustFanRight' },
{ name: '冷水机', value: 'waterCooler'},
{ name: '顶部排风机', value: 'ventilationFan'},
{ name: '文字蓝色背景', value: 'textBgBluePoint'},
@ -87,7 +89,14 @@ export default {
{ name: '蓝色-排水', value: 'dewateringBlue' },
{ name: '灰色-电梯', value: 'dewateringGray' },
{ name: '紫色-电梯', value: 'dewateringPurple' },
{ name: '活塞风井', value: 'kongzhixiang'}
{ 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: {
@ -158,7 +167,7 @@ export default {
_type: 'IscsPicture',
type: this.form.type,
z2: this.form.z2,
rotation: this.form.rotation,
rotation: this.form.rotation
};
this.$emit('deleteDataModel', rectModel);
},

View File

@ -1,6 +1,9 @@
<template>
<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-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-input v-model="addModel.code" :disabled="true" />
</el-form-item>
@ -72,7 +75,7 @@
<template v-for="(item, i) in addModel.columnWidthList">
<el-table-column :key="i" :label="'列'+(i + 1)" :prop="'column'+ (i + 1)" width="140px">
<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>背景</div>
<el-color-picker v-model="addModel.tableData[scope.$index]['bg'+(i+1)]" size="small" show-alpha />
@ -108,6 +111,7 @@ export default {
data() {
return {
addModel:{
z2: '',
code: '',
x: 10,
y: 10,
@ -124,7 +128,7 @@ export default {
headerFontSize: 14,
headerFontWeight: 450,
fontSize: 12,
fontWeight: 450,
fontWeight: 450
},
headerTypeList: [
@ -195,6 +199,7 @@ export default {
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.z2 = model.z2;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
this.addModel.columnNum = model.columnNum;
@ -207,11 +212,11 @@ export default {
this.addModel.headerType = model.headerType;
this.addModel.tableData = model.tableData;
this.addModel.headerFontSize = model.headerFontSize;
this.addModel.headerFontWeight = model.headerFontWeight,
this.addModel.headerFontWeight = model.headerFontWeight;
this.addModel.fontSize = model.fontSize;
this.addModel.fontWeight = model.fontWeight,
this.addModel.fontWeight = model.fontWeight;
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.rowHeight = model.rowHeight = 0;
}
@ -250,7 +255,8 @@ export default {
fontSize: this.addModel.fontSize,
fontWeight: this.addModel.fontWeight,
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.initPage();
@ -287,6 +293,7 @@ export default {
this.buttonText = '立即创建';
this.showDeleteButton = false;
this.addModel = {
z2: '',
code: '',
x: 10,
y: 10,

View File

@ -74,6 +74,14 @@
@deleteDataModel="deleteDataModel"
/>
</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-card>
</div>
@ -86,11 +94,11 @@ import IscsText from '../icscComponents/text';
import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
import IscsCircle from '../icscComponents/circle';
import IscsArrow from '../icscComponents/arrow';
import IscsTriangle from '../icscComponents/triangle';
import IscsPicture from '../icscComponents/picture';
import StateTable from '../icscComponents/stateTable';
export default {
name: 'IscsOperate',
components: {
@ -98,6 +106,7 @@ export default {
IscsLine,
IscsText,
IscsButton,
IscsArrow,
IscsCircle,
IscsTriangle,
IscsPicture,

View File

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