Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
# Conflicts: # src/iscs/constant/deviceRender.js # src/iscs/constant/deviceType.js # src/iscs/shape/factory.js # src/iscs/utils/parser.js
This commit is contained in:
commit
d744d7a69e
@ -73,5 +73,6 @@ export default {
|
||||
commandDictionary: 'Command dictionary',
|
||||
configLine: 'Line management',
|
||||
deviceManage: 'Device management',
|
||||
iscsDraw: 'Iscs Draw'
|
||||
iscsDraw: 'Iscs Draw',
|
||||
iscsSystem: 'Iscs System'
|
||||
};
|
||||
|
@ -74,5 +74,6 @@ export default {
|
||||
commandDictionary: '指令字典',
|
||||
configLine: '线路管理',
|
||||
deviceManage: '设备管理',
|
||||
iscsDraw: 'Iscs绘制'
|
||||
iscsDraw: 'Iscs绘制',
|
||||
iscsSystem: 'Iscs系统'
|
||||
};
|
||||
|
@ -3,32 +3,32 @@ import Group from 'zrender/src/container/Group';
|
||||
|
||||
export default class elevatorBack extends Group {
|
||||
|
||||
constructor(device) {
|
||||
super();
|
||||
this.event = device.event;
|
||||
this.model = device.model;
|
||||
this.create();
|
||||
}
|
||||
constructor(device) {
|
||||
super();
|
||||
this.event = device.event;
|
||||
this.model = device.model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const tempString='M'+model.width/6+' '+model.height/8*6+' L'+model.width/6*4+
|
||||
' 0 L'+model.width/6*5+' 0 A '+model.width/6+' '+model.width/6+' 0 0 1 '+
|
||||
model.width/6*5+' '+model.height/4+'L '+model.width/3+' '+model.height+' L'+model.width/6+
|
||||
' '+model.height+' '+'A'+model.width/6+' '+model.width/6+' 0 0 1 '+model.width/6+' '+model.height/8*6;
|
||||
this.elevatorBack = toolpath.createFromString(tempString, {
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
style: {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
brushType: 'fill',
|
||||
fill: this.model.fillColor || '#313131',
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
this.add(this.elevatorBack);
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
const tempString = 'M' + model.width / 6 + ' ' + model.height / 8 * 6 + ' L' + model.width / 6 * 4 +
|
||||
' 0 L' + model.width / 6 * 5 + ' 0 A ' + model.width / 6 + ' ' + model.width / 6 + ' 0 0 1 ' +
|
||||
model.width / 6 * 5 + ' ' + model.height / 4 + 'L ' + model.width / 3 + ' ' + model.height + ' L' + model.width / 6 +
|
||||
' ' + model.height + ' ' + 'A' + model.width / 6 + ' ' + model.width / 6 + ' 0 0 1 ' + model.width / 6 + ' ' + model.height / 8 * 6;
|
||||
this.elevatorBack = toolpath.createFromString(tempString, {
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
style: {
|
||||
x: model.point.x,
|
||||
y: model.point.y,
|
||||
brushType: 'fill',
|
||||
fill: this.model.fillColor || '#313131',
|
||||
lineWidth: 0
|
||||
}
|
||||
});
|
||||
this.add(this.elevatorBack);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -99,6 +99,42 @@ deviceRender[deviceType.BorderRadius] = {
|
||||
z: 4
|
||||
};
|
||||
|
||||
/** 空调机 */
|
||||
deviceRender[deviceType.AirConditioner] = {
|
||||
_type: deviceType.AirConditioner,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 轨道排风机 */
|
||||
deviceRender[deviceType.OrbitalVentilator] = {
|
||||
_type: deviceType.OrbitalVentilator,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 射流风机 */
|
||||
deviceRender[deviceType.JetFan] = {
|
||||
_type: deviceType.JetFan,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 隧道风机 */
|
||||
deviceRender[deviceType.TunnelFan] = {
|
||||
_type: deviceType.TunnelFan,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 防火阀 */
|
||||
deviceRender[deviceType.FireDamper] = {
|
||||
_type: deviceType.FireDamper,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 防烟防火阀 */
|
||||
deviceRender[deviceType.SmookProofFd] = {
|
||||
_type: deviceType.SmookProofFd,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
/** 闸机渲染配置 */
|
||||
deviceRender[deviceType.BrakeMachine] = {
|
||||
_type: deviceType.BrakeMachine,
|
||||
@ -136,4 +172,5 @@ deviceRender[deviceType.VolumeControlDamper] = {
|
||||
z: 4
|
||||
};
|
||||
|
||||
|
||||
export default deviceRender;
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
const deviceType = {
|
||||
ManualAlarmButton: 'manualAlarmButton',
|
||||
Vidicon: 'Vidicon',
|
||||
@ -15,6 +14,12 @@ const deviceType = {
|
||||
CoolTower:'CoolTower',
|
||||
BorderRadius: 'borderRadius',
|
||||
EndDoor: 'endDoor',
|
||||
AirConditioner:'AirConditioner',
|
||||
OrbitalVentilator:'OrbitalVentilator',
|
||||
JetFan:'JetFan',
|
||||
TunnelFan:'TunnelFan',
|
||||
FireDamper:'FireDamper',
|
||||
SmookProofFd:'SmookProofFd',
|
||||
BrakeMachine: 'brakeMachine',
|
||||
EntranceGuard: 'entranceGuard',
|
||||
SemiAutomaticTicketMachine: 'semiAutomaticTicketMachine',
|
||||
|
0
src/iscs/shape/bas/airConditioner.js
Normal file
0
src/iscs/shape/bas/airConditioner.js
Normal file
0
src/iscs/shape/bas/fireDamper.js
Normal file
0
src/iscs/shape/bas/fireDamper.js
Normal file
0
src/iscs/shape/bas/jetFan.js
Normal file
0
src/iscs/shape/bas/jetFan.js
Normal file
0
src/iscs/shape/bas/orbitalVentilator.js
Normal file
0
src/iscs/shape/bas/orbitalVentilator.js
Normal file
0
src/iscs/shape/bas/smookProofFd.js
Normal file
0
src/iscs/shape/bas/smookProofFd.js
Normal file
0
src/iscs/shape/bas/tunnelFan.js
Normal file
0
src/iscs/shape/bas/tunnelFan.js
Normal file
@ -14,6 +14,12 @@ import Chiller from './bas/chiller';
|
||||
import CoolTower from './bas/coolTower';
|
||||
import EndDoor from './endDoor';
|
||||
import BorderRadius from './borderRadius';
|
||||
import AirConditioner from './bas/airConditioner';
|
||||
import OrbitalVentilator from './bas/orbitalVentilator';
|
||||
import JetFan from './bas/jetFan';
|
||||
import TunnelFan from './bas/tunnelFan';
|
||||
import FireDamper from './bas/fireDamper';
|
||||
import SmookProofFd from './bas/smookProofFd';
|
||||
import BrakeMachine from './brakeMachine';
|
||||
import EntranceGuard from './entranceGuard/index';
|
||||
import SemiAutomaticTicketMachine from './semiAutomaticTicketMachine';
|
||||
@ -37,6 +43,12 @@ iscsShape[deviceType.Chiller] = Chiller;
|
||||
iscsShape[deviceType.CoolTower] = CoolTower;
|
||||
iscsShape[deviceType.EndDoor] = EndDoor;
|
||||
iscsShape[deviceType.BorderRadius] = BorderRadius;
|
||||
iscsShape[deviceType.AirConditioner] = AirConditioner;
|
||||
iscsShape[deviceType.OrbitalVentilator] = OrbitalVentilator;
|
||||
iscsShape[deviceType.JetFan] = JetFan;
|
||||
iscsShape[deviceType.TunnelFan] = TunnelFan;
|
||||
iscsShape[deviceType.FireDamper] = FireDamper;
|
||||
iscsShape[deviceType.SmookProofFd] = SmookProofFd;
|
||||
iscsShape[deviceType.BrakeMachine] = BrakeMachine;
|
||||
iscsShape[deviceType.EntranceGuard] = EntranceGuard;
|
||||
iscsShape[deviceType.SemiAutomaticTicketMachine] = SemiAutomaticTicketMachine;
|
||||
|
9
src/iscs/utils/Uid.js
Normal file
9
src/iscs/utils/Uid.js
Normal file
@ -0,0 +1,9 @@
|
||||
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}`;
|
||||
} else {
|
||||
return type + `_1`;
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@ import * as matrix from 'zrender/src/core/matrix';
|
||||
import deviceType from '../constant/deviceType';
|
||||
import deviceRender from '../constant/deviceRender';
|
||||
import store from '@/store';
|
||||
import { deepClone } from '@/utils/index';
|
||||
|
||||
export function createTransform(opts) {
|
||||
let transform = matrix.create();
|
||||
@ -86,6 +87,25 @@ export function parser(data) {
|
||||
zrUtil.each(data.borderRadiusList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.BorderRadius, elem);
|
||||
} );
|
||||
|
||||
zrUtil.each(data.airConditionerList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.AirConditioner, elem);
|
||||
} );
|
||||
zrUtil.each(data.orbitalVentilatorList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.OrbitalVentilator, elem);
|
||||
} );
|
||||
zrUtil.each(data.jetFanList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.JetFan, elem);
|
||||
} );
|
||||
zrUtil.each(data.tunnelFanList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.TunnelFan, elem);
|
||||
} );
|
||||
zrUtil.each(data.fireDamperList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.FireDamper, elem);
|
||||
} );
|
||||
zrUtil.each(data.smookProofFdList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.SmookProofFd, elem);
|
||||
} );
|
||||
zrUtil.each(data.brakeMachineList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.BrakeMachine, elem);
|
||||
});
|
||||
@ -98,6 +118,7 @@ export function parser(data) {
|
||||
zrUtil.each(data.semiAutomaticTicketMachineList || [], elem =>{
|
||||
iscsDevice[elem.code] = deviceFactory(deviceType.SemiAutomaticTicketMachine, elem);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return iscsDevice;
|
||||
@ -108,9 +129,9 @@ function updateIscsListByDevice(iscs, name, device) {
|
||||
if (list) {
|
||||
const index = list.findIndex(elem => { return elem.code == device.code; });
|
||||
if (index >= 0) {
|
||||
device._dispose ? list.splice(index, 1) : list[index] = device;
|
||||
device._dispose ? list.splice(index, 1) : list[index] = deepClone(device);
|
||||
} else {
|
||||
list.push(device);
|
||||
list.push(deepClone(device));
|
||||
}
|
||||
} else {
|
||||
iscs[name] = [device];
|
||||
@ -119,7 +140,7 @@ function updateIscsListByDevice(iscs, name, device) {
|
||||
}
|
||||
|
||||
export function updateIscsData(device) {
|
||||
const iscsData = store.getters['iscs/iscs'];
|
||||
const iscsData = store.state.iscs;
|
||||
switch (device._type) {
|
||||
case deviceType.vidiconList :
|
||||
updateIscsListByDevice(iscsData, 'vidiconList', device);
|
||||
@ -175,6 +196,24 @@ export function updateIscsData(device) {
|
||||
case deviceType.SemiAutomaticTicketMachine:
|
||||
updateIscsListByDevice(iscsData, 'semiAutomaticTicketMachineList', device);
|
||||
break;
|
||||
case deviceType.AirConditioner:
|
||||
updateIscsListByDevice(iscsData, 'airConditionerList', device);
|
||||
break;
|
||||
case deviceType.OrbitalVentilator:
|
||||
updateIscsListByDevice(iscsData, 'orbitalVentilatorList', device);
|
||||
break;
|
||||
case deviceType.JetFan:
|
||||
updateIscsListByDevice(iscsData, 'jetFanList', device);
|
||||
break;
|
||||
case deviceType.TunnelFan:
|
||||
updateIscsListByDevice(iscsData, 'tunnelFanList', device);
|
||||
break;
|
||||
case deviceType.FireDamper:
|
||||
updateIscsListByDevice(iscsData, 'fireDamperList', device);
|
||||
break;
|
||||
case deviceType.SmookProofFd:
|
||||
updateIscsListByDevice(iscsData, 'smookProofFdList', device);
|
||||
break;
|
||||
}
|
||||
|
||||
store.dispatch('iscs/setIscsData', iscsData);
|
||||
|
@ -14,10 +14,10 @@ export default {
|
||||
ExcelConfig: {
|
||||
beginRow: 1,
|
||||
beginCol: 0,
|
||||
fieldNum: 8,
|
||||
fieldNum: 10,
|
||||
sepField: '车次',
|
||||
columns: {
|
||||
'车站名称': { key: 'stationName', formatter: (val) => { return val; } },
|
||||
'车站名': { key: 'stationName', formatter: (val) => { return val; } },
|
||||
'到点': { key: 'arriveTime', formatter: (val) => { return val; } },
|
||||
'发点': { key: 'departureTime', formatter: (val) => { return val; } }
|
||||
}
|
||||
@ -25,45 +25,64 @@ export default {
|
||||
|
||||
/** 解析exal数据转换为Json后台数据*/
|
||||
importData(Sheet, JsonData) {
|
||||
var dataList = convertSheetToList(Sheet, false);
|
||||
var dataList = convertSheetToList(Sheet, true);
|
||||
var needList = Object.keys(this.ExcelConfig.columns);
|
||||
|
||||
if (dataList && dataList.length) {
|
||||
for (var rowIndex = this.ExcelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
|
||||
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList[this.ExcelConfig.beginCol].length; colIndex += this.ExcelConfig.fieldNum + 1) {
|
||||
var tripNew, tripObj;
|
||||
for (var colIndex = this.ExcelConfig.beginCol; colIndex < dataList.length; colIndex += this.ExcelConfig.fieldNum + 1) {
|
||||
var isContinue = true;
|
||||
var tripObj = { code: '', arrivalList: [] };
|
||||
|
||||
for (var rowIndex = this.ExcelConfig.beginRow; isContinue; rowIndex += 1) {
|
||||
isContinue = false;
|
||||
|
||||
var stationObj = {};
|
||||
|
||||
tripNew = tripObj = { code: '', arrivalList: [] };
|
||||
for (var index = 0; index < this.ExcelConfig.fieldNum; index += 1) {
|
||||
var title = dataList[0][colIndex + index];
|
||||
var value = dataList[rowIndex][colIndex + index];
|
||||
if (dataList[colIndex + index]) {
|
||||
var title = dataList[colIndex + index][0];
|
||||
var value = dataList[colIndex + index][rowIndex];
|
||||
|
||||
if (title && value) {
|
||||
var titleStr = `${title}`.trim();
|
||||
var valueStr = `${value}`.trim();
|
||||
if (title && value) {
|
||||
// 数据列解析
|
||||
isContinue = true;
|
||||
var titleStr = `${title}`.trim();
|
||||
var valueStr = `${value}`.trim();
|
||||
|
||||
if (titleStr.includes(this.ExcelConfig.sepField)) {
|
||||
tripObj.code = valueStr;
|
||||
JsonData.forEach(elem => {
|
||||
if (elem.code == valueStr) {
|
||||
tripObj = elem;
|
||||
return;
|
||||
if (titleStr == this.ExcelConfig.sepField) {
|
||||
if (tripObj.code) {
|
||||
const length = tripObj.arrivalList.length;
|
||||
if (length == 1) {
|
||||
tripObj.arrivalList[0]['flag'] = true;
|
||||
}
|
||||
JsonData.push(tripObj);
|
||||
tripObj = { code: valueStr, arrivalList: [] };
|
||||
} else {
|
||||
tripObj.code = valueStr;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 取需要的字段
|
||||
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
|
||||
stationObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
|
||||
// 取需要的字段
|
||||
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
|
||||
stationObj[this.ExcelConfig.columns[titleStr].key] = this.ExcelConfig.columns[titleStr].formatter(valueStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tripObj.arrivalList.push(stationObj);
|
||||
if (tripObj.code && tripObj == tripNew) {
|
||||
JsonData.push(tripObj);
|
||||
// 添加字段值
|
||||
if (Object.keys(stationObj).length) {
|
||||
tripObj.arrivalList.push(stationObj);
|
||||
}
|
||||
}
|
||||
|
||||
// 添加最后那条没有车次的记录
|
||||
if (tripObj.code) {
|
||||
const length = tripObj.arrivalList.length;
|
||||
if (length) {
|
||||
tripObj.arrivalList[length - 1]['flag'] = true;
|
||||
}
|
||||
JsonData.push(tripObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,6 +97,7 @@ export default {
|
||||
/** 按服务遍历数据*/
|
||||
data.serviceNumberDataList.forEach((service) => {
|
||||
/** 按车次遍历数据*/
|
||||
var isBackup = true;
|
||||
var opt = { name: '', markPointData: [], data: [] };
|
||||
if (service.tripNumberDataList && service.tripNumberDataList.length) {
|
||||
service.tripNumberDataList.forEach((train, j) => {
|
||||
@ -105,8 +125,8 @@ export default {
|
||||
train.stationTimeList.forEach((elem, index) => {
|
||||
idx = index;
|
||||
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
|
||||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
index > 0 && index < train.stationTimeList.length - 1) {
|
||||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
index > 0 && index < train.stationTimeList.length - 1) {
|
||||
const aa = `${train.directionCode}${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.directionCode, false), elem.stationCode, aa]);
|
||||
}
|
||||
@ -132,10 +152,12 @@ export default {
|
||||
opt = { name: '', markPointData: [], data: [] };
|
||||
}
|
||||
}
|
||||
|
||||
isBackup = train.backup;
|
||||
});
|
||||
|
||||
// 不是备用车,按服务添加线
|
||||
if (!service.backup) {
|
||||
if (!isBackup) {
|
||||
/** 创建一条完成的服务数据*/
|
||||
var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle));
|
||||
if (model) {
|
||||
@ -249,11 +271,11 @@ export default {
|
||||
|
||||
/** 格式化y轴数据*/
|
||||
computedFormatYAxis(stations, params) {
|
||||
var yText = '0m';
|
||||
var yText = '';
|
||||
|
||||
stations.forEach(elem => {
|
||||
if (elem.kmRange < parseInt(params.value) / this.CoordMultiple - this.EdgeHeight) {
|
||||
yText = Math.floor(elem.kmRange) + 'm';
|
||||
yText = elem.kmRange + 'm';
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -39,6 +39,7 @@ 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');
|
||||
|
||||
@ -783,6 +784,13 @@ export const asyncRouter = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'iscs/system',
|
||||
component: IscsSystem,
|
||||
meta: {
|
||||
i18n: 'router.iscsSystem'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'dictionary',
|
||||
component: Dictionary,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
import {updateIscsData } from '@/iscs/utils/parser';
|
||||
/**
|
||||
* iscs状态数据
|
||||
*/
|
||||
@ -45,12 +45,89 @@ const iscs = {
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
frozenPumpList:(state)=>{
|
||||
if (state.iscs && state.iscs.frozenPumpList) {
|
||||
return state.iscs.frozenPumpList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
airConditionerList:(state)=>{
|
||||
if (state.iscs && state.iscs.airConditionerList) {
|
||||
return state.iscs.airConditionerList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
tunnelFanList:(state)=>{
|
||||
if (state.iscs && state.iscs.tunnelFanList) {
|
||||
return state.iscs.tunnelFanList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
orbitalVentilatorList:(state)=>{
|
||||
if (state.iscs && state.iscs.orbitalVentilatorList) {
|
||||
return state.iscs.orbitalVentilatorList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
smookProofFdList:(state)=>{
|
||||
if (state.iscs && state.iscs.smookProofFdList) {
|
||||
return state.iscs.smookProofFdList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
chillerList:(state)=>{
|
||||
if (state.iscs && state.iscs.chillerList) {
|
||||
return state.iscs.chillerList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
coolTowerList:(state)=>{
|
||||
if (state.iscs && state.iscs.coolTowerList) {
|
||||
return state.iscs.coolTowerList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
fireDamperList:(state)=>{
|
||||
if (state.iscs && state.iscs.fireDamperList) {
|
||||
return state.iscs.fireDamperList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
jetFanList:(state)=>{
|
||||
if (state.iscs && state.iscs.jetFanList) {
|
||||
return state.iscs.jetFanList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
ventilatorList:(state)=>{
|
||||
if (state.iscs && state.iscs.ventilatorList) {
|
||||
return state.iscs.ventilatorList;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mutations: {
|
||||
iscsRender: (state, devices) => {
|
||||
Vue.prototype.$iscs && Vue.prototype.$iscs.render(devices);
|
||||
if (devices && devices.length) {
|
||||
if (state.iscs) {
|
||||
devices.forEach(elem => { updateIscsData(elem); });
|
||||
}
|
||||
if (Vue.prototype.$iscs) {
|
||||
Vue.prototype.$iscs.render(devices);
|
||||
}
|
||||
}
|
||||
},
|
||||
setIscsData: (state, iscs) => {
|
||||
state.iscs = iscs;
|
||||
@ -73,8 +150,10 @@ const iscs = {
|
||||
if (!(models instanceof Array)) {
|
||||
models = [models];
|
||||
}
|
||||
|
||||
commit('iscsRender', models);
|
||||
resolve(models);
|
||||
|
||||
});
|
||||
},
|
||||
setUpdateDeviceData: ({ commit }, models) => {
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'AirConditioner',
|
||||
data() {
|
||||
@ -52,7 +54,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'airConditionerList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'AirConditioner',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('AirConditioner', this.airConditionerList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -118,10 +122,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', airConditionerModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'airConditioner_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'Chiller',
|
||||
data() {
|
||||
@ -52,7 +54,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'chillerList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'Chiller',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('Chiller', this.chillerList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -118,10 +122,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', chillerModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'chiller_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'CoolTower',
|
||||
data() {
|
||||
@ -52,7 +54,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'coolTowerList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'CoolTower',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('CoolTower', this.coolTowerList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -118,10 +122,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', chillerModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'coolTower_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'FireDamper',
|
||||
data() {
|
||||
@ -52,7 +54,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'fireDamperList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'FireDamper',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('FireDamper', this.fireDamperList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -118,10 +122,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', fireDamperModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'fireDamper_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -28,6 +28,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'FrozenPump',
|
||||
data() {
|
||||
@ -62,7 +64,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'frozenPumpList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -92,7 +96,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'FrozenPump',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('FrozenPump', this.frozenPumpList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00',
|
||||
pumpType:this.form.type
|
||||
@ -132,10 +136,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', frozenPumpModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'frozenPump_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'JetFan',
|
||||
data() {
|
||||
@ -52,7 +54,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'jetFanList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'JetFan',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('JetFan', this.jetFanList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -118,10 +122,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', jetFanModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'jetFan_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'OrbitalVentilator',
|
||||
data() {
|
||||
@ -52,7 +54,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'orbitalVentilatorList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'OrbitalVentilator',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('OrbitalVentilator', this.orbitalVentilatorList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -118,10 +122,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', orbitalVentilatorModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'orbitalVentilator_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'SmookProofFd',
|
||||
data() {
|
||||
@ -51,8 +53,10 @@ export default {
|
||||
}
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
computed: {
|
||||
...mapGetters('iscs', [
|
||||
'smookProofFdList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'SmookProofFd',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('SmookProofFd', this.smookProofFdList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -118,10 +122,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', smookProofFdModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'smookProofFd_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'TunnelFan',
|
||||
data() {
|
||||
@ -52,7 +54,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'tunnelFanList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'TunnelFan',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('TunnelFan', this.tunnelFanList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -91,7 +95,6 @@ export default {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
initPage() {
|
||||
this.isUpdate = false;
|
||||
@ -118,10 +121,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', tunnelFanModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'tunnelFan_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -22,6 +22,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
export default {
|
||||
name:'Ventilator',
|
||||
data() {
|
||||
@ -52,7 +54,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
|
||||
...mapGetters('iscs', [
|
||||
'ventilatorList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
@ -81,7 +85,7 @@ export default {
|
||||
y: this.form.y
|
||||
},
|
||||
_type: 'Ventilator',
|
||||
code: this.isUpdate ? this.form.code : this.generateCode(),
|
||||
code: this.isUpdate ? this.form.code : getUID('Ventilator', this.ventilatorList),
|
||||
width: this.form.width,
|
||||
color:'#00ff00'
|
||||
};
|
||||
@ -118,10 +122,6 @@ export default {
|
||||
};
|
||||
this.$emit('deleteDataModel', chillerModel );
|
||||
this.initPage();
|
||||
},
|
||||
generateCode() {
|
||||
const mydate = new Date();
|
||||
return 'ventilator_' + mydate.getDay() + mydate.getHours() + mydate.getMinutes() + mydate.getSeconds() + mydate.getMilliseconds() + Math.round(Math.random() * 10000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -25,6 +25,7 @@
|
||||
<script>
|
||||
// 车站摄像机
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
|
||||
export default {
|
||||
name: 'ManualAlarmButton',
|
||||
@ -52,19 +53,10 @@ export default {
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getUid() {
|
||||
if (this.vidiconList.length) {
|
||||
const lastCode = this.vidiconList[this.vidiconList.length - 1].code;
|
||||
const num = lastCode.split('vidicon_')[1];
|
||||
return `vidicon_${num + 1}`;
|
||||
} else {
|
||||
return `vidicon_1`;
|
||||
}
|
||||
},
|
||||
onSubmit(form) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const Uid = this.getUid();
|
||||
const Uid = getUID('Vidicon', this.vidiconList);
|
||||
const model = {
|
||||
_type: 'Vidicon',
|
||||
code: Uid,
|
||||
|
@ -22,6 +22,7 @@
|
||||
<script>
|
||||
// 车站摄像机
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getUID} from '@/iscs/utils/Uid';
|
||||
|
||||
export default {
|
||||
name: 'ManualAlarmButton',
|
||||
@ -48,19 +49,10 @@ export default {
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
getUid() {
|
||||
if (this.vidiconCloudList.length) {
|
||||
const lastCode = this.vidiconCloudList[this.vidiconCloudList.length - 1].code;
|
||||
const num = lastCode.split('vidiconCloud_')[1];
|
||||
return `vidiconCloud_${num + 1}`;
|
||||
} else {
|
||||
return `vidiconCloud_1`;
|
||||
}
|
||||
},
|
||||
onSubmit(form) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const Uid = this.getUid();
|
||||
const Uid = getUID('VidiconCloud', this.vidiconCloudList);
|
||||
const model = {
|
||||
_type: 'VidiconCloud',
|
||||
code: Uid,
|
||||
|
26
src/views/system/iscsSystem/bottom.vue
Normal file
26
src/views/system/iscsSystem/bottom.vue
Normal file
@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="bottom-box">
|
||||
111
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mes: '1111'
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.bottom-box{
|
||||
width: 100%;
|
||||
height: 95px;
|
||||
background-color: #ACACAC;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
20
src/views/system/iscsSystem/config/fire-alarm/stand.vue
Normal file
20
src/views/system/iscsSystem/config/fire-alarm/stand.vue
Normal file
@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="">
|
||||
站台报警
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mes: '1111'
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="">
|
||||
站厅报警
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mes: '1111'
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
20
src/views/system/iscsSystem/config/fire-alarm/system.vue
Normal file
20
src/views/system/iscsSystem/config/fire-alarm/system.vue
Normal file
@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="">
|
||||
系统报警
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mes: '1111'
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
36
src/views/system/iscsSystem/config/index.vue
Normal file
36
src/views/system/iscsSystem/config/index.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<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>
|
46
src/views/system/iscsSystem/index.vue
Normal file
46
src/views/system/iscsSystem/index.vue
Normal file
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div class="iscs-system-box">
|
||||
<top-nav @selectMode="selectMode" />
|
||||
<div class="content-box">
|
||||
<config-content :mode="mode" />
|
||||
</div>
|
||||
<bottom />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TopNav from './nav.vue';
|
||||
import bottom from './bottom.vue';
|
||||
import ConfigContent from './config/index';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TopNav,
|
||||
bottom,
|
||||
ConfigContent
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
mode: 'standFAS'
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectMode(type) {
|
||||
this.mode = type;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.iscs-system-box{
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
.content-box{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 95px 0;
|
||||
background: #45607B;
|
||||
}
|
||||
</style>
|
291
src/views/system/iscsSystem/nav.vue
Normal file
291
src/views/system/iscsSystem/nav.vue
Normal file
@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<div class="nav-box">
|
||||
<div class="nav-button-box">
|
||||
<div v-for="(item, index) in navList" :key="index" class="nav-list-box" :class="{'active': selectIndex == index}" @click="selectTab(item, index)">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="nav-button-box">
|
||||
<div v-for="(item, index) in navList[selectIndex].children" :key="index" class="nav-list-box" :class="{'active': selectChildIndex == index}" @click="selectChildren(item, index)">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="nav-button-box station-box1">
|
||||
<div v-for="(item, index) in stationList" :key="index" class="station-box">
|
||||
<div class="station-line" />
|
||||
<div class="nav-list-box station-list-box" :class="{'active': selectStationIndex == index}" @click="selectStation(item, index)" />
|
||||
<div class="station-name">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selectIndex: 0,
|
||||
selectChildIndex: 0,
|
||||
selectStationIndex: 0,
|
||||
navList: [
|
||||
{
|
||||
name: '火灾报警',
|
||||
type: 'FAS',
|
||||
children: [
|
||||
{
|
||||
name: '站台报警',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '站厅报警',
|
||||
type: 'stationHallFAS'
|
||||
},
|
||||
{
|
||||
name: '系统状态',
|
||||
type: 'systemFAS'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '机电',
|
||||
type: 'FAS',
|
||||
children: []
|
||||
}, {
|
||||
name: '广播',
|
||||
type: 'FAS',
|
||||
children: [
|
||||
{
|
||||
name: '主画面',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '广播监听',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '计时一览',
|
||||
type: 'standFAS'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '乘客信息',
|
||||
type: 'FAS',
|
||||
children: [
|
||||
{
|
||||
name: '主画面',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: 'LCD屏控制',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '计时一览',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '车站网络',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '紧急发布一览',
|
||||
type: 'standFAS'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '闭路电视',
|
||||
type: 'FAS',
|
||||
children: [
|
||||
{
|
||||
name: '车站控制',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '车站时序',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '车站时序编辑',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '车站设备状态',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '中心设备状态',
|
||||
type: 'standFAS'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '屏蔽门',
|
||||
type: 'FAS',
|
||||
children: [
|
||||
{
|
||||
name: '屏蔽门',
|
||||
type: 'standFAS'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '售检票',
|
||||
type: 'FAS',
|
||||
children: [
|
||||
{
|
||||
name: '售检票',
|
||||
type: 'standFAS'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '门禁',
|
||||
type: 'FAS',
|
||||
children: [
|
||||
{
|
||||
name: '站厅层',
|
||||
type: 'standFAS'
|
||||
},
|
||||
{
|
||||
name: '站台层',
|
||||
type: 'standFAS'
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: '防淹门',
|
||||
type: 'FAS',
|
||||
children: []
|
||||
}, {
|
||||
name: '网络状态',
|
||||
type: 'FAS',
|
||||
children: []
|
||||
}
|
||||
],
|
||||
stationList: [
|
||||
{
|
||||
name: '会展中心站',
|
||||
id: 0
|
||||
},
|
||||
{
|
||||
name: '世纪大道站',
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
name: '交通大学站',
|
||||
id: 2
|
||||
},
|
||||
{
|
||||
name: '市图书馆站',
|
||||
id: 3
|
||||
},
|
||||
{
|
||||
name: '中心医院站',
|
||||
id: 4
|
||||
},
|
||||
{
|
||||
name: '未来路站',
|
||||
id: 5
|
||||
},
|
||||
{
|
||||
name: '火车站',
|
||||
id: 6
|
||||
},
|
||||
{
|
||||
name: '人民广场站',
|
||||
id: 7
|
||||
},
|
||||
{
|
||||
name: '体育中心站',
|
||||
id: 8
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selectTab(item, index) { // 选择大分类
|
||||
if (this.selectIndex != index) {
|
||||
this.selectIndex = index;
|
||||
this.selectChildIndex = 0;
|
||||
if (item.children.length) {
|
||||
this.$emit('selectMode', item.children[0].type);
|
||||
}
|
||||
}
|
||||
},
|
||||
selectChildren(item, index) { // 选择子菜单
|
||||
this.selectChildIndex = index;
|
||||
this.$emit('selectMode', item.type);
|
||||
},
|
||||
selectStation(item, index) { // 选择子菜单
|
||||
console.log(item);
|
||||
this.selectStationIndex = index;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.nav-box{
|
||||
width: 100%;
|
||||
height: 95px;
|
||||
background-color: #ACACAC;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
.nav-button-box{
|
||||
display: table;
|
||||
margin-top: 2px;
|
||||
.nav-list-box{
|
||||
width: 90px;
|
||||
height: 28px;
|
||||
text-align: center;
|
||||
line-height: 28px;
|
||||
background-color: #A7A7A7;
|
||||
float: left;
|
||||
font-size: 12px;
|
||||
color: #4C4B6B;
|
||||
margin-left: 5px;
|
||||
margin-bottom: 2px;
|
||||
box-sizing: border-box;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-right: 2px solid #565656;
|
||||
border-bottom: 2px solid #565656;
|
||||
cursor: pointer;
|
||||
&.active,
|
||||
&:hover{
|
||||
background: #EBB570;
|
||||
border-top: 2px solid #795B31;
|
||||
border-left: 2px solid #795B31;
|
||||
border-right: 2px solid #fff;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.station-box1{
|
||||
padding: 0 20px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding-top: 12px;
|
||||
height: 30px;
|
||||
}
|
||||
.station-box{
|
||||
position: relative;
|
||||
flex: 1;
|
||||
.station-list-box{
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-7px);
|
||||
}
|
||||
.station-name{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
transform: translateY(-14px);
|
||||
font-size: 12px;
|
||||
color: #4C4B6B;
|
||||
}
|
||||
.station-line{
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background: #A1D9DC;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user