This commit is contained in:
sunzhenyu 2020-06-12 16:05:05 +08:00
commit 0f92d67596
95 changed files with 2393 additions and 5129 deletions

View File

@ -1,15 +1,15 @@
<template> <template>
<div class="container"> <div class="container">
<li v-if="option.children && option.children.length" class="menu-item" :class="popClass" @mouseenter="enter($vnode.key)" @mouseleave="leave"> <li v-if="option.children && option.children.length" class="menu-item" :class="popClass" @mouseenter="enter($vnode.key)" @mouseleave="leave">
<div class="flex-box"> <div ref="flexBox" class="flex-box">
<el-button type="text" class="item" :disabled="checkDisabled(option)"> <el-button type="text" class="item" :disabled="checkDisabled(option)">
<el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }}</el-link> <el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }}</el-link>
<span v-else :style="{color: textColor(option) }">{{ option.label }}</span> <span v-else :style="{color: textColor(option) }">{{ option.label }}</span>
</el-button> </el-button>
<i class="el-icon-caret-right" /> <i class="el-icon-arrow-right" />
</div> </div>
<ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table'}"> <ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table', marginLeft: marginLeft+'px'}">
<div class="menu-pop"> <div class="menu-pop pop-menu">
<div v-show="isShow" class="arrow el-icon-arrow-down" /> <div v-show="isShow" class="arrow el-icon-arrow-down" />
<pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" @close="close" /> <pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" @close="close" />
<div v-show="isShow" class="arrow el-icon-arrow-up" /> <div v-show="isShow" class="arrow el-icon-arrow-up" />
@ -56,7 +56,7 @@ export default {
data() { data() {
return { return {
active: -1, active: -1,
allowedColor: '#666', allowedColor: '#000',
disabledColor: '#ccc' disabledColor: '#ccc'
}; };
}, },
@ -66,6 +66,9 @@ export default {
}, },
isShow() { isShow() {
return this.option.children.length > 12; return this.option.children.length > 12;
},
marginLeft() {
return this.$refs.flexBox.offsetWidth;
} }
}, },
methods: { methods: {
@ -123,7 +126,6 @@ export default {
$item-border: #909399; $item-border: #909399;
$item-disabled: #cccccc; $item-disabled: #cccccc;
$item-height: 30px; $item-height: 30px;
$item-width: 180px;
/deep/ { /deep/ {
.el-button--text { .el-button--text {
@ -137,10 +139,8 @@ export default {
.menu { .menu {
padding: 0; padding: 0;
position: absolute; position: absolute;
margin-left: $item-width - 2;
margin-top: -$item-height - 1; margin-top: -$item-height - 1;
max-height: 360px; max-height: 360px;
min-width: 800px;
overflow: auto; overflow: auto;
&-pop { &-pop {
@ -162,15 +162,13 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
flex-direction: row;
padding-right: 3px;
} }
.menu-item { .menu-item {
background: $bg; // background: $bg;
list-style: none; list-style: none;
width: $item-width;
// display: flex;
// justify-content: space-between;
// align-items: center;
} }
.menu-item:hover { .menu-item:hover {

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
export const keyboardEvents = { export const keyboardEvents = {
C: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_C'}, // 绘图复制 C: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_C'}, // 绘图复制
V: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_V'} // 绘图粘贴 V: {altKey:false, ctrlKey:true, shiftKey:false, event: 'Ctrl_V'}, // 绘图粘贴
// DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素 DELETE: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Delete'}, // 快捷删除绘图元素
// ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'} // 快捷修改绘图元素 // ENTER: {altKey:false, ctrlKey:false, shiftKey:false, event: 'Update'} // 快捷修改绘图元素
}; };

View File

@ -236,8 +236,10 @@ class Iscs {
} }
resize(opt) { resize(opt) {
// console.log(opt, 'resize');
// debugger;
this.$iscsZr.resize(opt); this.$iscsZr.resize(opt);
this.$painter.updateZrSize(opt); this.$painter.updateZrSize(opt); // 判断元素显示隐藏
} }
refresh() { refresh() {

View File

@ -17,6 +17,10 @@ export default class jetFan extends Group {
position: [this.model.point.x, this.model.point.y] position: [this.model.point.x, this.model.point.y]
}); });
this.path = createPathSvg(this.model); this.path = createPathSvg(this.model);
if (this.model.rotate) {
this.grouper.origin = [this.model.width / 2, this.model.width / 2];
this.grouper.rotation = -Math.PI / 180 * Number(this.model.rotate);
}
this.add(this.grouper); this.add(this.grouper);
this.grouper.add(this.path); this.grouper.add(this.path);
} }

View File

@ -1,4 +1,4 @@
import deviceType from './constant/deviceType'; // import deviceType from './constant/deviceType';
import {createTransform, createBoundingRect} from './utils/parser'; import {createTransform, createBoundingRect} from './utils/parser';
class TransformHandle { class TransformHandle {

View File

@ -100,7 +100,7 @@ export default class TrainBody extends Group {
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber) ? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
: model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号 : model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
const targetCode = style.Train.trainNumber.targetCodePrefix + (model.destinationCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码 const targetCode = style.Train.trainNumber.targetCodePrefix + (model.targetCode || style.Train.trainNumber.defaultTargetCode) + ''; // 目的地码
const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号 const groupNumber = style.Train.trainTargetNumber.groupNumberPrefix + (model.groupNumber || style.Train.trainTargetNumber.defaultGroupNumber) + ''; // 车组号
this.textTrainServer = new ETextName({ this.textTrainServer = new ETextName({
zlevel: model.zlevel, zlevel: model.zlevel,

View File

@ -253,7 +253,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };
@ -365,31 +365,46 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 控制模式字体颜色 fontColor: '#ffffff', // 控制模式字体颜色
fontWeight: 'normal', // 控制模式字体粗细 fontWeight: 'normal', // 控制模式字体粗细
textAlign: 'middle', // 控制模式水平对齐 textAlign: 'middle', // 控制模式水平对齐
textVerticalAlign: 'top', // 控制模式垂直对齐 textVerticalAlign: 'top' // 控制模式垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText: '紧急站控', // 紧急站控文字内容
interconnectedControlText: '连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 3, // 控制模式灯个数 count: 3, // 控制模式灯个数
offset: { x: 20, y: 0 }, // 偏移量 offset: { x: 0, y: 0 }, // 偏移量
radiusR: 6, // 控制模式灯的半径 radiusR: 6, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离 distance: 46, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色 grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色 greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色 redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色 yellowColor: '#FFFF00' // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
}, },
arrow: { emergencyControl: { // 紧急站控
show: false // 控制模式箭头显隐 show: true,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}, },
mouseOverStyle: { // 鼠标悬浮样式 mouseOverStyle: { // 鼠标悬浮样式
fontSize: 10, fontSize: 10,
@ -628,8 +643,6 @@ class SkinCode extends defaultStyle {
haveTrainBorder: false, // 是否需创建trainBorder对象 haveTrainBorder: false, // 是否需创建trainBorder对象
textOffset: 4, // 字体偏移(用以控制字体据车头的距离) textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸 trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗 displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示 trainTip:true // 鼠标悬停列车状态信息框是否显示
}, },

View File

@ -334,31 +334,47 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 4, // 控制模式的个数 count: 4, // 控制模式的个数
offset: {x: 20, y: 0}, // 偏移量 offset: {x: 0, y: 0}, // 偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径 radiusR: 4, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离 distance: 46, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色 grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色 greenColor: 'green', // 控制模式绿色
redColor: 'red', // 控制模式红色 redColor: 'red', // 控制模式红色
yellowColor: 'yellow', // 控制模式黄色 yellowColor: 'yellow' // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
}, },
arrow: { emergencyControl: { // 紧急站控
show: false // 控制模式箭头显隐 show: true,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
} }
} }
}; };
@ -366,7 +382,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };
@ -565,8 +581,6 @@ class SkinCode extends defaultStyle {
aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置 aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离) textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸 trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗 displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示 trainTip:true // 鼠标悬停列车状态信息框是否显示
}, },

View File

@ -203,7 +203,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };
@ -324,13 +324,7 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 4, // 控制模式的个数 count: 4, // 控制模式的个数
@ -340,15 +334,36 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F', // 控制模式灰色 grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色 greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色 redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色 yellowColor: '#FFFF00' // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: true, // 联锁控显示
centerControlButtonShow: false // 中控显示
}, },
arrow: { emergencyControl: { // 紧急站控
show: false // 控制模式箭头显隐 show: true,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: true,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
} }
} }
}; };
@ -749,8 +764,6 @@ class SkinCode extends defaultStyle {
haveTrainBorder: false, // 是否需创建trainBorder对象 haveTrainBorder: false, // 是否需创建trainBorder对象
textOffset: 4, // 字体偏移(用以控制字体据车头的距离) textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸 trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗 displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示 trainTip:true // 鼠标悬停列车状态信息框是否显示
}, },

View File

@ -346,13 +346,7 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 2, // 控制模式灯个数 count: 2, // 控制模式灯个数
@ -362,12 +356,36 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F', // 控制模式灰色 grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色 greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色 redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色 yellowColor: '#FFFF00' // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示 },
centerControlShow: true, // 中控显示 emergencyControl: { // 紧急站控
substationControlShow: true, // 站控按钮显示 show: true,
interconnectedControlShow: false, // 联锁控显示 offset: { x: 110, y: 0 },
centerControlButtonShow: false // 中控显示 text: '紧急',
arrowShow: true,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: true,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}, },
arrow: { arrow: {
show: true // 控制模式箭头显隐 show: true // 控制模式箭头显隐
@ -386,7 +404,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };
@ -592,14 +610,11 @@ class SkinCode extends defaultStyle {
trainHeadArrowOffsetX: 3 // 列车车头三角偏移 trainHeadArrowOffsetX: 3 // 列车车头三角偏移
}, },
common: { common: {
useSelfFormat: true,
useSelfText: false,
trainHeight: 17, // 列车高度 trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距 trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth:62, // 列车长度 trainWidth:62, // 列车长度
trainTextFontSize: 19, // 列车字号 trainTextFontSize: 19, // 列车字号
fontFamily: 'consolas', // 默认字体 族类 fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 19, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象 haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象 haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象 haveTrainBorder: false, // 是否需创建trainBorder对象

View File

@ -13,7 +13,7 @@ class SkinCode extends defaultStyle {
show: true, // 物理区段名称显示 show: true, // 物理区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 18, // 文字离区段距离 distance: 18, // 文字离区段距离
fontSize: 11, // 字体大小 fontSize: 12, // 字体大小
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色 fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式 textAlign: 'center', // 水平对齐方式
@ -24,7 +24,7 @@ class SkinCode extends defaultStyle {
show: true, // 逻辑区段名称显示 show: true, // 逻辑区段名称显示
position: 0, // 区段名称位置 1 上面 -1 下面 0 对称 position: 0, // 区段名称位置 1 上面 -1 下面 0 对称
distance: 6, // 文字离区段距离 distance: 6, // 文字离区段距离
fontSize: 8, // 字体大小 fontSize: 12, // 字体大小
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
fontColor: '#FFFFFF', // 字体颜色 fontColor: '#FFFFFF', // 字体颜色
textAlign: 'center', // 水平对齐方式 textAlign: 'center', // 水平对齐方式
@ -335,13 +335,7 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 2, // 控制模式灯个数 count: 2, // 控制模式灯个数
@ -351,15 +345,36 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F', // 控制模式灰色 grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色 greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色 redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色 yellowColor: '#FFFF00' // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
}, },
arrow: { emergencyControl: { // 紧急站控
show: true // 控制模式箭头显隐 show: false,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: true,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}, },
mouseOverStyle: { // 鼠标悬浮样式 mouseOverStyle: { // 鼠标悬浮样式
fontSize: null, fontSize: null,
@ -421,8 +436,7 @@ class SkinCode extends defaultStyle {
}; };
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 strokeColor: 'red', // 线条颜色
strokeColor: '#ccc', // 线条颜色
extendLength: 8 // 延伸长度 extendLength: 8 // 延伸长度
}; };
@ -583,9 +597,8 @@ class SkinCode extends defaultStyle {
trainHeight: 17, // 列车高度 trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距 trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 76, // 列车长度 trainWidth: 76, // 列车长度
trainTextFontSize: 15, // 列车字号 trainTextFontSize: 10, // 列车字号
fontFamily: 'consolas', // 默认字体 族类 fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 15, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象 haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象 haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象 haveTrainBorder: false, // 是否需创建trainBorder对象

View File

@ -355,31 +355,47 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText: '紧急站控', // 紧急站控文字内容
interconnectedControlText: '连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 2, // 控制模式灯个数 count: 2, // 控制模式灯个数
offset: { x: 0, y: 0 }, // 控制模式灯偏移量 offset: { x: 0, y: 0 }, // 控制模式灯偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径 radiusR: 4, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离 distance: 36, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色 grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色 greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色 redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色 yellowColor: '#FFFF00' // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
}, },
arrow: { emergencyControl: { // 紧急站控
show: true // 控制模式箭头显隐 show: false,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: true,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}, },
mouseOverStyle: { // 鼠标悬浮样式 mouseOverStyle: { // 鼠标悬浮样式
fontSize: null, fontSize: null,
@ -395,7 +411,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };
@ -645,15 +661,12 @@ class SkinCode extends defaultStyle {
hasDelayTime: true, // 是否有延迟时间 hasDelayTime: true, // 是否有延迟时间
hasCrewNum: true, // 是否有乘务组号 hasCrewNum: true, // 是否有乘务组号
hasTravelNum: true, // 是否有行程号 hasTravelNum: true, // 是否有行程号
useSelfFormat: true,
useSelfText: true,
fixedCoordinates: true, // 列车车组号等固定坐标 fixedCoordinates: true, // 列车车组号等固定坐标
trainHeight: 40, // 列车高度 trainHeight: 40, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距 trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 82, // 列车长度 trainWidth: 82, // 列车长度
trainTextFontSize: 12, // 列车字号 trainTextFontSize: 12, // 列车字号
fontFamily: 'consolas', // 默认字体 族类 fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 12, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象 haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象 haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象 haveTrainBorder: false, // 是否需创建trainBorder对象

View File

@ -223,34 +223,50 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
centerControlButton: '站遥控按钮', // 中控文字内容
centerControlText: '遥控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText: '紧急站控', // 紧急站控文字内容
interconnectedControlText: '连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 4, // 控制模式的个数 count: 4, // 控制模式的个数
offset: { x: 20, y: 0 }, // 偏移量 offset: { x: 20, y: 0 }, // 偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 6, // 控制模式灯的半径 radiusR: 6, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离 distance: 46, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色 grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色 greenColor: 'green', // 控制模式绿色
redColor: 'red', // 控制模式红色 redColor: 'red', // 控制模式红色
yellowColor: 'yellow', // 控制模式黄色 yellowColor: 'yellow', // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: true, // 中控显示
stroke: '#FFFFFF', // 框的颜色 stroke: '#FFFFFF', // 框的颜色
fill: 'rgba(0,0,0,0)' // 填充色 fill: 'rgba(0,0,0,0)' // 填充色
}, },
arrow: { emergencyControl: { // 紧急站控
show: false // 控制模式箭头显隐 show: true,
offset: { x: 0, y: 0 },
text: '紧急站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '遥控',
buttonText: '站遥控按钮',
buttonShow: true,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
} }
} }
}; };
@ -415,7 +431,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };
@ -534,7 +550,17 @@ class SkinCode extends defaultStyle {
fontFamily: 'consolas', fontFamily: 'consolas',
trainBodyLineWidth: 1, // 车身line宽 trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度 changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [], // 特殊列车类型需设置显示格式 specialTrainType: [
{
type: 'MANUAL',
serviceNumber: '',
nameFormat: 'groupNumber:targetCode'
},
{
type: 'HEAD',
nameFormat: 'groupNumber:targetCode'
}
], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔 lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离 upPadding: 4, // 上边距离
trainSidelineColor: '#ABFE9B', trainSidelineColor: '#ABFE9B',
@ -602,9 +628,7 @@ class SkinCode extends defaultStyle {
aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置 aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离) textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸 trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
trainHeadColorChangeMode: 1, // 1:driveMode + runlevel trainHeadColorChangeMode: 1, // 1:driveMode + runlevel
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗 displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:false // 鼠标悬停列车状态信息框是否显示 trainTip:false // 鼠标悬停列车状态信息框是否显示
}, },

View File

@ -350,31 +350,47 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 2, // 控制模式灯个数 count: 2, // 控制模式灯个数
offset: {x: 0, y: 0}, // 控制模式灯偏移量 offset: {x: 0, y: 0}, // 控制模式灯偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径 radiusR: 4, // 控制模式灯的半径
distance: 36, // 控制模式之间灯之间的距离 distance: 36, // 控制模式之间灯之间的距离
grayColor: '#7F7F7F', // 控制模式灰色 grayColor: '#7F7F7F', // 控制模式灰色
greenColor: '#00FF00', // 控制模式绿色 greenColor: '#00FF00', // 控制模式绿色
redColor: '#FF0000', // 控制模式红色 redColor: '#FF0000', // 控制模式红色
yellowColor: '#FFFF00', // 控制模式黄色 yellowColor: '#FFFF00' // 控制模式黄色
emergencyControlShow: false, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
}, },
arrow: { emergencyControl: { // 紧急站控
show: true // 控制模式箭头显隐 show: false,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: true,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
}, },
mouseOverStyle: { // 鼠标悬浮样式 mouseOverStyle: { // 鼠标悬浮样式
fontSize: null, fontSize: null,
@ -390,7 +406,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };
@ -648,16 +664,14 @@ class SkinCode extends defaultStyle {
trainHeight: 17, // 列车高度 trainHeight: 17, // 列车高度
trainHeadDistance: 2, // 列车和车头之间的间距 trainHeadDistance: 2, // 列车和车头之间的间距
trainWidth: 76, // 列车长度 trainWidth: 76, // 列车长度
trainTextFontSize: 15, // 列车字号 trainTextFontSize: 30, // 列车字号
fontFamily: 'consolas', // 默认字体 族类 fontFamily: 'consolas', // 默认字体 族类
nameFontSize: 15, // 字体大小
haveTextHSDA: false, // 是否需创建textHSDA对象 haveTextHSDA: false, // 是否需创建textHSDA对象
haveArrowText: true, // 是否需创建arrowText对象 haveArrowText: true, // 是否需创建arrowText对象
haveTrainBorder: false, // 是否需创建trainBorder对象 haveTrainBorder: false, // 是否需创建trainBorder对象
aspectRatio: 8 / 15, // 字体宽高比例用以拼接text是计算位置 aspectRatio: 8 / 15, // 字体宽高比例用以拼接text是计算位置
textOffset: 1, // 字体偏移(用以控制字体据车头的距离) textOffset: 1, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸 trainWidthMoreText: 2, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗 displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示 trainTip:true // 鼠标悬停列车状态信息框是否显示
}, },

View File

@ -394,31 +394,47 @@ class SkinCode extends defaultStyle {
fontColor: '#ffffff', // 字体颜色 fontColor: '#ffffff', // 字体颜色
fontWeight: 'normal', // 字体粗细 fontWeight: 'normal', // 字体粗细
textAlign: 'middle', // 字体水平对齐 textAlign: 'middle', // 字体水平对齐
textVerticalAlign: 'top', // 字体垂直对齐 textVerticalAlign: 'top' // 字体垂直对齐
centerControlText: '中控', // 中控文字内容
substationControlText: '站控', // 站控文字内容
emergencyControlText:'紧急站控', // 紧急站控文字内容
interconnectedControlText:'连锁控' // 连锁控文字内容
// stationCenterControlText: '站中控', // 站中控文字内容
// generalAlarmControlText: '总报警' // 总报警文字内容
}, },
lamp: { lamp: {
count: 4, // 控制模式的个数 count: 4, // 控制模式的个数
offset: {x: 20, y: 0}, // 偏移量 offset: {x: 20, y: 0}, // 偏移量
emergencyOffset: {x: 0, y: 0},
radiusR: 4, // 控制模式灯的半径 radiusR: 4, // 控制模式灯的半径
distance: 46, // 控制模式之间灯之间的距离 distance: 46, // 控制模式之间灯之间的距离
grayColor: '#C0C0C0', // 控制模式灰色 grayColor: '#C0C0C0', // 控制模式灰色
greenColor: 'green', // 控制模式绿色 greenColor: 'green', // 控制模式绿色
redColor: 'red', // 控制模式红色 redColor: 'red', // 控制模式红色
yellowColor: 'yellow', // 控制模式黄色 yellowColor: 'yellow' // 控制模式黄色
emergencyControlShow: true, // 紧急站控显示
centerControlShow: true, // 中控显示
substationControlShow: true, // 站控按钮显示
interconnectedControlShow: false, // 联锁控显示
centerControlButtonShow: false // 中控显示
}, },
arrow: { emergencyControl: { // 紧急站控
show: false // 控制模式箭头显隐 show: true,
offset: { x: 0, y: 0 },
text: '紧急',
arrowShow: false,
grayColor: '#7F7F7F'
},
centerControl: { // 中控
show: true,
offset: { x: 0, y: 0 },
text: '中控',
buttonShow: false,
arrowShow: false,
grayColor: '#7F7F7F'
},
substationControl: { // 站控按钮
show: true,
offset: { x: 0, y: 0 },
text: '站控',
arrowShow: false,
grayColor: '#7F7F7F'
},
interconnectedControl: { // 联锁控
show: false,
offset: { x: 0, y: 0 },
text: '联锁控',
arrowShow: false,
grayColor: '#7F7F7F'
} }
} }
}; };
@ -514,7 +530,7 @@ class SkinCode extends defaultStyle {
// 供电线路 // 供电线路
this[deviceType.Power] = { this[deviceType.Power] = {
lineColor: '#FFFFFF', // 线条颜色 lineColor: '#FFFFFF', // 线条颜色
strokeColor: '#ccc', // 线条颜色 strokeColor: 'red', // 线条颜色
extendLength: 10 // 延伸长度 extendLength: 10 // 延伸长度
}; };
@ -737,8 +753,6 @@ class SkinCode extends defaultStyle {
aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置 aspectRatio: 7 / 5, // 字体宽高比例用以拼接text是计算位置
textOffset: 4, // 字体偏移(用以控制字体据车头的距离) textOffset: 4, // 字体偏移(用以控制字体据车头的距离)
trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸 trainWidthMoreText: 8, // 计算列车长度时--列车长比text多出尺寸
useSelfFormat: true, // 使用配置项的nameFormat
useSelfText: true, // 使用配置项的字体大小
displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗 displayPosition: 'margin', // 非同通信车在物理区段(有逻辑区段)上显示的位置 margin:行驶方向边缘车次窗 center: 中间位置车次窗
trainTip:true // 鼠标悬停列车状态信息框是否显示 trainTip:true // 鼠标悬停列车状态信息框是否显示
}, },

View File

