desc: 新增屏蔽门绘制以及紧急停车按钮生成流程
This commit is contained in:
parent
c0c580ec1d
commit
dc381e2a63
@ -194,6 +194,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
safetyDoor: { // 屏蔽门
|
||||
height: 3, // 站台屏蔽门高度
|
||||
width: 60,
|
||||
distance: 8, // 站台和屏蔽门之间的距离
|
||||
defaultColor: '#00FF00', // 屏蔽门默认颜色
|
||||
splitDoorColor: '#F61107' // 屏蔽门切除颜色
|
||||
|
@ -6,119 +6,110 @@ const deviceRender = {};
|
||||
deviceRender[deviceType.Section] = {
|
||||
_type: deviceType.Section,
|
||||
zlevel: 1
|
||||
// progressive: 2
|
||||
};
|
||||
|
||||
/** Signal渲染配置*/
|
||||
deviceRender[deviceType.Signal] = {
|
||||
_type: deviceType.Signal,
|
||||
zlevel: 1
|
||||
// progressive: 3
|
||||
};
|
||||
|
||||
/** Switch渲染配置*/
|
||||
deviceRender[deviceType.Switch] = {
|
||||
_type: deviceType.Switch,
|
||||
zlevel: 1
|
||||
// progressive: 5
|
||||
};
|
||||
|
||||
/** Station渲染配置*/
|
||||
deviceRender[deviceType.Station] = {
|
||||
_type: deviceType.Station,
|
||||
zlevel: 1
|
||||
// progressive: 4
|
||||
};
|
||||
|
||||
/** StationStand渲染配置*/
|
||||
deviceRender[deviceType.StationStand] = {
|
||||
_type: deviceType.StationStand,
|
||||
zlevel: 1
|
||||
// progressive: 5
|
||||
};
|
||||
|
||||
/** Psd渲染配置*/
|
||||
deviceRender[deviceType.Psd] = {
|
||||
_type: deviceType.Psd,
|
||||
zlevel: 1
|
||||
};
|
||||
|
||||
/** StationControl渲染配置*/
|
||||
deviceRender[deviceType.StationControl] = {
|
||||
_type: deviceType.StationControl,
|
||||
zlevel: 1
|
||||
// progressive: 4
|
||||
};
|
||||
|
||||
/** ImageControl渲染配置*/
|
||||
deviceRender[deviceType.ImageControl] = {
|
||||
_type: deviceType.ImageControl,
|
||||
zlevel: 1
|
||||
// progressive: 5
|
||||
};
|
||||
|
||||
/** ZcControl渲染配置*/
|
||||
deviceRender[deviceType.ZcControl] = {
|
||||
_type: deviceType.ZcControl,
|
||||
zlevel: 1
|
||||
// progressive: 6
|
||||
};
|
||||
|
||||
/** LcControl渲染配置*/
|
||||
deviceRender[deviceType.LcControl] = {
|
||||
_type: deviceType.LcControl,
|
||||
zlevel: 1
|
||||
// progressive: 6
|
||||
};
|
||||
|
||||
/** LimitControl渲染配置*/
|
||||
deviceRender[deviceType.LimitControl] = {
|
||||
_type: deviceType.LimitControl,
|
||||
zlevel: 1
|
||||
// progressive: 5
|
||||
};
|
||||
|
||||
/** StationDelayUnlock渲染配置*/
|
||||
deviceRender[deviceType.StationDelayUnlock] = {
|
||||
_type: deviceType.StationDelayUnlock,
|
||||
zlevel: 1
|
||||
// progressive: 6
|
||||
};
|
||||
|
||||
/** Train渲染配置*/
|
||||
deviceRender[deviceType.Train] = {
|
||||
_type: deviceType.Train,
|
||||
zlevel: 1
|
||||
// progressive: 9
|
||||
};
|
||||
|
||||
/** TrainWindow渲染配置*/
|
||||
deviceRender[deviceType.TrainWindow] = {
|
||||
_type: deviceType.TrainWindow,
|
||||
zlevel: 1
|
||||
// progressive: 8
|
||||
};
|
||||
|
||||
/** Line渲染配置*/
|
||||
deviceRender[deviceType.Line] = {
|
||||
_type: deviceType.Line,
|
||||
zlevel: 1
|
||||
// progressive: 7
|
||||
};
|
||||
|
||||
/** Text渲染配置*/
|
||||
deviceRender[deviceType.Text] = {
|
||||
_type: deviceType.Text,
|
||||
zlevel: 1
|
||||
// progressive: 7
|
||||
};
|
||||
|
||||
/** TrainWindow渲染配置*/
|
||||
deviceRender[deviceType.TrainWindow] = {
|
||||
_type: deviceType.TrainWindow,
|
||||
zlevel: 1
|
||||
// progressive: 4
|
||||
};
|
||||
|
||||
/** Train渲染配置*/
|
||||
deviceRender[deviceType.TRain] = {
|
||||
_type: deviceType.TRain,
|
||||
zlevel: 1
|
||||
// progressive: 4
|
||||
};
|
||||
|
||||
/** CheckBox渲染配置*/
|
||||
deviceRender[deviceType.CheckBox] = {
|
||||
_type: deviceType.CheckBox,
|
||||
|
@ -4,331 +4,338 @@ const deviceState = {};
|
||||
|
||||
deviceState[deviceType.Section] = {
|
||||
/** 区段状态*/
|
||||
status: {
|
||||
Default: '01', /** 空闲(缺省值)*/
|
||||
State00: '00', /** 未定义状态 */
|
||||
State01: '01', /** 空闲 */
|
||||
State02: '02', /** 通信车占用 */
|
||||
State03: '03', /** 非通信车占用 */
|
||||
State04: '04', /** 进路锁闭 */
|
||||
State05: '05', /** 故障锁闭 */
|
||||
State06: '06', /** 封锁 */
|
||||
State07: '07', /** ATC切除 */
|
||||
State08: '08', /** ATS切除 */
|
||||
State09: '09', /** 进路延续保护 */
|
||||
State10: '10', /** 延时释放 */
|
||||
State11: '11', /** 保护区段锁闭 */
|
||||
State12: '12', /** 保护区段延时解锁 */
|
||||
State13: '13', /** ARB出清检测错误状态 */
|
||||
State14: '14' /** 计轴失效 */
|
||||
},
|
||||
/** 限速*/
|
||||
speedUpperLimit: {
|
||||
Default: -1 /** 不限速*/
|
||||
},
|
||||
/** 是否切除*/
|
||||
cutOff: {
|
||||
Default: false /** 是否切除*/
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
status: {
|
||||
Default: '01', /** 空闲(缺省值)*/
|
||||
State00: '00', /** 未定义状态 */
|
||||
State01: '01', /** 空闲 */
|
||||
State02: '02', /** 通信车占用 */
|
||||
State03: '03', /** 非通信车占用 */
|
||||
State04: '04', /** 进路锁闭 */
|
||||
State05: '05', /** 故障锁闭 */
|
||||
State06: '06', /** 封锁 */
|
||||
State07: '07', /** ATC切除 */
|
||||
State08: '08', /** ATS切除 */
|
||||
State09: '09', /** 进路延续保护 */
|
||||
State10: '10', /** 延时释放 */
|
||||
State11: '11', /** 保护区段锁闭 */
|
||||
State12: '12', /** 保护区段延时解锁 */
|
||||
State13: '13', /** ARB出清检测错误状态 */
|
||||
State14: '14' /** 计轴失效 */
|
||||
},
|
||||
/** 限速*/
|
||||
speedUpperLimit: {
|
||||
Default: -1 /** 不限速*/
|
||||
},
|
||||
/** 是否切除*/
|
||||
cutOff: {
|
||||
Default: false /** 是否切除*/
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
};
|
||||
|
||||
deviceState[deviceType.Switch] = {
|
||||
/** 定位状态*/
|
||||
locateType: {
|
||||
Default: '01', /** 道岔位置类型 - 定位(缺省值)*/
|
||||
State01: '01', /** 道岔位置类型 - 定位 */
|
||||
State02: '02', /** 道岔位置类型 - 反位 */
|
||||
State03: '03', /** 道岔位置类型 - 失去表示 */
|
||||
State04: '04' /** 道岔位置类型 - 挤岔 */
|
||||
},
|
||||
/** 道岔状态*/
|
||||
status: {
|
||||
Default: '01', /** 道岔状态类型 - 空闲(缺省值)*/
|
||||
State01: '01', /** 道岔状态类型 - 空闲 */
|
||||
State02: '02', /** 道岔状态类型 - 通信车占用 */
|
||||
State03: '03', /** 道岔状态类型 - 非通信车占用 */
|
||||
State04: '04', /** 道岔状态类型 - 进路锁闭 */
|
||||
State05: '05', /** 道岔状态类型 - 故障锁闭 */
|
||||
State06: '06', /** 道岔状态类型 - 进路延续保护 */
|
||||
State07: '07', /** 道岔状态类型 - 进路延续保护解锁 */
|
||||
State08: '08', /** 道岔状态类型 - ATC切除 */
|
||||
State09: '09', /** 道岔状态类型 - ATS切除 */
|
||||
State10: '10', /** 道岔状态类型 - 人工单锁 */
|
||||
State11: '11', /** 道岔状态类型 - 逻辑锁 */
|
||||
State12: '12', /** 道岔状态类型 - 人工锁+逻辑锁 */
|
||||
State13: '13', /** 道岔状态类型 - 延时释放*/
|
||||
State14: '14' /** 道岔状态类型 - 封锁*/
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
},
|
||||
/** 是否切除*/
|
||||
cutOff: {
|
||||
Default: false /** 是否切除*/
|
||||
}
|
||||
/** 定位状态*/
|
||||
locateType: {
|
||||
Default: '01', /** 道岔位置类型 - 定位(缺省值)*/
|
||||
State01: '01', /** 道岔位置类型 - 定位 */
|
||||
State02: '02', /** 道岔位置类型 - 反位 */
|
||||
State03: '03', /** 道岔位置类型 - 失去表示 */
|
||||
State04: '04' /** 道岔位置类型 - 挤岔 */
|
||||
},
|
||||
/** 道岔状态*/
|
||||
status: {
|
||||
Default: '01', /** 道岔状态类型 - 空闲(缺省值)*/
|
||||
State01: '01', /** 道岔状态类型 - 空闲 */
|
||||
State02: '02', /** 道岔状态类型 - 通信车占用 */
|
||||
State03: '03', /** 道岔状态类型 - 非通信车占用 */
|
||||
State04: '04', /** 道岔状态类型 - 进路锁闭 */
|
||||
State05: '05', /** 道岔状态类型 - 故障锁闭 */
|
||||
State06: '06', /** 道岔状态类型 - 进路延续保护 */
|
||||
State07: '07', /** 道岔状态类型 - 进路延续保护解锁 */
|
||||
State08: '08', /** 道岔状态类型 - ATC切除 */
|
||||
State09: '09', /** 道岔状态类型 - ATS切除 */
|
||||
State10: '10', /** 道岔状态类型 - 人工单锁 */
|
||||
State11: '11', /** 道岔状态类型 - 逻辑锁 */
|
||||
State12: '12', /** 道岔状态类型 - 人工锁+逻辑锁 */
|
||||
State13: '13', /** 道岔状态类型 - 延时释放*/
|
||||
State14: '14' /** 道岔状态类型 - 封锁*/
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
},
|
||||
/** 是否切除*/
|
||||
cutOff: {
|
||||
Default: false /** 是否切除*/
|
||||
}
|
||||
};
|
||||
|
||||
deviceState[deviceType.Signal] = {
|
||||
/** 进路性质类型 */
|
||||
natureType: {
|
||||
Default: '00', /** 无状态(缺省值)*/
|
||||
State01: '01', /** 列车进路 */
|
||||
State02: '02', /** 调车进路 */
|
||||
State03: '03' /** 折返进路 */
|
||||
},
|
||||
/** 信号机状态类型 */
|
||||
status: {
|
||||
Default: '01', /** 关闭(缺省值)*/
|
||||
State01: '01', /** 关闭 */
|
||||
State02: '02', /** 开放正向 */
|
||||
State03: '03', /** 开放侧向 */
|
||||
State04: '04', /** 引导 */
|
||||
State05: '05', /** 封锁 */
|
||||
State06: '06', /** 故障 */
|
||||
State07: '07', /** 功能封锁 */
|
||||
State08: '08' /** 信号保护区段监视 */
|
||||
},
|
||||
/** 信号机状态类型 */
|
||||
lightType: {
|
||||
Default: '01', /** 物理点灯(缺省值)*/
|
||||
State01: '01', /** 物理点灯 */
|
||||
State02: '02' /** 逻辑点灯 */
|
||||
},
|
||||
/** 信号机延时状态类型 */
|
||||
delayType: {
|
||||
Default: '01', /** 未延时解锁(缺省值)*/
|
||||
State01: '01', /** 未延时解锁 */
|
||||
State02: '02', /** 人工闭塞延时解锁 */
|
||||
State03: '03' /** 自动闭塞延时解锁 */
|
||||
},
|
||||
/** 信号机自动信号状态类型 */
|
||||
autoType: {
|
||||
Default: '01', /** 隐藏(缺省值)*/
|
||||
State01: '01', /** 隐藏 */
|
||||
State02: '02', /** 设置自动信号模式状态类型 */
|
||||
State03: '03', /** 设置自动进路模式状态类型 */
|
||||
State04: '04' /** 信号机进路自动触发模式状态类型 */
|
||||
},
|
||||
/** 信号机自动通过信号状态类型 */
|
||||
autoRouteType: {
|
||||
Default: '01', /** 不自动通过(缺省值)*/
|
||||
State01: '01', /** 不自动通过 */
|
||||
State02: '02' /** 自动通过 */
|
||||
},
|
||||
/** 信号机按钮状态类型 */
|
||||
buttonState: {
|
||||
Default: '01', /** 空闲(缺省值)*/
|
||||
State01: '01', /** 空闲 */
|
||||
State02: '02', /** 选择基本进路始端 */
|
||||
State03: '03', /** 选择折返进路始端 */
|
||||
State04: '04', /** 基本进路终端待选 */
|
||||
State05: '05' /** 折返进路终端待选 */
|
||||
},
|
||||
/** 引导信号按钮状态类型 */
|
||||
guideStatus: {
|
||||
Default: '01', /** 空闲(缺省值)*/
|
||||
State01: '01', /** 空闲 */
|
||||
State02: '02' /** 引导 */
|
||||
/** 进路性质类型 */
|
||||
natureType: {
|
||||
Default: '00', /** 无状态(缺省值)*/
|
||||
State01: '01', /** 列车进路 */
|
||||
State02: '02', /** 调车进路 */
|
||||
State03: '03' /** 折返进路 */
|
||||
},
|
||||
/** 信号机状态类型 */
|
||||
status: {
|
||||
Default: '01', /** 关闭(缺省值)*/
|
||||
State01: '01', /** 关闭 */
|
||||
State02: '02', /** 开放正向 */
|
||||
State03: '03', /** 开放侧向 */
|
||||
State04: '04', /** 引导 */
|
||||
State05: '05', /** 封锁 */
|
||||
State06: '06', /** 故障 */
|
||||
State07: '07', /** 功能封锁 */
|
||||
State08: '08' /** 信号保护区段监视 */
|
||||
},
|
||||
/** 信号机状态类型 */
|
||||
lightType: {
|
||||
Default: '01', /** 物理点灯(缺省值)*/
|
||||
State01: '01', /** 物理点灯 */
|
||||
State02: '02' /** 逻辑点灯 */
|
||||
},
|
||||
/** 信号机延时状态类型 */
|
||||
delayType: {
|
||||
Default: '01', /** 未延时解锁(缺省值)*/
|
||||
State01: '01', /** 未延时解锁 */
|
||||
State02: '02', /** 人工闭塞延时解锁 */
|
||||
State03: '03' /** 自动闭塞延时解锁 */
|
||||
},
|
||||
/** 信号机自动信号状态类型 */
|
||||
autoType: {
|
||||
Default: '01', /** 隐藏(缺省值)*/
|
||||
State01: '01', /** 隐藏 */
|
||||
State02: '02', /** 设置自动信号模式状态类型 */
|
||||
State03: '03', /** 设置自动进路模式状态类型 */
|
||||
State04: '04' /** 信号机进路自动触发模式状态类型 */
|
||||
},
|
||||
/** 信号机自动通过信号状态类型 */
|
||||
autoRouteType: {
|
||||
Default: '01', /** 不自动通过(缺省值)*/
|
||||
State01: '01', /** 不自动通过 */
|
||||
State02: '02' /** 自动通过 */
|
||||
},
|
||||
/** 信号机按钮状态类型 */
|
||||
buttonState: {
|
||||
Default: '01', /** 空闲(缺省值)*/
|
||||
State01: '01', /** 空闲 */
|
||||
State02: '02', /** 选择基本进路始端 */
|
||||
State03: '03', /** 选择折返进路始端 */
|
||||
State04: '04', /** 基本进路终端待选 */
|
||||
State05: '05' /** 折返进路终端待选 */
|
||||
},
|
||||
/** 引导信号按钮状态类型 */
|
||||
guideStatus: {
|
||||
Default: '01', /** 空闲(缺省值)*/
|
||||
State01: '01', /** 空闲 */
|
||||
State02: '02' /** 引导 */
|
||||
|
||||
},
|
||||
/** 道岔定位状态*/
|
||||
switchLocateType: {
|
||||
Default: '01', /** 定位(缺省值)*/
|
||||
State01: '01', /** 定位*/
|
||||
State02: '02' /** 反位*/
|
||||
},
|
||||
/** 信号机进路办理*/
|
||||
routeSetting: {
|
||||
Default: false /** 信号机进路办理*/
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
},
|
||||
/** 道岔定位状态*/
|
||||
switchLocateType: {
|
||||
Default: '01', /** 定位(缺省值)*/
|
||||
State01: '01', /** 定位*/
|
||||
State02: '02' /** 反位*/
|
||||
},
|
||||
/** 信号机进路办理*/
|
||||
routeSetting: {
|
||||
Default: false /** 信号机进路办理*/
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
};
|
||||
|
||||
deviceState[deviceType.Station] = {
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
};
|
||||
|
||||
deviceState[deviceType.StationControl] = {
|
||||
/** 控制模式状态 */
|
||||
status: {
|
||||
Default: '01', /** 中控(缺省值)*/
|
||||
State01: '01', /** 中控 */
|
||||
State02: '02', /** 站控 */
|
||||
State03: '03' /** 紧急站控 */
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
/** 控制模式状态 */
|
||||
status: {
|
||||
Default: '01', /** 中控(缺省值)*/
|
||||
State01: '01', /** 中控 */
|
||||
State02: '02', /** 站控 */
|
||||
State03: '03' /** 紧急站控 */
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
};
|
||||
|
||||
deviceState[deviceType.Psd] = {
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
};
|
||||
|
||||
deviceState[deviceType.StationDelayUnlock] = {
|
||||
/** 延迟解锁状态*/
|
||||
status: {
|
||||
Default: '01', /** 关闭(默认值)*/
|
||||
State01: '01', /** 关闭 */
|
||||
State02: '02' /** 显示 */
|
||||
/** 延迟解锁状态*/
|
||||
status: {
|
||||
Default: '01', /** 关闭(默认值)*/
|
||||
State01: '01', /** 关闭 */
|
||||
State02: '02' /** 显示 */
|
||||
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
};
|
||||
|
||||
deviceState[deviceType.StationStand] = {
|
||||
/** 车站状态*/
|
||||
status: {
|
||||
Default: '01', /** 空闲(缺省值)*/
|
||||
State01: '01', /** 空闲 */
|
||||
State02: '02', /** 列车停站 */
|
||||
State05: '03' /** 站台紧急关闭 */
|
||||
},
|
||||
/** 屏蔽门状态*/
|
||||
screenDoorStatus: {
|
||||
Default: '01', /** 关门(缺省值)*/
|
||||
State01: '01', /** 正常 */
|
||||
State02: '02', /** 故障 */
|
||||
State03: '03' /** 切除 */
|
||||
},
|
||||
/** 屏蔽门开门状态*/
|
||||
screenDoorOpenStatus: {
|
||||
Default: '01', /** 关门(缺省值)*/
|
||||
State01: '01', /** 关门 */
|
||||
State02: '02' /** 开门 */
|
||||
},
|
||||
/** 扣车状态*/
|
||||
holdStatus: {
|
||||
Default: '01', /** 未设置扣车(缺省值)*/
|
||||
State01: '01', /** 未设置扣车*/
|
||||
State02: '02', /** 车站扣车*/
|
||||
State03: '03', /** 中心扣车*/
|
||||
State04: '04' /** 中心+车站扣车*/
|
||||
},
|
||||
/** 跳停*/
|
||||
jumpStopStatus: {
|
||||
Default: '01', /** 未设置跳停(缺省值)*/
|
||||
State01: '01', /** 未设置跳停 */
|
||||
State02: '02', /** 指定列车跳停 */
|
||||
State03: '03' /** 全部跳停 */
|
||||
},
|
||||
/** 停站时间*/
|
||||
parkingTime: {
|
||||
Default: -1 /** 无停站时间*/
|
||||
},
|
||||
/** 运行等级*/
|
||||
intervalRunTime: {
|
||||
Default: -1 /** 无运行等级*/
|
||||
},
|
||||
/** 折返策略*/
|
||||
reentryStrategy: {
|
||||
Default: '01', /** 默认(缺省值)*/
|
||||
State01: '01', /** 无折返策略 */
|
||||
State02: '02', /** 无人折返 */
|
||||
State03: '03', /** 自动换端 */
|
||||
State04: '04' /** 默认 */
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
/** 车站状态*/
|
||||
status: {
|
||||
Default: '01', /** 空闲(缺省值)*/
|
||||
State01: '01', /** 空闲 */
|
||||
State02: '02', /** 列车停站 */
|
||||
State05: '03' /** 站台紧急关闭 */
|
||||
},
|
||||
/** 屏蔽门状态*/
|
||||
screenDoorStatus: {
|
||||
Default: '01', /** 关门(缺省值)*/
|
||||
State01: '01', /** 正常 */
|
||||
State02: '02', /** 故障 */
|
||||
State03: '03' /** 切除 */
|
||||
},
|
||||
/** 屏蔽门开门状态*/
|
||||
screenDoorOpenStatus: {
|
||||
Default: '01', /** 关门(缺省值)*/
|
||||
State01: '01', /** 关门 */
|
||||
State02: '02' /** 开门 */
|
||||
},
|
||||
/** 扣车状态*/
|
||||
holdStatus: {
|
||||
Default: '01', /** 未设置扣车(缺省值)*/
|
||||
State01: '01', /** 未设置扣车*/
|
||||
State02: '02', /** 车站扣车*/
|
||||
State03: '03', /** 中心扣车*/
|
||||
State04: '04' /** 中心+车站扣车*/
|
||||
},
|
||||
/** 跳停*/
|
||||
jumpStopStatus: {
|
||||
Default: '01', /** 未设置跳停(缺省值)*/
|
||||
State01: '01', /** 未设置跳停 */
|
||||
State02: '02', /** 指定列车跳停 */
|
||||
State03: '03' /** 全部跳停 */
|
||||
},
|
||||
/** 停站时间*/
|
||||
parkingTime: {
|
||||
Default: -1 /** 无停站时间*/
|
||||
},
|
||||
/** 运行等级*/
|
||||
intervalRunTime: {
|
||||
Default: -1 /** 无运行等级*/
|
||||
},
|
||||
/** 折返策略*/
|
||||
reentryStrategy: {
|
||||
Default: '01', /** 默认(缺省值)*/
|
||||
State01: '01', /** 无折返策略 */
|
||||
State02: '02', /** 无人折返 */
|
||||
State03: '03', /** 自动换端 */
|
||||
State04: '04' /** 默认 */
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
};
|
||||
|
||||
deviceState[deviceType.Train] = {
|
||||
/** 列车类型*/
|
||||
type: {
|
||||
Default: '01', /** 计划车-指运行图编制出的有车组号、表号、车次号的列车(缺省值)*/
|
||||
State01: '01', /** 计划车-指运行图编制出的有车组号、表号、车次号的列车*/
|
||||
State02: '02', /** 头码车-指赋予了车组号和运行目的地的非计划列车*/
|
||||
State03: '03' /** 人工车-指由调度员手工添加的并人工组织运行的只赋予车组号的非计划列车*/
|
||||
},
|
||||
/** 服务号状态类型*/
|
||||
serverNoType: {
|
||||
Default: '01', /** 显示服务号,白色(缺省值)*/
|
||||
State01: '01', /** 显示服务号,白色 */
|
||||
State02: '02', /** 显示车组号(计划车、头码车),黄色 */
|
||||
State03: '03' /** 显示车组号(人工车),粉色 */
|
||||
},
|
||||
/** 目的地状态类型*/
|
||||
destinationStatus: {
|
||||
Default: '01', /** 准点(缺省值)*/
|
||||
State01: '01', /** 准点*/
|
||||
State02: '02', /** 早点*/
|
||||
State03: '03', /** 严重早点*/
|
||||
State04: '04', /** 晚点*/
|
||||
State05: '05', /** 严重晚点*/
|
||||
State06: '06', /** 头码车*/
|
||||
State07: '07' /** ATP切除*/
|
||||
},
|
||||
/** 运行方向状态类型*/
|
||||
directionType: {
|
||||
Default: '01', /** 未知方向(缺省值)*/
|
||||
State01: '01', /** 未知方向 */
|
||||
State02: '02', /** 从左向右 */
|
||||
State03: '03' /** 从右向左 */
|
||||
},
|
||||
/** 运行状态*/
|
||||
runStatus: {
|
||||
Default: '01', /** 停止(缺省值)*/
|
||||
State01: '01', /** 停止 */
|
||||
State02: '02' /** 运行 */
|
||||
},
|
||||
/** 运行模式*/
|
||||
runMode: {
|
||||
Default: '01', /** 未知模式(缺省值)*/
|
||||
State01: '01', /** 未知模式 */
|
||||
State02: '02', /** ATO自动驾驶模式 AM */
|
||||
State03: '03', /** ATP监控下的人工驾驶模式 CM */
|
||||
State04: '04', /** 限制人工驾驶模式 RM */
|
||||
State05: '05' /** 非限制人工驾驶模式 RM */
|
||||
},
|
||||
/** 运行控制状态类型*/
|
||||
runControlStatus: {
|
||||
Default: '01', /** 正常(缺省值)*/
|
||||
State01: '01', /** 正常 */
|
||||
State02: '02', /** 扣车 */
|
||||
State03: '03' /** 跳停 */
|
||||
},
|
||||
/** 车门状态 */
|
||||
doorStatus: {
|
||||
Default: '01', /** 关门(缺省值)*/
|
||||
State01: '01', /** 关门 */
|
||||
State02: '02', /** 开门 */
|
||||
State03: '03' /** 故障 */
|
||||
},
|
||||
/** 通信状态类型*/
|
||||
communicationStatus: {
|
||||
Default: '01', /** 正常(缺省值)*/
|
||||
State01: '01', /** 正常 */
|
||||
State02: '02' /** 故障 */
|
||||
},
|
||||
/** 计划冲突状态*/
|
||||
planConflictStatus: {
|
||||
Default: '01', /** 无冲突(缺省值)*/
|
||||
State01: '01', /** 无冲突 */
|
||||
State02: '02' /** 有冲突 */
|
||||
},
|
||||
/** 报警状态*/
|
||||
alarmStatus: {
|
||||
Default: '01', /** 无报警(缺省值)*/
|
||||
State01: '01', /** 无报警 */
|
||||
State02: '02' /** 有报警 */
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
/** 列车类型*/
|
||||
type: {
|
||||
Default: '01', /** 计划车-指运行图编制出的有车组号、表号、车次号的列车(缺省值)*/
|
||||
State01: '01', /** 计划车-指运行图编制出的有车组号、表号、车次号的列车*/
|
||||
State02: '02', /** 头码车-指赋予了车组号和运行目的地的非计划列车*/
|
||||
State03: '03' /** 人工车-指由调度员手工添加的并人工组织运行的只赋予车组号的非计划列车*/
|
||||
},
|
||||
/** 服务号状态类型*/
|
||||
serverNoType: {
|
||||
Default: '01', /** 显示服务号,白色(缺省值)*/
|
||||
State01: '01', /** 显示服务号,白色 */
|
||||
State02: '02', /** 显示车组号(计划车、头码车),黄色 */
|
||||
State03: '03' /** 显示车组号(人工车),粉色 */
|
||||
},
|
||||
/** 目的地状态类型*/
|
||||
destinationStatus: {
|
||||
Default: '01', /** 准点(缺省值)*/
|
||||
State01: '01', /** 准点*/
|
||||
State02: '02', /** 早点*/
|
||||
State03: '03', /** 严重早点*/
|
||||
State04: '04', /** 晚点*/
|
||||
State05: '05', /** 严重晚点*/
|
||||
State06: '06', /** 头码车*/
|
||||
State07: '07' /** ATP切除*/
|
||||
},
|
||||
/** 运行方向状态类型*/
|
||||
directionType: {
|
||||
Default: '01', /** 未知方向(缺省值)*/
|
||||
State01: '01', /** 未知方向 */
|
||||
State02: '02', /** 从左向右 */
|
||||
State03: '03' /** 从右向左 */
|
||||
},
|
||||
/** 运行状态*/
|
||||
runStatus: {
|
||||
Default: '01', /** 停止(缺省值)*/
|
||||
State01: '01', /** 停止 */
|
||||
State02: '02' /** 运行 */
|
||||
},
|
||||
/** 运行模式*/
|
||||
runMode: {
|
||||
Default: '01', /** 未知模式(缺省值)*/
|
||||
State01: '01', /** 未知模式 */
|
||||
State02: '02', /** ATO自动驾驶模式 AM */
|
||||
State03: '03', /** ATP监控下的人工驾驶模式 CM */
|
||||
State04: '04', /** 限制人工驾驶模式 RM */
|
||||
State05: '05' /** 非限制人工驾驶模式 RM */
|
||||
},
|
||||
/** 运行控制状态类型*/
|
||||
runControlStatus: {
|
||||
Default: '01', /** 正常(缺省值)*/
|
||||
State01: '01', /** 正常 */
|
||||
State02: '02', /** 扣车 */
|
||||
State03: '03' /** 跳停 */
|
||||
},
|
||||
/** 车门状态 */
|
||||
doorStatus: {
|
||||
Default: '01', /** 关门(缺省值)*/
|
||||
State01: '01', /** 关门 */
|
||||
State02: '02', /** 开门 */
|
||||
State03: '03' /** 故障 */
|
||||
},
|
||||
/** 通信状态类型*/
|
||||
communicationStatus: {
|
||||
Default: '01', /** 正常(缺省值)*/
|
||||
State01: '01', /** 正常 */
|
||||
State02: '02' /** 故障 */
|
||||
},
|
||||
/** 计划冲突状态*/
|
||||
planConflictStatus: {
|
||||
Default: '01', /** 无冲突(缺省值)*/
|
||||
State01: '01', /** 无冲突 */
|
||||
State02: '02' /** 有冲突 */
|
||||
},
|
||||
/** 报警状态*/
|
||||
alarmStatus: {
|
||||
Default: '01', /** 无报警(缺省值)*/
|
||||
State01: '01', /** 无报警 */
|
||||
State02: '02' /** 有报警 */
|
||||
},
|
||||
/** 是否故障*/
|
||||
fault: {
|
||||
Default: false /** 非故障*/
|
||||
}
|
||||
};
|
||||
|
||||
export default deviceState;
|
||||
|
@ -8,6 +8,8 @@ const deviceType = {
|
||||
ImageControl: 'ImageControl',
|
||||
Station: 'Station',
|
||||
StationStand: 'StationStand',
|
||||
Esp: 'Esp',
|
||||
Psd: 'Psd',
|
||||
StationControl: 'StationControl',
|
||||
StationCounter: 'StationCounter',
|
||||
StationDelayUnlock: 'StationDelayUnlock',
|
||||
|
@ -2,53 +2,53 @@ import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
|
||||
export default class Line2 extends Group {
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 0;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
if (model && model.points.length > 1) {
|
||||
for (let i = 0; i < (model.points.length - 1); i++) {
|
||||
this.add(new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.isLogic ? this.z : this.z + 1,
|
||||
shape: {
|
||||
x1: model.points[i].x,
|
||||
y1: model.points[i].y,
|
||||
x2: model.points[i + 1].x,
|
||||
y2: model.points[i + 1].y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: style.Line.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
if (model && model.points.length > 1) {
|
||||
for (let i = 0; i < (model.points.length - 1); i++) {
|
||||
this.add(new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.isLogic ? this.z : this.z + 1,
|
||||
shape: {
|
||||
x1: model.points[i].x,
|
||||
y1: model.points[i].y,
|
||||
x2: model.points[i + 1].x,
|
||||
y2: model.points[i + 1].y
|
||||
},
|
||||
style: {
|
||||
lineWidth: model.width,
|
||||
stroke: style.Line.lineColor
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setLineType(type) {
|
||||
switch (type) {
|
||||
case '01': break;
|
||||
case '02':
|
||||
this.eachChild((child) => {
|
||||
child.setStyle('lineDash', [4]);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
setLineType(type) {
|
||||
switch (type) {
|
||||
case '01': break;
|
||||
case '02':
|
||||
this.eachChild((child) => {
|
||||
child.setStyle('lineDash', [4]);
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
this.setLineType(model.type);
|
||||
}
|
||||
setState(model) {
|
||||
this.setLineType(model.type);
|
||||
}
|
||||
}
|
||||
|
80
src/jmapNew/shape/Psd/ESafeDoor.js
Normal file
80
src/jmapNew/shape/Psd/ESafeDoor.js
Normal file
@ -0,0 +1,80 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
class ESafeDoor extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const padding = 0.1;
|
||||
|
||||
this.safeL = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.x - model.width / 2 - padding,
|
||||
y: model.y,
|
||||
width: model.width / 4 + padding,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||
fill: style.StationStand.safetyDoor.defaultColor
|
||||
}
|
||||
});
|
||||
|
||||
this.safeC = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.x - model.width / 4 - padding,
|
||||
y: model.y,
|
||||
width: model.width / 2 + padding * 2,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||
fill: style.StationStand.safetyDoor.defaultColor
|
||||
}
|
||||
});
|
||||
|
||||
this.safeR = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.x + model.width / 4,
|
||||
y: model.y,
|
||||
width: model.width / 4 + padding,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||
fill: style.StationStand.safetyDoor.defaultColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.safeL);
|
||||
this.add(this.safeC);
|
||||
this.add(this.safeR);
|
||||
}
|
||||
|
||||
hasDoor(show) {
|
||||
show ? this.safeC.hide() : this.safeC.show();
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.safeL.setStyle('fill', color);
|
||||
this.safeC.setStyle('fill', color);
|
||||
this.safeR.setStyle('fill', color);
|
||||
}
|
||||
}
|
||||
|
||||
export default ESafeDoor;
|
37
src/jmapNew/shape/Psd/index.js
Normal file
37
src/jmapNew/shape/Psd/index.js
Normal file
@ -0,0 +1,37 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import ESafeDoor from './ESafeDoor';
|
||||
|
||||
export default class Line2 extends Group {
|
||||
constructor(model, style) {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 1;
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
this.create();
|
||||
this.setState(model);
|
||||
}
|
||||
|
||||
create() {
|
||||
/** 屏蔽门*/
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
this.safeDoor = new ESafeDoor({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
width: model.width || style.StationStand.safetyDoor.width,
|
||||
height: model.height || style.StationStand.safetyDoor.height,
|
||||
show: model.hasDoor
|
||||
});
|
||||
this.add(this.safeDoor);
|
||||
}
|
||||
|
||||
setState(model) {
|
||||
|
||||
}
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
class ESafeDoor extends Group {
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = model;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const padding = 0.1;
|
||||
|
||||
this.safeL = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.x - model.width / 2 - padding,
|
||||
y: model.y,
|
||||
width: model.width / 4 + padding,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||
fill: style.StationStand.safetyDoor.defaultColor
|
||||
}
|
||||
});
|
||||
|
||||
this.safeC = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.x - model.width / 4 - padding,
|
||||
y: model.y,
|
||||
width: model.width / 2 + padding * 2,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||
fill: style.StationStand.safetyDoor.defaultColor
|
||||
}
|
||||
});
|
||||
|
||||
this.safeR = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x: model.x + model.width / 4,
|
||||
y: model.y,
|
||||
width: model.width / 4 + padding,
|
||||
height: model.height
|
||||
},
|
||||
style: {
|
||||
lineWidth: 0,
|
||||
stroke: style.StationStand.safetyDoor.defaultColor,
|
||||
fill: style.StationStand.safetyDoor.defaultColor
|
||||
}
|
||||
});
|
||||
|
||||
this.add(this.safeL);
|
||||
this.add(this.safeC);
|
||||
this.add(this.safeR);
|
||||
}
|
||||
|
||||
hasDoor(show) {
|
||||
show ? this.safeC.hide() : this.safeC.show();
|
||||
}
|
||||
|
||||
setColor(color) {
|
||||
this.safeL.setStyle('fill', color);
|
||||
this.safeC.setStyle('fill', color);
|
||||
this.safeR.setStyle('fill', color);
|
||||
}
|
||||
}
|
||||
|
||||
export default ESafeDoor;
|
@ -4,7 +4,6 @@ import ETime from './ETime';
|
||||
import ELevel from './ELevel';
|
||||
import EReentry from './EReentry';
|
||||
import EDetain from './EDetain';
|
||||
import ESafeDoor from './ESafeDoor';
|
||||
import ESafeStand from './ESafeStand';
|
||||
import ESafeEmergent from './ESafeEmergent';
|
||||
import EMouse from './EMouse';
|
||||
@ -30,7 +29,8 @@ class StationStand extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
const drict = model.doorLocationType == '01' ? 1 : -1;
|
||||
// const drict = model.doorLocationType == '01' ? 1 : -1;
|
||||
const drict = 1;
|
||||
|
||||
/** 列车站台*/
|
||||
const standH = drict > 0 ? style.StationStand.safetyDoor.height : model.height;
|
||||
@ -48,17 +48,17 @@ class StationStand extends Group {
|
||||
this.add(this.safeStand);
|
||||
|
||||
if (model.direction != '03') {
|
||||
/** 屏蔽门*/
|
||||
this.safeDoor = new ESafeDoor({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
style: style,
|
||||
x: model.position.x,
|
||||
y: model.position.y,
|
||||
width: model.width,
|
||||
height: style.StationStand.safetyDoor.height,
|
||||
show: model.hasDoor
|
||||
});
|
||||
// /** 屏蔽门*/
|
||||
// this.safeDoor = new ESafeDoor({
|
||||
// zlevel: this.zlevel,
|
||||
// z: this.z,
|
||||
// style: style,
|
||||
// x: model.position.x,
|
||||
// y: model.position.y,
|
||||
// width: model.width,
|
||||
// height: style.StationStand.safetyDoor.height,
|
||||
// show: model.hasDoor
|
||||
// });
|
||||
|
||||
/** 站台紧急关闭*/
|
||||
const emergentH = drict > 0 ? style.StationStand.standEmergent.mergentR + style.StationStand.safetyDoor.height : style.StationStand.standEmergent.mergentR;
|
||||
|
@ -10,6 +10,7 @@ import ZcControl from './ZcControl/index.js';
|
||||
import StationCounter from './StationCounter/index.js';
|
||||
import StationDelayUnlock from './StationDelayUnlock/index.js';
|
||||
import StationStand from './StationStand/index.js';
|
||||
import Psd from './Psd/index.js';
|
||||
import TrainWindow from './TrainWindow/index.js';
|
||||
import Train from './Train/index.js';
|
||||
import Line from './Line/index.js';
|
||||
@ -29,6 +30,7 @@ mapShape[deviceType.ZcControl] = ZcControl;
|
||||
mapShape[deviceType.StationCounter] = StationCounter;
|
||||
mapShape[deviceType.StationDelayUnlock] = StationDelayUnlock;
|
||||
mapShape[deviceType.StationStand] = StationStand;
|
||||
mapShape[deviceType.Psd] = Psd;
|
||||
mapShape[deviceType.TrainWindow] = TrainWindow;
|
||||
mapShape[deviceType.Train] = Train;
|
||||
mapShape[deviceType.Line] = Line;
|
||||
|
@ -75,6 +75,14 @@ export function parser(data, skinCode) {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Line, elem, propConvert);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.espList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Esp, elem, propConvert);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.psdList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Psd, elem, propConvert);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.textList || [], elem => {
|
||||
mapDevice[elem.code] = createDevice(deviceType.Text, elem, propConvert);
|
||||
}, this);
|
||||
@ -195,6 +203,8 @@ export function updateMapData(state, model) {
|
||||
case deviceType.TrainWindow: updateForList(model, state, 'trainWindowList'); break;
|
||||
case deviceType.Line: updateForList(model, state, 'lineList'); break;
|
||||
case deviceType.Text: updateForList(model, state, 'textList'); break;
|
||||
case deviceType.Psd: updateForList(model, state, 'psdList'); break;
|
||||
case deviceType.Esp: updateForList(model, state, 'espList'); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -579,6 +579,18 @@ const map = {
|
||||
}
|
||||
});
|
||||
},
|
||||
delMapStandData: (state, { models, type }) => {
|
||||
models.forEach(item => {
|
||||
if (state.mapDevice[item.code]) {
|
||||
delete state.mapDevice[item.code];
|
||||
state.map[type].forEach((elem, index) => {
|
||||
if (item.code == elem.code) {
|
||||
state.map[type].splice(index, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
setDeleteCount: (state) => {
|
||||
state.deleteCount++;
|
||||
}
|
||||
@ -691,6 +703,9 @@ const map = {
|
||||
commit('updateMapStandData', { models, type });
|
||||
},
|
||||
|
||||
delMapStandData: ({ commit }, { models, type }) => {
|
||||
commit('delMapStandData', { models, type });
|
||||
},
|
||||
setDeleteCount: ({ commit }) => {
|
||||
commit('setDeleteCount');
|
||||
}
|
||||
|
@ -3,11 +3,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
@ -1,154 +0,0 @@
|
||||
<template>
|
||||
<div style="height: 100%;">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<template v-if="!display">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="form" :model="editModel" label-width="120px" size="mini">
|
||||
<el-form-item label="code" prop="code">
|
||||
<el-select v-model="editModel.code" clearable :filterable="true" @change="deviceChange">
|
||||
<el-option
|
||||
v-for="item in espList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="editModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属站台" prop="stationStandCode">
|
||||
<el-select v-model="editModel.stationStandCode" disabled>
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
<template v-if="display">
|
||||
<div style="text-align: center;padding-top: 20px;">暂无数据</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="create">批量创建</el-button>
|
||||
<el-button type="danger" size="small" @click="editObject">修改</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { getUID } from '@/jmap/utils/Uid';
|
||||
|
||||
export default {
|
||||
name: 'SafetyDoorOperate',
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
display: true,
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
stationCode: '',
|
||||
stationStandCode: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'espList',
|
||||
'stationStandList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.map': function(val) {
|
||||
if (val) {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.display = true;
|
||||
const mapObject = this.map;
|
||||
if (mapObject) {
|
||||
if (mapObject.espList && mapObject.espList.length) {
|
||||
this.display = false;
|
||||
} else {
|
||||
mapObject.espList = [];
|
||||
}
|
||||
}
|
||||
},
|
||||
deviceChange(code) {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'ESP'.toUpperCase()) {
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
}
|
||||
},
|
||||
editObject() {
|
||||
console.log(this.editModel, 111);
|
||||
},
|
||||
hasPSD(data) {
|
||||
let falg = false;
|
||||
this.map.espList.forEach(item => {
|
||||
if (item.stationStandCode == data.code) {
|
||||
falg = true;
|
||||
}
|
||||
});
|
||||
return falg;
|
||||
},
|
||||
create() {
|
||||
const arr = [];
|
||||
this.map.stationStandList.forEach(item => {
|
||||
if (item.visible && item.hasDoor && !this.hasPSD(item)) {
|
||||
arr.push({
|
||||
_type: 'ESP',
|
||||
code: getUID('ESP'),
|
||||
name: getUID('ESP'),
|
||||
stationCode: item.stationCode,
|
||||
stationStandCode: item.code
|
||||
});
|
||||
}
|
||||
});
|
||||
if (arr.length) {
|
||||
this.display = false;
|
||||
this.$message('创建完成');
|
||||
this.$store.dispatch('map/updateMapStandData', {models: arr, type: 'espList'});
|
||||
this.deviceSelect();
|
||||
} else {
|
||||
this.$message('暂无车站');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -53,20 +53,6 @@
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="站台屏蔽门" class="tab_pane_box" name="safetyDoor">
|
||||
<psd-operate
|
||||
ref="psdOperate"
|
||||
:map-info="mapInfo"
|
||||
:selected="selected"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="站台紧急停车按钮" class="tab_pane_box" name="park">
|
||||
<esp-operate
|
||||
ref="espOperate"
|
||||
:map-info="mapInfo"
|
||||
:selected="selected"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
@ -78,8 +64,6 @@ import RouteOperate from './routeoperate/index';
|
||||
import RoutingOperate from './routingoperate/index';
|
||||
import AutomaticOperate from './automaticoperate/index';
|
||||
import PathOperate from './pathoperate/index';
|
||||
import PsdOperate from './psdOperate/index';
|
||||
import EspOperate from './espOperate/index';
|
||||
import SignalOperate from './signaloperate/index';
|
||||
|
||||
export default {
|
||||
@ -89,8 +73,6 @@ export default {
|
||||
RoutingOperate,
|
||||
AutomaticOperate,
|
||||
PathOperate,
|
||||
PsdOperate,
|
||||
EspOperate,
|
||||
SignalOperate
|
||||
},
|
||||
props: {
|
||||
|
@ -1,154 +0,0 @@
|
||||
<template>
|
||||
<div style="height: 100%;">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<template v-if="!display">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="ruleForm" :model="editModel" label-width="120px" size="mini">
|
||||
<el-form-item label="code" prop="code">
|
||||
<el-select v-model="editModel.code" clearable :filterable="true" @change="deviceChange">
|
||||
<el-option
|
||||
v-for="item in psdList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="editModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属站台" prop="stationStandCode">
|
||||
<el-select v-model="editModel.stationStandCode" disabled>
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
<template v-if="display">
|
||||
<div style="text-align: center;padding-top: 20px;">暂无数据</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="create">批量创建</el-button>
|
||||
<el-button type="danger" size="small" @click="editObject">修改</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { getUID } from '@/jmap/utils/Uid';
|
||||
|
||||
export default {
|
||||
name: 'SafetyDoorOperate',
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
display: true,
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
stationCode: '',
|
||||
stationStandCode: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map',
|
||||
'psdList',
|
||||
'stationStandList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.map': function(val) {
|
||||
if (val) {
|
||||
this.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.display = true;
|
||||
const mapObject = this.map;
|
||||
if (mapObject) {
|
||||
if (mapObject.psdList && mapObject.psdList.length) {
|
||||
this.display = false;
|
||||
} else {
|
||||
mapObject.psdList = [];
|
||||
}
|
||||
}
|
||||
},
|
||||
deviceChange(code) {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
this.$refs.ruleForm && this.$refs.ruleForm.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'PSD'.toUpperCase()) { // ESP
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
}
|
||||
},
|
||||
editObject() {
|
||||
console.log(this.editModel, 111);
|
||||
},
|
||||
hasPSD(data) {
|
||||
let falg = false;
|
||||
this.map.psdList.forEach(item => {
|
||||
if (item.stationStandCode == data.code) {
|
||||
falg = true;
|
||||
}
|
||||
});
|
||||
return falg;
|
||||
},
|
||||
create() {
|
||||
const arr = [];
|
||||
this.map.stationStandList.forEach(item => {
|
||||
if (item.visible && item.hasDoor && !this.hasPSD(item)) {
|
||||
arr.push({
|
||||
_type: 'PSD',
|
||||
code: getUID('PSD'),
|
||||
name: getUID('PSD'),
|
||||
stationCode: item.stationCode,
|
||||
stationStandCode: item.code
|
||||
});
|
||||
}
|
||||
});
|
||||
if (arr.length) {
|
||||
this.display = false;
|
||||
this.$message('创建完成');
|
||||
this.$store.dispatch('map/updateMapStandData', {models: arr, type: 'psdList'});
|
||||
this.deviceSelect();
|
||||
} else {
|
||||
this.$message('暂无车站');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
217
src/views/newMap/newMapdraft/mapoperate/espDraft.vue
Normal file
217
src/views/newMap/newMapdraft/mapoperate/espDraft.vue
Normal file
@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<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>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-button type="primary" style="margin: 0 auto;display: block;" @click="create">批量创建</el-button>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import ConfigList from './config/list';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'EspDraft',
|
||||
components: {
|
||||
ConfigList
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
standCode: '' // 关联站台唯一code
|
||||
},
|
||||
field: '',
|
||||
addModel: {
|
||||
standCode: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'espList',
|
||||
'stationStandList'
|
||||
]),
|
||||
form() {
|
||||
return {
|
||||
labelWidth: '130px',
|
||||
items: {
|
||||
code: {
|
||||
name: '',
|
||||
item: []
|
||||
},
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: 'code', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.espList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: '屏蔽门名称', type: 'input' }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'standCode', label: '关联站台:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
rules() {
|
||||
const rules = {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.stationstandCountName'), trigger: 'change' }
|
||||
],
|
||||
standCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
// 清空表单验证提示信息
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform &&
|
||||
this.$refs.dataform.clearValidate();
|
||||
});
|
||||
|
||||
return rules;
|
||||
},
|
||||
createRules() {
|
||||
return {
|
||||
standCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
'$store.state.map.deleteCount': function (val) {
|
||||
this.deleteObj();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
deviceChange(code) {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
this.edit();
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('standStationCode', this.field);
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase() && this.field.toUpperCase() === 'standSelectStationCode'.toUpperCase()) {
|
||||
this.addModel.standCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('standStationCode', '');
|
||||
}
|
||||
},
|
||||
hasPSD(data) {
|
||||
let falg = false;
|
||||
this.espList.forEach(item => {
|
||||
if (item.standCode == data.code) {
|
||||
falg = true;
|
||||
}
|
||||
});
|
||||
return falg;
|
||||
},
|
||||
create() {
|
||||
const arr = [];
|
||||
this.stationStandList.forEach(item => {
|
||||
if (item.visible && !this.hasPSD(item)) {
|
||||
const uid = getUID('Esp', [...this.espList, ...arr]);
|
||||
arr.push({
|
||||
_type: 'Esp',
|
||||
code: uid,
|
||||
name: `Esp${[...this.espList, ...arr].length + 1}`,
|
||||
standCode: item.code
|
||||
});
|
||||
}
|
||||
});
|
||||
if (arr.length) {
|
||||
this.display = false;
|
||||
this.$message('创建完成');
|
||||
this.$store.dispatch('map/updateMapStandData', {models: arr, type: 'espList'});
|
||||
this.deviceSelect();
|
||||
} else {
|
||||
this.$message('暂无新车站或车站已有对应紧急停车按钮!');
|
||||
}
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs.dataform.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Esp'}, this.editModel);
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Esp'.toUpperCase()) {
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('map/delMapStandData', {models: [selected], type: 'espList'});
|
||||
this.deviceSelect();
|
||||
this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
this.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.view-control{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.card {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
@ -40,14 +40,6 @@
|
||||
@stationSectionCode="stationEnabledTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane :label="$t('map.controlMode')" class="tab_pane_box" name="StationControl">
|
||||
<station-control-draft
|
||||
ref="StationControl"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane :label="$t('map.signal')" class="tab_pane_box" name="Signal">
|
||||
<signal-draft
|
||||
ref="Signal"
|
||||
@ -66,6 +58,24 @@
|
||||
@standStationCode="standStationTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="屏蔽门" class="tab_pane_box" name="Psd">
|
||||
<psd-draft
|
||||
ref="PsdDraft"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@standStationCode="psdTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="站台紧急停车" class="tab_pane_box" name="Esp">
|
||||
<esp-draft
|
||||
ref="EspDraft"
|
||||
:selected="selected"
|
||||
@updateMapModel="updateMapModel"
|
||||
@setCenter="setCenter"
|
||||
@standStationCode="esqTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('map.trainWindow')" class="tab_pane_box" name="TrainWindow">
|
||||
<train-window-draft
|
||||
ref="TrainWindow"
|
||||
@ -175,6 +185,8 @@ import SwitchDraft from './switch';
|
||||
import SignalDraft from './signal/index';
|
||||
import StationDraft from './station';
|
||||
import StationStandDraft from './stationstand';
|
||||
import PsdDraft from './psdDraft';
|
||||
import EspDraft from './espDraft';
|
||||
// import CounterDraft from './counter';
|
||||
// import DelayUnlockDraft from './delayunlock';
|
||||
import TrainDraft from './train/index';
|
||||
@ -198,6 +210,8 @@ export default {
|
||||
SignalDraft,
|
||||
StationDraft,
|
||||
StationStandDraft,
|
||||
PsdDraft,
|
||||
EspDraft,
|
||||
// DelayUnlockDraft,
|
||||
TrainWindowDraft,
|
||||
TrainDraft,
|
||||
@ -229,6 +243,7 @@ export default {
|
||||
stationType: '',
|
||||
switchType: '',
|
||||
stationStandType:'',
|
||||
psdType: '',
|
||||
ViewMode: ViewMode,
|
||||
LogicalViewTypeList: [
|
||||
{ code: 'Link', name: this.$t('map.link') }
|
||||
@ -288,6 +303,10 @@ export default {
|
||||
this.enabledTab = 'Signal';
|
||||
} else if (this.stationStandType) {
|
||||
this.enabledTab = 'StationStand';
|
||||
} else if (this.psdType) {
|
||||
this.enabledTab = 'Psd';
|
||||
} else if (this.esqType) {
|
||||
this.enabledTab = 'Esp';
|
||||
} else if (this.feild) {
|
||||
this.enabledTab = 'Section';
|
||||
} else {
|
||||
@ -301,6 +320,12 @@ export default {
|
||||
this.oldDevice = device;
|
||||
}
|
||||
},
|
||||
esqTab(type) {
|
||||
this.esqType = type;
|
||||
},
|
||||
psdTab(type) {
|
||||
this.psdType = type;
|
||||
},
|
||||
standStationTab(type) {
|
||||
this.stationStandType = type;
|
||||
},
|
||||
|
302
src/views/newMap/newMapdraft/mapoperate/psdDraft.vue
Normal file
302
src/views/newMap/newMapdraft/mapoperate/psdDraft.vue
Normal file
@ -0,0 +1,302 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<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>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="make" label-width="140px" :model="addModel" :rules="createRules" size="mini">
|
||||
<el-form-item label="关联站台" prop="standCode">
|
||||
<el-select v-model="addModel.standCode" filterable>
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'standSelectStationCode' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('standSelectStationCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="关联站台轨:" prop="standTrackCode">
|
||||
<el-select v-model="addModel.standTrackCode" filterable>
|
||||
<el-option
|
||||
v-for="item in PhysicalSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'sectionSelectCode' ? 'danger' : 'primary'"
|
||||
size="small"
|
||||
@click="hover('sectionSelectCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.stationstandDirection')" prop="doorLocationType">
|
||||
<el-radio-group v-model="addModel.doorLocationType">
|
||||
<el-radio v-for="item in DoorLocationTypeList" :key="item.code" :label="item.code" border>{{ item.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="create">{{ $t('map.create') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getUID } from '@/jmapNew/utils/Uid';
|
||||
import ConfigList from './config/list';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
export default {
|
||||
name: 'PsdDraft',
|
||||
components: {
|
||||
ConfigList
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
DoorLocationTypeList: [],
|
||||
activeName: 'first',
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
standCode: '', // 关联站台唯一code
|
||||
standTrackCode: '', // 关联站台轨编码
|
||||
width: 80,
|
||||
height: 5,
|
||||
position: { x: 0, y: 0 },
|
||||
doorLocationType: '01' // 显示方向朝上或朝下
|
||||
},
|
||||
field: '',
|
||||
addModel: {
|
||||
standCode: '',
|
||||
standTrackCode: '',
|
||||
doorLocationType: '01' // 显示方向朝上或朝下
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'psdList',
|
||||
'stationStandList',
|
||||
'sectionList'
|
||||
]),
|
||||
form() {
|
||||
return {
|
||||
labelWidth: '130px',
|
||||
items: {
|
||||
code: {
|
||||
name: '',
|
||||
item: []
|
||||
},
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: 'code', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.psdList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: '屏蔽门名称', type: 'input' },
|
||||
{ prop: 'position', label: '屏蔽门坐标', type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'doorLocationType', label: '显示方向:', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.DoorLocationTypeList },
|
||||
{ prop: 'standTrackCode', label: '关联区段:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.PhysicalSectionList },
|
||||
{ prop: 'width', label: '屏蔽门宽度', type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'height', label: '屏蔽门高度', type: 'number', min: 0, max: 2000, placeholder: 'px' }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'standCode', label: '关联站台:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
rules() {
|
||||
const rules = {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.stationstandCountName'), trigger: 'change' }
|
||||
],
|
||||
standCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
standTrackCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'change' }
|
||||
],
|
||||
'position.y': [
|
||||
{ required: true, message: this.$t('rules.trainPositionY'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
// 清空表单验证提示信息
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataform &&
|
||||
this.$refs.dataform.clearValidate();
|
||||
});
|
||||
|
||||
return rules;
|
||||
},
|
||||
createRules() {
|
||||
return {
|
||||
standCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
standTrackCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
doorLocationType: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
},
|
||||
PhysicalSectionList() {
|
||||
let list = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01'; });
|
||||
}
|
||||
return list;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
this.deviceSelect(val);
|
||||
},
|
||||
'$store.state.map.deleteCount': function (val) {
|
||||
this.deleteObj();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$Dictionary.doorLocationType().then(list => {
|
||||
this.DoorLocationTypeList = list;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
deviceChange(code) {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
this.edit();
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$emit('standStationCode', this.field);
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
|
||||
this.$refs.dataform.resetFields();
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase() && this.field.toUpperCase() === 'standSelectStationCode'.toUpperCase()) {
|
||||
this.addModel.standCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('standStationCode', '');
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionSelectCode'.toUpperCase()) {
|
||||
this.addModel.standTrackCode = selected.code;
|
||||
this.activeName = 'second';
|
||||
this.field = '';
|
||||
this.$emit('standStationCode', '');
|
||||
}
|
||||
},
|
||||
create() {
|
||||
this.$refs.make.validate((valid) => {
|
||||
if (valid) {
|
||||
const uid = getUID('Psd', this.psdList);
|
||||
const model = {
|
||||
_type: 'Psd',
|
||||
code: uid,
|
||||
name: `Psd${this.psdList.length + 1}`,
|
||||
width: this.addModel.width,
|
||||
height: this.addModel.height,
|
||||
standCode: this.addModel.standCode, // 关联站台唯一code
|
||||
standTrackCode: this.addModel.standTrackCode // 关联站台轨编码
|
||||
};
|
||||
this.stationStandList.forEach(elem => {
|
||||
if (elem.code === this.addModel.standCode) {
|
||||
model.position = { x: elem.position.x, y: elem.position.y };
|
||||
if (this.addModel.doorLocationType == '01') { // 朝下
|
||||
model.position = { x: elem.position.x, y: elem.position.y + ( 2 * elem.height) };
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$emit('updateMapModel', model);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改对象
|
||||
edit() {
|
||||
this.$refs.dataform.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'Psd'}, this.editModel);
|
||||
this.$emit('updateMapModel', data);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除对象
|
||||
deleteObj() {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Psd'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.view-control{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.card {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
@ -369,6 +369,9 @@ export default {
|
||||
{ prop: 'leftSectionCode', label: this.$t('map.leftAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.PhysicalSectionList, hover: this.hover, buttonType: 'leftSection', buttonShowType: this.isLeftSectionButtonShow, isHidden: !this.hasAssociatedSection},
|
||||
{ prop: 'rightSectionCode', label: this.$t('map.rightAssociatedSection'), type: 'selectHover', optionLabel: 'name&&code', optionValue: 'code', clearable: true, options: this.PhysicalSectionList, hover: this.hover, buttonType: 'rightSection', buttonShowType: this.isRightSectionButtonShow, isHidden: !this.hasAssociatedSection},
|
||||
{ prop: 'parentCode', label: this.$t('map.associatedSection'), type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: true, options: this.sectionList, isHidden: !this.isParentCode },
|
||||
{ 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: 'isStandTrack', label: this.$t('map.isStandTrack'), type: 'checkbox', isHidden: !this.isStandTrackShow }, // 1
|
||||
|
||||
@ -408,15 +411,12 @@ export default {
|
||||
{value: true, label: this.$t('map.fromSmallToLarge')},
|
||||
{value: false, label: this.$t('map.fromLargeToSmall')}
|
||||
] }, // 1
|
||||
{ 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: 'isSegmentation', label: this.$t('map.isSegmentation'), type: 'checkbox', isHidden: !this.isSwitchSectionType },
|
||||
{ prop: 'segmentationPosition', label: this.$t('map.segmentationPosition'), type: 'coordinate', width: '150px', isHidden: !this.issegmentationPosition, children: [
|
||||
{ prop: 'segmentationPosition.x', firstLevel: 'segmentationPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
||||
{ prop: 'segmentationPosition.y', firstLevel: 'segmentationPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
||||
] },
|
||||
{ prop: 'isCurve', label: this.$t('map.isCurve'), type: 'checkbox', 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: 'isCurve', label: this.$t('map.isCurve'), type: 'checkbox', isHidden: !this.isSwitchSectionType }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
|
@ -32,7 +32,7 @@
|
||||
@click="hover('standSelectStationCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.stationstandDirection')" prop="doorLocationType">
|
||||
<!-- <el-form-item :label="$t('map.stationstandDirection')" prop="doorLocationType">
|
||||
<el-select v-model="addModel.doorLocationType" filterable :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in DoorLocationTypeList"
|
||||
@ -41,10 +41,10 @@
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.stationstandHasDoor')" prop="hasDoor">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item :label="$t('map.stationstandHasDoor')" prop="hasDoor">
|
||||
<el-checkbox v-model="addModel.hasDoor" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
@ -88,26 +88,22 @@ export default {
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
nameShow: '',
|
||||
doorLocationType: '',
|
||||
deviceStationCode: '',
|
||||
hasDoor: false,
|
||||
// doorLocationType: '', // 站台方向
|
||||
deviceStationCode: '', // 设备集中站
|
||||
// hasDoor: false, // 屏蔽门是否显示
|
||||
width: 0,
|
||||
height: 0,
|
||||
stationCode: '',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
visible: true,
|
||||
direction: ''
|
||||
stationCode: '', // 所属车站
|
||||
position: { x: 0, y: 0 },
|
||||
visible: true // 是否显示
|
||||
// direction: '' // 上下行方向
|
||||
},
|
||||
field: '',
|
||||
addModel: {
|
||||
stationCode: '',
|
||||
doorLocationType: '01',
|
||||
deviceStationCode: '',
|
||||
hasDoor: true
|
||||
// doorLocationType: '01',
|
||||
deviceStationCode: ''
|
||||
// hasDoor: true
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -129,24 +125,21 @@ export default {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.relStandCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationStandList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input', change:true, deviceChange:this.updateView },
|
||||
{ prop: 'name', label: this.$t('map.stationstandNameColon'), type: 'input' },
|
||||
{ prop: 'position', label: this.$t('map.stationstandPosition'), type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', change:true, deviceChange:this.updateView },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', change:true, deviceChange:this.updateView }
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'direction', label: this.$t('map.stationstandTopBottom'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.RunDirectionTypeList, change: true, deviceChange:this.updateView },
|
||||
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox', change: true, deviceChange: this.updateView},
|
||||
{ prop: 'doorLocationType', label: this.$t('map.stationstandDirection'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.DoorLocationTypeList, change: true, deviceChange:this.updateView },
|
||||
{ prop: 'hasDoor', label: this.$t('map.stationstandHasDoor'), type: 'checkbox', change: true, deviceChange:this.updateView },
|
||||
{ prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px', change:true, deviceChange:this.updateView},
|
||||
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px', change:true, deviceChange:this.updateView}
|
||||
{ prop: 'visible', label: this.$t('map.stationVisible'), type: 'checkbox' },
|
||||
{ prop: 'width', label: this.$t('map.stationstandWidth'), type: 'number', min: 0, max: 2000, placeholder: 'px' },
|
||||
{ prop: 'height', label: this.$t('map.stationstandHeight'), type: 'number', min: 0, max: 2000, placeholder: 'px' }
|
||||
]
|
||||
},
|
||||
map: {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView, disabled:true},
|
||||
{ prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, change: true, deviceChange:this.updateView }
|
||||
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList, disabled:true},
|
||||
{ prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -164,12 +157,6 @@ export default {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.stationstandCountName'), trigger: 'change' }
|
||||
],
|
||||
doorLocationType: [
|
||||
{ required: true, message: this.$t('rules.doorLocationType'), trigger: 'change' }
|
||||
],
|
||||
direction: [
|
||||
{ required: true, message: this.$t('rules.stationstandDirection'), trigger: 'change' }
|
||||
],
|
||||
width: [
|
||||
{ required: true, message: this.$t('rules.stationstandWidth'), trigger: 'change' }
|
||||
],
|
||||
@ -195,9 +182,6 @@ export default {
|
||||
return {
|
||||
stationCode: [
|
||||
{ required: true, message: this.$t('rules.stationCode'), trigger: 'change' }
|
||||
],
|
||||
doorLocationType: [
|
||||
{ required: true, message: this.$t('rules.doorLocationType'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
@ -224,9 +208,6 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
this.edit();
|
||||
},
|
||||
updateView() {
|
||||
this.edit();
|
||||
},
|
||||
changeStation(data) {
|
||||
const station = this.stationList.find(elem => { return elem.code == data; });
|
||||
if (station) {
|
||||
@ -262,14 +243,14 @@ export default {
|
||||
const model = {
|
||||
_type: 'StationStand',
|
||||
code: uid,
|
||||
name: `PF${this.stationStandList.length}`,
|
||||
name: `PF${this.stationStandList.length + 1}`,
|
||||
width: 40,
|
||||
height: 20,
|
||||
doorLocationType: this.addModel.doorLocationType,
|
||||
// doorLocationType: this.addModel.doorLocationType,
|
||||
deviceStationCode: this.addModel.deviceStationCode,
|
||||
visible: true,
|
||||
direction: '01',
|
||||
hasDoor: this.addModel.hasDoor
|
||||
visible: true
|
||||
// direction: '01',
|
||||
// hasDoor: this.addModel.hasDoor
|
||||
};
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.code === this.addModel.stationCode) {
|
||||
|
Loading…
Reference in New Issue
Block a user