Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
22f9332ea3
@ -254,43 +254,6 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.StationControl] = {
|
|
||||||
text: {
|
|
||||||
distance: 2, // 灯和文字之间的距离
|
|
||||||
fontSize: 10, // 控制模式字体大小
|
|
||||||
fontFormat: 'consolas', // 控制模式字体格式
|
|
||||||
fontColor: '#ffffff', // 控制模式字体颜色
|
|
||||||
fontWeight: 'normal', // 控制模式字体粗细
|
|
||||||
textAlign: 'middle', // 控制模式水平对齐
|
|
||||||
textVerticalAlign: 'top' // 控制模式垂直对齐
|
|
||||||
},
|
|
||||||
lamp: {
|
|
||||||
count: 3, // 控制模式灯个数
|
|
||||||
offset: { x: 20, y: 0 }, // 偏移量
|
|
||||||
radiusR: 6, // 控制模式灯的半径
|
|
||||||
distance: 36, // 控制模式之间灯之间的距离
|
|
||||||
grayColor: '#7F7F7F', // 控制模式灰色
|
|
||||||
greenColor: '#00FF00', // 控制模式绿色
|
|
||||||
redColor: '#FF0000', // 控制模式红色
|
|
||||||
yellowColor: '#FFFF00', // 控制模式黄色
|
|
||||||
emergencyControlShow: true, // 紧急站控显示
|
|
||||||
centerControlShow: true, // 中控显示
|
|
||||||
substationControlShow: true, // 站控按钮显示
|
|
||||||
interconnectedControlShow: false // 联锁控显示
|
|
||||||
},
|
|
||||||
arrow: {
|
|
||||||
show: false // 控制模式箭头显隐
|
|
||||||
},
|
|
||||||
mouseOverStyle: { // 鼠标悬浮样式
|
|
||||||
fontSize: 10,
|
|
||||||
fontFormat: 'consolas',
|
|
||||||
fontColor: '#FFF000',
|
|
||||||
fontWeight: 'normal',
|
|
||||||
textAlign: 'middle',
|
|
||||||
textVerticalAlign: 'top'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this[deviceType.StationCounter] = {
|
this[deviceType.StationCounter] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 计数器名称和文字的距离
|
distance: 2, // 计数器名称和文字的距离
|
||||||
@ -313,7 +276,43 @@ class SkinCode extends defaultStyle {
|
|||||||
// },
|
// },
|
||||||
kmPostShow: true, // 公里标显示
|
kmPostShow: true, // 公里标显示
|
||||||
kilometerPosition: 'down', // 公里标位置
|
kilometerPosition: 'down', // 公里标位置
|
||||||
fontWeight: 'bold' // 文字错细
|
fontWeight: 'bold', // 文字错细
|
||||||
|
StationControl:{
|
||||||
|
text: {
|
||||||
|
distance: 2, // 灯和文字之间的距离
|
||||||
|
fontSize: 10, // 控制模式字体大小
|
||||||
|
fontFormat: 'consolas', // 控制模式字体格式
|
||||||
|
fontColor: '#ffffff', // 控制模式字体颜色
|
||||||
|
fontWeight: 'normal', // 控制模式字体粗细
|
||||||
|
textAlign: 'middle', // 控制模式水平对齐
|
||||||
|
textVerticalAlign: 'top' // 控制模式垂直对齐
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
count: 3, // 控制模式灯个数
|
||||||
|
offset: { x: 20, y: 0 }, // 偏移量
|
||||||
|
radiusR: 6, // 控制模式灯的半径
|
||||||
|
distance: 36, // 控制模式之间灯之间的距离
|
||||||
|
grayColor: '#7F7F7F', // 控制模式灰色
|
||||||
|
greenColor: '#00FF00', // 控制模式绿色
|
||||||
|
redColor: '#FF0000', // 控制模式红色
|
||||||
|
yellowColor: '#FFFF00', // 控制模式黄色
|
||||||
|
emergencyControlShow: true, // 紧急站控显示
|
||||||
|
centerControlShow: true, // 中控显示
|
||||||
|
substationControlShow: true, // 站控按钮显示
|
||||||
|
interconnectedControlShow: false // 联锁控显示
|
||||||
|
},
|
||||||
|
arrow: {
|
||||||
|
show: false // 控制模式箭头显隐
|
||||||
|
},
|
||||||
|
mouseOverStyle: { // 鼠标悬浮样式
|
||||||
|
fontSize: 10,
|
||||||
|
fontFormat: 'consolas',
|
||||||
|
fontColor: '#FFF000',
|
||||||
|
fontWeight: 'normal',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.Switch] = {
|
this[deviceType.Switch] = {
|
||||||
|
@ -254,49 +254,6 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.StationControl] = {
|
|
||||||
text: {
|
|
||||||
distance: 2, // 灯和文字之间的距离
|
|
||||||
fontSize: 10, // 控制模式字体大小
|
|
||||||
fontFormat: 'consolas', // 控制模式字体格式
|
|
||||||
fontColor: '#ffffff', // 控制模式字体颜色
|
|
||||||
fontWeight: 'normal', // 控制模式字体粗细
|
|
||||||
textAlign: 'middle', // 控制模式水平对齐
|
|
||||||
textVerticalAlign: 'top', // 控制模式垂直对齐
|
|
||||||
centerControlText: '中控', // 中控文字内容
|
|
||||||
substationControlText: '站控', // 站控文字内容
|
|
||||||
emergencyControlText:'紧急站控', // 紧急站控文字内容
|
|
||||||
interconnectedControlText:'连锁控' // 连锁控文字内容
|
|
||||||
// stationCenterControlText: '站中控', // 站中控文字内容
|
|
||||||
// generalAlarmControlText: '总报警' // 总报警文字内容
|
|
||||||
},
|
|
||||||
lamp: {
|
|
||||||
count: 3, // 控制模式灯个数
|
|
||||||
offset: { x: 20, y: 0 }, // 偏移量
|
|
||||||
radiusR: 6, // 控制模式灯的半径
|
|
||||||
distance: 36, // 控制模式之间灯之间的距离
|
|
||||||
grayColor: '#7F7F7F', // 控制模式灰色
|
|
||||||
greenColor: '#00FF00', // 控制模式绿色
|
|
||||||
redColor: '#FF0000', // 控制模式红色
|
|
||||||
yellowColor: '#FFFF00', // 控制模式黄色
|
|
||||||
emergencyControlShow: true, // 紧急站控显示
|
|
||||||
centerControlShow: true, // 中控显示
|
|
||||||
substationControlShow: true, // 站控按钮显示
|
|
||||||
interconnectedControlShow: false // 联锁控显示
|
|
||||||
},
|
|
||||||
arrow: {
|
|
||||||
show: false // 控制模式箭头显隐
|
|
||||||
},
|
|
||||||
mouseOverStyle: { // 鼠标悬浮样式
|
|
||||||
fontSize: 10,
|
|
||||||
fontFormat: 'consolas',
|
|
||||||
fontColor: '#FFF000',
|
|
||||||
fontWeight: 'normal',
|
|
||||||
textAlign: 'middle',
|
|
||||||
textVerticalAlign: 'top'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this[deviceType.StationCounter] = {
|
this[deviceType.StationCounter] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 计数器名称和文字的距离
|
distance: 2, // 计数器名称和文字的距离
|
||||||
@ -328,6 +285,48 @@ class SkinCode extends defaultStyle {
|
|||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#FFFF00' // 控制灯颜色
|
controlColor: '#FFFF00' // 控制灯颜色
|
||||||
|
},
|
||||||
|
StationControl:{
|
||||||
|
text: {
|
||||||
|
distance: 2, // 灯和文字之间的距离
|
||||||
|
fontSize: 10, // 控制模式字体大小
|
||||||
|
fontFormat: 'consolas', // 控制模式字体格式
|
||||||
|
fontColor: '#ffffff', // 控制模式字体颜色
|
||||||
|
fontWeight: 'normal', // 控制模式字体粗细
|
||||||
|
textAlign: 'middle', // 控制模式水平对齐
|
||||||
|
textVerticalAlign: 'top', // 控制模式垂直对齐
|
||||||
|
centerControlText: '中控', // 中控文字内容
|
||||||
|
substationControlText: '站控', // 站控文字内容
|
||||||
|
emergencyControlText:'紧急站控', // 紧急站控文字内容
|
||||||
|
interconnectedControlText:'连锁控' // 连锁控文字内容
|
||||||
|
// stationCenterControlText: '站中控', // 站中控文字内容
|
||||||
|
// generalAlarmControlText: '总报警' // 总报警文字内容
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
count: 3, // 控制模式灯个数
|
||||||
|
offset: { x: 20, y: 0 }, // 偏移量
|
||||||
|
radiusR: 6, // 控制模式灯的半径
|
||||||
|
distance: 36, // 控制模式之间灯之间的距离
|
||||||
|
grayColor: '#7F7F7F', // 控制模式灰色
|
||||||
|
greenColor: '#00FF00', // 控制模式绿色
|
||||||
|
redColor: '#FF0000', // 控制模式红色
|
||||||
|
yellowColor: '#FFFF00', // 控制模式黄色
|
||||||
|
emergencyControlShow: true, // 紧急站控显示
|
||||||
|
centerControlShow: true, // 中控显示
|
||||||
|
substationControlShow: true, // 站控按钮显示
|
||||||
|
interconnectedControlShow: false // 联锁控显示
|
||||||
|
},
|
||||||
|
arrow: {
|
||||||
|
show: false // 控制模式箭头显隐
|
||||||
|
},
|
||||||
|
mouseOverStyle: { // 鼠标悬浮样式
|
||||||
|
fontSize: 10,
|
||||||
|
fontFormat: 'consolas',
|
||||||
|
fontColor: '#FFF000',
|
||||||
|
fontWeight: 'normal',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -258,41 +258,6 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.StationControl] = {
|
|
||||||
text: {
|
|
||||||
distance: 2, // 灯和文字之间的距离
|
|
||||||
fontSize: 11, // 字体大小
|
|
||||||
fontFormat: 'consolas', // 字体格式
|
|
||||||
fontColor: '#ffffff', // 字体颜色
|
|
||||||
fontWeight: 'normal', // 字体粗细
|
|
||||||
textAlign: 'middle', // 字体水平对齐
|
|
||||||
textVerticalAlign: 'top', // 字体垂直对齐
|
|
||||||
centerControlText: '中控', // 中控文字内容
|
|
||||||
substationControlText: '站控', // 站控文字内容
|
|
||||||
emergencyControlText:'紧急站控', // 紧急站控文字内容
|
|
||||||
interconnectedControlText:'连锁控' // 连锁控文字内容
|
|
||||||
// stationCenterControlText: '站中控', // 站中控文字内容
|
|
||||||
// generalAlarmControlText: '总报警' // 总报警文字内容
|
|
||||||
},
|
|
||||||
lamp: {
|
|
||||||
count: 4, // 控制模式的个数
|
|
||||||
offset: {x: 0, y: 0}, // 偏移量
|
|
||||||
radiusR: 6, // 控制模式灯的半径
|
|
||||||
distance: 36, // 控制模式之间灯之间的距离
|
|
||||||
grayColor: '#7F7F7F', // 控制模式灰色
|
|
||||||
greenColor: '#00FF00', // 控制模式绿色
|
|
||||||
redColor: '#FF0000', // 控制模式红色
|
|
||||||
yellowColor: '#FFFF00', // 控制模式黄色
|
|
||||||
emergencyControlShow: true, // 紧急站控显示
|
|
||||||
centerControlShow: true, // 中控显示
|
|
||||||
substationControlShow: true, // 站控按钮显示
|
|
||||||
interconnectedControlShow: true // 联锁控显示
|
|
||||||
},
|
|
||||||
arrow: {
|
|
||||||
show: false // 控制模式箭头显隐
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this[deviceType.StationCounter] = {
|
this[deviceType.StationCounter] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 计数器名称和文字的距离
|
distance: 2, // 计数器名称和文字的距离
|
||||||
@ -323,6 +288,40 @@ class SkinCode extends defaultStyle {
|
|||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#FFFF00' // 控制灯颜色
|
controlColor: '#FFFF00' // 控制灯颜色
|
||||||
|
},
|
||||||
|
StationControl:{
|
||||||
|
text: {
|
||||||
|
distance: 2, // 灯和文字之间的距离
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontFormat: 'consolas', // 字体格式
|
||||||
|
fontColor: '#ffffff', // 字体颜色
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
textAlign: 'middle', // 字体水平对齐
|
||||||
|
textVerticalAlign: 'top', // 字体垂直对齐
|
||||||
|
centerControlText: '中控', // 中控文字内容
|
||||||
|
substationControlText: '站控', // 站控文字内容
|
||||||
|
emergencyControlText:'紧急站控', // 紧急站控文字内容
|
||||||
|
interconnectedControlText:'连锁控' // 连锁控文字内容
|
||||||
|
// stationCenterControlText: '站中控', // 站中控文字内容
|
||||||
|
// generalAlarmControlText: '总报警' // 总报警文字内容
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
count: 4, // 控制模式的个数
|
||||||
|
offset: {x: 0, y: 0}, // 偏移量
|
||||||
|
radiusR: 6, // 控制模式灯的半径
|
||||||
|
distance: 36, // 控制模式之间灯之间的距离
|
||||||
|
grayColor: '#7F7F7F', // 控制模式灰色
|
||||||
|
greenColor: '#00FF00', // 控制模式绿色
|
||||||
|
redColor: '#FF0000', // 控制模式红色
|
||||||
|
yellowColor: '#FFFF00', // 控制模式黄色
|
||||||
|
emergencyControlShow: true, // 紧急站控显示
|
||||||
|
centerControlShow: true, // 中控显示
|
||||||
|
substationControlShow: true, // 站控按钮显示
|
||||||
|
interconnectedControlShow: true // 联锁控显示
|
||||||
|
},
|
||||||
|
arrow: {
|
||||||
|
show: false // 控制模式箭头显隐
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -255,41 +255,6 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.StationControl] = {
|
|
||||||
text: {
|
|
||||||
distance: 2, // 灯和文字之间的距离
|
|
||||||
fontSize: 12, // 字体大小
|
|
||||||
fontFormat: 'consolas', // 字体格式
|
|
||||||
fontColor: '#ffffff', // 字体颜色
|
|
||||||
fontWeight: 'normal', // 字体粗细
|
|
||||||
textAlign: 'middle', // 字体水平对齐
|
|
||||||
textVerticalAlign: 'top', // 字体垂直对齐
|
|
||||||
centerControlText: '中控', // 中控文字内容
|
|
||||||
substationControlText: '站控', // 站控文字内容
|
|
||||||
emergencyControlText:'紧急站控', // 紧急站控文字内容
|
|
||||||
interconnectedControlText:'连锁控' // 连锁控文字内容
|
|
||||||
// stationCenterControlText: '站中控', // 站中控文字内容
|
|
||||||
// generalAlarmControlText: '总报警' // 总报警文字内容
|
|
||||||
},
|
|
||||||
lamp: {
|
|
||||||
count: 4, // 控制模式的个数
|
|
||||||
offset: {x: 0, y: 0}, // 偏移量
|
|
||||||
radiusR: 4, // 控制模式灯的半径
|
|
||||||
distance: 36, // 控制模式之间灯之间的距离
|
|
||||||
grayColor: '#C0C0C0', // 控制模式灰色
|
|
||||||
greenColor: 'green', // 控制模式绿色
|
|
||||||
redColor: 'red', // 控制模式红色
|
|
||||||
yellowColor: 'yellow', // 控制模式黄色
|
|
||||||
emergencyControlShow: true, // 紧急站控显示
|
|
||||||
centerControlShow: true, // 中控显示
|
|
||||||
substationControlShow: true, // 站控按钮显示
|
|
||||||
interconnectedControlShow: false // 联锁控显示
|
|
||||||
},
|
|
||||||
arrow: {
|
|
||||||
show: false // 控制模式箭头显隐
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this[deviceType.StationCounter] = {
|
this[deviceType.StationCounter] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 计数器名称和文字的距离
|
distance: 2, // 计数器名称和文字的距离
|
||||||
@ -320,6 +285,40 @@ class SkinCode extends defaultStyle {
|
|||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#FFFF00' // 控制灯颜色
|
controlColor: '#FFFF00' // 控制灯颜色
|
||||||
|
},
|
||||||
|
StationControl:{
|
||||||
|
text: {
|
||||||
|
distance: 2, // 灯和文字之间的距离
|
||||||
|
fontSize: 12, // 字体大小
|
||||||
|
fontFormat: 'consolas', // 字体格式
|
||||||
|
fontColor: '#ffffff', // 字体颜色
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
textAlign: 'middle', // 字体水平对齐
|
||||||
|
textVerticalAlign: 'top', // 字体垂直对齐
|
||||||
|
centerControlText: '中控', // 中控文字内容
|
||||||
|
substationControlText: '站控', // 站控文字内容
|
||||||
|
emergencyControlText:'紧急站控', // 紧急站控文字内容
|
||||||
|
interconnectedControlText:'连锁控' // 连锁控文字内容
|
||||||
|
// stationCenterControlText: '站中控', // 站中控文字内容
|
||||||
|
// generalAlarmControlText: '总报警' // 总报警文字内容
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
count: 4, // 控制模式的个数
|
||||||
|
offset: {x: 0, y: 0}, // 偏移量
|
||||||
|
radiusR: 4, // 控制模式灯的半径
|
||||||
|
distance: 36, // 控制模式之间灯之间的距离
|
||||||
|
grayColor: '#C0C0C0', // 控制模式灰色
|
||||||
|
greenColor: 'green', // 控制模式绿色
|
||||||
|
redColor: 'red', // 控制模式红色
|
||||||
|
yellowColor: 'yellow', // 控制模式黄色
|
||||||
|
emergencyControlShow: true, // 紧急站控显示
|
||||||
|
centerControlShow: true, // 中控显示
|
||||||
|
substationControlShow: true, // 站控按钮显示
|
||||||
|
interconnectedControlShow: false // 联锁控显示
|
||||||
|
},
|
||||||
|
arrow: {
|
||||||
|
show: false // 控制模式箭头显隐
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ class SkinCode extends defaultStyle {
|
|||||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||||
},
|
},
|
||||||
logicText: {
|
logicText: {
|
||||||
show: true, // 逻辑区段名称显示
|
show: true, // 逻辑区段名称显示
|
||||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||||
distance: 6, // 文字离区段距离
|
distance: 6, // 文字离区段距离
|
||||||
fontSize: 8, // 字体大小
|
fontSize: 8, // 字体大小
|
||||||
@ -237,49 +237,6 @@ class SkinCode extends defaultStyle {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this[deviceType.StationControl] = {
|
|
||||||
text: {
|
|
||||||
distance: 2, // 灯和文字之间的距离
|
|
||||||
fontSize: 11, // 字体大小
|
|
||||||
fontFormat: 'consolas', // 字体格式
|
|
||||||
fontColor: '#ffffff', // 字体颜色
|
|
||||||
fontWeight: 'normal', // 字体粗细
|
|
||||||
textAlign: 'middle', // 字体水平对齐
|
|
||||||
textVerticalAlign: 'top', // 字体垂直对齐
|
|
||||||
centerControlText: '中控', // 中控文字内容
|
|
||||||
substationControlText: '站控', // 站控文字内容
|
|
||||||
emergencyControlText:'紧急站控', // 紧急站控文字内容
|
|
||||||
interconnectedControlText:'连锁控' // 连锁控文字内容
|
|
||||||
// stationCenterControlText: '站中控', // 站中控文字内容
|
|
||||||
// generalAlarmControlText: '总报警' // 总报警文字内容
|
|
||||||
},
|
|
||||||
lamp: {
|
|
||||||
count: 2, // 控制模式灯个数
|
|
||||||
offset: {x: 0, y: 0}, // 控制模式灯偏移量
|
|
||||||
radiusR: 4, // 控制模式灯的半径
|
|
||||||
distance: 36, // 控制模式之间灯之间的距离
|
|
||||||
grayColor: '#7F7F7F', // 控制模式灰色
|
|
||||||
greenColor: '#00FF00', // 控制模式绿色
|
|
||||||
redColor: '#FF0000', // 控制模式红色
|
|
||||||
yellowColor: '#FFFF00', // 控制模式黄色
|
|
||||||
emergencyControlShow: false, // 紧急站控显示
|
|
||||||
centerControlShow: true, // 中控显示
|
|
||||||
substationControlShow: true, // 站控按钮显示
|
|
||||||
interconnectedControlShow: false // 联锁控显示
|
|
||||||
},
|
|
||||||
arrow: {
|
|
||||||
show: true // 控制模式箭头显隐
|
|
||||||
},
|
|
||||||
mouseOverStyle: { // 鼠标悬浮样式
|
|
||||||
fontSize: null,
|
|
||||||
fontFormat: 'consolas',
|
|
||||||
fontColor: '#000',
|
|
||||||
fontWeight: 'normal',
|
|
||||||
textAlign: 'middle',
|
|
||||||
textVerticalAlign: 'top'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this[deviceType.StationCounter] = {
|
this[deviceType.StationCounter] = {
|
||||||
text: {
|
text: {
|
||||||
distance: 2, // 计数器名称和文字的距离
|
distance: 2, // 计数器名称和文字的距离
|
||||||
@ -310,6 +267,48 @@ class SkinCode extends defaultStyle {
|
|||||||
lamp: {
|
lamp: {
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#FFFF00' // 控制灯颜色
|
controlColor: '#FFFF00' // 控制灯颜色
|
||||||
|
},
|
||||||
|
StationControl:{
|
||||||
|
text: {
|
||||||
|
distance: 2, // 灯和文字之间的距离
|
||||||
|
fontSize: 11, // 字体大小
|
||||||
|
fontFormat: 'consolas', // 字体格式
|
||||||
|
fontColor: '#ffffff', // 字体颜色
|
||||||
|
fontWeight: 'normal', // 字体粗细
|
||||||
|
textAlign: 'middle', // 字体水平对齐
|
||||||
|
textVerticalAlign: 'top', // 字体垂直对齐
|
||||||
|
centerControlText: '中控', // 中控文字内容
|
||||||
|
substationControlText: '站控', // 站控文字内容
|
||||||
|
emergencyControlText:'紧急站控', // 紧急站控文字内容
|
||||||
|
interconnectedControlText:'连锁控' // 连锁控文字内容
|
||||||
|
// stationCenterControlText: '站中控', // 站中控文字内容
|
||||||
|
// generalAlarmControlText: '总报警' // 总报警文字内容
|
||||||
|
},
|
||||||
|
lamp: {
|
||||||
|
count: 2, // 控制模式灯个数
|
||||||
|
offset: {x: 0, y: 0}, // 控制模式灯偏移量
|
||||||
|
radiusR: 4, // 控制模式灯的半径
|
||||||
|
distance: 36, // 控制模式之间灯之间的距离
|
||||||
|
grayColor: '#7F7F7F', // 控制模式灰色
|
||||||
|
greenColor: '#00FF00', // 控制模式绿色
|
||||||
|
redColor: '#FF0000', // 控制模式红色
|
||||||
|
yellowColor: '#FFFF00', // 控制模式黄色
|
||||||
|
emergencyControlShow: false, // 紧急站控显示
|
||||||
|
centerControlShow: true, // 中控显示
|
||||||
|
substationControlShow: true, // 站控按钮显示
|
||||||
|
interconnectedControlShow: false // 联锁控显示
|
||||||
|
},
|
||||||
|
arrow: {
|
||||||
|
show: true // 控制模式箭头显隐
|
||||||
|
},
|
||||||
|
mouseOverStyle: { // 鼠标悬浮样式
|
||||||
|
fontSize: null,
|
||||||
|
fontFormat: 'consolas',
|
||||||
|
fontColor: '#000',
|
||||||
|
fontWeight: 'normal',
|
||||||
|
textAlign: 'middle',
|
||||||
|
textVerticalAlign: 'top'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,51 +2,51 @@ import Polygon from 'zrender/src/graphic/shape/Polygon';
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
|
|
||||||
class ESigAuto extends Group {
|
class ESigAuto extends Group {
|
||||||
constructor(model) {
|
constructor(model) {
|
||||||
super();
|
super();
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
|
|
||||||
this.arrow = new Polygon({
|
this.arrow = new Polygon({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z,
|
z: model.z,
|
||||||
shape: {
|
shape: {
|
||||||
points: model.point
|
points: model.point
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: model.stroke,
|
stroke: model.stroke,
|
||||||
lineWidth: model.lineWidth,
|
lineWidth: model.lineWidth,
|
||||||
fill: model.fill
|
fill: model.fill
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.arrow);
|
this.add(this.arrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 停止动画
|
// 停止动画
|
||||||
animationRecover() {
|
animationRecover() {
|
||||||
this.arrow.stopAnimation(false);
|
this.arrow.stopAnimation(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 箭头颜色
|
// 箭头颜色
|
||||||
setColor(color) {
|
setColor(color) {
|
||||||
this.arrow.setStyle('fill', color);
|
this.arrow.setStyle('fill', color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 箭头闪烁
|
// 箭头闪烁
|
||||||
arrowsAnimation() {
|
arrowsAnimation() {
|
||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
const fill = this.arrow.style.Signal.fill;
|
const fill = this.arrow.style.Signal.fill;
|
||||||
this.arrow.animateStyle(true)
|
this.arrow.animateStyle(true)
|
||||||
.when(1000, { fill: style.backgroundColor, stroke: style.backgroundColor })
|
.when(1000, { fill: style.backgroundColor, stroke: style.backgroundColor })
|
||||||
.when(2000, { fill: fill, stroke: style.Signal.sidelineColor })
|
.when(2000, { fill: fill, stroke: style.Signal.sidelineColor })
|
||||||
.when(3000, { fill: style.backgroundColor, stroke: style.backgroundColor })
|
.when(3000, { fill: style.backgroundColor, stroke: style.backgroundColor })
|
||||||
.when(4000, { fill: fill, stroke: style.Signal.sidelineColor })
|
.when(4000, { fill: fill, stroke: style.Signal.sidelineColor })
|
||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ESigAuto;
|
export default ESigAuto;
|
||||||
|
@ -4,70 +4,70 @@ import Text from 'zrender/src/graphic/Text';
|
|||||||
|
|
||||||
/** 单个控制灯*/
|
/** 单个控制灯*/
|
||||||
export default class ESingleControl extends Group {
|
export default class ESingleControl extends Group {
|
||||||
constructor(model) {
|
constructor(model) {
|
||||||
super();
|
super();
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.zlevel = model.zlevel;
|
this.zlevel = model.zlevel;
|
||||||
this._subType = model._subType;
|
this._subType = model._subType;
|
||||||
this.z = 20;
|
this.z = 20;
|
||||||
this.onmouseover = model.mouseover;
|
this.onmouseover = model.mouseover;
|
||||||
this.onmouseout = model.mouseout;
|
this.onmouseout = model.mouseout;
|
||||||
this.create(model);
|
this.create(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
create(model) {
|
create(model) {
|
||||||
var _subType = 'ControlSignal';
|
var _subType = 'ControlSignal';
|
||||||
var _val = '0';
|
var _val = '0';
|
||||||
if (model.pop) {
|
if (model.pop) {
|
||||||
_subType = 'ControlButton';
|
_subType = 'ControlButton';
|
||||||
_val = '1';
|
_val = '1';
|
||||||
}
|
}
|
||||||
var _nameType = this._subType;
|
var _nameType = this._subType;
|
||||||
this.control = new Arc({
|
this.control = new Arc({
|
||||||
pop: model.pop,
|
pop: model.pop,
|
||||||
_subType: _subType,
|
_subType: _subType,
|
||||||
_nameType: _nameType,
|
_nameType: _nameType,
|
||||||
_val: _val,
|
_val: _val,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
shape: {
|
shape: {
|
||||||
cx: model.point.x,
|
cx: model.point.x,
|
||||||
cy: model.point.y,
|
cy: model.point.y,
|
||||||
r: model.style.StationControl.lamp.radiusR
|
r: model.style.Station.StationControl.lamp.radiusR
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: 0.5,
|
lineWidth: 0.5,
|
||||||
fill: model.style.StationControl.lamp.grayColor,
|
fill: model.style.Station.StationControl.lamp.grayColor,
|
||||||
stroke: model.style.StationControl.lamp.grayColor
|
stroke: model.style.Station.StationControl.lamp.grayColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.text = new Text({
|
this.text = new Text({
|
||||||
pop: model.pop,
|
pop: model.pop,
|
||||||
_subType: _subType,
|
_subType: _subType,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
position: [0, 0],
|
position: [0, 0],
|
||||||
style: {
|
style: {
|
||||||
x: model.point.x,
|
x: model.point.x,
|
||||||
y: model.point.y + model.style.StationControl.lamp.radiusR + model.style.StationControl.text.distance,
|
y: model.point.y + model.style.Station.StationControl.lamp.radiusR + model.style.Station.StationControl.text.distance,
|
||||||
fontWeight: model.style.StationControl.text.fontWeight,
|
fontWeight: model.style.Station.StationControl.text.fontWeight,
|
||||||
fontSize: model.style.StationControl.text.fontSize,
|
fontSize: model.style.Station.StationControl.text.fontSize,
|
||||||
fontFamily: model.style.StationControl.text.fontFormat,
|
fontFamily: model.style.Station.StationControl.text.fontFormat,
|
||||||
text: model.context,
|
text: model.context,
|
||||||
textFill: model.style.StationControl.text.fontColor,
|
textFill: model.style.Station.StationControl.text.fontColor,
|
||||||
textAlign: model.style.StationControl.text.textAlign,
|
textAlign: model.style.Station.StationControl.text.textAlign,
|
||||||
textVerticalAlign: model.style.StationControl.text.textVerticalAlign
|
textVerticalAlign: model.style.Station.StationControl.text.textVerticalAlign
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.add(this.control);
|
this.add(this.control);
|
||||||
this.add(this.text);
|
this.add(this.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
setColor(color) {
|
setColor(color) {
|
||||||
if (color) {
|
if (color) {
|
||||||
this.control.setStyle('fill', color);
|
this.control.setStyle('fill', color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,76 +114,76 @@ export default class Station extends Group {
|
|||||||
const model = this.model;
|
const model = this.model;
|
||||||
if (model.visible && model.isCreateControlMode) {
|
if (model.visible && model.isCreateControlMode) {
|
||||||
// 紧急站控
|
// 紧急站控
|
||||||
if (this.style.StationControl.lamp.emergencyControlShow) {
|
if (this.style.Station.StationControl.lamp.emergencyControlShow) {
|
||||||
this.emergencyControl = new ESingleControl({
|
this.emergencyControl = new ESingleControl({
|
||||||
_subType: 'emergency',
|
_subType: 'emergency',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.controlModePoint.x - this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.controlModePoint.y + this.style.StationControl.lamp.offset.y
|
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: this.style.StationControl.text.emergencyControlText,
|
context: this.style.Station.StationControl.text.emergencyControlText,
|
||||||
// model.jjzkContent,
|
// model.jjzkContent,
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.emergencyControl);
|
this.add(this.emergencyControl);
|
||||||
}
|
}
|
||||||
// 中控按钮
|
// 中控按钮
|
||||||
if (this.style.StationControl.lamp.centerControlShow) {
|
if (this.style.Station.StationControl.lamp.centerControlShow) {
|
||||||
this.centerControl = new ESingleControl({
|
this.centerControl = new ESingleControl({
|
||||||
_subType: 'center',
|
_subType: 'center',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.controlModePoint.x - this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.controlModePoint.y + this.style.StationControl.lamp.offset.y
|
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: this.style.StationControl.text.centerControlText,
|
context: this.style.Station.StationControl.text.centerControlText,
|
||||||
// model.zokContent,
|
// model.zokContent,
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.centerControl);
|
this.add(this.centerControl);
|
||||||
}
|
}
|
||||||
// 站控按钮
|
// 站控按钮
|
||||||
if (this.style.StationControl.lamp.substationControlShow) {
|
if (this.style.Station.StationControl.lamp.substationControlShow) {
|
||||||
this.substationControl = new ESingleControl({
|
this.substationControl = new ESingleControl({
|
||||||
_subType: 'substation',
|
_subType: 'substation',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.controlModePoint.x + this.style.StationControl.lamp.distance / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.controlModePoint.y + this.style.StationControl.lamp.offset.y
|
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
context: this.style.StationControl.text.substationControlText,
|
context: this.style.Station.StationControl.text.substationControlText,
|
||||||
// model.zakContent
|
// model.zakContent
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.substationControl);
|
this.add(this.substationControl);
|
||||||
}
|
}
|
||||||
// 联锁控
|
// 联锁控
|
||||||
if (this.style.StationControl.lamp.interconnectedControlShow) {
|
if (this.style.Station.StationControl.lamp.interconnectedControlShow) {
|
||||||
this.interconnectedControl = new ESingleControl({
|
this.interconnectedControl = new ESingleControl({
|
||||||
_subType: 'interconnected',
|
_subType: 'interconnected',
|
||||||
style: this.style,
|
style: this.style,
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
point: {
|
point: {
|
||||||
x: model.controlModePoint.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.controlModePoint.y + this.style.StationControl.lamp.offset.y
|
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
|
||||||
},
|
},
|
||||||
// context: model.lskContent || '联锁控',
|
// context: model.lskContent || '联锁控',
|
||||||
context:this.style.StationControl.text.interconnectedControlText || '联锁控',
|
context:this.style.Station.StationControl.text.interconnectedControlText || '联锁控',
|
||||||
pop: false
|
pop: false
|
||||||
});
|
});
|
||||||
this.add(this.interconnectedControl);
|
this.add(this.interconnectedControl);
|
||||||
}
|
}
|
||||||
// 箭头
|
// 箭头
|
||||||
if (this.style.StationControl.arrow.show) {
|
if (this.style.Station.StationControl.arrow.show) {
|
||||||
const point = arrow(this.model.controlModePoint.x, this.model.controlModePoint.y + this.style.StationControl.lamp.radiusR / 2, this.style.StationControl.lamp.distance / 6, this.style.StationControl.lamp.radiusR * 0.8);
|
const point = arrow(this.model.controlModePoint.x, this.model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
|
||||||
this.arrowsControl = new EArrow({
|
this.arrowsControl = new EArrow({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
@ -191,9 +191,9 @@ export default class Station extends Group {
|
|||||||
count: this.count,
|
count: this.count,
|
||||||
drict: 1,
|
drict: 1,
|
||||||
point: point,
|
point: point,
|
||||||
x: model.controlModePoint.x + this.style.StationControl.lamp.offset.x,
|
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.offset.x,
|
||||||
y: model.controlModePoint.y + this.style.StationControl.lamp.radiusR / 2 + this.style.StationControl.lamp.offset.y,
|
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y,
|
||||||
fill: this.style.StationControl.lamp.grayColor,
|
fill: this.style.Station.StationControl.lamp.grayColor,
|
||||||
lineWidth: 1,
|
lineWidth: 1,
|
||||||
stroke: this.style.sidelineColor
|
stroke: this.style.sidelineColor
|
||||||
});
|
});
|
||||||
@ -209,24 +209,24 @@ export default class Station extends Group {
|
|||||||
setState(model) {
|
setState(model) {
|
||||||
// switch (model.status) {
|
// switch (model.status) {
|
||||||
// case '00': // 无状态
|
// case '00': // 无状态
|
||||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// break;
|
// break;
|
||||||
// case '01': // 中控
|
// case '01': // 中控
|
||||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.greenColor);
|
// this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.greenColor);
|
||||||
// break;
|
// break;
|
||||||
// case '02': // 站控
|
// case '02': // 站控
|
||||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.yellowColor);
|
// this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
|
||||||
// this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// break;
|
// break;
|
||||||
// case '03': // 紧急站控
|
// case '03': // 紧急站控
|
||||||
// this.emergencyControl && this.emergencyControl.setColor(this.style.StationControl.lamp.redColor);
|
// this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor);
|
||||||
// this.substationControl && this.substationControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// this.centerControl && this.centerControl.setColor(this.style.StationControl.lamp.grayColor);
|
// this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ import deviceType from '../constant/deviceType';
|
|||||||
import Section from './Section/index.js';
|
import Section from './Section/index.js';
|
||||||
import Signal from './Signal/index.js';
|
import Signal from './Signal/index.js';
|
||||||
import Station from './Station/index.js';
|
import Station from './Station/index.js';
|
||||||
import StationControl from './StationControl/index.js';
|
|
||||||
import ImageControl from './ImageControl/index.js';
|
import ImageControl from './ImageControl/index.js';
|
||||||
import LcControl from './LcControl/index.js';
|
import LcControl from './LcControl/index.js';
|
||||||
import LimitControl from './LimitControl/index.js';
|
import LimitControl from './LimitControl/index.js';
|
||||||
@ -22,7 +21,6 @@ const mapShape = {};
|
|||||||
mapShape[deviceType.Section] = Section;
|
mapShape[deviceType.Section] = Section;
|
||||||
mapShape[deviceType.Signal] = Signal;
|
mapShape[deviceType.Signal] = Signal;
|
||||||
mapShape[deviceType.Station] = Station;
|
mapShape[deviceType.Station] = Station;
|
||||||
mapShape[deviceType.StationControl] = StationControl;
|
|
||||||
mapShape[deviceType.ImageControl] = ImageControl;
|
mapShape[deviceType.ImageControl] = ImageControl;
|
||||||
mapShape[deviceType.LcControl] = LcControl;
|
mapShape[deviceType.LcControl] = LcControl;
|
||||||
mapShape[deviceType.LimitControl] = LimitControl;
|
mapShape[deviceType.LimitControl] = LimitControl;
|
||||||
|
@ -172,7 +172,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import SectionDraft from './section';
|
import SectionDraft from './section';
|
||||||
import SwitchDraft from './switch';
|
import SwitchDraft from './switch';
|
||||||
import SignalDraft from './signal';
|
import SignalDraft from './signal/index';
|
||||||
import StationDraft from './station';
|
import StationDraft from './station';
|
||||||
import StationStandDraft from './stationstand';
|
import StationStandDraft from './stationstand';
|
||||||
// import StationControlDraft from './stationcontrol';
|
// import StationControlDraft from './stationcontrol';
|
||||||
|
218
src/views/newMap/newMapdraft/mapoperate/signal/create.vue
Normal file
218
src/views/newMap/newMapdraft/mapoperate/signal/create.vue
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height:100%;">
|
||||||
|
<div style="height: calc(100% - 46px);">
|
||||||
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
<el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules">
|
||||||
|
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
|
||||||
|
<el-select v-model="addModel.sectionCode" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in signalSectionList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name + ' (' + item.code+ ')'"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
:type="field === 'selectSingalCode' ? 'danger' : 'primary'"
|
||||||
|
size="small"
|
||||||
|
@click="hover('selectSingalCode')"
|
||||||
|
>{{ $t('map.activate') }}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('map.signalNameColon')" prop="name">
|
||||||
|
<el-input v-model="addModel.name" style="width: 178px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('map.leftOrRight')" prop="leftOrRight">
|
||||||
|
<el-radio-group v-model="addModel.leftOrRight">
|
||||||
|
<el-radio
|
||||||
|
v-for="item in SignalLeftOrRightList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.value"
|
||||||
|
border
|
||||||
|
size="mini"
|
||||||
|
>
|
||||||
|
{{ item.label }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('map.signalDirectionTypeX')" prop="directionShowType">
|
||||||
|
<el-radio-group v-model="addModel.directionShowType">
|
||||||
|
<el-radio
|
||||||
|
v-for="item in SignalDirectionList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.code"
|
||||||
|
border
|
||||||
|
size="mini"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('map.positionType')" prop="positionType">
|
||||||
|
<el-radio-group v-model="addModel.positionType">
|
||||||
|
<el-radio
|
||||||
|
v-for="item in SignalPositionTypeList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.code"
|
||||||
|
border
|
||||||
|
size="mini"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('map.equipmentStation')" prop="stationCode">
|
||||||
|
<el-select v-model="addModel.stationCode" filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in stationList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name + item.code"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</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>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
import { getUID } from '@/jmap/utils/Uid';
|
||||||
|
import JTriangle from '@/jmap/utils/JTriangle';
|
||||||
|
export default {
|
||||||
|
name: 'SignalCreate',
|
||||||
|
props: {
|
||||||
|
field:{
|
||||||
|
type:String,
|
||||||
|
default: function () {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
addModel: {
|
||||||
|
sectionCode: '',
|
||||||
|
name: '',
|
||||||
|
directionShowType: '01',
|
||||||
|
leftOrRight: '0',
|
||||||
|
positionType: '01',
|
||||||
|
stationCode: ''
|
||||||
|
},
|
||||||
|
SignalPositionTypeList:[],
|
||||||
|
SignalDirectionList: [
|
||||||
|
{ code: '01', name: '向左' },
|
||||||
|
{ code: '02', name: '向右' }
|
||||||
|
],
|
||||||
|
SignalLeftOrRightList: [],
|
||||||
|
mergeRules: {
|
||||||
|
sectionCode: [
|
||||||
|
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
directionShowType: [
|
||||||
|
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.directionType'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
leftOrRight: [
|
||||||
|
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.leftOrRight'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
positionType: [
|
||||||
|
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.positionType'), trigger: 'change' }
|
||||||
|
],
|
||||||
|
stationCode: [
|
||||||
|
{ required: false, message: this.$t('map.pleaseSelect') + '' + this.$t('map.equipmentStation'), trigger: 'change' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
...mapGetters('map', [
|
||||||
|
'sectionList',
|
||||||
|
'stationList'
|
||||||
|
]),
|
||||||
|
// 物理区段和道岔区段
|
||||||
|
signalSectionList() {
|
||||||
|
let list = [];
|
||||||
|
if (this.sectionList && this.sectionList.length) {
|
||||||
|
list = this.sectionList.filter(elem => {
|
||||||
|
return elem.type === '01' || elem.type === '03';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.SignalLeftOrRightList = this.$ConstSelect.SignalLeftOrRightList;
|
||||||
|
this.$Dictionary.signalPositionType().then(list => {
|
||||||
|
this.SignalPositionTypeList = list;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
create() {
|
||||||
|
this.$refs['make'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.addModel.sectionCode) {
|
||||||
|
const uid = getUID('Singal');
|
||||||
|
var model = {
|
||||||
|
_type: 'Signal',
|
||||||
|
code: uid,
|
||||||
|
uniqueName: uid,
|
||||||
|
sectionCode: this.addModel.sectionCode,
|
||||||
|
positionType: this.addModel.positionType,
|
||||||
|
directionShowType: this.addModel.directionShowType,
|
||||||
|
nameShow: true,
|
||||||
|
namePosition: { x: 0, y: 0 },
|
||||||
|
buttonShow: true,
|
||||||
|
useType: '01',
|
||||||
|
potLampType: '01',
|
||||||
|
lampPostType: '01',
|
||||||
|
lampPositionType: '01',
|
||||||
|
guideShow: false,
|
||||||
|
stationCode: this.addModel.stationCode
|
||||||
|
};
|
||||||
|
this.sectionList.forEach(elem => {
|
||||||
|
if (elem.code === this.addModel.sectionCode) {
|
||||||
|
model.name = this.addModel.name || 'Signal_' + elem.name.replace('Section_', '');
|
||||||
|
if (this.addModel.leftOrRight === '0') {
|
||||||
|
const beg = elem.points[0];
|
||||||
|
const end = elem.points[0 + 1];
|
||||||
|
const traingle = new JTriangle(beg, end);
|
||||||
|
model.rotate = Math.floor(traingle.getAngle());
|
||||||
|
model.position = { x: elem.points[0].x, y: elem.points[0].y };
|
||||||
|
model.guidePosition = { x: elem.points[0].x, y: elem.points[0].y };
|
||||||
|
model.buttonPosition = { x: elem.points[0].x, y: elem.points[0].y };
|
||||||
|
model.offset = elem.lengthFact && elem.lengthFact > 2 ? 2 : 0;
|
||||||
|
} else {
|
||||||
|
const r = elem.points.length - 1;
|
||||||
|
const beg = elem.points[r - 1];
|
||||||
|
const end = elem.points[r];
|
||||||
|
const traingle = new JTriangle(beg, end);
|
||||||
|
model.rotate = Math.floor(traingle.getAngle());
|
||||||
|
model.position = { x: elem.points[r].x, y: elem.points[r].y };
|
||||||
|
model.guidePosition = { x: elem.points[r].x, y: elem.points[r].y };
|
||||||
|
model.buttonPosition = { x: elem.points[r].x, y: elem.points[r].y };
|
||||||
|
model.offset = elem.lengthFact && elem.lengthFact > 2 ? elem.lengthFact - 2 : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.$emit('updateMapModel', model);
|
||||||
|
} else {
|
||||||
|
this.$messageBox(this.$t('tip.selectedSectionEmpty'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
hover(field) {
|
||||||
|
this.field = field === this.field ? '' : field;
|
||||||
|
this.$emit('signalSectionCode', this.field);
|
||||||
|
},
|
||||||
|
setSectionCode(code) {
|
||||||
|
this.addModel.sectionCode = code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -14,104 +14,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||||
<div style="height: calc(100% - 46px);">
|
<create-signal ref="createSignal" :field="field" @signalSectionCode="signalSectionCode" @updateMapModel="updateMapModel" />
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
||||||
<el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules">
|
|
||||||
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
|
|
||||||
<el-select v-model="addModel.sectionCode" filterable>
|
|
||||||
<!-- <el-option
|
|
||||||
v-for="item in PhysicalSectionList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name + ' (' + item.code+ ')'"
|
|
||||||
:value="item.code"
|
|
||||||
/> -->
|
|
||||||
<el-option
|
|
||||||
v-for="item in signalSectionList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name + ' (' + item.code+ ')'"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<el-button
|
|
||||||
:type="field === 'selectSingalCode' ? 'danger' : 'primary'"
|
|
||||||
size="small"
|
|
||||||
@click="hover('selectSingalCode')"
|
|
||||||
>{{ $t('map.activate') }}</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.signalNameColon')" prop="name">
|
|
||||||
<el-input v-model="addModel.name" style="width: 178px;" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.leftOrRight')" prop="leftOrRight">
|
|
||||||
<el-radio-group v-model="addModel.leftOrRight">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in SignalLeftOrRightList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.value"
|
|
||||||
border
|
|
||||||
size="mini"
|
|
||||||
>
|
|
||||||
{{ item.label }}</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.signalDirectionTypeX')" prop="directionShowType">
|
|
||||||
<el-radio-group v-model="addModel.directionShowType">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in SignalDirectionList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.code"
|
|
||||||
border
|
|
||||||
size="mini"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.positionType')" prop="positionType">
|
|
||||||
<el-radio-group v-model="addModel.positionType">
|
|
||||||
<el-radio
|
|
||||||
v-for="item in SignalPositionTypeList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.code"
|
|
||||||
border
|
|
||||||
size="mini"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.equipmentStation')" prop="stationCode">
|
|
||||||
<el-select v-model="addModel.stationCode" filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="item in stationList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.name + item.code"
|
|
||||||
:value="item.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</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-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { getUID } from '@/jmap/utils/Uid';
|
import ConfigList from '../config/list';
|
||||||
import JTriangle from '@/jmap/utils/JTriangle';
|
|
||||||
import ConfigList from './config/list';
|
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
|
import createSignal from './create';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignalDraft',
|
name: 'SignalDraft',
|
||||||
components: {
|
components: {
|
||||||
ConfigList
|
ConfigList,
|
||||||
|
createSignal
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -138,6 +56,7 @@ export default {
|
|||||||
{ code: '00', name: this.$t('map.normal') },
|
{ code: '00', name: this.$t('map.normal') },
|
||||||
{ code: '01', name: this.$t('map.signalFilamentAlarm') }
|
{ code: '01', name: this.$t('map.signalFilamentAlarm') }
|
||||||
],
|
],
|
||||||
|
field:'',
|
||||||
editModel: {
|
editModel: {
|
||||||
code: '',
|
code: '',
|
||||||
name: '',
|
name: '',
|
||||||
@ -159,38 +78,11 @@ export default {
|
|||||||
position: { x: 0, y: 0 },
|
position: { x: 0, y: 0 },
|
||||||
buttonPosition: { x: 0, y: 0 },
|
buttonPosition: { x: 0, y: 0 },
|
||||||
guidePosition: { x: 0, y: 0 }
|
guidePosition: { x: 0, y: 0 }
|
||||||
},
|
|
||||||
field: '',
|
|
||||||
addModel: {
|
|
||||||
sectionCode: '',
|
|
||||||
name: '',
|
|
||||||
directionShowType: '01',
|
|
||||||
leftOrRight: '0',
|
|
||||||
positionType: '01',
|
|
||||||
stationCode: ''
|
|
||||||
},
|
|
||||||
mergeRules: {
|
|
||||||
sectionCode: [
|
|
||||||
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
directionShowType: [
|
|
||||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.directionType'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
leftOrRight: [
|
|
||||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.leftOrRight'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
positionType: [
|
|
||||||
{ required: true, message: this.$t('map.pleaseSelect') + '' + this.$t('map.positionType'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
stationCode: [
|
|
||||||
{ required: false, message: this.$t('map.pleaseSelect') + '' + this.$t('map.equipmentStation'), trigger: 'change' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'linkList',
|
|
||||||
'signalList',
|
'signalList',
|
||||||
'sectionList',
|
'sectionList',
|
||||||
'stationList',
|
'stationList',
|
||||||
@ -344,74 +236,21 @@ export default {
|
|||||||
this.editModel.rotate = selected.rotate || 0; // 角度
|
this.editModel.rotate = selected.rotate || 0; // 角度
|
||||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'selectSingalCode'.toUpperCase()) {
|
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'selectSingalCode'.toUpperCase()) {
|
||||||
if (selected.type == '01') {
|
if (selected.type == '01') {
|
||||||
this.addModel.sectionCode = selected.code;
|
this.$refs.createSignal.setSectionCode(selected.code);
|
||||||
} else if (selected.type == '02') {
|
} else if (selected.type == '02') {
|
||||||
this.addModel.sectionCode = selected.parentCode;
|
this.$refs.createSignal.setSectionCode(selected.parentCode);
|
||||||
}
|
}
|
||||||
this.activeName = 'second';
|
this.activeName = 'second';
|
||||||
this.field = '';
|
this.field = '';
|
||||||
this.$emit('signalSectionCode', '');
|
this.$emit('signalSectionCode', '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hover(field) {
|
signalSectionCode(field) {
|
||||||
this.field = field === this.field ? '' : field;
|
this.field = field;
|
||||||
this.$emit('signalSectionCode', this.field);
|
this.$emit('signalSectionCode', field);
|
||||||
},
|
},
|
||||||
create() {
|
updateMapModel(model) {
|
||||||
this.$refs['make'].validate((valid) => {
|
this.$emit('updateMapModel', model);
|
||||||
if (valid) {
|
|
||||||
if (this.addModel.sectionCode) {
|
|
||||||
const uid = getUID('Singal');
|
|
||||||
var model = {
|
|
||||||
_type: 'Signal',
|
|
||||||
code: uid,
|
|
||||||
uniqueName: uid,
|
|
||||||
sectionCode: this.addModel.sectionCode,
|
|
||||||
positionType: this.addModel.positionType,
|
|
||||||
directionShowType: this.addModel.directionShowType,
|
|
||||||
nameShow: true,
|
|
||||||
namePosition: { x: 0, y: 0 },
|
|
||||||
buttonShow: true,
|
|
||||||
useType: '01',
|
|
||||||
potLampType: '01',
|
|
||||||
lampPostType: '01',
|
|
||||||
lampPositionType: '01',
|
|
||||||
guideShow: false,
|
|
||||||
stationCode: this.addModel.stationCode
|
|
||||||
};
|
|
||||||
this.sectionList.forEach(elem => {
|
|
||||||
if (elem.code === this.addModel.sectionCode) {
|
|
||||||
model.name = this.addModel.name || 'Signal_' + elem.name.replace('Section_', '');
|
|
||||||
model.linkCode = elem.code;
|
|
||||||
if (this.addModel.leftOrRight === '0') {
|
|
||||||
const beg = elem.points[0];
|
|
||||||
const end = elem.points[0 + 1];
|
|
||||||
const traingle = new JTriangle(beg, end);
|
|
||||||
model.rotate = Math.floor(traingle.getAngle());
|
|
||||||
model.position = { x: elem.points[0].x, y: elem.points[0].y };
|
|
||||||
model.guidePosition = { x: elem.points[0].x, y: elem.points[0].y };
|
|
||||||
model.buttonPosition = { x: elem.points[0].x, y: elem.points[0].y };
|
|
||||||
model.offset = elem.lengthFact && elem.lengthFact > 2 ? 2 : 0;
|
|
||||||
} else {
|
|
||||||
const r = elem.points.length - 1;
|
|
||||||
const beg = elem.points[r - 1];
|
|
||||||
const end = elem.points[r];
|
|
||||||
const traingle = new JTriangle(beg, end);
|
|
||||||
model.rotate = Math.floor(traingle.getAngle());
|
|
||||||
model.position = { x: elem.points[r].x, y: elem.points[r].y };
|
|
||||||
model.guidePosition = { x: elem.points[r].x, y: elem.points[r].y };
|
|
||||||
model.buttonPosition = { x: elem.points[r].x, y: elem.points[r].y };
|
|
||||||
model.offset = elem.lengthFact && elem.lengthFact > 2 ? elem.lengthFact - 2 : 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.$emit('updateMapModel', model);
|
|
||||||
} else {
|
|
||||||
this.$messageBox(this.$t('tip.selectedSectionEmpty'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 修改对象
|
// 修改对象
|
||||||
edit() {
|
edit() {
|
Loading…
Reference in New Issue
Block a user