@ -167,9 +167,10 @@ class Jlmap {
const arr = []; const arr = [];
const rectList = []; const rectList = [];
let rect = ''; let rect = '';
// console.log(this.mapDevice);
for (const i in this.mapDevice) { for (const i in this.mapDevice) {
const element = this.mapDevice[i]; const element = this.mapDevice[i];
if (element.instance) { if (element.instance && element._type == 'Section') {
if (!rect) { if (!rect) {
rect = element.instance.getBoundingRect().clone(); rect = element.instance.getBoundingRect().clone();
} else { } else {
@ -187,8 +188,8 @@ class Jlmap {
const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100; const scaleHeight = Math.floor(((opts.height - 100) / (rect.height * num)) * 100) / 100;
const scale = Math.min(scaleWidth, scaleHeight); const scale = Math.min(scaleWidth, scaleHeight);
// const offsetHeight = (offsetY - (rect.height * scale)) / 2 + Math.abs(rect.x); // 高度差 // const offsetHeight = (offsetY - (rect.height * scale)) + Math.abs(rect.x * scale); // 高度差
// console.log(offsetHeight, opts.height, screenSplit, offsetY, rect); // console.log(offsetHeight, opts.height, screenSplit, offsetY, rect, '缩放对比>', scaleWidth, scaleHeight);
for (let i = 0; i < splitList.length; i++) { for (let i = 0; i < splitList.length; i++) {
let offsetX = ''; let offsetX = '';
@ -198,11 +199,11 @@ class Jlmap {
const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值 const dx = (opts.width - (splitList[i] - splitList[i - 1]) * scale) / 2; // 居中计算偏移值
offsetX = splitList[i - 1] * scale - dx; offsetX = splitList[i - 1] * scale - dx;
} }
// const param = { scaleRate: scale, offsetX: offsetX, offsetY: -offsetHeight - (offsetY * i) }; // const param = { scaleRate: scale, offsetX: offsetX, offsetY: -(offsetY * i) - offsetHeight};
const param = { scaleRate: scale, offsetX: offsetX, offsetY: -120 - (offsetY * i) }; const param = { scaleRate: scale, offsetX: offsetX, offsetY: -160 - (offsetY * i) };
if (i == 0) { // if (i == 0) {
param.offsetY = -160 - (opts.offsetY || 0); // param.offsetY -= -100;
} // }
arr.push(param); arr.push(param);
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height}; const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
rectList.push(rect); rectList.push(rect);
@ -390,7 +391,7 @@ class Jlmap {
(list || []).forEach((elem, index) => { (list || []).forEach((elem, index) => {
const code = elem.code; const code = elem.code;
const type = elem._type; const type = elem._type;
if (elem.deviceType === 'ROUTE') { // 处理进路数据状态 if (elem.deviceType === 'ROUTE' && this.logicData.routeData) { // 处理进路数据状态
store.dispatch('map/updateRouteState', elem); store.dispatch('map/updateRouteState', elem);
const route = this.logicData.routeData[code]; const route = this.logicData.routeData[code];
if (route.automaticRouteCode) { if (route.automaticRouteCode) {

View File

@ -174,73 +174,41 @@ export default class Station extends Group {
const model = this.model; const model = this.model;
if (model.visible && model.createControlMode) { if (model.visible && model.createControlMode) {
// 紧急站控 // 紧急站控
if (this.style.Station.StationControl.lamp.emergencyControlShow) { this.createEmergencyControl();
this.emergencyControl = new ESingleControl({
_subType: 'emergency',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
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.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.text.emergencyControlText,
pop: false
});
this.add(this.emergencyControl);
}
// 中控按钮 // 中控按钮
if (this.style.Station.StationControl.lamp.centerControlShow) { this.createCenterControl();
this.centerControl = new ESingleControl({
_subType: 'center',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.text.centerControlText,
pop: false
});
this.add(this.centerControl);
}
// 站控按钮 // 站控按钮
if (this.style.Station.StationControl.lamp.substationControlShow) { this.createSubstationControl();
this.substationControl = new ESingleControl({
_subType: 'substation',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.text.substationControlText,
pop: false
});
this.add(this.substationControl);
}
// 联锁控 // 联锁控
if (this.style.Station.StationControl.lamp.interconnectedControlShow) { this.createInterconnectedControl();
this.interconnectedControl = new ESingleControl({ }
_subType: 'interconnected', this.setState(model);
style: this.style, }
zlevel: this.zlevel,
z: this.z, createEmergencyControl() { // 紧急站控
point: { const model = this.model;
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.lamp.offset.x, if (this.style.Station.StationControl.emergencyControl.show) {
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.offset.y this.emergencyControl = new ESingleControl({
}, _subType: 'emergency',
context: this.style.Station.StationControl.text.interconnectedControlText || '联锁控', style: this.style,
pop: false zlevel: this.zlevel,
}); z: this.z,
this.add(this.interconnectedControl); point: {
} x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.emergencyControl.offset.x,
// 箭头 y: model.controlModePoint.y + this.style.Station.StationControl.emergencyControl.offset.y
if (this.style.Station.StationControl.arrow.show) { },
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); context: this.style.Station.StationControl.emergencyControl.text,
this.arrowsControl = new EArrow({ pop: false
});
this.add(this.emergencyControl);
if (this.style.Station.StationControl.emergencyControl.arrowShow) {
const x = model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.emergencyControl.offset.x;
const y = model.controlModePoint.y + this.style.Station.StationControl.emergencyControl.offset.y;
const point = arrow(x, y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
this.emergencyArrowsControl = new EArrow({
zlevel: this.zlevel, zlevel: this.zlevel,
z: this.z, z: this.z,
style: this.style, style: this.style,
@ -249,44 +217,137 @@ export default class Station extends Group {
point: point, point: point,
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.offset.x, x: model.controlModePoint.x + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.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.Station.StationControl.lamp.grayColor, fill: this.style.Station.StationControl.emergencyControl.grayColor,
lineWidth: 1, lineWidth: 1,
stroke: this.style.sidelineColor stroke: this.style.sidelineColor
}); });
this.add(this.arrowsControl); this.add(this.emergencyArrowsControl);
} }
// 中控按钮
if (this.style.Station.StationControl.lamp.centerControlButtonShow) {
this.centerControlButton = new ESingleControl({
_subType: 'button',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
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.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.text.centerControlButton,
pop: false
});
this.add(this.centerControlButton);
const arcRect = this.centerControlButton.getArcBoundingRect();
this.arcBorder = new Rect({
zlevel: this.zlevel,
z: this.z,
silent: true,
shape: arcRect,
style: {
lineDash: null,
stroke: this.style.Station.StationControl.lamp.stroke,
fill: this.style.Station.StationControl.lamp.fill
}
});
this.add(this.arcBorder);
}
} }
this.setState(model); }
createCenterControl() { // 中控按钮
const model = this.model;
if (this.style.Station.StationControl.centerControl.show) {
this.centerControl = new ESingleControl({
_subType: 'center',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x - this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.centerControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.centerControl.offset.y
},
context: this.style.Station.StationControl.centerControl.text,
pop: false
});
this.add(this.centerControl);
if (this.style.Station.StationControl.centerControl.arrowShow) {
const x = model.controlModePoint.x - this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.emergencyControl.offset.x;
const y = model.controlModePoint.y + this.style.Station.StationControl.emergencyControl.offset.y;
const point = arrow(x, y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
this.centerArrowsControl = new EArrow({
zlevel: this.zlevel,
z: this.z,
style: this.style,
count: this.count,
drict: 1,
point: point,
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y,
fill: this.style.Station.StationControl.centerControl.grayColor,
lineWidth: 1,
stroke: this.style.sidelineColor
});
this.add(this.centerArrowsControl);
}
}
// 中控按钮
if (this.style.Station.StationControl.centerControl.buttonShow) { // 宁波一 显示
this.centerControlButton = new ESingleControl({
_subType: 'button',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
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.Station.StationControl.lamp.offset.y
},
context: this.style.Station.StationControl.centerControl.buttonText,
pop: false
});
this.add(this.centerControlButton);
const arcRect = this.centerControlButton.getArcBoundingRect();
this.arcBorder = new Rect({
zlevel: this.zlevel,
z: this.z,
silent: true,
shape: arcRect,
style: {
lineDash: null,
stroke: this.style.Station.StationControl.lamp.stroke,
fill: this.style.Station.StationControl.lamp.fill
}
});
this.add(this.arcBorder);
}
}
createSubstationControl() { // 站控按钮
const model = this.model;
if (this.style.Station.StationControl.substationControl.show) {
this.substationControl = new ESingleControl({
_subType: 'substation',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance / 2 + this.style.Station.StationControl.substationControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.substationControl.offset.y
},
context: this.style.Station.StationControl.substationControl.text,
pop: false
});
this.add(this.substationControl);
if (this.style.Station.StationControl.substationControl.arrowShow) {
const x = this.model.controlModePoint.x + this.style.Station.StationControl.substationControl.offset.x;
const y = this.model.controlModePoint.y + this.style.Station.StationControl.substationControl.offset.y;
const point = arrow(x, y + this.style.Station.StationControl.lamp.radiusR / 2, this.style.Station.StationControl.lamp.distance / 6, this.style.Station.StationControl.lamp.radiusR * 0.8);
this.substationArrowsControl = new EArrow({
zlevel: this.zlevel,
z: this.z,
style: this.style,
count: this.count,
drict: 1,
point: point,
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.lamp.radiusR / 2 + this.style.Station.StationControl.lamp.offset.y,
fill: this.style.Station.StationControl.substationControl.grayColor,
lineWidth: 1,
stroke: this.style.sidelineColor
});
this.add(this.substationArrowsControl);
}
}
}
createInterconnectedControl() { // 联锁控
const model = this.model;
if (this.style.Station.StationControl.interconnectedControl.show) { // 成都三会显示
this.interconnectedControl = new ESingleControl({
_subType: 'interconnected',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: model.controlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.interconnectedControl.offset.x,
y: model.controlModePoint.y + this.style.Station.StationControl.interconnectedControl.offset.y
},
context: this.style.Station.StationControl.interconnectedControl.text || '联锁控',
pop: false
});
this.add(this.interconnectedControl);
}
} }
handleCenter() { // 中控 handleCenter() { // 中控
@ -301,13 +362,15 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色 this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.lamp.yellowColor); // 文字颜色
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.arrowsControl && this.arrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor); this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
} }
handleEmergency() { // 紧急站控 handleEmergency() { // 紧急站控
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor); this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.redColor);
this.emergencyControl && this.emergencyControl.setTextColor(this.style.Station.StationControl.lamp.redColor); // 紧急 颜色
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
} }
recover() { recover() {
@ -317,6 +380,9 @@ export default class Station extends Group {
this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.text.fontColor); this.substationControl && this.substationControl.setTextColor(this.style.Station.StationControl.text.fontColor);
this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor); this.centerControl && this.centerControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.text.fontColor); this.centerControl && this.centerControl.setTextColor(this.style.Station.StationControl.text.fontColor);
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.emergencyArrowsControl && this.emergencyArrowsControl.setColor(this.style.Station.StationControl.lamp.grayColor);
} }
// 设置状态 // 设置状态

View File

@ -489,7 +489,7 @@ class StationStand extends Group {
if (!this.isShowShape) return; if (!this.isShowShape) return;
// 新版地图使用新版状态变更方式 // 新版地图使用新版状态变更方式
this.recover(); this.recover();
model.free && this.spare(); /** 空闲*/ !model.trainParking && this.spare(); /** 空闲*/
model.trainParking && this.stop(); /** 列车停站*/ model.trainParking && this.stop(); /** 列车停站*/
model.emergencyClosed && this.emergentClose(); /** 站台紧急关闭*/ model.emergencyClosed && this.emergentClose(); /** 站台紧急关闭*/

View File

@ -38,7 +38,7 @@ export default class Text2 extends Group {
x: model.position.x, x: model.position.x,
y: model.position.y, y: model.position.y,
text: content, text: content,
textFont: model.font, fontSize: Number(model.font),
textFill: model.fontColor, textFill: model.fontColor,
textAlign: 'middle' textAlign: 'middle'
} }

View File

@ -20,11 +20,9 @@ export default class Train extends Group {
this.z = 40; this.z = 40;
this.section = null; this.section = null;
this.isShowShape = true; this.isShowShape = true;
this.fontSize = style.Train.common.useSelfText ? style.Train.common.nameFontSize || style.Train.common.trainTextFontSize : model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize; this.fontSize = model.nameFontSize || style.Train.common.trainTextFontSize;
// this.fontSize = model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
this.newScale = this.fontSize / style.Train.common.trainTextFontSize; this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
this.nameFormat = style.Train.common.useSelfFormat ? style.Train.trainBody.trainNameFormat : model.nameFormat || style.Train.trainBody.trainNameFormat; this.nameFormat = model.nameFormat || style.Train.trainBody.trainNameFormat;
// this.nameFormat = model.nameFormat || style.Train.trainBody.trainNameFormat;
if (style.Train.trainBody.specialTrainType.length > 0) { if (style.Train.trainBody.specialTrainType.length > 0) {
style.Train.trainBody.specialTrainType.some((item) => { style.Train.trainBody.specialTrainType.some((item) => {
if (model.type === item.type) { if (model.type === item.type) {
@ -86,6 +84,7 @@ export default class Train extends Group {
maLen: model.maLen, maLen: model.maLen,
hold:model.hold, hold:model.hold,
jump:model.jump, jump:model.jump,
stop:model.stop,
dt: model.dt, dt: model.dt,
model: model model: model
}); });
@ -165,7 +164,7 @@ export default class Train extends Group {
if (style.Train.common.haveTrainBorder) { if (style.Train.common.haveTrainBorder) {
this.createTrainBorder(); this.createTrainBorder();
} }
if (style.Train.directionArrow.hasArrow) { if (style.Train.directionArrow.hasArrow) { // 列车运行上下方箭头eg:宁波yi
const arrowPoint = { x: 0, y: 0 }; const arrowPoint = { x: 0, y: 0 };
if (model.trainWindowModel) { if (model.trainWindowModel) {
arrowPoint.x = model.trainWindowModel.point.x; arrowPoint.x = model.trainWindowModel.point.x;
@ -216,60 +215,6 @@ export default class Train extends Group {
this.trainR && this.trainR.setArrowShow(false); this.trainR && this.trainR.setArrowShow(false);
} }
// 设置服务号状态类型
setServerNoType(type) {
if (this.style.Train.trainStatusStyle.serverNoType.length > 0) {
const flag = this.style.Train.trainStatusStyle.serverNoType.some((item) => {
if (type === item.type) {
this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
return true;
}
});
if (this.style.Train.trainStatusStyle.defaultServerNoColor && !flag) {
this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultServerNoColor);
}
}
}
// 设置目的地状态
setDestinationStatus(status) {
if (this.style.Train.trainStatusStyle.destinationStatus.length > 0) {
const flag = this.style.Train.trainStatusStyle.destinationStatus.some((item) => {
if (status === item.status) {
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
case 'trainTarget':
this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
break;
case 'trainServer':
this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
break;
case 'trainWindowBorder':
this.trainB && this.trainB.setBodyBoxShape('stroke', item.showColor);
break;
default:
this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
}
return true;
}
});
if (this.style.Train.trainStatusStyle.defaultDestinationColor && !flag) {
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
case 'trainTarget':
this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
break;
case 'trainServer':
this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
break;
case 'trainWindowBorder':
this.trainB && this.trainB.setBodyBoxShape('stroke', this.style.Train.trainStatusStyle.defaultDestinationColor);
break;
default:
this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
}
}
}
}
// 设置运行方向状态类型 // 设置运行方向状态类型
setDirectionType(right, flag) { setDirectionType(right, flag) {
if (this.style.Train.trainStatusStyle.directionType.length > 0) { if (this.style.Train.trainStatusStyle.directionType.length > 0) {
@ -384,18 +329,6 @@ export default class Train extends Group {
this.trainB && this.trainB.setAShow(false); this.trainB && this.trainB.setAShow(false);
} }
} }
setTrainTypeStatus(type) {
if (this.style.Train.trainStatusStyle.trainTypeStatus) {
this.style.Train.trainStatusStyle.trainTypeStatus.some((item) => {
if (type === item.type) {
item.serviceNumberColor && this.trainB && this.trainB.setTextTrainServerColor(item.serviceNumberColor);
item.trainNumberColor && this.trainB && this.trainB.setTextTrainNumberColor(item.trainNumberColor);
item.trainTargetColor && this.trainB && this.trainB.setTextTrainTargetColor(item.trainTargetColor);
item.groupNumberColor && this.trainB && this.trainB.setTextTrainTargetNumberColor(item.groupNumberColor);
}
});
}
}
// 设置状态 // 设置状态
setState(model, object) { setState(model, object) {
if (!this.isShowShape) return; if (!this.isShowShape) return;
@ -409,7 +342,6 @@ export default class Train extends Group {
} }
this.setRunStatus(model.stop, flag); this.setRunStatus(model.stop, flag);
this.setCommunicationStatus(model.runLevel); this.setCommunicationStatus(model.runLevel);
// this.setTrainTypeStatus(model.type); 配合早晚点设置
this.setDoorStatus(model.doorCloseLock); this.setDoorStatus(model.doorCloseLock);
this.setAlarmStatus(model.alarmStatus); this.setAlarmStatus(model.alarmStatus);
this.setHoldStatus(model.hold); this.setHoldStatus(model.hold);
@ -422,19 +354,6 @@ export default class Train extends Group {
this.updateSection(object); this.updateSection(object);
} }
} }
// let points = [];
// if (model) {
// this.recover();
// this.setServerNoType(model.serverNoType); // 设置服务号状态类型
// this.setDestinationStatus(model.destinationStatus); // 设置目的地状态
// this.setRunStatus(model.runStatus, flag); // 设置运行状态
// this.setRunMode(model.runMode); // 设置运行模式
// this.setRunControlStatus(model.runControlStatus); // 设置运行控制状态类型
// this.setDoorStatus(model.doorStatus); // 设置车门状态类型
// this.setCommunicationStatus(model.communicationStatus); // 设置通信状态类型
// this.setAlarmStatus(model.alarmStatus); // 设置报警状态
// this.setTrainTypeStatus(model.type); // 根据列车类型设置列车识别号样式
// }
} }
setTrainTypeColor(type) { setTrainTypeColor(type) {
this.trainB && this.trainB.setTrainTypeColor(type); this.trainB && this.trainB.setTrainTypeColor(type);

View File

@ -1,72 +1,82 @@
<template> <template>
<el-dialog class="beijing-01__systerm notice-info" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
<div class="context"> class="beijing-01__systerm notice-info"
<template v-for="(message, index) in messages"> :title="title"
<div :key="index">{{message}}</div> :visible.sync="show"
</template> width="360px"
</div> :before-close="doClose"
<el-row justify="center" class="button-group"> :z-index="2000"
<el-col :span="10" :offset="8"> :modal="false"
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button> :close-on-click-modal="false"
</el-col> append-to-body
</el-row> >
</span> <div class="context">
</el-dialog> <template v-for="(message, index) in messages">
<div :key="index">{{ message }}</div>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'NoticeInfo', name: 'NoticeInfo',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
messages: ['命令下达失败'], messages: ['命令下达失败'],
operate: null operate: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages && messages != 'null') {
this.messages.push(messages);
} }
}, this.$nextTick(function () {
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages && messages != 'null') {
this.messages.push(messages);
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}, });
commit() { },
this.doClose(); doClose() {
}, this.dialogShow = false;
cancel() { this.$store.dispatch('training/emitTipFresh');
this.doClose(); },
} commit() {
this.doClose();
},
cancel() {
this.doClose();
} }
} }
};
</script> </script>
<style> <style>
@ -74,4 +84,4 @@
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }
</style> </style>

View File

@ -1,300 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div v-if="!earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio"
label="1"
:disabled="radio == 2"
style="display: block; text-align: left;"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio"
label="2"
:disabled="radio == 1"
style="display: block; text-align: left;"
>
本站台下行</el-radio>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
label="1"
:disabled="radio1 == '2'"
style="display: block; text-align: left;"
>
扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
label="2"
:disabled="radio1 == '1'"
style="display: block; text-align: left;"
>
取消扣车</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
:id="upRadioId"
v-model="radio2"
label="1"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
:id="downRadioId"
v-model="radio2"
label="2"
style="display: block; text-align: left;"
@change="changeRadio"
>
本站台下行</el-radio>
</el-col>
</el-row>
</div>
</div>
<el-row 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>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../utils/menuOperate';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '1',
radio1: '1',
radio2: '1',
earlyDepar: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
upRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
},
downRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
},
title() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
return '提前发车';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.operation = operate.operation;
}
this.dialogShow = true;
this.earlyDepar = false;
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
if (this.selected.right) {
this.radio = '1';
} else {
this.radio = '2';
}
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
if (this.selected.right) {
this.radio = '1';
} else {
this.radio = '2';
}
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true;
if (this.selected.right) {
this.radio2 = '1';
} else {
this.radio2 = '2';
}
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
changeRadio(val) {
const operate = {
operation: '',
val: val
};
if (val == 1) {
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
} else if (val == 2) {
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
}
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
});
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
/** 设置扣车*/
this.setDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
/** 取消扣车*/
this.cancelDetainTrain();
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
/** 提前发车*/
this.earlyDeparture();
}
},
//
setDetainTrain() {
this.sendCommand(menuOperate.StationStand.setDetainTrain);
},
//
cancelDetainTrain() {
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
},
//
earlyDeparture() {
this.sendCommand(menuOperate.StationStand.earlyDeparture);
},
sendCommand(operate) { //
this.loading = true;
commitOperate(operate, {}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" /> <stand-control ref="standControl" system-name="beijing-01__systerm" />
<stand-jump-stop-control ref="standJumpStopControl" /> <stand-jump-stop-control ref="standJumpStopControl" system-name="beijing-01__systerm" />
<stand-detail ref="standDetail" /> <stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" /> <stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" /> <stand-stop-time ref="standStopTime" />
@ -13,8 +13,8 @@
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl'; import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
import StandJumpStopControl from './dialog/standJumpStopControl'; import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
import StandBackStrategy from './dialog/standBackStrategy'; import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail'; import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel'; import StandRunLevel from './dialog/standRunLevel';

View File

@ -35,8 +35,6 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示 atsAutoTriggerShow: true // ATS自动触发表示灯显示
}; };
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
}; };
this['private'][deviceType.TrainWindow] = { this['private'][deviceType.TrainWindow] = {
trainWindowShow: true trainWindowShow: true

View File

@ -35,8 +35,6 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示 atsAutoTriggerShow: true // ATS自动触发表示灯显示
}; };
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
}; };
this['private'][deviceType.TrainWindow] = { this['private'][deviceType.TrainWindow] = {
trainWindowShow: true trainWindowShow: true

View File

@ -35,8 +35,6 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示 atsAutoTriggerShow: true // ATS自动触发表示灯显示
}; };
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
}; };
this['private'][deviceType.TrainWindow] = { this['private'][deviceType.TrainWindow] = {
trainWindowShow: true trainWindowShow: true

View File

@ -0,0 +1,90 @@
<template>
<el-dialog
v-dialogDrag
:class="systemName+' notice-info'"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message, index) in messages">
<div :key="index">{{ message }}</div>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="8">
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
</el-col>
</el-row>
</span>
</el-dialog>
</template>
<script>
import {OperationEvent } from '@/scripts/ConstDic';
export default {
name: 'NoticeInfo',
props:{
systemName:{
type:String,
required:true
}
},
data() {
return {
dialogShow: false,
messages: ['命令下达失败']
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(messages) {
this.dialogShow = true;
this.messages = ['命令下达失败'];
if (messages && messages != 'null') {
this.messages.push(messages);
}
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.doClose();
},
cancel() {
this.doClose();
}
}
};
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog v-dialogDrag class="ningbo-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <el-dialog v-dialogDrag :class="systemName+' stand-detain-train'" :title="title" :visible.sync="show" width="320px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header"> <el-row class="header">
<el-col :span="10"><span>集中站</span></el-col> <el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col> <el-col :span="10" :offset="2"><span>站台</span></el-col>
@ -121,21 +121,28 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" :system-name="systemName" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../utils/menuOperate'; import {menuOperate, commitOperate} from '../../utils/menuOperate';
import { mapGetters } from 'vuex';
export default { export default {
name: 'StandDetainTrain', name: 'StandDetainTrain',
components: { components: {
NoticeInfo NoticeInfo
}, },
props:{
systemName:{
type:String,
required:true
}
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
@ -155,6 +162,9 @@ export default {
}; };
}, },
computed: { computed: {
...mapGetters('map', [
'mapConfig'
]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
@ -207,7 +217,7 @@ export default {
} }
} }
this.radio = '2'; this.radio = '2';
if (this.selected.right) { // if ((this.selected.right && this.mapConfig.upDirection === 'right') || (!this.selected.right && this.mapConfig.upDirection === 'left')) { //
this.radio = '1'; this.radio = '1';
} }
@ -231,7 +241,7 @@ export default {
this.radio1 = '2'; this.radio1 = '2';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) { } else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true; this.earlyDepar = true;
if (!this.selected.right) { if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.radio2 = '2'; this.radio2 = '2';
} else { } else {
this.radio2 = '1'; this.radio2 = '1';
@ -240,14 +250,14 @@ export default {
this.AutomaticBuckle = true; this.AutomaticBuckle = true;
this.autoRadio1 = '1'; this.autoRadio1 = '1';
this.autoRadio = '1'; this.autoRadio = '1';
if (!this.selected.right) { if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.autoRadio = '2'; this.autoRadio = '2';
} }
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) { } else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
this.AutomaticBuckle = true; this.AutomaticBuckle = true;
this.autoRadio1 = '2'; this.autoRadio1 = '2';
this.autoRadio = '1'; this.autoRadio = '1';
if (!this.selected.right) { if ((!this.selected.right && this.mapConfig.upDirection === 'right') || (this.selected.right && this.mapConfig.upDirection === 'left')) {
this.autoRadio = '2'; this.autoRadio = '2';
} }
} }
@ -297,30 +307,18 @@ export default {
} }
}, },
setDetainTrainAuto() { // setDetainTrainAuto() { //
this.sendCommand(menuOperate.StationStand.setDetainTrainAuto, { this.sendCommand(menuOperate.StationStand.setDetainTrainAuto);
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
});
}, },
cancelDetainTrainAuto() { // cancelDetainTrainAuto() { //
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAuto, { this.sendCommand(menuOperate.StationStand.cancelDetainTrainAuto);
leftDirection: this.autoRadio == '2', // 1 2
rightDirection: this.autoRadio == '1'
});
}, },
// //
setDetainTrain() { setDetainTrain() {
this.sendCommand(menuOperate.StationStand.setDetainTrain, { this.sendCommand(menuOperate.StationStand.setDetainTrain);
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
});
}, },
// //
cancelDetainTrain() { cancelDetainTrain() {
this.sendCommand(menuOperate.StationStand.cancelDetainTrain, { this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
});
}, },
// //
earlyDeparture() { earlyDeparture() {

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm stand-detain-train" :class="systemName+' stand-detain-train'"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="380px" width="380px"
@ -27,10 +27,10 @@
<span class="base-label" style="display:block; padding-left: 20px;">范围</span> <span class="base-label" style="display:block; padding-left: 20px;">范围</span>
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1"> <el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
<div style="margin-bottom: 8px;"> <div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.right==false">本站台上行跳停</el-radio> <el-radio :label="upstream" :disabled="!isUpDirection">本站台上行跳停</el-radio>
</div> </div>
<div style="margin-bottom: 8px;"> <div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.right==true">本站台下行跳停</el-radio> <el-radio :label="downstream" :disabled="isUpDirection">本站台下行跳停</el-radio>
</div> </div>
</el-radio-group> </el-radio-group>
<el-row> <el-row>
@ -38,10 +38,10 @@
<!-- id="stand_upDown_choose" --> <!-- id="stand_upDown_choose" -->
<el-radio-group :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange"> <el-radio-group :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
<div style="margin-bottom: 8px;"> <div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.right==false">指定列车上行跳停</el-radio> <el-radio :label="upstream" :disabled="!isUpDirection">指定列车上行跳停</el-radio>
</div> </div>
<div style="margin-bottom: 8px;"> <div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.right==true">指定列车下行跳停</el-radio> <el-radio :label="downstream" :disabled="isUpDirection">指定列车下行跳停</el-radio>
</div> </div>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
@ -97,23 +97,29 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" :system-name="systemName" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '../utils/menuItemStatus'; // import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '../utils/menuOperate'; import NoticeInfo from '../../menus/childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import {menuOperate, commitOperate} from '../../utils/menuOperate';
export default { export default {
name: 'StandDetainTrains', name: 'StandDetainTrains',
components: { components: {
NoticeInfo NoticeInfo
}, },
props:{
systemName:{
type:String,
required:true
}
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
@ -124,6 +130,7 @@ export default {
operation: null, operation: null,
trainList: [], trainList: [],
radio1: '', radio1: '',
isUpDirection: true,
model: { model: {
val1: '', val1: '',
val2: '', val2: '',
@ -134,7 +141,8 @@ export default {
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'map' 'map',
'mapConfig'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
@ -219,8 +227,9 @@ export default {
} }
} }
this.radio1 = operate.operation; this.radio1 = operate.operation;
this.isUpDirection = (this.mapConfig.upDirection === 'right' && selected.right) || (this.mapConfig.upDirection === 'left' && !selected.right);
this.model.right = selected.right; this.model.right = selected.right;
this.model.val1 = selected.right ? '02' : '01'; // , 01: /02: this.model.val1 = this.isUpDirection ? '02' : '01'; // , 01: /02:
this.model.val2 = ''; this.model.val2 = '';
this.model.tripNumber = ''; this.model.tripNumber = '';
@ -237,7 +246,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); // mouseCancelState(this.selected);
}, },
commit() { commit() {
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {

View File

@ -0,0 +1,251 @@
import store from '@/store/index_APP_TARGET';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// 操作
export const menuOperate = {
Section:{
active:{
// 区段激活
operation: OperationEvent.Section.active.menu.operation,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
alxeEffective:{
// 确认计轴有效
operation: OperationEvent.Section.alxeEffective.menu.operation,
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
},
split:{
// 区段切除
operation: OperationEvent.Section.split.menu.operation,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
},
setSpeed:{
// 设置速度
operation: OperationEvent.Section.setSpeed.menu.operation,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
},
axlePreReset:{
// 区段计轴预复位
operation: OperationEvent.Section.axlePreReset.menu.operation,
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
},
fault:{
// 区段故障解锁
operation: OperationEvent.Section.fault.menu.operation,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
}
},
Signal:{
arrangementRoute:{
// 排列进路
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
},
cancelTrainRoute:{
// 取消进路
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
},
humanTrainRoute:{
// 总人解
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
cmdType:CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
},
reopenSignal:{
// 信号重开
operation: OperationEvent.Signal.reopenSignal.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
},
signalClose:{
// 信号关灯
operation: OperationEvent.Signal.signalClose.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
},
humanControl:{
// 进路交人工控
operation: OperationEvent.Signal.humanControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
},
atsAutoControl:{
// 进路交自动控
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
setAutoInterlock:{
// 设置通过模式
operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
},
cancelAutoInterlock:{
// 取消通过模式
operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
},
detail:{
// 查询进路状态
operation: OperationEvent.Signal.detail.menu.operation
}
},
Switch:{
lock:{
// 道岔单锁
operation: OperationEvent.Switch.lock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
},
unlock:{
// 道岔解锁
operation: OperationEvent.Switch.unlock.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
},
turnoutForce:{
// 道岔强扳
operation: OperationEvent.Switch.turnoutForce.menu.operation
},
locate:{
// 单操到定位
operation: OperationEvent.Switch.locate.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
},
reverse:{
// 单操到反位
operation: OperationEvent.Switch.reverse.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
},
split:{
// 区段切除
operation: OperationEvent.Switch.split.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
},
active:{
// 区段激活
operation: OperationEvent.Switch.active.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
},
setSpeed:{
// 设置临时限速
operation: OperationEvent.Switch.setSpeed.menu.operation,
cmdType:CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
},
alxeEffective:{
// 确认计轴有效
operation: OperationEvent.Switch.alxeEffective.menu.operation,
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
}
},
StationStand:{
setDetainTrain:{
// 设置扣车
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
},
cancelDetainTrain:{
// 取消扣车
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
setJumpStop:{
// 设置跳停
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP
},
cancelJumpStop:{
// 取消跳停
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
},
setStopTime:{
// 停站时间控制
operation: OperationEvent.StationStand.setStopTime.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
},
setRunLevel:{
// 运行时间控制
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
},
earlyDeparture:{
// 设置提前发车
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
},
setBackStrategy:{
// 设置折返策略
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
},
setDetainTrainAuto:{
// 区间列车数量限制
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
},
cancelDetainTrainAuto:{
// 取消区间列车数量限制
operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
},
detail:{
// 查询站台状态
operation: OperationEvent.StationStand.detail.menu.operation
}
},
StationControl:{
requestCentralControl:{
// 请求中控(遥控)
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
},
requestStationControl:{
// 请求站控
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
},
emergencyStationControl:{
// 紧急站控
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
}
},
Common: {
setFault: {
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT
},
cancelFault: {
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
}
};
export function commitOperate(operate, paramList, over) {
const step = {
start: true,
operation: operate.operation,
param:{}
};
step.param = paramList;
// over 0为首次操作1为中间操作2为最后操作3为直接一次性操作
if (over == 0 || over == 3) {
const codeList = Object.values(paramList);
step.code = codeList[0];
}
if (over != 0 && over != 3) {
delete step.start;
}
if (over == 2 || over == 3) {
step.over = true;
step.cmdType = operate.cmdType;
}
return new Promise(function(resolve, reject) {
store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
resolve({ valid: valid, operate: step });
}).catch(error=>{
reject(error);
});
});
}

View File

@ -1,366 +0,0 @@
<template>
<el-dialog v-dialogDrag class="foshan-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="320px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div v-if="buckle">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio"
label="1"
:disabled="radio == 2"
style="display: block; text-align: left;"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio"
label="2"
:disabled="radio == 1"
style="display: block; text-align: left;"
>
本站台下行</el-radio>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
label="1"
:disabled="radio1 == '2'"
style="display: block; text-align: left;"
>
扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
label="2"
:disabled="radio1 == '1'"
style="display: block; text-align: left;"
>
取消扣车</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="AutomaticBuckle">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="autoRadio" label="1" style="display: block; text-align: left;">上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="autoRadio" label="2" style="display: block; text-align: left;">下行</el-radio>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="autoRadio1" label="1" :disabled="autoRadio1 == '2'" style="display: block; text-align: left;">设置</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="autoRadio1" label="2" :disabled="autoRadio1 == '1'" style="display: block; text-align: left;">取消</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
:id="upRadioId"
v-model="radio2"
label="1"
style="display: block; text-align: left;"
:disabled="radio2 == 2"
@change="changeRadio"
>
本站台上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
:id="downRadioId"
v-model="radio2"
label="2"
style="display: block; text-align: left;"
:disabled="radio2 == 1"
@change="changeRadio"
>
本站台下行</el-radio>
</el-col>
</el-row>
</div>
</div>
<el-row 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>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
radio: '1',
radio1: '1',
radio2: '1',
earlyDepar: false, //
buckle: true, //
AutomaticBuckle: false, //
autoRadio: '1',
autoRadio1: '1'
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
upRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
},
downRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
},
title() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
return '提前发车';
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
if (station) {
this.stationName = station.name;
}
}
this.radio = '2';
if (!this.selected.right) { //
this.radio = '1';
}
this.operation = operate.operation;
this.setDefaultItems();
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
setDefaultItems() { //
this.earlyDepar = false;
this.buckle = false;
this.AutomaticBuckle = false;
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.buckle = true;
this.radio1 = '1';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.buckle = true;
this.radio1 = '2';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true;
if (!this.selected.right) {
this.radio2 = '2';
} else {
this.radio2 = '1';
}
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.operation = '';
this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected);
},
changeRadio(val) { //
const operate = {
operation: '',
val: val
};
if (val == 1) {
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
} else if (val == 2) {
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
});
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
/** 设置扣车*/
this.setDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
/** 取消扣车*/
this.cancelDetainTrain();
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
/** 提前发车*/
this.earlyDeparture();
}
},
//
setDetainTrain() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
param: {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
cancelDetainTrain() {
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
param: {
leftDirection: this.radio == '2', // 1 2
rightDirection: this.radio == '1'
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
earlyDeparture() {
const operate = {
over: true,
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -1,355 +0,0 @@
<template>
<el-dialog v-dialogDrag class="foshan-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<el-form label-width="70px" size="mini" style="">
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
</div>
</el-radio-group>
<el-row>
<el-col :span="10">
<el-radio-group :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
</div>
</el-radio-group>
</el-col>
<el-col :span="11" align="top" :offset="2">
<span>车组号</span>
<el-select
:id="selectTrainId"
v-model="model.tripNumber"
style="width: 110px;"
size="mini"
:disabled="!model.val2"
@change="trainNoSelectChange"
>
<el-option
v-for="option in trainList"
:key="option.groupNumber"
:label="option.groupNumber"
:value="option.groupNumber"
/>
</el-select>
</el-col>
</el-row>
</el-row>
</el-form>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
:label="JumpStopSet"
:disabled="radio1 == JumpStopCancel"
style="display: block; text-align: left;"
>
设置</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
:label="JumpStopCancel"
:disabled="radio1 == JumpStopSet"
style="display: block; text-align: left;"
>
取消</el-radio>
</el-col>
</el-row>
</div>
<el-row 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>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'StandDetainTrains',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
trainList: [],
radio1: '',
model: {
val1: '',
val2: '',
tripNumber: '',
direction: ''
}
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selectTrainId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
selfStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
}
},
otherStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
return '跳停';
},
upstream() {
return '02'; //
},
downstream() {
return '01'; //
},
JumpStopSet() {
return OperationEvent.StationStand.setJumpStop.menu.operation;
},
JumpStopCancel() {
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
}
},
watch: {
'model.val1'(val) {
if (val) this.model.val2 = '';
},
'model.val2'(val) {
if (val) this.model.val1 = '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.radio1 = '';
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
if (station) {
this.stationName = station.name;
}
}
this.model.direction = '01';
this.model.val1 = '01'; // , 01: /02:
if (!this.selected.right) {
this.model.direction = '02';
this.model.val1 = '02';
}
this.radio1 = operate.operation;
this.model.val2 = '';
this.model.tripNumber = '';
/** 加载列车数据*/
this.trainList = this.map.trainList;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
/** 设置跳停*/
this.setJumpStop();
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
/** 取消跳停*/
this.cancelJumpStop();
}
},
//
setJumpStop() {
// let val = this.model.val1;
// if (this.model.val2) {
// val = this.model.val2;
// }
const operate = {
over: true,
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
param: {
// Is_This_Platform: val,
trainGroupNumber: this.model.tripNumber
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
cancelJumpStop() {
// let val = this.model.val1;
// if (this.model.val2) {
// val = this.model.val2;
// }
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
param: {
// Is_This_Platform: val,
trainGroupNumber: this.model.tripNumber
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
upAndDownStreamChangeVal1(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
this.model.val2 = '';
this.model.tripNumber = '';
const operate = {
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
upAndDownStreamChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
this.model.val1 = '';
const operate = {
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoSelectChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
this.model.val1 = '';
const operate = {
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -356,35 +356,36 @@ export default {
} }
] ]
}, },
{ // {
title: '批处理命令', // title: '',
operate: OperationEvent.Command.mBar.detainControl, // operate: OperationEvent.Command.mBar.detainControl,
children: [ // click: this.undeveloped,
{ // children: [
title: '全线扣车', // {
operate: OperationEvent.StationStand.setDetainTrainAll.mbar, // title: '线',
click: this.setDetainTrainAll // operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
}, // click: this.setDetainTrainAll
{ // },
title: '取消全线扣车', // {
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar, // title: '线',
click: this.cancelDetainTrainAll // operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
}, // click: this.cancelDetainTrainAll
{ // },
title: '取消上行全线扣车', // {
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar, // title: '线',
click: this.cancelUpDetainTrainAll // operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
}, // click: this.cancelUpDetainTrainAll
{ // },
title: '取消下行全线扣车', // {
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar, // title: '线',
click: this.cancelDownDetainTrainAll // operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
} // click: this.cancelDownDetainTrainAll
] // }
}, // ]
// },
{ {
title: '信息管理', title: '信息管理',
operate: '', operate: OperationEvent.Command.mBar.detainControl,
children: [ children: [
{ {
title: '调度日志', title: '调度日志',
@ -402,6 +403,7 @@ export default {
}, },
{ {
title: '帮助', title: '帮助',
operate: OperationEvent.Command.mBar.detainControl,
children: [ children: [
{ {
title: '关于ITS GPC 工作站', title: '关于ITS GPC 工作站',
@ -622,35 +624,36 @@ export default {
} }
] ]
}, },
{ // {
title: '批处理命令', // title: '',
operate: OperationEvent.Command.mBar.detainControl, // operate: OperationEvent.Command.mBar.detainControl,
children: [ // click: this.undeveloped,
{ // children: [
title: '全线扣车', // {
operate: OperationEvent.StationStand.setDetainTrainAll.mbar, // title: '线',
click: this.setDetainTrainAll // operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
}, // click: this.setDetainTrainAll
{ // },
title: '取消全线扣车', // {
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar, // title: '线',
click: this.cancelDetainTrainAll // operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
}, // click: this.cancelDetainTrainAll
{ // },
title: '取消上行全线扣车', // {
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar, // title: '线',
click: this.cancelUpDetainTrainAll // operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
}, // click: this.cancelUpDetainTrainAll
{ // },
title: '取消下行全线扣车', // {
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar, // title: '线',
click: this.cancelDownDetainTrainAll // operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
} // click: this.cancelDownDetainTrainAll
] // }
}, // ]
// },
{ {
title: '信息管理', title: '信息管理',
operate: '', operate: OperationEvent.Command.mBar.detainControl,
children: [ children: [
{ {
title: '调度日志', title: '调度日志',
@ -668,6 +671,7 @@ export default {
}, },
{ {
title: '帮助', title: '帮助',
operate: OperationEvent.Command.mBar.detainControl,
children: [ children: [
{ {
title: '关于ITS GPC 工作站', title: '关于ITS GPC 工作站',
@ -808,7 +812,7 @@ export default {
}; };
this.tempClassA = index; this.tempClassA = index;
this.tempClassB = -1; this.tempClassB = -1;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -829,7 +833,7 @@ export default {
operation: item.operate.operation operation: item.operate.operation
}; };
this.tempClassB = index; this.tempClassB = index;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -847,7 +851,7 @@ export default {
const operate = { const operate = {
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -862,7 +866,7 @@ export default {
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -876,7 +880,7 @@ export default {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -891,7 +895,7 @@ export default {
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -906,7 +910,7 @@ export default {
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -921,7 +925,7 @@ export default {
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -935,7 +939,7 @@ export default {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -949,7 +953,7 @@ export default {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -963,7 +967,7 @@ export default {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -977,7 +981,7 @@ export default {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -991,7 +995,7 @@ export default {
type: 'bar', type: 'bar',
operation: order.operation operation: order.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.closeMenu(true); this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -91,7 +91,7 @@ export default {
loading: false, loading: false,
operate: null, operate: null,
operation: '', operation: '',
planMode: 5, planMode: 2,
headMode: 5, headMode: 5,
fontSize: 19 fontSize: 19
}; };

View File

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" /> <stand-control ref="standControl" system-name="foshan-01__systerm" />
<stand-jump-stop-control ref="standJumpStopControl" /> <stand-jump-stop-control ref="standJumpStopControl" system-name="foshan-01__systerm" />
<stand-detail ref="standDetail" /> <stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" /> <stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" /> <stand-stop-time ref="standStopTime" />
@ -14,8 +14,8 @@
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl'; import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
import StandJumpStopControl from './dialog/standJumpStopControl'; import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
import StandBackStrategy from './dialog/standBackStrategy'; import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail'; import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel'; import StandRunLevel from './dialog/standRunLevel';

View File

@ -35,8 +35,8 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示 atsAutoTriggerShow: true // ATS自动触发表示灯显示
}; };
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式 nameFormat: 'serviceNumber:groupNumber', // 字体格式
nameFontSize: 10 // 字体大小 nameFontSize: 19 // 字体大小
}; };
this['private'][deviceType.TrainWindow] = { this['private'][deviceType.TrainWindow] = {
trainWindowShow: true trainWindowShow: true

View File

@ -230,18 +230,9 @@ export default {
}, },
// //
fault() { fault() {
const step = { commitOperate(menuOperate.Section.fault, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Section.fault.menu.operation,
param: {
Section_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$refs.sectionCmdControl.doShow(operate, this.selected);
this.$refs.sectionCmdControl.doShow(step, this.selected);
} }
}); });
}, },
@ -252,7 +243,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Section.split.menu.operation, operation: OperationEvent.Section.split.menu.operation,
param: { param: {
Section_Code: `${this.selected.code}` sectionCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/next', step).then(({ valid }) => { this.$store.dispatch('training/next', step).then(({ valid }) => {
@ -269,7 +260,7 @@ export default {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Section.active.menu.operation, operation: OperationEvent.Section.active.menu.operation,
param: { param: {
Section_Code: `${this.selected.code}` sectionCode: `${this.selected.code}`
} }
}; };
this.$store.dispatch('training/next', step).then(({ valid }) => { this.$store.dispatch('training/next', step).then(({ valid }) => {

View File

@ -1,142 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm two-confirmation"
:title="$t('menu.menuChildDialog.secondaryConfirmation')"
:visible.sync="show"
width="360px"
:before-close="doClose"
:show-close="false"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div class="context">
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.close') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TwoConfirmation',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: '',
timer: null,
domIdConfirm: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
messages() {
if (this.operate) {
return this.operate.messages;
}
return [];
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.domIdConfirm = '';
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
}
this.operate = operate || {};
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.confirm.operation
};
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
},
commit() {
if (this.operate) {
this.loading = true;
(this.operate.selection || []).forEach(elem => {
const operate = {
val: elem.code,
param: {
ControlMode_Code: elem.code
}
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
}
this.doClose();
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
});
this.loading = false;
}
}
}
};
</script>

View File

@ -1,172 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm user-add"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input v-model="model.password" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input v-model="model.confirm" type="password" />
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserAdd',
components: {
},
data() {
return {
operate: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'ADD',
jobNumber: '',
userName: '',
password: '',
confirm: ''
},
rules: {
jobNumber: [
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
password: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputPasswordAgain'), trigger: 'change' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.addUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.model.password === this.model.confirm) {
this.doClose();
this.$emit('operateUser', this.model);
} else {
this.$messageBox(this.$t('menu.menuChildDialog.passwordInconsistent'));
}
}
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); this.model; });
}
}
};
</script>
<style scoped>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,143 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm user-delete"
:title="title"
:visible.sync="show"
width="260px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding-left: 10px; padding-bottom: 10px">
<i class="el-icon-info" />
<template v-for="(message,index) in messages">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="3">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="2">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserDelete',
components: {
},
data() {
return {
operate: {},
messages: [],
model: {
type: 'DELETE',
jobNumber: '',
userName: ''
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.deleteUser');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.messages = operate.messages;
this.model.userName = '';
this.model.jobNumber = '';
if (selected) {
this.model.userName = selected.userName;
this.model.jobNumber = selected.jobNumber;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.model.userName && this.model.jobNumber) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$emit('operateUser', this.model);
}
});
} else {
this.$messageBox(this.$t('menu.menuChildDialog.selectTips'));
}
},
cancel() {
const operate = {
type: this.operate.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>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,189 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm user-edit"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form ref="form" size="small" label-width="90px" :model="model" label-position="left" :rules="rules">
<el-form-item :label="$t('menu.menuChildDialog.jobNumber')" prop="jobNumber">
<el-input v-model="model.jobNumber" disabled />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.userName')" prop="userName">
<el-input v-model="model.userName" disabled />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.originalPassword')" prop="oldPassword">
<el-input v-model="model.oldPassword" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.password')" prop="password">
<el-input v-model="model.password" type="password" />
</el-form-item>
<el-form-item :label="$t('menu.menuChildDialog.confirmPassword')" prop="confirm">
<el-input v-model="model.confirm" type="password" />
</el-form-item>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuChildDialog.determine') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuChildDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'UserEdit',
components: {
},
data() {
return {
operate: {},
selected: {},
operation: null,
dialogShow: false,
loading: false,
model: {
type: 'EDIT',
jobNumber: '',
userName: '',
oldPassword: '',
password: '',
confirm: ''
},
rules: {
jobNumber: [
{ required: true, message: this.$t('menu.menuChildDialog.inputJobNumber'), trigger: 'blur' }
],
userName: [
{ required: true, message: this.$t('menu.menuChildDialog.inputUserName'), trigger: 'blur' }
],
oldPassword: [
{ required: true, message: this.$t('menu.menuChildDialog.inputOriginal'), trigger: 'change' }
],
password: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewPassword'), trigger: 'change' }
],
confirm: [
{ required: true, message: this.$t('menu.menuChildDialog.inputNewAgain'), trigger: 'change' }
]
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
title() {
return this.$t('menu.menuChildDialog.userEditPage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.selected = selected;
if (selected) {
this.model.jobNumber = selected.jobNumber;
this.model.userName = selected.userName;
}
});
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
if (this.selected.password !== this.model.oldPassword) {
this.$messageBox(this.$t('menu.menuChildDialog.originalPasswordError'));
} else if (this.model.password !== this.model.confirm) {
this.$messageBox(this.$t('menu.menuChildDialog.passwordError'));
} else if (this.model.oldPassword === this.model.password) {
this.$messageBox(this.$t('menu.menuChildDialog.passwordSame'));
} else {
this.doClose();
this.$emit('operateUser', this.model);
}
}
});
} else {
return false;
}
});
},
cancel() {
const operate = {
type: this.operate.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>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,140 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm manage-user"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="height: 70px;">
<div style="position: relative; left: 10px;" />
<div style="position: relative; left: 80px;">
<div style="width:100%">
<span style="padding-left: 60px">{{ $t('menu.menuDialog.versionName') }}</span>
<el-button
:id="domIdConfirm"
style="position: absolute; right: 95px;"
type="primary"
:loading="loading"
@click="commit"
>{{ $t('menu.menuDialog.confirm') }}</el-button>
</div>
<div style="width:100%; padding-top: 20px">
<span> {{ $t('menu.menuDialog.copyright') }}</span>
</div>
</div>
</div>
<div style="padding: 10px; margin: 5px; ">
<el-table :data="tableData" style="width: 100%;" height="400">
<el-table-column prop="moduleName" :label="$t('menu.menuDialog.moduleName')" width="180" />
<el-table-column prop="version" :label="$t('menu.menuDialog.version')" width="180" />
<el-table-column prop="updateDate" :label="$t('menu.menuDialog.modifyDate')" />
</el-table>
</div>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
data() {
return {
tableData: [
{
moduleName: this.$t('menu.menuDialog.mainProgramVersion'),
version: '123',
updateDate: '123'
}
],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.about');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.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>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,309 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm manage-user"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">{{ $t('menu.menuDialog.userList') }}</span>
<el-row>
<el-col :span="18">
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="450"
center
size="mini"
highlight-current-row
@row-click="chooseUser"
>
<el-table-column prop="jobNumber" :label="$t('menu.menuDialog.jobNumber')" width="120">
<template slot-scope="scope">
<span>{{ scope.row.jobNumber }}</span>
</template>
</el-table-column>
<el-table-column prop="userName" :label="$t('menu.menuDialog.userName')">
<template slot-scope="scope">
<span>{{ scope.row.userName }}</span>
</template>
</el-table-column>
<el-table-column width="20" />
</el-table>
</el-col>
<el-col :span="4">
<el-button :id="domIdFreshUser" style="margin-top: 140px; margin-left: 10px;" @click="freshUser">{{ $t('menu.menuDialog.refresh') }}
</el-button>
<el-button :id="domIdAddUser" style="margin-top: 30px; margin-left: 10px;" @click="addUser">{{ $t('menu.menuDialog.add') }}
</el-button>
<el-button :id="domIdEditUser" style="margin-top: 30px; margin-left: 10px;" @click="editUser">{{ $t('menu.menuDialog.modify') }}
</el-button>
<el-button :id="domIdDelUser" style="margin-top: 30px; margin-left: 10px;" @click="delUser">{{ $t('menu.menuDialog.delete') }}
</el-button>
</el-col>
</el-row>
</div>
<el-row justify="center" class="button-group">
<el-col :span="8" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<user-add ref="userAdd" @operateUser="operateUser" />
<user-edit ref="userEdit" @operateUser="operateUser" />
<user-delete ref="userDelete" @operateUser="operateUser" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import UserAdd from './childDialog/userAdd';
import UserEdit from './childDialog/userEdit';
import UserDelete from './childDialog/userDelete';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ManageUser',
components: {
UserAdd,
UserEdit,
UserDelete
},
data() {
return {
tableData: [],
operate: {},
operation: null,
dialogShow: false,
loading: false,
selected: null
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdAddUser() {
return this.dialogShow ? OperationEvent.Command.manage.addUser.domId : '';
},
domIdEditUser() {
return this.dialogShow ? OperationEvent.Command.manage.editUser.domId : '';
},
domIdDelUser() {
return this.dialogShow ? OperationEvent.Command.manage.delUser.domId : '';
},
domIdFreshUser() {
return this.dialogShow ? OperationEvent.Command.manage.freshUser.domId : '';
},
domIdChooseUser() {
return this.dialogShow ? OperationEvent.Command.manage.chooseUser.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
title() {
return this.$t('menu.menuDialog.userManage');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
//
addUser() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.addUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userAdd.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
editUser() {
if (this.selected) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.editUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
delUser() {
if (this.selected) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.delUser.operation,
messages: [`${this.$t('menu.menuDialog.deleteMessageOne')} ${this.selected.userName} ${this.$t('menu.menuDialog.deleteMessageTwo')}`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userDelete.doShow(operate, this.selected);
}
}).catch(() => {
this.loading = false;
});
} else {
this.$messageBox(this.$t('menu.menuDialog.selectUser'));
}
},
//
freshUser() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.freshUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
}).catch(() => {
this.loading = false;
});
},
//
chooseUser(row) {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.chooseUser.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.selected = row;
}).catch(() => {
this.loading = false;
});
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
},
//
operateUser(data) {
if (data && data.type === 'ADD') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index < 0) {
this.tableData.push({
jobNumber: data.jobNumber,
userName: data.userName,
password: data.password
});
} else {
this.$messageBox(this.$t('menu.menuDialog.addFail'));
}
} else if (data && data.type === 'EDIT') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index >= 0) {
this.tableData[index].password = data.password;
this.tableData[index].userName = data.userName;
} else {
this.$messageBox(this.$t('menu.menuDialog.modifyFail'));
}
} else if (data && data.type === 'DELETE') {
const index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber; }));
if (index >= 0) {
this.tableData.splice(index, 1);
this.selected = null;
} else {
this.$messageBox(this.$t('menu.menuDialog.deleteFail'));
}
}
}
}
};
</script>
<style scoped>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -10px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,228 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm password-box"
:title="$t('menu.menuDialog.passwordBox')"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="context" style="overflow:hidden">
<el-form label-width="80px" size="mini">
<el-form-item prop="username">
<span slot="label">{{ $t('menu.menuDialog.userNameLabel') }}</span>
<el-input v-model="model.username" disabled />
</el-form-item>
<el-form-item prop="password">
<span slot="label">{{ $t('menu.menuDialog.password') }}</span>
<el-input v-model="model.password" type="password" />
</el-form-item>
</el-form>
<div class="operate">
<el-button-group v-model="key" class="left" size="mini">
<el-button size="mini" @click="click(1)">1</el-button>
<el-button size="mini" @click="click(2)">2</el-button>
<el-button size="mini" @click="click(3)">3</el-button>
<el-button size="mini" @click="click(4)">4</el-button>
<el-button size="mini" @click="click(5)">5</el-button>
</el-button-group>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="esc">{{ $t('menu.menuDialog.back') }}</el-button>
</el-button-group>
<el-button-group v-model="key" class="left" size="mini">
<el-button size="mini" @click="click(6)">6</el-button>
<el-button size="mini" @click="click(7)">7</el-button>
<el-button size="mini" @click="click(8)">8</el-button>
<el-button size="mini" @click="click(9)">9</el-button>
<el-button size="mini" @click="click(0)">0</el-button>
</el-button-group>
<el-button-group v-model="key" class="right" size="mini">
<el-button @click="clr">{{ $t('menu.menuDialog.clear') }}</el-button>
</el-button-group>
</div>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'PasswordBox',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: null,
model: {
username: '',
password: ''
},
key: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(operate) {
this.model.username = '';
this.model.password = '';
this.operate = operate || {};
this.operation = operate.operation;
this.model.username = this.$store.state.user.nickname;
},
doShow(operate) {
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
if (!this.dialogShow) {
this.loadInitData(operate);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
}
if (this.model.password == '123456') {
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setLoginResult', {
operation: operate.operation,
success: valid
});
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setLoginResult', {
operation: operate.operation,
success: false
});
});
} else {
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
}
},
click(key) {
if (!this.model.password) {
this.model.password = '';
}
this.model.password += key;
},
esc() {
if (this.model.password) {
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
}
},
clr() {
this.model.password = '';
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.password-box .el-form {
margin-top: 10px !important;
margin-right: 20px !important;
}
.password-box .el-form-item {
margin-bottom: 5px !important;
}
.password-box .context {
height: 170px !important;
}
.password-box .operate {
margin-top: 10px !important;
padding-bottom: 10px !important;
}
.password-box .left {
margin-left: 10px !important;
}
.password-box .left .el-button {
color: #000;
background: #F0F0F0;
text-align: center;
width: 30px !important;
}
.password-box .right {
color: #000;
margin-left: 10px !important;
background: #F0F0F0;
width: 80px !important;
}
</style>

View File

@ -1,463 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm station-control-convert"
:title="$t('menu.menuDialog.controlModeConversion')"
:visible.sync="show"
width="700px"
:before-close="doClose"
:show-close="true"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-table
ref="multipleTable"
:data="tableData"
border
row-key="code"
style="width: 100%"
height="250"
center
size="mini"
highlight-current-row
>
<el-table-column :id="domIdChoose" prop="check" :label="$t('menu.menuDialog.select')" width="60" style="margin-left:30px">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
</template>
</el-table-column>
<el-table-column prop="operate" :label="$t('menu.menuDialog.operatingArea')" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template>
</el-table-column>
<el-table-column prop="control" :label="$t('menu.menuDialog.controlMode')" width="80">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
</template>
</el-table-column>
<el-table-column prop="status" :label="$t('menu.menuDialog.centerStationCommunicationStatus')" width="140">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
</template>
</el-table-column>
<el-table-column prop="result" :label="$t('menu.menuDialog.transferExecutionStatus')">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
</template>
</el-table-column>
</el-table>
<el-row class="button-group">
<el-col :span="10" :offset="3" class="control_button">
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">{{ $t('menu.menuDialog.forcedStationControl') }}</el-button>
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">{{ $t('menu.menuDialog.requestStationControl') }}
</el-button>
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">{{ $t('menu.menuDialog.requestInTheControl') }}
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">{{ $t('menu.menuDialog.close') }}
</el-button>
</el-col>
</el-row>
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import TwoConfirmation from './childDialog/twoConfirmation';
export default {
name: 'StationControlConvert',
components: {
TwoConfirmation
},
data() {
return {
operate: null,
dialogShow: false,
disabledSend: false,
disabledSure: false,
disabledClose: false,
operation: '',
controlProps: {
'01': this.$t('menu.menuDialog.inTheControl'),
'02': this.$t('menu.menuDialog.stationControl')
},
selection: [],
tableData: [],
timer: null,
count: 0,
flagListBit: [],
backOperate: '',
timeout: 61,
counts: 0
};
},
computed: {
...mapGetters('map', [
'stationList',
'stationControlList'
]),
...mapGetters('training', [
'mode',
'started'
]),
disabledCommit() {
return this.disabledSend || this.disabledSure;
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
isFork() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
}
return false;
},
isRequest() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
}
return false;
},
isConter() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
}
return false;
},
domIdChoose() {
if (this.dialogShow) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
return OperationEvent.StationControl.forcedStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
return OperationEvent.StationControl.requestStationControl.choose.domId;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
return OperationEvent.StationControl.requestCentralControl.choose.domId;
}
}
return false;
},
domIdConter() {
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
},
domIdFork() {
return this.dialogShow ? OperationEvent.StationControl.forcedStationControl.menu.domId : '';
},
domIdRequest() {
return this.dialogShow ? OperationEvent.StationControl.requestStationControl.menu.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}
},
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem) {
this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
if (elem.hasOwnProperty('timeout')) {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
} else if (elem.hasOwnProperty('agree')) {
if (elem.agree) {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
} else {
this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
}
}
this.disabledClose = false;
this.disabledSure = false;
}
},
backOperate: function (operate) {
if (this.dialogShow && operate) {
if (operate.selection && operate.selection.length) {
operate.selection.forEach(elem => {
if (operate.commit) {
this.updateTableValue(elem.code, { result: `${this.$t('menu.menuDialog.senedMessageOne')}${this.timeout} ${this.$t('menu.menuDialog.senedMessageTwo')}` }, false);
} else if (operate.cancel) {
this.updateTableValue(elem.code, { result: '' }, false);
}
});
}
}
},
//
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.loadTableData();
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
updateTableValue(code, result, success) {
this.tableData.forEach((row, index) => {
if (row.code == code) {
for (const prop in result) {
row[prop] = result[prop];
}
if (success) {
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
row.control = this.controlProps['02']; // 01: 02:
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
row.control = this.controlProps['01']; // 01: 02:
}
row.disabled = true;
row.check = false;
}
}
});
},
checkTableDataSelction(data) {
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
});
}
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection);
this.selection = selection;
}
},
checkBoxDisabled(row) {
const control = (this.$store.getters['map/getDeviceByCode'](row.code) || {});
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
if (control && control.status == '02') { // 01: 02:
return true;
}
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
if (control && control.status == '01') { // 01: 02:
return true;
}
}
},
loadTableData() {
this.tableData = [];
this.stationControlList && this.stationControlList.forEach(control => {
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
this.tableData.push({
code: control.code,
operate: station.name || '',
control: '',
check: false,
disabled: false,
status: this.$t('menu.menuDialog.normal'),
result: ''
});
});
},
initTableDataStatus() {
this.tableData.forEach(row => {
row.disabled = this.checkBoxDisabled(row);
row.check = false;
row.result = '';
const control = this.$store.getters['map/getDeviceByCode'](row.code);
if (control) {
row.control = this.controlProps[control.status];
}
});
},
doShow(operate) {
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
this.disabledSure = false;
this.initTableDataStatus();
}
this.dialogShow = true;
this.$store.dispatch('training/emitTipFresh');
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
setTimer() {
this.clearTimer();
this.flagListBit = new Array(this.selection.length).fill(true);
this.timer = setInterval(() => {
(this.selection || []).forEach((elem, index) => {
if (this.flagListBit[index]) {
elem['count'] = (elem['count'] || 0) + 1;
elem['count'] > this.timeout && (
this.flagListBit[index] = false,
this.setRequestTimeout(elem)
);
}
});
this.flagListBit.findIndex(elem => { return elem; }) < 0 && this.clearTimer();
}, 1000);
},
clearTimer() {
this.count = 0;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
setRequestTimeout(elem) {
elem['count'] = 0;
this.$store.dispatch('socket/pushMsgQueue',
{ type: 'resp', timeout: 'true', stationControlCode: elem.code }
);
},
handleChooseChange(selection) {
this.selection = selection;
const stationCodeList = selection.map(elem => { return elem.code; });
if (selection && selection.length) {
const operate = {
operation: '',
val: stationCodeList.join('::'),
selection: selection
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.choose.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.choose.operation;
}
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.disabledSure = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox(this.$t('menu.menuDialog.selectData'));
}
},
requestCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmStationControlTip')],
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
forkCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
conterCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = {
messages: [this.$t('menu.menuDialog.confirmInTheControlTip')],
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
val: stationCodeList.join('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`${this.$t('menu.menuDialog.operatingArea')} ${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.twoConfirmation.doShow(operate);
} else {
this.disabledSure = false;
}
}).catch(() => {
this.disabledSure = false;
});
},
getOperate(operate) {
this.backOperate = operate;
if (operate.cancel) {
this.disabledSure = this.disabledSend = false;
}
if (operate.commit || operate.timeout) {
this.disabledSend = this.disabledSure = true;
}
this.setTimer();
this.disabledClose = true;
this.counts = 1;
}
}
};
</script>
<style lang="scss" scoped>
.haerbin-01__systerm .el-dialog .control_button button{
max-width:180px;
width:auto ;
padding-left: 5px ;
padding-right: 5px ;
min-width: 80px;
}
</style>

