场景编辑代码调整
This commit is contained in:
parent
f3f1bd8b5d
commit
2c3c46c5bc
@ -126,7 +126,6 @@ export function parser(data, skinCode, showConfig) {
|
|||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
zrUtil.each(data.trainList || [], elem => {
|
zrUtil.each(data.trainList || [], elem => {
|
||||||
console.log(elem, '11111111111111');
|
|
||||||
mapDevice[elem.code] = createDevice(deviceType.Train, elem, propConvert, showConfig);
|
mapDevice[elem.code] = createDevice(deviceType.Train, elem, propConvert, showConfig);
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ export default {
|
|||||||
{type: '供电系统故障', scene: '接触轨(网)断电'},
|
{type: '供电系统故障', scene: '接触轨(网)断电'},
|
||||||
{type: '供电系统故障', scene: '车站照明熄灭影响乘降'},
|
{type: '供电系统故障', scene: '车站照明熄灭影响乘降'},
|
||||||
{type: '车站机电设备故障', scene: '站台门故障'},
|
{type: '车站机电设备故障', scene: '站台门故障'},
|
||||||
|
{type: '限速', scene: '列车限速'},
|
||||||
{type: '轨道故障', scene: '线路故障影响列车运行'}
|
{type: '轨道故障', scene: '线路故障影响列车运行'}
|
||||||
],
|
],
|
||||||
deputySceneData: [
|
deputySceneData: [
|
||||||
@ -82,7 +83,10 @@ export default {
|
|||||||
this.mainSceneData[4].id = each.id;
|
this.mainSceneData[4].id = each.id;
|
||||||
} else if (each.name == '场景9') {
|
} else if (each.name == '场景9') {
|
||||||
this.mainSceneData[6].id = each.id;
|
this.mainSceneData[6].id = each.id;
|
||||||
|
} else if (each.name == '场景10') {
|
||||||
|
this.mainSceneData[7].id = each.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -69,12 +69,6 @@ export const operateEnum = {
|
|||||||
Stand:{
|
Stand:{
|
||||||
code:'standCode',
|
code:'standCode',
|
||||||
type:'站台',
|
type:'站台',
|
||||||
Stand_Set_Hold_Train:{
|
|
||||||
code:'standCode',
|
|
||||||
isDevice:false,
|
|
||||||
isList:false,
|
|
||||||
name:'站台'
|
|
||||||
},
|
|
||||||
Stand_Set_Park_Time:{
|
Stand_Set_Park_Time:{
|
||||||
isList:true,
|
isList:true,
|
||||||
params:[
|
params:[
|
||||||
@ -152,8 +146,30 @@ export const operateEnum = {
|
|||||||
code:'groupNumber',
|
code:'groupNumber',
|
||||||
type:'列车',
|
type:'列车',
|
||||||
Train_Set_Plan:{
|
Train_Set_Plan:{
|
||||||
code:'serviceNumber',
|
isList:true,
|
||||||
name:'服务号'
|
params:[
|
||||||
|
{
|
||||||
|
code:'serviceNumber',
|
||||||
|
name:'服务号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code:'tripNumber',
|
||||||
|
name:'车次号'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
Train_Set_Head:{
|
||||||
|
isList:true,
|
||||||
|
params:[
|
||||||
|
{
|
||||||
|
code:'serviceNumber',
|
||||||
|
name:'服务号'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
code:'destinationCode',
|
||||||
|
name:'目的地号'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -204,7 +220,6 @@ export function covertOperate(operationType, operationParamMap) {
|
|||||||
device = 'TrainWindow';
|
device = 'TrainWindow';
|
||||||
}
|
}
|
||||||
const operateName = Object.values(CMD[device]).find(res=>{ return res.value == operationType; });
|
const operateName = Object.values(CMD[device]).find(res=>{ return res.value == operationType; });
|
||||||
debugger;
|
|
||||||
const deviceInfo = covertOperation(device, operationParamMap, operationType);
|
const deviceInfo = covertOperation(device, operationParamMap, operationType);
|
||||||
let tip = '请';
|
let tip = '请';
|
||||||
if (deviceInfo.deviceName) {
|
if (deviceInfo.deviceName) {
|
||||||
@ -222,9 +237,6 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
|||||||
let deviceName = '';
|
let deviceName = '';
|
||||||
let paramName = '';
|
let paramName = '';
|
||||||
if (operateEnum[deviceType].code) {
|
if (operateEnum[deviceType].code) {
|
||||||
if (deviceType == 'TrainWindow') {
|
|
||||||
|
|
||||||
}
|
|
||||||
const device = store.getters['map/getDeviceByCode'](operationParamMap[operateEnum[deviceType].code]);
|
const device = store.getters['map/getDeviceByCode'](operationParamMap[operateEnum[deviceType].code]);
|
||||||
if (device._type == 'StationStand') {
|
if (device._type == 'StationStand') {
|
||||||
const station = store.getters['map/getDeviceByCode'](device.stationCode);
|
const station = store.getters['map/getDeviceByCode'](device.stationCode);
|
||||||
@ -236,7 +248,13 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
|||||||
deviceName += '【' + operateEnum[deviceType].type + ' ' + parentSection.name + '-' + device.name + '】';
|
deviceName += '【' + operateEnum[deviceType].type + ' ' + parentSection.name + '-' + device.name + '】';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
deviceName += '【' + operateEnum[deviceType].type + ' ' + device.name + '】';
|
let deviceNameIn = '';
|
||||||
|
if (device.name) {
|
||||||
|
deviceNameIn = device.name;
|
||||||
|
} else {
|
||||||
|
deviceNameIn = device.groupNumber;
|
||||||
|
}
|
||||||
|
deviceName += '【' + operateEnum[deviceType].type + ' ' + deviceNameIn + '】';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const paramInfo = operateEnum[deviceType][operationType];
|
const paramInfo = operateEnum[deviceType][operationType];
|
||||||
@ -264,27 +282,32 @@ function covertOperation(deviceType, operationParamMap, operationType) {
|
|||||||
params.forEach((param, index)=>{
|
params.forEach((param, index)=>{
|
||||||
paramName += ' ' + param.name;
|
paramName += ' ' + param.name;
|
||||||
const data = operationParamMap[param.code];
|
const data = operationParamMap[param.code];
|
||||||
param.result.forEach(result=>{
|
if (param.result) {
|
||||||
switch (result.judge) {
|
param.result.forEach(result=>{
|
||||||
case '=': {
|
switch (result.judge) {
|
||||||
if (data == result.data) {
|
case '=': {
|
||||||
paramName += '为' + result.name;
|
if (data == result.data) {
|
||||||
if (result.showUnit) {
|
paramName += '为' + result.name;
|
||||||
paramName += ',值为' + data + result.showUnit;
|
if (result.showUnit) {
|
||||||
|
paramName += ',值为' + data + result.showUnit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
} case '>': {
|
||||||
} case '>': {
|
if (data > result.data) {
|
||||||
if (data > result.data) {
|
paramName += '为' + result.name;
|
||||||
paramName += '为' + result.name;
|
if (result.showUnit) {
|
||||||
if (result.showUnit) {
|
paramName += ',值为' + data + result.showUnit;
|
||||||
paramName += ',值为' + data + result.showUnit;
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
}
|
||||||
}
|
});
|
||||||
}
|
} else {
|
||||||
});
|
paramName += ',值为' + data;
|
||||||
|
}
|
||||||
|
|
||||||
if (index != params.length - 1) {
|
if (index != params.length - 1) {
|
||||||
paramName += ',';
|
paramName += ',';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user