Merge remote-tracking branch 'origin/dev' into test

This commit is contained in:
fan 2020-01-20 10:06:48 +08:00
commit 12dab4eea4
80 changed files with 981 additions and 389 deletions

View File

@ -157,3 +157,11 @@ export function copyMapAs(mapId, data) {
data: data
});
}
/** 检测仿真数据是否存在错误 */
export function simulationCheck(id) {
return request({
url: `/api/map/${id}/simulationCheck`,
method: 'get'
});
}

View File

@ -203,5 +203,6 @@ export default {
enterPermissionNumInt:'number must interger',
perpetual: 'perpetual',
buyingTips: 'Function upgrade, stay tuned!',
permissionAllNum:'Total permissions'
permissionAllNum:'Total permissions',
set: 'Set'
};

View File

@ -574,5 +574,13 @@ export default {
continueProtect: 'Continue protect',
continueProtectList: 'Continue protect list',
saveRoute: 'Save route',
updataRoute: 'Updata route'
updataRoute: 'Updata route',
leftStopPointOffsetFromStart: 'LeftStopPointOffsetFromStart:',
rightStopPointOffsetFromTerminal: 'RightStopPointOffsetFromTerminal:',
sectionRelationCheck: 'Section relation check',
batchSettings: 'Batch settings',
logicalSectionStartOffset: 'Logical section start offset:',
logicalSectionEndOffset: 'Logical section start offset:',
associateSwitchSection: 'Associate switch section:',
failedToSetParkingPointOffset: 'failed to set parking point offset: the actual length of the section is less than the offset distance.'
};

View File

@ -122,5 +122,7 @@ export default {
whetherToCopyData: 'Whether to copy data',
copy:'Copy',
lineType:'Line Type',
belongsToMap: 'Belongs to map'
belongsToMap: 'Belongs to map',
simulationDataCheck: 'Simulation data check',
simulationDataIsValidated: 'The simulation data is validated'
};

View File

@ -229,5 +229,6 @@ export default {
updateRealDeviceConnectionSuccess: 'Update real device connection successfully!',
updateRealDeviceConnectionFailed: 'Update real device connection failed!',
createProjectDeviceSuccessfully: 'Create project device successfully!',
deviceCodeRepeatTip: 'The device code already exists, please modify the device code and created!'
deviceCodeRepeatTip: 'The device code already exists, please modify the device code and created!',
stopPointOffsetTip: 'Set block stop offset in bulk successfully!'
};

View File

@ -203,5 +203,6 @@ export default {
enterPermissionNumInt:'权限数量需为整数',
perpetual: '永久',
buyingTips: '功能升级中, 敬请期待!',
permissionAllNum:'权限总数'
permissionAllNum:'权限总数',
set: '设 置'
};

View File

@ -568,5 +568,13 @@ export default {
continueProtect: '延续保护',
continueProtectList: '延续保护列表',
saveRoute: '保存进路',
updataRoute: '修改进路'
updataRoute: '修改进路',
leftStopPointOffsetFromStart: '左向停车点距始端偏移距离:',
rightStopPointOffsetFromTerminal: '右向停车点距终端偏移距离:',
sectionRelationCheck: '区段关系校验',
batchSettings: '批量设置',
logicalSectionStartOffset: '逻辑区段起点偏移:',
logicalSectionEndOffset: '逻辑区段终点偏移:',
associateSwitchSection: '关联道岔区段:',
failedToSetParkingPointOffset: '设置停车点偏移量失败:区段实际长度小于偏移距离。'
};

View File

@ -126,5 +126,7 @@ export default {
whetherToCopyData: '是否复制数据',
copy:'复制',
lineType:'线路类型',
belongsToMap: '所属地图'
belongsToMap: '所属地图',
simulationDataCheck: '仿真数据校验',
simulationDataIsValidated: '仿真数据校验通过!'
};

View File

@ -229,6 +229,7 @@ export default {
updateRealDeviceConnectionSuccess: '更新真实设备连接关系成功!',
updateRealDeviceConnectionFailed: '更新真实设备连接关系失败!',
createProjectDeviceSuccessfully: '创建项目设备成功!',
deviceCodeRepeatTip: '已存在该设备编号,请修改设备编号后创建!'
deviceCodeRepeatTip: '已存在该设备编号,请修改设备编号后创建!',
stopPointOffsetTip: '批量设置区段停车点偏移量成功!'
};

View File

@ -6,6 +6,7 @@ import Painter from './painter';
import deviceType from './constant/deviceType';
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
import { updateIscsData } from './utils/parser';
import store from '@/store';
const renderer = 'canvas';
const devicePixelRatio = 1;
@ -120,7 +121,7 @@ class Iscs {
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
updateIscsData(elem);
updateIscsData(store.state.iscs, elem);
const oDevice = this.iscsDevice[code] || deviceFactory(type, elem);
const nDevice = deviceFactory(type, Object.assign(oDevice.model || {}, elem));
delete this.iscsDevice[code];

View File

@ -13,7 +13,6 @@ export default class Vidicon extends Group {
this.create();
}
create() {
console.log(this.model);
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]

View File

@ -31,7 +31,7 @@ export default class chiller extends Group {
},
style: {
stroke:this.model.color,
lineWidth:2
lineWidth:1
}
});
this.circle1 = new Circle({
@ -81,7 +81,7 @@ export default class chiller extends Group {
},
style: {
stroke:this.model.color,
lineWidth:2
lineWidth:1
}
});
@ -104,7 +104,7 @@ export default class chiller extends Group {
},
style: {
stroke:this.model.color,
lineWidth:2
lineWidth:1
}
});
@ -127,7 +127,7 @@ export default class chiller extends Group {
},
style: {
stroke:this.model.color,
lineWidth:2
lineWidth:1
}
});

View File