View File

@ -1,179 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">{{ $t('menu.menuDialog.addLocation') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalOne') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item prop="trainNumberLimber">
<span id="frontTrainNumber" slot="label">{{ $t('menu.menuDialog.frontTrainNumber') }}</span>
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
<el-form-item id="groupNumber" :label="$t('menu.menuDialog.addTrainNumber')" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
// trainNumberLimber: [
// { required: true, message: '', trigger: 'blur' }
// ],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.addPlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
#frontTrainNumber,#groupNumber label{
line-height: 100%;
display: inline-block;
}
</style>

View File

@ -1,157 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.deletePlanTrain');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.haerbin-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -1,164 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
<el-form-item :label="$t('menu.menuDialog.trainNumber')" label-width="115px" prop="groupNumber">
<el-input v-model="addModel.groupNumber" />
</el-form-item>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">{{ $t('menu.menuDialog.purpose') }}</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">{{ $t('menu.menuDialog.terminalTwo') }}</span>
<el-select v-model="addModel.stationStandCode" filterable :placeholder="$t('menu.menuDialog.pleaseSelect')">
<el-option
v-for="item in stationStandList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('menu.menuDialog.trainNumber')" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainTranstalet',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
groupNumber: '',
stationStandCode: '',
trainNumberLimber: ''
},
rules: {
groupNumber: [
{ required: true, message: this.$t('menu.menuDialog.inputTrainNumber'), trigger: 'blur' }
],
trainNumberLimber: [
{ required: true, message: this.$t('menu.menuDialog.inputFrontNumber'), trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: this.$t('menu.menuDialog.selectTerminal'), trigger: 'change' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
},
title() {
return this.$t('menu.menuDialog.panPlanCar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,166 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm view-display"
:title="$t('menu.menuDialog.deviceDisplaySettings')"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="deviceLevels">
<div>
<el-checkbox :label="1">{{ $t('menu.menuDialog.trainWindow') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="2">{{ $t('menu.menuDialog.sectionBoundary') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="3">{{ $t('menu.menuDialog.linkageAutoRouteShow') }}</el-checkbox>
</div>
<div>
<el-checkbox :label="4">{{ $t('menu.menuDialog.atsAutoTriggerShow') }}</el-checkbox>
</div>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" class="commit" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}
</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" class="cancal" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewDevice',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
deviceLevels: [2, 3, 4, 5]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setDeviceDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.deviceLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setDeviceDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setDeviceDisplay() {
const deviceList = [];
//
const borderBorderShow = this.deviceLevels.indexOf(2) !== -1;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {borderBorderShow }));
});
}
//
const trainWindowShow = this.deviceLevels.indexOf(1) !== -1;
const trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {trainWindowShow }));
});
}
// ATS
const linkageAutoRouteShow = this.deviceLevels.indexOf(3) !== -1; //
const atsAutoTriggerShow = this.deviceLevels.indexOf(4) !== -1; // ATS
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { linkageAutoRouteShow, atsAutoTriggerShow }));
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
</style>

