Merge branch 'master' of https://git.cloud.tencent.com/joylink/jl-nclient
This commit is contained in:
commit
6b21fefaeb
@ -5,7 +5,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<title></title>
|
||||
<script src="/static/inflate.min.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -29,6 +29,7 @@
|
||||
"stompjs": "^2.3.3",
|
||||
"storejs": "^1.0.25",
|
||||
"vue": "2.6.10",
|
||||
"vue-i18n": "^8.12.0",
|
||||
"vue-router": "3.0.6",
|
||||
"vuedraggable": "^2.20.0",
|
||||
"vuex": "3.1.0",
|
||||
|
@ -6,6 +6,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
<script src="/static/inflate.min.js"></script>
|
||||
<script src="/static/three.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
@ -7,5 +7,6 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
@ -27,14 +27,14 @@ export function deleteQuest(id) {
|
||||
export function getQuestById(id) {
|
||||
return request({
|
||||
url: `/api/quest/${id}`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
/** 根据id查询任务基础信息 */
|
||||
export function getQuestByIdList(id) {
|
||||
return request({
|
||||
url: `/api/quest/${id}/detail`,
|
||||
method: 'get'
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
/** 更新任务基本信息 */
|
||||
@ -45,3 +45,11 @@ export function updateQuest(id, data) {
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 更新任务地图定位信息 */
|
||||
export function updateMapLocation(id, data) {
|
||||
return request({
|
||||
url: `/api/quest/${id}/mapLocation`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -368,3 +368,20 @@ export function getSimulationInfo(group) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/** 获取可用的设备指令*/
|
||||
export function getAvailableDeviceCommand() {
|
||||
return request({
|
||||
url: `/api/simulation/deviceCommand/available`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/** 保存/修改任务剧本*/
|
||||
export function saveTaskScript(group,data) {
|
||||
return request({
|
||||
url: `/api/simulation/${group}/questRecord/script`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
7
src/i18n/index.js
Normal file
7
src/i18n/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
import en from './langs/en';
|
||||
import zh from './langs/zh';
|
||||
|
||||
export default {
|
||||
en,
|
||||
zh
|
||||
};
|
5
src/i18n/langs/en.js
Normal file
5
src/i18n/langs/en.js
Normal file
@ -0,0 +1,5 @@
|
||||
import enLocale from 'element-ui/lib/locale/lang/en';
|
||||
|
||||
export default {
|
||||
...enLocale
|
||||
};
|
5
src/i18n/langs/zh.js
Normal file
5
src/i18n/langs/zh.js
Normal file
@ -0,0 +1,5 @@
|
||||
import cnLocale from 'element-ui/lib/locale/lang/zh-CN';
|
||||
|
||||
export default {
|
||||
...cnLocale
|
||||
};
|
@ -1,10 +1,4 @@
|
||||
export function SetRender(dom) {
|
||||
console.log(dom.clientWidth);
|
||||
console.log(dom.clientHeight);
|
||||
console.log(dom.innerWidth);
|
||||
console.log(dom.innerHeight);
|
||||
console.log(dom.offsetWidth);
|
||||
console.log(dom.offsetHeight);
|
||||
var renderer = new THREE.WebGLRenderer({antialias: true});
|
||||
renderer.setSize(dom.offsetWidth, dom.offsetHeight);
|
||||
//renderer.setSize( window.innerWidth, window.innerHeight );
|
||||
|
@ -16,7 +16,7 @@ export default class defaultStyle {
|
||||
this.textFontSize = 10;
|
||||
|
||||
/** 默认字体 族类*/
|
||||
this.fontFamily = 'consolas';
|
||||
this.fontFamily = '宋体';
|
||||
|
||||
/** 默认字体颜色*/
|
||||
this.textFontColor = '#C0C0C0';
|
||||
|
@ -1,8 +1,8 @@
|
||||
const mapDeviceStyle = {
|
||||
'01': 'chengdu_04',
|
||||
'02': 'fuzhou_01',
|
||||
// '03': 'bejing_01',
|
||||
'03': 'chengdu_03',
|
||||
'03': 'bejing_01',
|
||||
'04': 'chengdu_03',
|
||||
'05': 'batong_01' // 暂时没有画北京八通线
|
||||
};
|
||||
|
||||
|
@ -6,8 +6,8 @@ class SkinStyle extends defaultStyle {
|
||||
super();
|
||||
this[deviceType.Link] = {
|
||||
lineWidthColor: '#FFFFFF', // line 颜色
|
||||
linkWidth: 4.4, // link 宽度
|
||||
linkColor: '#3F3F3F', // link 线条颜色
|
||||
linkWidth: 4, // link 宽度
|
||||
linkColor: '#4e8de6', // link 线条颜色
|
||||
linkTextColor: '#FFFFFF' // link 字体颜色
|
||||
};
|
||||
|
||||
@ -17,12 +17,12 @@ class SkinStyle extends defaultStyle {
|
||||
distance: 10, // 文字离区段距离
|
||||
fontSize: 12, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
fontColor: 'lightgreen', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
logicText: {
|
||||
logicText: { // 逻辑区段名称
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 12, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
@ -32,7 +32,7 @@ class SkinStyle extends defaultStyle {
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
standText: {
|
||||
standText: { // 站台
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 24, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
@ -42,7 +42,7 @@ class SkinStyle extends defaultStyle {
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
reentryText: {
|
||||
reentryText: { // 折返
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 36, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
@ -52,7 +52,7 @@ class SkinStyle extends defaultStyle {
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
transferText: {
|
||||
transferText: { // 转换轨
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 36, // 文字离区段距离
|
||||
fontSize: 11, // 字体大小
|
||||
@ -62,7 +62,7 @@ class SkinStyle extends defaultStyle {
|
||||
textPosition: 'inside', // 文字位置
|
||||
textVerticalAlign: 'middle' // 文字垂直对齐方式
|
||||
},
|
||||
destinationText: {
|
||||
destinationText: { // 目的地
|
||||
opposite: true, // 对称相反
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 12, // 文字离区段距离
|
||||
@ -78,25 +78,25 @@ class SkinStyle extends defaultStyle {
|
||||
beyondWidth: 0, // 区段宽超出宽度
|
||||
invadeColor: '#FFFFFF', // 区段侵入颜色
|
||||
spareColor: '#5578B6', // 区段空闲颜色
|
||||
communicationOccupiedColor: '#FF00FF', // 区段通信车占用颜色
|
||||
unCommunicationOccupiedColor: '#DE310C', // 区段非通讯车占用颜色
|
||||
routeLockColor: '#FFFFFF', // 区段路由锁定颜色
|
||||
faultLockColor: '#006400', // 区段故障锁定颜色
|
||||
communicationOccupiedColor: 'lightpink', // 区段通信车占用颜色
|
||||
unCommunicationOccupiedColor: 'red', // 区段非通讯车占用颜色
|
||||
routeLockColor: 'rgba(0, 255, 0, 1)', // 区段路由锁定颜色
|
||||
faultLockColor: 'white', // 区段故障锁定颜色
|
||||
undefinedColor: '#0071C1', // 区段未定义颜色
|
||||
protectionLockedColor: '#FFFFFF', // 保护区段锁闭
|
||||
blockColor: '#00FF00', // 区段封锁颜色
|
||||
blockColor: 'pink', // 区段封锁颜色
|
||||
atcExcisionColor: '#A0522D', // 区段atc切除颜色
|
||||
atsExcisionColor: '#A0522D', // 区段ats切除颜色
|
||||
timeReleaseColor: '#3F3F3F', // 区段延时释放颜色
|
||||
protectiveLockColor: '#FFFF00', // 区段保护锁闭
|
||||
protectiveLockColor: '#92D14F', // 区段保护锁闭
|
||||
protectiveTimeReleaseColor: '#0071C1', // 区段保护延时解锁
|
||||
logicalColor: '#FFFF00', // 逻辑区段颜色 (未用)
|
||||
logicalTextColor: '#C0C0C0' // 逻辑区段名称颜色 (未用)
|
||||
logicalTextColor: 'white' // 逻辑区段名称颜色 (未用)
|
||||
},
|
||||
axle: {
|
||||
radius: 3, // 计轴 半径
|
||||
distance: 5, // 计轴和区段之间的距离 (未用)
|
||||
color: '#C0C0C0', // 区段计轴颜色
|
||||
color: 'white', // 区段计轴颜色
|
||||
resetColor: '#00FFFF', // 区段计轴预复位颜色
|
||||
Failure: '#E6A23C' // #FFFF00 计轴失效
|
||||
},
|
||||
@ -118,17 +118,14 @@ class SkinStyle extends defaultStyle {
|
||||
width: 1.5, // 分隔符宽度
|
||||
endWidth: 1.5, // 尽头分隔符宽度
|
||||
endColor: '#FFFFFF', // 尽头分隔符颜色
|
||||
color: '#FFFFFF' // 区段边界符颜色
|
||||
},
|
||||
shuttleBack: { // 折返进路 (存在此对象 显示折返箭头)
|
||||
distance: 5 // 限速线距离区段距离
|
||||
color: 'white' // 区段边界符颜色
|
||||
}
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
distance: 10, // 设备距离区段的距离
|
||||
distance: 3, // 设备距离区段的距离
|
||||
post: {
|
||||
standardColor: '#FFFFFF', // 灯柱颜色
|
||||
standardColor: '#C0C0C0', // 灯柱颜色
|
||||
standardWidth: 2 // 灯柱宽度
|
||||
},
|
||||
text: {
|
||||
@ -137,7 +134,7 @@ class SkinStyle extends defaultStyle {
|
||||
isAlignCenter: false, // 信号字体对其方式
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
defaultColor: 'white', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
checkColor: '#00FF00' // 信号保护区段检查颜色
|
||||
},
|
||||
@ -146,12 +143,12 @@ class SkinStyle extends defaultStyle {
|
||||
stopWidth: 2, // 禁止线宽度
|
||||
borderWidth: 2, // 信号灯边框线宽度
|
||||
borderColor: '#3149C3', // 信号灯边框线颜色
|
||||
radiusR: 6, // 信号灯半径
|
||||
radiusR: 3, // 信号灯半径
|
||||
blockColor: '#EF0C08', // 信号灯锁闭
|
||||
grayColor: '#7F7F7F', // 信号灯灰色
|
||||
redColor: '#FF0000', // 信号灯红色
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
grayColor: '#C0C0C0', // 信号灯灰色
|
||||
redColor: 'red', // 信号灯红色
|
||||
greenColor: 'green', // 信号灯绿色
|
||||
yellowColor: 'yellow', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
},
|
||||
@ -181,7 +178,7 @@ class SkinStyle extends defaultStyle {
|
||||
distance: 5, // 信号灯按钮距离区段的距离
|
||||
borderDashColor: '#FFFFFF', // 信号灯按钮边线
|
||||
buttonColor: 'darkgreen', // 信号灯按钮颜色
|
||||
buttonLightenColor: '#E4EF50' // 信号灯按钮闪烁颜色
|
||||
buttonLightenColor: 'yellow' // 信号灯按钮闪烁颜色
|
||||
}
|
||||
};
|
||||
|
||||
@ -192,21 +189,21 @@ class SkinStyle extends defaultStyle {
|
||||
},
|
||||
safetyDoor: { // 屏蔽门
|
||||
height: 3, // 站台屏蔽门高度
|
||||
distance: 8, // 站台和屏蔽门之间的距离
|
||||
defaultColor: '#00FF00', // 屏蔽门默认颜色
|
||||
splitDoorColor: '#C00808' // 屏蔽门切除颜色
|
||||
distance: 4, // 站台和屏蔽门之间的距离
|
||||
defaultColor: 'green', // 屏蔽门默认颜色
|
||||
splitDoorColor: 'green' // 屏蔽门切除颜色
|
||||
},
|
||||
stand: { // 站台
|
||||
headFontSize: 10, // 站台首端字体大小
|
||||
spareColor: '#808080', // 站台空闲颜色
|
||||
stopColor: '#FFF000', // 站台列车停站颜色
|
||||
jumpStopColor: '#808080', // 站台跳停颜色
|
||||
designatedJumpStopColor: '#808080' // 站台指定列车跳停颜色
|
||||
spareColor: 'white', // 站台空闲颜色
|
||||
stopColor: 'yellow', // 站台列车停站颜色
|
||||
jumpStopColor: 'blue', // 站台跳停颜色
|
||||
designatedJumpStopColor: 'lightSkyBlue' // 站台指定列车跳停颜色
|
||||
},
|
||||
standEmergent: { // 紧急关闭
|
||||
mergentR: 4, // 站台紧急关闭半径
|
||||
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
|
||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||
closeColor: 'red' // 站台紧急关闭颜色
|
||||
},
|
||||
reentry: { // 站台折返策略
|
||||
position: 0, // 折返方向
|
||||
@ -218,15 +215,15 @@ class SkinStyle extends defaultStyle {
|
||||
text: '扣', // 扣车显示内容
|
||||
position: -1, // 扣车方向
|
||||
offset: {x: -8, y: -20}, // 扣车偏移量
|
||||
trainColor: '#FFFF00', // 车站扣车颜色
|
||||
centerTrainColor: '#C0C0C0', // 中心扣车颜色
|
||||
andCenterTrainColor: '#C0C0C0', // 车站+中心扣车颜色
|
||||
trainColor: 'yellow', // 车站扣车颜色
|
||||
centerTrainColor: 'white', // 中心扣车颜色
|
||||
andCenterTrainColor: 'red', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50' // 车站扣除文字颜色
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
position: 1, // 运行时间方向
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0' // 停站时间字体颜色
|
||||
textColor: 'white' // 停站时间字体颜色
|
||||
},
|
||||
jump: {
|
||||
text: '跳', // 停跳显示内容
|
||||
@ -247,7 +244,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.StationControl] = {
|
||||
text: {
|
||||
distance: 2, // 灯和文字之间的距离
|
||||
fontSize: 11, // 字体大小
|
||||
fontSize: 12, // 字体大小
|
||||
fontFormat: 'consolas', // 字体格式
|
||||
fontColor: '#ffffff', // 字体颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
@ -257,15 +254,15 @@ class SkinStyle extends defaultStyle {
|
||||
lamp: {
|
||||
count: 4, // 控制模式的个数
|
||||
offset: {x: 0, y: 0}, // 偏移量
|
||||
radiusR: 6, // 控制模式灯的半径
|
||||
radiusR: 4, // 控制模式灯的半径
|
||||
distance: 36, // 控制模式之间灯之间的距离
|
||||
grayColor: '#7F7F7F', // 控制模式灰色
|
||||
greenColor: '#00FF00', // 控制模式绿色
|
||||
redColor: '#FF0000', // 控制模式红色
|
||||
yellowColor: '#FFFF00' // 控制模式黄色
|
||||
grayColor: '#C0C0C0', // 控制模式灰色
|
||||
greenColor: 'green', // 控制模式绿色
|
||||
redColor: 'red', // 控制模式红色
|
||||
yellowColor: 'yellow' // 控制模式黄色
|
||||
},
|
||||
arrow: {
|
||||
show: true // 控制模式箭头显隐
|
||||
show: false // 控制模式箭头显隐
|
||||
}
|
||||
};
|
||||
|
||||
@ -296,13 +293,13 @@ class SkinStyle extends defaultStyle {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#C00808', // 道岔失去颜色
|
||||
locateColor: '#00FF00', // 道岔定位颜色
|
||||
inversionColor: '#FFFF00', // 道岔反位颜色
|
||||
lossColor: 'lightgreen', // 道岔失去颜色
|
||||
locateColor: 'lightgreen', // 道岔定位颜色
|
||||
inversionColor: 'lightgreen', // 道岔反位颜色
|
||||
monolockColor: '#FFFFFF' // 道岔单锁颜色
|
||||
},
|
||||
core: {
|
||||
length: 6 // 道岔单边长度
|
||||
length: 10 // 道岔单边长度
|
||||
},
|
||||
monolock: { // 道岔单锁配置
|
||||
locationColor: '#00FF00', // 道岔单锁'定位'颜色 (绿色)
|
||||
@ -378,7 +375,7 @@ class SkinStyle extends defaultStyle {
|
||||
hsda: {
|
||||
lrPaddingHSDA: 3, // HSDA两边间隔
|
||||
upPaddingHSDA: 4, // HSDA上边距离
|
||||
trainHSDATextFontSize: 9, // 列车HDSA字号
|
||||
trainHSDATextFontSize: 8, // 列车HDSA字号
|
||||
textHContent: '扣', // textH文本
|
||||
textSContent: '跳', // textS文本
|
||||
textDContent: '门', // textD文本
|
||||
@ -406,19 +403,19 @@ class SkinStyle extends defaultStyle {
|
||||
trainTargetNumberOffset: {x: 0, y: 0}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
|
||||
trainConntWidth: 3, // 列车竖杠的宽度
|
||||
trainConntWidth: 4, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||
trainHeadRectHeight: 20 // 列车车头矩形高度
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
trainHeadDistance: 4, // 列车和车头之间的间距
|
||||
trainWidth: 48, // 列车长度
|
||||
trainTextFontSize: 12, // 列车字号
|
||||
trainHeadDistance: 2, // 列车和车头之间的间距
|
||||
trainWidth: 55, // 列车长度
|
||||
trainTextFontSize: 16, // 列车字号
|
||||
fontFamily: 'consolas', // 默认字体 族类
|
||||
haveTextHSDA: true, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
|
@ -15,7 +15,7 @@ class SkinStyle extends defaultStyle {
|
||||
text: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 18, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
@ -35,7 +35,7 @@ class SkinStyle extends defaultStyle {
|
||||
standText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 28, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
@ -45,7 +45,7 @@ class SkinStyle extends defaultStyle {
|
||||
reentryText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 28, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
@ -55,7 +55,7 @@ class SkinStyle extends defaultStyle {
|
||||
transferText: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 28, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
fontColor: '#FFFFFF', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
@ -66,7 +66,7 @@ class SkinStyle extends defaultStyle {
|
||||
opposite: true, // 对称相反
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
distance: 10, // 文字离区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'bold', // 字体粗细
|
||||
fontColor: 'yellow', // 字体颜色
|
||||
textAlign: 'center', // 水平对齐方式
|
||||
@ -125,7 +125,7 @@ class SkinStyle extends defaultStyle {
|
||||
distance: 0, // 文字和灯杆的距离
|
||||
isNoRotation: true, // 是否禁止旋转
|
||||
isAlignCenter: true, // 信号字体对其方式
|
||||
fontSize: 10, // 信号机名称字体大小
|
||||
fontSize: 11, // 信号机名称字体大小
|
||||
fontWeight: 'bold', // 信号机名称字体粗细
|
||||
defaultColor: '#FFFFFF', // 信号灯字体默认色
|
||||
blockColor: '#EF0C08', // 信号灯字体锁定颜色
|
||||
@ -162,7 +162,7 @@ class SkinStyle extends defaultStyle {
|
||||
delay: {
|
||||
direction: true, // 延时解锁方向
|
||||
offset: { x: 15, y: -10}, // 延时解锁偏移量
|
||||
fontSize: 9, // 延迟解锁字体大小
|
||||
fontSize: 11, // 延迟解锁字体大小
|
||||
fontColor: '#FF0000', // 延迟解锁颜色
|
||||
fontWeight: 'bold' // 字体粗细
|
||||
},
|
||||
@ -176,7 +176,7 @@ class SkinStyle extends defaultStyle {
|
||||
|
||||
this[deviceType.StationStand] = {
|
||||
common: { // 通用属性
|
||||
textFontSize: 10 // 站台默认字体大小
|
||||
textFontSize: 11 // 站台默认字体大小
|
||||
},
|
||||
safetyDoor: { // 屏蔽门
|
||||
height: 3, // 站台屏蔽门高度
|
||||
@ -185,7 +185,7 @@ class SkinStyle extends defaultStyle {
|
||||
splitDoorColor: '#F61107' // 屏蔽门切除颜色
|
||||
},
|
||||
stand: { // 站台
|
||||
headFontSize: 10, // 站台首端字体大小
|
||||
headFontSize: 11, // 站台首端字体大小
|
||||
spareColor: '#606060', // 站台空闲颜色
|
||||
stopColor: '#FEFE00', // 站台列车停站颜色
|
||||
jumpStopColor: '#9A99FF', // 站台跳停颜色
|
||||
@ -226,7 +226,7 @@ class SkinStyle extends defaultStyle {
|
||||
this[deviceType.StationControl] = {
|
||||
text: {
|
||||
distance: 2, // 灯和文字之间的距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontFormat: 'consolas', // 字体格式
|
||||
fontColor: '#ffffff', // 字体颜色
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
@ -272,7 +272,7 @@ class SkinStyle extends defaultStyle {
|
||||
text: {
|
||||
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
|
||||
offset: {x: 0, y: 8}, // 道岔名称与区段距离
|
||||
fontSize: 10, // 字体大小
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
borderColor: '#FE0000', // 道岔边框颜色
|
||||
lossColor: '#FFFFFF', // 道岔失去颜色
|
||||
@ -367,7 +367,7 @@ class SkinStyle extends defaultStyle {
|
||||
trainWidth: 76, // 列车长度
|
||||
trainTextFontSize: 15, // 列车字号
|
||||
fontFamily: '宋体', // 默认字体 族类
|
||||
nameFontSize: 10, // 字体大小
|
||||
nameFontSize: 11, // 字体大小
|
||||
haveTextHSDA: false, // 是否需创建textHSDA对象
|
||||
haveArrowText: true, // 是否需创建arrowText对象
|
||||
haveTrainBorder: false// 是否需创建trainBorder对象
|
||||
|
@ -20,8 +20,9 @@ export default class Switch extends Group {
|
||||
this.style = style;
|
||||
this.zlevel = model.zlevel;
|
||||
this.z = 6;
|
||||
this.triangle = new JTriangle(model.intersection, model.skew);
|
||||
this.create();
|
||||
this._createLockRect(); // 创建单锁矩形框显示
|
||||
this.createLockRect(); // 创建单锁矩形框显示
|
||||
this.createMouseEvent();
|
||||
this.setState(model);
|
||||
}
|
||||
@ -40,8 +41,6 @@ export default class Switch extends Group {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
this.triangle = new JTriangle(model.intersection, model.skew);
|
||||
|
||||
let halfWidth = style.Section.line.width / 2;
|
||||
const switchWidth = style.Section.line.width + style.Section.line.beyondWidth*2 + 0.8;
|
||||
const swPadding = style.Switch.core.length;
|
||||
@ -147,7 +146,7 @@ export default class Switch extends Group {
|
||||
this.add(this.name);
|
||||
}
|
||||
|
||||
_createLockRect() {
|
||||
createLockRect() {
|
||||
const offsetX = this.model.locateType == '01' ? 3 : 0;
|
||||
this.lockRect = new ELockRect({
|
||||
zlevel: this.zlevel,
|
||||
|
@ -20,7 +20,7 @@ class EMouse extends Group {
|
||||
// 文字描述
|
||||
this.arrowText = new Text({
|
||||
zlevel: this.device.model.zlevel,
|
||||
z: this.device.model.z,
|
||||
z: this.device.model.z + 10,
|
||||
style: {
|
||||
x: this.device.model.point.x + 50,
|
||||
y: this.device.model.point.y + 25,
|
||||
|
@ -560,10 +560,12 @@ export function trainMenuFiltration(menuObj) {
|
||||
/**
|
||||
* 离开菜单以及执行完菜单取消选中状态
|
||||
*/
|
||||
export function mouseCancelState(device) {
|
||||
const instance = (Vue.prototype.$jlmap.getDeviceByCode(device.code) || {}).instance;
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent['mouseout']) {
|
||||
instance.mouseEvent['down'] = false;
|
||||
instance.mouseEvent['mouseout'](Vue.prototype.$jlmap.$zr.curEvent);
|
||||
export function mouseCancelState(selected) {
|
||||
const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
|
||||
const instance = (device || {}).instance;
|
||||
debugger;
|
||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
||||
device['down'] = false;
|
||||
instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,23 @@
|
||||
<template>
|
||||
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
|
||||
<div class="left">
|
||||
<div :id="runPlanId"></div>
|
||||
<div :id="runPlanId" />
|
||||
</div>
|
||||
<div class="right">
|
||||
<data-table ref="serviceTable" :height="height/2" :config="serviceNumberConfig" @touch="scheduleTouch"
|
||||
:style="{top: top-height/2+'px'}"></data-table>
|
||||
<data-table ref="tripTable" :height="height/2" :config="tripNumberConfig" @touch="trainNumTouch"
|
||||
:style="{top: top-height/2+'px'}"></data-table>
|
||||
<data-table
|
||||
ref="serviceTable"
|
||||
:height="height/2"
|
||||
:config="serviceNumberConfig"
|
||||
:style="{top: top-height/2+'px'}"
|
||||
@touch="scheduleTouch"
|
||||
/>
|
||||
<data-table
|
||||
ref="tripTable"
|
||||
:height="height/2"
|
||||
:config="tripNumberConfig"
|
||||
:style="{top: top-height/2+'px'}"
|
||||
@touch="trainNumTouch"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -21,6 +31,9 @@
|
||||
|
||||
export default {
|
||||
name: 'PlanSchedule',
|
||||
components: {
|
||||
DataTable
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
@ -39,9 +52,6 @@
|
||||
required: true
|
||||
}
|
||||
},
|
||||
components: {
|
||||
DataTable
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
top: 0,
|
||||
@ -58,7 +68,7 @@
|
||||
columns: [
|
||||
{
|
||||
prop: 'serviceNumber',
|
||||
label: '表号',
|
||||
label: '表号'
|
||||
},
|
||||
{
|
||||
width: 40
|
||||
@ -73,7 +83,7 @@
|
||||
columns: [
|
||||
{
|
||||
prop: 'tripNumber',
|
||||
label: '车次号',
|
||||
label: '车次号'
|
||||
},
|
||||
{
|
||||
width: 40
|
||||
@ -111,7 +121,7 @@
|
||||
type: 'cross'
|
||||
},
|
||||
formatter: this.axisTooltip,
|
||||
borderWidth: 1,
|
||||
borderWidth: 1
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
@ -136,7 +146,7 @@
|
||||
label: {
|
||||
formatter: this.xAxisPointFormat,
|
||||
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||
color: 'white',
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -147,7 +157,7 @@
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
@ -158,23 +168,23 @@
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 'auto',
|
||||
formatter: this.yAxisLableFormat,
|
||||
formatter: this.yAxisLableFormat
|
||||
},
|
||||
axisPointer: {
|
||||
xAxisIndex: 'all',
|
||||
label: {
|
||||
formatter: this.yAxisPointFormat,
|
||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||
color: 'white',
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
min: 0,
|
||||
max: 0,
|
||||
max: 0
|
||||
},
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
type: 'inside'
|
||||
},
|
||||
{
|
||||
fiterMode: 'filter',
|
||||
@ -193,7 +203,12 @@
|
||||
},
|
||||
absoluteTime: 2 * 3600,
|
||||
indexKmRangeMap: {}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
maxWidth() {
|
||||
@ -209,24 +224,19 @@
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
},
|
||||
'$store.state.runPlan.select.serviceNumber': function (val) {
|
||||
let index = this.serviceNumberConfig.data.findIndex(elem => {
|
||||
const index = this.serviceNumberConfig.data.findIndex(elem => {
|
||||
return elem.serviceNumber == val;
|
||||
})
|
||||
});
|
||||
|
||||
this.$refs.serviceTable.setCurrentRow(this.serviceNumberConfig.data[index]);
|
||||
},
|
||||
'$store.state.runPlan.select.tripNumber': function (val) {
|
||||
let index = this.tripNumberConfig.data.findIndex(elem => {
|
||||
const index = this.tripNumberConfig.data.findIndex(elem => {
|
||||
return elem.tripNumber == val;
|
||||
})
|
||||
});
|
||||
this.$refs.tripTable.setCurrentRow(this.tripNumberConfig.data[index]);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.skinStyle);
|
||||
},
|
||||
@ -237,7 +247,7 @@
|
||||
serviceNumberChange(row) {
|
||||
if (row) {
|
||||
this.$store.dispatch('runPlan/setSelected', { serviceNumber: row.serviceNumber, tripNumber: null });
|
||||
let serviceObj = this.$store.state.runPlan.editData[row.serviceNumber]
|
||||
const serviceObj = this.$store.state.runPlan.editData[row.serviceNumber];
|
||||
if (serviceObj) {
|
||||
this.analyticalTripNumber(serviceObj.trainMap);
|
||||
}
|
||||
@ -250,24 +260,24 @@
|
||||
},
|
||||
async analyticalServiceNumber(data) {
|
||||
this.serviceNumberConfig.data = Object.keys(data || {})
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex })
|
||||
.map(serviceNumber => { return { serviceNumber } });
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||
.map(serviceNumber => { return { serviceNumber }; });
|
||||
},
|
||||
async analyticalTripNumber(data) {
|
||||
this.tripNumberConfig.data = Object.keys(data || {})
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex })
|
||||
.map(tripNumber => { return { tripNumber } });
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||
.map(tripNumber => { return { tripNumber }; });
|
||||
},
|
||||
async setPosition() {
|
||||
this.$nextTick(() => {
|
||||
let top = 3;
|
||||
let width = this.maxWidth * 0.85;
|
||||
const width = this.maxWidth * 0.85;
|
||||
let height = this.maxHeight;
|
||||
|
||||
let titleBar = document.getElementById('PlanTitleBar');
|
||||
let menuBar = document.getElementById('PlanMenuBar');
|
||||
let menuTool = document.getElementById('PlanMenuTool');
|
||||
let statusBar = document.getElementById('PlanStatusBar');
|
||||
const titleBar = document.getElementById('PlanTitleBar');
|
||||
const menuBar = document.getElementById('PlanMenuBar');
|
||||
const menuTool = document.getElementById('PlanMenuTool');
|
||||
const statusBar = document.getElementById('PlanStatusBar');
|
||||
|
||||
if (titleBar) {
|
||||
top += (titleBar.offsetHeight || 0);
|
||||
@ -295,13 +305,13 @@
|
||||
if (this.height != height) {
|
||||
this.height = height - 20 * 2;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
async loadChartPage() {
|
||||
try {
|
||||
let series = [];
|
||||
let stations = this.$store.state.runPlan.stations;
|
||||
let planData = this.$store.state.runPlan.planData;
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
|
||||
this.viewDisabled = true;
|
||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||
@ -329,7 +339,7 @@
|
||||
if (elem) {
|
||||
series.push(elem);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
return series;
|
||||
@ -337,11 +347,11 @@
|
||||
popModels(series, models) {
|
||||
if (models && models.length) {
|
||||
models.forEach(elem => {
|
||||
let index = series.indexOf(elem);
|
||||
const index = series.indexOf(elem);
|
||||
if (index >= 0) {
|
||||
series.split(index, 1);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
return series;
|
||||
@ -349,7 +359,7 @@
|
||||
loadInitChart(series) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
let that = this;
|
||||
const that = this;
|
||||
// 加载echart配置
|
||||
require.config(
|
||||
{
|
||||
@ -362,13 +372,13 @@
|
||||
require(
|
||||
[
|
||||
'echarts',
|
||||
'echarts/lib/chart/line',
|
||||
'echarts/lib/chart/line'
|
||||
],
|
||||
function (ec) {
|
||||
that.destroy();
|
||||
|
||||
let startValue = 3600 + that.PlanConvert.TranslationTime;
|
||||
let offsetTime = 3600;
|
||||
const offsetTime = 3600;
|
||||
|
||||
runDiagramGetTime(that.group).then(resp => {
|
||||
startValue = resp.data - that.PlanConvert.TranslationTime;
|
||||
@ -381,7 +391,7 @@
|
||||
that.reSize({ width: that.$store.state.runPlan.width, height: that.$store.state.runPlan.height });
|
||||
that.myChart.on('click', that.mouseClick);
|
||||
}
|
||||
})
|
||||
});
|
||||
resolve(true);
|
||||
}
|
||||
);
|
||||
@ -405,13 +415,13 @@
|
||||
return '';
|
||||
},
|
||||
xAxisInit() {
|
||||
let list = [];
|
||||
const list = [];
|
||||
for (var time = 0 + this.PlanConvert.TranslationTime; time < 3600 * 24 + this.PlanConvert.TranslationTime; time++) {
|
||||
list.push(time);
|
||||
}
|
||||
|
||||
let startValue = 3600 * 6;
|
||||
let offsetTime = 3600 * 1;
|
||||
const startValue = 3600 * 6;
|
||||
const offsetTime = 3600 * 1;
|
||||
|
||||
this.option.xAxis[0].data = list;
|
||||
if (!this.option.dataZoom[0].startValue) {
|
||||
@ -429,7 +439,7 @@
|
||||
}
|
||||
},
|
||||
axisTooltip(param) {
|
||||
let station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
||||
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
||||
return [
|
||||
`Point Data <hr size=1 style=" margin: 3px 0">`,
|
||||
`车站名称: ${station.name}<br>`,
|
||||
@ -438,9 +448,9 @@
|
||||
].join('');
|
||||
},
|
||||
mouseClick(params) {
|
||||
let model = {
|
||||
const model = {
|
||||
serviceNumber: params.seriesName
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('runPlan/setSelected', model);
|
||||
},
|
||||
reSize(opt) {
|
||||
@ -465,7 +475,7 @@
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,326 +0,0 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm train-control" :title="title" :visible.sync="show" width="480px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div class="el-dialog-div">
|
||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="this.operation != '70c'" prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-else prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车组号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option v-for="train in trainList" :key="train.groupNumber" :label="train.groupNumber"
|
||||
:value="train.groupNumber">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item v-if="this.operation == '708'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="this.operation == '70c'" prop="targetCode">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="this.operation == '708'" prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="this.operation == '70c'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item v-if="this.operation == '70c'" prop="trainType">
|
||||
<span slot="label">运行模式</span>
|
||||
<br/>
|
||||
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
|
||||
<el-radio :label="'01'">普通</el-radio>
|
||||
<el-radio :label="'02'">专列</el-radio>
|
||||
<el-radio :label="'03'">不停站直达</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-train ref="confirmTrain"></confirm-train>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
components: {
|
||||
ConfirmTrain,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
sectionCode:'',
|
||||
trainWindowCode:'',
|
||||
groupNumber:'',
|
||||
serviceNumber:'',
|
||||
targetCode:'',
|
||||
trainCode:'',
|
||||
runningMode:'',
|
||||
},
|
||||
|
||||
rules: {
|
||||
stationName: [
|
||||
{ required: true, message: '请输入车站', trigger: 'blur'}
|
||||
],
|
||||
sectionCode: [
|
||||
{ required: true, message: '请输入轨道', trigger: 'blur'}
|
||||
],
|
||||
trainWindowCode:[
|
||||
{ required: true, message: '请输入车次窗', trigger: 'blur'}
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: '请选择车组号', trigger: 'change' }
|
||||
],
|
||||
serviceNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
||||
],
|
||||
targetCode: [
|
||||
{ required: true, message: '请输入目的地号', trigger: 'blur'}
|
||||
],
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入序列号', trigger: 'blur'}
|
||||
],
|
||||
runningMode: [
|
||||
{ required: true, message: '请选择运行模式', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
direction: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
/*设目的地*/
|
||||
return OperationEvent.Train.destinationTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
|
||||
/*设计划车*/
|
||||
return OperationEvent.Train.setPlanTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
|
||||
/*设人工车*/
|
||||
return OperationEvent.Train.artificialTrainId.menu.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
title() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
return '设目的地车';
|
||||
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ){
|
||||
return '设计划车';
|
||||
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ){
|
||||
return '设人工车';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinStyle).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(error => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.addModel = {
|
||||
tripNumber: '',
|
||||
groupNumber: '',
|
||||
trainType: '01',
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
};
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
|
||||
this.destinationTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
this.setPlanTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
this.artificialTrainId();
|
||||
}
|
||||
},
|
||||
//设目的地车
|
||||
destinationTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation,
|
||||
message: [`设目的地车:成功`],
|
||||
val: '',
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
//设计划车
|
||||
setPlanTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
message: [`设计划车:成功`],
|
||||
val: '',
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
//设人工车
|
||||
artificialTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation,
|
||||
message: [`设人工车:成功`],
|
||||
val: '',
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
342
src/jmap/theme/chengdu_03/menus/dialog/trainControl.vue
Normal file
342
src/jmap/theme/chengdu_03/menus/dialog/trainControl.vue
Normal file
@ -0,0 +1,342 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm train-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation != '70c'" prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else prop="trainWindowCode">
|
||||
<span slot="label">车次窗</span>
|
||||
<el-input v-model="addModel.trainWindowCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="车组号:" prop="groupNumber">
|
||||
<el-select v-model="addModel.groupNumber" filterable>
|
||||
<el-option
|
||||
v-for="train in trainList"
|
||||
:key="train.groupNumber"
|
||||
:label="train.groupNumber"
|
||||
:value="train.groupNumber"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item v-if="operation == '708'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetCode" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item v-if="operation == '708'" prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" />
|
||||
</el-form-item>
|
||||
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item v-if="operation == '70c'" prop="trainType">
|
||||
<span slot="label">运行模式</span>
|
||||
<br>
|
||||
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
|
||||
<el-radio :label="'01'">普通</el-radio>
|
||||
<el-radio :label="'02'">专列</el-radio>
|
||||
<el-radio :label="'03'">不停站直达</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-train ref="confirmTrain" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { getPublishTrainList } from '@/api/jmap/map';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
components: {
|
||||
ConfirmTrain,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
sectionCode: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
serviceNumber: '',
|
||||
targetCode: '',
|
||||
trainCode: '',
|
||||
runningMode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
stationName: [
|
||||
{ required: true, message: '请输入车站', trigger: 'blur'}
|
||||
],
|
||||
sectionCode: [
|
||||
{ required: true, message: '请输入轨道', trigger: 'blur'}
|
||||
],
|
||||
trainWindowCode: [
|
||||
{ required: true, message: '请输入车次窗', trigger: 'blur'}
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: '请选择车组号', trigger: 'change' }
|
||||
],
|
||||
serviceNumber: [
|
||||
{ required: true, message: '请输入服务号', trigger: 'blur'}
|
||||
],
|
||||
targetCode: [
|
||||
{ required: true, message: '请输入目的地号', trigger: 'blur'}
|
||||
],
|
||||
trainCode: [
|
||||
{ required: true, message: '请输入序列号', trigger: 'blur'}
|
||||
],
|
||||
runningMode: [
|
||||
{ required: true, message: '请选择运行模式', trigger: 'blur'}
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
direction: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
/* 设目的地*/
|
||||
return OperationEvent.Train.destinationTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
|
||||
/* 设计划车*/
|
||||
return OperationEvent.Train.setPlanTrainId.menu.domId;
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
|
||||
/* 设人工车*/
|
||||
return OperationEvent.Train.artificialTrainId.menu.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
|
||||
return '设目的地车';
|
||||
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
return '设计划车';
|
||||
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
return '设人工车';
|
||||
}
|
||||
return '';
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
getPublishTrainList(map.skinStyle).then(resp => {
|
||||
this.trainList = resp.data;
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取列车车组号失败`);
|
||||
});
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.addModel = {
|
||||
tripNumber: '',
|
||||
groupNumber: '',
|
||||
trainType: '01',
|
||||
serviceNumber: '',
|
||||
targetCode: ''
|
||||
};
|
||||
/** 加载列车数据*/
|
||||
this.loadInitData(this.map);
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
|
||||
this.destinationTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
|
||||
this.setPlanTrainId();
|
||||
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
|
||||
this.artificialTrainId();
|
||||
}
|
||||
},
|
||||
// 设目的地车
|
||||
destinationTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.destinationTrainId.menu.operation,
|
||||
message: [`设目的地车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设计划车
|
||||
setPlanTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
message: [`设计划车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设人工车
|
||||
artificialTrainId() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation,
|
||||
message: [`设人工车:成功`],
|
||||
val: ''
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-dialog-div {
|
||||
height: 400px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user