@ -0,0 +1,27 @@
import Group from 'zrender/src/container/Group';
import createPathSvg from '../components/pathsvg';
export default class coolTower extends Group {
constructor(device) {
super();
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this._type = device.model._type;
this.code = device.model.code;
this.create();
}
create() {
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.path = createPathSvg(this.model);
this.add(this.grouper);
this.grouper.add(this.path);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -26,7 +26,7 @@ export default class frozenPump extends Group {
},
style: {
stroke: this.model.color,
lineWidth:2
lineWidth:1
}
});
this.triangle = new Polygon({

View File

@ -0,0 +1,27 @@
import Group from 'zrender/src/container/Group';
import createPathSvg from '../components/pathsvg';
export default class jetFan extends Group {
constructor(device) {
super();
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this._type = device.model._type;
this.code = device.model.code;
this.create();
}
create() {
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.path = createPathSvg(this.model);
this.add(this.grouper);
this.grouper.add(this.path);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -0,0 +1,27 @@
import Group from 'zrender/src/container/Group';
import createPathSvg from '../components/pathsvg';
export default class orbitalVentilator extends Group {
constructor(device) {
super();
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this._type = device.model._type;
this.code = device.model.code;
this.create();
}
create() {
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.path = createPathSvg(this.model);
this.add(this.grouper);
this.grouper.add(this.path);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -0,0 +1,27 @@
import Group from 'zrender/src/container/Group';
import createPathSvg from '../components/pathsvg';
export default class tunnelFan extends Group {
constructor(device) {
super();
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this._type = device.model._type;
this.code = device.model.code;
this.create();
}
create() {
this.grouper = new Group({
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
this.path = createPathSvg(this.model);
this.add(this.grouper);
this.grouper.add(this.path);
}
setModel(dx, dy) {
this.model.point.x += dx;
this.model.point.y += dy;
}
}

View File

@ -4,25 +4,41 @@ const map = {
scale: [0.02, 0.02],
path: 'M917.749663 10.405886C911.585184 3.624959 902.758306 0.937984 893.583268 0 431.820819 9.342974 145.285208 116.940772 41.943153 319.811507-35.676029 472.166287 16.281719 643.911525 70.123626 722.186067c6.225919 9.072638 16.609276 14.909436 27.627513 13.783036a31.850488 31.850488 0 0 0 26.316794-16.261116c63.201265-112.455653 187.985875-295.958457 368.517032-386.613155-68.669424 89.593834-177.418197 237.273031-282.726332 404.778911-10.301438 14.069757-87.388139 125.62429-48.435189 262.901697A31.913976 31.913976 0 0 0 192.041037 1023.999754a31.014905 31.014905 0 0 0 8.765438-1.228799 32.00204 32.00204 0 0 0 21.893114-39.546871c-22.958074-80.855021 6.901758-152.575963 25.661434-186.695635 128.880609 54.415347 249.40538 53.637107 350.085036-2.785279 172.380119-96.645097 282.562492-351.743916 327.454642-758.210379a32.255992 32.255992 0 0 0-8.151038-25.126905zM567.377907 737.873743c-81.51038 45.690869-177.029078 46.940149-284.385212 3.788799 15.421436-24.104954 30.822393-47.513589 46.141429-70.533103l219.197387-31.436793a32.01228 32.01228 0 0 0-9.011198-63.385584l-161.710041 23.203834c13.250557-19.169275 26.173434-37.580791 38.871031-55.521267a30.595065 30.595065 0 0 0 6.184958-0.614399l159.272922-31.989753a32.028664 32.028664 0 0 0 24.985594-37.662711 31.651832 31.651832 0 0 0-37.498871-25.108474l-98.488296 19.783676c81.96094-111.742949 141.066206-183.898068 142.069726-185.139156a32.11468 32.11468 0 0 0 2.375679-37.531639 31.743992 31.743992 0 0 0-34.815991-13.844477c-85.503979 22.001659-161.484761 63.657969-227.860426 114.608101v-58.490866a31.856632 31.856632 0 1 0-63.713264 0v112.672741c-22.630395 21.202939-43.868149 43.231222-63.713265 65.574896v-101.715943a31.846392 31.846392 0 1 0-63.692785 0v179.458004c0 0.24576 0.12288 0.43008 0.12288 0.67584-24.289274 32.665592-45.711349 64.614384-63.897585 94.064618-28.344313-67.071984-54.251507-181.637076 0.83968-289.761211C186.593358 176.322518 448.921615 78.374893 858.337197 64.968688c-44.646389 363.374505-142.479326 589.653874-290.95929 672.905055z m339.353518-145.653725c-10.874877-21.626875-45.957109-21.626875-56.852466 0-19.189755 38.256631-114.872292 232.120264-114.872293 294.625209 0 75.612142 64.286705 137.154527 143.298526 137.154527s143.319006-61.542385 143.319006-137.154527c0-62.504945-95.703017-256.368578-114.892773-294.625209z m-28.426233 367.574952c-43.909109 0-79.605741-32.727032-79.605741-72.949743 0-27.770873 40.44799-123.96541 79.605741-207.09371 39.157751 83.1283 79.626221 179.322837 79.626221 207.09371 0 40.22271-35.696631 72.949742-79.626221 72.949743z'
},
brakeMachine: {
BrakeMachine: {
width: 159,
path: 'M160,101H1V82l46.013-.289c8.016-5.064,38.681-23.717,63.8-29.188C85.244,47.006,53.8,27.621,46.55,23H1V4L160,3V23H141.512c1.7,4.784,3.5,23.827-9.675,29.436,12.815,5.166,11.856,22.742,10.254,28.676L160,81v20ZM22,87H10v9l12,0.083V87ZM22,9H10v9l12,0.083V9ZM154,9H29v9.132L154,19V9ZM132.222,23H58.7c9.442,5.485,55.744,31.358,70.3,20C134.869,38.421,132.945,26.523,132.222,23Zm-2.953,39c-14.3-11.122-59.136,13.454-69.891,19.633l73.284-.461C133.452,76.9,134.758,66.27,129.269,62ZM154,87H29v9.132L154,97V87Z'
},
ticketMachine: {
TicketMachine: {
width: 107,
path: 'M102,42H96V24h6V42ZM83,27h6v9H83V27ZM22,38H16V29h6v9Zm7-4V27H44V43H26V36h5v2h8V32H34v2H29Zm32,0V27H76V43H58V36h5v2h8V32H66v2H61Zm24,6V50H14V42h4v4H81V40h4ZM95,61H89V45h6V61ZM85,21H25v6H19V16H91v8H85V21ZM12,60V52H85v8H81V56H16v4H12Zm98.509,65L91,138.919V140H4V63h6v3h8V61h5v5h8V61h5v5h5V61h5v5H57V61h5v5h7V58h5v8h4V63h5v8H10v2H85V63h6v68.548l14-9.988V9H20.251l-0.659,1H102V21H96V14H17V13.935L16.957,14H17V28H11V15.089L9.644,14.2,16,4.547V3h1.019l0.327-.5L18.1,3H111V125h-0.491ZM85,78H10v56H85V78ZM31,95l8,23H33l-1.826-6H25.826L24,118H18l8-23h5Zm-1.044,13L28.5,103.214,27.044,108h2.913Zm12.9-14L46.5,108.786,50.143,94H55l-6.476,23H44.476L38,94h4.857ZM60,95h4l4,13.333L72,95h5l2,22H75l-1.3-14.326L70,115H66l-3.7-12.326L61,117H57l2-22h1ZM10,59H4V31h6V59Z'
},
semiAutomaticTicketMachine: {
SemiAutomaticTicketMachine: {
width: 107,
path: 'M169,104h-6V86h6v18ZM150,89h6v9h-6V89ZM89,100H83V91h6v9Zm7-4V89h15v16H93V98h5v2h8V94h-5v2H96Zm32,0V89h15v16H125V98h5v2h8V94h-5v2h-5Zm24,6v10H81v-8h4v4h63v-6h4Zm10,21h-6V107h6v16ZM152,83H92v6H86V78h72v8h-6V83ZM79,122v-8h73v8h-4v-4H83v4H79Zm98.509,65L158,200.919V202H71V125h6v3h8v-5h5v5h8v-5h5v5h5v-5h5v5h11v-5h5v5h7v-8h5v8h4v-3h5v8H77v2h75V125h6v68.548l14-9.988V71H87.251l-0.659,1H169V83h-6V76H84V75.935L83.957,76H84V90H78V77.089L76.644,76.2,83,66.547V65h1.019l0.327-.5L85.1,65H178V187h-0.491ZM152,140H77v56h75V140ZM98,164.882c-0.086,2.392-3.312,3.289-6.116,3.616a17.317,17.317,0,0,0-4.1.165,28.262,28.262,0,0,0,4.1-.165c3.22,0.281,6.956,1.758,5.638,7.378C96.7,179.378,85,178.968,85,178.968V158.359S98.327,155.743,98,164.882ZM88,176.176s6.134,0.926,6-2.823c-0.126-3.527-6-2.824-6-2.824v5.647Zm0-9.411s5.2,0.959,6-1.883c1.046-3.717-6-3.764-6-3.764v5.647ZM109.5,158c4.694,0,8.5,4.925,8.5,11s-3.806,11-8.5,11-8.5-4.925-8.5-11S104.806,158,109.5,158ZM109,176c3.3,0.056,5.091-3.366,5-8-0.076-3.884-1.747-5.728-4-6s-4.973,2.36-5,7C104.981,172.375,105.106,175.934,109,176Zm14-18h4l4,13.333L135,158h5l2,22h-4l-1.3-14.326L133,178h-4l-3.7-12.326L124,180h-4l2-22h1ZM77,121H71V93h6v28Z'
},
airConditioner: {
AirConditioner: {
width: 147,
path: 'M3,77V2L150,3V78ZM24,14H17V65h7V14Zm7-8H28v4h3V6Zm0,8H28V65h3V14ZM147,6H35v4h8V68l-8,.06V72H31V68.09l-3,.022V72H24V68.142l-11,.082V10H24V6H6V74H147V6ZM35,14V65h5V14H35ZM76,68l-30,.224V10H76V68ZM59,56H52.625A8.285,8.285,0,0,0,59,60.912V56Zm0-3V45.225c-3.36.708-7.185,3.154-7,7.775h7Zm4,0h6c0-2.946-1.113-6.969-6-7.827V53Zm0,3v4.593A8.015,8.015,0,0,0,68.387,56H63ZM49,65H59V64.906a12.456,12.456,0,0,1-10-7.2V65Zm0-51v5.294A12.172,12.172,0,0,1,53.6,14H49Zm10,2.225c-3.36.708-7.185,3.154-7,7.775h7V16.225ZM59,27H52.625A8.285,8.285,0,0,0,59,31.912V27Zm4-10.827V24h6C69,21.054,67.887,17.031,63,16.173ZM63,27v4.593A8.015,8.015,0,0,0,68.387,27H63ZM73,53V14H67.4A11.87,11.87,0,0,1,73,24,12.258,12.258,0,0,1,60.5,36,12.522,12.522,0,0,1,49,28.706V48.294a12.456,12.456,0,0,1,10-7.2V41h4v0.241a11.914,11.914,0,0,1,0,23.518V65H73V53Zm28-35a19.912,19.912,0,0,1,7,1.284V19h23V39H120.95A19.984,19.984,0,0,1,101,58c-11.046,0-21-8.954-21-20S89.954,18,101,18Zm27,17V23H114.2a19.935,19.935,0,0,1,6.553,12H128ZM84,39c0.594,8.917,8.91,15.731,19,15,10.255-.743,14.645-9.489,15-15,0.594-9.238-6.151-16.7-17-17S83.406,30.083,84,39Zm17.707-9a8.5,8.5,0,0,1,0,17A8.755,8.755,0,0,1,93,38.5,8.755,8.755,0,0,1,101.707,30ZM96,39c0.246,3.79,1.817,4.311,6,4,4.252-.316,4.853-1.658,5-4,0.246-3.926-.5-4.874-5-5S95.754,35.21,96,39Z'
},
volumeControlDamper: {
VolumeControlDamper: {
width: 42,
path: 'M3,36H43V99H3V36Zm4,3H40V96H7V39Zm6,4H34V63H13V43Zm0,30H34V93H13V73Zm20,2h8v5H33V75Zm0-20h8v5H33V55ZM20,29h5v8H20V29ZM23,3C34.6,3,44,9.268,44,17S34.6,31,23,31,2,24.732,2,17,11.4,3,23,3Zm0,4c12.261,0,16,6.134,16,10s-3.72,8.837-15,9S8,20.866,8,17,10.74,7,23,7ZM14,25V7l4-1,6,7,4-6,5,1V26H28V16l-4,4-5-4V26ZM27,62h5V75H27V62ZM15.617,88.076l2.649,3.265L9.777,98.228,7.128,94.963ZM13.4,45.987l2.619-3.215L7.622,35.991,5,39.206Z'
path: 'M23,28.935V34H41V97H1V34H5.615l0.007-.009L5.633,34H18V28.856C7.824,27.885,0,22.053,0,15,0,7.268,9.4,1,21,1S42,7.268,42,15C42,22.282,33.659,28.264,23,28.935ZM38,58H32v3H30V71h2v2h6V58Zm0,36V78H32V91H14.258l-3.629,3H38ZM11,87.6V71H25V61H11V43.667L5,38.819V92.4ZM9.346,37l4.669,3.772L13.83,41H32V53h6V37H9.346ZM12,6.581C7.281,8.661,6,12.359,6,15c0,2.42,1.85,5.4,6,7.251V6.581ZM21,5a30.248,30.248,0,0,0-3.934.243L22,11l3.762-5.642A30.068,30.068,0,0,0,21,5Zm5,9-4,4-5-4v9.66A29.382,29.382,0,0,0,22,24a32.355,32.355,0,0,0,4-.295V14Zm5-7.077V22.4c4.357-1.814,6-4.843,6-7.4C37,12.5,35.429,9.047,31,6.923Z'
},
CoolTower:{
width: 67,
path:'M36,4L24,10L48,10M14,13L55,13L55,15L52,15L52,24L61,30L57,30L50,25L50,15L20,15L17,15L14,15 M18,15L18,22L8,30L12,30L20,23L20,15 M22,23L28,19L34,23L28,27 M34,17L36,17L36,29L34,29 M5,30L7,30L7,35L62,35L62,30L64,30L64,37L5,37 M5,30L64,30L64,32L5,32 M5,37L5,64L64,64L64,37L62,37L62,51L7,51L7,37 M15,37L11,42L14,43L17,39L20,43L23,42L19,37 M26,37L22,42L25,43L28,39L31,43L34,42L30,37 M39,37L35,42L38,43L41,39L44,43L47,42L43,37 M52,37L48,42L51,43L54,39L57,43L60,42L57,37 M36,23L42,19L48,23L42,27'
},
JetFan:{
width:68,
path:'M39,110L4,92V89H72v3ZM5,24H72V87H5V24ZM9,83H68V28H9V83Zm29.5-1A26.5,26.5,0,1,1,65,55.5,26.5,26.5,0,0,1,38.5,82ZM51,75l7-7-2-2-7,7ZM35,64l-5-4-2,2,5,4ZM26,75l2-2-8-7-2,2Zm0-38-9,8,3,2,8-7Zm7,10-5,5,3,2,5-5Zm9,6H36v6h6V53Zm2,13,5-5-2-2-5,5ZM43,47l5,5,2-3-5-5Zm9-12-3,2,8,8,2-2ZM4,20L39,2,72,20v3H4V20Z'
},
OrbitalVentilator:{
width:70,
path:'M37,96L2,78V75H70v3ZM4,3H72V72H4V3ZM8,68H68V7H8V68Zm29.5-2C22.312,66,10,53.016,10,37S22.312,8,37.5,8,65,20.984,65,37,52.688,66,37.5,66Zm12.972-7.66,7.264-7.66L55.66,48.491,48.4,56.151ZM33.868,46.3l-5.189-4.377L26.6,44.113l5.189,4.377ZM24.528,58.34L26.6,56.151l-8.3-7.66-2.075,2.189Zm0-41.585-9.34,8.755L18.3,27.7l8.3-7.66ZM31.793,27.7L26.6,33.17l3.113,2.189,5.189-5.472Zm9.34,6.566H34.906V40.83h6.226V34.264Zm2.075,14.226L48.4,43.019,46.321,40.83,41.132,46.3ZM42.17,27.7l5.189,5.472,2.075-3.283-5.189-5.472Zm9.34-13.132L48.4,16.755l8.3,8.755,2.076-2.189Z'
},
TunnelFan:{
width:68,
path:'M40,112L5,94V91H73v3ZM6,26H73V89H6V26Zm4,59H69V30H10V85Zm29.5-1A26.5,26.5,0,1,1,66,57.5,26.5,26.5,0,0,1,39.5,84ZM52,77l7-7-2-2-7,7ZM36,66l-5-4-2,2,5,4ZM27,77l2-2-8-7-2,2Zm0-38-9,8,3,2,8-7Zm7,10-5,5,3,2,5-5Zm9,6H37v6h6V55Zm2,13,5-5-2-2-5,5ZM44,49l5,5,2-3-5-5Zm9-12-3,2,8,8,2-2ZM5,22L40,4,73,22v3H5V22Z'
}
};

View File

@ -2,7 +2,7 @@ export function getUID(type, list) {
if (list && list.length > 0) {
const lastCode = list[list.length - 1].code;
const num = lastCode.split(type + '_')[1];
return type + `_${num + 1}`;
return type + `_${parseInt(num) + 1}`;
} else {
return type + `_1`;
}

View File

@ -126,100 +126,109 @@ export function parser(data) {
return iscsDevice;
}
function updateIscsListByDevice(iscs, name, device) {
var list = iscs[name];
if (list) {
function updateIscsListByDevice(state, name, device) {
// var list = iscs[name];
const list = state.iscs[name];
if (list && list instanceof Array) {
const index = list.findIndex(elem => { return elem.code == device.code; });
if (index >= 0) {
device._dispose ? list.splice(index, 1) : list[index] = deepClone(device);
} else {
list.push(deepClone(device));
if (device._dispose) {
index >= 0 && list.splice(index, 1); // 删除
} else if (!list[index]) {
list.push(deepClone(device)); // 新增
} else if (index >= 0) {
list[index] = deepClone(device); // item map 数据 model 页面表单数据
}
// if (index >= 0) {
// device._dispose ? list.splice(index, 1) : list[index] = deepClone(device);
// } else {
// list.push(deepClone(device));
// }
} else {
iscs[name] = [device];
// list[name] = [device];
state.iscs[name] = [device];
}
return list;
// return list;
}
export function updateIscsData(device) {
const iscsData = store.state.iscs;
export function updateIscsData(state, device) {
// const state = store.state;
switch (device._type) {
case deviceType.vidiconList :
updateIscsListByDevice(iscsData, 'vidiconList', device);
case deviceType.Vidicon :
updateIscsListByDevice(state, 'vidiconList', device);
break;
case deviceType.vidiconCloudList :
updateIscsListByDevice(iscsData, 'vidiconCloudList', device);
case deviceType.VidiconCloud :
updateIscsListByDevice(state, 'vidiconCloudList', device);
break;
case deviceType.ManualAlarmButton :
updateIscsListByDevice(iscsData, 'manualAlarmButtonList', device);
updateIscsListByDevice(state, 'manualAlarmButtonList', device);
break;
case deviceType.FireHydranAlarmButton:
updateIscsListByDevice(iscsData, 'fireHydranAlarmButtonList', device);
updateIscsListByDevice(state, 'fireHydranAlarmButtonList', device);
break;
case deviceType.GasFireControl:
updateIscsListByDevice(iscsData, 'gasFireControlList', device);
updateIscsListByDevice(state, 'gasFireControlList', device);
break;
case deviceType.SmokeDetector:
updateIscsListByDevice(iscsData, 'smokeDetectorList', device);
updateIscsListByDevice(state, 'smokeDetectorList', device);
break;
case deviceType.TemperatureDetector:
updateIscsListByDevice(iscsData, 'temperatureDetectorList', device);
updateIscsListByDevice(state, 'temperatureDetectorList', device);
break;
case deviceType.PlatformScreenDoor:
updateIscsListByDevice(iscsData, 'platformScreenDoorList', device);
updateIscsListByDevice(state, 'platformScreenDoorList', device);
break;
case deviceType.FrozenPump :
updateIscsListByDevice(iscsData, 'frozenPumpList', device);
updateIscsListByDevice(state, 'frozenPumpList', device);
break;
case deviceType.Ventilator :
updateIscsListByDevice(iscsData, 'ventilatorList', device);
updateIscsListByDevice(state, 'ventilatorList', device);
break;
case deviceType.Chiller :
updateIscsListByDevice(iscsData, 'chillerList', device);
updateIscsListByDevice(state, 'chillerList', device);
break;
case deviceType.CoolTower :
updateIscsListByDevice(iscsData, 'coolTowerList', device);
updateIscsListByDevice(state, 'coolTowerList', device);
break;
case deviceType.EndDoor:
updateIscsListByDevice(iscsData, 'endDoorList', device);
updateIscsListByDevice(state, 'endDoorList', device);
break;
case deviceType.BorderRadius:
updateIscsListByDevice(iscsData, 'borderRadiusList', device);
updateIscsListByDevice(state, 'borderRadiusList', device);
break;
case deviceType.BrakeMachine:
updateIscsListByDevice(iscsData, 'brakeMachineList', device);
updateIscsListByDevice(state, 'brakeMachineList', device);
break;
case deviceType.EntranceGuard:
updateIscsListByDevice(iscsData, 'entranceGuardList', device);
updateIscsListByDevice(state, 'entranceGuardList', device);
break;
case deviceType.TicketMachine:
updateIscsListByDevice(iscsData, 'ticketMachineList', device);
updateIscsListByDevice(state, 'ticketMachineList', device);
break;
case deviceType.SemiAutomaticTicketMachine:
updateIscsListByDevice(iscsData, 'semiAutomaticTicketMachineList', device);
updateIscsListByDevice(state, 'semiAutomaticTicketMachineList', device);
break;
case deviceType.AirConditioner:
updateIscsListByDevice(iscsData, 'airConditionerList', device);
updateIscsListByDevice(state, 'airConditionerList', device);
break;
case deviceType.OrbitalVentilator:
updateIscsListByDevice(iscsData, 'orbitalVentilatorList', device);
updateIscsListByDevice(state, 'orbitalVentilatorList', device);
break;
case deviceType.JetFan:
updateIscsListByDevice(iscsData, 'jetFanList', device);
updateIscsListByDevice(state, 'jetFanList', device);
break;
case deviceType.TunnelFan:
updateIscsListByDevice(iscsData, 'tunnelFanList', device);
updateIscsListByDevice(state, 'tunnelFanList', device);
break;
case deviceType.FireDamper:
updateIscsListByDevice(iscsData, 'fireDamperList', device);
updateIscsListByDevice(state, 'fireDamperList', device);
break;
case deviceType.SmookProofFd:
updateIscsListByDevice(iscsData, 'smookProofFdList', device);
updateIscsListByDevice(state, 'smookProofFdList', device);
break;
case deviceType.VolumeControlDamper:
updateIscsListByDevice(iscsData, 'volumeControlDamperList', device);
updateIscsListByDevice(state, 'volumeControlDamperList', device);
break;
}
store.dispatch('iscs/setIscsData', iscsData);
// store.dispatch('iscs/setIscsData', state.iscs);
}

View File

@ -10,6 +10,7 @@ import deviceType from './constant/deviceType';
import { selectLineCode } from './config/deviceStyle';
import { deviceFactory, createBoundingRect, calculateDCenter } from './utils/parser';
import { deepAssign } from '@/utils/index';
import store from '@/store';
const renderer = 'canvas';
const devicePixelRatio = 1;
@ -251,6 +252,9 @@ class Jlmap {
this.$painter.update(oDevice);
}
}
if (elem.deviceType == 'ROUTE') { // 处理进路数据状态
store.dispatch('map/updateRouteState', elem);
}
});
// 状态后处理

View File

@ -156,17 +156,17 @@ export default {
//
this.restoreBeforeDevices();
if (row.canSetting) {
if (!row.setting) {
//
if (row.containSectionList && row.containSectionList.length) {
if (row.routeSectionList && row.routeSectionList.length) {
//
row.containSectionList.forEach(elem => {
row.routeSectionList.forEach(elem => {
elem.cutOff = true;
});
}
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
this.$store.dispatch('training/updateMapState', [...row.routeSectionList]);
this.beforeSectionList = row.routeSectionList || [];
//
const operate = {

View File

@ -262,11 +262,10 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
// querySignalStatus(this.group, {signalCode: this.selected.code}).then(resp => {
// const tempData = resp.data;
const tempData = [];
this.$store.dispatch('map/getRouteDataListByCode', this.selected.code).then(list => {
const tempData = list;
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
// });
});
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
@ -373,11 +372,10 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
this.$store.dispatch('map/getRouteDataListByCode', this.selected.code).then(list => {
const tempData = [];
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
// });
});
}
});
},
@ -394,11 +392,10 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
// const tempData = resp.data;
this.$store.dispatch('map/getRouteDataListByCode', this.selected.code).then(list => {
const tempData = [];
this.$refs.routeHandControl.doShow(operate, this.selected, tempData);
// });
});
}
});
},

View File

@ -16,7 +16,7 @@ function hasPermission(roles, permissionRoles) {
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/gzzbxy/relay', '/hyd/login']; // 不重定向白名单
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/];
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/];
function isDesignPage(toRoutePath) {
return designPageRegex.some(item => {
@ -34,7 +34,7 @@ const loginHydPage = whiteList[7];
const loginDesignPageMenu = {
design: loginDesignPage,
designxty: loginDesignXtyPage,
designgzb: loginDesignGzbPage,
designgzb: loginDesignGzbPage
};
const loginPageMenu = {
login: loginPage,

View File

@ -33,16 +33,17 @@ const ExistingSimulation = () => import('@/views/system/existingSimulation/index
const CacheControl = () => import('@/views/system/cacheControl/index');
const SystemGenerate = () => import('@/views/system/systemGenerate/index');
const IbpDraw = () => import('@/views/system/ibpDraw/index');
const IscsDraw = () => import('@/views/system/iscsDraw/index');
const IscsDesign = () => import('@/views/system/iscsDesign/index');
const News = () => import('@/views/system/news/index');
const CommandDictionary = () => import('@/views/system/commandDictionary/index');
const CommandDictionaryDetail = () => import('@/views/system/commandDictionary/edit');
const configLine = () => import('@/views/system/configLine/index');
const IscsSystem = () => import('@/views/system/iscsSystem/index');
const Mapedit = () => import('@/views/mapdraft/index');
const IscsSystem = () => import('@/views/iscs/iscsSystem/index');
const IscsDraw = () => import('@/views/iscs/iscsDraw/index');
const IscsDesign = () => import('@/views/iscs/iscsDesign/index');
const IscsConfig = () => import('@/views/iscs/iscsSystem/config/index');
const NewMapDraft = () => import('@/views/newMap/newMapdraft/index');
const NewDesignPlatformUser = () => import('@/views/newMap/newDesignUser/index');
@ -770,27 +771,6 @@ export const asyncRouter = [
i18n: 'router.ibpDraw'
}
},
{
path:'iscs/design',
component: IscsDesign,
meta: {
i18n: 'router.iscsDraw'
},
children: [
{
path: 'edit/:id/:mode',
component: IscsDraw,
hidden: true
}
]
},
{
path: 'iscs/system',
component: IscsSystem,
meta: {
i18n: 'router.iscsSystem'
}
},
{
path: 'dictionary',
component: Dictionary,
@ -955,6 +935,44 @@ export const asyncRouter = [
]
}
]
},
{ // iscs系统
path: '/iscs',
component: Layout,
meta: {
i18n: 'router.iscsSystem',
roles: [admin]
},
children: [
{
path:'design',
component: IscsDesign,
meta: {
i18n: 'router.iscsDraw'
},
children: [
{
path: 'edit/:id/:mode',
component: IscsDraw,
hidden: true
}
]
},
{
path: 'system',
component: IscsSystem,
meta: {
i18n: 'router.iscsSystem'
},
children: [
{
path: 'config/:mode',
component: IscsConfig,
hidden: true
}
]
}
]
}
];

View File

@ -33,84 +33,84 @@ const iscs = {
return state.updateDeviceData;
},
vidiconList: (state) => {
if (state.iscs && state.iscs.vidiconList) {
if (state.iscs) {
return state.iscs.vidiconList;
} else {
return [];
}
},
vidiconCloudList: (state) => {
if (state.iscs && state.iscs.vidiconCloudList) {
if (state.iscs.vidiconCloudList) {
return state.iscs.vidiconCloudList;
} else {
return [];
}
},
frozenPumpList:(state)=>{
if (state.iscs && state.iscs.frozenPumpList) {
if (state.iscs.frozenPumpList) {
return state.iscs.frozenPumpList;
} else {
return [];
}
},
airConditionerList:(state)=>{
if (state.iscs && state.iscs.airConditionerList) {
if (state.iscs.airConditionerList) {
return state.iscs.airConditionerList;
} else {
return [];
}
},
tunnelFanList:(state)=>{
if (state.iscs && state.iscs.tunnelFanList) {
if (state.iscs.tunnelFanList) {
return state.iscs.tunnelFanList;
} else {
return [];
}
},
orbitalVentilatorList:(state)=>{
if (state.iscs && state.iscs.orbitalVentilatorList) {
if (state.iscs.orbitalVentilatorList) {
return state.iscs.orbitalVentilatorList;
} else {
return [];
}
},
smookProofFdList:(state)=>{
if (state.iscs && state.iscs.smookProofFdList) {
if (state.iscs.smookProofFdList) {
return state.iscs.smookProofFdList;
} else {
return [];
}
},
chillerList:(state)=>{
if (state.iscs && state.iscs.chillerList) {
if (state.iscs.chillerList) {
return state.iscs.chillerList;
} else {
return [];
}
},
coolTowerList:(state)=>{
if (state.iscs && state.iscs.coolTowerList) {
if (state.iscs.coolTowerList) {
return state.iscs.coolTowerList;
} else {
return [];
}
},
fireDamperList:(state)=>{
if (state.iscs && state.iscs.fireDamperList) {
if (state.iscs.fireDamperList) {
return state.iscs.fireDamperList;
} else {
return [];
}
},
jetFanList:(state)=>{
if (state.iscs && state.iscs.jetFanList) {
if (state.iscs.jetFanList) {
return state.iscs.jetFanList;
} else {
return [];
}
},
ventilatorList:(state)=>{
if (state.iscs && state.iscs.ventilatorList) {
if (state.iscs.ventilatorList) {
return state.iscs.ventilatorList;
} else {
return [];
@ -122,7 +122,7 @@ const iscs = {
iscsRender: (state, devices) => {
if (devices && devices.length) {
if (state.iscs) {
devices.forEach(elem => { updateIscsData(elem); });
devices.forEach(elem => { updateIscsData(state, elem); });
}
if (Vue.prototype.$iscs) {
Vue.prototype.$iscs.render(devices);

View File

@ -179,6 +179,7 @@ const map = {
namespaced: true,
state: {
routeData: {}, // 进路数据
stepData: [], // 缓存数据
recoverStepData: [], // 缓存恢复数据
seclectDeviceList: [], // 包围框选中元素列表
@ -556,6 +557,14 @@ const map = {
},
setMousemove: (state) => {
state.mousemove++;
},
setRouteData: (state, routeDataList) => {
routeDataList.forEach(data => {
state.routeData[data.code] = data;
});
},
updateRouteState: (state, status) => {
state.routeData[status.code] = deepAssign(state.routeData[status.code], status);
}
},
@ -573,10 +582,30 @@ const map = {
commit('setDataZoom', dataZoom);
},
setMapData: ({ commit }, map) => {
setMapData: ({ commit }, map) => { // 设置地图数据
commit('setMapData', map);
},
setRouteData: ({ commit }, routeData) => { // 设置进路数据
commit('setRouteData', routeData);
},
updateRouteState: ({ commit }, status) => { // 设置进路数据状态
commit('updateRouteState', status);
},
getRouteDataListByCode: ({ state, commit }, code) => { // 获取进路数据
return new Promise((resolve) => {
const list = [];
const routeList = Object.values(state.routeData);
routeList.forEach(route => {
if (route.startSignalCode == code) {
list.push(route);
}
});
resolve(list);
});
},
setTrainDetails: ({ commit }, message) => {
commit('setTrainDetails', message);
},

View File

@ -44,6 +44,8 @@ export function loadNewMapDataByGroup(group) {
resolve();
});
});
const routeData = resp.data.logicDataNew.routeList; // 设置进路数据
store.dispatch('map/setRouteData', routeData);
}).catch(error => {
reject(error);
});

View File

@ -131,7 +131,7 @@ export default {
case 'system' :
break;
case 'interface':
this.$router.push({ path: `/system/iscs/design/edit/${obj.id}/${obj.mode}` });
this.$router.push({ path: `/iscs/design/edit/${obj.id}/${obj.mode}` });
break;
}
},

View File

@ -49,7 +49,7 @@ export default {
},
watch: {
$route(val) {
this.iscsChange();
}
},
created() {

View File

@ -47,7 +47,7 @@ export default {
},
computed:{
...mapGetters('iscs', [
'entranceGuardList'
'iscs'
])
},
watch:{
@ -57,10 +57,10 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.width = model.width;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
@ -73,7 +73,7 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.isUpdate ? this.form.code : getUID('EntranceGuard', this.entranceGuardList),
code: this.isUpdate ? this.form.code : getUID('EntranceGuard', this.iscs.entranceGuardList),
_type: 'EntranceGuard',
width: this.addModel.width
};

View File

@ -47,7 +47,7 @@ export default {
},
computed:{
...mapGetters('iscs', [
'brakeMachineList'
'iscs'
])
},
watch:{
@ -57,10 +57,10 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.width = model.width;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
@ -73,7 +73,7 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.isUpdate ? this.form.code : getUID('BrakeMachine', this.brakeMachineList),
code: this.isUpdate ? this.form.code : getUID('BrakeMachine', this.iscs.brakeMachineList),
_type: 'BrakeMachine',
width: this.addModel.width
};

View File

@ -47,7 +47,7 @@ export default {
},
computed:{
...mapGetters('iscs', [
'semiAutomaticTicketMachineList'
'iscs'
])
},
watch:{
@ -57,10 +57,10 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.width = model.width;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
@ -73,7 +73,7 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.isUpdate ? this.form.code : getUID('VolumeControlDamper', this.semiAutomaticTicketMachineList),
code: this.isUpdate ? this.form.code : getUID('SemiAutomaticTicketMachine', this.iscs.semiAutomaticTicketMachineList),
_type: 'SemiAutomaticTicketMachine',
width: this.addModel.width
};

View File

@ -47,7 +47,7 @@ export default {
},
computed:{
...mapGetters('iscs', [
'ticketMachineList'
'iscs'
])
},
watch:{
@ -57,10 +57,10 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.width = model.width;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
@ -73,7 +73,7 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.isUpdate ? this.form.code : getUID('TicketMachine', this.ticketMachineList),
code: this.isUpdate ? this.form.code : getUID('TicketMachine', this.iscs.ticketMachineList),
_type: 'TicketMachine',
width: this.addModel.width
};

View File

@ -55,12 +55,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'airConditionerList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'AirConditioner' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'AirConditioner',
code: this.isUpdate ? this.form.code : getUID('AirConditioner', this.airConditionerList),
code: this.isUpdate ? this.form.code : getUID('AirConditioner', this.iscs.airConditionerList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -55,12 +55,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'chillerList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'Chiller' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'Chiller',
code: this.isUpdate ? this.form.code : getUID('Chiller', this.chillerList),
code: this.isUpdate ? this.form.code : getUID('Chiller', this.iscs.chillerList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -55,12 +55,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'coolTowerList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'CoolTower' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'CoolTower',
code: this.isUpdate ? this.form.code : getUID('CoolTower', this.coolTowerList),
code: this.isUpdate ? this.form.code : getUID('CoolTower', this.iscs.coolTowerList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -55,12 +55,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'fireDamperList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'FireDamper' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'FireDamper',
code: this.isUpdate ? this.form.code : getUID('FireDamper', this.fireDamperList),
code: this.isUpdate ? this.form.code : getUID('FireDamper', this.iscs.fireDamperList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -65,12 +65,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'frozenPumpList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'FrozenPump' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -96,7 +96,7 @@ export default {
y: this.form.y
},
_type: 'FrozenPump',
code: this.isUpdate ? this.form.code : getUID('FrozenPump', this.frozenPumpList),
code: this.isUpdate ? this.form.code : getUID('FrozenPump', this.iscs.frozenPumpList),
width: this.form.width,
color:'#00ff00',
pumpType:this.form.type

View File

@ -37,7 +37,7 @@
</el-tab-pane>
<el-tab-pane label="排风机" name="ventilator">
<ventilator
ref="coolTower"
ref="ventilator"
style="width:90%"
@createVentilator="createDataModel"
@deleteDataModel="deleteDataModel"
@ -91,7 +91,7 @@
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane>
<el-tab-pane label="风量调节阀" name="volumeControlDamper">
<volume-control-damper
ref="volumeControlDamper"
style="width: 90%"

View File

@ -55,12 +55,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'jetFanList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'JetFan' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'JetFan',
code: this.isUpdate ? this.form.code : getUID('JetFan', this.jetFanList),
code: this.isUpdate ? this.form.code : getUID('JetFan', this.iscs.jetFanList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -55,12 +55,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'orbitalVentilatorList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'OrbitalVentilator' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'OrbitalVentilator',
code: this.isUpdate ? this.form.code : getUID('OrbitalVentilator', this.orbitalVentilatorList),
code: this.isUpdate ? this.form.code : getUID('OrbitalVentilator', this.iscs.orbitalVentilatorList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -55,12 +55,12 @@ export default {
},
computed: {
...mapGetters('iscs', [
'smookProofFdList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'SmookProofFd' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'SmookProofFd',
code: this.isUpdate ? this.form.code : getUID('SmookProofFd', this.smookProofFdList),
code: this.isUpdate ? this.form.code : getUID('SmookProofFd', this.iscs.smookProofFdList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -55,12 +55,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'tunnelFanList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'TunnelFan' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'TunnelFan',
code: this.isUpdate ? this.form.code : getUID('TunnelFan', this.tunnelFanList),
code: this.isUpdate ? this.form.code : getUID('TunnelFan', this.iscs.tunnelFanList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -55,12 +55,12 @@ export default {
},
computed:{
...mapGetters('iscs', [
'ventilatorList'
'iscs'
])
},
watch:{
'$store.state.ibp.rightClickCount': function (val) {
const model = this.$store.getters['ibp/updateDeviceData'];
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'Ventilator' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
@ -85,7 +85,7 @@ export default {
y: this.form.y
},
_type: 'Ventilator',
code: this.isUpdate ? this.form.code : getUID('Ventilator', this.ventilatorList),
code: this.isUpdate ? this.form.code : getUID('Ventilator', this.iscs.ventilatorList),
width: this.form.width,
color:'#00ff00'
};

View File

@ -5,7 +5,7 @@
<el-input v-model="form.code" :disabled="true" />
</el-form-item>
<el-form-item label="图形宽度" prop="width">
<el-input-number v-model="form.width" :min="40" />
<el-input-number v-model="form.width" :min="20" />
</el-form-item>
<el-form-item label="X轴坐标" prop="x">
<el-input-number v-model="form.x" controls-position="right" :min="1" />
@ -33,7 +33,7 @@ export default {
buttonText: '立即创建',
form:{
code:'',
width: 40,
width: 20,
x: 10,
y: 10
},
@ -55,7 +55,7 @@ export default {
},
computed:{
...mapGetters('iscs', [
'volumeControlDamperList'
'iscs'
])
},
watch:{
@ -84,8 +84,8 @@ export default {
x: this.form.x,
y: this.form.y
},
_type: 'AirConditioner',
code: this.isUpdate ? this.form.code : getUID('VolumeControlDamper', this.volumeControlDamperList),
_type: 'VolumeControlDamper',
code: this.isUpdate ? this.form.code : getUID('VolumeControlDamper', this.iscs.volumeControlDamperList),
width: this.form.width,
color:'#00ff00'
};
@ -103,7 +103,7 @@ export default {
this.showDeleteButton = false;
this.form = {
code:'',
width: 40,
width: 20,
x: 10,
y: 10
};

View File

@ -49,14 +49,14 @@ export default {
},
computed: {
...mapGetters('iscs', [
'vidiconList'
'iscs'
])
},
methods: {
onSubmit(form) {
this.$refs.form.validate((valid) => {
if (valid) {
const Uid = getUID('Vidicon', this.vidiconList);
const Uid = getUID('Vidicon', this.iscs.vidiconList);
const model = {
_type: 'Vidicon',
code: Uid,

View File

@ -45,14 +45,14 @@ export default {
},
computed: {
...mapGetters('iscs', [
'vidiconCloudList'
'iscs'
])
},
methods: {
onSubmit(form) {
this.$refs.form.validate((valid) => {
if (valid) {
const Uid = getUID('VidiconCloud', this.vidiconCloudList);
const Uid = getUID('VidiconCloud', this.iscs.vidiconCloudList);
const model = {
_type: 'VidiconCloud',
code: Uid,

View File

@ -46,7 +46,7 @@ export default {
},
computed:{
...mapGetters('iscs', [
'fireHydranAlarmButtonList'
'iscs'
])
},
watch:{
@ -56,10 +56,10 @@ export default {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.width = model.width;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
@ -72,7 +72,7 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.isUpdate ? this.form.code : getUID('VolumeControlDamper', this.fireHydranAlarmButtonList),
code: this.isUpdate ? this.form.code : getUID('FireHydranAlarmButton', this.iscs.fireHydranAlarmButtonList),
_type: 'FireHydranAlarmButton',
width: this.addModel.width
};

View File

@ -1,8 +1,8 @@
<template>
<div>
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
<el-input v-model="addModel.code" />
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
<el-input v-model="addModel.code" :disabled="true" />
</el-form-item>
<el-form-item label="图形宽度" prop="width">
<el-input-number v-model="addModel.width" />
@ -23,6 +23,8 @@
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'GasFireControl',
data() {
@ -38,15 +40,32 @@ export default {
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
},
isUpdate:false,
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'GasFireControl' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
if (!this.addModel.code) {
this.generateCode();
}
this.$refs[form].validate((valid) => {
if (valid) {
const maButtonModel = {
@ -54,8 +73,8 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
_type: 'gasFireControl',
code: this.isUpdate ? this.form.code : getUID('GasFireControl', this.iscs.gasFireControlList),
_type: 'GasFireControl',
width: this.addModel.width
};
this.$emit('createDataModel', maButtonModel);
@ -72,7 +91,7 @@ export default {
y: this.addModel.y
},
code: this.addModel.code,
_type: 'gasFireControl',
_type: 'GasFireControl',
width: this.addModel.width
};
this.$emit('deleteDataModel', maButtonModel);
@ -88,10 +107,6 @@ export default {
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.addModel.code = 'gasFireControl_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}

View File

@ -1,8 +1,8 @@
<template>
<div>
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
<el-input v-model="addModel.code" />
<el-form-item v-if="isUpdate" label="编号" prop="code">
<el-input v-model="addModel.code" :disabled="true" />
</el-form-item>
<el-form-item label="图形宽度" prop="width">
<el-input-number v-model="addModel.width" />
@ -23,6 +23,8 @@
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'ManualAlarmButton',
data() {
@ -38,15 +40,32 @@ export default {
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
},
isUpdate:false,
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'ManualAlarmButton' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
if (!this.addModel.code) {
this.generateCode();
}
this.$refs[form].validate((valid) => {
if (valid) {
const maButtonModel = {
@ -54,8 +73,8 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
_type: 'manualAlarmButton',
code: this.isUpdate ? this.form.code : getUID('ManualAlarmButton', this.iscs.manualAlarmButtonList),
_type: 'ManualAlarmButton',
width: this.addModel.width
};
this.$emit('createDataModel', maButtonModel);
@ -72,7 +91,7 @@ export default {
y: this.addModel.y
},
code: this.addModel.code,
_type: 'manualAlarmButton',
_type: 'ManualAlarmButton',
width: this.addModel.width
};
this.$emit('deleteDataModel', maButtonModel);
@ -88,10 +107,6 @@ export default {
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.addModel.code = 'manualAlarmButton_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}

View File

@ -1,8 +1,8 @@
<template>
<div>
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
<el-input v-model="addModel.code" />
<el-form-item v-if="isUpdate" label="编号" prop="code">
<el-input v-model="addModel.code" :disabled="true" />
</el-form-item>
<el-form-item label="图形宽度" prop="width">
<el-input-number v-model="addModel.width" />
@ -23,8 +23,10 @@
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'GasFireControl',
name: 'SmokeDetector',
data() {
return {
addModel:{
@ -38,15 +40,32 @@ export default {
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
},
isUpdate:false,
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'SmokeDetector' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
if (!this.addModel.code) {
this.generateCode();
}
this.$refs[form].validate((valid) => {
if (valid) {
const maButtonModel = {
@ -54,8 +73,8 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
_type: 'smokeDetector',
code: this.isUpdate ? this.form.code : getUID('SmokeDetector', this.iscs.smokeDetectorList),
_type: 'SmokeDetector',
width: this.addModel.width
};
this.$emit('createDataModel', maButtonModel);
@ -72,7 +91,7 @@ export default {
y: this.addModel.y
},
code: this.addModel.code,
_type: 'smokeDetector',
_type: 'SmokeDetector',
width: this.addModel.width
};
this.$emit('deleteDataModel', maButtonModel);
@ -88,10 +107,6 @@ export default {
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.addModel.code = 'smokeDetector_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}

View File

@ -1,8 +1,8 @@
<template>
<div>
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
<el-input v-model="addModel.code" />
<el-form-item v-if="isUpdate" label="按钮编号" prop="code">
<el-input v-model="addModel.code" :disabeled="true" />
</el-form-item>
<el-form-item label="图形宽度" prop="width">
<el-input-number v-model="addModel.width" />
@ -23,6 +23,8 @@
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'TemperatureDetector',
data() {
@ -38,15 +40,32 @@ export default {
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
},
isUpdate: false,
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'TemperatureDetector' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
if (!this.addModel.code) {
this.generateCode();
}
this.$refs[form].validate((valid) => {
if (valid) {
const maButtonModel = {
@ -54,8 +73,8 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
_type: 'temperatureDetector',
code: this.isUpdate ? this.form.code : getUID('TemperatureDetector', this.iscs.temperatureDetectorList),
_type: 'TemperatureDetector',
width: this.addModel.width
};
this.$emit('createDataModel', maButtonModel);
@ -72,7 +91,7 @@ export default {
y: this.addModel.y
},
code: this.addModel.code,
_type: 'temperatureDetector',
_type: 'TemperatureDetector',
width: this.addModel.width
};
this.$emit('deleteDataModel', maButtonModel);
@ -88,10 +107,6 @@ export default {
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.addModel.code = 'temperatureDetector_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}

View File

@ -1,8 +1,8 @@
<template>
<div>
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
<el-input v-model="addModel.code" />
<el-form-item v-if="isUpdate" label="编号" prop="code">
<el-input v-model="addModel.code" :disabled="true" />
</el-form-item>
<el-form-item label="宽度" prop="width">
<el-input-number v-model="addModel.width" controls-position="right" />
@ -26,8 +26,10 @@
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'PlatformScreenDoor',
name: 'BorderRadius',
data() {
return {
addModel:{
@ -43,15 +45,33 @@ export default {
x: [{ required: true, message: '请输入图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入图形的Y轴坐标', trigger: 'blur' }]
},
isUpdate: false,
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'BorderRadius' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.height = model.height;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
if (!this.addModel.code) {
this.generateCode();
}
this.$refs[form].validate((valid) => {
if (valid) {
const maButtonModel = {
@ -59,8 +79,8 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
_type: 'borderRadius',
code: this.isUpdate ? this.form.code : getUID('BorderRadius', this.iscs.borderRadiusList),
_type: 'BorderRadius',
width: this.addModel.width,
height: this.addModel.height
};
@ -78,7 +98,7 @@ export default {
y: this.addModel.y
},
code: this.addModel.code,
_type: 'borderRadius',
_type: 'BorderRadius',
width: this.addModel.width,
height: this.addModel.height
};
@ -96,10 +116,6 @@ export default {
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.addModel.code = 'borderRadius_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}

View File

@ -1,8 +1,8 @@
<template>
<div>
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
<el-input v-model="addModel.code" />
<el-form-item v-if="isUpdate" label="编号" prop="code">
<el-input v-model="addModel.code" :disabled="true" />
</el-form-item>
<el-form-item label="图形宽度" prop="width">
<el-input-number v-model="addModel.width" />
@ -23,8 +23,10 @@
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'PlatformScreenDoor',
name: 'EndDoor',
data() {
return {
addModel:{
@ -38,15 +40,32 @@ export default {
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
},
isUpdate: false,
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'EndDoor' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
if (!this.addModel.code) {
this.generateCode();
}
this.$refs[form].validate((valid) => {
if (valid) {
const maButtonModel = {
@ -54,8 +73,8 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
_type: 'endDoor',
code: this.isUpdate ? this.form.code : getUID('EndDoor', this.iscs.endDoorList),
_type: 'EndDoor',
width: this.addModel.width
};
this.$emit('createDataModel', maButtonModel);
@ -72,7 +91,7 @@ export default {
y: this.addModel.y
},
code: this.addModel.code,
_type: 'endDoor',
_type: 'EndDoor',
width: this.addModel.width
};
this.$emit('deleteDataModel', maButtonModel);
@ -88,10 +107,6 @@ export default {
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.addModel.code = 'endDoor_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}

View File

@ -1,8 +1,8 @@
<template>
<div>
<el-form ref="form" :rule="rules" :model="addModel" label-width="100px">
<el-form-item v-if="addModel.code" label="按钮编号" prop="code">
<el-input v-model="addModel.code" />
<el-form-item v-if="isUpdate" label="编号" prop="code">
<el-input v-model="addModel.code" :disabled="true" />
</el-form-item>
<el-form-item label="图形宽度" prop="width">
<el-input-number v-model="addModel.width" />
@ -23,6 +23,8 @@
</template>
<script>
import { mapGetters } from 'vuex';
import {getUID} from '@/iscs/utils/Uid';
export default {
name: 'PlatformScreenDoor',
data() {
@ -38,15 +40,32 @@ export default {
x: [{ required: true, message: '请输入设备图形的X轴坐标', trigger: 'blur' }],
y: [{ required: true, message: '请输入设备图形的Y轴坐标', trigger: 'blur' }]
},
isUpdate: false,
showDeleteButton: false,
buttonText: '立即创建'
};
},
computed:{
...mapGetters('iscs', [
'iscs'
])
},
watch:{
'$store.state.iscs.rightClickCount': function (val) {
const model = this.$store.getters['iscs/updateDeviceData'];
if (model._type === 'PlatformScreenDoor' ) {
this.buttonText = '修改';
this.showDeleteButton = true;
this.isUpdate = true;
this.addModel.code = model.code;
this.addModel.width = model.width;
this.addModel.x = model.point.x;
this.addModel.y = model.point.y;
}
}
},
methods: {
onSubmit(form) {
if (!this.addModel.code) {
this.generateCode();
}
this.$refs[form].validate((valid) => {
if (valid) {
const maButtonModel = {
@ -54,8 +73,8 @@ export default {
x: this.addModel.x,
y: this.addModel.y
},
code: this.addModel.code,
_type: 'platformScreenDoor',
code: this.isUpdate ? this.form.code : getUID('PlatformScreenDoor', this.iscs.platformScreenDoorList),
_type: 'PlatformScreenDoor',
width: this.addModel.width
};
this.$emit('createDataModel', maButtonModel);
@ -72,7 +91,7 @@ export default {
y: this.addModel.y
},
code: this.addModel.code,
_type: 'platformScreenDoor',
_type: 'PlatformScreenDoor',
width: this.addModel.width
};
this.$emit('deleteDataModel', maButtonModel);
@ -88,10 +107,6 @@ export default {
x: 10,
y: 10
};
},
generateCode() {
const mydate = new Date();
this.addModel.code = 'platformScreenDoor_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
}
}

View File

@ -0,0 +1,88 @@
<template>
<div>
<div class="area-selection">
<el-row><div style="margin-top: 10px;margin-bottom: 5px; color: #9EEBEF;">特定区域</div></el-row>
<el-row><div class="area-selection-button">全线</div></el-row>
<el-row><div class="area-selection-button">全站厅</div></el-row>
<el-row><div class="area-selection-button">全上行站台</div></el-row>
<el-row><div class="area-selection-button">全下行站台</div></el-row>
<el-row><div class="area-selection-button">全办公区</div></el-row>
<el-row><div class="area-selection-button">全出入口</div></el-row>
<el-row><div class="area-selection-button">全换乘通道</div></el-row>
</div>
<div class="broadcast-form">
<div v-for="item in verticalHeader">
<el-row>
<el-col><div>{{ item.name }}</div></el-col>
<div v-for="it in stationList">
<div v-if="item.type===header">
<div>{{ it }}</div>
</div>
<div v-else>
<div />
</div>
</div>
</el-row>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'HomeScreen',
data() {
return {
mes: '1111',
verticalHeader: [
{name:'车站', type: 'header'},
{name: '站厅', type: 'checkBox'},
{name: '上行站台', type: 'checkBox'},
{name: '下行站台', type: 'checkBox'},
{name: '办公区', type: 'checkBox'},
{name: '换乘通道', type: 'checkBox'}
],
stationList: ['会展中心站', '世纪大道站', '交通大学站', '市图书馆站', '中心医院站', '未来路站', '火车站', '人民广场站', '体育中心站']
};
}
};
</script>
<style scoped>
.area-selection{
text-align: center;
border-top: 3px solid #898888;
border-left: 3px solid #898888;
border-right: 3px solid #fff;
border-bottom: 3px solid #fff;
width: 5%;
position: absolute;
top: 200px;
left: 1%;
}
.area-selection-button{
width: 90%;
padding: 6px 0;
margin-bottom: 10px;
font-size: 10px;
background: #CCCCCC;
display: inline-block;
border-top: 2px solid #fff;
border-left: 2px solid #fff;
border-right: 2px solid #565656;
border-bottom: 2px solid #565656;
}
.broadcast-form{
text-align: center;
border-top: 3px solid #898888;
border-left: 3px solid #898888;
border-right: 3px solid #fff;
border-bottom: 3px solid #fff;
width: 80%;
top: 200px;
position: absolute;
left: 7%;
}
</style>

View File

@ -0,0 +1,53 @@
<template>
<div style="height: 100%; width: 100%;">
<standFAS v-if="mode == 'standFAS'" />
<stationHallFAS v-else-if="mode == 'stationHallFAS'" />
<systemFAS v-else-if="mode == 'systemFAS'" />
<home-screen v-else-if="mode === 'PA'" />
<main-screen v-else-if="mode === 'MainScreen'" />
<lcd-control v-else-if="mode === 'LCDcontrol'" />
<time-preview v-else-if="mode === 'TimePreview'" />
<station-network v-else-if="mode === 'StationNetwork'" />
<emergency-release v-else-if="mode === 'EmergencyRelease'" />
</div>
</template>
<script>
import standFAS from './fire-alarm/stand';
import stationHallFAS from './fire-alarm/stationHall';
import systemFAS from './fire-alarm/system';
import HomeScreen from './broadcast/homeScreen';
import MainScreen from './pis/mainScreen';
import LcdControl from './pis/lcdControl';
import TimePreview from './pis/timePreview';
import StationNetwork from './pis/stationNetwork';
import EmergencyRelease from './pis/emergencyRelease';
export default {
components: {
standFAS,
stationHallFAS,
systemFAS,
HomeScreen,
MainScreen,
LcdControl,
TimePreview,
StationNetwork,
EmergencyRelease
},
data() {
return {
mode: 'standFAS'
};
},
watch: {
'$route': function(val) {
this.mode = this.$route.params.mode;
}
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,10 @@
<template>
<div>
紧急发布一览
</div>
</template>
<script>
export default {
};
</script>

View File

@ -0,0 +1,10 @@
<template>
<div>
紧急发布一览
</div>
</template>
<script>
export default {
};
</script>

View File

@ -0,0 +1,10 @@
<template>
<div>
紧急发布一览
</div>
</template>
<script>
export default {
};
</script>

View File

@ -0,0 +1,10 @@
<template>
<div>
紧急发布一览
</div>
</template>
<script>
export default {
};
</script>

View File

@ -0,0 +1,10 @@
<template>
<div>
紧急发布一览
</div>
</template>
<script>
export default {
};
</script>

View File

@ -2,22 +2,22 @@
<div class="iscs-system-box">
<top-nav @selectMode="selectMode" />
<div class="content-box">
<config-content :mode="mode" />
<router-view />
</div>
<bottom />
<!-- <bottom /> -->
</div>
</template>
<script>
import TopNav from './nav.vue';
import bottom from './bottom.vue';
import ConfigContent from './config/index';
// import bottom from './bottom.vue';
// import ConfigContent from './config/index';
export default {
components: {
TopNav,
bottom,
ConfigContent
TopNav
// bottom,
// ConfigContent
},
data() {
return {
@ -25,9 +25,6 @@ export default {
};
},
methods: {
selectMode(type) {
this.mode = type;
}
}
};
</script>
@ -40,7 +37,7 @@ export default {
.content-box{
width: 100%;
height: 100%;
padding: 95px 0;
padding: 95px 0 0;
background: #45607B;
}
</style>

View File

@ -26,7 +26,6 @@ export default {
navList: [
{
name: '火灾报警',
type: 'FAS',
children: [
{
name: '站台报警',
@ -42,116 +41,123 @@ export default {
}
]
}, {
name: '机电', //
children: [
{
name: '机电',
type: 'FAS',
children: []
type: 'BAS'
}
]
}, {
name: '广播',
type: 'FAS',
children: [
{
name: '主画面',
type: 'standFAS'
type: 'PA'
},
{
name: '广播监听',
type: 'standFAS'
type: 'PA'
},
{
name: '计时一览',
type: 'standFAS'
type: 'PA'
}
]
}, {
name: '乘客信息',
type: 'FAS',
children: [
{
name: '主画面',
type: 'standFAS'
type: 'MainScreen'
},
{
name: 'LCD屏控制',
type: 'standFAS'
type: 'LCDcontrol'
},
{
name: '计时一览',
type: 'standFAS'
type: 'TimePreview'
},
{
name: '车站网络',
type: 'standFAS'
type: 'StationNetwork'
},
{
name: '紧急发布一览',
type: 'standFAS'
type: 'EmergencyRelease'
}
]
}, {
name: '闭路电视',
type: 'FAS',
children: [
{
name: '车站控制',
type: 'standFAS'
type: 'CCTV'
},
{
name: '车站时序',
type: 'standFAS'
type: 'CCTV'
},
{
name: '车站时序编辑',
type: 'standFAS'
type: 'CCTV'
},
{
name: '车站设备状态',
type: 'standFAS'
type: 'CCTV'
},
{
name: '中心设备状态',
type: 'standFAS'
type: 'CCTV'
}
]
}, {
name: '屏蔽门',
type: 'FAS',
children: [
{
name: '屏蔽门',
type: 'standFAS'
type: 'PSD'
}
]
}, {
name: '售检票',
type: 'FAS',
children: [
{
name: '售检票',
type: 'standFAS'
type: 'AFC'
}
]
}, {
name: '门禁',
type: 'FAS',
children: [
{
name: '站厅层',
type: 'standFAS'
type: 'ACS'
},
{
name: '站台层',
type: 'standFAS'
type: 'ACS'
}
]
}, {
name: '防淹门',
type: 'FAS',
children: []
}, {
name: '网络状态',
type: 'FAS',
children: []
}
// {
// name: '', //
// children: [
// {
// name: '',
// type: 'standFAS'
// }
// ]
// }, {
// name: '', //
// children: [
// {
// name: '',
// type: 'standFAS'
// }
// ]
// }
],
stationList: [
{
@ -199,13 +205,13 @@ export default {
this.selectIndex = index;
this.selectChildIndex = 0;
if (item.children.length) {
this.$emit('selectMode', item.children[0].type);
this.$router.push({ path: `/iscs/system/config/${item.children[0].type}` });
}
}
},
selectChildren(item, index) { //
this.selectChildIndex = index;
this.$emit('selectMode', item.type);
this.$router.push({ path: `/iscs/system/config/${item.type}` });
},
selectStation(item, index) { //
console.log(item);

View File

@ -0,0 +1,73 @@
<template>
<div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="oprt" :model="form" label-width="200px" size="mini">
<el-form-item :label="$t('map.leftStopPointOffsetFromStart')" prop="leftDistance">
<el-input-number v-model="form.leftDistance" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.rightStopPointOffsetFromTerminal')" prop="rightDistance">
<el-input-number v-model="form.rightDistance" :min="0" />
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" size="big" @click="batchSettings">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-scrollbar>
</div>
</template>
<script>
import { deepAssign } from '@/utils/index';
export default {
name: 'BatchSettings',
props: {
sectionList: {
type: Object,
default: function() {
return [];
}
}
},
data() {
return {
form: {
leftDistance: 0,
rightDistance: 0
},
tipInfoList: []
};
},
methods:{
batchSettings() {
this.tipInfoList = [];
const models = [];
if (this.form.leftDistance || this.form.rightDistance) {
this.sectionList.forEach(section => {
if (section.transferTrack || section.reentryTrack || section.standTrack) {
if (section.lengthFact < this.form.leftDistance || section.lengthFact < this.form.rightDistance ) {
this.tipInfoList.push(`${section.name}[${section.code}]${this.$t('map.failedToSetParkingPointOffset')}`);
} else {
const model = deepAssign({}, section);
model.leftStopPointOffset = this.form.leftDistance;
model.rightStopPointOffset = model.lengthFact - this.form.rightDistance;
models.push(model);
}
}
});
this.$emit('updateMapModel', models, 'five');
if (this.tipInfoList.length) {
this.$emit('tipInfoHandle', this.tipInfoList);
} else {
this.$message.success(this.$t('tip.stopPointOffsetTip'));
}
}
}
}
};
</script>
<style scoped>
</style>

View File

@ -7,7 +7,7 @@
</el-scrollbar>
</div>
<div class="button_box">
<el-button type="primary" size="small" style="margin-top: 5px; margin-left: 10px" @click="verifyData">区段关系校验</el-button>
<el-button type="primary" size="small" style="margin-top: 5px; margin-left: 10px" @click="verifyData">{{ $t('map.sectionRelationCheck') }}</el-button>
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
@ -23,6 +23,9 @@
<el-tab-pane class="view-control" :label="$t('map.logicBlock')" name="four">
<logic-block ref="logicBlock" :edit-model="editModel" @updateMapModel="updateMapModel" />
</el-tab-pane>
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="five">
<batch-settings ref="batchSettings" :section-list="sectionList" @updateMapModel="updateMapModel" @tipInfoHandle="tipInfoHandle" />
</el-tab-pane>
<tip-info ref="tipInfo" :tip-info-list="tipInfoList" />
</el-tabs>
</template>
@ -36,6 +39,7 @@ import LogicBlock from './logicBlock';
import TipInfo from './tipInfo';
import CreateSection from './create';
import SplitOrMerge from './splitOrMerge';
import BatchSettings from './batchSettings';
export default {
name: 'SectionDraft',
components: {
@ -43,7 +47,8 @@ export default {
LogicBlock,
TipInfo,
CreateSection,
SplitOrMerge
SplitOrMerge,
BatchSettings
},
props: {
selected: {
@ -146,8 +151,8 @@ export default {
{ prop: 'sepTypeLeft', label: this.$t('map.sepTypeLeft'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
{ prop: 'sepTypeRight', label: this.$t('map.sepTypeRight'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SectionSepTypeList, isHidden: !this.isSwitchSectionType },
{ prop: 'points', label: this.$t('map.segmentCoordinates'), type: 'points', width: '100px', isHidden: !this.isPointsShow, pointDisabled: this.isStationCodeDisabled, addPoint: this.addPoint, delPoint: this.delPoint, lastDisabled: true },
{ prop: 'logicSectionStartOffset', label: '逻辑区段起点偏移:', type: 'number', min: 0, width: '150px', isHidden: !this.isLSectionOffsetShow, disabled: true},
{ prop: 'logicSectionEndOffset', label: '逻辑区段终点偏移:', type: 'number', min: 0, width: '150px', isHidden: !this.isLSectionOffsetShow, disabled: true},
{ prop: 'logicSectionStartOffset', label: this.$t('map.logicalSectionStartOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isLSectionOffsetShow, disabled: true},
{ prop: 'logicSectionEndOffset', label: this.$t('map.logicalSectionEndOffset'), type: 'number', min: 0, width: '150px', isHidden: !this.isLSectionOffsetShow, disabled: true},
{ prop: 'standTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 1
{ prop: 'standTrackName', label: this.$t('map.standTrackName'), type: 'input', isHidden: !this.isstandTrackNameShow },
@ -185,16 +190,16 @@ export default {
{value: false, label: this.$t('map.fromLargeToSmall')}
] }, // 1
{ prop: 'curve', label: this.$t('map.isCurve'), type: 'checkbox', isHidden: !this.isSwitchSectionType },
{ prop: 'relevanceSectionList', label: '关联道岔区段:', type: 'multiSelect', optionLabel: 'name&&code', optionValue: 'code', options: this.switchSectionList, isHidden: this.isSwitchSectionType }
{ prop: 'relevanceSectionList', label: this.$t('map.associateSwitchSection'), type: 'multiSelect', optionLabel: 'name&&code', optionValue: 'code', options: this.switchSectionList, isHidden: this.isSwitchSectionType }
]
},
map: {
name: this.$t('map.mapData'),
item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList },
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter') },
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, isHidden: !this.isStopPointOffset },
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, isHidden: !this.isStopPointOffset },
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), change: true, deviceChange: this.lengthFactChange },
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, disabled: true, isHidden: !this.isStopPointOffset },
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
{ prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') }
@ -380,6 +385,12 @@ export default {
this.regionList = this.$ConstSelect.RegionTypeList;
},
methods: {
lengthFactChange() {
if (this.editModel.lengthFact > 5 && (this.editModel.transferTrack || this.editModel.reentryTrack || this.editModel.standTrack)) {
this.editModel.leftStopPointOffset = 5;
this.editModel.rightStopPointOffset = this.editModel.lengthFact - 5;
}
},
deviceChange(code) {
this.$emit('setCenter', code);
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
@ -619,6 +630,12 @@ export default {
this.$refs.tipInfo.doShow();
}
},
tipInfoHandle(list) {
if (list.length) {
this.tipInfoList = list;
this.$refs.tipInfo.doShow();
}
},
clear() {
this.$refs.dataform.resetFields();
// 沿

View File

@ -9,7 +9,7 @@
</template>
<script>
import { getPublishMapList, delPublishMap, getPublishMapExport, putMapOnLine, putMapOffLine, updatePublishMapName, updatePublishMapCity } from '@/api/jmap/map';
import { getPublishMapList, delPublishMap, getPublishMapExport, putMapOnLine, putMapOffLine, updatePublishMapName, updatePublishMapCity, simulationCheck } from '@/api/jmap/map';
import { getLineCodeList } from '@/api/management/mapline';
import localStore from 'storejs';
import UpdateOperate from './draft.vue';
@ -124,6 +124,11 @@ export default {
{
name: this.$t('publish.copy'),
handleClick: this.handleCopy
},
{
name: this.$t('publish.simulationDataCheck'),
handleClick: this.handleSimulationCheck,
showControl: (row) => { return row.drawWay; }
}
]
}
@ -212,7 +217,7 @@ export default {
},
publicList(index, row) {
this.$router.push({ path: `/publish/map/detail`, query: { code: row.lineCode } });
this.$router.push({ path: `/publish/map/detail`, query: { mapId: row.id } });
},
handlePutaway(index, row) {
@ -292,7 +297,25 @@ export default {
});
});
},
async handleSimulationCheck(index, row) {
const res = await simulationCheck(row.id);
if (!res.data.length) {
this.$message.success(this.$t('publish.simulationDataIsValidated'));
return;
}
this.tableToExcel(res.data);
},
tableToExcel(data) {
const filterVal = ['index'];
const arr = [];
data.forEach(item => {
arr.push({ index: item });
});
const dataList = this.formatJson(filterVal, arr);
import('@/utils/Export2Excel').then(excel => {
excel.export_json_to_excel([this.$t('tip.dataQuestion')], dataList, this.$t('tip.dataList'));
});
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]));
},

View File

@ -63,7 +63,7 @@ export default {
},
queryFunction(params) {
return getPublishMapDetailList(params, this.$route.query.code);
return getPublishMapDetailList(params, this.$route.query.mapId);
},
turnback() {
this.$router.go(-1);

View File

@ -1,36 +0,0 @@
<template>
<div style="height: 100%; width: 100%;">
<standFAS v-if="mode == 'standFAS'" />
<stationHallFAS v-if="mode == 'stationHallFAS'" />
<systemFAS v-if="mode == 'systemFAS'" />
</div>
</template>
<script>
import standFAS from './fire-alarm/stand';
import stationHallFAS from './fire-alarm/stationHall';
import systemFAS from './fire-alarm/system';
export default {
components: {
standFAS,
stationHallFAS,
systemFAS
},
props: {
mode: {
type: String,
required: true
}
},
data() {
return {
mes: '1111'
};
}
};
</script>
<style lang="scss" scoped>
</style>