View File

@ -1,248 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm view-name"
:title="$t('menu.menuDialog.nameDisplaySetting')"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-checkbox-group v-model="nameLevels">
<el-row>
<el-col :span="10">
<el-checkbox :label="1">{{ $t('menu.menuDialog.signalName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="2">{{ $t('menu.menuDialog.standTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="3" disabled>{{ $t('menu.menuDialog.buttonName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="4">{{ $t('menu.menuDialog.reentryTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="5">{{ $t('menu.menuDialog.trackName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="6">{{ $t('menu.menuDialog.transferTrackName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="7">{{ $t('menu.menuDialog.turnoutName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="8">{{ $t('menu.menuDialog.indicatorName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="9">{{ $t('menu.menuDialog.turnoutSectionName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="10">{{ $t('menu.menuDialog.destinationName') }}</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="11">{{ $t('menu.menuDialog.axisSectionName') }}</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="12">{{ $t('menu.menuDialog.kmPost') }}</el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import deviceType from '@/jmap/constant/deviceType';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewName',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
nameLevels: [1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12]
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setNameDisplay();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
//
if (!this.dialogShow) {
this.operate = operate || {};
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: this.nameLevels.sort().join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setNameDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setNameDisplay() {
const deviceList = [];
//
let nameShow = this.nameLevels.indexOf(1) !== -1;
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
});
}
//
nameShow = this.nameLevels.indexOf(7) !== -1; //
const switchSectionNameShow = this.nameLevels.indexOf(9) !== -1; //
const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameShow, switchSectionNameShow }));
});
}
//
const indicatorShow = this.nameLevels.indexOf(8) !== -1;
const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
//
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow }));
});
}
//
nameShow = false;
let standTrackNameShow = false;
let reentryTrackNameShow = false;
let transferTrackNameShow = false;
const sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
elem._type = deviceType.Section;
if (elem.isSwitchSection && elem.parentCode) {
//
nameShow = false;
} else {
if (elem.type === '01') {
//
nameShow = this.nameLevels.indexOf(11) !== -1;
} else if (elem.type === '02') {
//
nameShow = this.nameLevels.indexOf(5) !== -1;
} else if (elem.type === '03') {
//
nameShow = this.nameLevels.indexOf(9) !== -1;
}
}
//
if (elem.isStandTrack) {
standTrackNameShow = this.nameLevels.indexOf(2) !== -1;
}
//
if (elem.isReentryTrack) {
reentryTrackNameShow = this.nameLevels.indexOf(4) !== -1;
}
//
if (elem.isTransferTrack) {
transferTrackNameShow = this.nameLevels.indexOf(6) !== -1;
}
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
});
}
//
const kmPostShow = this.nameLevels.indexOf(12) !== -1;
const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
});
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>

View File

@ -1,209 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="haerbin-01__systerm view-train-id"
:title="$t('menu.menuDialog.trainIDDisplaySetting')"
:visible.sync="show"
width="420px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{ $t('menu.menuDialog.plantrainDisplayMode') }}</span>
<el-radio-group v-model="planMode">
<el-row>
<el-col :span="10">
<el-radio :label="1">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="2">{{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
<el-row class="elrow">
<el-col :span="10">
<el-radio :label="5">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="10" :offset="4">
<el-radio :label="6">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.serviceNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray; margin: 20px 0px;">
<span class="base-label">{{ $t('menu.menuDialog.headCodeStationDisplayMode') }}</span>
<el-radio-group v-model="headMode">
<el-row>
<el-col :span="10">
<el-radio :label="3">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.tripNumber') }}</el-radio>
</el-col>
<el-col :span="6" :offset="4">
<el-radio :label="4">{{ $t('menu.menuDialog.targetNumber') }} + {{ $t('menu.menuDialog.groupNumber') }}</el-radio>
</el-col>
</el-row>
</el-radio-group>
</div>
<div style="padding: 10px 20px; border: 1px double lightgray;">
<span class="base-label">{{ $t('menu.menuDialog.fontSize') }}</span>
<el-row>
<el-col :span="10">
<el-input v-model="fontSize" size="small" min="16" max="99" />
</el-col>
<el-col :span="10" :offset="1">
<span style="height:32px; line-height:32px;">{{ $t('menu.menuDialog.range') }}</span>
</el-col>
</el-row>
</div>
<el-row class="button-group">
<el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('menu.menuDialog.confirm') }}</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel">{{ $t('menu.menuDialog.cancel') }}</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import deviceType from '@/jmap/constant/deviceType';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'ViewTrainId',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: '',
planMode: 5,
headMode: 5,
fontSize: 16
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
},
mounted() {
this.$nextTick(() => {
this.setTrainDispaly();
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
//
if (!this.dialogShow) {
this.loading = false;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
over: true,
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
val: [this.planMode, this.headMode, this.fontSize].join('::')
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.setTrainDispaly();
this.doClose();
}
}).catch(() => {
this.loading = false;
});
},
setTrainDispaly() {
const updatlist = [];
const trainList = this.$store.getters['training/viewTrainList']();
if (trainList && trainList.length > 0) {
const nameFormat = this.trainNameFormatBy(this.planMode);
const nameFontSize = this.fontSize;
trainList.forEach(elem => {
updatlist.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), {nameFormat, nameFontSize }));
});
this.$store.dispatch('map/updateMapDevices', updatlist);
}
},
trainNameFormatBy(mode) {
switch (mode.toString()) {
case '1': return 'serviceNumber:tripNumber'; // +
case '2': return 'serviceNumber:groupNumber'; // +
case '3': return 'targetCode:tripNumber'; // +
case '4': return 'targetCode:groupNumber'; // +
case '5': return 'targetCode:serviceNumber:tripNumber'; // ++
case '6': return 'targetCode:serviceNumber:groupNumber'; // ++
}
return ''; //
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ {
.el-dialog .el-radio__label{
width: 150px ;
white-space: pre-wrap ;
display: inline-block ;
}
.el-radio__input{
vertical-align: top;
}
}
.elrow{
margin-top:4px;
}
</style>

View File

@ -35,8 +35,6 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示 atsAutoTriggerShow: true // ATS自动触发表示灯显示
}; };
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
}; };
this['private'][deviceType.TrainWindow] = { this['private'][deviceType.TrainWindow] = {
trainWindowShow: true trainWindowShow: true

View File

@ -1,327 +0,0 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm stand-detain-train" :title="title" :visible.sync="show" width="380px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header">
<el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<el-form label-width="70px" size="mini" style="">
<el-row style="margin-top: 20px;padding: 10px 5px; border: 1px solid lightgray;">
<span class="base-label" style="display:block; padding-left: 20px;">范围</span>
<el-radio-group :id="selfStationStandId" v-model="model.val1" @change="upAndDownStreamChangeVal1">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">本站台上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">本站台下行跳停</el-radio>
</div>
</el-radio-group>
<el-row>
<el-col :span="10">
<el-radio-group :id="otherStationStandId" v-model="model.val2" @change="upAndDownStreamChange">
<div style="margin-bottom: 8px;">
<el-radio :label="upstream" :disabled="model.direction !== '02'">指定列车上行跳停</el-radio>
</div>
<div style="margin-bottom: 8px;">
<el-radio :label="downstream" :disabled="model.direction !== '01'">指定列车下行跳停</el-radio>
</div>
</el-radio-group>
</el-col>
<el-col :span="11" align="top" :offset="2">
<span>车组号</span>
<el-select
:id="selectTrainId"
v-model="model.tripNumber"
style="width: 110px;"
size="mini"
:disabled="!model.val2"
@change="trainNoSelectChange"
>
<el-option
v-for="option in trainList"
:key="option.groupNumber"
:label="option.groupNumber"
:value="option.groupNumber"
/>
</el-select>
</el-col>
</el-row>
</el-row>
</el-form>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio
v-model="radio1"
:label="JumpStopSet"
:disabled="radio1 == JumpStopCancel"
style="display: block; text-align: left;"
>
设置</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
v-model="radio1"
:label="JumpStopCancel"
:disabled="radio1 == JumpStopSet"
style="display: block; text-align: left;"
>
取消</el-radio>
</el-col>
</el-row>
</div>
<el-row 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>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '../utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'StandDetainTrains',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
trainList: [],
radio1: '',
model: {
val1: '',
val2: '',
tripNumber: '',
direction: ''
}
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
selectTrainId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
selfStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.selfStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.selfStationStand.domId : '';
}
},
otherStationStandId() {
if (this.radio1 == this.JumpStopSet) {
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.otherStationStand.domId : '';
} else {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.otherStationStand.domId : '';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
return '跳停';
},
upstream() {
return '02'; //
},
downstream() {
return '01'; //
},
JumpStopSet() {
return OperationEvent.StationStand.setJumpStop.menu.operation;
},
JumpStopCancel() {
return OperationEvent.StationStand.cancelJumpStop.menu.operation;
}
},
watch: {
'model.val1'(val) {
if (val) this.model.val2 = '';
},
'model.val2'(val) {
if (val) this.model.val1 = '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
if (!this.dialogShow) {
this.radio1 = '';
this.standName = '';
this.stationName = '';
if (selected) {
this.standName = selected.name;
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
if (station) {
this.stationName = station.name;
}
}
this.model.direction = '01';
this.model.val1 = '01'; // , 01: /02:
if (this.selected.right) {
this.model.direction = '02';
this.model.val1 = '02';
}
this.radio1 = operate.operation;
this.model.val2 = '';
this.model.tripNumber = '';
/** 加载列车数据*/
this.trainList = this.map.trainList;
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected);
},
commit() {
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
/** 设置跳停*/
this.setJumpStop();
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
/** 取消跳停*/
this.cancelJumpStop();
}
},
//
setJumpStop() {
this.loading = true;
commitOperate(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
//
cancelJumpStop() {
this.loading = true;
commitOperate(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.model.tripNumber}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
},
upAndDownStreamChangeVal1(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
this.model.val2 = '';
this.model.tripNumber = '';
const operate = {
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
upAndDownStreamChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
this.model.val1 = '';
const operate = {
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoSelectChange(val) {
const operation = this.radio1 == this.JumpStopSet
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
this.model.val1 = '';
const operate = {
operation: operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
};
</script>
<style>
.stand-detain-train .context {
height: 80px !important;
}
</style>

View File

@ -16,10 +16,10 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" /> <el-input v-model="addModel.groupNumber" size="mini" :disabled="trueValue" />
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-input :id="domIdInput" v-model="addModel.serialNumber" size="mini" @change="inputGroupNumber" /> <el-input v-model="addModel.serviceNumber" size="mini" :disabled="trueValue" />
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -27,7 +27,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-input v-model="addModel.targetCode" size="mini" /> <el-input :id="domIdTargetCodeChange" v-model="addModel.destinationCode" size="mini" />
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -44,8 +44,9 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default { export default {
name: 'TrainSetHead', name: 'TrainSetHead',
@ -58,10 +59,11 @@ export default {
selected: null, selected: null,
addModel: { addModel: {
groupNumber: '', groupNumber: '',
targetCode: '', destinationCode: '',
serialNumber: '' serviceNumber: ''
}, },
dialogShow: false, dialogShow: false,
trueValue: true,
loading: false loading: false
}; };
}, },
@ -72,8 +74,8 @@ export default {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() { domIdTargetCodeChange() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : ''; return this.dialogShow ? OperationEvent.Train.destinationTrainId.targetCodeChange.domId : '';
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
@ -95,14 +97,7 @@ export default {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode); this.addModel.groupNumber = selected.groupNumber;
if (section) {
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
@ -116,29 +111,14 @@ export default {
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
inputGroupNumber() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.groupNumber
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() { commit() {
const operate = { const params = {
send: true, groupNumber: this.addModel.groupNumber,
type: MapDeviceType.Train.type, destinationCode: this.addModel.destinationCode,
operation: OperationEvent.Train.editTrainId.menu.operation, serviceNumber: this.addModel.serviceNumber
val: this.addModel.groupNumber
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { commitOperate(menuOperate.TrainWindow.destinationTrainId, params, 2).then(({valid})=>{
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -151,11 +131,9 @@ export default {
}, },
cancel() { cancel() {
const operate = { const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -15,7 +15,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-input v-model="addModel.groupNumber" size="mini" /> <el-input v-model="addModel.groupNumber" size="mini" :disabled="true" />
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -24,13 +24,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-input v-model="addModel.serialNumber" size="mini" /> <el-input :id="domIdServerNoChange" v-model="addModel.serviceNumber" size="mini" />
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-input :id="domIdInput" v-model="addModel.tripNumber" @change="inputGroupNumber" size="mini" /> <el-input :id="domIdTrainNoChange" v-model="addModel.tripNumber" size="mini" />
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10"> <el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
@ -45,8 +44,9 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default { export default {
name: 'TrainSetPlan', name: 'TrainSetPlan',
@ -60,7 +60,7 @@ export default {
addModel: { addModel: {
groupNumber: '', groupNumber: '',
tripNumber: '', tripNumber: '',
serialNumber: '' serviceNumber: ''
}, },
dialogShow: false, dialogShow: false,
loading: false loading: false
@ -73,8 +73,11 @@ export default {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() { domIdServerNoChange() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : ''; return this.dialogShow ? OperationEvent.Train.setPlanTrainId.serverNoChange.domId : '';
},
domIdTrainNoChange() {
return this.dialogShow ? OperationEvent.Train.setPlanTrainId.trainNoChange.domId : '';
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
@ -97,6 +100,7 @@ export default {
// //
// if (!this.dialogShow) { // if (!this.dialogShow) {
// } // }
this.addModel.groupNumber = selected.groupNumber;
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -109,29 +113,15 @@ export default {
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
inputGroupNumber() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.tripNumber
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() { commit() {
const operate = { const params = {
send: true, groupNumber: this.addModel.groupNumber,
type: MapDeviceType.Train.type, tripNumber: this.addModel.tripNumber,
operation: OperationEvent.Train.editTrainId.menu.operation, serviceNumber: this.addModel.serviceNumber
val: this.addModel.tripNumber
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { commitOperate(menuOperate.TrainWindow.setPlanTrainId, params, 2).then(({valid})=>{
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -144,11 +134,10 @@ export default {
}, },
cancel() { cancel() {
const operate = { const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -13,7 +13,7 @@
<el-row> <el-row>
<el-col :span="6" style="line-height: 44px;">车组号:</el-col> <el-col :span="6" style="line-height: 44px;">车组号:</el-col>
<el-col :span="18"> <el-col :span="18">
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" /> <el-input v-model="addModel.groupNumber" size="mini" :disabled="true" />
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -30,8 +30,9 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { menuOperate, commitOperate } from '../utils/menuOperate';
export default { export default {
name: 'TrainSetWork', name: 'TrainSetWork',
@ -56,14 +57,11 @@ export default {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() {
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
},
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; return this.dialogShow ? OperationEvent.Train.artificialTrainId.menu.domId : '';
}, },
title() { title() {
return '设置人工车'; return '设置人工车';
@ -79,14 +77,7 @@ export default {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode); this.addModel.groupNumber = selected.groupNumber;
if (section) {
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
@ -100,29 +91,12 @@ export default {
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
inputGroupNumber() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.tripNumber
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() { commit() {
const operate = { const params = {
send: true, groupNumber: this.addModel.groupNumber
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { commitOperate(menuOperate.TrainWindow.artificialTrainId, params, 2).then(({valid})=>{
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -135,11 +109,9 @@ export default {
}, },
cancel() { cancel() {
const operate = { const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" /> <stand-control ref="standControl" system-name="ningbo-01__systerm" />
<stand-jump-stop-control ref="standJumpStopControl" /> <stand-jump-stop-control ref="standJumpStopControl" system-name="ningbo-01__systerm" />
<stand-detail ref="standDetail" /> <stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" /> <stand-run-level ref="standRunLevel" />
<stand-stop-time ref="standStopTime" /> <stand-stop-time ref="standStopTime" />
@ -14,8 +14,8 @@
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StandControl from './dialog/standControl'; import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
import StandJumpStopControl from './dialog/standJumpStopControl'; import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
import StandBackStrategy from './dialog/standBackStrategy'; import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail'; import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel'; import StandRunLevel from './dialog/standRunLevel';

View File

@ -151,17 +151,17 @@ export default {
{ {
label: '设置计划车', label: '设置计划车',
handler: this.setPlanTrain, handler: this.setPlanTrain,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
}, },
{ {
label: '设置头码车', label: '设置头码车',
handler: this.setHeadTrain, handler: this.setHeadTrain,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
}, },
{ {
label: '设置人工车', label: '设置人工车',
handler: this.setWorkTrain, handler: this.setWorkTrain,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
}, },
{ {
label: '设乘务组号', label: '设乘务组号',
@ -388,9 +388,7 @@ export default {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
operation: OperationEvent.Train.editTrainId.menu.operation, operation: OperationEvent.Train.editTrainId.menu.operation,
param: { param: {}
sectionCode: this.$store.state.map.trainWindowSectionCode
}
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
@ -405,9 +403,7 @@ export default {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
operation: OperationEvent.Train.editTrainId.menu.operation, operation: OperationEvent.Train.editTrainId.menu.operation,
param: { param: {}
sectionCode: this.$store.state.map.trainWindowSectionCode
}
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {

View File

@ -271,6 +271,20 @@ export const menuOperate = {
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation, operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }
},
TrainWindow: {
destinationTrainId: {
operation: OperationEvent.Train.editTrainId.menu.operation,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
},
setPlanTrainId: {
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
},
artificialTrainId: {
operation: OperationEvent.Train.artificialTrainId.menu.operation,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
}
} }
}; };

View File

@ -36,8 +36,6 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示 atsAutoTriggerShow: true // ATS自动触发表示灯显示
}; };
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
}; };
this['private'][deviceType.TrainWindow] = { this['private'][deviceType.TrainWindow] = {
trainWindowShow: false trainWindowShow: false

View File

@ -427,7 +427,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -96,6 +96,9 @@ export default {
padding: 0; padding: 0;
padding-left: 20px; padding-left: 20px;
} }
.xian-01__systerm.pop-menu .container{
border-left: 1px solid #ccc;
}
.xian-01__systerm.pop-menu .dsp-block { .xian-01__systerm.pop-menu .dsp-block {
display: block; display: block;
text-align: left; text-align: left;

View File

@ -91,7 +91,7 @@ export default {
loading: false, loading: false,
operate: null, operate: null,
operation: '', operation: '',
planMode: 5, planMode: 1,
headMode: 5, headMode: 5,
fontSize: 30 fontSize: 30
}; };

View File

@ -35,7 +35,7 @@ class Model {
atsAutoTriggerShow: true // ATS自动触发表示灯显示 atsAutoTriggerShow: true // ATS自动触发表示灯显示
}; };
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式 nameFormat: 'serviceNumber:tripNumber', // 字体格式
nameFontSize: 30 // 字体大小 nameFontSize: 30 // 字体大小
}; };
this['private'][deviceType.TrainWindow] = { this['private'][deviceType.TrainWindow] = {

View File

@ -40,8 +40,6 @@ class Model {
isRequestGuide: 0 // 是否请求引导 isRequestGuide: 0 // 是否请求引导
}; };
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
nameFormat: 'targetCode:serviceNumber:tripNumber', // 字体格式
nameFontSize: 10 // 字体大小
}; };
this['private'][deviceType.TrainWindow] = { this['private'][deviceType.TrainWindow] = {
trainWindowShow: true trainWindowShow: true

View File

@ -1726,7 +1726,7 @@ export const OperationEvent = {
operation: '6102', operation: '6102',
domId: '_Tips-Station-setBackStrategy-confirm' domId: '_Tips-Station-setBackStrategy-confirm'
} }
}, }
}, },
// 列车 // 列车
@ -1886,6 +1886,14 @@ export const OperationEvent = {
trainSource: { trainSource: {
operation: '7082', operation: '7082',
domId: '_Tips-Train-SetPlanTrainId-TrainSource' domId: '_Tips-Train-SetPlanTrainId-TrainSource'
},
serverNoChange: {
operation: '7083',
domId: '_Tips-Train-SetPlanTrainId-serverNoChange'
},
trainNoChange: {
operation: '7084',
domId: '_Tips-Train-SetPlanTrainId-trainNoChange'
} }
}, },
// 添加计划车 // 添加计划车
@ -1938,6 +1946,10 @@ export const OperationEvent = {
menu: { menu: {
operation: '70c', operation: '70c',
domId: '_Tips-Train-destinationTrainId-Menu' domId: '_Tips-Train-destinationTrainId-Menu'
},
targetCodeChange: {
operation: '70c1',
domId: '_Tips-Train-destinationTrainId-targetCodeChange'
} }
}, },
// 设人工车 // 设人工车

View File

@ -791,7 +791,9 @@ const map = {
state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status); state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status);
}, },
updateTrainState:(state, status) =>{ updateTrainState:(state, status) =>{
state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status); if (state.map.trainList) {
state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
}
}, },
updateStationStand: (state, status) => { updateStationStand: (state, status) => {
const holdIndex = state.holdStandList.indexOf(status.code); const holdIndex = state.holdStandList.indexOf(status.code);

View File

@ -163,6 +163,12 @@ export default {
mode: 'bas', mode: 'bas',
id: '28', id: '28',
type: 'interface' type: 'interface'
},
{
name: '隧道通风-射流风机图',
mode: 'bas',
id: '29',
type: 'interface'
} }
] ]
}, },

View File

@ -117,6 +117,7 @@ export default {
code:'', code:'',
isRight:true, isRight:true,
width: 40, width: 40,
rotate: 0,
x: 10, x: 10,
y: 10 y: 10
}; };

View File

@ -7,6 +7,9 @@
<el-form-item label="图形宽度" prop="width"> <el-form-item label="图形宽度" prop="width">
<el-input-number v-model="form.width" :min="20" /> <el-input-number v-model="form.width" :min="20" />
</el-form-item> </el-form-item>
<el-form-item label="旋转角度" prop="rotate">
<el-input-number v-model="form.rotate" />
</el-form-item>
<el-form-item label="X轴坐标" prop="x"> <el-form-item label="X轴坐标" prop="x">
<el-input-number v-model="form.x" controls-position="right" :min="1" /> <el-input-number v-model="form.x" controls-position="right" :min="1" />
</el-form-item> </el-form-item>
@ -34,6 +37,7 @@ export default {
form:{ form:{
code:'', code:'',
width: 40, width: 40,
rotate: 0,
x: 10, x: 10,
y: 10 y: 10
}, },
@ -67,6 +71,7 @@ export default {
this.isUpdate = true; this.isUpdate = true;
this.form.code = model.code; this.form.code = model.code;
this.form.width = model.width; this.form.width = model.width;
this.form.rotate = model.rotate || 0;
this.form.x = model.point.x; this.form.x = model.point.x;
this.form.y = model.point.y; this.form.y = model.point.y;
} }
@ -87,6 +92,7 @@ export default {
_type: 'JetFan', _type: 'JetFan',
code: this.isUpdate ? this.form.code : getUID('JetFan', this.iscs.jetFanList), code: this.isUpdate ? this.form.code : getUID('JetFan', this.iscs.jetFanList),
width: this.form.width, width: this.form.width,
rotate: this.form.rotate,
color:'#00ff00' color:'#00ff00'
}; };
this.$emit('createJetFan', jetFanModel); this.$emit('createJetFan', jetFanModel);
@ -104,6 +110,7 @@ export default {
this.form = { this.form = {
code:'', code:'',
width: 40, width: 40,
rotate: 0,
x: 10, x: 10,
y: 10 y: 10
}; };

View File

@ -1,9 +1,11 @@
<template> <template>
<div class="schedules-box"> <div class="schedules-box">
<div class="title-name">车站运行时间表</div> <div class="title-name">{{ modeName }}</div>
<station-running-schedule v-if="showMode === 'stationRunningSchedule'" @changeShowMode="changeShowMode" /> <station-running-schedule v-if="showMode === 'stationRunningSchedule'" @changeShowMode="changeShowMode" />
<weekly-status v-else-if="showMode==='weeklyStatus'" @changeShowMode="changeShowMode" /> <weekly-status v-else-if="showMode==='weeklyStatus'" @changeShowMode="changeShowMode" />
<schedules-manage v-else-if="showMode === 'schedulesManage'" @changeShowMode="changeShowMode" /> <schedules-manage v-else-if="showMode === 'schedulesManage'" @changeShowMode="changeShowMode" />
<broad-overview v-else-if="showMode === 'broadOverview'" @changeShowMode="changeShowMode" />
<save-schedule-view v-else-if="showMode === 'saveScheduleView'" @changeShowMode="changeShowMode" />
</div> </div>
</template> </template>
@ -11,23 +13,47 @@
import StationRunningSchedule from './schedulesChild/stationRunningSchedule'; import StationRunningSchedule from './schedulesChild/stationRunningSchedule';
import WeeklyStatus from './schedulesChild/weeklyStatus'; import WeeklyStatus from './schedulesChild/weeklyStatus';
import SchedulesManage from './schedulesChild/schedulesManage'; import SchedulesManage from './schedulesChild/schedulesManage';
import BroadOverview from './schedulesChild/broadOverview';
import SaveScheduleView from './schedulesChild/saveScheduleView';
export default { export default {
name: 'Schedules', name: 'Schedules',
components: { components: {
StationRunningSchedule, StationRunningSchedule,
WeeklyStatus, WeeklyStatus,
SchedulesManage SchedulesManage,
BroadOverview,
SaveScheduleView
}, },
data() { data() {
return { return {
station: '', station: '',
stations: [], stations: [],
showMode: 'stationRunningSchedule' showMode: 'stationRunningSchedule',
modeName: '车站运行时间表'
}; };
}, },
computed: {
},
methods: { methods: {
changeShowMode(mode) { changeShowMode(mode) {
this.showMode = mode; this.showMode = mode;
switch (this.showMode) {
case 'stationRunningSchedule':
this.modeName = '车站运行时间表';
break;
case 'weeklyStatus':
this.modeName = '一周车站时间表定期下载';
break;
case 'broadOverview':
this.modeName = '';
break;
case 'schedulesManage':
this.modeName = '控制时间表管理';
break;
case 'saveScheduleView':
this.modeName = '车站保存时间表查看';
break;
}
} }
} }
}; };
@ -41,7 +67,7 @@ export default {
.title-name{ .title-name{
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 26px; font-size: 20px;
margin-top: 30px; margin-top: 30px;
color: #56E5DE; color: #56E5DE;
} }

View File

@ -0,0 +1,112 @@
<template>
<div style="width: 100%;height: calc(100% - 50px);display: flex;justify-content: center">
<div style="width: 25px;font-size: 18px;color: #56E5DE;margin: auto 3px;">主线运行时间表总览</div>
<div class="table-box" style="font-size: 13px">
<div style="display: flex;justify-content: left">
<div class="table-head" style="width: 95px;">车站</div>
<div class="table-head" style="width: 95px;" />
<div class="table-head" style="width: 95px;">版本</div>
<div class="table-head" style="width: 95px;" />
<div class="table-head" style="width: 140px;">空调大系统</div>
<div class="table-head" style="width: 140px;">空调小系统</div>
<div class="table-head" style="width: 140px;">隧道通风系统</div>
<div class="table-head" style="width: 140px;">照明系统</div>
</div>
<template v-for="(item, index) in tableData">
<div :key="index" style="display: flex;justify-content: left">
<div style="height: 30px;line-height: 30px;width: 95px;color: #56E5DE;border-bottom: 1px solid #3E5770">{{ item.stationName }}</div>
<div style="height: 30px;width: 95px;background: #FFF;border-bottom: 1px solid #3E5770;" />
<div style="height: 30px;width: 95px;border-bottom: 1px solid #3E5770;" />
<div class="button-box" style="height: 30px;width: 95px;line-height: 30px;text-align: center;">内容</div>
<div style="width: 140px;border-bottom: 1px solid #3E5770;">
<div style="display: inline-block;height: 28px;line-height: 28px;width: 60px;text-align: center;" :style="{color: item.largeAirConditioning?'#0F0':'#F00'}">{{ item.largeAirConditioning?'允许': '禁止' }}</div>
<div class="button-box" style="display: inline-block;height: 28px;width: 60px;line-height: 28px;text-align: center;" @click="changeSystemMode(item, 'largeAirConditioning')">允许/禁止</div>
</div>
<div style="width: 140px;border-bottom: 1px solid #3E5770;">
<div style="display: inline-block;height: 28px;line-height: 28px;width: 60px;text-align: center;" :style="{color: item.smallAirConditioning?'#0F0':'#F00'}">{{ item.smallAirConditioning?'允许': '禁止' }}</div>
<div class="button-box" style="display: inline-block;height: 28px;width: 60px;line-height: 28px;text-align: center;" @click="changeSystemMode(item, 'smallAirConditioning')">允许/禁止</div>
</div>
<div style="width: 140px;border-bottom: 1px solid #3E5770;">
<div style="display: inline-block;height: 28px;line-height: 28px;width: 60px;text-align: center;" :style="{color: item.tunnelVentilation?'#0F0':'#F00'}">{{ item.tunnelVentilation?'允许': '禁止' }}</div>
<div class="button-box" style="display: inline-block;height: 28px;width: 60px;line-height: 28px;text-align: center;" @click="changeSystemMode(item, 'tunnelVentilation')">允许/禁止</div>
</div>
<div style="width: 140px;border-bottom: 1px solid #3E5770;">
<div style="display: inline-block;height: 28px;line-height: 28px;width: 60px;text-align: center;" :style="{color: item.lighting?'#0F0':'#F00'}">{{ item.lighting?'允许': '禁止' }}</div>
<div class="button-box" style="display: inline-block;height: 28px;width: 60px;line-height: 28px;text-align: center;" @click="changeSystemMode(item, 'lighting')">允许/禁止</div>
</div>
</div>
</template>
</div>
<div style="font-size: 13px;text-align: center;margin-left: 10px;display: flex;flex-direction: column-reverse;">
<div class="button-box" style="height: 35px;padding-top: 2px;margin-bottom: 60px;" @click="changeShowMode('saveScheduleView')">车站保存<br>时间表查看</div>
<div class="button-box" style="height: 35px;padding-top: 2px;margin-bottom: 10px;" @click="changeShowMode('weeklyStatus')">每周<br>下发一览</div>
<div class="button-box" style="height: 35px;line-height: 35px;margin-bottom: 10px;" @click="changeShowMode('schedulesManage')">时间表管理</div>
</div>
</div>
</template>
<script>
export default {
name: 'BroadOverview',
data() {
return {
tableData: [
{stationName:'会展中心站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true},
{stationName:'世纪大道站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true},
{stationName:'交通大学站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true},
{stationName:'市图书馆站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true},
{stationName:'中心医院站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true},
{stationName:'未来路站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true},
{stationName:'火车站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true},
{stationName:'人民广场站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true},
{stationName:'体育中心站', largeAirConditioning: true, smallAirConditioning: true, tunnelVentilation: true, lighting: true}
]
};
},
methods: {
changeSystemMode(item, system) {
item[system] = !item[system];
},
changeShowMode(mode) {
this.$emit('changeShowMode', mode);
}
}
};
</script>
<style scoped>
.table-head{
background: #43388A;
border-right: 1px solid #001528;
border-bottom: 1px solid #001528;
height: 25px;
color: #FFF;
text-align: center;
line-height: 25px;
}
.table-box {
width: 85%;
height: 90%;
margin-top: 10px;
border-top: 2px solid #5B6163;
border-right: 1px solid #64758A;
border-left: 1px solid #64758A;
border-bottom: 1px solid #64758A;
}
.button-box {
background: #BABABB;
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
cursor: pointer;
}
.button-box.active,
.button-box:hover{
background: #EBB570;
border-top: 2px solid #795B31;
border-left: 2px solid #795B31;
border-right: 2px solid #fff;
border-bottom: 2px solid #fff;
}
</style>

View File

@ -0,0 +1,120 @@
<template>
<div style="width: 100%;margin-top: 10px;">
<div class="border-box" style="width: 840px;margin: auto">
<el-row>
<el-col class="table-header" :span="8">车站</el-col>
<el-col class="table-header" :span="8">时间表</el-col>
<el-col class="table-header" :span="8">版本</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-select v-model="station" size="mini" placeholder="请选择" style="width: 250px;margin: 5px 15px">
<el-option
v-for="item in stations"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="8">
<el-select v-model="schedule" size="mini" placeholder="请选择" style="width: 250px;margin: 5px 15px">
<el-option
v-for="item in schedules"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="8">
<div style="width: 250px;background: #FFF;height: 28px;margin: 5px 15px" />
</el-col>
</el-row>
</div>
<div style="display: flex;justify-content: center;">
<div style="display: flex; flex-wrap: wrap;width: 950px;margin-top: 10px;margin-left: 90px;">
<div style="width: 460px;height: 280px;background: #FFF;margin: 5px;">
<el-row>
<el-col class="table-header" style="text-align: left;" :span="6">时间</el-col>
<el-col class="table-header" style="text-align: left;" :span="18">空调大系统</el-col>
</el-row>
</div>
<div style="width: 460px;height: 280px;background: #FFF;margin: 5px;">
<el-row>
<el-col class="table-header" style="text-align: left;" :span="6">时间</el-col>
<el-col class="table-header" style="text-align: left;" :span="18">空调小系统</el-col>
</el-row>
</div>
<div style="width: 460px;height: 280px;background: #FFF;margin: 5px;">
<el-row>
<el-col class="table-header" style="text-align: left;" :span="6">时间</el-col>
<el-col class="table-header" style="text-align: left;" :span="18">照明系统</el-col>
</el-row>
</div>
<div style="width: 460px;height: 280px;background: #FFF;margin: 5px;">
<el-row>
<el-col class="table-header" style="text-align: left;" :span="6">时间</el-col>
<el-col class="table-header" style="text-align: left;" :span="18">隧道通风系统</el-col>
</el-row>
</div>
</div>
<div style="position: relative;top: 50px;font-size: 12px;text-align: center;margin-top: 355px;">
<div class="button-box" style="height: 35px;width:70px;margin: 10px;padding: 0;line-height: 30px;" @click="changeShowMode('schedulesManage')">时间表管理</div>
<div class="button-box" style="height: 35px;width:70px;margin: 10px;padding: 3px 0;" @click="changeShowMode('broadOverview')">全线运行<br>时间表总览</div>
<div class="button-box" style="height: 35px;width:70px;margin: 10px;padding: 3px 0;" @click="changeShowMode('stationRunningSchedule')">车站运行<br>时间表查看</div>
<div class="button-box" style="height: 35px;width:70px;margin: 10px;padding: 3px 0;" @click="changeShowMode('weeklyStatus')">每周<br>下发一览</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'SaveScheduleView',
data() {
return {
station: '',
stations: [],
schedule: '',
schedules: []
};
},
methods: {
changeShowMode(mode) {
this.$emit('changeShowMode', mode);
}
}
};
</script>
<style scoped>
.border-box{
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
}
.table-header{
background: #43388A;
text-align: center;
color: #FFF;
}
.button-box {
background: #BABABB;
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
cursor: pointer;
}
.button-box.active,
.button-box:hover{
background: #EBB570;
border-top: 2px solid #795B31;
border-left: 2px solid #795B31;
border-right: 2px solid #fff;
border-bottom: 2px solid #fff;
}
</style>

View File

@ -1,36 +1,128 @@
<template> <template>
<div style="width: 100%;display: flex;justify-content: center;"> <div style="width: 100%;display: flex;justify-content: center;height: 600px;">
<div> <div>
<div class="top-content-box"> <div class="content-box">
<div style="width: 950px;font-size: 18px;color: #56E5DE;margin: 10px;">全线车站时间表</div> <div style="width: 950px;font-size: 18px;color: #56E5DE;margin: 10px;">全线车站时间表</div>
<div style="width: 100%;display: flex;justify-content: center;"> <div style="width: 100%;display: flex;justify-content: center;">
<div style="width: 240px;height: 300px;background: #FFF;"> <div style="width: 240px;height: 280px;background: #FFF;">
<el-row> <el-row>
<div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">公用时间列表</div> <div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">公用时间列表</div>
</el-row> </el-row>
</div> </div>
<div style="width: 120px;margin-left: 10px;"> <div style="width: 120px;margin-left: 10px;">
<div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;margin: 85px 0;">增加时间表名</div> <div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;margin: 75px 0;">增加时间表名</div>
<el-input v-model="tableName" size="mini" /> <el-input v-model="tableName" size="mini" />
<div class="button-box" style="text-align: center;padding: 5px 0;margin: 10px 0;">增加</div> <div class="button-box" style="text-align: center;padding: 5px 0;margin: 10px 0;">增加</div>
<div class="button-box" style="text-align: center;padding: 5px 0">删除</div> <div class="button-box" style="text-align: center;padding: 5px 0">删除</div>
</div> </div>
<div style="width: 110px;height: 300px;padding: 0 15px;border-right: 2px solid #2B5932;margin-left: 40px;"> <div style="width: 110px;height: 280px;padding: 0 15px;border-right: 2px solid #2B5932;margin-left: 40px;">
<div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;">下载选择</div> <div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;">下载选择</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 256px;">立即下发</div> <div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 236px;">立即下发</div>
</div> </div>
<div style="width: 110px;height: 300px;margin-left: 15px;"> <div style="width: 70px;height: 280px;margin-left: 15px;">
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期一</div> <div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Mon')">
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期二</div> <div class="check-box" :style="{background: allStationDate.includes('Mon')?'#0F0':'#BFC1C1'}" />
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期三</div> <div class="check-text">星期一</div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期四</div> </div>
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期五</div> <div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Tues')">
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期六</div> <div class="check-box" :style="{background: allStationDate.includes('Tues')?'#0F0':'#BFC1C1'}" />
<div style="color: #56E5DE;font-size: 13px;"><div class="check-box" />星期日</div> <div class="check-text">星期二</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 100px;">排定下发</div> </div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Wed')">
<div class="check-box" :style="{background: allStationDate.includes('Wed')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期三</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Thurs')">
<div class="check-box" :style="{background: allStationDate.includes('Thurs')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期四</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Fri')">
<div class="check-box" :style="{background: allStationDate.includes('Fri')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期五</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Sta')">
<div class="check-box" :style="{background: allStationDate.includes('Sta')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期六</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedAllStationDate('Sun')">
<div class="check-box" :style="{background: allStationDate.includes('Sun')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期日</div>
</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 80px;">排定下发</div>
</div> </div>
</div> </div>
</div> </div>
<div class="content-box">
<div style="width: 950px;font-size: 18px;color: #56E5DE;margin: 10px;">车站时间表</div>
<div style="width: 100%;display: flex;justify-content: center;">
<div style="width: 180px;height: 280px;background: #FFF;">
<el-row>
<div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">车站选择</div>
</el-row>
</div>
<div class="border-box" style="width: 380px;height: 280px;display: flex;justify-content: center;padding: 10px;margin-left: 20px;">
<div style="width: 240px;height: 260px;background: #FFF;">
<el-row>
<div style="background: #43388A;font-size: 14px;height: 30px;line-height: 30px;color: #FFF;text-align: center;">车站时间列表</div>
</el-row>
</div>
<div style="width: 110px;height: 260px;margin-left: 10px;">
<div style="width: 100%;font-size: 18px;color: #56E5DE;">新时间表名</div>
<el-input v-model="newTableName" size="mini" style="margin: 10px 0;" />
<div class="button-box" style="padding: 5px 10px;width: 50px;text-align: center;font-size: 12px;">改名</div>
<div style="padding: 10px 0; border-top: 2px solid #2B5932;margin-top: 10px;display: flex;justify-content: center;">
<div class="button-box" style="width: 45px;font-size: 12px;height: 65px;text-align: center;line-height: 65px;margin-right: 10px;">删除</div>
<div class="button-box" style="width: 55px;font-size: 12px;height: 65px;text-align: center;padding-top: 18px;">增到共用时间表列</div>
</div>
<div style="display: flex;justify-content: center;">
<div class="button-box" style="width: 45px;font-size: 12px;height: 65px;text-align: center;margin-right: 10px;padding-top: 18px;">编辑时间表</div>
<div class="button-box" style="width: 55px;font-size: 12px;height: 65px;line-height: 65px;text-align: center;">查看</div>
</div>
</div>
</div>
<div style="width: 110px;height: 280px;padding: 0 15px;border-right: 2px solid #2B5932;margin-left: 40px;">
<div style="font-size: 18px;color: #56E5DE;width: 100%;text-align: center;">下载选择</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 236px;">立即下发</div>
</div>
<div style="width: 70px;height: 280px;margin-left: 15px;">
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Mon')">
<div class="check-box" :style="{background: stationDate.includes('Mon')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期一</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Tues')">
<div class="check-box" :style="{background: stationDate.includes('Tues')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期二</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Wed')">
<div class="check-box" :style="{background: stationDate.includes('Wed')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期三</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Thurs')">
<div class="check-box" :style="{background: stationDate.includes('Thurs')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期四</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Fri')">
<div class="check-box" :style="{background: stationDate.includes('Fri')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期五</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Sta')">
<div class="check-box" :style="{background: stationDate.includes('Sta')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期六</div>
</div>
<div style="display: flex;align-items: center;cursor: pointer;" @click="selectedStationDate('Sun')">
<div class="check-box" :style="{background: stationDate.includes('Sun')?'#0F0':'#BFC1C1'}" />
<div class="check-text">星期日</div>
</div>
<div class="button-box" style="background: #3F8B66;text-align: center;margin-top: 80px;">排定下发</div>
</div>
</div>
</div>
<div style="position: relative;left: calc(50% + 470px);bottom: calc(100% - 280px);font-size: 12px;text-align: center;">
<div class="button-box" style="height: 70px;width:70px;margin: 10px;padding: 21px 0;" @click="changeShowMode('broadOverview')">全线运行<br>时间表总览</div>
<div class="button-box" style="height: 70px;width:70px;margin: 10px;padding: 21px 0;" @click="changeShowMode('stationRunningSchedule')">车站运行<br>时间表查看</div>
<div class="button-box" style="height: 70px;width:70px;margin: 10px;padding: 21px 0;" @click="changeShowMode('weeklyStatus')">每周<br>下发一览</div>
<div class="button-box" style="height: 70px;width:70px;margin: 10px;padding: 21px 0;" @click="changeShowMode('saveScheduleView')">车站保存<br>时间表查看</div>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -40,14 +132,38 @@ export default {
name: 'SchedulesManage', name: 'SchedulesManage',
data() { data() {
return { return {
tableName: '' tableName: '',
newTableName: '',
stationDate: [],
allStationDate: []
}; };
},
methods: {
selectedStationDate(day) {
const index = this.stationDate.indexOf(day);
if (index < 0) {
this.stationDate.push(day);
} else {
this.stationDate.splice(index, 1);
}
},
selectedAllStationDate(day) {
const index = this.allStationDate.indexOf(day);
if (index < 0) {
this.allStationDate.push(day);
} else {
this.allStationDate.splice(index, 1);
}
},
changeShowMode(mode) {
this.$emit('changeShowMode', mode);
}
} }
}; };
</script> </script>
<style scoped> <style scoped>
.top-content-box { .content-box {
width: 950px; width: 950px;
margin-top: 10px; margin-top: 10px;
border-top: 2px solid #A4A3A0; border-top: 2px solid #A4A3A0;
@ -56,10 +172,24 @@ export default {
border-right: 2px solid #E5F1FE; border-right: 2px solid #E5F1FE;
padding-bottom: 10px; padding-bottom: 10px;
} }
.border-box{
border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977;
border-bottom: 2px solid #797977;
border-left: 2px solid #FFFFFE;
}
.check-text {
display: inline-block;
color: #56E5DE;
font-size: 13px;
height: 25px;
line-height: 25px;
margin-left: 5px;
}
.check-box { .check-box {
display: inline-block; display: inline-block;
height: 10px; height: 14px;
width: 10px; width: 14px;
background: #BFC1C1; background: #BFC1C1;
border-top: 2px solid #FFFFFE; border-top: 2px solid #FFFFFE;
border-right: 2px solid #797977; border-right: 2px solid #797977;
@ -79,8 +209,8 @@ export default {
background: #EBB570; background: #EBB570;
border-top: 2px solid #795B31; border-top: 2px solid #795B31;
border-left: 2px solid #795B31; border-left: 2px solid #795B31;
border-right: 1px solid #fff; border-right: 2px solid #fff;
border-bottom: 1px solid #fff; border-bottom: 2px solid #fff;
} }
/deep/ /deep/
.el-input__inner{ .el-input__inner{

View File

@ -1,78 +1,91 @@
<template> <template>
<div style="width: 100%;height: 100%;"> <div style="width: 100%;height: 600px;display: flex;justify-content: center">
<div class="top-box"> <div style="width: 550px;">
<el-row style="background: #43388A;font-size: 12px;height: 20px;line-height: 20px;"> <div class="top-box">
<el-col :span="8" style="text-align: center;color: #FFF;">车站</el-col> <el-row style="background: #43388A;font-size: 12px;height: 20px;line-height: 20px;">
<el-col :span="8" style="text-align: center;color: #FFF;">时间表</el-col> <el-col :span="8" style="text-align: center;color: #FFF;">车站</el-col>
<el-col :span="8" style="text-align: center;color: #FFF;">版本</el-col> <el-col :span="8" style="text-align: center;color: #FFF;">时间表</el-col>
</el-row> <el-col :span="8" style="text-align: center;color: #FFF;">版本</el-col>
<el-row> </el-row>
<el-col :span="8" style="padding: 10px;"> <el-row>
<el-select v-model="station" size="mini" placeholder="请选择"> <el-col :span="8" style="padding: 10px;">
<el-option <el-select v-model="station" size="mini" placeholder="请选择">
v-for="item in stations" <el-option
:key="item.value" v-for="item in stations"
:label="item.label" :key="item.value"
:value="item.value" :label="item.label"
/> :value="item.value"
</el-select> />
</el-col> </el-select>
<el-col :span="8" style="padding: 10px;"> </el-col>
<div style="width: 100%;height: 28px;background: #FFF" /> <el-col :span="8" style="padding: 10px;">
</el-col> <div style="width: 100%;height: 28px;background: #FFF" />
<el-col :span="8" style="padding: 10px;"> </el-col>
<div style="width: 100%;height: 28px;background: #FFF" /> <el-col :span="8" style="padding: 10px;">
</el-col> <div style="width: 100%;height: 28px;background: #FFF" />
</el-row> </el-col>
</el-row>
</div>
<div style="width: 100px;height: 20px;background: #FFF;position: relative;left: calc(25% + 450px);margin-top: 20px;" />
<div class="top-box" style="border: 0; height: 400px;background: #FFF;">
<el-row style="background: #43388A;font-size: 12px;height: 20px;line-height: 20px;">
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">时间表</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">时间</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">模式</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">模式描述</el-col>
<el-col :span="8" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">系统</el-col>
</el-row>
</div>
<div class="top-box" style="border: 0; display: flex;justify-content: space-between;">
<div class="button-box">上一页</div>
<div class="button-box">更新时间表</div>
<div class="button-box">下一页</div>
</div>
</div> </div>
<div style="width: 100px;height: 20px;background: #FFF;position: relative;left: calc(25% + 450px);margin-top: 20px;" /> <div style="margin-left: 180px;">
<div class="top-box" style="border: 0; height: 50%;background: #FFF;"> <div style="width: 280px;font-size: 12px;margin-top: 350px;margin-left: 65px;">
<el-row style="background: #43388A;font-size: 12px;height: 20px;line-height: 20px;"> <el-row style="background: #43388A;height: 25px;line-height: 25px;">
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">时间表</el-col> <el-col :span="9" style="text-align: center;color: #FFF;border: 1px solid #000;">系统</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">时间</el-col> <el-col :span="9" style="text-align: center;color: #FFF;border-top: 1px solid #000;border-bottom: 1px solid #000;">允许/禁止操作</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">模式</el-col> <el-col :span="6" style="text-align: center;color: #FFF;border: 1px solid #000;">状态</el-col>
<el-col :span="4" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">模式描述</el-col> </el-row>
<el-col :span="8" style="text-align: center;color: #FFF;border-right: 1px solid #000;border-bottom: 1px solid #000;">系统</el-col> <el-row style="height: 25px;line-height: 25px;">
</el-row> <el-col :span="9" class="table-system">空调大系统</el-col>
</div> <el-col :span="9" style="text-align: center;background: #FFF;">
<div class="top-box" style="border: 0; display: flex;justify-content: space-between;"> <div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;" @click="changeSystemMode('largeAirConditioning')">允许/禁止</div>
<div class="button-box">上一页</div> </el-col>
<div class="button-box">更新时间表</div> <el-col :span="6" class="table-system" :style="{background:systemStatus.largeAirConditioning?'#0F0':'#F00'}">{{ systemStatus.largeAirConditioning?'允许':'禁止' }}</el-col>
<div class="button-box">下一页</div> </el-row>
</div> <el-row style="height: 25px;line-height: 25px;">
<div style="width: 240px;position: absolute;left: calc(25% + 650px);font-size: 12px;top: calc(100% - 300px);"> <el-col :span="9" class="table-system">隧道通风系统</el-col>
<el-row style="background: #43388A;height: 25px;line-height: 25px;"> <el-col :span="9" style="text-align: center;background: #FFF;">
<el-col :span="9" style="text-align: center;color: #FFF;border: 1px solid #000;">系统</el-col> <div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;" @click="changeSystemMode('tunnelVentilation')">允许/禁止</div>
<el-col :span="9" style="text-align: center;color: #FFF;border-top: 1px solid #000;border-bottom: 1px solid #000;">允许/禁止操作</el-col> </el-col>
<el-col :span="6" style="text-align: center;color: #FFF;border: 1px solid #000;">状态</el-col> <el-col :span="6" class="table-system" :style="{background:systemStatus.tunnelVentilation?'#0F0':'#F00'}">{{ systemStatus.tunnelVentilation?'允许':'禁止' }}</el-col>
</el-row> </el-row>
<el-row style="height: 25px;line-height: 25px;"> <el-row style="height: 25px;line-height: 25px;">
<el-col :span="9" style="text-align: center;background: #FFF;border: 1px solid #D2D2D2;border-top: 0;">空调大系统</el-col> <el-col :span="9" class="table-system">空调小系统</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;">允许/禁止</div></el-col> <el-col :span="9" style="text-align: center;background: #FFF;">
<el-col :span="6" style="background: #0F0;text-align: center;border: 1px solid #D2D2D2;border-top: 0;">允许</el-col> <div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;" @click="changeSystemMode('smallAirConditioning')">允许/禁止</div>
</el-row> </el-col>
<el-row style="height: 25px;line-height: 25px;"> <el-col :span="6" class="table-system" :style="{background:systemStatus.smallAirConditioning?'#0F0':'#F00'}">{{ systemStatus.smallAirConditioning?'允许':'禁止' }}</el-col>
<el-col :span="9" style="text-align: center;background: #FFF;border: 1px solid #D2D2D2;border-top: 0;">隧道通风系统</el-col> </el-row>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;">允许/禁止</div></el-col> <el-row style="height: 25px;line-height: 25px;">
<el-col :span="6" style="background: #0F0;text-align: center;border: 1px solid #D2D2D2;border-top: 0;">允许</el-col> <el-col :span="9" class="table-system">照明系统</el-col>
</el-row> <el-col :span="9" style="text-align: center;background: #FFF;">
<el-row style="height: 25px;line-height: 25px;"> <div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;" @click="changeSystemMode('lighting')">允许/禁止</div>
<el-col :span="9" style="text-align: center;background: #FFF;border: 1px solid #D2D2D2;border-top: 0;">空调小系统</el-col> </el-col>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;">允许/禁止</div></el-col> <el-col :span="6" class="table-system" :style="{background:systemStatus.lighting?'#0F0':'#F00'}">{{ systemStatus.lighting?'允许':'禁止' }}</el-col>
<el-col :span="6" style="background: #0F0;text-align: center;border: 1px solid #D2D2D2;border-top: 0;">允许</el-col> </el-row>
</el-row> </div>
<el-row style="height: 25px;line-height: 25px;"> <div style="font-size: 12px;display: flex;text-align: center;margin-top: 25px;width: 410px;">
<el-col :span="9" style="text-align: center;background: #FFF;border: 1px solid #D2D2D2;border-top: 0;">照明系统</el-col> <div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;padding: 0 5px;" @click="changeShowMode('schedulesManage')">时间表管理</div>
<el-col :span="9" style="text-align: center;background: #FFF;"><div class="button-box" style="padding: 3px 10px;height: 25px;line-height: 19px;">允许/禁止</div></el-col> <div class="button-box" style="height: 40px;margin: 10px;" @click="changeShowMode('broadOverview')">全线运行<br>时间表总览</div>
<el-col :span="6" style="background: #0F0;text-align: center;border: 1px solid #D2D2D2;border-top: 0;">允许</el-col> <div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;padding: 0 5px;" @click="changeShowMode('weeklyStatus')">每周下发一览</div>
</el-row> <div class="button-box" style="height: 40px;margin: 10px;" @click="changeShowMode('saveScheduleView')">车站保存<br>时间表查看</div>
</div> </div>
<div style="position: absolute;left: calc(25% + 600px);font-size: 12px;top: calc(100% - 150px);display: flex;text-align: center;">
<div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;padding: 0 5px;" @click="changeShowMode('schedulesManage')">时间表管理</div>
<div class="button-box" style="height: 40px;margin: 10px;" @click="changeShowMode('stationRunningSchedule')">全线运行<br>时间表总览</div>
<div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;padding: 0 5px;" @click="changeShowMode('weeklyStatus')">每周下发一览</div>
<div class="button-box" style="height: 40px;margin: 10px;" @click="changeShowMode('saveScheduleView')">车站保存<br>时间表查看</div>
</div> </div>
</div> </div>
</template> </template>
@ -82,12 +95,21 @@ export default {
data() { data() {
return { return {
station: '', station: '',
stations: [] stations: [],
systemStatus: {
largeAirConditioning: true,
tunnelVentilation: true,
smallAirConditioning: true,
lighting:true
}
}; };
}, },
methods: { methods: {
changeShowMode(mode) { changeShowMode(mode) {
this.$emit('changeShowMode', mode); this.$emit('changeShowMode', mode);
},
changeSystemMode(system) {
this.systemStatus[system] = !this.systemStatus[system];
} }
} }
}; };
@ -118,7 +140,13 @@ export default {
background: #EBB570; background: #EBB570;
border-top: 2px solid #795B31; border-top: 2px solid #795B31;
border-left: 2px solid #795B31; border-left: 2px solid #795B31;
border-right: 1px solid #fff; border-right: 2px solid #fff;
border-bottom: 1px solid #fff; border-bottom: 2px solid #fff;
}
.table-system{
text-align: center;
background: #FFF;
border: 1px solid #D2D2D2;
border-top: 0;
} }
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="width: 100%;display: flex;justify-content: center;"> <div style="width: 100%;height: 600px;display: flex;justify-content: center;">
<div> <div>
<el-row style="margin-top: 120px;width: 560px;height: 28px;line-height: 28px;margin-bottom: 5px;"> <el-row style="margin-top: 120px;width: 560px;height: 28px;line-height: 28px;margin-bottom: 5px;">
<el-col :span="2" style="color: #56E5DE;">车站:</el-col> <el-col :span="2" style="color: #56E5DE;">车站:</el-col>
@ -79,11 +79,11 @@
<el-col :span="4"><div class="button-box" style="text-align: center;padding: 5px 0;margin-top: 4px;">查看</div></el-col> <el-col :span="4"><div class="button-box" style="text-align: center;padding: 5px 0;margin-top: 4px;">查看</div></el-col>
</el-row> </el-row>
</div> </div>
<div style="position: absolute;left: calc(50% + 320px);bottom: calc(100% - 735px);font-size: 12px;text-align: center;"> <div style="position: relative;left: calc(50% + 320px);bottom: calc(100% - 400px);font-size: 12px;text-align: center;width: 90px;">
<div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;padding: 0 5px;" @click="changeShowMode('schedulesManage')">时间表管理</div> <div class="button-box" style="height: 40px;line-height: 40px;margin: 10px;" @click="changeShowMode('schedulesManage')">时间表管理</div>
<div class="button-box" style="height: 40px;margin: 10px;padding: 5px 10px;" @click="changeShowMode('')">全线运行<br>时间表管理</div> <div class="button-box" style="height: 40px;margin: 10px;padding: 5px 0;" @click="changeShowMode('broadOverview')">全线运行<br>时间表管理</div>
<div class="button-box" style="height: 40px;margin: 10px;padding: 5px 10px;" @click="changeShowMode('')">车站运行<br>时间表查看</div> <div class="button-box" style="height: 40px;margin: 10px;padding: 5px 0;" @click="changeShowMode('')">车站运行<br>时间表查看</div>
<div class="button-box" style="height: 40px;margin: 10px;padding: 5px 10px;" @click="changeShowMode('saveScheduleView')">车站保存<br>时间表查看</div> <div class="button-box" style="height: 40px;margin: 10px;padding: 5px 0;" @click="changeShowMode('saveScheduleView')">车站保存<br>时间表查看</div>
</div> </div>
</div> </div>
</div> </div>
@ -129,8 +129,8 @@ export default {
background: #EBB570; background: #EBB570;
border-top: 2px solid #795B31; border-top: 2px solid #795B31;
border-left: 2px solid #795B31; border-left: 2px solid #795B31;
border-right: 1px solid #fff; border-right: 2px solid #fff;
border-bottom: 1px solid #fff; border-bottom: 2px solid #fff;
} }
.white-block{ .white-block{
width: 100%; width: 100%;

View File

@ -2,7 +2,7 @@
<div class="bigSystemBox"> <div class="bigSystemBox">
<div class="title-name">{{ $route.query.stationName }}机电隧道通风</div> <div class="title-name">{{ $route.query.stationName }}机电隧道通风</div>
<div class=""> <div class="">
<iscsSystem ref="iscsPlate" :width-canvas="1300" :canvas-height="700" /> <iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="700" />
</div> </div>
</div> </div>
</template> </template>
@ -14,8 +14,22 @@ export default {
}, },
data() { data() {
return { return {
width: 1300
}; };
}, },
watch: {
'$store.state.iscs.selectedCount': function() {
const device = this.$store.state.iscs.selected;
if (device && device._type === 'IscsButton' && device.function === 'OperatingButton') {
this.width = 1300;
this.$refs.iscsPlate.show('29');
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
this.width = 1300;
this.$refs.iscsPlate.show('28');
}
// console.log(this.width, '');
}
},
mounted() { mounted() {
this.$refs.iscsPlate.show('28'); this.$refs.iscsPlate.show('28');
}, },

View File

@ -153,8 +153,9 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
// this.width = this.$store.state.config.width; // this.width = this.$store.state.config.width;
// this.height = this.$store.state.config.height; // this.height = this.$store.state.config.height;
this.$iscs && this.$iscs.resize({ width: this.widthCanvas, height: this.canvasHeight }); // this.$iscs && this.$iscs.resize({ width: this.widthCanvas, height: this.canvasHeight });
}); });
this.$iscs && this.$iscs.resize({ width: this.widthCanvas, height: this.canvasHeight });
}, },
iscsDestroy() { iscsDestroy() {
if (this.$iscs) { if (this.$iscs) {

View File

@ -147,7 +147,7 @@ export default {
list.forEach(item => { list.forEach(item => {
if (item && item.code) { if (item && item.code) {
const copyModel = this.copyModelInfo(item, 30); const copyModel = this.copyModelInfo(item, 30);
const type1 = item._type.charAt(0).toLowerCase() + item._type.slice(1); // .toLowerCase() const type1 = item._type.charAt(0).toLowerCase() + item._type.slice(1);
if (!mapIscs[type1 + 'List']) { if (!mapIscs[type1 + 'List']) {
mapIscs[type1 + 'List'] = this.iscs[type1 + 'List'] || []; mapIscs[type1 + 'List'] = this.iscs[type1 + 'List'] || [];
} }
@ -159,7 +159,7 @@ export default {
}); });
} else if (this.selected._type != 'CheckBox') { } else if (this.selected._type != 'CheckBox') {
this.copyModel = this.copyModelInfo(this.selected, 10); this.copyModel = this.copyModelInfo(this.selected, 10);
const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1); // .toLowerCase() const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1);
this.copyModel.code = getUID(this.selected._type, this.iscs[type1 + 'List'] || []); this.copyModel.code = getUID(this.selected._type, this.iscs[type1 + 'List'] || []);
} else { } else {
this.copyModel = {}; this.copyModel = {};
@ -175,12 +175,16 @@ export default {
this.copyModel.code && this.createDataModel(this.copyModel); this.copyModel.code && this.createDataModel(this.copyModel);
} }
} break; } break;
// case 'Delete': this.$store.dispatch('map/setDeleteCount'); case 'Delete': {
// break; const list = this.getSelectList();
// case 'Update': if (list.length) {
// this.$refs.offsetX.focus(); list.forEach(item => {
// this.$store.dispatch('map/setUpdateCount'); item && item.code && this.$store.dispatch('iscs/deleteIscsDevices', item);
// break; });
} else {
this.copyModel.code && this.$store.dispatch('iscs/deleteIscsDevices', this.copyModel);
}
} break;
} }
} }
}, },

View File

@ -45,6 +45,7 @@
</div> </div>
<chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" /> <chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" />
<chat-create-group ref="createGroup" :group="group" @addCoversition="addCoversition" /> <chat-create-group ref="createGroup" :group="group" @addCoversition="addCoversition" />
<chat-tooltip :group="group" @getCoversitionList="getCoversitionList" />
</div> </div>
</template> </template>
<script> <script>
@ -53,6 +54,7 @@ import ChatSetting from './chatSetting';
import ChatContent from './chatContent'; import ChatContent from './chatContent';
import ChatCreateGroup from './chatCreateGroup'; import ChatCreateGroup from './chatCreateGroup';
import ChatMemberList from './chatMemberList'; import ChatMemberList from './chatMemberList';
import ChatTooltip from './chatTooltip';
import ChatCoversitionList from './chatCoversitionList'; import ChatCoversitionList from './chatCoversitionList';
import RecordRTC from 'recordrtc'; import RecordRTC from 'recordrtc';
import {uploadAudioFileNew, quitCoversition} from '@/api/chat'; import {uploadAudioFileNew, quitCoversition} from '@/api/chat';
@ -63,7 +65,8 @@ export default {
ChatContent, ChatContent,
ChatMemberList, ChatMemberList,
ChatCoversitionList, ChatCoversitionList,
ChatCreateGroup ChatCreateGroup,
ChatTooltip
}, },
props: { props: {
group: { group: {
@ -165,6 +168,9 @@ export default {
} }
this.$refs.chatContent.scrollTop(); this.$refs.chatContent.scrollTop();
}, },
getCoversitionList() {
this.$refs.chatCoversitionList.initPage(false);
},
quitCoversition() { quitCoversition() {
this.quitLoading = true; this.quitLoading = true;
quitCoversition(this.group, this.currentCoversition.id).then(res=>{ quitCoversition(this.group, this.currentCoversition.id).then(res=>{

View File

@ -0,0 +1,110 @@
<template>
<div v-show="dialogVisible" class="chatTooltipAll">
<div class="chatTooltip">
<div class="chatTooltipHeader">
{{ userName }} 邀请您加入会话
</div>
<div class="chatTooltipBootom">
<div class="create-group-bottom">
<el-button :loading="loading" size="small" type="primary" @click="doCreate">接受</el-button>
<el-button size="small" @click="doClose">拒绝</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
import {acceptCoversitionInvite} from '@/api/chat';
export default {
name:'ChatTooltip',
props: {
group: {
type: String,
required: true
}
},
data() {
return {
userName:'',
dialogVisible:false,
loading:false,
conversationId:''
};
},
watch:{
'$store.state.socket.inviteOtherIntoChat':function(val) {
this.userName = this.coverName(val);
this.dialogVisible = true;
this.conversationId = val.conversationId;
}
},
// {"conversationId":"22e10b17-7a6c-4b1b-8724-f87fb2053b76","from":{"id":"17","userId":"75","name":"",
// "role":"STATION_SUPERVISOR","deviceType":"STATION","deviceCode":"Station32955","deviceName":"","online":true,"robot":false}
methods:{
coverName(inviteUser) {
const member = inviteUser.from;
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
let data = member.role;
roleTypeList.forEach(function(element) {
const rolename = element.value;
if (Cookies.get('user_lang') == 'en') {
data = data.replace(rolename, element.enLabel);
} else {
data = data.replace(rolename, element.label);
}
});
const deviceName = member.deviceName ? '-' + member.deviceName : '';
const memberName = member.name ? '-' + member.name : '';
return data + deviceName + memberName;
},
doCreate() {
this.loading = true;
acceptCoversitionInvite(this.group, this.conversationId).then(res=>{
this.loading = false;
this.dialogVisible = false;
this.$emit('getCoversitionList');
}).catch(error=>{
this.$messageBox('接受邀请失败: ' + error.message);
});
},
doClose() {
this.dialogVisible = false;
}
}
};
</script>
<style lang="scss" scoped>
.chatTooltip{
position: absolute;
width: 290px;
left: 32%;
top: 42%;
z-index: 5;
background: #fff;
padding: 15px;
box-shadow: #969090 0px 0px 10px;
border-radius: 4px;
line-height: 20px;
transform: translateY(-50%);
}
.chatTooltipHeader{
margin-top:10px;
font-size:14px;
}
.chatTooltipBootom{
margin-top:10px;
text-align: center;
margin-bottom:10px;
}
.chatTooltipAll{
position:absolute;
width:100%;
height:100%;
left:0;
top:0;
z-index: 10;
}
</style>

View File

@ -84,7 +84,7 @@
@switchStationMode="switchStationMode" @switchStationMode="switchStationMode"
/> />
<menu-system-time v-if="!isScreen" ref="menuSystemTime" :offset="offset" :right="right" :group="group" /> <menu-system-time ref="menuSystemTime" :offset="offset" :right="right" :group="group" />
</div> </div>
<!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> --> <!-- <Jl3d-Simulation v-show="simulationShow" ref="Jl3dSimulation" :panel-show="simulationShow" @showpanel="showpanel" /> -->
@ -243,9 +243,6 @@ export default {
isPractice() { isPractice() {
return this.mode === 'practice'; return this.mode === 'practice';
}, },
isScreen() {
return this.model === 'dp';
},
isDrive() { isDrive() {
return this.prdType == '04'; return this.prdType == '04';
}, },

View File

@ -31,9 +31,8 @@ import { mapGetters } from 'vuex';
import { Notification } from 'element-ui'; import { Notification } from 'element-ui';
import { startTrainingNew, endTrainingNew } from '@/api/jmap/training'; import { startTrainingNew, endTrainingNew } from '@/api/jmap/training';
import { trainingNotifyNew } from '@/api/simulation'; import { trainingNotifyNew } from '@/api/simulation';
import { TrainingMode } from '@/scripts/ConstDic'; import { TrainingMode, UrlConfig } from '@/scripts/ConstDic';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { UrlConfig } from '@/scripts/ConstDic';
export default { export default {
name: 'MenuLesson', name: 'MenuLesson',

View File

@ -12,12 +12,16 @@
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button> <el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<chat-box ref="chatbox" :group="group" :user-role="userRole" />
<set-time ref="setTime" @ConfirmSelectBeginTime="start" /> <set-time ref="setTime" @ConfirmSelectBeginTime="start" />
<tip-script-record-new ref="tipTaskRecordNew" :group="group" :offset-bottom="offsetBottom" />
</div> </div>
</template> </template>
<!-- 单人仿真 --> <!-- 单人仿真 -->
<script> <script>
import ChatBox from './chatView/chatBox';
import TipScriptRecordNew from '@/views/scriptManage/display/tipScriptRecordNew';
import SetTime from './demon/setTime'; import SetTime from './demon/setTime';
import { Notification } from 'element-ui'; import { Notification } from 'element-ui';
import { ranAsPlan, exitRunPlan } from '@/api/simulation'; import { ranAsPlan, exitRunPlan } from '@/api/simulation';
@ -28,7 +32,9 @@ import { mapGetters } from 'vuex';
export default { export default {
name: 'MenuTask', name: 'MenuTask',
components: { components: {
SetTime SetTime,
ChatBox,
TipScriptRecordNew
}, },
props: { props: {
group: { group: {
@ -70,7 +76,18 @@ export default {
}, },
...mapGetters('map', [ ...mapGetters('map', [
'trainList' 'trainList'
]) ]),
userRole() {
if (this.$store.state.training.prdType == '02') {
return 'DISPATCHER';
} else if (this.$store.state.training.prdType == '01') {
return 'STATION_SUPERVISOR';
} else if (this.$store.state.training.prdType == '04') {
return 'DRIVER';
} else {
return 'AUDIENCE';
}
}
}, },
watch: { watch: {
'$store.state.training.subscribeCount': function () { '$store.state.training.subscribeCount': function () {

View File

@ -54,14 +54,17 @@ export default {
pause() { pause() {
return this.$store.state.scriptRecord.simulationPause; return this.$store.state.scriptRecord.simulationPause;
}, },
isDisplay() {
return this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew');
},
isShowDate() { isShowDate() {
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew'); return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay;
}, },
top() { top() {
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew') ? 35 : this.offset; return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay ? 35 : this.offset;
}, },
newRight() { newRight() {
return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.$route.path.includes('displayNew') ? this.$store.state.config.width - 340 - 80 : this.right; return (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) && this.isDisplay ? this.$store.state.config.width - 340 - 80 : this.right;
} }
}, },
watch: { watch: {

View File

@ -38,7 +38,7 @@ export default {
methods: { methods: {
setPosition() { setPosition() {
this.$nextTick(() => { this.$nextTick(() => {
let offset = this.$route.path.includes('displayNew') && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15; let offset = (this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew')) && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
const menuBar = document.getElementById('menuBar'); const menuBar = document.getElementById('menuBar');
const menuTool = document.getElementById('menuTool'); const menuTool = document.getElementById('menuTool');
if (menuBar) { if (menuBar) {

View File

@ -223,7 +223,7 @@ export default {
{ prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' } { prop: 'destinationCodePoint.y', firstLevel: 'destinationCodePoint', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
] }, // ] }, //
{ prop: 'switchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', disabled: true }, // { prop: 'switchSection', label: this.$t('map.isSwitchSection'), type: 'checkbox', disabled: true, isHidden: !this.isRelevanceSwitchShow }, //
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: !this.isRelevanceSwitchShow, disabled: true }, // { prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.switchList, isHidden: !this.isRelevanceSwitchShow, disabled: true }, //
{ prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionType }, // 1 { prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionType }, // 1
@ -393,7 +393,7 @@ export default {
}, },
isSwitchSectionShow() { isSwitchSectionShow() {
// //
return this.editModel.type != '03'; return this.editModel.type != '03' && !this.editModel.logicSectionCodeList.length;
}, },
isPointsShow() { isPointsShow() {
return ( return (
@ -401,7 +401,7 @@ export default {
); );
}, },
isRelevanceSwitchShow() { isRelevanceSwitchShow() {
return this.editModel.type == '04' && this.editModel.type == '03'; return this.editModel.type == '04' || this.editModel.type == '03';
}, },
hasAssociatedSection() { hasAssociatedSection() {
return this.editModel.type == '01' || this.editModel.type == '03'; return this.editModel.type == '01' || this.editModel.type == '03';

View File

@ -1,6 +1,6 @@
<template> <template>
<div style="height:100%"> <div style="height:100%">
<div style="height: calc(100% - 46px);"> <div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="showDelimiter" label-width="180px" size="mini"> <el-form ref="showDelimiter" label-width="180px" size="mini">
<el-form-item label="逻辑区段数量"> <el-form-item label="逻辑区段数量">
@ -9,17 +9,18 @@
<el-form-item label="是否显示分隔符"> <el-form-item label="是否显示分隔符">
<el-checkbox v-model="isDelimiter" /> <el-checkbox v-model="isDelimiter" />
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
</el-form-item>
<el-form-item label="区段名称偏移Y坐标"> <el-form-item label="区段名称偏移Y坐标">
<el-input-number v-model="distanceY" /> <el-input-number v-model="distanceY" />
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="editSectionDistance">{{ $t('map.updateObj') }}</el-button>
</el-form-item>
</el-form> </el-form>
</el-scrollbar> </el-scrollbar>
</div> </div>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="editSectionNum">{{ $t('map.updateObj') }}</el-button>
</el-button-group>
</div>
</div> </div>
</template> </template>
<script> <script>
@ -74,6 +75,9 @@ export default {
this.editModel.logicSectionCodeList.forEach(logicCode => { this.editModel.logicSectionCodeList.forEach(logicCode => {
const section = this.$store.getters['map/getDeviceByCode'](logicCode); const section = this.$store.getters['map/getDeviceByCode'](logicCode);
models.push(deepAssign(section, {_dispose: true})); models.push(deepAssign(section, {_dispose: true}));
const trainWindowModel = this.$store.getters['map/getDeviceByCode'](section.trainWindowCode);
models.push(deepAssign(trainWindowModel, {_dispose: true}));
}); });
if (this.logicNum === 0) { if (this.logicNum === 0) {
logicSectionCodeList = []; logicSectionCodeList = [];
@ -209,6 +213,16 @@ export default {
// //
computedLogicSectionNumList(logicSectionCodeList) { computedLogicSectionNumList(logicSectionCodeList) {
this.logicNum = logicSectionCodeList ? logicSectionCodeList.length : 0; this.logicNum = logicSectionCodeList ? logicSectionCodeList.length : 0;
},
//
editSectionDistance() {
const models = [];
this.editModel.logicSectionCodeList.forEach(logicCode => {
const logicSection = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicCode));
logicSection.namePosition = { x: 0, y: this.distanceY };
models.push(logicSection);
});
this.$emit('updateMapModel', models, 'four');
} }
} }
}; };

View File

@ -88,6 +88,18 @@
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCtcShow">设置</el-button> <el-button type="primary" style="margin-right: 10px;" size="small" @click="setCtcShow">设置</el-button>
</div> </div>
</el-collapse-item> </el-collapse-item>
<el-collapse-item title="设置灯位类型">
<el-form ref="ctcForm" label-width="160px" :model="lampPositionModel" size="mini">
<el-form-item label="灯位类型:" prop="lampPositionType">
<el-select v-model="lampPositionModel.lampPositionType">
<el-option v-for="item in SignalLampPositionTypeList" :key="item.code" :label="item.name" :value="item.code" />
</el-select>
</el-form-item>
</el-form>
<div class="flex_box">
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setLampPosition">设置</el-button>
</div>
</el-collapse-item>
</el-collapse> </el-collapse>
<div style="height: calc(100% - 90px);"> <div style="height: calc(100% - 90px);">
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
@ -195,6 +207,9 @@ export default {
guideModel: { guideModel: {
scope: 'All', scope: 'All',
callOn: true callOn: true
},
lampPositionModel: {
lampPositionType: ''
} }
}; };
}, },
@ -491,6 +506,16 @@ export default {
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
this.$message.success('数据构建成功!'); this.$message.success('数据构建成功!');
}, },
setLampPosition() {
const models = [];
this.signalList.forEach(item => {
const signalModel = deepAssign({}, item); //
signalModel.lampPositionType = this.lampPositionModel.lampPositionType;
models.push(signalModel);
});
this.$emit('updateMapModel', models);
this.$message.success('数据构建成功!');
},
// //
findSection(signal) { findSection(signal) {
// 01 02 // 01 02

View File

@ -1,32 +1,33 @@
<template> <template>
<div class="script-parent"> <div class="script-parent">
<div class="script-card" :style="{width: widthLeft+'px'}"> <!-- <div class="script-card" :style="{width: widthLeft+'px'}"> -->
<tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" /> <!-- <tip-script-record ref="tipTaskRecord" :group="group" :width="widthLeft" /> -->
</div> <!-- </div> -->
<drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" /> <!-- <drap-left :width-left="widthLeft" :min="780" :max="980" @drapWidth="drapWidth" /> -->
<div class="script-display"> <!-- <div class="script-display"> -->
<display ref="display" :size="size" /> <display ref="display" :size="size" />
</div> <!-- <tip-script-record-new ref="tipTaskRecordNew" :group="group" /> -->
<!-- </div> -->
</div> </div>
</template> </template>
<script> <script>
import Display from '@/views/newMap/displayNew/index'; import Display from '@/views/newMap/displayNew/index';
import TipScriptRecord from './tipScriptRecord'; // import TipScriptRecordNew from './tipScriptRecordNew';
import drapLeft from '@/views/components/drapLeft/index'; // import drapLeft from '@/views/components/drapLeft/index';
export default { export default {
name: 'ScriptDisplayNew', name: 'ScriptDisplayNew',
components: { components: {
Display, Display
TipScriptRecord, // TipScriptRecordNew
drapLeft // drapLeft
}, },
data() { data() {
return { return {
widthLeft: 780, // widthLeft: 780,
size: { size: {
width: document.documentElement.clientWidth - 780, width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight height: document.documentElement.clientHeight
}, },
group: this.$route.query.group group: this.$route.query.group
@ -34,11 +35,11 @@ export default {
}, },
watch: { watch: {
'$store.state.app.windowSizeCount': function() { '$store.state.app.windowSizeCount': function() {
this.size = { width: this.$store.state.app.width - 780, height: this.$store.state.app.height}; this.size = { width: this.$store.state.app.width, height: this.$store.state.app.height};
},
widthLeft: function(val) {
this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
} }
// widthLeft: function(val) {
// this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
// }
}, },
methods: { methods: {
drapWidth(width) { drapWidth(width) {
@ -49,11 +50,4 @@ export default {
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.script-parent {
display: flex;
flex-flow: row;
.script-card {
width: 780px;
}
}
</style> </style>

View File

@ -0,0 +1,282 @@
<template>
<div class="scriptRecordNew" :style="{bottom:(offsetBottom-15)+'px'}">
<div v-show="isShow" class="scriptRecordNewIn">
<el-tabs type="card">
<el-tab-pane :label="$t('scriptRecord.scriptRecordTitle')+'('+language+')'">
<div class="eachScriptPanel">
<div class="scriptPanelLeft">
<div class="panelLeftSelect">
<span style="font-size:13px;">当前剧本角色:</span>
<el-select v-model="memberId" placeholder="请选择" :disabled="isPause" @change="changeRole">
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" />
</el-select>
</div>
<el-button-group class="button-group">
<el-button v-if="isPause" size="small" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button>
<el-button v-else size="small" type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复</el-button>
<el-button size="small" type="danger" @click="dumpScenesData">{{ $t('scriptRecord.resetScript') }}</el-button>
<el-button size="small" type="primary" :disabled="backDisabled" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button>
<el-button size="small" type="success" :loading="isSavingScript" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button>
</el-button-group>
</div>
<div class="scriptPanelRight">
<get-action-new ref="getAction" :group="group" :size="size" @setAction="setAction" />
</div>
</div>
</el-tab-pane>
<el-tab-pane label="选择待出演剧本角色">
<div class="eachScriptPanel">
<add-role ref="addRole" :group="group" @refresh="refresh" />
</div>
</el-tab-pane>
</el-tabs>
</div>
<div class="scriptRecordNewTitle" @click="minisize">
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
</div>
</div>
</template>
<script>
import Vue from 'vue';
import AddRole from '../scriptRecord/addRole';
import GetActionNew from '../scriptRecord/getActionNew';
import {getScriptPlayMemberNew, executeScriptNew, dumpScriptDataNew, saveScriptDataNew, saveScriptScenesNew, updateMapLocationNew, simulationPause} from '@/api/simulation';
import ConstConfig from '@/scripts/ConstConfig';
import {getDraftScriptByGroupNew} from '@/api/script';
import Cookies from 'js-cookie';
export default {
name:'TipScriptRecordNew',
components: {
AddRole,
GetActionNew
},
props: {
group: {
type: String,
required: true
},
offsetBottom:{
type: Number,
required: true
}
},
data() {
return {
isShow:true,
language:'',
memberId:'',
isPause:false,
executeDisabled: false,
backDisabled: false,
autoSaveScript: null,
isSavingScript: false,
memberList:[],
size: {
width: 300,
height: 300
}
};
},
watch:{
'$store.state.map.mapViewLoadedCount': function (val) {
Vue.prototype.$jlmap.setOptions(this.$store.state.scriptRecord.mapLocation);
this.isPause = !(this.$store.state.scriptRecord.simulationPause);
},
'$store.state.scriptRecord.bgSet': function (val) {
this.backDisabled = val;
}
},
beforeDestroy() {
this.clearAutoSave();
this.$store.dispatch('scriptRecord/updateBgSet', false);
},
mounted() {
this.initData();
this.language = this.$route.query.lang == 'en' ? this.$t('scriptRecord.english') : this.$t('scriptRecord.chinese');
getDraftScriptByGroupNew(this.group).then(response=>{
this.backDisabled = response.data.bgSet;
this.$store.dispatch('scriptRecord/updateBgSet', response.data.bgSet);
});
},
methods:{
refresh() {
this.initData();
},
initData() {
getScriptPlayMemberNew(this.group).then(resp => {
const lastData = JSON.stringify(resp.data);
this.memberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
}).catch(error => {
this.$message(error.message);
});
},
minisize() {
if (this.isShow) {
this.isShow = false;
} else {
this.isShow = true;
}
},
changeRole() {
},
covert(data, roleTypeList) {
let lastData = data;
roleTypeList.forEach(function(element) {
const rolename = element.value;
if (Cookies.get('user_lang') == 'en') {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
} else {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
}
});
lastData = JSON.parse(lastData);
lastData.forEach(each=>{
const name = each.name == undefined ? '' : '-' + each.name;
const deviceName = each.deviceName == undefined ? '' : '-' + each.deviceName;
each.name = each.role + deviceName + name;
});
return lastData;
},
setAction() {
},
pauseScript() {
simulationPause(this.group).then(resp => {
this.$store.dispatch('scriptRecord/updateSimulationPause', true);
}).catch(() => {
this.$messageBox(this.$t('scriptRecord.pauseFail'));
});
},
saveScenesData() {
this.isSavingScript = true;
saveScriptDataNew(this.group).then(resp => {
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
this.isSavingScript = false;
// this.initAutoSaveScript();
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`);
this.isSavingScript = false;
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
this.clearAutoSave();
} else {
// this.initAutoSaveScript();
}
});
},
saveScenesStage() {
const data = Vue.prototype.$jlmap.$options;
const group = this.$route.query.group;
const dataZoom = {scale: data.scaleRate, x: data.offsetX, y: data.offsetY};
saveScriptScenesNew(this.group).then(resp => {
updateMapLocationNew(group, dataZoom).then(response=>{
this.$store.dispatch('scriptRecord/updateBgSet', true);
this.$message.success(this.$t('scriptRecord.saveBackgroundSuceess'));
}).catch(error => {
this.$messageBox(`${this.$t('scriptRecord.updateLocationFail')}: ${error.message}`);
});
}).catch((error) => {
this.$messageBox(`${this.$t('scriptRecord.saveBackgroundFail')}: ${error.message}`);
});
},
initAutoSaveScript() {
const timeout = 1000 * 20;
this.clearAutoSave(this.autoSaveScript);
this.autoSaveScript = setInterval(this.saveScenesData, timeout);
},
clearAutoSave() {
if (this.autoSaveScript) {
clearInterval(this.autoSaveScript);
this.autoSaveScript = null;
}
},
executePlayScript() {
executeScriptNew(this.group).then(resp => {
this.$store.dispatch('scriptRecord/updateSimulationPause', false);
}).catch(() => {
this.$messageBox(this.$t('scriptRecord.recoverFail'));
});
},
dumpScenesData() {
this.clearAutoSave();
const group = this.group;
this.$confirm(this.$t('scriptRecord.clearDataTip'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
dumpScriptDataNew(group).then(resp => {
this.$parent.resetBeginTime();
// this.$parent.$refs['display'].$refs['menuScript'].resetBeginTime();
this.$refs['getAction'].loadInitData();
this.$refs['addRole'].initData();
this.initData();
this.initAutoSaveScript();
this.$store.dispatch('scriptRecord/updateBgSet', false);
this.$message.success(this.$t('scriptRecord.resetDataSuccess'));
}).catch(() => {
this.$messageBox(this.$t('scriptRecord.resetDataFail'));
});
});
}
}
};
</script>
<style lang="scss" scoped>
.selectRolesTitle{
}
.button-group{
position: absolute;
bottom: 0;
}
.eachScriptPanel{
height: 300px;
display: inline-block;
width:100%;
}
.scriptPanelLeft{
width: 330px;
height: 100%;
vertical-align: top;
position: absolute;
left: 0;
top: 0;
}
.scriptPanelRight{
display: inline-block;
width: 680px;
vertical-align: top;
}
.scriptRecordNew{
position: absolute;
width: 700px;
z-index: 10;
padding-top: 28px;
left: 50%;
bottom: 0px;
transform: translateX(-50%) translateY(0);
}
.scriptRecordNewTitle{
position: absolute;
background: #fff;
border-radius: 5px 5px 0px 0px ;
padding: 5px 0px;
width: 100px;
text-align: center;
left: 50%;
transform: translateX(-50%);
cursor: pointer;
top:0;
}
.scriptRecordNewIn{
padding: 10px;
background: #fff;
border-radius: 5px 5px 0px 0px ;
box-shadow: -1px -1px 3px #656565;
}
.scriptPanelRight{
}
</style>

View File

@ -11,6 +11,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('scriptRecord.receiver')" class="conditionVO" prop="actionVO.targetId"> <el-form-item :label="$t('scriptRecord.receiver')" class="conditionVO" prop="actionVO.targetId">
<!-- multiple -->
<el-select v-model="modalData.actionVO.targetId" :placeholder="$t('scriptRecord.receiverRules')" :disabled="isPause&&isNotModify"> <el-select v-model="modalData.actionVO.targetId" :placeholder="$t('scriptRecord.receiverRules')" :disabled="isPause&&isNotModify">
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" /> <el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" />
</el-select> </el-select>
@ -545,6 +546,10 @@ export default {
}, },
changeItem() { changeItem() {
if (!(this.isPause && this.isNotModify)) { if (!(this.isPause && this.isNotModify)) {
// debugger;
// if (this.modalData.actionVO.targetId) {
// }
const temp = this.modalData.actionVO.memberId; const temp = this.modalData.actionVO.memberId;
this.modalData.actionVO.memberId = this.modalData.actionVO.targetId; this.modalData.actionVO.memberId = this.modalData.actionVO.targetId;
this.modalData.actionVO.targetId = temp; this.modalData.actionVO.targetId = temp;

View File

@ -0,0 +1,186 @@
<template>
<el-scrollbar ref="elActionScrollbar" wrap-class="scrollbar-wrapper" class="scriptBottom" :style="{width:370+'px',height:size.height+'px'}">
<el-timeline :reverse="reverse" class="el_timeline">
<el-timeline-item v-for="(actionInfo,index) in actionInfoList" :key="index">
<el-card>
<div class="actionTable">
<span class="detail" v-html="actionInfo.detail" />
<span class="otherInfo" v-html="actionInfo.otherInfo" />
<span v-if="actionInfo.isCoversition">
<span class="roleClass">{{ actionInfo.memberName }}</span>
<span>{{ $t('scriptRecord.speakTo') }}</span>
<span class="roleClass">{{ actionInfo.targetName }}</span>
<span>: </span>
<span>{{ actionInfo.reply }}</span>
</span>
<span v-else>
<span class="roleClass">{{ actionInfo.memberName }}</span>
<span>{{ $t('scriptRecord.executeCommandTips') }}</span>
<span class="commandStyle">{{ actionInfo.command }}</span>
</span>
</div>
<div class="btnGroup">
<!-- <el-button v-if="actionInfo.visible" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button> -->
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
</div>
</el-card>
</el-timeline-item>
</el-timeline>
</el-scrollbar>
</template>
<script>
import Cookies from 'js-cookie';
import {getScriptAllAction, getScriptPlayMemberNew } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import CommandHandler from '@/scripts/cmdPlugin/CommandHandler';
import ConstConfig from '@/scripts/ConstConfig';
export default {
name: 'GetActionNew',
props: {
group: {
type: String,
required: true
},
size: {
type: Object,
required: true
}
},
data() {
return {
actionInfoList: [],
deviceCommandList: [],
reverse: false,
loading: true,
// behaviorName:"",
memberName: ''
};
},
computed:{
// drawWay() {
// const drawWay = this.$route.query.drawWay;
// return drawWay && JSON.parse(drawWay);
// }
},
watch: {
actionInfoList: function(val) {
this.$nextTick(function() {
var div = this.$refs['elActionScrollbar'].$refs['wrap'];
div.scrollTop = this.$refs['elActionScrollbar'].wrap.scrollHeight;
});
}
},
mounted() {
this.loadInitData();
},
methods: {
loadInitData() {
this.loadOtherData(this.$route.query);
},
covert(data, roleTypeList) {
let lastData = data;
roleTypeList.forEach(function(element) {
const rolename = element.value;
if (Cookies.get('user_lang') == 'en') {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
} else {
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
}
});
lastData = JSON.parse(lastData);
lastData.forEach(each=>{
const name = each.name == undefined ? '' : '-' + each.name;
const deviceName = each.deviceName == undefined ? '' : '-' + each.deviceName;
each.name = each.role + deviceName + name;
});
return lastData;
},
loadOtherData(obj) {
const group = obj.group;
getScriptPlayMemberNew(this.group).then(response => {
const lastData = JSON.stringify(response.data);
const memberVOList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
getScriptAllAction(group).then(resp=>{
this.actionInfoList = [];
const actionList = resp.data;
actionList.forEach(element => {
const member = memberVOList.find(elem=>{ return elem.id == element.memberId; });
const memberName = member.name;
switch (element.type) {
case 'Conversation':
{
const target = memberVOList.find(elem=>{ return elem.id == element.targetId; });
const targetName = target.name;
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, targetName: targetName, reply: element.reply, row: element, visible: true});
break;
}
case 'Command':
{
const command = CommandHandler.getScriptDefinition(element.operationType);
let operateType = command.operate.split('_')[0];
const data = command.operate.toUpperCase();
if (operateType == 'CM') {
operateType = 'ControlConvertMenu';
}
const operateName = CMD[operateType]['CMD_' + data];
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式'};
const operateTypeName = deviceTypeList[operateType];
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false});
break;
}
}
});
}).catch(error => {
this.$message(error.message);
});
}).catch(error => {
this.$message(error.message);
});
},
reloadTable() {
this.loadInitData();
}
// modifyAction(row) {
// this.$emit('setAction', row);
// }
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.actionTable{
width:280px;
padding: 15px 0px 10px 15px;
display: inline-block;
line-height: 200%;
}
.btnGroup{
padding: 10px 10px 10px 10px;
float: right;
vertical-align: top;
display: inline-block;
}
.el_timeline{
width: 350px;
margin-top:5px;
padding-left: 25px;
}
.el-timeline{
font-size:13px;
}
.roleClass{
color:#409EFF
}
.commandStyle{
color:#F00;
}
.scriptPane{
height: 100%;
padding-top:200px;
}
.scriptBottom{
margin-left:300px;
margin-top: 0px;
font-size:13px;
}
</style>

View File

@ -71,9 +71,9 @@ export default {
height: 800, height: 800,
roadData: [], roadData: [],
focus: false, focus: false,
booleanList: ['lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute'], booleanList: ['lockFirst', 'switchSingleHandle', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute', 'initSingleLockSwitch'],
selectList: ['upDirection', 'runMode'], selectList: ['upDirection', 'runMode'],
generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute', 'runMode'], generalConfig: ['lockFirst', 'switchSingleHandle', 'upDirection', 'switchNRTurnChain', 'switchSingleLockChain', 'signalForceCancelRoute', 'runMode', 'initSingleLockSwitch'],
numberList: [], numberList: [],
optionsMap: { optionsMap: {
upDirection: [{label: 'right', value: 'right'}, {label: 'left', value: 'left'}], upDirection: [{label: 'right', value: 'right'}, {label: 'left', value: 'left'}],
@ -86,7 +86,8 @@ export default {
switchNRTurnChain:'道岔正/反操是否联动', switchNRTurnChain:'道岔正/反操是否联动',
switchSingleLockChain:'道岔单解/锁是否联动', switchSingleLockChain:'道岔单解/锁是否联动',
signalForceCancelRoute:'是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路', signalForceCancelRoute:'是否强制取消进路/在接近区段占用时是否依旧强制执行取消进路',
runMode:'列车控制模式/级别' runMode:'列车控制模式/级别',
initSingleLockSwitch: '初始加载设备时是否默认单锁正线道岔'
} }
}; };
}, },