Compare commits

...

62 Commits

Author SHA1 Message Date
fan
cc1a9817ab 赛总指示调整 2023-07-21 09:43:52 +08:00
fan
837bf3a870 赛总指示调整 2023-07-20 14:43:46 +08:00
fan
23a2447181 赛总指示调整 2023-07-20 11:10:59 +08:00
fan
6142c2e90e 赛总指示调整 2023-07-13 17:16:14 +08:00
fan
4bfa9c78b8 代码调整 2023-07-11 14:33:54 +08:00
fan
0093b8bae1 代码调整 2023-07-11 14:17:13 +08:00
fan
de898b77ed 代码调整 2023-07-11 13:36:36 +08:00
fan
617aa98149 Merge branch 'thailand' of https://git.code.tencent.com/lian-cbtc/jl-client into thailand 2023-07-11 11:23:02 +08:00
fan
0297144b16 代码调整 2023-07-11 11:22:41 +08:00
de0d06c994 Merge remote-tracking branch 'origin/thailand' into thailand 2023-07-10 14:17:51 +08:00
91ded59d7f 修改Initialisation->Initialization 2023-07-10 14:17:37 +08:00
Yuan
008d4ebac0 操作计划详情 2023-07-10 14:13:09 +08:00
fan
f17a54b860 代码调整 2023-07-10 13:19:51 +08:00
fan
78122f6e7a 代码调整 2023-07-10 10:48:00 +08:00
fan
7ff2271c38 代码调整 2023-07-10 10:22:27 +08:00
fan
502a994451 代码调整 2023-07-07 18:03:03 +08:00
fan
104496ac5a 代码调整 2023-07-07 17:07:51 +08:00
fan
977d8df4b6 代码调整 2023-07-07 16:33:22 +08:00
Yuan
f2cdfe5ee1 Merge branch 'thailand' of git.code.tencent.com:lian-cbtc/jl-client into thailand 2023-07-07 16:25:24 +08:00
Yuan
1580b0a509 泰国运行计划 2023-07-07 16:25:20 +08:00
fan
1555d9f401 Merge branch 'thailand' of https://git.code.tencent.com/lian-cbtc/jl-client into thailand 2023-07-07 11:22:58 +08:00
fan
731c716036 代码调整 2023-07-07 11:22:35 +08:00
Yuan
51e678011c Merge branch 'thailand' of git.code.tencent.com:lian-cbtc/jl-client into thailand 2023-07-06 15:21:50 +08:00
Yuan
7ce62aead4 泰国运行计划界面 2023-07-06 15:19:27 +08:00
fan
8795adbe72 车站调整 2023-07-06 10:24:40 +08:00
fan
d501fe2792 成员一键生成 2023-07-06 09:54:52 +08:00
fan
26d75c1bf3 转英文 2023-07-05 11:12:26 +08:00
fan
fc05f5ef13 设备登录退出路径丢失调整 2023-07-05 10:54:55 +08:00
fan
4d92751f7d 泰国项目调整 2023-07-05 10:42:33 +08:00
fan
c98746317c Merge branch 'thailand' of https://git.code.tencent.com/lian-cbtc/jl-client into thailand 2023-07-05 10:32:47 +08:00
fan
03be9f8f75 泰国项目调整 2023-07-05 10:32:21 +08:00
Yuan
d61deb1de4 Merge branch 'thailand' of git.code.tencent.com:lian-cbtc/jl-client into thailand 2023-07-05 09:51:28 +08:00
Yuan
bb8989ba1a 运行计划设置框 2023-07-05 09:51:25 +08:00
Yuan
4e0fa46cc2 设备类型增加沙盘 2023-07-05 09:50:49 +08:00
fan
b898aee79a 泰国项目调整 2023-07-04 18:05:58 +08:00
fan
b1345badec 泰国项目调整 2023-07-04 13:27:52 +08:00
fan
0cb84ab7aa 泰国路由调整 2023-06-09 10:52:05 +08:00
fan
a64b627982 泰国项目翻译调整 2023-06-05 11:08:35 +08:00
fan
78cbf08eda 泰国项目翻译调整 2023-06-05 11:04:24 +08:00
fan
8b2c00e7fa 列车操作调整 2023-06-05 09:37:31 +08:00
fan
8d2939197f 泰国翻译调整 2023-06-05 09:11:16 +08:00
fan
9648f95d4e Merge remote-tracking branch 'origin/test' into thailand 2023-06-02 17:33:18 +08:00
fan
04b49c870e Merge remote-tracking branch 'origin/test' into thailand 2023-06-02 16:54:47 +08:00
fan
fd5248bf3f 泰国翻译调整 2023-06-02 14:29:43 +08:00
fan
2a85d2e6cf Merge remote-tracking branch 'origin/test' into thailand 2023-06-02 14:27:34 +08:00
fan
c84cc54639 泰国翻译 2023-06-01 16:17:14 +08:00
fan
795e8d8196 泰国翻译 2023-06-01 16:16:20 +08:00
fan
6a9aa02cc3 Merge remote-tracking branch 'origin/test' into thailand
# Conflicts:
#	src/jmapNew/theme/components/menus/dialog/setFault.vue
#	src/jmapNew/theme/datie_01/menus/menuDialog/helpAbout.vue
#	src/jmapNew/theme/datie_02/menus/menuSection.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuDialog/helpAbout.vue
#	src/jmapNew/theme/datie_ksk/menus/menuDialog/helpAbout.vue
#	src/scripts/ConstConfig.js
#	src/views/newMap/display/chatBox.vue
#	src/views/newMap/display/memberManage/membersManage.vue
#	src/views/newMap/display/simulationMenu/simulationMenu.vue
#	src/views/newMap/display/terminals/equipmentConstructionTable.vue
#	src/views/newMap/display/terminals/registerBook.vue
#	src/views/newMap/display/terminals/terminalMenu.vue
#	src/views/newMap/display/trainingList/trainingMenu.vue
#	src/views/newMap/display/trainingList/trainingTip.vue
2023-06-01 16:15:38 +08:00
fan
d8f29517d6 泰国项目i8n报警调整 2023-05-26 10:35:10 +08:00
fan
8a4bc974f4 泰国项目屏蔽会话 2023-05-26 10:06:46 +08:00
fan
65853dcd7b 泰国翻译 2023-05-26 10:02:39 +08:00
fan
641084eb3c Merge remote-tracking branch 'origin/test' into thailand
# Conflicts:
#	src/views/newMap/display/memberManage/addMember.vue
#	src/views/newMap/display/memberManage/membersManage.vue
#	src/views/newMap/display/newChat/chatDialog.vue
#	src/views/newMap/display/simulationMenu/simulationMenu.vue
2023-05-26 10:00:56 +08:00
fan
b4304099fe 泰国翻译526 2023-05-26 09:41:02 +08:00
fan
43f83ac624 泰国翻译again 2023-05-25 17:10:16 +08:00
fan
4c65f22c8a 泰国翻译 2023-05-24 18:01:44 +08:00
fan
334710bb94 Merge remote-tracking branch 'origin/test' into thailand
# Conflicts:
#	src/jmapNew/theme/components/menus/dialog/cmdManage.vue
#	src/jmapNew/theme/datie_01/menus/menuButton.vue
#	src/jmapNew/theme/datie_01/menus/menuSection.vue
#	src/jmapNew/theme/datie_01/menus/menuSignal.vue
#	src/jmapNew/theme/datie_01/menus/menuStation.vue
#	src/jmapNew/theme/datie_01/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_01/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_01/menus/menuTrain.vue
#	src/jmapNew/theme/datie_01/menus/passiveDialog/alarm.vue
#	src/jmapNew/theme/datie_02/menus/ctcWorkMenu.vue
#	src/jmapNew/theme/datie_02/menus/menuPanel.vue
#	src/jmapNew/theme/datie_02/menus/menuSection.vue
#	src/jmapNew/theme/datie_jd1a/menus/dialog/defectiveShunting.vue
#	src/jmapNew/theme/datie_jd1a/menus/dialog/mapVisual.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuButton.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuButtonCtc.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuSection.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuSignal.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuStation.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue
#	src/jmapNew/theme/datie_jd1a/menus/passiveDialog/alarm.vue
#	src/jmapNew/theme/datie_jd1a/menus/runplanPane.vue
#	src/jmapNew/theme/datie_ksk/menus/dialog/defectiveShunting.vue
#	src/jmapNew/theme/datie_ksk/menus/dialog/mapVisual.vue
#	src/jmapNew/theme/datie_ksk/menus/menuButton.vue
#	src/jmapNew/theme/datie_ksk/menus/menuButtonCtc.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSection.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSignal.vue
#	src/jmapNew/theme/datie_ksk/menus/menuStation.vue
#	src/jmapNew/theme/datie_ksk/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_ksk/menus/menuTrain.vue
#	src/jmapNew/theme/datie_ksk/menus/passiveDialog/alarm.vue
#	src/jmapNew/theme/datie_ksk/menus/runplanPane.vue
#	src/jmapNew/theme/datie_tky/menus/menuSection.vue
#	src/jmapNew/theme/datie_tky/menus/menuSignal.vue
#	src/jmapNew/theme/datie_tky/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_tky/menus/menuTrain.vue
#	src/views/info/personalInfo.vue
#	src/views/newMap/display/exam/examPanel.vue
#	src/views/newMap/display/memberManage/addMember.vue
#	src/views/newMap/display/memberManage/membersManage.vue
#	src/views/newMap/display/simulationMenu/simulationMenu.vue
#	src/views/newMap/display/terminals/terminalMenu.vue
#	src/views/newMap/display/trainingDesign/draftTrainingList.vue
#	src/views/newMap/display/trainingList/testResult.vue
#	src/views/newMap/display/trainingList/trainingMenu.vue
2023-05-24 15:06:06 +08:00
fan
18663fd5bd 泰国翻译 2023-02-22 13:07:56 +08:00
fan
05cebda4cb Merge remote-tracking branch 'origin/test_dispaly' into thailand
# Conflicts:
#	src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue
#	src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
2023-02-21 17:29:47 +08:00
fan
ba21c4fe95 添加翻译 2023-02-17 15:39:18 +08:00
fan
ec03a5b6b7 Merge remote-tracking branch 'origin/test_dispaly' into thailand
# Conflicts:
#	src/jmapNew/theme/components/menus/dialog/setFault.vue
#	src/jmapNew/theme/datie_01/menus/menuSection.vue
#	src/jmapNew/theme/datie_01/menus/menuSignal.vue
#	src/jmapNew/theme/datie_01/menus/menuStation.vue
#	src/jmapNew/theme/datie_01/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_01/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_01/menus/menuTrain.vue
#	src/jmapNew/theme/datie_02/menus/menuButton.vue
#	src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
#	src/jmapNew/theme/datie_02/menus/menuSection.vue
#	src/jmapNew/theme/datie_02/menus/menuSignal.vue
#	src/jmapNew/theme/datie_02/menus/menuStation.vue
#	src/jmapNew/theme/datie_02/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_02/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_02/menus/menuTrain.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuSection.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuSignal.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuStation.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_jd1a/menus/menuTrain.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSection.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSignal.vue
#	src/jmapNew/theme/datie_ksk/menus/menuStation.vue
#	src/jmapNew/theme/datie_ksk/menus/menuStationStand.vue
#	src/jmapNew/theme/datie_ksk/menus/menuSwitch.vue
#	src/jmapNew/theme/datie_ksk/menus/menuTrain.vue
#	src/jmapNew/theme/datie_tky/menus/menuTrain.vue
#	src/views/newMap/display/lineBoard.vue
#	src/views/newMap/display/terminals/registerBook.vue
#	src/views/newMap/display/trainingList/trainingMenu.vue
2023-02-17 10:28:46 +08:00
fan
03c97957f3 代码提交 2023-02-02 18:01:27 +08:00
fan
1fe0f491f8 翻译 2023-01-31 18:10:35 +08:00
278 changed files with 4387 additions and 39412 deletions

View File

@ -523,6 +523,29 @@ export function sandTableTrainControl(group, params) {
params params
}); });
} }
/** 设置轨道占用 */
export function setOccupy(simulationId, sectionCodes) {
return request({
url: `/api/sandTable/${simulationId}/occupy`,
method: 'put',
params: { sectionCodes, occupy: true }
})
}
/** 按计划运行 */
export function sandTableRunAsPlan(simulationId, data) {
return request({
url: `/api/sandTable/${simulationId}/runAsPlan`,
method: 'put',
data,
})
}
/** 获取运行计划详情 */
export function getSandTableRunPlanDetail(simulationId) {
return request({
url: `/api/sandTable/${simulationId}/runPlanDetail`,
method: 'get',
});
}
/** 条件查询仿真中的ISCS资源 */ /** 条件查询仿真中的ISCS资源 */
export function queryIscsResourcesByGroup(group, params) { export function queryIscsResourcesByGroup(group, params) {
return request({ return request({

View File

@ -4,10 +4,10 @@
<qrcode-vue v-loading="loading" :value="url" :size="400" /> <qrcode-vue v-loading="loading" :value="url" :size="400" />
</div> </div>
<div v-if="group" class="qrcodeGroup"> <div v-if="group" class="qrcodeGroup">
<span>{{ $t('global.roomId')+group }}</span> <span>{{ 'Simulation number:'+group }}</span>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="doClose">{{ $t('global.close') }}</el-button> <el-button @click="doClose">Close</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>

View File

@ -32,7 +32,7 @@ import trainingManage from './trainingManage';
import newRouter from './newRouter'; import newRouter from './newRouter';
export default { export default {
enLocale, ...enLocale,
map, map,
global, global,
router, router,

View File

@ -1,7 +1,7 @@
export default { export default {
simulation: '仿真', simulation: 'Simulation',
multiplayerSimulation: '多人仿真', multiplayerSimulation: '多人仿真',
regulationSimulation: '监管仿真', regulationSimulation: 'Regulation of the simulation',
teachingManagement: '教学管理', teachingManagement: '教学管理',
classroom: '班级管理', classroom: '班级管理',
student: '学生管理', student: '学生管理',

View File

@ -415,24 +415,24 @@ class SkinCode extends defaultStyle {
lineWidth: 1 lineWidth: 1
}, },
emergencyControl: { // 紧急站控 emergencyControl: { // 紧急站控
show: false, show: true,
offset: { x: 0, y: 0 }, offset: { x: 10, y: 0 },
text: '紧急站控', text: 'Emergency Ctrl',
arrowShow: false, arrowShow: false,
grayColor: '#7F7F7F' grayColor: '#7F7F7F'
}, },
centerControl: { // 中控 centerControl: { // 中控
show: false, show: true,
offset: { x: 0, y: 0 }, offset: { x: -190, y: 0 },
text: '中控', text: 'Center Ctrl',
buttonShow: false, buttonShow: false,
arrowShow: false, arrowShow: false,
grayColor: '#7F7F7F' grayColor: '#7F7F7F'
}, },
substationControl: { // 站控按钮 substationControl: { // 站控按钮
show: false, show: true,
offset: { x: 0, y: 0 }, offset: { x: -160, y: 0 },
text: '站控', text: 'Station Ctrl',
arrowShow: false, arrowShow: false,
grayColor: '#7F7F7F' grayColor: '#7F7F7F'
}, },
@ -444,34 +444,34 @@ class SkinCode extends defaultStyle {
grayColor: '#7F7F7F' grayColor: '#7F7F7F'
}, },
veryControl: { veryControl: {
show: true, show: false,
offset: { x: 0, y: 0 }, offset: { x: 50, y: 0 },
lightColor: '#f00', lightColor: '#f00',
defaultColor: '#7F7F7F', defaultColor: '#7F7F7F',
text: '非常站控' text: 'Very station controlled'
},
selfDiscipline: {
show: true,
offset: { x: 0, y: 0 },
text: '允许自律',
defaultColor: '#7F7F7F',
lightColor: '#ff0'
}, },
// selfDiscipline: {
// show: false,
// offset: { x: -140, y: 0 },
// text: 'Self-regulation allowed',
// defaultColor: '#7F7F7F',
// lightColor: '#ff0'
// },
selfDisciplineControl: { selfDisciplineControl: {
show: true, show: false,
offset: { x: 0, y: 0 }, offset: { x: -50, y: 0 },
lightColor: '#0f0', lightColor: '#0f0',
defaultColor: '#7F7F7F', defaultColor: '#7F7F7F',
text: '自律控制' text: 'Self-discipline control'
},
veryControlButton: {
offset: { x: 0, y: 0 },
text: '非常站控',
lightColor: '#ff0',
border:true, // 有边框
borderLine:1,
defaultColor: '#ccc'
}, },
// veryControlButton: {
// offset: { x: 140, y: 0 },
// text: 'Very station controlled',
// lightColor: '#ff0',
// border:true, // 有边框
// borderLine:1,
// defaultColor: '#ccc'
// },
selfDisciplineThree: { selfDisciplineThree: {
offset: { x: 0, y: 0 }, offset: { x: 0, y: 0 },
text: '分散自律', text: '分散自律',
@ -487,27 +487,41 @@ class SkinCode extends defaultStyle {
}, },
planControl: { planControl: {
show: true, show: true,
offset: { x: 0, y: 0 }, offset: { x: -20, y: 0 },
text: '计划控制', text: 'Plan Ctrl',
lightColor: '#0f0', lightColor: '#0f0',
defaultColor: '#7F7F7F' defaultColor: '#7F7F7F'
}, },
centerCommunication: { centerCommunication: {
show: true, show: true,
offset: { x: 0, y: 30 }, offset: { x: 100, y: 0 },
text: '中心通信', text: 'COMM',
lightColor: '#FF0000', lightColor: '#FF0000',
defaultColor: '#0f0' defaultColor: '#0f0'
}, },
selfDisciplineCommunication: { etcs2: {
show: true, show: true,
offset: { x: 40, y: 0 },
text: 'ETCS-2',
lightColor: '#FF0000',
defaultColor: '#0f0'
},
etcs3: {
show: true,
offset: { x: 100, y: 0 },
text: 'ETCS-3',
lightColor: '#FF0000',
defaultColor: '#ccc'
},
selfDisciplineCommunication: {
show: false,
offset: { x: 0, y: 30 }, offset: { x: 0, y: 30 },
text: '自律机通信', text: '自律机通信',
lightColor: '#7F7F7F', lightColor: '#7F7F7F',
defaultColor: '#0f0' defaultColor: '#0f0'
}, },
allowedTurnBack: { allowedTurnBack: {
show: true, show: false,
offset: { x: 0, y: 30 }, offset: { x: 0, y: 30 },
text: '允许转回', text: '允许转回',
lightColor: '#ff0', lightColor: '#ff0',
@ -853,12 +867,12 @@ class SkinCode extends defaultStyle {
type: '03', type: '03',
serviceNumber: '---', serviceNumber: '---',
// nameFormat: 'groupNumber:serviceNumber' // nameFormat: 'groupNumber:serviceNumber'
nameFormat:'tripNumber' nameFormat:'groupNumber'
}, },
{ {
type: '03', type: '03',
// nameFormat: 'serviceNumber:trainNumber' // nameFormat: 'serviceNumber:trainNumber'
nameFormat:'tripNumber' nameFormat:'groupNumber'
} }
], // 特殊列车类型需设置显示格式 ], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔 lrPadding: 4, // 两边间隔
@ -867,7 +881,7 @@ class SkinCode extends defaultStyle {
trainSidelineColor: '#F00', trainSidelineColor: '#F00',
trainSidelineStopColor: '#000', trainSidelineStopColor: '#000',
// trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式 // trainNameFormat: 'serviceNumber:targetCode'// 列车显示格式
trainNameFormat:'tripNumber' trainNameFormat:'groupNumber'
}, },
directionArrow: { directionArrow: {
}, },

View File

@ -177,7 +177,10 @@ class ETextName extends Group {
this.text && this.text.stopAnimation(false); this.text && this.text.stopAnimation(false);
} }
setState() { setState(bool) {
if (this.text) {
bool ? this.text.show() : this.text.hide();
}
// 区段名称类暂时不做状态处理 // 区段名称类暂时不做状态处理
} }
} }

View File

@ -599,6 +599,7 @@ export default class Section extends Group {
// 分路不良 // 分路不良
// model.shuntingTypeList.length > 0 && // model.shuntingTypeList.length > 0 &&
model.badShunt && this.badShuntStatus(); model.badShunt && this.badShuntStatus();
this.name.setState(model.nameShow);
// 停车倒计时 // 停车倒计时
if (this.remainTimeText) { if (this.remainTimeText) {
if (model.stopCountDown) { if (model.stopCountDown) {

View File

@ -186,11 +186,68 @@ export default class Station extends Group {
this.createInterconnectedControl(); // 联锁控 this.createInterconnectedControl(); // 联锁控
this.createVeryControl(); this.createVeryControl();
this.createSelfDiscipline(); this.createSelfDiscipline();
this.createTaiguo();
} }
} }
} }
this.setState(model); this.setState(model);
} }
createTaiguo() {
const computedControlModePoint = this.computedControlModePoint;
this.centerCommunication = new ESingleControl({
_subType: 'centerCommunication',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: computedControlModePoint.x - this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.centerCommunication.offset.x,
y: computedControlModePoint.y + this.style.Station.StationControl.centerCommunication.offset.y
},
context: this.style.Station.StationControl.centerCommunication.text,
pop: false
});
this.add(this.centerCommunication);
// 计划控制
this.planControl = new ESingleControl({
_subType: 'planControl',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.planControl.offset.x,
y: computedControlModePoint.y + this.style.Station.StationControl.planControl.offset.y
},
context: this.style.Station.StationControl.planControl.text,
pop: false
});
this.add(this.planControl);
this.etcs2 = new ESingleControl({
_subType: 'etcs2',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.etcs2.offset.x,
y: computedControlModePoint.y + this.style.Station.StationControl.etcs2.offset.y
},
context: this.style.Station.StationControl.etcs2.text,
pop: false
});
this.add(this.etcs2);
this.etcs3 = new ESingleControl({
_subType: 'etcs3',
style: this.style,
zlevel: this.zlevel,
z: this.z,
point: {
x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 2 + this.style.Station.StationControl.etcs3.offset.x,
y: computedControlModePoint.y + this.style.Station.StationControl.etcs3.offset.y
},
context: this.style.Station.StationControl.etcs3.text,
pop: false
});
this.add(this.etcs3);
}
createCtcControlMode() { // 大铁 createCtcControlMode() { // 大铁
// 非常站控 // 非常站控
// const model = this.model; // const model = this.model;
@ -635,7 +692,7 @@ export default class Station extends Group {
_subType: 'veryControlButtonText', _subType: 'veryControlButtonText',
position: [0, 0], position: [0, 0],
style: { style: {
x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.y, x: computedControlModePoint.x + this.style.Station.StationControl.lamp.distance * 3 / 2 + this.style.Station.StationControl.veryControlButton.offset.x,
y: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y + this.style.Station.StationControl.lamp.radiusR + this.style.Station.StationControl.text.distance, y: computedControlModePoint.y + this.style.Station.StationControl.veryControlButton.offset.y + this.style.Station.StationControl.lamp.radiusR + this.style.Station.StationControl.text.distance,
fontWeight: this.style.Station.StationControl.text.fontWeight, fontWeight: this.style.Station.StationControl.text.fontWeight,
fontSize: this.style.Station.StationControl.text.fontSize, fontSize: this.style.Station.StationControl.text.fontSize,
@ -877,9 +934,7 @@ export default class Station extends Group {
if (this.graphRoad && model.routeSetMode == 'Manual_Set_Route') { if (this.graphRoad && model.routeSetMode == 'Manual_Set_Route') {
this.graphRoad.setColor(this.style.Station.StationControl.graphRoad.lightColor); this.graphRoad.setColor(this.style.Station.StationControl.graphRoad.lightColor);
} }
if (this.planControl && model.planControl) {
this.planControl.setColor(this.style.Station.StationControl.planControl.lightColor);
}
// if (this.style.Station.StationControl.disPlayNone) { // if (this.style.Station.StationControl.disPlayNone) {
// this.stationText && this.stationText.setStyle('textFill', '#fff'); // this.stationText && this.stationText.setStyle('textFill', '#fff');
// if (this.model.subheadDisplay) { // 副标题 // if (this.model.subheadDisplay) { // 副标题
@ -962,6 +1017,7 @@ export default class Station extends Group {
this.graphRoad && this.graphRoad.setColor(this.style.Station.StationControl.graphRoad.defaultColor); this.graphRoad && this.graphRoad.setColor(this.style.Station.StationControl.graphRoad.defaultColor);
this.planControl && this.planControl.setColor(this.style.Station.StationControl.planControl.defaultColor); this.planControl && this.planControl.setColor(this.style.Station.StationControl.planControl.defaultColor);
this.trainControl && this.trainControl.setColor(this.style.Station.StationControl.trainControl.defaultColor); this.trainControl && this.trainControl.setColor(this.style.Station.StationControl.trainControl.defaultColor);
this.etcs2 && this.etcs2.setColor(this.style.Station.StationControl.etcs2.defaultColor);
this.allowedTurnBack && this.allowedTurnBack.setColor(this.style.Station.StationControl.allowedTurnBack.defaultColor); this.allowedTurnBack && this.allowedTurnBack.setColor(this.style.Station.StationControl.allowedTurnBack.defaultColor);
this.selfDisciplineCommunication && this.selfDisciplineCommunication.setColor(this.style.Station.StationControl.selfDisciplineCommunication.defaultColor); this.selfDisciplineCommunication && this.selfDisciplineCommunication.setColor(this.style.Station.StationControl.selfDisciplineCommunication.defaultColor);
if (this.selfDisciplineThree) { if (this.selfDisciplineThree) {
@ -1009,6 +1065,9 @@ export default class Station extends Group {
model.controlApplicant && this.handleControlApplicant(model); model.controlApplicant && this.handleControlApplicant(model);
model.allowAutonomy && this.handleAllowAutonomy(model); model.allowAutonomy && this.handleAllowAutonomy(model);
// this.handlePowerUnlockShow(model); // this.handlePowerUnlockShow(model);
if (this.planControl && model.planControl) {
this.planControl.setColor(this.style.Station.StationControl.planControl.lightColor);
}
this.handleGuideLock(model); this.handleGuideLock(model);
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) { if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) {
model.chargeStationCodeList.forEach(item => { model.chargeStationCodeList.forEach(item => {

View File

@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
import TrainBodyBox from './TrainBodyBox'; import TrainBodyBox from './TrainBodyBox';
// import '../StationStand/EDetain'; // import '../StationStand/EDetain';
import ETextName from '../element/ETextName'; // 名称文字 (共有) import ETextName from '../element/ETextName'; // 名称文字 (共有)
import EMouse from './EMouse'; // import EMouse from './EMouse';
import store from '@/store/index'; import store from '@/store/index';
import Circle from 'zrender/src/graphic/shape/Circle'; import Circle from 'zrender/src/graphic/shape/Circle';
import BoundingRect from 'zrender/src/core/BoundingRect'; import BoundingRect from 'zrender/src/core/BoundingRect';
@ -21,26 +21,26 @@ export default class TrainBody extends Group {
} }
createMouse() { createMouse() {
this.mouseEvent = new EMouse(this); // this.mouseEvent = new EMouse(this);
this.add(this.mouseEvent); // this.add(this.mouseEvent);
if (this.deviceModel.__down) { // if (this.deviceModel.__down) {
store.dispatch('map/setTrainDetails', this.deviceModel); // store.dispatch('map/setTrainDetails', this.deviceModel);
this.mouseEvent.mouseover(); // this.mouseEvent.mouseover();
} // }
if (this.deviceModel.__click) { // if (this.deviceModel.__click) {
this.mouseEvent.mouseClick(); // this.mouseEvent.mouseClick();
} // }
this.on('mouseover', () => { // this.on('mouseover', () => {
store.dispatch('map/setTrainDetails', this.deviceModel); // store.dispatch('map/setTrainDetails', this.deviceModel);
this.mouseEvent.mouseover(); // this.mouseEvent.mouseover();
}); // });
this.on('mouseout', () => { // this.on('mouseout', () => {
store.dispatch('map/setTrainDetails', null); // store.dispatch('map/setTrainDetails', null);
this.mouseEvent.mouseout(); // this.mouseEvent.mouseout();
}); // });
this.on('click', () => { // this.on('click', () => {
this.mouseEvent.mouseClick(); // this.mouseEvent.mouseClick();
}); // });
} }
create() { create() {

View File

@ -13,48 +13,48 @@
> >
<div class="main"> <div class="main">
<div class="left"> <div class="left">
<div class="left-type">车站</div> <div class="left-type">Station</div>
<div class="type-content"> <div class="type-content">
<div class="content-item"> <div class="content-item">
<img :src="shouxinImg" style="width: 58px; height: 58px"> <img :src="shouxinImg" style="width: 58px; height: 58px">
<div>收令箱</div> <div>Receive order box</div>
</div> </div>
</div> </div>
</div> </div>
<div class="content-box"> <div class="content-box">
<div class="box-top"> <div class="box-top">
<div class="top-title">收令箱</div> <div class="top-title">Receive order box</div>
<div class="top-table"> <div class="top-table">
<el-table :data="cmdTableData" border style="width: 100%" height="160" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange"> <el-table :data="cmdTableData" border style="width: 100%" height="160" highlight-current-row :row-class-name="tableRowClassName" @current-change="handleCurrentChange">
<el-table-column prop="title" label="标题" show-overflow-tooltip /> <el-table-column prop="title" label="Title" show-overflow-tooltip />
<el-table-column prop="cmdCode" label="号码" width="80" /> <el-table-column prop="cmdCode" label="Number" width="80" />
<el-table-column label="命令类型" width="100"> <el-table-column label="Order type" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span> <span style="margin-left: 10px">{{ typeObj[scope.row.type] || '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="收令日期" width="160"> <el-table-column label="Date of receipt" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ getStateInfo(scope.row.rcvCompanies).time || '' }}</span> <span style="margin-left: 10px">{{ getStateInfo(scope.row.rcvCompanies).time || '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发令单位" show-overflow-tooltip> <el-table-column label="Issuing unit" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.sendCompany ? scope.row.sendCompany.name : '' }}</span> <span style="margin-left: 10px">{{ scope.row.sendCompany ? scope.row.sendCompany.name : '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sender" label="发令人" show-overflow-tooltip /> <el-table-column prop="sender" label="Initiator" show-overflow-tooltip/>
<el-table-column label="签否"> <el-table-column label="Signed or not">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ getSignedStatus(getStateInfo(scope.row.rcvCompanies)) }}</span> <span style="margin-left: 10px">{{ getSignedStatus(getStateInfo(scope.row.rcvCompanies)) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="签收人" show-overflow-tooltip> <el-table-column label="Signatory" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ getSignedBy(scope.row.rcvCompanies) || '' }}</span> <span style="margin-left: 10px">{{ getSignedBy(scope.row.rcvCompanies) || '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="签收时间" width="160"> <el-table-column label="Receipt time" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ getStateInfo(scope.row.rcvCompanies).time || '' }}</span> <span style="margin-left: 10px">{{ getStateInfo(scope.row.rcvCompanies).time || '' }}</span>
</template> </template>
@ -64,26 +64,26 @@
</div> </div>
<div class="box-middle"> <div class="box-middle">
<div class="middle-left"> <div class="middle-left">
<el-input v-model="currentInfo.content" readonly type="textarea" rows="19" resize="none" placeholder="请输入内容" /> <el-input v-model="currentInfo.content" readonly type="textarea" rows="19" resize="none" placeholder="Please enter the content" />
</div> </div>
<div class="middle-right"> <div class="middle-right">
<div class="middle-right-top"> <div class="middle-right-top">
<el-table :data="getTableData" border style="width: 100%" height="190"> <el-table :data="getTableData" border style="width: 100%" height="190">
<el-table-column type="index" label="序" width="50" /> <el-table-column type="index" label="Index" width="53" />
<el-table-column prop="name" label="受令单位" /> <el-table-column prop="name" label="Ordered unit" width="105" />
<el-table-column prop="copyers" label="抄知处所" /> <el-table-column prop="copyers" label="Place of receipt" />
</el-table> </el-table>
</div> </div>
<div class="middle-right-middle"> <div class="middle-right-middle">
<span>阅读信息</span> <span>Read information</span>
<el-checkbox v-model="needRead">需阅读</el-checkbox> <el-checkbox v-model="needRead">To be read</el-checkbox>
<el-checkbox v-model="stopRead">停止阅读</el-checkbox> <el-checkbox v-model="stopRead">Stop reading</el-checkbox>
</div> </div>
<div class="middle-right-bottom"> <div class="middle-right-bottom">
<el-table :data="readList" border style="width: 100%" height="200"> <el-table :data="readList" border style="width: 100%" height="200">
<el-table-column type="index" label="序" width="50" /> <el-table-column type="index" label="Index" width="53" />
<el-table-column prop="reader" label="阅读人" /> <el-table-column prop="reader" label="Read by" />
<el-table-column prop="readTime" label="阅读时间" /> <el-table-column prop="readTime" label="Reading time" />
</el-table> </el-table>
</div> </div>
</div> </div>
@ -91,9 +91,9 @@
</div> </div>
</div> </div>
<div class="bottom-btn"> <div class="bottom-btn">
<el-button :id="getDomObj('signCmdFalse').domId" :disabled="!commandId || currentHasSigned" @click="signCmd(false)">拒签</el-button> <el-button :id="getDomObj('signCmdFalse').domId" :disabled="!commandId || currentHasSigned" @click="signCmd(false)">Refusal</el-button>
<el-button :id="getDomObj('signCmdTrue').domId" :disabled="!commandId || currentHasSigned" @click="signCmd(true)">签收</el-button> <el-button :id="getDomObj('signCmdTrue').domId" :disabled="!commandId || currentHasSigned" @click="signCmd(true)">Sign</el-button>
<el-button @click="doClose">关闭</el-button> <el-button @click="doClose">Close</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -115,21 +115,21 @@ export default {
currentInfo: {}, currentInfo: {},
queryResData: {}, queryResData: {},
typeObj: { typeObj: {
Normal: '普通调度命令', Normal: 'General scheduling command',
Construct: '施工调度命令', Construct: 'Construction scheduling command',
Forward: '转发调度命令', Forward: 'Forward scheduling command',
Request: '请求调度命令', Request: 'Request scheduling command',
LongTerm: '长效调度命令', LongTerm: 'Long-acting scheduling command',
ShiftScheduling: '班计划调度命令', ShiftScheduling: 'Shift scheduling command',
Other: '其他调度命令' Other: 'Other'
}, },
signedStatusObj: { signedStatusObj: {
Cache: '缓存', Cache: 'Cache',
Sent: '已发送', Sent: 'Send',
SrmReceived: '自律机接收', SrmReceived: 'Self-regulating machine received',
Received: '已接收', Received: 'Received',
Signed: '已签收', Signed: 'Signed',
Reject: '已拒签' Reject: 'Reject'
} }
}; };
}, },
@ -147,7 +147,7 @@ export default {
return this.$route.query.group; return this.$route.query.group;
}, },
title() { title() {
return '调度命令管理'; return 'Scheduling command management';
}, },
commandId() { commandId() {
return this.currentInfo.cmdId || ''; return this.currentInfo.cmdId || '';

View File

@ -16,24 +16,24 @@
<el-row> <el-row>
<el-form ref="form" :model="formModel" :rules="rules"> <el-form ref="form" :model="formModel" :rules="rules">
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="speedLimit" label="限速"> <el-form-item prop="speedLimit" label="Speed limit">
<el-input v-model="formModel.speedLimit" style="width: 115px;margin-right: 10px;" size="small" /> <el-input v-model="formModel.speedLimit" style="width: 115px;margin-right: 10px;" size="small" />
<span>km/h</span> <span>km/h</span>
<el-tooltip style="margin-left: 10px;" effect="dark" content="值为5-65之间不填为取消限速" placement="top-start"> <el-tooltip style="margin-left: 10px;" effect="dark" content="Value between 5 and 65, leave blank to cancel speed limit" placement="top-start">
<i class="el-icon-warning" /> <i class="el-icon-warning" />
</el-tooltip> </el-tooltip>
</el-form-item> </el-form-item>
<el-form-item prop="through" label="方式"> <el-form-item prop="through" label="Mode">
<el-radio-group v-model="formModel.through"> <el-radio-group v-model="formModel.through">
<el-radio :label="1">越红灯行驶</el-radio><br> <el-radio :label="1">Drive through red lights</el-radio><br>
<el-radio style="margin-top: 10px" :label="2">越引导行驶</el-radio><br> <el-radio style="margin-top: 10px" :label="2">Oversteer</el-radio><br>
<el-radio style="margin-top: 10px" :label="3">运行至前方车站</el-radio><br> <el-radio style="margin-top: 10px" :label="3">Running to the station ahead</el-radio><br>
<el-radio style="margin-top: 10px" :label="4">进路闭塞法行车</el-radio><br> <el-radio style="margin-top: 10px" :label="4">Approach blocking method of travel</el-radio><br>
<el-radio style="margin-top: 10px" :label="0"></el-radio> <el-radio style="margin-top: 10px" :label="0">No</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item prop="targetDeviceCode" label="目的地:"> <el-form-item prop="targetDeviceCode" label="Destination:">
<el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" filterable clearable size="small" style="height: 32px;line-height: 32px;" placeholder="请选择"> <el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" filterable clearable size="small" style="height: 32px;line-height: 32px;" placeholder="Please select">
<el-option <el-option
v-for="item in selectedList" v-for="item in selectedList"
:key="item.code" :key="item.code"
@ -41,7 +41,7 @@
:value="item.code" :value="item.code"
/> />
</el-select> </el-select>
<el-tooltip style="margin-left: 10px;" effect="dark" content="可在站场图上进行点选" placement="top-start"> <el-tooltip style="margin-left: 10px;" effect="dark" content="Point-and-click on the station map" placement="top-start">
<i class="el-icon-warning" /> <i class="el-icon-warning" />
</el-tooltip> </el-tooltip>
<!--<el-button--> <!--<el-button-->
@ -56,8 +56,8 @@
</template> </template>
<template v-else> <template v-else>
<el-row class="header"> <el-row class="header">
<el-col :span="11"><span>设备:</span></el-col> <el-col :span="11"><span>Equipment:</span></el-col>
<el-col :span="11" :offset="2"><span>故障类型:</span></el-col> <el-col :span="11" :offset="2"><span>Fault type:</span></el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-form ref="form" :model="form" :rules="rules"> <el-form ref="form" :model="form" :rules="rules">
@ -68,7 +68,7 @@
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-form-item prop="faultType"> <el-form-item prop="faultType">
<el-select ref="faultSelect2" v-model="form.faultType" size="small" style="height: 32px;line-height: 32px;" placeholder="请选择"> <el-select ref="faultSelect2" v-model="form.faultType" size="small" style="height: 32px;line-height: 32px;" placeholder="Please select">
<el-option <el-option
v-for="item in faultList" v-for="item in faultList"
:key="item.value" :key="item.value"
@ -83,10 +83,10 @@
</template> </template>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">Confirm</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="4"> <el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">取消</el-button> <el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -135,7 +135,7 @@ export default {
selected: null, selected: null,
rules: { rules: {
faultType: [ faultType: [
{ required: true, message: '请选择故障类型', trigger: 'change'} { required: true, message: 'Please select fault type', trigger: 'change'}
] ]
} }
}; };
@ -161,11 +161,11 @@ export default {
}, },
title() { title() {
if (this.operation == OperationEvent.MixinCommand.stoppage.menu.operation) { if (this.operation == OperationEvent.MixinCommand.stoppage.menu.operation) {
return '设置故障'; return 'Set faults';
} else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) { } else if (this.operation == OperationEvent.MixinCommand.cancelStoppage.menu.operation) {
return '取消故障'; return 'Cancel faults';
} else if (this.operation == OperationEvent.MixinCommand.collocation.menu.operation) { } else if (this.operation == OperationEvent.MixinCommand.collocation.menu.operation) {
return '驾驶'; return 'Driving';
} }
return ''; return '';
} }
@ -204,7 +204,7 @@ export default {
if (name) { if (name) {
this.deviceName = deviceType[selected._type] + '-' + name; this.deviceName = deviceType[selected._type] + '-' + name;
} else if (selected._type == 'Server') { } else if (selected._type == 'Server') {
this.deviceName = '服务器'; this.deviceName = 'Server';
} else { } else {
this.deviceName = deviceType[selected._type]; this.deviceName = deviceType[selected._type];
} }
@ -217,64 +217,32 @@ export default {
// } // }
if (selected._type === 'Section' && this.popClass === 'haerbin-01__systerm') { if (selected._type === 'Section' && this.popClass === 'haerbin-01__systerm') {
this.faultList = [ this.faultList = [
{label: '计轴故障', value: 'FAULT'}, {label: 'Gauge shaft fault', value: 'FAULT'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'} {label: 'Communication train occupancy', value: 'CBTC_OCCUPIED_FAULT'}
]; ];
} else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm') { } else if (selected._type === 'Section' && this.popClass === 'datie-02__systerm') {
this.faultList = [ this.faultList = [
{label: '电路故障', value: 'FAULT'}, {label: 'Circuit failure', value: 'FAULT'},
{label: '故障锁闭', value: 'FAULT_LOCK'} {label: 'Fault lockout', value: 'FAULT_LOCK'}
// {label: '', value: 'CBTC_OCCUPIED_FAULT'} // {label: '', value: 'CBTC_OCCUPIED_FAULT'}
]; ];
} else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') { // } else if (selected._type === 'Switch' && this.popClass === 'haerbin-01__systerm') {
this.faultList = [ // this.faultList = [
{label: '失表', value: 'SPLIT'}, // {label: 'Split', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'}, // {label: 'Normal split', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'}, // {label: 'Reverse split', value: 'REVERSE_SPLIT'},
{label: '挤岔', value: 'SQUEEZE'}, // {label: 'Squeeze', value: 'SQUEEZE'},
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}, // {label: 'Communication train occupancy', value: 'CBTC_OCCUPIED_FAULT'},
{label: '计轴故障', value: 'AXLE_FAULT'} // {label: 'Axle fault', value: 'AXLE_FAULT'}
]; // ];
} else if (selected._type === 'Switch' && this.popClass === 'datie-02__systerm') { } else if (selected._type === 'Switch' && this.popClass === 'datie-02__systerm') {
this.faultList = [ this.faultList = [
{label: '失表', value: 'SPLIT'}, {label: 'Out of position', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'}, {label: 'Normal Out of position', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'}, {label: 'Reverse Out of position', value: 'REVERSE_SPLIT'},
{label: '挤岔', value: 'SQUEEZE'}, {label: 'Squeeze off', value: 'SQUEEZE'},
// {label: '', value: 'CBTC_OCCUPIED_FAULT'}, // {label: '', value: 'CBTC_OCCUPIED_FAULT'},
{label: '电路故障', value: 'AXLE_FAULT'} {label: 'Circuit failure', value: 'AXLE_FAULT'}
];
} else if (selected._type === 'Section' && this.popClass === 'xian-01__systerm') {
this.faultList = [
{label: '红光带故障', value: 'FAULT'},
{label: '粉光带故障', value: 'CBTC_OCCUPIED_FAULT'},
{label: '橙光带故障', value: 'ARB'}
];
} else if (selected._type === 'Switch' && this.popClass === 'xian-01__systerm' ) {
this.faultList = [
{label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'},
{label: '挤岔', value: 'SQUEEZE'},
{label: '粉光带故障', value: 'CBTC_OCCUPIED_FAULT'},
{label: '红光带故障', value: 'AXLE_FAULT'},
{label: '橙光带故障', value: 'ARB'}
];
} else if (selected._type === 'Switch' && this.popClass === 'nanjing-02__systerm' ) {
this.faultList = [
{label: '短闪', value: 'SPLIT'},
{label: '短闪(转动后恢复)', value: 'SPLIT_1'},
{label: '定位短闪', value: 'NORMAL_SPLIT'},
{label: '反位短闪', value: 'REVERSE_SPLIT'},
{label: '长闪', value: 'SQUEEZE'},
{label: '道岔区段灰显', value: 'SECTION_NO_STATUS'},
{label: '红光带故障', value: 'CBTC_OCCUPIED_FAULT'},
{label: '紫光带故障', value: 'AXLE_FAULT'},
{label: '计轴受扰', value: 'ARB'}
];
} else if (selected._type === 'Server' && this.popClass === 'nanjing-02__systerm') {
this.faultList = [
{label: 'ATS故障', value: 'ATS_FAULT' }
]; ];
} else if (selected._type === 'Signal' && this.popClass === 'nanjing-02__systerm') { } else if (selected._type === 'Signal' && this.popClass === 'nanjing-02__systerm') {
this.faultList = [ this.faultList = [
@ -409,12 +377,12 @@ export default {
this.doClose(); this.doClose();
} else { } else {
this.doClose(); this.doClose();
this.$messageBox('设置或取消故障操作失败!'); this.$messageBox('Failed to set or cancel the fault!');
} }
}).catch((error) => { }).catch((error) => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$messageBox(error.message || '设置或取消故障操作失败!'); this.$messageBox(error.message || 'Failed to set or cancel the fault!');
}); });
}, },

View File

@ -11,8 +11,8 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row class="header"> <el-row class="header">
<el-col :span="11"><span>车站名称</span></el-col> <el-col :span="11"><span>Station name</span></el-col>
<el-col :span="11" :offset="2"><span>道岔</span></el-col> <el-col :span="11" :offset="2"><span>Switch</span></el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
@ -23,20 +23,20 @@
</el-col> </el-col>
</el-row> </el-row>
<div style="padding: 10px 15px; border: 1px double lightgray;height: 60px;margin-top: 15px;"> <div style="padding: 10px 15px; border: 1px double lightgray;height: 60px;margin-top: 15px;">
<span class="base-label" style="left:-10px;background:#f0f0f0;">钩锁位置</span> <span class="base-label" style="left:-10px;background:#f0f0f0;">Hook lock position</span>
<div style=" position: relative; top:-10px;"> <div style=" position: relative; top:-10px;">
<el-radio-group v-model="normal"> <el-radio-group v-model="normal">
<el-radio :label="true">定位</el-radio> <el-radio :label="true">Normal</el-radio>
<el-radio :label="false">反位</el-radio> <el-radio :label="false">Reverse</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button type="primary" :loading="loading" @click="commit">确定</el-button> <el-button type="primary" :loading="loading" @click="commit">Confirm</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="4"> <el-col :span="8" :offset="4">
<el-button @click="doClose"></el-button> <el-button @click="doClose">Cancel</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" :pop-class="popClass" /> <notice-info ref="noticeInfo" :pop-class="popClass" />

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
title="列车操作" title="Train Control"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%" width="30%"
:modal="false" :modal="false"
@ -20,7 +20,7 @@
/> />
</el-col> </el-col>
<el-col :span="3" :offset="2"> <el-col :span="3" :offset="2">
<el-button size="mini" type="danger" style="margin-top: 15px;" @click="brakeTrain">刹车</el-button> <el-button size="mini" type="danger" style="margin-top: 15px;" @click="brakeTrain">brake</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="margin-top: 40px"> <el-row style="margin-top: 40px">
@ -34,6 +34,9 @@
<el-button :disabled="showRight" type="primary" size="mini" icon="el-icon-arrow-right" @click="adjustDirection" /> <el-button :disabled="showRight" type="primary" size="mini" icon="el-icon-arrow-right" @click="adjustDirection" />
</el-col> </el-col>
</el-row> </el-row>
<el-row style="text-align: center;margin-top: 15px;">
<el-button type="primary" size="mini" @click="handleRun">Run</el-button>
</el-row>
</el-dialog> </el-dialog>
</template> </template>
@ -41,6 +44,7 @@
import LeftTrain from '@/assets/left_train.png'; import LeftTrain from '@/assets/left_train.png';
import RightTrain from '@/assets/right_train.png'; import RightTrain from '@/assets/right_train.png';
import { sandTableTrainControl } from '@/api/simulation'; import { sandTableTrainControl } from '@/api/simulation';
import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'TrainOperation', name: 'TrainOperation',
data() { data() {
@ -118,7 +122,31 @@ export default {
brakeTrain() { brakeTrain() {
sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: 0 }).then(resp => { sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: 0 }).then(resp => {
this.speed = 0; this.speed = 0;
}).catch(err => { this.$message.error(err.message); }); }).catch(err => { this.$message.error(err.message); }).finally(() => { this.changeSpeedFlag = false; });
},
handleRun() {
const step = {
over: true,
operation: menuOperate.Common.trainDrive.operation,
cmdType: menuOperate.Common.trainDrive.cmdType,
param: {
groupNumber: this.groupNumber,
param: {
speedLimit: '',
through: 0,
targetDeviceCode: ''
}
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$messageBox('Failed to set or cancel the fault!');
}
}).catch((error) => {
this.$messageBox(error.message || 'Failed to set or cancel the fault!');
});
} }
} }
}; };

View File

@ -13,7 +13,7 @@
> >
<el-form ref="form" size="small" label-width="80px" :model="addModel" @submit.native.prevent> <el-form ref="form" size="small" label-width="80px" :model="addModel" @submit.native.prevent>
<div style="width: 96%;"> <div style="width: 96%;">
<el-form-item label="是否EB:" label-width="95px" prop="speedLimit"> <el-form-item label="is or isn't EB:" label-width="95px" prop="speedLimit">
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<el-checkbox v-model="addModel.eb" /> <el-checkbox v-model="addModel.eb" />
</div> </div>
@ -22,10 +22,10 @@
</el-form> </el-form>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button type="primary" :loading="loading" @click="commit">确定</el-button> <el-button type="primary" :loading="loading" @click="commit">Confirm</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="4"> <el-col :span="8" :offset="4">
<el-button @click="doClose"></el-button> <el-button @click="doClose">Cancel</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" :pop-class="popClass" /> <notice-info ref="noticeInfo" :pop-class="popClass" />
@ -67,7 +67,7 @@ export default {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
title() { title() {
return '输入限速值'; return 'Input speed limit';
} }
}, },
watch:{ watch:{

View File

@ -2,7 +2,7 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
:class="popClass+' passive-control'" :class="popClass+' passive-control'"
title="控制模式请求" title="Request Control Mode"
:visible.sync="show" :visible.sync="show"
width="700px" width="700px"
:before-close="doClose" :before-close="doClose"
@ -11,7 +11,7 @@
:modal="false" :modal="false"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<span class="control-label">{{ `${requestInfo}请求如下区域的控制模式` }}</span> <span class="control-label">{{ `${requestInfo} request control mode for the following areas` }}</span>
<el-table <el-table
ref="multipleTable" ref="multipleTable"
:data="tableData" :data="tableData"
@ -23,35 +23,35 @@
size="mini" size="mini"
highlight-current-row highlight-current-row
> >
<el-table-column prop="operate" label="操作区域"> <el-table-column prop="operate" label="Operating area">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span> <span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="control" label="当前控制模式" width="120"> <el-table-column prop="control" label="Current control mode" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span> <span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="target" label="请求控制模式" width="120"> <el-table-column prop="target" label="Request control mode" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span> <span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="agree" label="是否同意" width="140"> <el-table-column prop="agree" label="Agree" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" /> <el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<span class="control-label">距离对话还有{{ count }}请应答</span> <span class="control-label">Two {{ count }} to speak. Respond.</span>
<el-row class="button-group"> <el-row class="button-group">
<el-col :span="10" :offset="3"> <el-col :span="10" :offset="3">
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意 <el-button :id="domAgree" :disabled="disabledAgree" @click="agree">Agree
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="6" :offset="4"> <el-col :span="6" :offset="4">
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button> <el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">Refuse</el-button>
</el-col> </el-col>
</el-row> </el-row>
<!-- ningbo-01__systerm --> <!-- ningbo-01__systerm -->
@ -83,11 +83,11 @@ export default {
dialogShow: false, dialogShow: false,
disabledAgree: false, disabledAgree: false,
disabledRefuse: false, disabledRefuse: false,
requestInfo: '调度员1工作站', requestInfo: 'Dispatcher 1 workstation',
controlProps: { controlProps: {
'Center': this.$t('menu.passiveDialog.inTheControl'), 'Center': 'Center',
'Local': this.$t('menu.passiveDialog.stationControl'), 'Local': 'Local',
'Emergency':this.$t('menu.passiveDialog.emergencyControl') 'Emergency':'Emergency'
}, },
selection: [], selection: [],
tableData: [], tableData: [],
@ -206,8 +206,10 @@ export default {
let info = SimulationType[member.type]; let info = SimulationType[member.type];
if (member.deviceCode) { if (member.deviceCode) {
const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode); const device = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
if (device) {
info = info + `(${device.name})`; info = info + `(${device.name})`;
} }
}
if (member.userId) { if (member.userId) {
simulationUserList.forEach(item => { simulationUserList.forEach(item => {
if (item.userId === member.userId) { if (item.userId === member.userId) {
@ -269,7 +271,7 @@ export default {
} }
}); });
} else if (!selection) { } else if (!selection) {
this.$messageBox('请选择一条数据'); this.$messageBox('Please select a piece of data');
} }
}, },
agree() { agree() {

View File

@ -1,141 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control"
: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">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'ConfirmControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
}
}
return '';
}
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
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() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
}
},
//
signalClose() {
const operate = {
over: true,
operation: OperationEvent.Signal.signalClose.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,156 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control-speed"
:title="title"
:visible.sync="show"
width="540px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ConfirmControlSpeed',
data() {
return {
dialogShow: false,
loading: false,
type: '',
operation: '',
message: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
return '区段设置限速';
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
return '区段取消限速';
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
return '道岔设置限速';
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
return '道岔取消限速';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.confirm.domId;
}
return '';
}
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.type = operate.type;
this.operation = operate.operation;
this.message = operate.message;
}
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() {
const operate = {
type: this.type
};
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
});
},
cancel() {
const operate = {
type: this.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,74 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control-speed"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="11">
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
</el-col>
<el-col :span="11" :offset="2">
<el-button @click="doClose"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'ConfirmTip',
data() {
return {
dialogShow: false,
message: '',
confirmId: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
}
},
mounted() {
},
methods: {
doShow(operate) {
this.message = operate.message;
this.dialogShow = true;
this.confirmId = operate.confirmId;
},
confirm() {
this.$emit('close');
},
doClose() {
this.dialogShow = false;
}
}
};
</script>
<style scoped>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.chengdou-03__systerm .el-dialog .el-button{
display: block;
margin: 0 auto;
}
</style>

View File

@ -1,173 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control"
: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">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'ConfirmTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return '添加列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return '修改列车识别号';
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return '删除列车识别号';
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return '移动列车识别号';
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId;
}
return '';
}
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
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('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,194 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
title="密码校验"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :span="22" :offset="1">
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
</el-col>
</el-row>
<el-row v-if="showMistake">
<el-col :span="22" :offset="1">
<span class="password-error">*密码输入错误请重新输入*</span>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum(7)">7</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum(8)">8</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum(9)">9</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum(4)">4</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum(5)">5</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum(6)">6</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum(1)">1</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum(2)">2</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum(3)">3</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum(0)">0</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputClear">C</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="backSpace"> &lt; </el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'PasswordBox',
data() {
return {
/* 写死的初始密码*/
correctPassword: '123',
dialogShow: false,
operation: '',
checkHasInput: false,
/* 输入值*/
passwordCheck: '',
/* 输入值替换为对应长度的星号*/
encryptionPassword: '',
loading: false,
showMistake: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.password.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
}
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
if (operate.operateNext) {
this.operation = operate.operateNext;
}
this.dialogShow = true;
this.checkHasInput = false;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.showMistake = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() { //
if (this.passwordCheck === this.correctPassword) {
this.$emit('checkOver', this.operate);
this.doClose();
this.inputClear();
} else {
this.showMistake = true;
}
},
/* 软键盘输入*/
inputNum(num) {
this.showMistake = false;
this.passwordCheck += num;
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
},
/* 软键盘清除*/
inputClear() {
this.showMistake = false;
this.passwordCheck = '';
this.encryptionPassword = '';
},
/* 软键盘回退*/
backSpace() {
this.showMistake = false;
const password = this.passwordCheck;
if (password !== '') {
this.passwordCheck = password.substring(0, password.length - 1);
this.encryptionPassword = this.passwordCheck;
}
},
cancel() {
const operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.cancel.password.operation
};
this.$emit('checkCancel');
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow();
});
}
}
};
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.password-error {
color: red;
}
</style>

View File

@ -1,94 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm popup-alarm"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :offset="2">
<span v-for="(message, index) in messages" :key="index">{{ message }}</span><br>
</el-col>
</el-row>
<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>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'PopupAlarm',
data() {
return {
dialogShow: false,
messages: [],
operate: null,
operation: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '弹出式告警';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.operation = operate.operation;
this.dialogShow = true;
this.messages = messages || [];
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
//
this.alxeEffective();
}
},
alxeEffective() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
}
}
};
</script>
<style>
.popup-alarm .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,163 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-form v-if="selected" :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="设备类型:">
<el-select v-model="form.deviceType" :disabled="true" style="width: 150px;">
<el-option
v-for="item in deviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备名称:">
<el-input v-model="form.deviceName" :disabled="true" style="width: 150px;" />
</el-form-item>
</el-form>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="fileName"
label="文件"
width="400"
/>
<el-table-column
prop="name"
label="操作"
>
<template slot-scope="scope">
<div class="text-button" @click="openPdf(scope.row)">打开</div>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import CancelMouseState from '@/mixin/CancelMouseState';
import { getUploadFile } from '@/api/pdf';
import { DrawingType } from '@/scripts/ConstDic';
export default {
name: 'TrainMove',
mixins: [
CancelMouseState
],
data() {
return {
selected: null,
selectedType: '',
dialogShow: false,
loading: false,
tableData: [],
deviceTypeList: [
{ label: '区段', value: 'Section' },
{ label: '信号机', value: 'Signal' },
{ label: '道岔', value: 'Switch' },
{ label: '车站', value: 'Station' }
],
deviceIdList: [],
form: {
mapId: '',
deviceId: '',
deviceCode: '',
deviceName: ''
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.selectedType === 'normStudy') {
return '规范学习';
} else if (this.selectedType === 'clCaAn') {
return '经典案例分析';
} else if (this.selectedType === 'baDeTr') {
return '基础设备培训';
} else {
return '图纸检索';
}
}
},
methods: {
doShow(selected, selectedType) {
this.selectedType = selectedType;
const params = { mapId: this.$route.query.mapId, fileType: DrawingType[selectedType] };
this.selected = selected;
if (this.selected) {
this.form.deviceName = selected.name;
this.form.deviceType = selected._type;
params.deviceType = selected._type.toUpperCase();
params.deviceId = selected.code;
}
this.loading = true;
getUploadFile(params).then(resp => {
this.tableData = resp.data;
this.loading = false;
}).catch(() => {
this.loading = false;
this.$message.error('图纸检索失败!');
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
openPdf(row) {
const url = `https://joylink.club/oss/joylink/${row.filePath}`;
window.open(url, '_blank');
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.text-button{
color: #148ad0;
cursor:pointer;
}
.text-button:active{
color: #b938e1;
text-decoration: underline;
}
.text-button:hover{
color: #b938e1;
text-decoration: underline;
}
</style>

View File

@ -1,196 +0,0 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-detail"
:title="title"
:visible.sync="show"
width="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span>车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="6" :offset="1"><span>始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div style="margin-top: 20px">
<el-table
ref="tempTable"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
:height="140"
>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
stationName: '',
signalName: '',
domIdChoose: ''
};
},
computed: {
...mapGetters('map', [
'signalList',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
},
title() {
return '查询进路状态';
}
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
return '上行';
} else {
return '下行';
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
operation: OperationEvent.Signal.detail.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).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.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -1,278 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-setting"
:title="title"
:visible.sync="show"
width="460px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 40px">
<el-col :span="12" :offset="12">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<!--<password-box ref="passwordBox" @checkOver="passWordCommit" />-->
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import PasswordBox from './childDialog/passwordInputBox.vue';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
export default {
name: 'RouteSelection',
components: {
NoticeInfo
// PasswordBox
},
mixins: [
CancelMouseState
],
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
operation: '',
display: true,
stationName: '',
signalName: '',
tableStyle: {
'border-bottom': 'none'
},
commitDisabled:true,
controlTypeNameMap: {
'01': '折返',
'02': '直通'
},
row: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.guide.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.guide.confirm.domId : '';
},
title() {
return '办理引导进路';
},
...mapGetters('map', [
'signalList',
'mapConfig'
])
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
return '上行';
} else {
return '下行';
}
},
doShow(operate, selected, tempData) {
this.selected = selected;
this.commitDisabled = true;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
clickEvent(row, event, column) {
this.commitDisabled = false;
this.row = row;
if (row) {
const operate = {
operation: OperationEvent.Signal.guide.choose.operation,
val: row.code
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
//
commit() {
if (this.row && this.row.code) {
const operate = {
over: true,
operation: OperationEvent.Signal.guide.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
param: {
routeCode: this.row.code
}
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
} else {
this.doClose();
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.route-table-tip {
position: relative !important;
color: #3C72DF !important;
background: #ECE9D8 !important;
font-size: 12px;
top: -7px;
left: 7px;
}
.route-table-box {
margin-top: 20px !important;
line-height: 10px !important;
border: 2px solid #FFFFFF !important;
border-radius: 5px !important;
z-index: 1;
padding-bottom: 40px;
}
.item-lable {
line-height: 26px !important;
font-size: 13px;
}
</style>

View File

@ -1,268 +0,0 @@
<template>
<div>
<el-dialog v-dialogDrag class="chengdou-03__systerm route-hand-control" :title="title" :visible.sync="show" width="500px" :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="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { UserOperationType } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'RouteHandControl',
components: {
ConfirmControl,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operation: null,
selection: [],
stationName: '',
signalName: '',
highlight: true,
row: '',
commitDisabled: true
};
},
computed: {
...mapGetters('map', [
'signalList',
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return OperationEvent.Signal.humanControl.choose.domId;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return OperationEvent.Signal.atsAutoControl.choose.domId;
}
return '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路收人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
}
return '';
}
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
this.selection = [];
this.commitDisabled = true;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (tempData && tempData.length > 0) {
tempData.forEach(elem => {
elem.check = false;
elem.disabled = false;
//
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
(elem.atsControl == '0') ) {
elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
(elem.atsControl == '1') ) {
elem.disabled = true;
}
});
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
return '上行';
} else {
return '下行';
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
clickEvent(row, event, column) {
this.highlight = false;
if (row && row.code) {
this.highlight = true;
this.selection = [row];
this.beforeSectionList = row.containSectionList || [];
this.row = row;
//
const operate = {
operation: '',
val: row.code
};
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
this.commitDisabled = !row.atsControl;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.commitDisabled = Boolean(row.atsControl);
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
}
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
commit() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.atsAutoControl();
}
},
//
humanControl() {
commitOperate(menuOperate.Signal.humanControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
//
atsAutoControl() {
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList: [this.row.code]}, 2).then(({valid, operate}) => {
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,325 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm route-setting"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="2"><span class="item-lable">车站</span></el-col>
<el-col :span="6">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="4" :offset="1"><span class="item-lable">始端信号机</span></el-col>
<el-col :span="6">
<el-input v-model="signalName" size="small" disabled />
</el-col>
</el-row>
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table
ref="table"
:data="tempData"
border
:cell-style="tableStyle"
style="width: 99%;"
size="mini"
height="150"
highlight-current-row
@row-click="clickEvent"
>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 70px">
<el-col :span="12" :offset="12">
<el-button
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>执行</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { deepAssign } from '@/utils/index';
import PasswordBox from './childDialog/passwordInputBox.vue';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'RouteSelection',
components: {
NoticeInfo,
PasswordBox
},
mixins: [
CancelMouseState
],
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
selected: null,
row: null,
operation: '',
display: true,
stationName: '',
signalName: '',
commitDisabled:true,
tableStyle: {
'border-bottom': 'none'
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.confirm.domId : '';
},
title() {
return '办理进路';
},
...mapGetters('map', [
'signalList',
'sectionList',
'mapConfig'
])
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
if ((signalDirection && this.mapConfig.upRight) || (!signalDirection && !this.mapConfig.upRight)) {
return '上行';
} else {
return '下行';
}
},
doShow(operate, selected, tempData) {
this.selected = selected;
this.commitDisabled = true;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.restoreBeforeDevices();
row.canSetting = true;
this.commitDisabled = false;
//
const containSectionList = [];
if (row.routeSectionList && row.routeSectionList.length) {
//
row.routeSectionList.forEach(elem => {
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
section.logicSectionCodeList.forEach(item => {
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
sec.cutOff = true;
containSectionList.push(sec);
});
} else {
section.cutOff = true;
containSectionList.push(section);
}
});
}
this.$store.dispatch('training/updateMapState', [...containSectionList]);
this.beforeSectionList = containSectionList || [];
//
const operate = {
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
},
commit() {
if (this.row && this.row.canSetting) {
this.loading = true;
commitOperate({operation:OperationEvent.Signal.arrangementRoute.confirm.operation}, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.$refs.passwordBox.doShow({operation:OperationEvent.Signal.arrangementRoute.menu.operation});
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
}
},
passWordCommit(data) {
this.loading = true;
commitOperate(menuOperate.Signal.arrangementRoute, {}, 2).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.route-table-tip {
position: relative !important;
color: #3C72DF !important;
background: #ECE9D8 !important;
font-size: 12px;
top: -7px;
left: 7px;
}
.route-table-box {
margin-top: 15px !important;
line-height: 10px !important;
border: 2px solid #FFFFFF !important;
border-radius: 5px !important;
z-index: 1;
}
.item-lable {
line-height: 26px !important;
font-size: 13px;
}
</style>

View File

@ -1,114 +0,0 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm section-detail"
:title="title"
:visible.sync="show"
width="320px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" label-position="left" :model="formModel" label-width="100px">
<el-form-item label="区段名称">
<el-input v-model="formModel.sectionName" disabled />
</el-form-item>
<el-form-item label="车站名称">
<el-input v-model="formModel.stationName" disabled />
</el-form-item>
<el-form-item label="公里标(Km)">
<el-input v-model="formModel.kmPost" disabled />
</el-form-item>
<el-form-item label="长度(m)">
<el-input v-model="formModel.lengthFact" disabled />
</el-form-item>
</el-form>
<el-row justify="center" style="margin-top: 50px">
<el-col :span="7" :offset="17">
<el-button :id="domIdConfirm" @click="commit">确定</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'RouteDetail',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
formModel: {
sectionName: '',
stationName: '',
kmPost: '',
lengthFact: ''
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Section.detail.menu.domId : '';
},
title() {
return '无岔区段属性对话框';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
const hasParentCode = (this.selected.type == '02');
this.formModel.sectionName = hasParentCode ? selected.parentName + '-' + selected.name : selected.name;
this.formModel.lengthFact = selected.lengthFact;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.formModel.stationName = station.name;
this.formModel.kmPost = station.kmPost;
}
}
}
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 = {
operation: OperationEvent.Section.detail.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -1,603 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-detain-train"
:title="title"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="11">
<span>车站</span>
<el-input v-model="stationName" style="width: 110px; margin-left: 10px;" size="small" disabled />
</el-col>
<el-col :span="11" :offset="1">
<span>站台</span>
<el-input v-model="standName" style="width: 110px; margin-left: 10px;" size="small" disabled />
</el-col>
</el-row>
<div v-if="DetainTrain">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="radio" @change="choose">
<el-col :span="24">
<el-radio
:id="domIdDetainCar"
label="01"
style="display: block; text-align: left; float: left; margin-right: 10px;"
>本站台
</el-radio>
<el-radio
:id="isUpDirection? domIdDetainChoose: ''"
v-if="radio1 == 2"
:disabled="!isUpDirection"
:label="`${isUpDirection}`"
style="display: block; text-align: left; float: left; margin-right: 10px;"
>上行全线
</el-radio>
<el-radio
:id="isUpDirection ? '': domIdDetainChoose"
v-if="radio1 == 2"
:label="`${!isUpDirection}`"
:disabled="isUpDirection"
style="display: block; text-align: left; float: left;"
>下行全线</el-radio>
</el-col>
</el-radio-group>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; 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="JumpStop">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 115px;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-col :span="24">
<el-radio-group v-model="radio" @change="chooseJumpStop">
<el-radio
:id="radio == '02' ? domIdChoose : ''"
label="01"
style="display: block; text-align: left; margin-right: 10px; margin-bottom: 20px; width: 80px;"
>
站台跳停
</el-radio>
<el-radio
:id="radio == '01' ? domIdChoose : ''"
label="02"
style="display: block; text-align: left; margin-left: 0; float: left;"
>
指定列车跳停</el-radio>
<div style="float: left;">
<span>车组号</span>
<el-select
:id="domIdCancelJumpStop"
v-model="tripNumber"
style="width: 120px; margin-left: 20px;"
size="mini"
:disabled="radio == '01'"
@change="trainNoSelectChange"
>
<el-option
v-for="option in trainList"
:key="option.groupNumber"
:label="option.groupNumber"
:value="option.groupNumber"
/>
</el-select>
</div>
</el-radio-group>
</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: #ECE9D8; 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="RunLevel">
<div
style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray; height: 105px;"
>
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">范围</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="radio" @change="chooseStopTime">
<el-col :span="24">
<el-radio
:id="radio == '02' ? domIdChoose1 : ''"
label="01"
style="display: block; text-align: left; margin-right: 10px; margin-bottom:10px; width: 60px;"
>
自动
</el-radio>
<el-radio
:id="radio == '01' ? domIdChoose1 : ''"
label="02"
style="display: block; text-align: left; margin-left: 0; float: left;"
>
人工</el-radio>
<div v-if="radio2 == 2" style="float: left; margin-left: 20px;">
<span>运行等级</span>
<el-select
:id="domIdRunLevel"
v-model="trainRunlevel"
style="width: 120px; margin-left: 20px;"
size="mini"
:disabled="radio == '01'"
@change="trainNoSelectLevel"
>
<el-option
v-for="option in runLevelList"
:key="option.value"
:label="option.label"
:value="option.value"
/>
</el-select>
</div>
<div v-if="radio2 == 1" style="float: left; margin-left: 20px;">
<span>停站时间</span>
<el-input-number
:id="domIdStopTime"
v-model="trainStopTime"
:min="15"
:max="300"
:step="1"
size="mini"
:controls="false"
style="width:100px;display:inline-block;margin-left:10px;height:34px;"
:disabled="radio == '01'"
@blur="handleTrainStopTime"
/>
<div style="margin-left: 5px;display: inline-block;font-size: 14px;"></div>
</div>
</el-col>
</el-radio-group>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #ECE9D8; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
<el-radio :id="effective === true? '': domIdChoose2" :label="true">一直有效</el-radio>
</el-radio-group>
<!-- <el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-col :span="11">
<el-radio
:id="effective == '02' ? '': domIdChoose2"
label="01"
style="display: block; text-align: left;"
>
一次有效</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio
:id="effective == '01' ? '': domIdChoose2"
label="02"
style="display: block; text-align: left;"
>
一直有效</el-radio>
</el-col>
</el-radio-group> -->
</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" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
standName: '',
stationName: '',
selected: null,
operation: null,
isUpDirection:true,
radio: '01',
radio1: '1',
radio2: '1',
DetainTrain: false,
JumpStop: false,
RunLevel: false,
trainList: [],
runLevelList: [
{ value: 2, label: '常速' },
{ value: 1, label: '低速' },
{ value: 3, label: '高速' }
],
tripNumber: '',
effective: '01',
trainRunlevel: 2,
trainStopTime: 30,
disabledTime: true
};
},
computed: {
...mapGetters('map', [
'map',
'mapConfig'
]),
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) : '';
},
domIdDetainCar() {
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrain.choose.domId : '';
},
domIdDetainChoose() {
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
},
domIdChoose() {
if (this.radio1 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setJumpStop.select.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.select.domId : '';
}
},
// domIdJumpStop() {
// return this.dialogShow ? OperationEvent.StationStand.setJumpStop.choose.domId : '';
// },
domIdCancelJumpStop() {
return this.dialogShow ? OperationEvent.StationStand.cancelJumpStop.choose.domId : '';
},
domIdChoose1() {
if (this.radio2 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose1.domId : '';
}
},
domIdChoose2() {
if (this.radio2 == '1') { //
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
} else { //
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.choose2.domId : '';
}
},
domIdStopTime() {
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
},
domIdRunLevel() {
return this.dialogShow ? OperationEvent.StationStand.setRunLevel.chooseTrain.domId : '';
},
title() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
return '扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
return '设置跳停';
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
return '取消跳停';
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
return '设置停站时间';
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
return '设置站间运行等级';
}
return '';
}
},
watch: {
operation(data) {
if (data != OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
this.JumpStop = false;
this.RunLevel = false;
this.DetainTrain = false;
this.radio = '01';
this.radio1 = '1';
this.radio2 = '1';
if (data == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.radio1 = '1';
this.radio = '01';
this.DetainTrain = true;
} else if (data == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.radio1 = '2';
this.radio = '01';
this.DetainTrain = true;
} else if (data == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.JumpStop = true;
this.radio1 = '1';
} else if (data == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.JumpStop = true;
this.radio1 = '2';
} else if (data == OperationEvent.StationStand.setStopTime.menu.operation) {
this.RunLevel = true;
this.radio2 = '1';
} else if (data == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.RunLevel = true;
this.radio2 = '2';
}
}
}
},
methods: {
doShow(operate, selected, tempDate = null) {
this.selected = selected;
if (!this.dialogShow) {
this.tripNumber = '';
this.standName = '';
this.stationName = '';
this.operation = operate.operation;
if (selected) {
this.getDirection(selected);
}
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.getDirection(selected);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation || this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.radio = selected.direction;
}
this.effective = false;
this.radio = '01';
this.disabledTime = true;
this.trainList = this.map.trainList; //
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
getDirection(selected) {
if (this.mapConfig.upRight) {
this.standName = selected.right ? '上行' : '下行';
this.isUpDirection = selected.right;
} else if (!this.mapConfig.upRight) {
this.standName = selected.right ? '下行' : '上行';
this.isUpDirection = !selected.right;
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.operation = '';
this.trainStopTime = 30;
},
choose(upDown) { // code
const operate = {
operation: upDown == '01'
? OperationEvent.StationStand.cancelDetainTrain.choose.operation
: OperationEvent.Command.common.choose.operation,
val: this.radio
};
if (this.radio == '02' || this.radio == '03') {
this.operation = OperationEvent.StationStand.cancelDetainTrainAll.menu.operation;
} else {
this.operation = OperationEvent.StationStand.cancelDetainTrain.menu.operation;
}
this.handleBreak(operate);
},
trainNoSelectChange(upDown) { //
const operate = {
operation: OperationEvent.StationStand.cancelDetainTrain.choose.operation
};
this.handleBreak(operate);
},
chooseJumpStop(upDown) {
const operate = {
operation: ''
};
if (this.radio1 == '1') { //
operate.operation = OperationEvent.StationStand.setJumpStop.select.operation;
} else { //
operate.operation = OperationEvent.StationStand.cancelJumpStop.select.operation;
}
this.handleBreak(operate);
},
chooseEffective(effective) {
const operate = {
operation: '',
val: effective
};
if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose2.operation;
} else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose2.operation;
}
this.handleBreak(operate);
},
chooseStopTime(upDown) {
const operate = {
operation: '',
val: this.radio
};
if (this.radio2 == '1') { //
operate.operation = OperationEvent.StationStand.setStopTime.choose1.operation;
} else { //
operate.operation = OperationEvent.StationStand.setRunLevel.choose1.operation;
}
if (this.radio === '01') {
this.disabledTime = true;
this.trainRunlevel = 2;
this.effective = false;
} else {
this.disabledTime = false;
this.effective = true;
}
this.handleBreak(operate);
},
trainNoSelectLevel(upDown) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.chooseTrain.operation,
val: `${upDown}`,
param: {
standRunLevel: `${upDown}`
}
};
this.handleBreak(operate);
},
handleTrainStopTime() {
const operate = {
operation: OperationEvent.StationStand.setStopTime.input.operation,
val: `${this.trainStopTime}`
};
this.handleBreak(operate);
},
handleBreak(operate) { //
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
valid && this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
});
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.setDetainTrain(); /** 设置扣车*/
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation || this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
this.cancelDetainTrain(); /** 取消扣车*/
} else if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {
this.setJumpStop(); /** 设置跳停*/
} else if (this.operation == OperationEvent.StationStand.cancelJumpStop.menu.operation) {
this.cancelJumpStop(); /** 取消跳停*/
} else if (this.operation == OperationEvent.StationStand.setStopTime.menu.operation) {
this.setStopTime(); /** 设置停站时间*/
} else if (this.operation == OperationEvent.StationStand.setRunLevel.menu.operation) {
this.setRunLevel(); /** 设置站间运行等级*/
}
},
//
setDetainTrain() {
this.sendCommand(menuOperate.StationStand.setDetainTrain);
},
//
cancelDetainTrain() {
if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.sendCommand(menuOperate.StationStand.cancelDetainTrain);
} else {
this.sendCommand(menuOperate.StationStand.cancelDetainTrainAll);
}
},
//
setJumpStop() {
this.sendCommand(menuOperate.StationStand.setJumpStop, {trainGroupNumber:this.tripNumber});
},
//
cancelJumpStop() {
this.sendCommand(menuOperate.StationStand.cancelJumpStop, {trainGroupNumber:this.tripNumber});
},
//
setStopTime() {
this.sendCommand(menuOperate.StationStand.setStopTime, {parkingTime: this.radio == '01' ? -1 : this.trainStopTime, parkingAlwaysValid: this.effective});
},
//
setRunLevel() {
this.sendCommand(menuOperate.StationStand.setRunLevel, {runLevelTime:this.radio === '02' ? this.trainRunlevel : 2, runLevelTimeForever: this.effective});
},
sendCommand(operate, param) {
this.loading = true;
commitOperate(operate, param, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = false;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style lang="scss" scoped>
.stand-detain-train .context {
height: 80px !important;
}
/deep/ {
.el-input--mini .el-input__icon{
line-height: 100%;
}
}
</style>

View File

@ -1,217 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-detail"
: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="10">
<span>车站</span>
</el-col>
<el-col :span="10" :offset="2">
<span>站台</span>
</el-col>
</el-row>
<el-row class="header">
<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" style="padding: 0 3px;" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>停站时间</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.stopTime" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>运行等级</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.runLevel" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>扣车</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.detainCar" size="small" disabled />
</el-col>
</el-row>
<el-row class="content">
<el-col :span="6">
<span>跳停</span>
</el-col>
<el-col :span="18">
<el-input v-model="modelData.jumpStop" size="small" disabled />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="18">
<span style="opacity: 0;">1</span>
</el-col>
<el-col :span="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'StandDetail',
components: {
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
dialogShow: false,
loading: false,
tempData: [],
stationName: '',
standName: '',
runLevelList: [
'自动',
'低速',
'常速',
'高速'
],
modelData: {
stopTime: '自动',
runLevel: '自动',
detainCar: '无扣车',
jumpStop: '无跳停'
}
};
},
computed: {
...mapGetters('map', [
'mapConfig',
'stationList'
]),
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 '站台信息';
}
},
methods: {
loadInitData(selected, opts) {
this.tempData = [];
// const stationList = this.stationList.slice();
// const index = this.stationList.findIndex(n => n.code == selected.stationCode);
// let stationStand, station;
// if (selected.direction == '01') { //
// //
// if (index != 0) {
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
// }
// } else {
// //
// if (index != this.stationList.length - 1) {
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
// }
// }
this.modelData = {
stopTime: selected.parkingTime < 0 ? '自动' : `${selected.parkingTime}`,
runLevel: this.runLevelList[selected.runLevelTime],
detainCar: selected.stationHoldTrain || selected.centerHoldTrain ? '已设置' : '无扣车',
jumpStop: selected.allSkip || selected.assignSkip ? '已设置' : '无跳停'
};
},
doShow(operate, selected, opts) {
this.selected = selected;
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
if (this.mapConfig.upRight) {
this.standName = selected.right ? '上行' : '下行';
} else if (!this.mapConfig.upRight) {
this.standName = selected.right ? '下行' : '上行';
}
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.loadInitData(selected, opts);
}
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 = {
operation: OperationEvent.Command.close.confirm.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.content {
margin-top: 20px;
}
</style>

View File

@ -1,332 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-control"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item v-if="operation != '70c'" prop="sectionCode">
<span slot="label">轨道</span>
<el-input v-model="addModel.sectionCode" />
</el-form-item>
<el-form-item v-else prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车组号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item v-if="operation == '708'" prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" />
</el-form-item>
<el-form-item v-else-if="operation == '70c'" prop="targetCode">
<span slot="label">目的地</span>
<el-input v-model="addModel.targetCode" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item v-if="operation == '708'" prop="trainCode">
<span slot="label">序列号</span>
<el-input v-model="addModel.trainCode" />
</el-form-item>
<el-form-item v-else-if="operation == '70c'" prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item v-if="operation == '70c'" prop="trainType">
<span slot="label">运行模式</span>
<br>
<el-radio-group v-model="addModel.runningMode" style="margin-left: 15px;">
<el-radio :label="'01'">普通</el-radio>
<el-radio :label="'02'">专列</el-radio>
<el-radio :label="'03'">不停站直达</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-train ref="confirmTrain" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'TrainControl',
components: {
ConfirmTrain,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
trainList: [],
selected: null,
addModel: {
stationName: '',
sectionCode: '',
trainWindowCode: '',
groupNumber: '',
serviceNumber: '',
targetCode: '',
trainCode: '',
runningMode: ''
},
rules: {
stationName: [
{ required: true, message: '请输入车站', trigger: 'blur'}
],
sectionCode: [
{ required: true, message: '请输入轨道', trigger: 'blur'}
],
trainWindowCode: [
{ required: true, message: '请输入车次窗', trigger: 'blur'}
],
groupNumber: [
{ required: true, message: '请选择车组号', trigger: 'change' }
],
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur'}
],
targetCode: [
{ required: true, message: '请输入目的地号', trigger: 'blur'}
],
trainCode: [
{ required: true, message: '请输入序列号', trigger: 'blur'}
],
runningMode: [
{ required: true, message: '请选择运行模式', trigger: 'blur'}
]
},
operation: null,
dialogShow: false,
loading: false,
direction: 0
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
/* 设目的地*/
return OperationEvent.Train.destinationTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation) {
/* 设计划车*/
return OperationEvent.Train.setPlanTrainId.menu.domId;
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation) {
/* 设人工车*/
return OperationEvent.Train.artificialTrainId.menu.domId;
}
return '';
}
return '';
},
title() {
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation) {
return '设目的地车';
} else if ( this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
return '设计划车';
} else if ( this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
return '设人工车';
}
return '';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.operation = operate.operation;
}
this.addModel = {
tripNumber: '',
groupNumber: '',
trainType: '01',
serviceNumber: '',
targetCode: ''
};
/** 加载列车数据*/
this.loadInitData(this.map);
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
if ( this.operation == OperationEvent.Train.destinationTrainId.menu.operation ) {
this.destinationTrainId();
} else if (this.operation == OperationEvent.Train.setPlanTrainId.menu.operation ) {
this.setPlanTrainId();
} else if (this.operation == OperationEvent.Train.artificialTrainId.menu.operation ) {
this.artificialTrainId();
}
},
//
destinationTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.destinationTrainId.menu.operation,
message: [`设目的地车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
//
setPlanTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
message: [`设计划车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
//
artificialTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
operation: OperationEvent.Train.artificialTrainId.menu.operation,
message: [`设人工车:成功`],
val: ''
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,133 +0,0 @@
<template>
<el-dialog v-dialogDrag class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item label="列车:" prop="trainCode">
<el-select v-model="trainCode" filterable placeholder="列车">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="列车方向:" prop="direction">
<el-select v-model="direction" filterable placeholder="列车方向">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div> -->
</el-form-item>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
trainList: [],
trainNoList: [],
directionList: [
{
value: '2',
label: '上行'
},
{
value: '1',
label: '下行'
}
],
trainCode: '',
tripNumber: '',
direction: '',
selected: null
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return OperationEvent.Section.newtrain.menu.domId;
},
title() {
return '设置列车';
}
},
methods: {
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.trainCode = '';
this.direction = '';
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
send: true,
operation: OperationEvent.Section.newtrain.menu.operation,
cmdType: CMD.Section.CMD_NEW_TRAIN,
val: '' + this.direction + '::' + this.trainCode
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).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.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -1,181 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainCreateNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
trainWindowCode: '',
groupNumber:''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur'}
]
},
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.Train.editTrainNo.menu.domId : '';
},
title() {
return '新建车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
trainWindowCode: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.createTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,150 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__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="90px" :model="addModel" :rules="rules">
<el-form-item label="车 组 号:" 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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { getPublishMapTrainNos } from '@/api/runplan';
import CancelMouseState from '@/mixin/CancelMouseState';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'TrainDelete',
components: {
ConfirmControl,
NoticeInfo
},
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
addModel: {
groupNumber: ''
},
rules: {
groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
]
},
operation: null,
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
},
title() {
return '删除列车识别号';
}
},
methods: {
loadInitData(map) {
if (map) {
// getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data;
// }).catch(() => {
// this.$messageBox(``);
// });
}
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
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.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.delTrainId.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,176 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable disabled>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainDeleteNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
trainWindowCode: '',
groupNumber:''
},
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.Train.editTrainNo.menu.domId : '';
},
title() {
return '删除车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
trainWindowCode: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.deleteTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,378 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="groupNumber">
<span slot="label">车组号</span>
<el-input v-model="addModel.groupNumber" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="type">
<span slot="label">服务类型</span>
<el-input v-model="addModel.type" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="serviceNumber">
<span slot="label">服务号</span>
<el-input v-model="addModel.serviceNumber" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainCode">
<span slot="label">序列号</span>
<el-input v-model="addModel.trainCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="driverCode">
<span slot="label">司机号</span>
<el-input v-model="addModel.driverCode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="targetCode">
<span slot="label">目的地号</span>
<el-input v-model="addModel.targetCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="sectionCode">
<span slot="label">轨道</span>
<el-input v-model="addModel.sectionCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="nextStation">
<span slot="label">下一站</span>
<el-input v-model="addModel.nextStation" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="targetName">
<span slot="label">目的地</span>
<el-input v-model="addModel.targetName" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="trackingMode">
<span slot="label">跟踪模式</span>
<el-input v-model="addModel.trackingMode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="runStatus">
<span slot="label">运行状态</span>
<el-input v-model="addModel.runStatus" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="departureTime">
<span slot="label">出发时刻</span>
<el-input v-model="addModel.departureTime" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="arrivedTime">
<span slot="label">到达时刻</span>
<el-input v-model="addModel.arrivedTime" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="planDeviation">
<span slot="label">计划偏离</span>
<el-input v-model="addModel.planDeviation" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="marshallingNo">
<span slot="label">编组号</span>
<el-input v-model="addModel.marshallingNo" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="carNo1">
<span slot="label">车头号1</span>
<el-input v-model="addModel.carNo1" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="carNo2">
<span slot="label">车头号2</span>
<el-input v-model="addModel.carNo2" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="tableData" style="width: 100%" height="250">
<el-table-column prop="carriage" label="车厢" width="80" />
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
</el-table>
</el-tab-pane>
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="trainId">
<span slot="label">车载ID</span>
<el-input v-model="addModel.trainId" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="directionType">
<span slot="label">运行方向</span>
<el-input v-model="addModel.directionType" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="drivingMode">
<span slot="label">驾驶模式</span>
<el-input v-model="addModel.drivingMode" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="speed">
<span slot="label">速度</span>
<el-input v-model="addModel.speed" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="stopQuasiState">
<span slot="label">停准状态</span>
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="doorStatus">
<span slot="label">车门状态</span>
<el-input v-model="addModel.doorStatus" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="runLevel">
<span slot="label">运行等级</span>
<el-input v-model="addModel.runLevel" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="stopState">
<span slot="label">停跳状态</span>
<el-input v-model="addModel.stopState" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="position">
<span slot="label">车头位置</span>
<el-input v-model="addModel.position" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="loadingRate">
<span slot="label">载重率</span>
<el-input v-model="addModel.loadingRate" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
</el-tabs>
</div>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="19">
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainDetailInfo',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName:'',
groupNumber:'',
type:'',
serviceNumber:'',
trainCode:'',
driverCode:'',
targetCode:'',
sectionCode:'',
nextStation:'',
targetName:'',
trackingMode:'',
runStatus:'',
departureTime:'',
arrivedTime:'',
planDeviation:'',
marshallingNo:'',
carNo1:'',
carNo2:'',
trainId:'',
directionType:'',
drivingMode:'',
speed:'',
stopQuasiState:'',
doorStatus:'',
runLevel:'',
stopState:'',
position:'',
loadingRate:''
},
activeName:'first',
dialogShow: false,
loading: false,
tableData:[
{carriage:'1', carriageNumber:'101'},
{carriage:'2', carriageNumber:'102'},
{carriage:'3', carriageNumber:'103'},
{carriage:'4', carriageNumber:'104'},
{carriage:'5', carriageNumber:'105'},
{carriage:'6', carriageNumber:'106'}
]
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdCarAlarm() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
},
domIdBasicInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
},
domIdMarshalInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
},
domIdAtpInfo() {
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
},
title() {
return '列车信息显示';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName:'',
tripNumber: '',
groupNumber:''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
handleClick() {
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,174 +0,0 @@
<template>
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-form-item>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-form-item>
<el-row>
<el-col :span="11">
<el-form-item label="旧车组号" prop="oldGroupNumber">
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item label="新车组号" prop="newGroupNumber">
<el-select v-model="addModel.newGroupNumber">
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group-train">
<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>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainEditNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
oldGroupNumber: '',
newGroupNumber: ''
},
rules: {
newGroupNumber: [
{ required: true, message: '请输入新车组号', trigger: 'blur'}
]
},
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.Train.editTrainNo.menu.domId : '';
},
title() {
return '修改车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName: '',
trainWindowCode: '',
oldGroupNumber: '',
newGroupNumber: ''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.editTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,200 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="640px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 46%;">
<el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" disabled />
</el-form-item>
</div>
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
>
<span class="base-label">源车次窗</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandSource">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
<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="车 次 窗:" prop="trainSource">
<el-input v-model="addModel.trainSource" />
</el-form-item>
</div>
</div>
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
>
<span class="base-label">目的车次窗</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandGoal">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
<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="车 次 窗:" prop="trainGoal">
<el-input v-model="addModel.trainGoal" />
</el-form-item>
</div>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainMove',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
addModel: {
tripNumber: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: ''
},
rules: {
tripNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
trainGoal: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: '请选择车站', trigger: 'change' }
]
},
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.Train.moveTrainId.menu.domId : '';
},
title() {
return '移动列车识别号';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainId.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__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,193 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="480px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="el-dialog-div">
<el-form ref="form" size="small" label-width="90px" :model="addModel" label-position="left">
<el-row>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车 组 号:" prop="groupNumber">
<el-select v-model="addModel.groupNumber" filterable disabled>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item prop="purposeStationName">
<span slot="label">车站</span>
<el-input v-model="addModel.purposeStationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="purposeTrainWindowCode">
<span slot="label">目的车次窗</span>
<el-input v-model="addModel.purposeTrainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainMoveNumber',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
trainList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '',
purposeStationName: '',
purposeTrainWindowCode: ''
},
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.Train.editTrainNo.menu.domId : '';
},
title() {
return '移动车组号';
}
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.addModel = {
stationName: '',
trainWindowCode: '',
groupNumber: '',
purposeStationName: '',
purposeTrainWindowCode: ''
};
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.el-dialog-div {
height: 400px;
overflow: auto;
}
</style>

View File

@ -1,209 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="640px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="overflow: hidden;">
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px; margin-right: 4%;"
>
<span class="base-label">源车次窗</span>
<div style="position: relative; top:-10px;">
<el-form-item label="车 组 号:" prop="trainNumberSource">
<el-input v-model="addModel.trainNumberSource" />
</el-form-item>
<el-form-item prop="stationStandSource">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
<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="车 次 窗:" prop="trainSource">
<el-input v-model="addModel.trainSource" />
</el-form-item>
</div>
</div>
<div
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 177px;"
>
<span class="base-label">目的车次窗</span>
<div style="position: relative; top:-10px;">
<el-form-item label="车 组 号:" prop="trainNumberGoal">
<el-input v-model="addModel.trainNumberGoal" />
</el-form-item>
<el-form-item prop="stationStandGoal">
<span slot="label">&emsp; :</span>
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
<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="车 次 窗:" prop="trainGoal">
<el-input v-model="addModel.trainGoal" />
</el-form-item>
</div>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
export default {
name: 'TrainSwitch',
mixins: [
CancelMouseState
],
data() {
return {
trainNoList: [],
selected: null,
addModel: {
trainNumberSource: '',
trainSource: '',
stationStandSource: '',
trainGoal: '',
stationStandGoal: '',
trainNumberGoal: ''
},
rules: {
trainNumberSource: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandSource: [
{ required: true, message: '请选择车站', trigger: 'change' }
],
trainNumberGoal: [
{ required: true, message: '请输入车组号', trigger: 'blur' }
],
trainGoal: [
{ required: true, message: '请输入车次号', trigger: 'blur' }
],
stationStandGoal: [
{ required: true, message: '请选择车站', trigger: 'change' }
]
},
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.Train.moveTrainId.menu.domId : '';
},
title() {
return '移动列车识别号';
}
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
send: true,
operation: OperationEvent.Train.moveTrainId.menu.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__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,364 +0,0 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<!--<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />-->
<menu-button ref="menuButton" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" />
<menu-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<passive-Timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal';
import MenuButton from './menuButton';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'Menus',
components: {
MenuBar,
MenuButton,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
]),
isShowBar() {
return this.$store.state.training.prdType && this.$store.state.training.prdType !== '07';
}
},
watch: {
isShowBar(val) {
val && this.$store.dispatch('config/updateMenuBar');
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
const _that = this;
window.onclick = function (e) {
if (!_that.$store.state.training.trainingStart) {
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
}
_that.$refs.menuStationStand.doClose();
_that.$refs.menuSwitch.doClose();
_that.$refs.menuSignal.doClose();
_that.$refs.menuSection.doClose();
_that.$refs.menuTrain.doClose();
_that.$refs.menuStation.doClose();
};
});
},
beforeDestroy() {
window.onclick = function (e) {};
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.chengdou-03__systerm {
overflow: hidden !important;
}
.chengdou-03__systerm .el-dialog {
background: #0055E8;
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
border: 1px solid rgb(69, 134, 247);
border-radius: 6px;
font-size: 13px !important;
color: #000;
}
.chengdou-03__systerm .el-dialog span {
font-size: 13px !important;
line-height: 22px;
}
.chengdou-03__systerm .el-dialog span .el-icon-arrow-up{
line-height: 18px;
}
.chengdou-03__systerm .el-dialog .el-dialog__footer {
background: #ECE9D8;
opacity: 1;
}
.chengdou-03__systerm .el-dialog .el-dialog__body {
padding: 20px;
margin: 0px 3px 3px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #ECE9D8;
opacity: 1;
}
.chengdou-03__systerm .el-dialog .el-dialog__title {
font-size: 16px;
color: #fff;
position: absolute;
top: 4px;
left: 7px;
}
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 6px;
right: 3px;
line-height: 16px;
}
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.chengdou-03__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.chengdou-03__systerm .el-dialog .el-button {
height: 24px;
line-height: 22px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 4px !important;
color: #000;
background: #F0F0F0;
}
.chengdou-03__systerm .el-dialog .expand {
width: 120px;
}
.chengdou-03__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.chengdou-03__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.chengdou-03__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.chengdou-03__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.chengdou-03__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
height: 22px !important;
line-height: 22px !important;
}
.chengdou-03__systerm .el-dialog .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
height: 22px !important;
line-height: 22px !important;
}
.chengdou-03__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.chengdou-03__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.chengdou-03__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.chengdou-03__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.chengdou-03__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.chengdou-03__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.chengdou-03__systerm .el-dialog .el-table .cell {
height: 22px;
line-height: 22px;
}
.chengdou-03__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.chengdou-03__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.chengdou-03__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.chengdou-03__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.chengdou-03__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.chengdou-03__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.chengdou-03__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.chengdou-03__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.chengdou-03__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.chengdou-03__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.chengdou-03__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.chengdou-03__systerm .el-dialog .table {
margin-top: 10px;
}
.chengdou-03__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.chengdou-03__systerm .el-dialog .button-group {
margin-top: 20px;
}
</style>

View File

@ -1,685 +0,0 @@
<template>
<div id="menuBarChengdu3">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%" />
<station-control-convert ref="stationControlConvert" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-name ref="viewName" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
<set-limit-speed ref="setLimitSpeed" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuBar from '@/jmapNew/theme/components/menus/menuBar';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import PasswordBox from './menuDialog/passwordBox';
import ViewName from './menuDialog/viewName';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import SetLimitSpeed from './menuDialog/setLimitSpeed';
export default {
name: 'MenuBarChengdu03',
components: {
MenuBar,
StationControlConvert,
PasswordBox,
ViewName,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout,
SetLimitSpeed
},
data() {
return {
menuNormal: {
Local: [
{
title: '系统',
// operate: OperationEvent.Command.mBar.system,
operate: '',
children: [
{
title: '登录',
click: this.undeveloped
},
{
title: '注销',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped
},
{
title: '连接备用中心',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped
}
]
},
{
title: '临时限速',
operate: OperationEvent.Command.mBar.limitSpeed,
children: [
{
title: '设置临时限速',
operate: OperationEvent.Section.setLimitSpeed,
click: this.setLimitSpeed
},
{
title: '取消临时限速',
operate: OperationEvent.Section.cancelSpeed,
click: this.cancleLimitSpeed
}
]
},
{
title: '查看',
// operate: OperationEvent.Command.mBar.check,
operate: '',
children: [
{
title: '运行图',
click: this.undeveloped
},
{
title: '报告分析',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped
},
{
title: '列车运行信息',
click: this.undeveloped
},
{
title: '设备状态',
click: this.undeveloped
},
{
title: '列车详细信息',
click: this.undeveloped
},
{
title: '站台详细信息',
click: this.undeveloped
}]
},
{
title: '终端站发车列表',
click: this.undeveloped
},
{
title: '详细设备状态',
click: this.undeveloped
},
{
title: '查找列车',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped
},
{
title: '显示轨道名',
click: this.undeveloped
},
{
title: '显示道岔名',
click: this.undeveloped
},
{
title: '显示信号机名',
click: this.undeveloped
},
{
title: '显示车次窗位置',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped
},
{
title: '显示车组号',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped
},
{
title: '放大',
click: this.undeveloped
},
{
title: '缩小',
click: this.undeveloped
},
{
title: '恢复',
click: this.undeveloped
}
]
},
// {
// title: '',
// operate: '',
// children: [
// ]
// },
{
title: '显示',
// operate: OperationEvent.Command.mBar.view,
operate: '',
hide: true,
children: [
{
title: '设置列车识别号显示',
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
},
{
title: '设置名称显示',
click: this.setNameDisplay,
operate: OperationEvent.Command.view.setNameDisplay
},
{
title: '设置设备显示',
click: this.setDeviceDisplay,
operate: OperationEvent.Command.view.setDeviceDisplay
}
]
},
{
title: 'ATS终端操作',
operate: '',
children: [
{
title: '当天运行车计划',
click: this.undeveloped
},
{
title: '出入库预告',
click: this.undeveloped
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped
},
{
title: '平移计划车',
click: this.undeveloped
},
{
title: '删除计划车',
click: this.undeveloped
}
]
},
{
title: '批处理命令',
operate: '',
children: [
{
title: '全线扣车',
click: this.undeveloped
},
{
title: '取消全线扣车',
click: this.undeveloped
},
{
title: '取消上行全线扣车',
click: this.undeveloped
},
{
title: '取消下行全线扣车',
click: this.undeveloped
}
]
},
{
title: '信息管理',
operate: '',
children: [
{
title: '调度日志',
click: this.undeveloped
},
{
title: '调度留言提醒',
click: this.undeveloped
},
{
title: '报警设置',
click: this.undeveloped
}
]
},
{
title: '帮助',
operate: '',
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about
}
]
}
],
Center: [
{
title: '系统',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.undeveloped
},
{
title: '注销',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped
},
{
title: '连接备用中心',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped
}
]
},
{
title: '临时限速',
operate: OperationEvent.Command.mBar.limitSpeed,
children: [
{
title: '设置临时限速',
operate: OperationEvent.Section.setLimitSpeed,
click: this.setLimitSpeed
},
{
title: '取消临时限速',
operate: OperationEvent.Section.cancelSpeed,
click: this.cancleLimitSpeed
}
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
children: [
{
title: '运行图',
click: this.undeveloped
},
{
title: '报告分析',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped
},
{
title: '列车运行信息',
click: this.undeveloped
},
{
title: '设备状态',
click: this.undeveloped
},
{
title: '列车详细信息',
click: this.undeveloped
},
{
title: '站台详细信息',
click: this.undeveloped
}]
},
{
title: '终端站发车列表',
click: this.undeveloped
},
{
title: '详细设备状态',
click: this.undeveloped
},
{
title: '查找列车',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped
},
{
title: '显示轨道名',
click: this.undeveloped
},
{
title: '显示道岔名',
click: this.undeveloped
},
{
title: '显示信号机名',
click: this.undeveloped
},
{
title: '显示车次窗位置',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped
},
{
title: '显示车组号',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped
},
{
title: '放大',
click: this.undeveloped
},
{
title: '缩小',
click: this.undeveloped
},
{
title: '恢复',
click: this.undeveloped
}
]
},
{
title: '车站定位',
operate: '',
children: [
]
},
{
title: '显示',
operate: OperationEvent.Command.mBar.view,
hide: true,
children: [
{
title: '设置列车识别号显示',
click: this.setTrainIdDisplay,
operate: OperationEvent.Command.view.setTrainIdDisplay
},
{
title: '设置名称显示',
click: this.setNameDisplay,
operate: OperationEvent.Command.view.setNameDisplay
},
{
title: '设置设备显示',
click: this.setDeviceDisplay,
operate: OperationEvent.Command.view.setDeviceDisplay
}
]
},
{
title: 'ATS终端操作',
operate: '',
children: [
{
title: '当天运行车计划',
click: this.undeveloped
},
{
title: '出入库预告',
click: this.undeveloped
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped
},
{
title: '平移计划车',
click: this.undeveloped
},
{
title: '删除计划车',
click: this.undeveloped
}
]
},
{
title: '批处理命令',
operate: '',
children: [
{
title: '全线扣车',
click: this.undeveloped
},
{
title: '取消全线扣车',
click: this.undeveloped
},
{
title: '取消上行全线扣车',
click: this.undeveloped
},
{
title: '取消下行全线扣车',
click: this.undeveloped
}
]
},
{
title: '信息管理',
operate: '',
children: [
{
title: '调度日志',
click: this.undeveloped
},
{
title: '调度留言提醒',
click: this.undeveloped
},
{
title: '报警设置',
click: this.undeveloped
}
]
},
{
title: '帮助',
operate: '',
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about
}
]
}
]
}
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
created() {
this.menuNormal['Center'][3].children = this.initStationList();
},
methods: {
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
title: station.name,
operate: station.code,
show: true,
click: this.mapLocation,
code: station.code
};
list.push(node);
}
});
return list;
},
//
mapLocation(code) {
if (code) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
}
},
//
about(order) {
const operate = {
operation: order.operate
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
},
getLoginResult(operate) {
/** 密码校验*/
if (operate.operation == OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation) {
if (operate.success) {
/** 校验成功*/
this.$refs.stationControlConvert.doShow({ operation: OperationEvent.StationControl.forcedStationControl.mbar.operation });
}
}
},
setLimitSpeed(order) {
const operate = {
operation: order.operate
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.setLimitSpeed.doShow(operate, true);
}
});
},
blankClickClose() {
this.$refs.menuBar.doClose();
},
cancleLimitSpeed(order) {
const operate = {
operation: order.operate
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.setLimitSpeed.doShow(operate, false);
}
});
},
undeveloped() {
this.$refs.menuBar.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
#menuBarChengdu3{
line-height:30px;
}
#menuBarChengdu3 #menuBar .menu-li-block .label{
padding: 0px 30px 0px 5px !important;
}
</style>

View File

@ -1,133 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm two-confirmation"
title="二次确认"
: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">确认</el-button>
</el-col>
<el-col :span="6" :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 '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
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 [];
}
},
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 = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
},
commit() {
if (this.operate && this.operate.selection) {
const operate = {
send: true,
type: this.operate.type,
val: this.operate.val,
selection: this.operate.selection
};
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
}
this.loading = true;
this.doClose();
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
if (valid) {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}, 1000).catch(() => {
this.loading = true;
this.$refs.noticeInfo.doShow();
});
}
}
}
};
</script>

View File

@ -1,157 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm user-add" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
<el-form-item label="工号:" prop="jobNumber">
<el-input v-model="model.jobNumber"></el-input>
</el-form-item>
<el-form-item label="用户名:" prop="userName">
<el-input v-model="model.userName"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="password">
<el-input type="password" v-model="model.password"></el-input>
</el-form-item>
<el-form-item label="确认密码:" prop="confirm">
<el-input type="password" v-model="model.confirm"></el-input>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="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: '请输入工号', trigger: 'blur' }
],
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'change' }
],
confirm: [
{ required: true, message: '请再次输入密码', 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 '增加用户'
}
},
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) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.loading = true;
this.$store.dispatch('trainingNew/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('二次输入密码不一致');
}
}
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); this.model });
}
}
}
</script>
<style scoped>
.chengdou-03__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,129 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm user-delete" :title="title" :visible.sync="show" width="260px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding-left: 10px; padding-bottom: 10px">
<i class="el-icon-info"></i>
<template v-for="message in messages">
<span>{{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">确定</el-button>
</el-col>
<el-col :span="8" :offset="2">
<el-button :id="domIdCancel" @click="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 '删除用户'
}
},
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) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$emit('operateUser', this.model);
}
})
} else {
this.$messageBox('选择的用户名或工号为空');
}
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__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,173 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm user-edit" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
<el-form-item label="工号:" prop="jobNumber">
<el-input v-model="model.jobNumber" disabled></el-input>
</el-form-item>
<el-form-item label="用户名:" prop="userName">
<el-input v-model="model.userName" disabled></el-input>
</el-form-item>
<el-form-item label="原始密码:" prop="oldPassword">
<el-input type="oldPassword" v-model="model.oldPassword"></el-input>
</el-form-item>
<el-form-item label="密码:" prop="password">
<el-input type="password" v-model="model.password"></el-input>
</el-form-item>
<el-form-item label="确认密码:" prop="confirm">
<el-input type="password" v-model="model.confirm"></el-input>
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="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: '请输入工号', trigger: 'blur' }
],
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
],
oldPassword: [
{ required: true, message: '请输入原始密码', trigger: 'change' }
],
password: [
{ required: true, message: '请输入新密码', trigger: 'change' }
],
confirm: [
{ required: true, message: '请再次输入新密码', 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 '用户编辑页面'
}
},
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) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation,
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid)
if (this.selected.password !== this.model.oldPassword) {
this.$messageBox('原始密码错误');
} else if (this.model.password !== this.model.confirm) {
this.$messageBox('二次输入的密码错误');
} else if (this.model.oldPassword === this.model.password) {
this.$messageBox('老密码和新密相同');
} else {
this.doClose();
this.$emit('operateUser', this.model);
}
})
} else {
return false;
}
});
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
}
</script>
<style scoped>
.chengdou-03__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,138 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__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-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
trainNoList: [],
addModel: {
},
rules: {
// groupNumber: [
// { required: true, message: '', trigger: 'blur' }
// ],
// stationStandCode: [
// { required: true, message: '', 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 '设置限速';
}
},
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('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__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,285 +0,0 @@
<template>
<el-dialog class="chengdou-03__systerm manage-user" :title="title" :visible.sync="show" width="420px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">用户列表</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="工号" width="120">
<template slot-scope="scope">
<span>{{scope.row.jobNumber}}</span>
</template>
</el-table-column>
<el-table-column prop="userName" label="用户名">
<template slot-scope="scope">
<span>{{scope.row.userName}}</span>
</template>
</el-table-column>
<el-table-column width="20">
</el-table-column>
</el-table>
</el-col>
<el-col :span="4">
<el-button style="margin-top: 140px; margin-left: 10px;" :id="domIdFreshUser" @click="freshUser">刷新
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdAddUser" @click="addUser">增加
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdEditUser" @click="editUser">修改
</el-button>
<el-button style="margin-top: 30px; margin-left: 10px;" :id="domIdDelUser" @click="delUser">删除
</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">确定</el-button>
</el-col>
<el-col :span="8" :offset="0">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<user-add ref="userAdd" @operateUser="operateUser"></user-add>
<user-edit ref="userEdit" @operateUser="operateUser"></user-edit>
<user-delete ref="userDelete" @operateUser="operateUser"></user-delete>
</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 '用户管理'
}
},
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() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.addUser.operation,
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userAdd.doShow(operate);
}
}).catch(error => {
this.loading = false;
})
},
//
editUser() {
if (this.selected) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.editUser.operation,
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userEdit.doShow(operate, this.selected);
}
}).catch(error => {
this.loading = false;
})
} else {
this.$messageBox('请先选择用户');
}
},
//
delUser() {
if (this.selected) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.delUser.operation,
messages: [`你确定删除用户${this.selected.userName}吗?`]
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$refs.userDelete.doShow(operate, this.selected);
}
}).catch(error => {
this.loading = false;
})
} else {
this.$messageBox('请先选择用户');
}
},
//
freshUser() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.freshUser.operation,
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
}).catch(error => {
this.loading = false;
})
},
//
chooseUser(row) {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.manage.chooseUser.operation,
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
this.selected = row;
}).catch(error => {
this.loading = false;
})
},
commit() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
})
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
},
//
operateUser(data) {
if (data && data.type === 'ADD') {
let 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('添加失败,存在相同工号的用户');
}
} else if (data && data.type === 'EDIT') {
let 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('修改失败');
}
} else if (data && data.type === 'DELETE') {
let index = this.tableData.indexOf(this.tableData.find(elem => { return elem.jobNumber === data.jobNumber }));
if (index >= 0) {
this.tableData.splice(index, 1);
} else {
this.$messageBox('删除失败');
}
}
}
}
}
</script>
<style scoped>
.chengdou-03__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,221 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm password-box"
title="密码框"
: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">用户名</span>
<el-input v-model="model.username" disabled />
</el-form-item>
<el-form-item prop="password">
<span slot="label">&emsp;</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">回退</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">清空</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">确定</el-button>
</el-col>
<el-col :span="6" :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 '@/jmapNew/theme/components/menus/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 (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
return '';
}
},
methods: {
loadInitData(operate) {
this.model.username = '';
this.model.password = '';
this.operate = operate || {};
this.operation = operate.operation;
this.model.username = this.$store.state.user.name;
},
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 = {
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
type: this.operate.type
};
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('trainingNew/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('密码输入错误!');
}
},
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,286 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="14">
<div class="card-box">
<span class="tip-label">请求</span>
<el-row style="margin: 5px">
<el-col :span="6" class="item-label">线路选择</el-col>
<el-col :span="6">
<el-select v-model="data.path">
<el-option
v-for="item in pathList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="6" class="item-label">限制速度</el-col>
<el-col :span="6">
<el-select v-model="data.speed">
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">起始公里标</el-col>
<el-col :span="6">
<el-input v-model="data.begKmPost" />
</el-col>
<el-col :span="6" class="item-label">结束公里标</el-col>
<el-col :span="6">
<el-input v-model="data.endKmPost" />
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">限速区段长度</el-col>
<el-col :span="6">
<el-input v-model="data.length" />
</el-col>
<el-col :span="3">
<el-button>查看</el-button>
</el-col>
<el-col :span="3">
<el-button>请求</el-button>
</el-col>
</el-row>
</div>
<div class="card-box">
<span class="tip-label">执行</span>
<el-row style="margin: 5px">
<el-col :span="6" class="item-label">线路选择</el-col>
<el-col :span="6">
<el-select v-model="form.path">
<el-option
v-for="item in pathList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-col>
<el-col :span="6" class="item-label">限制速度</el-col>
<el-col :span="6">
<el-select v-model="form.speed">
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">起始公里标</el-col>
<el-col :span="6">
<el-input v-model="form.begKmPost" />
</el-col>
<el-col :span="6" class="item-label">结束公里标</el-col>
<el-col :span="6">
<el-input v-model="form.endKmPost" />
</el-col>
</el-row>
<el-row>
<el-col :span="6" class="item-label">限速区段长度</el-col>
<el-col :span="6">
<el-input v-model="form.length" />
</el-col>
<el-col :span="3">
<el-button>查看</el-button>
</el-col>
<el-col :span="3">
<el-button>请求</el-button>
</el-col>
</el-row>
</div>
<div class="card-box">
<span class="tip-label">操作提示</span>
</div>
</el-col>
<el-col :span="9" :offset="1">
<div class="card-box">
<span class="tip-label">设备列表</span>
<el-table class="card-table" :data="deviceData" border style="width: 100%" height="300">
<el-table-column prop="stationName" label="站名" />
<el-table-column prop="deviceCode" label="设备号" />
<el-table-column prop="deviceName" label="设备名" />
</el-table>
</div>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'TrainAdd',
components: {
},
data() {
return {
operation: null,
dialogShow: false,
loading: false,
data: {
path: '',
speed: '',
begKmPost: '',
endKmPost: '',
length: ''
},
form: {
path: '',
speed: '',
begKmPost: '',
endKmPost: '',
length: ''
},
pathList: [
{ name: '上行站线', value: '01' },
{ name: '下行站线', value: '02' }
],
speedList: [
{ name: '10Km/h', value: '10' },
{ name: '15Km/h', value: '15' },
{ name: '20Km/h', value: '20' },
{ name: '25Km/h', value: '25' }
],
deviceData: []
};
},
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 '设置临时限速';
}
},
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('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.card-box {
border: 1px solid #c0c0c0;
margin-bottom: 20px;
}
.card-table {
position: relative;
top: -15px;
}
.tip-label {
position: relative;
left: 5px;
top: -15px;
background: #ECE9D8;
}
.item-label {
text-align: center;
}
</style>

View File

@ -1,433 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm station-control-convert"
title="控制模式转换"
: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="选择" 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="操作区域" 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="控制模式" 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="中心-车站通信状态" 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="转换执行状态">
<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">
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">强制站控</el-button>
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">请求站控
</el-button>
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">请求中控
</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">关闭</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': '中控',
'02': '站控'
},
selection: [],
tableData: [],
timer: null,
count: 0,
backOperate: '',
timeout: 61
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
...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 '';
},
isRequest() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
}
return '';
},
isConter() {
if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
}
return '';
},
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 '';
},
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) {
if (elem.hasOwnProperty('timeout')) {
this.updateTableValue(elem.stationControlCode, { result: `接受转换应答超时` }, false);
} else if (elem.hasOwnProperty('success')) {
if (elem.success) {
this.updateTableValue(elem.stationControlCode, { result: '控制模式转换成功' }, true);
} else {
this.updateTableValue(elem.stationControlCode, { result: `控制模式转换失败` }, 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.timeout}秒后超时.` }, false);
} else if (operate.cancel) {
this.updateTableValue(elem.code, { result: '' }, false);
}
});
}
}
},
//
tableData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
},
deep: true
}
},
mounted() {
this.loadTableData();
},
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.stationList.forEach(station => {
// const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
this.tableData.push({
code: station.code,
operate: station.name || '',
control: '',
check: false,
disabled: false,
status: '正常',
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) || {}).state;
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() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
},
cancel() {
const operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
clearTimer() {
this.count = 0;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
serializeCodeListWithSeparator(sep) {
const codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
});
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
const operate = {
operation: '',
val: this.serializeCodeListWithSeparator('::'),
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('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.disabledSure = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else if (!selection) {
this.$messageBox('请选择一条数据');
}
},
requestCommit() {
const operate = {
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
operation: OperationEvent.StationControl.requestStationControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('trainingNew/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;
this.disabledClose = false;
});
},
forkCommit() {
const operate = {
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('trainingNew/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;
this.disabledClose = false;
});
},
conterCommit() { //
const operate = {
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'),
selection: this.selection
};
this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`);
});
this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('trainingNew/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;
this.disabledClose = false;
});
},
getOperate(operate) {
this.backOperate = operate;
if (operate.cancel) {
this.disabledClose = false;
this.disabledSure = this.disabledSend = false;
}
if (operate.commit || operate.timeout) {
this.disabledSend = this.disabledSure = true;
this.disabledClose = false;
}
}
}
};
</script>

View File

@ -1,168 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__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">添加位置</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<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="前车车次号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber" />
</el-form-item>
</div>
</div>
<el-form-item label="添加车次号:" 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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="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: '请输入车次号', trigger: 'blur' }
],
// trainNumberLimber: [
// { required: true, message: '', trigger: 'blur' }
// ],
stationStandCode: [
{ required: true, message: '请选择终端', 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 '添加计划车';
}
},
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('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__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,151 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__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">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<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="车 次 号:" 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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="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: '请输入车次号', trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: '请选择终端', 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 '删除计划车';
}
},
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('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__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,158 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__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="车 次 号:" 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">目的</span>
<div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<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="车 次 号:" 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">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="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: '请输入车次号', trigger: 'blur' }
],
trainNumberLimber: [
{ required: true, message: '请输入前车车次号', trigger: 'blur' }
],
stationStandCode: [
{ required: true, message: '请选择终端', 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 '平移计划车';
}
},
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('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
console.error(error);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}
};
</script>

View File

@ -1,256 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm view-name"
title="名称显示设置"
:visible.sync="show"
width="320px"
: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">信号机名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="2">站台轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="4">折返轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="5">轨道名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="7">道岔名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="9">道岔区段名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="10">目的地名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="11">计轴区段名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="12">公里标</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">确定</el-button>
</el-col>
<el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/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]
};
},
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();
});
},
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('trainingNew/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('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setNameDisplay();
}
}).catch(() => {
this.loading = false;
});
},
setNameDisplay() {
const deviceList = [];
//
let nameShow = this.nameLevels.includes(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.includes(3);
//
nameShow = this.nameLevels.includes(7); //
const switchSectionNameShow = this.nameLevels.includes(9); //
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.includes(8);
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 => {
// if (elem.switchSection && elem.parentCode) {
// //
// nameShow = false;
if (elem.type == '03') {
nameShow = false;
} else if (elem.type === '01') {
//
nameShow = this.nameLevels.includes(11);
} else if (elem.type === '02') {
//
nameShow = this.nameLevels.includes(5);
} else if (elem.type === '04') {
//
nameShow = this.nameLevels.includes(9);
}
//
if (elem.standTrack) {
standTrackNameShow = this.nameLevels.includes(2);
}
//
if (elem.reentryTrack) {
reentryTrackNameShow = this.nameLevels.includes(4);
}
//
if (elem.transferTrack) {
transferTrackNameShow = this.nameLevels.includes(6);
}
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
});
}
//
const destCodeShow = this.nameLevels.includes(10);
const stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
});
}
//
const kmPostShow = this.nameLevels.includes(12);
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,210 +0,0 @@
<template>
<div id="menuTool">
<div class="nav">
<div v-for="(item,index) in tools" :key="index" class="tool">
<img :src="item.src" :alt="item.title">
</div>
<img class="logo" :src="logoImg">
<system-time
v-if="isShowSystemTime"
class="time"
:time="time"
:zoom="2"
:width="180"
:height="48"
:fine="2"
:top="6"
/>
</div>
</div>
</template>
<script>
import { timestampFormat } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index';
import logo_ from '@/assets/logo_.png';
export default {
name: 'MenuTool',
components: {
SystemTime
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
logoImg: logo_,
time: '00:0000',
tools: [
{
title: '服务器1',
operate: '',
src: logo_,
click: this.undeveloped
},
{
title: '服务器2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '前置机1',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '前置机2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '主调',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台1',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台2',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '调度台3',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '大屏',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '维护工作站',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '运行图显示人工站',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '跳停',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '扣车',
operate: '',
src: '',
click: this.undeveloped
},
{
title: '列车报警',
operate: '',
src: logo_,
click: this.undeveloped
}
]
};
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
this.time = timestampFormat('HH:mmss', initTime)
}
},
mounted() {
this.initTools();
},
methods: {
initTools() {
this.tools = [];
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$top: 30px;
$width: 50px;
$height: 50px;
#menuTool {
z-index: 5;
position: absolute;
top: $top;
width: 100%;
}
.nav {
display: block;
height: $height;
line-height: $height;
color: #0000;
background: #ECE9D8;
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.tool {
background: #808080;
display: flex;
justify-content: center;
cursor: pointer;
position: relative;
float: left;
height: $height - 2;
width: $width + 15;
margin: 1px;
img {
display: block;
text-align: center;
padding-top: 4px;
height: $height - 10;
width: $width - 10;
}
}
.time {
position: relative;
float: right;
text-align: center;
}
.logo {
position: relative;
float: right;
text-align: center;
margin: 1px 10px;
height: $height - 4;
width: $width - 4;
}
</style>

View File

@ -1,109 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm cmd-notice"
title="操作命令提示"
:visible.sync="show"
width="400px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<span>{{ name }}{{ msg }}!</span>
<el-row class="button-group">
<el-button :id="domIdCancel" type="primary" :loading="loading" @click="commit">确认</el-button>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'CmdNotice',
data() {
return {
dialogShow: false,
loading: false,
operate: null,
name: '',
msg: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
}
},
watch: {
// '$store.state.socket.msgHead': function (elem) {
// if (elem && (elem.hasOwnProperty('success') || elem.hasOwnProperty('timeout'))) {
// let operate = this.$store.state.training.operate;
// let control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
// let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
// let newOperate = {
// type: operate.type,
// name: station.name,
// }
// if (elem.timeout) {
// newOperate['msg'] = '';
// this.doShow(newOperate);
// } else if (!elem.success) {
// newOperate['msg'] = '';
// this.doShow(newOperate);
// }
// }
// },
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.name = this.operate.name || '';
this.msg = this.operate.msg || '';
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
}
});
},
isClose() {
return this.dialogShow;
}
}
};
</script>

View File

@ -1,81 +0,0 @@
import deviceType from '../../constant/deviceType';
class Model {
constructor() {
this.screenLine = 3;
// 公共字段部分默认初始值
this['public'] = {};
this['public'][deviceType.Signal] = {
lampPositionType: '02',
lampPostType: '02'
};
// 私有字段部分默认初始值
this['private'] = {};
this['private'][deviceType.StationControl] = {
indicatorShow: true // 标识灯名称显示
};
this['private'][deviceType.Station] = {
kmPostShow: true // 公里标显示
};
this['private'][deviceType.Switch] = {
nameShow: true
};
this['private'][deviceType.Section] = {
nameShow: true,
borderBorderShow: true, // 区段边界显示
destinationNameShow: true, // 目的地码名称显示
standTrackNameShow: true, // 站台轨名称显示
reentryTrackNameShow: true, // 折返轨名称显示
transferTrackNameShow: true // 转换轨名称显示
};
this['private'][deviceType.Signal] = {
nameShow: true, // 信号机名称显示
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
atsAutoTriggerShow: true // ATS自动触发表示灯显示
};
this['private'][deviceType.Train] = {
};
this['private'][deviceType.TrainWindow] = {
trainWindowShow: true
};
}
initPublicProps(model) {
if (model) {
const modelInitial = this.public[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
initPrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
model[prop] = modelInitial[prop];
}
}
}
return model;
}
deletePrivateProps(model) {
if (model) {
const modelInitial = this.private[model._type];
if (modelInitial) {
for (const prop in modelInitial) {
delete model[prop];
}
}
}
}
}
export default new Model();

View File

@ -1,945 +0,0 @@
// SECTION 区段
// SWITCH 道岔
// SIGNAL 信号机
// START_SIGNAL 进路起始信号机
// END_SIGNAL 进路终端信号机
// STATION 车站
// STAND 站台
// ROUTE 进路
// CYCLE 自动折返
// {id: "1", trainingType: "ControlConvertMenu", name: "车站名称"}
// {id: "2", trainingType: "ControlConvertMenu", name: "车站控制模式编号"}
// {id: "3", trainingType: "Signal", name: "进路名称"}
// {id: "4", trainingType: "Signal", name: "进路编号"}
// {id: "5", trainingType: "Signal", name: "信号机名称"}
// {id: "6", trainingType: "Signal", name: "信号机编号"}
// {id: "7", trainingType: "Switch", name: "道岔名称"}
// {id: "8", trainingType: "Section", name: "物理区段名称"}
// {id: "9", trainingType: "Section", name: "逻辑区段名称"}
// {id: "10", trainingType: "Stand", name: "车站名称"}
// {id: "11", trainingType: "Stand", name: "站台行驶方向编号"}
// {id: "12", trainingType: "Stand", name: "站台行驶方向"}
// {id: "13", trainingType: "Stand", name: "站台行驶方向编号(反)"}
// {id: "14", trainingType: "Stand", name: "站台行驶方向(反)"}
// {id: "29", trainingType: "Stand", name: "站台名称"}
// {id: "30", trainingType: "Stand", name: "站台编码"}
// {id: "15", trainingType: "Switch", name: "道岔位置"}
// {id: "16", trainingType: "Switch", name: "道岔位置(反)"}
// {id: "17", trainingType: "Switch", name: "道岔编码"}
// {id: "18", trainingType: "Section", name: "逻辑区段编码"}
// {id: "19", trainingType: "Section", name: "区段编号"}
// {id: "20", trainingType: "Section", name: "车站名称"}
// {id: "21", trainingType: "Switch", name: "车站名称"}
// {id: "22", trainingType: "Section", name: "车站编号"}
// {id: "23", trainingType: "Switch", name: "车站编号"}
// {id: "24", trainingType: "Switch", name: "道岔计轴区段编号"}
// {id: "25", trainingType: "Switch", name: "道岔计轴区段名称"}
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
list: [
// 控制模式
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL.value,
skinCode: '04',
trainingName: '请求站控({2})',
trainingRemark: '请求站控功能',
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【站控】', codeType:'STATION', subType:'substation' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL.value,
skinCode: '04',
trainingName: '请求紧急站控({2})',
trainingRemark: '请求紧急站控功能',
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【紧急站控】', codeType:'STATION', subType:'emergency' },
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL.value,
skinCode: '04',
trainingName: '请求中控({2})',
trainingRemark: '请求中控功能',
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【中控】', codeType:'STATION', subType:'center' },
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.ControlConvertMenu.CMD_CM_INTERLOCK_CONTROL.value,
skinCode: '04',
trainingName: '请求联锁控({2})',
trainingRemark: '请求联锁控功能',
trainingType: 'ControlConvertMenu',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【联锁控】', codeType:'STATION', subType:'interconnected' },
{ deviceType: '04', orderNum: 3, operateCode: '0011', tip: '输入密码123点击【确定】按钮' }
]
},
// 信号机列表
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_SET_ROUTE.value,
skinCode: '04',
trainingName: '办理进路({3} 进路)',
trainingRemark: '办理进路功能',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '3012', tip: '鼠标左键点击【执行】按钮' },
{ deviceType: '04', orderNum: 4, operateCode: '301', tip: '输入密码123点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_SET_ROUTE.value,
skinCode: '04',
trainingName: '办理进路({3} 进路)',
trainingRemark: '办理进路功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL' },
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'END_SIGNAL' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE.value,
skinCode: '04',
trainingName: '办理引导进路({3})',
trainingRemark: '进路办理信号引导',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '308', tip: '鼠标右键菜单选择【办理引导进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '308', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3086', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 4, operateCode: '3082', tip: '鼠标左键点击【执行】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE.value,
skinCode: '04',
trainingName: '引导进路({3})[进路已锁闭]',
trainingRemark: '进路办理信号引导',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3080', tip: '鼠标左键点击【引导进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3080', tip: '鼠标左键点击【{5}】', codeType:'START_SIGNAL'}, // 进路编号值不正确
{ deviceType: 'mbm', orderNum: 3, operateCode: '0011', tip: '输入密码123点击【确定】按钮', codeType: 'START_SIGNAL' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
skinCode: '04',
trainingName: '取消进路({3} 进路)',
trainingRemark: '取消进路功能',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '303', tip: '鼠标右键菜单选择【取消进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE.value,
skinCode: '04',
trainingName: '取消进路({3} 进路)',
trainingRemark: '取消进路功能(总取消)',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE.value,
skinCode: '04',
trainingName: '取消引导({3})',
trainingRemark: '取消引导进路功能(总取消)',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
skinCode: '04',
trainingName: '总人解({3})',
trainingRemark: '总人解',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '305', tip: '鼠标右键菜单选择【总人解】' },
{ deviceType: '04', orderNum: 2, operateCode: '3050', tip: '输入密码123点击【执行】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '305', tip: '鼠标左键点击【确定】按钮' },
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE.value,
skinCode: '04',
trainingName: '总人解({3})',
trainingRemark: '总人解',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3050', tip: '鼠标左键点击【总人解】' },
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3050', tip: '鼠标左键点击【{5}】', val: '{6}', codeType:'SIGNAL' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
skinCode: '04',
trainingName: '信号重开({5})',
trainingRemark: '信号重开功能',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '304', tip: '鼠标右键菜单选择【信号重开】' },
{ deviceType: '04', orderNum: 2, operateCode: '304', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 8,
minDuration: 5,
operateType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL.value,
skinCode: '04',
trainingName: '信号重开({5})',
trainingRemark: '信号重开功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
skinCode: '04',
trainingName: '信号封锁({5})',
trainingRemark: '信号封锁',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_BLOCK.value,
skinCode: '04',
trainingName: '信号封锁({5})',
trainingRemark: '信号封锁功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
skinCode: '04',
trainingName: '信号解封({5})',
trainingRemark: '信号解封',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_UNBLOCK.value,
skinCode: '04',
trainingName: '信号解封({5})',
trainingRemark: '信号解封功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
skinCode: '04',
trainingName: '进路收人工控({3})',
trainingRemark: '进路收人工控',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '314', tip: '鼠标右键菜单选择【进路收人工控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3141', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING.value,
skinCode: '04',
trainingName: '人工控({5})',
trainingRemark: '人工控',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
],
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
config:{onlySignalOP:true}
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
skinCode: '04',
trainingName: '进路交自动控({3})',
trainingRemark: '进路交自动控',
trainingType: 'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '315', tip: '鼠标右键菜单选择【进路交自动控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3151', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING.value,
skinCode: '04',
trainingName: '自动控({5})',
trainingRemark: '自动控',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
],
config:{onlySignalOP:true}
},
{
maxDuration: 15,
minDuration: 8,
operateType:CMD.Signal.CMD_SIGNAL_DETAIL.value,
skinCode: '04',
trainingName: '查询进路信息({5} 信号机)',
trainingRemark: '查询进路信息',
trainingType:'Signal',
productTypes: ['02'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '316', tip: '鼠标右键菜单选择【进路信息】' },
{ deviceType: '04', orderNum: 2, operateCode: '316', tip: '鼠标左键点击【确定】按钮' }
]
},
// 道岔列表
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION.value, // 0312 新增定位字典
skinCode: '04',
trainingName: '单操到定位({7})',
trainingRemark: '单操到定位({15})',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【单操到定位】' },
{ deviceType: '02', orderNum: 2, operateCode: '101', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION.value,
skinCode: '04',
trainingName: '单操到定位({7})',
trainingRemark: '单操到定位({7})',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键点击【道岔定操】' },
{ deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION.value, // 0313 新增定位字典
skinCode: '04',
trainingName: '单操到反位({7})',
trainingRemark: '单操到反位({7})',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '102', tip: '鼠标右键菜单选择【单操到反位】' },
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION.value,
skinCode: '04',
trainingName: '单操到反位({7})',
trainingRemark: '单操到反位({7})',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键点击【道岔反操】' },
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK.value,
skinCode: '04',
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '103', tip: '鼠标右键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '103', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK.value,
skinCode: '04',
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: 'Switch',
productTypes: ['01'], // 现地操作
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键点击【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK.value,
skinCode: '04',
trainingName: '道岔解锁({7})',
trainingRemark: '道岔解锁功能',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '104', tip: '鼠标右键菜单选择【道岔解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '104', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK.value,
skinCode: '04',
trainingName: '道岔解锁({7})',
trainingRemark: '道岔解锁功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键点击【道岔解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
skinCode: '04',
trainingName: '道岔封锁({7})',
trainingRemark: '道岔封锁功能',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1051', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '105', tip: '输入密码123点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_BLOCK.value,
skinCode: '04',
trainingName: '道岔封锁({7})',
trainingRemark: '道岔封锁功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
skinCode: '04',
trainingName: '道岔解封({7})',
trainingRemark: '道岔解封功能',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '1062', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Switch.CMD_SWITCH_UNBLOCK.value,
skinCode: '04',
trainingName: '道岔解封({7})',
trainingRemark: '道岔解封功能',
trainingType: 'Switch',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
]
},
{
maxDuration: 20,
minDuration: 10,
operateType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK.value,
skinCode: '04',
trainingName: '区故解({7})',
trainingRemark: '道岔区段故障解锁功能',
trainingType: 'Switch',
productTypes: ['02'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' },
{ deviceType: '02', orderNum: 2, operateCode: '1092', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123点击【确定】按钮' }
]
},
// 区段列表
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
skinCode: '04',
trainingName: '区故解({8}{9})',
trainingRemark: '故障解锁功能',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' },
{ deviceType: '03', orderNum: 2, operateCode: '4023', tip: '鼠标左键点击【确定】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
skinCode: '04',
trainingName: '区故解({8}{9})',
trainingRemark: '故障解锁功能',
trainingType: 'Section',
productTypes: ['01'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标左键点击【区故解】'},
{ deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{8}{9}】', codeType:'SECTION' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Section.CMD_SECTION_DETAILS.value,
skinCode: '04',
trainingName: '属性({8}{9})',
trainingRemark: '区段详情({8}{9})',
trainingType: 'Section',
productTypes: ['02'],
stepVOList: [
{ deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' },
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确定】按钮' }
]
},
// 站台列表
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN.value,
skinCode: '04',
trainingName: '设置扣车({10}-{12}站台)',
trainingRemark: '设置扣车功能',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '504', tip: '鼠标右键菜单选择【设置扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '504', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN.value,
skinCode: '04',
trainingName: '取消扣车({10}-{12}站台)',
trainingRemark: '设置取消扣车功能',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN.value,
skinCode: '04',
trainingName: '全线取消扣车',
trainingRemark: '设置取消扣车功能({12}全线)',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '505', tip: '鼠标右键菜单选择【取消扣车】' },
{ deviceType: '06', orderNum: 2, operateCode: 'com01', tip: '鼠标左键点击【{12}全线】按钮', val: 'true' },
{ deviceType: '06', orderNum: 3, operateCode: '505', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
skinCode: '04',
trainingName: '设置跳停({10}-{12}站台)',
trainingRemark: '设置跳停功能',
trainingType: 'Stand',
productTypes: ['01'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】'},
{ deviceType: '06', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【跳停】', codeType:'STAND', subType:'StopJumpLamp' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_JUMP_STOP.value,
skinCode: '04',
trainingName: '设置跳停({10}-{12}站台)',
trainingRemark: '设置跳停功能',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '502', tip: '鼠标右键菜单选择【跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '502', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
skinCode: '04',
trainingName: '取消跳停({10}-{12}站台)',
trainingRemark: '设置取消跳停功能',
trainingType: 'Stand',
productTypes: ['01'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】'},
{ deviceType: '06', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【取消跳停】', codeType:'STAND', subType:'CancelStopJumpLamp' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP.value,
skinCode: '04',
trainingName: '取消跳停({10}-{12}站台)',
trainingRemark: '设置取消跳停功能',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '503', tip: '鼠标右键菜单选择【取消跳停】' },
{ deviceType: '06', orderNum: 2, operateCode: '503', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
skinCode: '04',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(自动, 一直有效)',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
skinCode: '04',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(人工, 20秒, 一直有效)',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '5093', tip: '标左键点击,选择【一直有效】', val: '02' },
{ deviceType: '06', orderNum: 5, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_PARK_TIME.value,
skinCode: '04',
trainingName: '设置停站时间({10}-{12}站台)',
trainingRemark: '设置停站时间(人工, 20秒, 一次有效)',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【设置停站时间】' },
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5094', tip: '输入或鼠标点击调整为【20】', val: '20' },
{ deviceType: '06', orderNum: 4, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
skinCode: '04',
trainingName: '设置站间运行等级({10}-{12}站台)',
trainingRemark: '设置站间运行等级(自动, 一直有效)',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
skinCode: '04',
trainingName: '设置站间运行等级({10}-{12}站台)',
trainingRemark: '设置站间运行等级(人工, 常速, 一直有效)',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 3, operateCode: '5107', tip: '鼠标左键点击,取消选择【一直有效】', val: '02' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Stand.CMD_STAND_SET_RUN_TIME.value,
skinCode: '04',
trainingName: '设置站间运行等级({10}-{12}站台)',
trainingRemark: '设置站间运行等级(人工, 常速, 一次有效)',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '510', tip: '鼠标右键菜单选择【设置站间运行等级】' },
{ deviceType: '06', orderNum: 2, operateCode: '5106', tip: '鼠标左键点击,选择【人工】', val: '02' },
{ deviceType: '06', orderNum: 4, operateCode: '510', tip: '鼠标左键点击【确认】按钮' }
]
},
{
maxDuration: 8, // 自动生成实训失败
minDuration: 5,
operateType: CMD.Stand.CMD_STAND_VIEW_STATUS.value,
skinCode: '04',
trainingName: '显示站台信息({10}-{12}站台)',
trainingRemark: '查询站台状态功能',
trainingType: 'Stand',
productTypes: ['02'],
stepVOList: [
{ deviceType: '06', orderNum: 1, operateCode: '507', tip: '鼠标右键菜单选择【显示站台信息】' },
{ deviceType: '06', orderNum: 2, operateCode: '0012', tip: '鼠标左键点击【退出】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO.value,
skinCode: '04',
trainingName: '设置自动进路({3})',
trainingRemark: '设置自动进路功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
],
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
config:{autoRouteBT:true}
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO.value,
skinCode: '04',
trainingName: '取消自动进路({3})',
trainingRemark: '取消自动进路功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
],
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
config:{autoRouteBT:true}
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK.value,
skinCode: '04',
trainingName: '设置自动折返({3})',
trainingRemark: '设置自动折返功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2993', tip: '鼠标左键点击【功能按钮】' },
{ deviceType: '04', orderNum: 2, operateCode: '2993', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
],
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
config:{autoCycleBT:true}
},
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK.value,
skinCode: '04',
trainingName: '取消自动折返({3})',
trainingRemark: '取消自动折返功能',
trainingType: 'Signal',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '2994', tip: '鼠标左键点击【{3}】', codeType:'BUTTON' }
],
// 成都三号线 特殊配置 类似于哈尔滨线的 atp/联锁进路 配置
config:{autoCycleBT:true}
},
/** 引导总锁 */
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK.value,
skinCode: '04',
trainingName: '引导总锁({26})',
trainingRemark: '设置引导总锁',
trainingType: 'Station',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
],
config:{guideTotalLockBT:true}
},
/** 取消引导总锁 */
{
maxDuration: 15,
minDuration: 8,
operateType: CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK.value,
skinCode: '04',
trainingName: '取消引导总锁({26})',
trainingRemark: '取消引导总锁',
trainingType: 'Station',
productTypes: ['01'],
stepVOList: [
{ deviceType: '04', orderNum: 1, operateCode: '609', tip: '鼠标左键点击【引导总锁】' },
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '609', tip: '鼠标左键点击【{26}】', codeType:'BUTTON' }
],
config:{guideTotalLockBT:true}
}
// totalGuideLock
//
]
};

View File

@ -1,74 +0,0 @@
import { convertSheetToList } from '../parser/util';
export default {
/** 运行图解析方式*/
type: 'Ratio',
/** 边缘高度*/
edge: 600,
/** 间隔高度*/
multiple: 1,
/** 偏移时间*/
translation: 60 * 60 * 2,
/** excel解析配置*/
excelConfig: {
beginRow: 1,
beginCol: 0,
fieldNum: 8,
sepField: '车次',
columns: {
'车站名称': { key: 'stationName', formatter: (val) => { return val; } },
'到点': { key: 'arriveTime', formatter: (val) => { return val; } },
'发点': { key: 'departureTime', formatter: (val) => { return val; } }
}
},
/** 解析excel数据转换为Json后台数据*/
importData(Sheet, JsonData) {
var dataList = convertSheetToList(Sheet, false);
var needList = Object.keys(this.excelConfig.columns);
if (dataList && dataList.length) {
for (var rowIndex = this.excelConfig.beginRow; rowIndex < dataList.length; rowIndex += 1) {
for (var colIndex = this.excelConfig.beginCol; colIndex < dataList[this.excelConfig.beginCol].length; colIndex += this.excelConfig.fieldNum + 1) {
var tripNew, tripObj;
var stationObj = {};
tripNew = tripObj = { code: '', arrivalList: [] };
for (var index = 0; index < this.excelConfig.fieldNum; index += 1) {
var title = dataList[0][colIndex + index];
var value = dataList[rowIndex][colIndex + index];
if (title && value) {
var titleStr = `${title}`.trim();
var valueStr = `${value}`.trim();
if (titleStr.includes(this.excelConfig.sepField)) {
tripObj.code = valueStr;
JsonData.forEach(elem => {
if (elem.code == valueStr) {
tripObj = elem;
return;
}
});
}
// 取需要的字段
if (needList.findIndex(elem => { return elem == titleStr; }) >= 0) {
stationObj[this.excelConfig.columns[titleStr].key] = this.excelConfig.columns[titleStr].formatter(valueStr);
}
}
}
tripObj.arrivalList.push(stationObj);
if (tripObj.code && tripObj == tripNew) {
JsonData.push(tripObj);
}
}
}
}
return JsonData;
}
};

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="menus" :style="{width: width + 'px', height: '100%'}"> <div class="menus" :style="{width: width + 'px', height: '100%'}">
<div class="title">{{ `哈尔滨局CTC3.0(车务终端A机)--王岗:${dateString}第一班 18:00 管理员代--` }}</div> <div class="title">{{ `CTC3.0(Vehicle service terminal)${dateString}` }}</div>
<menu-bar ref="menuBar" :selected="selected" /> <menu-bar ref="menuBar" :selected="selected" />
<div style="position: absolute; top: 64px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;"> <div style="position: absolute; top: 64px;z-index: 10;background: #F0F0F0;padding: 2px;height: 65px;width: 100%;">
<div style="display: flex;"> <div style="display: flex;">
@ -24,13 +24,13 @@
<img :src="ctcBarIcon18" class="img-box" @click="handleRunplan"> <img :src="ctcBarIcon18" class="img-box" @click="handleRunplan">
</div> </div>
<div style="display: flex;padding: 2px;border-top: 2px solid #D1D1D1;margin-top: 3px"> <div style="display: flex;padding: 2px;border-top: 2px solid #D1D1D1;margin-top: 3px">
<div class="img-box" :class="{flicker: hasCommandMsg, redFlick: hasCommandMsg}" style="width: 100px;height: 25px;line-height: 21px;text-align: center;" @click="showCmdManage">调度命令</div> <div class="img-box" :class="{flicker: hasCommandMsg, redFlick: hasCommandMsg}" style="width: 125px;height: 25px;line-height: 21px;text-align: center;" @click="showCmdManage">Scheduling order</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;" /> <div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;" />
<div id="stageRunplanOut" class="img-box" @click="stageRunplan">阶段计划</div> <div id="stageRunplanOut" class="img-box" @click="stageRunplan">Phase plan</div>
<div class="img-box" style="width: 100px;height: 25px;line-height: 21px;text-align: center;margin-left: 5px;">阶段记事</div> <div class="img-box" style="width: 125px;height: 25px;line-height: 21px;text-align: center;margin-left: 5px;">Stage chronicle</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">{{ dateString1 + ' ' + time }}</div> <div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">{{ dateString1 + ' ' + time }}</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">同步站机通信中断</div> <div style="width: 420px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">Synchronous station machine communication interrupted</div>
<div style="width: 200px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">与中心通信正常</div> <div style="width: 305px;height: 25px;border: 2px #D1D1D1 inset;line-height: 21px;text-align: center;margin-left: 5px;">Communication with the centre is normal</div>
</div> </div>
</div> </div>
<menu-button-ctc ref="menuButtonCtc" :selected="selected" :work="'ctcWork'" /> <menu-button-ctc ref="menuButtonCtc" :selected="selected" :work="'ctcWork'" />
@ -188,7 +188,7 @@ export default {
this.$store.state.socket.voiceBroadcastMsgs.forEach(msgCode => { this.$store.state.socket.voiceBroadcastMsgs.forEach(msgCode => {
const msg = this.$store.state.socket.railCtcRunplanInitMsg[msgCode]; const msg = this.$store.state.socket.railCtcRunplanInitMsg[msgCode];
const station = this.$store.getters['map/getDeviceByCode'](msg.arriveRunPlan.stationCode); const station = this.$store.getters['map/getDeviceByCode'](msg.arriveRunPlan.stationCode);
const text = station.name + msg.arriveRunPlan.tripNumber + '次发车预告'; const text = station.name + msg.arriveRunPlan.tripNumber + 'departure notice';
this.speechSynthesis(text); this.speechSynthesis(text);
}); });
}, },
@ -202,7 +202,7 @@ export default {
fault = deviceFault.label; fault = deviceFault.label;
} }
}); });
if ( item.description == 'FAULT_LOCK' ) { fault = '故障锁闭'; } if ( item.description == 'FAULT_LOCK' ) { fault = 'Fault locking'; }
this.tipContentList.push({time:item.time, message:deviceType[device._type] + (device.name || device.groupNumber) + fault}); this.tipContentList.push({time:item.time, message:deviceType[device._type] + (device.name || device.groupNumber) + fault});
if (this.tipContentList.length > 15) { if (this.tipContentList.length > 15) {
this.tipContentList.shift(); this.tipContentList.shift();
@ -272,7 +272,7 @@ export default {
// playBtn.innerText = ''; // playBtn.innerText = '';
}, },
onError: function(text) { that.$message.error(text); that.voiceBroadcastToken = ''; }, onError: function(text) { that.$message.error(text); that.voiceBroadcastToken = ''; },
onTimeout: function () { that.$message.error('合成语音超时'); } onTimeout: function () { that.$message.error('Synthetic speech timeout'); }
}); });
}, },
changeSignedStatus(info) { changeSignedStatus(info) {
@ -346,7 +346,7 @@ export default {
initDate(date) { initDate(date) {
this.time = timestampFormat('HH:mm:ss', date); this.time = timestampFormat('HH:mm:ss', date);
this.dateString = timestampFormat('YYYYMMDD', date); this.dateString = timestampFormat('YYYYMMDD', date);
this.dateString1 = timestampFormat('YYYY年MM月DD日', date); this.dateString1 = timestampFormat('YYYY-MM-DD', date);
}, },
handleRunplan() { handleRunplan() {
this.$refs.runplanPane.doShow(); this.$refs.runplanPane.doShow();

View File

@ -10,6 +10,7 @@ import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import TrainFixedPathPane from './menuDialog/trainFixedPathPane'; import TrainFixedPathPane from './menuDialog/trainFixedPathPane';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import { destroySimulationByAdmin, exitSimulation} from '@/api/simulation';
export default { export default {
name: 'CtcWorkMenuBar', name: 'CtcWorkMenuBar',
@ -21,151 +22,37 @@ export default {
return { return {
menuNormal: [ menuNormal: [
{ {
title: '登录', title: 'System',
operate: '', operate: '',
children: [ children: [
{ {
title: '登录', title: 'Exit',
click: this.undeveloped click: this.handleExit
},
{
title: '注销',
click: this.undeveloped
},
{
title: '退出',
click: this.undeveloped
} }
] ]
}, },
{ {
title: '显示', title: 'UI Control',
operate: '',
children: [
{
title: '工具栏',
operate: '',
children: [
{
title: '标准按钮',
click: this.undeveloped
},
{
title: '签收栏',
click: this.undeveloped
},
{
title: '显示系统信息窗口',
click: this.undeveloped
},
{
title: '显示进路序列管理窗口',
click: this.bottomTableShowOrHidden
},
{
title: '显示信号员计划表',
click: this.undeveloped
},
{
title: '显示信号员注意事项',
click: this.undeveloped
}
]
},
{
title: '站场图',
click: this.undeveloped
},
{
title: '行车日志',
click: this.undeveloped
}
]
},
{
title: '工具',
operate: '',
hide: true,
children: [
{
title: '调度命令管理',
click: this.undeveloped
},
{
title: '甩挂车作业',
click: this.undeveloped
},
{
title: '列车编组(速报表)',
click: this.undeveloped
},
{
title: '站存车(现存车)',
click: this.undeveloped
},
{
title: '列控命令',
click: this.undeveloped
},
{
title: '车站直接限速',
click: this.undeveloped
},
{
title: '运统46',
click: this.undeveloped
},
{
title: '站场图回放',
click: this.undeveloped
},
{
title: '列控区间占用逻辑检查',
click: this.undeveloped
},
{
type: 'separator'
},
{
title: '更新数据',
click: this.updateTrainFixedPath
},
{
title: '列车固定径路',
click: this.trainFixedPathPane
},
{
type: 'separator'
},
{
title: '用户管理',
click: this.undeveloped
},
{
title: '选项',
click: this.undeveloped
},
{
type: 'separator'
},
{
type: '时钟显示',
click: this.undeveloped
}
]
},
{
title: '调试',
operate: '', operate: '',
children: [] children: []
}, },
{ {
title: '窗口', title: 'Station',
operate: '', operate: '',
children: [] children: []
}, },
{ {
title: '帮助', title: 'Station Ctrl Mode',
operate: '',
children: []
},
{
title: 'Train Control',
operate: '',
children: []
},
{
title: 'Signal Device Control',
operate: '', operate: '',
children: [] children: []
} }
@ -181,6 +68,41 @@ export default {
EventBus.$emit('bottomTableShowOrHidden', false); EventBus.$emit('bottomTableShowOrHidden', false);
}, },
methods: { methods: {
handleExit() {
this.$confirm('Whether to exit emulation?', 'Hint', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
this.back();
});
},
back() {
if (this.$store.state.training.simulationCreator) {
destroySimulationByAdmin(this.group);
} else {
exitSimulation(this.group);
}
if (this.projectDevice && this.$store.state.training.simulationCreator) {
this.logout();
} else if (this.$route.query.third) {
if (this.$route.query.project === 'cgy' || this.$route.query.project === 'drts') {
window.parent.postMessage('back', '*');
} else {
window.close();
}
} else if (this.projectDevice) {
this.logout();
} else {
this.$router.go(-1);
}
},
//
logout() {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
},
initStationList() { initStationList() {
const list = []; const list = [];
this.stationList.forEach(station => { this.stationList.forEach(station => {
@ -235,8 +157,8 @@ export default {
}, },
undeveloped() { undeveloped() {
this.$refs.menuBar.doClose(); this.$refs.menuBar.doClose();
this.$alert('实现中......', '提示', { this.$alert('In implementation......', 'Hint', {
confirmButtonText: '确定', confirmButtonText: 'Confirm',
callback: action => { callback: action => {
} }
}); });

View File

@ -13,42 +13,42 @@
> >
<div class="tableBox"> <div class="tableBox">
<el-table :data="tableData" height="300px"> <el-table :data="tableData" height="300px">
<el-table-column prop="name" label="站名" width="150" /> <el-table-column prop="name" label="Station name" width="150" />
<el-table-column v-if="isAgreeMode"> <el-table-column v-if="isAgreeMode">
<template slot="header" slot-scope="scope"> <template slot="header">
<el-checkbox v-model="allAgreeChecked" @change="changeAllAgreeChecked">全选</el-checkbox> <el-checkbox v-model="allAgreeChecked" @change="changeAllAgreeChecked">Select all</el-checkbox>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.isAgree">同意</el-checkbox> <el-checkbox v-model="scope.row.isAgree">Agree</el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column> <el-table-column>
<template slot="header" slot-scope="scope"> <template slot="header">
<el-radio v-model="controlTypeAll" label="Center" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio> <el-radio v-model="controlTypeAll" label="Center" :disabled="isAgreeMode" @input="changeControlTypeAll">Select all</el-radio>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Center" :disabled="isAgreeMode"> <el-radio v-model="scope.row.target" label="Center" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Center')">中心控制</span> <span :class="getTextColor(scope.row, 'Center')">Center Control</span>
</el-radio> </el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column> <el-table-column>
<template slot="header" slot-scope="scope"> <template slot="header">
<el-radio v-model="controlTypeAll" label="Station" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio> <el-radio v-model="controlTypeAll" label="Station" :disabled="isAgreeMode" @input="changeControlTypeAll">Select all</el-radio>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Station" :disabled="isAgreeMode"> <el-radio v-model="scope.row.target" label="Station" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Station')">车站控制</span> <span :class="getTextColor(scope.row, 'Station')">Station Control</span>
</el-radio> </el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column> <el-table-column>
<template slot="header" slot-scope="scope"> <template slot="header">
<el-radio v-model="controlTypeAll" label="Station_Shunt" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio> <el-radio v-model="controlTypeAll" label="Station_Shunt" :disabled="isAgreeMode" @input="changeControlTypeAll">Select all</el-radio>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Station_Shunt" :disabled="isAgreeMode"> <el-radio v-model="scope.row.target" label="Station_Shunt" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Station_Shunt')">车站调车</span> <span :class="getTextColor(scope.row, 'Station_Shunt')">Station transfer</span>
</el-radio> </el-radio>
</template> </template>
</el-table-column> </el-table-column>
@ -56,10 +56,10 @@
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="5" :offset="6"> <el-col :span="5" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">Determine</el-button>
</el-col> </el-col>
<el-col :span="5" :offset="2"> <el-col :span="5" :offset="2">
<el-button :id="domIdCancel" @click="cancel"></el-button> <el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
@ -87,7 +87,7 @@ export default {
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
title: '操作方式转换', title: 'Operation mode conversion',
controlTypeAll: '', controlTypeAll: '',
tableData: [], tableData: [],
loading: false, loading: false,

View File

@ -3,7 +3,7 @@
v-dialogDrag v-dialogDrag
class="datie-02__systerm" class="datie-02__systerm"
:visible.sync="show" :visible.sync="show"
width="250px" width="280px"
:before-close="doClose" :before-close="doClose"
:z-index="2000" :z-index="2000"
:modal="false" :modal="false"
@ -13,11 +13,11 @@
<!-- 密码校验 --> <!-- 密码校验 -->
<el-row style="display: flex;justify-content: space-around;align-items: center;"> <el-row style="display: flex;justify-content: space-around;align-items: center;">
<el-input v-model="encryptionPassword" placeholder="" size="medium" :disabled="true" style="width: 180px;display: inline-block;float: left;" /> <el-input v-model="encryptionPassword" placeholder="" size="medium" :disabled="true" style="width: 180px;display: inline-block;float: left;" />
<el-button @click="backSpace">退格</el-button> <el-button @click="backSpace">Backspace</el-button>
</el-row> </el-row>
<el-row v-if="showMistake"> <el-row v-if="showMistake">
<el-col :span="22" :offset="1"> <el-col :span="22" :offset="1">
<span class="password-error">*密码输入错误请重新输入*</span> <span class="password-error">*Please re-enter the incorrect password*</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -26,7 +26,7 @@
<el-button @click="inputNum('2')">2</el-button> <el-button @click="inputNum('2')">2</el-button>
<el-button @click="inputNum('3')">3</el-button> <el-button @click="inputNum('3')">3</el-button>
<el-button @click="inputNum('4')">4</el-button> <el-button @click="inputNum('4')">4</el-button>
<el-button :id="domIdConfirm" :loading="loading" @click="commit">确认</el-button> <el-button :id="domIdConfirm" :loading="loading" @click="commit">Confirm</el-button>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-button @click="inputNum('5')">5</el-button> <el-button @click="inputNum('5')">5</el-button>
@ -34,7 +34,7 @@
<el-button @click="inputNum('7')">7</el-button> <el-button @click="inputNum('7')">7</el-button>
<el-button @click="inputNum('8')">8</el-button> <el-button @click="inputNum('8')">8</el-button>
<el-button @click="inputNum('9')">9</el-button> <el-button @click="inputNum('9')">9</el-button>
<el-button :id="domIdCancel" @click="cancel">取消</el-button> <el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>

View File

@ -11,7 +11,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row> <el-row>
<el-col :span="11">车组号</el-col> <el-col :span="11">Train set number</el-col>
<el-col :span="11" :offset="1"> <el-col :span="11" :offset="1">
<el-select v-model="addModel.groupNumber" size="mini"> <el-select v-model="addModel.groupNumber" size="mini">
<el-option <el-option
@ -26,10 +26,10 @@
</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">Confirm</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="5"> <el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"></el-button> <el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
@ -82,7 +82,7 @@ export default {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
}, },
title() { title() {
return '加载备用车'; return 'Add Train';
} }
}, },
watch:{}, watch:{},

View File

@ -2,7 +2,7 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm train-set-plan" class="chengdou-03__systerm train-set-plan"
title="电力臂状态操作" title="Power arm status operation"
:visible.sync="show" :visible.sync="show"
width="600px" width="600px"
:before-close="doClose" :before-close="doClose"
@ -11,17 +11,17 @@
:modal="true" :modal="true"
> >
<el-tree :data="treeData" node-key="id" show-checkbox :expand-on-click-node="true" default-expand-all> <el-tree :data="treeData" node-key="id" show-checkbox :expand-on-click-node="true" default-expand-all>
<span class="custom-node" slot-scope="{ node, data }"> <span slot-scope="{ node, data }" class="custom-node">
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
<span v-if="data.id <= 2">状态</span> <span v-if="data.id <= 2">Status</span>
<span v-else>{{ getPowerState(data.id) ? '有电' : '无电' }}</span> <span v-else>{{ getPowerState(data.id) ? 'Have electricity' : 'No electricity' }}</span>
</span> </span>
</el-tree> </el-tree>
<div class="btn-bar"> <div class="btn-bar">
<el-button>设置有电</el-button> <el-button>Set powered</el-button>
<el-button>设置停电</el-button> <el-button>Set power off</el-button>
<el-button>刷新状态</el-button> <el-button>Refreshing status</el-button>
<el-button @click="doClose">关闭</el-button> <el-button @click="doClose">Close</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -33,69 +33,69 @@ export default {
return { return {
show: false, show: false,
treeData: [ treeData: [
{ // {
id: 1, // id: 1,
label: '沈阳', // label: '',
children: [ // children: [
{ // {
id: 3, // id: 3,
label: '三线14、15、16道', // label: '线141516'
}, // },
{ // {
id: 4, // id: 4,
label: '浑下、17、18、19道、机务段、机26、揽、皇', // label: '17181926'
}, // },
{ // {
id: 5, // id: 5,
label: '浑上、11、12、13道', // label: '111213'
}, // },
{ // {
id: 6, // id: 6,
label: '沈北下行', // label: ''
}, // },
{ // {
id: 7, // id: 7,
label: '沈北上行', // label: ''
}, // },
{ // {
id: 8, // id: 8,
label: '沈阳站库线', // label: '线'
}, // }
], // ]
}, // },
{ // {
id: 2, // id: 2,
label: '沈阳北', // label: '',
children: [ // children: [
{ // {
id: 9, // id: 9,
label: '沈北下行', // label: ''
}, // },
{ // {
id: 10, // id: 10,
label: '沈北上行', // label: ''
}, // },
{ // {
id: 11, // id: 11,
label: '沈阳北客技库', // label: ''
}, // }
], // ]
}, // }
], ]
} };
}, },
methods: { methods: {
doShow() { doShow() {
this.show = true this.show = true;
}, },
doClose() { doClose() {
this.show = false this.show = false;
}, },
getPowerState(id) { getPowerState(id) {
return true return true;
},
},
} }
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -10,7 +10,7 @@
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" /> <passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<!-- <bottom-table ref="bottomTable" /> --> <!-- <bottom-table ref="bottomTable" /> -->
<div id="playBtn" /> <div id="playBtn" />
<menu-button-ctc ref="menuButtonCtc" :selected="selected" :work="'dispatchWork'" /> <!-- <menu-button-ctc ref="menuButtonCtc" :selected="selected" :work="'dispatchWork'" />-->
</div> </div>
</template> </template>
@ -27,7 +27,6 @@ import MenuStation from './menuStation';
import MenuBar from './dispatchWorkMenuBar'; import MenuBar from './dispatchWorkMenuBar';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control'; import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import { timestampFormat } from '@/utils/date'; import { timestampFormat } from '@/utils/date';
// import BottomTable from './bottomTable';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config'; import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
import MenuButtonCtc from './menuButtonCtc'; import MenuButtonCtc from './menuButtonCtc';

View File

@ -1,36 +1,275 @@
<template> <template>
<div id="menuBarDatie"> <div id="menuBarDatie">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;" /> <menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;" />
<set-operation-plan ref="setOperationPlan" />
<operation-plan-detail ref="operationPlanDetail" />
<station-control-convert ref="stationControlConvert" :work="'dispatchWork'" />
<view-name ref="viewName" />
<train-operation ref="trainOperation" />
<switch-control ref="switchControl" />
<signal-control ref="signalControl" />
</div> </div>
</template> </template>
<script> <script>
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew'; import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import { destroySimulationByAdmin, exitSimulation } from '@/api/simulation';
import SetOperationPlan from './menuDialog/setOperationPlan.vue';
import OperationPlanDetail from './menuDialog/operationPlanDetail.vue';
import ViewName from './menuDialog/viewName';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainOperation from './menuDialog/trainOperation';
import SwitchControl from './menuDialog/switchControl';
import SignalControl from './menuDialog/signalControl';
import { mapGetters } from 'vuex';
export default { export default {
name: 'DispatchWorkMenuBar', name: 'DispatchWorkMenuBar',
components: { components: {
MenuBar MenuBar,
SetOperationPlan,
OperationPlanDetail,
ViewName,
StationControlConvert,
TrainOperation,
SwitchControl,
SignalControl
}, },
data() { data() {
return { return {
menuNormal: [ menuNormal: [
{ {
title: '登录(L)', title: 'System',
operate: '',
children: [
{
title: 'Exit',
click: this.handleExit
}
]
},
{
title: 'UI Control',
operate: '',
click: this.uiControl
},
{
title: 'Station',
operate: '', operate: '',
children: [] children: []
}, },
{ {
title: '应用程序(T)', title: 'Station Ctrl Mode',
operate: '', operate: '',
children: [
{
title: 'To Station Control',
click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar
},
{
title: 'Emergency Station Control',
click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password
},
{
title: 'To Center Control',
click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar,
force: true
}
]
},
{
title: 'Train Control',
operate: '',
click: this.trainControlShow
},
{
title: 'Signal Device Control',
operate: '',
children: [
{
title: 'Signal Close',
click: this.handleSignalOperate,
operate: OperationEvent.Signal.signalClose.mbar
},
{
title: 'Signal Reopen',
click: this.handleSignalOperate,
operate: OperationEvent.Signal.reopenSignal.mbar
},
{
title: 'Turnout Normal',
click: this.handleSwitchOperate,
operate: OperationEvent.Switch.locate.mbar
},
{
title: 'Turnout Reverse',
click: this.handleSwitchOperate,
operate: OperationEvent.Switch.reverse.mbar
},
{
title: 'Turnout Block',
click: this.handleSwitchOperate,
operate: OperationEvent.Switch.lock.mBar
},
{
title: 'Turnout Unblock',
click: this.handleSwitchOperate,
operate: OperationEvent.Switch.unlock.mbar
}
]
},
{
title: 'Operation Plan',
operate: '',
click: this.openOperationPlan,
children: []
},
{
title: 'Plan Details',
operate: '',
click: this.openPlanDetail,
children: [] children: []
} }
] ]
}; };
}, },
created() {}, computed: {
...mapGetters('map', ['stationList']),
group() {
return this.$route.query.group;
},
projectDevice() {
return this.$route.query.projectDevice;
}
},
mounted() {
this.stationList.forEach(station => {
this.menuNormal[2].children.push({
title: station.name,
click: () => {
this.$jlmap.setCenter(station.code);
}
});
});
},
methods: { methods: {
trainControlShow() {
this.$refs.trainOperation.doShow();
},
handleSignalOperate(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.signalControl.doShow(operate);
}
});
},
handleSwitchOperate(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate);
}
});
},
turnToStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
mandatoryStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
conterStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
uiControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewName.doShow(operate);
}
});
},
blankClickClose() { blankClickClose() {
this.$refs.menuBar.doClose(); this.$refs.menuBar.doClose();
},
handleExit() {
this.$confirm('Whether to exit emulation?', 'Hint', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
this.back();
});
},
back() {
if (this.$store.state.training.simulationCreator) {
destroySimulationByAdmin(this.group);
} else {
exitSimulation(this.group);
}
if (this.projectDevice && this.$store.state.training.simulationCreator) {
this.logout();
} else if (this.$route.query.third) {
if (this.$route.query.project === 'cgy' || this.$route.query.project === 'drts') {
window.parent.postMessage('back', '*');
} else {
window.close();
}
} else if (this.projectDevice) {
this.logout();
} else {
this.$router.go(-1);
}
},
//
logout() {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
},
openOperationPlan() {
this.$refs.setOperationPlan.doShow();
},
openPlanDetail() {
this.$refs.operationPlanDetail.doShow();
} }
} }
}; };

View File

@ -1,22 +1,23 @@
<template> <template>
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<div id="tipInfoBox" style="width: 1560px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;"> <menu-bar ref="menuBar" :selected="selected" style="top: 0" />
<div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">提示信息窗</div> <div id="tipInfoBox" style="width: 1000px;position: fixed;height: 30px;background: #808080;z-index: 9;bottom: 0;left: 0;display: flex;">
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ '操控A:主机' + ' ' + dateString + ' ' + time }}</div> <div style="width: 60%;height: 30px;line-height: 30px;text-align: center;">Message window</div>
<div style="width: 40%;height: 30px;line-height: 30px;text-align: center;border-left: 2px #ccc solid;">{{ 'Control A: Mainframe' + ' ' + dateString + ' ' + time }}</div>
</div> </div>
<div class="simulationAlarmInfo"> <!-- <div class="simulationAlarmInfo">-->
<div v-for="(tipContent,index) in tipContentList" :key="index" class="eachTipContent">{{ tipContent.time+": "+tipContent.message }}</div> <!-- <div v-for="(tipContent,index) in tipContentList" :key="index" class="eachTipContent">{{ tipContent.time+": "+tipContent.message }}</div>-->
</div> <!-- </div>-->
<div class="simulationTellInfo"> <!-- <div class="simulationTellInfo">-->
<div class="simulationTellInfoTop"> <!-- <div class="simulationTellInfoTop">-->
<div class="simulationTellInfoTopEach backGreen">联锁I</div> <!-- <div class="simulationTellInfoTopEach backGreen">InterlockI</div>-->
<div class="simulationTellInfoTopEach backRed">联锁II</div> <!-- <div class="simulationTellInfoTopEach backRed">InterlockII</div>-->
<div class="simulationTellInfoTopEach backGreen">操作A</div> <!-- <div class="simulationTellInfoTopEach backGreen">Control A</div>-->
<div class="simulationTellInfoTopEach backYellow">操作B</div> <!-- <div class="simulationTellInfoTopEach backYellow">Control B</div>-->
<div class="simulationTellInfoTopEach backGreen">维修机</div> <!-- <div class="simulationTellInfoTopEach backGreen">Service machine</div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="simulationDeviceInfo" /> <!-- <div class="simulationDeviceInfo" />-->
<menu-button ref="menuButton" :selected="selected" /> <menu-button ref="menuButton" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" /> <menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" /> <menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" />
@ -44,7 +45,8 @@ import MenuStation from './menuStation';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control'; import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import { timestampFormat } from '@/utils/date'; import { timestampFormat } from '@/utils/date';
// import BottomTable from './bottomTable'; // import BottomTable from './bottomTable';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config'; // import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
import MenuBar from './localWorkMenuBar';
export default { export default {
name: 'LocalWorkMenu', name: 'LocalWorkMenu',
@ -56,7 +58,8 @@ export default {
MenuStationStand, MenuStationStand,
MenuStation, MenuStation,
MenuTrain, MenuTrain,
PassiveContorl PassiveContorl,
MenuBar
// BottomTable // BottomTable
}, },
props: { props: {
@ -70,7 +73,7 @@ export default {
data() { data() {
return { return {
showCentralizedStationCode: '', showCentralizedStationCode: '',
tipContentList:[], // tipContentList:[],
time: '00:00:00', time: '00:00:00',
dateString: '', dateString: '',
audio: null, audio: null,
@ -104,28 +107,28 @@ export default {
const text = station.name + msg.arriveRunPlan.tripNumber + '次发车预告'; const text = station.name + msg.arriveRunPlan.tripNumber + '次发车预告';
this.speechSynthesis(text); this.speechSynthesis(text);
}); });
},
'$store.state.socket.simulationAlarmInfo': function(val) {
(val || []).forEach(item => {
if (!item.confirmed) {
const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
let fault = '';
deviceFaultType[device._type].forEach(deviceFault=>{
if (deviceFault.value == item.description) {
fault = deviceFault.label;
}
});
if ( item.description == 'FAULT_LOCK' ) { fault = '故障锁闭'; }
this.tipContentList.push({time:item.time, message:deviceType[device._type] + (device.name || device.groupNumber) + fault});
if (this.tipContentList.length > 15) {
this.tipContentList.shift();
}
}
});
},
'$store.state.socket.simulationReset':function(val) {
this.tipContentList = [];
} }
// '$store.state.socket.simulationAlarmInfo': function(val) {
// (val || []).forEach(item => {
// if (!item.confirmed) {
// const device = this.$store.getters['map/getDeviceByCode'](item.deviceCode);
// let fault = '';
// deviceFaultType[device._type].forEach(deviceFault=>{
// if (deviceFault.value == item.description) {
// fault = deviceFault.label;
// }
// });
// if ( item.description == 'FAULT_LOCK' ) { fault = ''; }
// this.tipContentList.push({time:item.time, message:deviceType[device._type] + (device.name || device.groupNumber) + fault});
// if (this.tipContentList.length > 15) {
// this.tipContentList.shift();
// }
// }
// });
// },
// '$store.state.socket.simulationReset':function(val) {
// this.tipContentList = [];
// }
}, },
mounted() { mounted() {
this.group = this.$route.query.group; this.group = this.$route.query.group;
@ -133,6 +136,9 @@ export default {
// this.$store.dispatch('config/updateMenuBar'); // this.$store.dispatch('config/updateMenuBar');
const _that = this; const _that = this;
window.onclick = function (e) { window.onclick = function (e) {
if (!_that.$store.state.training.trainingStart) {
_that.$refs.menuBar && _that.$refs.menuBar.blankClickClose();
}
_that.$refs.menuStationStand.doClose(); _that.$refs.menuStationStand.doClose();
_that.$refs.menuSwitch.doClose(); _that.$refs.menuSwitch.doClose();
_that.$refs.menuSignal.doClose(); _that.$refs.menuSignal.doClose();
@ -750,7 +756,7 @@ export default {
background: #cb204d; background: #cb204d;
height: 100px; height: 100px;
z-index: 2; z-index: 2;
top: 0px; top: 35px;
left: 0px; left: 0px;
padding: 5px; padding: 5px;
overflow:auto; overflow:auto;
@ -771,8 +777,8 @@ export default {
} }
.simulationTellInfo{ .simulationTellInfo{
position: absolute; position: absolute;
width: 328px; width: 492px;
top: 0px; top: 35px;
right: 0px; right: 0px;
padding: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;
overflow: auto; overflow: auto;
@ -783,9 +789,9 @@ export default {
} }
.simulationDeviceInfo{ .simulationDeviceInfo{
position: absolute; position: absolute;
width: 328px; width: 492px;
height: 100px; height: 100px;
top: 33px; top: 68px;
right:0px; right:0px;
padding: 5px; padding: 5px;
overflow:auto; overflow:auto;

View File

@ -0,0 +1,344 @@
<template>
<div id="menuBarDatie">
<menu-bar ref="menuBar" :menu-normal="menuNormal" style="width:100%;" />
<train-fixed-path-pane ref="trainFixedPathPane" />
<station-control-convert ref="stationControlConvert" :work="'localWork'" />
<view-name ref="viewName" />
<train-operation ref="trainOperation" />
<switch-control ref="switchControl" />
<signal-control ref="signalControl" />
<operation-plan-detail ref="operationPlanDetail" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew';
import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import TrainFixedPathPane from './menuDialog/trainFixedPathPane';
import OperationPlanDetail from './menuDialog/operationPlanDetail.vue';
import { EventBus } from '@/scripts/event-bus';
import { destroySimulationByAdmin, exitSimulation} from '@/api/simulation';
import ViewName from './menuDialog/viewName';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControlConvert from './menuDialog/stationControlConvert';
import TrainOperation from './menuDialog/trainOperation';
import SwitchControl from './menuDialog/switchControl';
import SignalControl from './menuDialog/signalControl';
export default {
name: 'CtcWorkMenuBar',
components: {
MenuBar,
TrainFixedPathPane,
ViewName,
StationControlConvert,
TrainOperation,
SwitchControl,
SignalControl,
OperationPlanDetail
},
data() {
return {
menuNormal: [
{
title: 'System',
operate: '',
children: [
{
title: 'Exit',
click: this.handleExit
}
]
},
{
title: 'UI Control',
operate: '',
click: this.uiControl
},
{
title: 'Station',
operate: '',
children: []
},
{
title: 'Station Ctrl Mode',
operate: '',
children: [
{
title: 'To Station Control',
click: this.turnToStationControl,
operate: OperationEvent.StationControl.requestStationControl.mbar
},
{
title: 'Emergency Station Control',
click: this.mandatoryStationControl,
operate: OperationEvent.StationControl.forcedStationControl.password
},
{
title: 'To Center Control',
click: this.conterStationControl,
operate: OperationEvent.StationControl.requestCentralControl.mbar,
force: true
}
]
},
{
title: 'Train Control',
operate: '',
click: this.trainControlShow
},
{
title: 'Signal Device Control',
operate: '',
children: [
{
title: 'Signal Close',
click: this.handleSignalOperate,
operate: OperationEvent.Signal.signalClose.mbar
},
{
title: 'Signal Reopen',
click: this.handleSignalOperate,
operate: OperationEvent.Signal.reopenSignal.mbar
},
{
title: 'Turnout Normal',
click: this.handleSwitchOperate,
operate: OperationEvent.Switch.locate.mbar
},
{
title: 'Turnout Reverse',
click: this.handleSwitchOperate,
operate: OperationEvent.Switch.reverse.mbar
},
{
title: 'Turnout Block',
click: this.handleSwitchOperate,
operate: OperationEvent.Switch.lock.mBar
},
{
title: 'Turnout Unblock',
click: this.handleSwitchOperate,
operate: OperationEvent.Switch.unlock.mbar
}
]
},
{
title: 'Plan Details',
operate: '',
click: this.openPlanDetail,
children: []
}
]
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
group() {
return this.$route.query.group;
},
projectDevice() {
return this.$route.query.projectDevice;
}
},
mounted() {
this.stationList.forEach(station => {
this.menuNormal[2].children.push({ title: station.name, click: () => {
this.$jlmap.setCenter(station.code);
} });
});
},
beforeDestroy() {
EventBus.$emit('bottomTableShowOrHidden', false);
},
methods: {
handleSignalOperate(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.signalControl.doShow(operate);
}
});
},
handleSwitchOperate(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchControl.doShow(operate);
}
});
},
turnToStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
mandatoryStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
//
conterStationControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControlConvert.doShow(operate);
}
});
},
uiControl(order) {
const operate = {
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.viewName.doShow(operate);
}
});
},
handleExit() {
this.$confirm('Whether to exit emulation?', 'Hint', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
this.back();
});
},
trainControlShow() {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
if (station && station.controlMode === 'Local') {
this.$refs.trainOperation.doShow();
}
},
back() {
if (this.$store.state.training.simulationCreator) {
destroySimulationByAdmin(this.group);
} else {
exitSimulation(this.group);
}
if (this.projectDevice && this.$store.state.training.simulationCreator) {
this.logout();
} else if (this.$route.query.third) {
if (this.$route.query.project === 'cgy' || this.$route.query.project === 'drts') {
window.parent.postMessage('back', '*');
} else {
window.close();
}
} else if (this.projectDevice) {
this.logout();
} else {
this.$router.go(-1);
}
},
//
logout() {
this.$store.dispatch('LogOut').then(() => {
location.reload();
});
},
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
title: station.name,
operate: station.code,
show: true,
click: this.mapLocation,
code: station.code
};
list.push(node);
}
});
return list;
},
//
mapLocation(code) {
if (code) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
}
},
blankClickClose() {
this.$refs.menuBar.doClose();
},
updateTrainFixedPath() {
const stationCode = this.$store.state.training.roleDeviceCode;
const operate = {
over: true,
userOperationType: 'rightClick',
operation: menuOperate.CTC.updateTrainFixedPath2Station.operation,
cmdType: menuOperate.CTC.updateTrainFixedPath2Station.cmdType,
param: {
stationCode: stationCode
}
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.$nextTick(() => { this.$store.dispatch('training/emitTipFresh'); });
}
}).catch(e => {
console.error(e);
});
},
trainFixedPathPane() {
const stationCode = this.$store.state.training.roleDeviceCode;
this.$refs.trainFixedPathPane.doShow(stationCode);
},
bottomTableShowOrHidden() {
EventBus.$emit('bottomTableShowOrHidden', true);
},
undeveloped() {
this.$refs.menuBar.doClose();
this.$alert('In implementation......', 'Hint', {
confirmButtonText: 'Confirm',
callback: action => {
}
});
},
openPlanDetail() {
this.$refs.operationPlanDetail.doShow();
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
#menuBarDatie{
line-height:30px;
}
#menuBarDatie #menuBar .menu-li-block .label{
padding: 0px 30px 0px 5px !important;
}
.img-box{
width: 20px;
height: 20px;
margin-top: 30px;
}
</style>

View File

@ -2,7 +2,7 @@
<div id="menuButtons_box" class="menu menuButton" style="height:40px;" :style="{left: point.x+'px', bottom: point.y+'px' }"> <div id="menuButtons_box" class="menu menuButton" style="height:40px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
<button :id="Station.stationMasterLock.rightButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: xGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockRightButtonDown()"> <button :id="Station.stationMasterLock.rightButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: xGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockRightButtonDown()">
<span style="color: #800000"> <span style="color: #800000">
<center><b>X引导总锁</b></center> <center><b>X Guide Lock</b></center>
</span> </span>
</button> </button>
<!--<button :id="Station.guideLock.button.domId" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">--> <!--<button :id="Station.guideLock.button.domId" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">-->
@ -13,104 +13,104 @@
<!--</button>--> <!--</button>-->
<button :id="MixinCommand.totalCancel.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])"> <button :id="MixinCommand.totalCancel.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])">
<span style="color: black"> <span style="color: black">
<center><b>总取消</b></center> <center><b>Cancel Route</b></center>
</span> </span>
</button> </button>
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])"> <button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
<span style="color: #800000"> <span style="color: #800000">
<center><b>总人解</b></center> <center><b>Manually Unlock</b></center>
</span>
</button>
<button :id="Section.fault.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Section.fault.button.operation, ['Section'])">
<span style="color: #800000">
<center><b>区故解</b></center>
</span> </span>
</button> </button>
<!-- <button :id="Section.fault.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Section.fault.button.operation, ['Section'])">-->
<!-- <span style="color: #800000">-->
<!-- <center><b>Zone fault release</b></center>-->
<!-- </span>-->
<!-- </button>-->
<button :id="Switch.locate.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.locate.button.operation, ['Switch'])"> <button :id="Switch.locate.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
<span style="color: black"> <span style="color: black">
<center><b>总定位</b></center> <center><b>Turnout Normal</b></center>
</span> </span>
</button> </button>
<button :id="Switch.reverse.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])"> <button :id="Switch.reverse.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
<span style="color: black"> <span style="color: black">
<center><b>总反位</b></center> <center><b>Turnout Reverse</b></center>
</span> </span>
</button> </button>
<button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)"> <button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
<span style="color: black"> <span style="color: black">
<center><b>清除</b></center> <center><b>Clear</b></center>
</span> </span>
</button> </button>
<button :id="Switch.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.lock.button.operation, ['Switch'])"> <button :id="Switch.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
<span style="color: black"> <span style="color: black">
<center><b>单锁</b></center> <center><b>Signal Lock</b></center>
</span> </span>
</button> </button>
<button :id="Switch.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])"> <button :id="Switch.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
<span style="color: black"> <span style="color: black">
<center><b>单解</b></center> <center><b>Signal Unlock</b></center>
</span> </span>
</button> </button>
<button :id="Signal.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.lock.button.operation, ['Signal', 'SignalButton'])"> <button :id="Signal.lock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.lock.button.operation, ['Signal', 'SignalButton'])">
<span style="color: black"> <span style="color: black">
<center><b>按钮封锁</b></center> <center><b>Button Lock</b></center>
</span> </span>
</button> </button>
<button :id="Signal.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.unlock.button.operation, ['Signal', 'SignalButton'])"> <button :id="Signal.unlock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.unlock.button.operation, ['Signal', 'SignalButton'])">
<span style="color: black"> <span style="color: black">
<center><b>按钮解封</b></center> <center><b>Button Unlock</b></center>
</span> </span>
</button> </button>
<button :id="Switch.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.block.button.operation, ['Switch'])"> <button :id="Switch.block.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.block.button.operation, ['Switch'])">
<span style="color: black"> <span style="color: black">
<center><b>道岔封锁</b></center> <center><b>Turnout Block</b></center>
</span> </span>
</button> </button>
<button :id="Switch.unblock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unblock.button.operation, ['Switch'])"> <button :id="Switch.unblock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.unblock.button.operation, ['Switch'])">
<span style="color: black"> <span style="color: black">
<center><b>道岔解封</b></center> <center><b>Turnout Unblock</b></center>
</span>
</button>
<button :id="Signal.signalTurnOn.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOn.menuButton.operation, ['SignalButton'])">
<span style="color: black">
<center><b>点灯</b></center>
</span>
</button>
<button :id="Signal.signalTurnOff.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOff.menuButton.operation, ['SignalButton'])">
<span style="color:#800000">
<center><b>灭灯</b></center>
</span> </span>
</button> </button>
<!-- <button :id="Signal.signalTurnOn.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOn.menuButton.operation, ['SignalButton'])">-->
<!-- <span style="color: black">-->
<!-- <center><b>Light up</b></center>-->
<!-- </span>-->
<!-- </button>-->
<!-- <button :id="Signal.signalTurnOff.menuButton.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.signalTurnOff.menuButton.operation, ['SignalButton'])">-->
<!-- <span style="color:#800000">-->
<!-- <center><b>Extinguish light</b></center>-->
<!-- </span>-->
<!-- </button>-->
<button :id="Station.stationMasterLock.leftButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: sGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()"> <button :id="Station.stationMasterLock.leftButton.domId" class="button_box" :style="{width: width+'px', backgroundColor: sGuideMasterLock? guideColorDown: guideColorUp}" @click="guideLockLeftButtonDown()">
<span style="color: #800000"> <span style="color: #800000">
<center><b>S引导总锁</b></center> <center><b>S Guide Lock</b></center>
</span> </span>
</button> </button>
<!-- powerOnUnlock --> <!-- powerOnUnlock -->
<button :id="Station.powerUnLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.powerUnLock.button.operation,['Station'])"> <!-- <button :id="Station.powerUnLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.powerUnLock.button.operation,['Station'])">-->
<!--<span style="color:black">--> <!-- &lt;!&ndash;<span style="color:black">&ndash;&gt;-->
<span style="color:#800000"> <!-- <span style="color:#800000">-->
<center><b>上电解锁</b></center> <!-- <center><b>Upper electrolytic lock</b></center>-->
</span> <!-- </span>-->
</button> <!-- </button>-->
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()"> <!-- <button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()">-->
<!--<span style="color: black">--> <!-- &lt;!&ndash;<span style="color: black">&ndash;&gt;-->
<span style="color: #808080"> <!-- <span style="color: #808080">-->
<center><b>辅助菜单</b></center> <!-- <center><b>Auxiliary menu</b></center>-->
</span> <!-- </span>-->
</button> <!-- </button>-->
<button :id="Section.defectiveShunting.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section'])"> <!-- <button :id="Section.defectiveShunting.button.domId" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section'])">-->
<!--<span style="color:black">--> <!-- &lt;!&ndash;<span style="color:black">&ndash;&gt;-->
<span style="color:#800000 "> <!-- <span style="color:#800000 ">-->
<center><b>分路不良</b></center> <!-- <center><b>Bad split</b></center>-->
</span> <!-- </span>-->
</button> <!-- </button>-->
<button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()"> <!-- <button :disabled="true" style="cursor: not-allowed;" class="button_box" :style="{width: width+'px',backgroundColor:buttonUpColor}" @click="buttonDown()">-->
<!--<span style="color: black">--> <!-- &lt;!&ndash;<span style="color: black">&ndash;&gt;-->
<span style="color: #808080"> <!-- <span style="color: #808080">-->
<center><b>标记窗</b></center> <!-- <center><b>Marking window</b></center>-->
</span> <!-- </span>-->
</button> <!-- </button>-->
<!--<button class="button_box" :style="{width: width + 'px', backgroundColor:buttonUpColor}" @click="buttonDown()">--> <!--<button class="button_box" :style="{width: width + 'px', backgroundColor:buttonUpColor}" @click="buttonDown()">-->
<!--<span style="color: #800000">--> <!--<span style="color: #800000">-->
<!--<center><b>故障通知</b></center>--> <!--<center><b>故障通知</b></center>-->
@ -389,7 +389,7 @@ export default {
operate.param = {throat: 'S', stationCode: this.$store.state.training.roleDeviceCode}; operate.param = {throat: 'S', stationCode: this.$store.state.training.roleDeviceCode};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['operateNext'] = this.Command.close.password.operation; operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate, 'S引导总锁'); this.$refs.password.doShow(operate, 'S Guided Master Lock');
} }
}); });
}, },
@ -406,12 +406,18 @@ export default {
operate.param = {throat: 'X', stationCode: this.$store.state.training.roleDeviceCode}; operate.param = {throat: 'X', stationCode: this.$store.state.training.roleDeviceCode};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['operateNext'] = this.Command.close.password.operation; operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate, 'X引导总锁'); this.$refs.password.doShow(operate, 'X Guided Master Lock');
} }
}); });
}, },
buttonDown(operation, commandTypeList) { buttonDown(operation, commandTypeList) {
this.clearOperate(); this.clearOperate();
// if()
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
if (station.controlMode !== 'Local') {
this.$message.error('Control error');
return;
}
const operate = { const operate = {
start: true, start: true,
operation: operation, operation: operation,
@ -424,11 +430,11 @@ export default {
this.Station.powerUnLock.button.operation, this.Station.powerUnLock.button.operation,
this.Signal.signalTurnOff.menuButton.operation]; this.Signal.signalTurnOff.menuButton.operation];
const operationMap = { const operationMap = {
[this.Signal.humanTrainRoute.button.operation]:'总人解', [this.Signal.humanTrainRoute.button.operation]:'Total man unlock',
[this.Section.fault.button.operation]:'区故解', [this.Section.fault.button.operation]:'Zone fault release',
[this.Section.defectiveShunting.button.operation]:'分路不良', [this.Section.defectiveShunting.button.operation]:'Bad split',
[this.Signal.signalTurnOff.menuButton.operation]:'灭灯', [this.Signal.signalTurnOff.menuButton.operation]:'Extinguish light',
[this.Station.powerUnLock.button.operation]:'上电解锁' [this.Station.powerUnLock.button.operation]:'Upper electrolytic lock'
}; };
// const list = [ // const list = [
// this.Signal.humanTrainRoute.button.operation, // this.Signal.humanTrainRoute.button.operation,
@ -495,7 +501,7 @@ export default {
this.clearOperate(); this.clearOperate();
return; return;
} }
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code); // const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
if (this.deviceList && this.deviceList.length) { if (this.deviceList && this.deviceList.length) {
let key = ''; let key = '';
this.deviceList.forEach((item, index) => { this.deviceList.forEach((item, index) => {
@ -508,11 +514,11 @@ export default {
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE; operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE;
operate.param = {routeCode: route.code}; operate.param = {routeCode: route.code};
} }
} else if (signal.lockedRouteCode) { // } else if (signal.lockedRouteCode) {
operate.operation = this.Signal.reopenSignal.button.operation; // operate.operation = this.Signal.reopenSignal.button.operation;
operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL; // operate.cmdType = CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL;
operate.param = {signalCode: signal.code}; // operate.param = {signalCode: signal.code};
operate.over = true; // operate.over = true;
} }
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { if (valid) {
@ -577,7 +583,7 @@ export default {
if (operate.over) { if (operate.over) {
this.clearOperate(); this.clearOperate();
} else { } else {
this.$refs.password.doShow(operate, '引导信号'); this.$refs.password.doShow(operate, 'Guiding signal');
this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, pressDown:1}]); this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, pressDown:1}]);
} }
} }
@ -703,7 +709,7 @@ export default {
this.clearOperate(); this.clearOperate();
} else { } else {
operate['operateNext'] = this.Command.close.password.operation; operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate, '引导信号'); this.$refs.password.doShow(operate, 'Guiding signal');
} }
} }
}).catch(e => { }).catch(e => {
@ -777,6 +783,9 @@ export default {
// CHANGE_DIRECTION // CHANGE_DIRECTION
selectedChange() { selectedChange() {
// //
if (!this.selected) {
return;
}
const model = this.selected; // const model = this.selected; //
if (this.selected._event !== MouseEvent.Left || (!model._type && !model._code)) { if (this.selected._event !== MouseEvent.Left || (!model._type && !model._code)) {
return; return;
@ -844,7 +853,7 @@ export default {
const modelTypeMap = { const modelTypeMap = {
// //
'ASSIST':{ 'ASSIST':{
name:'总辅助', name:'Total auxiliary',
operation:this.CTCCommand.assistPressMainAssist.menu.operation, operation:this.CTCCommand.assistPressMainAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_MAIN_ASSIST, nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_MAIN_ASSIST,
userOperationType: UserOperationType.LEFTCLICK, userOperationType: UserOperationType.LEFTCLICK,
@ -856,7 +865,7 @@ export default {
}, },
// //
'CHANGE_DIRECTION':{ 'CHANGE_DIRECTION':{
name:'改方', name:'Change of direction',
operation:this.CTCCommand.assistPressDownTurnDirection.menu.operation, operation:this.CTCCommand.assistPressDownTurnDirection.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION, nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
userOperationType: UserOperationType.LEFTCLICK, userOperationType: UserOperationType.LEFTCLICK,
@ -868,7 +877,7 @@ export default {
}, },
// //
'PICK_ASSIST':{ 'PICK_ASSIST':{
name:'接辅助', name:'Receiving Auxiliary',
// this.CTCCommand.assistPressDownTurnDirection.menu.operation // this.CTCCommand.assistPressDownTurnDirection.menu.operation
operation:this.CTCCommand.assistPressReceiveAssist.menu.operation, operation:this.CTCCommand.assistPressReceiveAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST, nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
@ -880,7 +889,7 @@ export default {
}, },
// //
'DEPART_ASSIST':{ 'DEPART_ASSIST':{
name:'发辅助', name:'Send auxiliary',
operation:this.CTCCommand.assistPressDeliverAssist.menu.operation, operation:this.CTCCommand.assistPressDeliverAssist.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST, nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
userOperationType: UserOperationType.LEFTCLICK, userOperationType: UserOperationType.LEFTCLICK,
@ -891,7 +900,7 @@ export default {
}, },
// //
'ACCIDENT':{ 'ACCIDENT':{
name:'事故', name:'Incident',
operation:this.CTCCommand.assistPressAccident.menu.operation, operation:this.CTCCommand.assistPressAccident.menu.operation,
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT, nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
userOperationType: UserOperationType.LEFTCLICK, userOperationType: UserOperationType.LEFTCLICK,
@ -967,8 +976,8 @@ export default {
.button_box{ .button_box{
display: block; display: block;
float: left; float: left;
font-size: 13px; font-size: 11px;
height: 35px; height: 45px;
cursor: pointer; cursor: pointer;
border-bottom-width: 1px; border-bottom-width: 1px;
border-top-width: 1px; border-top-width: 1px;

View File

@ -1,116 +1,116 @@
<template> <template>
<div id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }"> <div id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
<button :id="Signal.arrangementRoute.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal','SignalButton'])"> <button :id="Signal.arrangementRoute.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 100px;" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal','SignalButton'])">
<span :style="{ color: operation === Signal.arrangementRoute.button.operation ? '#ccc':'black'}"> <span :style="{ color: operation === Signal.arrangementRoute.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Approach</b></center>
<center><b></b><b></b></center> <center><b>establishment</b></center>
</span> </span>
</button> </button>
<button :id="MixinCommand.totalCancel.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])"> <button :id="MixinCommand.totalCancel.button.domId" :disabled="isDispatchWork" style="width: 85px;" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === MixinCommand.totalCancel.button.operation ? '#ccc': 'black'}"> <span :style="{color: operation === MixinCommand.totalCancel.button.operation ? '#ccc': 'black'}">
<center><b></b></center> <center><b>Total </b></center>
<center><b></b><b></b></center> <center><b>cancellation</b></center>
</span> </span>
</button> </button>
<button :id="Signal.reopenSignal.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Signal.reopenSignal.button.operation, ['Signal','SignalButton'])"> <button :id="Signal.reopenSignal.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 85px;" @click="buttonDown(Signal.reopenSignal.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === Signal.reopenSignal.button.operation ? '#ccc': 'black'}"> <span :style="{color: operation === Signal.reopenSignal.button.operation ? '#ccc': 'black'}">
<center><b></b><b></b></center> <center><b>Signal</b></center>
<center><b></b><b></b></center> <center><b>re-opening</b></center>
</span> </span>
</button> </button>
<button :id="Signal.guide.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Signal.guide.button.operation, ['SignalButton'])"> <button :id="Signal.guide.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 60px;" @click="buttonDown(Signal.guide.button.operation, ['SignalButton'])">
<span :style="{color: operation === Signal.guide.button.operation? '#ccc':'#800000'}"> <span :style="{color: operation === Signal.guide.button.operation? '#ccc':'#800000'}">
<center><b></b><b></b></center> <center><b>Guide</b></center>
<center><b></b><b></b></center> <center><b>buttons</b></center>
</span> </span>
</button> </button>
<button :id="Station.guideLock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])"> <button :id="Station.guideLock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 85px;" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">
<span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'#800000'}"> <span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'#800000'}">
<center><b></b><b></b></center> <center><b>Guided</b></center>
<center><b></b><b></b></center> <center><b>Master</b><b>Lock</b></center>
</span> </span>
</button> </button>
<button :id="Signal.humanTrainRoute.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])"> <button :id="Signal.humanTrainRoute.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 85px;" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === Signal.humanTrainRoute.button.operation ? '#ccc':'#800000'}"> <span :style="{color: operation === Signal.humanTrainRoute.button.operation ? '#ccc':'#800000'}">
<center><b></b></center> <center><b>Total</b></center>
<center><b></b><b></b></center> <center><b>man</b><b>unlock</b></center>
</span> </span>
</button> </button>
<button :id="Switch.locate.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Switch.locate.button.operation, ['Switch'])"> <button :id="Switch.locate.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 85px;" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.locate.button.operation? '#ccc':'black'}"> <span :style="{color: operation === Switch.locate.button.operation? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Turnout</b></center>
<center><b></b><b></b></center> <center><b>total</b><b>setting</b></center>
</span> </span>
</button> </button>
<button :id="Switch.reverse.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])"> <button :id="Switch.reverse.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 70px;" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.reverse.button.operation? '#ccc':'black'}"> <span :style="{color: operation === Switch.reverse.button.operation? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Turnout</b></center>
<center><b></b><b></b></center> <center><b>reversal</b></center>
</span> </span>
</button> </button>
<button :id="Switch.lock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Switch.lock.button.operation, ['Switch'])"> <button :id="Switch.lock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 125px;" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.lock.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === Switch.lock.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Turnout</b></center>
<center><b></b><b></b></center> <center><b>individually</b><b>locked</b></center>
</span> </span>
</button> </button>
<button :id="Switch.unlock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])"> <button :id="Switch.unlock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" style="width: 140px;" class="button_box" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.unlock.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === Switch.unlock.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Turnout</b></center>
<center><b></b><b></b></center> <center><b>individually</b><b>unlocked</b></center>
</span> </span>
</button> </button>
<button :id="MixinCommand.block.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(MixinCommand.block.button.operation, ['Switch', 'Signal'])"> <button :id="MixinCommand.block.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 70px;" @click="buttonDown(MixinCommand.block.button.operation, ['Switch', 'Signal'])">
<span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Blocking</b></center>
<center><b></b><b></b></center> <center><b>buttons</b></center>
</span> </span>
</button> </button>
<button :id="MixinCommand.functionButton.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station','SignalButton'])"> <button :id="MixinCommand.functionButton.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 70px;" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station','SignalButton'])">
<span :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Function</b></center>
<center><b></b><b></b></center> <center><b>buttons</b></center>
</span> </span>
</button> </button>
<button :id="111" class="button_box" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" @click="buttonDown()"> <button :id="111" class="button_box" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" style="width: 70px;" @click="buttonDown()">
<span style="color: black;"> <span style="color: black;">
<center><b></b><b></b></center> <center><b>Ramp</b></center>
<center><b></b><b></b></center> <center><b>unlocking</b></center>
</span> </span>
</button> </button>
<button :id="Section.defectiveShunting.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section','Switch'])"> <button :id="Section.defectiveShunting.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 50px;" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section','Switch'])">
<span :style="{color: operation === Section.defectiveShunting.button.operation ? '#ccc':'black'}"> <span :style="{color: operation === Section.defectiveShunting.button.operation ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Bad</b></center>
<center><b></b><b></b></center> <center><b>split</b></center>
</span> </span>
</button> </button>
<button :id="Command.cancel.clearMbm.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="commandClear"> <button :id="Command.cancel.clearMbm.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 75px;" @click="commandClear">
<span style="color: black;"> <span style="color: black;">
<center><b></b><b></b></center> <center><b>Command</b></center>
<center><b></b><b></b></center> <center><b>clear</b></center>
</span> </span>
</button> </button>
<button :id="333" class="button_box" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" @click="commandOrders"> <button :id="333" class="button_box" style="width: 75px;" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" @click="commandOrders">
<span style="color: black;"> <span style="color: black;">
<center><b></b><b></b></center> <center><b>Command</b></center>
<center><b></b><b></b></center> <center><b>given</b></center>
</span> </span>
</button> </button>
<button :id="CTCCommand.switchRouteSetModel.menu.domId" class="button_box" @click="statusSelectBtn"> <button :id="CTCCommand.switchRouteSetModel.menu.domId" class="button_box" style="width: 70px;" @click="statusSelectBtn">
<span style="color: black;"> <span style="color: black;">
<center><b></b><b></b></center> <center><b>Status</b></center>
<center><b></b><b></b></center> <center><b>selection</b></center>
</span> </span>
</button> </button>
<button :id="MixinCommand.modeCovert.button.domId" class="button_box" :class="{flicker: hasModeApplyList && !modeCovertShow, redFlick: hasModeApplyList && !modeCovertShow}" @click="modeCovertBtn(MixinCommand.modeCovert.button.operation)"> <button :id="MixinCommand.modeCovert.button.domId" class="button_box" style="width: 55px;" :class="{flicker: hasModeApplyList && !modeCovertShow, redFlick: hasModeApplyList && !modeCovertShow}" @click="modeCovertBtn(MixinCommand.modeCovert.button.operation)">
<span :style="{color: modeCovertShow ? '#ccc':'black'}"> <span :style="{color: modeCovertShow ? '#ccc':'black'}">
<center><b></b><b></b></center> <center><b>Mode</b></center>
<center><b></b><b></b></center> <center><b>change</b></center>
</span> </span>
</button> </button>
<div v-if="modeCovertShow" class="modeCovertPopList"> <div v-if="modeCovertShow" class="modeCovertPopList">
<div :id="MixinCommand.modeCovert.applyModeCovert.domId" class="eachModeCovertPop" @click="applyModeCovert">模式申请</div> <div :id="MixinCommand.modeCovert.applyModeCovert.domId" class="eachModeCovertPop" @click="applyModeCovert">Pattern application</div>
<div :id="MixinCommand.modeCovert.agreeModeCovert.domId" class="eachModeCovertPop" :class="{flicker: hasModeApplyList && modeCovertShow, redFlick: hasModeApplyList && modeCovertShow}" @click="agreeModeCovert">同意模式申请</div> <div :id="MixinCommand.modeCovert.agreeModeCovert.domId" class="eachModeCovertPop" :class="{flicker: hasModeApplyList && modeCovertShow, redFlick: hasModeApplyList && modeCovertShow}" @click="agreeModeCovert">Pattern application</div>
</div> </div>
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" /> <password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
@ -193,11 +193,11 @@ export default {
routeButtonCodeList: [], // btnCodeList code list routeButtonCodeList: [], // btnCodeList code list
menu: [ menu: [
{ {
label: '命令下达', label: 'Command given',
handler: this.commandOrders handler: this.commandOrders
}, },
{ {
label: '命令清除', label: 'Command clear',
handler: this.commandClear handler: this.commandClear
} }
], ],
@ -1027,9 +1027,9 @@ export default {
.button_box{ .button_box{
display: block; display: block;
float: left; float: left;
font-size: 13px; font-size: 11px;
height: 35px; height: 35px;
width: 45px; width: 90px;
background: #F0F0F0; background: #F0F0F0;
} }
.menu { .menu {
@ -1056,7 +1056,7 @@ export default {
} }
.modeCovertPopList{ .modeCovertPopList{
position: absolute; position: absolute;
width: 130px; width: 190px;
background: #F0F0F0; background: #F0F0F0;
bottom: 18px; bottom: 18px;
left: 780px; left: 780px;

View File

@ -0,0 +1,142 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm two-confirmation"
title="Secondary confirmation"
: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">
<div :key="index">{{ message }}</div>
</template>
</div>
<el-row class="button-group">
<el-col :span="10" :offset="3">
<el-button :id="show? domIdConfirm: ''" :loading="loading" :disabled="loading" @click="commit">Confirm</el-button>
</el-col>
<el-col :span="6" :offset="4">
<el-button :id="domIdCancel" @click="cancel">Close</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'TwoConfirmation',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operation: '',
operate: '',
timer: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm() {
if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
return OperationEvent.StationControl.emergencyStationControl.confirm.domId;
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
return OperationEvent.StationControl.requestStationControl.confirm.domId;
} else if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
} else if (this.operate == OperationEvent.StationControl.forcedStationControl.menu.operation) {
return OperationEvent.StationControl.forcedStationControl.confirm.domId;
} else {
return '';
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
messages() {
if (this.operate) {
return this.operate.messages;
}
return [];
}
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = this.operate.operation;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.confirm.operation
};
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
},
commit() {
this.loading = true;
const operate = {
over: true,
operation: ''
};
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
operate.operation = OperationEvent.StationControl.emergencyStationControl.confirm.operation;
} else if (this.operation == OperationEvent.StationControl.forcedStationControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
}
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
setTimeout(() => {
this.loading = false;
}, 200);
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
setTimeout(() => {
this.loading = false;
}, 200);
});
}
}
};
</script>

View File

@ -0,0 +1,72 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
title="Operation Plan Detail"
:visible.sync="show"
width="660px"
height="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-table
ref="detailTable"
class="table"
:data="detailData"
:row-class-name="tableRowClassName"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="groupNumber" :width="100" label="Train Code" />
<el-table-column prop="stationName" :width="160" label="Station Name" />
<el-table-column prop="trackName" :width="180" label="Track Name" />
<el-table-column prop="parkingDuration" label="Parking Duration" />
</el-table>
</el-dialog>
</template>
<script>
import { getSandTableRunPlanDetail } from '@/api/simulation';
export default {
data() {
return {
dialogShow: false,
detailData: [],
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
},
methods: {
async doShow() {
this.dialogShow = true;
const resp = await getSandTableRunPlanDetail(this.$route.query.group);
this.detailData = resp.data;
console.log(resp);
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
tableRowClassName({ row }) {
if (row.finished) {
return 'finished';
}
},
},
};
</script>
<style lang="scss" scoped>
/deep/ {
.el-table .finished {
color: green;
}
}
</style>

View File

@ -76,21 +76,21 @@ export default {
} }
this.operation = operate.operation; this.operation = operate.operation;
if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) { if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
this.showMessage = `下发“取消进路”【信号机:${this.signalName}】命令吗?`; this.showMessage = `Is the "Cancel Approach" [Signal: ${this.signalName}] command issued?`;
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) { } else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
this.showMessage = `下发“信号重开”命令吗?`; this.showMessage = `Is the "Signal reopening" command issued?`;
} else if (this.operation === OperationEvent.Signal.guide.menu.operation) { } else if (this.operation === OperationEvent.Signal.guide.menu.operation) {
this.showMessage = `下发“引导进路”命令吗?`; this.showMessage = `Is the "Guiding approach" command issued?`;
} else if (this.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) { } else if (this.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
this.showMessage = `下发“总人解”命令吗?`; this.showMessage = `Is the "Master unblock" command issued?`;
} else if (this.operation === OperationEvent.Switch.locate.menu.operation) { } else if (this.operation === OperationEvent.Switch.locate.menu.operation) {
this.showMessage = `下发“定操【道岔:${this.switchName}】”命令吗?`; this.showMessage = `Is the "Directional operations" [Switch: ${this.switchName}] command issued?`;
} else if (this.operation === OperationEvent.Switch.reverse.menu.operation) { } else if (this.operation === OperationEvent.Switch.reverse.menu.operation) {
this.showMessage = `下发“反操【道岔:${this.switchName}】”命令吗?`; this.showMessage = `Is the "Reverse operation" [Switch: ${this.switchName}] command issued?`;
} else if (this.operation === OperationEvent.Switch.lock.menu.operation) { } else if (this.operation === OperationEvent.Switch.lock.menu.operation) {
this.showMessage = `下发“单锁【道岔:${this.switchName}】”命令吗?`; this.showMessage = `Is the "Individually locked" [Switch: ${this.switchName}] command issued?`;
} else if (this.operation === OperationEvent.Switch.unlock.menu.operation) { } else if (this.operation === OperationEvent.Switch.unlock.menu.operation) {
this.showMessage = `下发“单解【道岔:${this.switchName}】”命令吗?`; this.showMessage = `Is the "Individually unlocked" [Switch: ${this.switchName}] command issued?`;
} else { } else {
this.showMessage = ''; this.showMessage = '';
} }

View File

@ -0,0 +1,121 @@
//
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
title="Set Operation Plan"
:visible.sync="show"
width="660px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form>
<div class="formRow" v-for="(item, i) in formData" :key="i">
<el-form-item label="Train Code">
<el-select v-model="item.groupNumber">
<el-option v-for="option in trainList" :key="option" :label="option" :value="option">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="Track Code">
<el-select v-model="item.trackCode">
<el-option
v-for="section in parkingTrackList"
:key="section.label"
:value="section.value"
:label="section.label"
></el-option>
</el-select>
</el-form-item>
</div>
<div class="formRow" style="justify-content:center; margin-bottom:20px">
<el-button v-if="formData.length < 4" @click="addRow">+</el-button>
<el-button v-if="formData.length > 1" @click="deleteRow">-</el-button>
</div>
</el-form>
<div class="formRow">
<el-button @click="confirm">Run As Plan</el-button>
<el-button @click="cancel">Cancel</el-button>
</div>
</el-dialog>
</template>
<script>
import { sandTableRunAsPlan } from '@/api/simulation';
import { mapGetters } from 'vuex';
export default {
name: 'SetOperationPlanDialog',
data() {
return {
dialogShow: false,
formData: [
{
groupNumber: '',
trackCode: '',
},
],
};
},
computed: {
...mapGetters('map', ['sectionList', 'stationList']),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
trainList() {
return this.$store.state.map.map.trainList.map(v => v.groupNumber);
},
parkingTrackList() {
return this.sectionList.filter(sec => sec.parkingTrack).map(v => ({ label: v.name, value: v.code }));
},
},
methods: {
doShow() {
this.dialogShow = true;
this.formData = [
{
groupNumber: '',
trackCode: '',
},
];
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
addRow() {
this.formData.push({ groupNumber: '', trackCode: '' });
},
deleteRow() {
this.formData.pop();
},
async confirm() {
const validate = this.formData.every(item => item.groupNumber !== '' && item.trackCode !== '');
if (!validate) {
this.$message.error('Please select the correct Train Code and Track Code');
}
const simulationId = this.$route.query.group;
const sectionCodes = this.formData.map(_ => _.trackCode);
const runData = this.formData;
try {
await sandTableRunAsPlan(simulationId, runData);
this.doClose();
} catch (err) {
this.$message.error(err.message);
}
},
cancel() {
this.doClose();
},
},
};
</script>
<style lang="scss" scoped>
.formRow {
display: flex;
justify-content: space-evenly;
align-items: center;
}
</style>

View File

@ -0,0 +1,177 @@
<template>
<el-dialog
v-dialogDrag
style="pointer-events: none"
z-index="2008"
class="chengdou-03__systerm switch-control __menuButton"
:title="title"
:visible.sync="show"
width="350px"
:before-close="doClose"
:modal="false"
append-to-body
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="4"><span>Signal</span></el-col>
<el-col :span="18" :offset="2">
<el-select v-model="selected" disabled filterable placeholder="Please select">
<el-option
v-for="item in signalList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="11">
<el-radio v-model="closeRadio" label="1" :disabled="closeRadio == 2" style="display: block; text-align: center;">
Signal close</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="closeRadio" label="2" :disabled="closeRadio == 1" style="display: block; text-align: center;">
Signal reopen</el-radio>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">Confirm</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" :pop-class="'chengdou-03__systerm'" />
</el-dialog>
</template>
<script>
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {mapGetters} from 'vuex';
export default {
name: 'SwitchControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
closeRadio: '1'
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
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) : '';
},
title() {
if (this.operation == OperationEvent.Signal.signalClose.mbar.operation) {
return 'Signal close';
} else if (this.operation == OperationEvent.Signal.reopenSignal.mbar.operation) {
return 'Signal reopen';
}
return '';
}
},
watch: {
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device && device.code && device._type === 'Signal' && this.show) {
this.selected = device.code;
}
}
},
methods: {
doShow(operate) {
this.selected = null;
if (!this.dialogShow) {
this.operation = operate.operation;
if (this.operation == OperationEvent.Signal.signalClose.mbar.operation) {
this.closeRadio = '1';
} else if (this.operation == OperationEvent.Signal.reopenSignal.mbar.operation) {
this.closeRadio = '2';
}
}
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.operation == OperationEvent.Signal.signalClose.mbar.operation) {
this.signalClose();
} else if (this.operation == OperationEvent.Signal.reopenSignal.mbar.operation) {
this.reopenSignal();
}
},
signalClose() {
this.sendCommand(menuOperate.Signal.signalClose);
},
reopenSignal() {
this.sendCommand(menuOperate.Signal.reopenSignal);
},
sendCommand(operate) {
this.loading = true;
commitOperate(operate, {signalCode: this.selected}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style lang="scss">
.__menuButton {
.el-dialog,
.el-dialog__wrapper {
pointer-events: none !important;
}
.el-dialog__header,
.el-dialog__body {
pointer-events: all !important;
}
}
</style>

View File

@ -2,7 +2,7 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm station-control-convert" class="chengdou-03__systerm station-control-convert"
title="控制模式转换" title="Control Mode Conversion"
:visible.sync="show" :visible.sync="show"
width="700px" width="700px"
:before-close="doClose" :before-close="doClose"
@ -22,42 +22,41 @@
size="mini" size="mini"
highlight-current-row highlight-current-row
> >
<el-table-column :id="domIdChoose" prop="check" label="选择" width="60" style="margin-left:30px"> <el-table-column :id="domIdChoose" prop="check" label="Select" width="60" style="margin-left:30px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" /> <el-checkbox ref="check" v-model="scope.row.check" :disabled="scope.row.disabled" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="operate" label="操作区域" width="140"> <el-table-column prop="operate" label="Operating Area" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span> <span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="control" label="控制模式" width="80"> <el-table-column prop="control" label="Control Mode" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span> <span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" label="中心-车站通信状态" width="140"> <el-table-column prop="status" label="Center Station Communication Status" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span> <span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.status }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="result" label="转换执行状态"> <el-table-column prop="result" label="Transfer Execution Status">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span> <span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.result }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-row class="button-group"> <el-row class="button-group">
<el-col :span="10" :offset="3"> <el-col :span="10" :offset="3" class="control_button">
<el-button v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">强制站控</el-button> <el-button style="width: 200px" v-if="isFork" :id="domIdFork" :disabled="disabledCommit" @click="forkCommit">Emergency Station Control</el-button>
<el-button v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">请求站控 <el-button style="width: 150px" v-if="isRequest" :id="domIdRequest" :disabled="disabledCommit" @click="requestCommit">To Station Control</el-button>
</el-button> <el-button style="width: 150px" v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">To Center Control</el-button>
<el-button v-if="isConter" :id="domIdConter" :disabled="disabledCommit" @click="conterCommit">请求中控
</el-button>
</el-col> </el-col>
<el-col :span="6" :offset="4"> <el-col :span="6" :offset="4">
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">关闭</el-button> <el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel">Close
</el-button>
</el-col> </el-col>
</el-row> </el-row>
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" /> <two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
@ -75,6 +74,14 @@ export default {
components: { components: {
TwoConfirmation TwoConfirmation
}, },
props: {
work: {
type: String,
default() {
return '';
}
}
},
data() { data() {
return { return {
operate: null, operate: null,
@ -84,15 +91,13 @@ export default {
disabledClose: false, disabledClose: false,
operation: '', operation: '',
controlProps: { controlProps: {
'01': '中控', 'Center': 'Center',
'02': '站控' 'Local': 'Local'
}, },
selection: [], selection: [],
tableData: [], tableData: [],
timer: null, timer: null,
count: 0, count: 0
backOperate: '',
timeout: 61
}; };
}, },
computed: { computed: {
@ -113,19 +118,19 @@ export default {
if (this.dialogShow) { if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl); return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl);
} }
return ''; return false;
}, },
isRequest() { isRequest() {
if (this.dialogShow) { if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl); return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl);
} }
return ''; return false;
}, },
isConter() { isConter() {
if (this.dialogShow) { if (this.dialogShow) {
return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl); return OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl);
} }
return ''; return false;
}, },
domIdChoose() { domIdChoose() {
if (this.dialogShow) { if (this.dialogShow) {
@ -137,7 +142,7 @@ export default {
return OperationEvent.StationControl.requestCentralControl.choose.domId; return OperationEvent.StationControl.requestCentralControl.choose.domId;
} }
} }
return ''; return false;
}, },
domIdConter() { domIdConter() {
return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : ''; return this.dialogShow ? OperationEvent.StationControl.requestCentralControl.menu.domId : '';
@ -153,31 +158,10 @@ export default {
} }
}, },
watch: { watch: {
'$store.state.socket.msgHead': function (elem) { '$store.state.map.controlTransfer':function (controlTransferList) {
if (elem) { controlTransferList.forEach(controlTransfer=>{
if (elem.hasOwnProperty('timeout')) { this.updateTableValue(controlTransfer);
this.updateTableValue(elem.stationControlCode, { result: `接受转换应答超时` }, false);
} else if (elem.hasOwnProperty('success')) {
if (elem.success) {
this.updateTableValue(elem.stationControlCode, { result: '控制模式转换成功' }, true);
} else {
this.updateTableValue(elem.stationControlCode, { result: `控制模式转换失败` }, 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.timeout}秒后超时.` }, false);
} else if (operate.cancel) {
this.updateTableValue(elem.code, { result: '' }, false);
}
}); });
}
}
}, },
// //
tableData: { tableData: {
@ -188,23 +172,31 @@ export default {
} }
}, },
mounted() { mounted() {
this.loadTableData(); // this.loadTableData();
}, },
methods: { methods: {
updateTableValue(code, result, success) { updateTableValue(controlTransfer) {
this.tableData.forEach((row, index) => { this.tableData.forEach((row, index) => {
if (row.code == code) { if (row.code == controlTransfer.code) {
for (const prop in result) { if (controlTransfer.applicantId) {
row[prop] = result[prop]; row.result = 'A transfer request has been sent and timed out after,' + controlTransfer.validDuration + 'seconds.';
}
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.disabled = true;
row.check = false; row.check = false;
} else {
if (row.control != this.controlProps[controlTransfer.controlMode]) {
row.result = 'Control mode transfer success';
row.control = this.controlProps[controlTransfer.controlMode];
this.removeSelection(controlTransfer.code);
row.disabled = true;
row.check = false;
} else {
row.result = 'Control mode transfer failed';
this.removeSelection(controlTransfer.code);
row.disabled = false;
row.check = false;
}
this.disabledClose = false;
this.disabledSure = false;
} }
} }
}); });
@ -226,13 +218,13 @@ export default {
} }
}, },
checkBoxDisabled(row) { checkBoxDisabled(row) {
const control = (this.$store.getters('map/getDeviceByCode')(row.code) || {}); 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 (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl) || OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestStationControl)) {
if (control && control.status == '02') { // 01: 02: if (control && control.controlMode == 'Local') { // Center: Local:
return true; return true;
} }
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) { } else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
if (control && control.status == '01') { // 01: 02: if (control && control.controlMode == 'Center') { // Center: Local:
return true; return true;
} }
} }
@ -240,29 +232,55 @@ export default {
}, },
loadTableData() { loadTableData() {
this.tableData = []; this.tableData = [];
if (this.stationList) {
this.stationList.forEach(station => { this.stationList.forEach(station => {
// const station = this.$store.getters['map/getDeviceByCode'](control.stationCode); if (station.createControlMode) {
this.tableData.push({ this.tableData.push({
code: station.code, code: station.code,
operate: station.name || '', operate: station.name || '',
control: '', control: '',
check: false, check: false,
disabled: false, disabled: false,
status: '正常', status: 'normal',
result: ''
});
}
});
}
},
initTableDataStatus() {
this.tableData = [];
if (this.work === 'dispatchWork') {
this.stationList && this.stationList.forEach(station => {
if (station.createControlMode) {
const control = this.$store.getters['map/getDeviceByCode'](station.code);
this.tableData.push({
code: station.code,
operate: station.name || '',
control: control ? this.controlProps[control.controlMode] : '',
check: false,
disabled: this.checkBoxDisabled(station),
status: 'normal',
result: ''
});
}
});
} else if (this.work === 'localWork') {
const stationCodeList = this.$store.state.map.stationControlMap[this.$store.state.training.roleDeviceCode] || [];
const list = [...new Set(stationCodeList)]; //
list && list.forEach(stationCode => {
const station = this.$store.getters['map/getDeviceByCode'](stationCode);
this.tableData.push({
code: station.code,
operate: station.name || '',
control: station ? this.controlProps[station.controlMode] : '',
check: false,
disabled: this.checkBoxDisabled(station),
status: 'normal',
result: '' 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) || {}).state;
if (control) {
row.control = this.controlProps[control.status];
} }
});
}, },
doShow(operate) { doShow(operate) {
if (!this.dialogShow) { if (!this.dialogShow) {
@ -277,11 +295,9 @@ export default {
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$refs.multipleTable.setCurrentRow();
}, },
cancel() { cancel() {
const operate = { const operate = {
type: 'bar',
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
@ -291,29 +307,24 @@ export default {
} }
}); });
}, },
clearTimer() { removeSelection(code) {
this.count = 0; let selectionIndex = -1;
if (this.timer) { this.selection.forEach((item, index) => {
clearInterval(this.timer); if (item.code === code) {
this.timer = null; selectionIndex = index;
} }
},
serializeCodeListWithSeparator(sep) {
const codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
}); });
if (selectionIndex > -1) {
this.selection.splice(selectionIndex, 1);
} }
return codeList.join(sep);
}, },
handleChooseChange(selection) { handleChooseChange(selection) {
this.selection = selection; this.selection = selection;
const stationCodeList = selection.map(elem => { return elem.code; });
if (selection && selection.length) { if (selection && selection.length) {
const operate = { const operate = {
operation: '', operation: '',
val: this.serializeCodeListWithSeparator('::'), val: stationCodeList.join('::'),
selection: selection selection: selection
}; };
@ -328,29 +339,31 @@ export default {
this.disabledSure = true; this.disabledSure = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.disabledSure = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
this.disabledSure = false;
}); });
} else if (!selection) { } else if (!selection) {
this.$messageBox('请选择一条数据'); this.$messageBox('Please select a piece of data');
} }
}, },
requestCommit() { requestCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = { const operate = {
messages: ['Confirm that the control mode of the following operation area is changed from central control to station control:'],
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
operation: OperationEvent.StationControl.requestStationControl.menu.operation, operation: OperationEvent.StationControl.requestStationControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'), val: stationCodeList.join('::'),
selection: this.selection selection: this.selection,
param: {
stationCodes: stationCodeList
}
}; };
this.selection.forEach((elem, index) => { this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`); operate.messages.push(`Operating Area ${index + 1}:${elem.operate}`);
}); });
this.disabledSure = true; this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -360,24 +373,25 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.disabledSure = false; this.disabledSure = false;
this.disabledClose = false;
}); });
}, },
forkCommit() { forkCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = { const operate = {
messages: ['Confirm that the control mode of the following operation area is changed from station control to central control:'],
messages: ['确认将如下操作区域的控制模式由中控转为站控:'],
operation: OperationEvent.StationControl.forcedStationControl.menu.operation, operation: OperationEvent.StationControl.forcedStationControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'), val: stationCodeList.join('::'),
selection: this.selection selection: this.selection,
param: {
stationCodes: stationCodeList
}
}; };
this.selection.forEach((elem, index) => { this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`); operate.messages.push(`Operating Area ${index + 1}:${elem.operate}`);
}); });
this.disabledSure = true; this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -387,24 +401,25 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.disabledSure = false; this.disabledSure = false;
this.disabledClose = false;
}); });
}, },
conterCommit() { // conterCommit() {
const stationCodeList = this.selection.map(elem => { return elem.code; });
const operate = { const operate = {
messages: ['Confirm that the control mode of the following operation area is changed from station control to central control:'],
messages: ['确认将如下操作区域的控制模式由站控转为中控:'],
operation: OperationEvent.StationControl.requestCentralControl.menu.operation, operation: OperationEvent.StationControl.requestCentralControl.menu.operation,
val: this.serializeCodeListWithSeparator('::'), val: stationCodeList.join('::'),
selection: this.selection selection: this.selection,
param: {
stationCodes: stationCodeList
}
}; };
this.selection.forEach((elem, index) => { this.selection.forEach((elem, index) => {
operate.messages.push(`操作区域${index + 1}:${elem.operate}`); operate.messages.push(`Operating Area ${index + 1}:${elem.operate}`);
}); });
this.disabledSure = true; this.disabledSure = true;
this.disabledClose = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -414,20 +429,27 @@ export default {
} }
}).catch(() => { }).catch(() => {
this.disabledSure = false; this.disabledSure = false;
this.disabledClose = false;
}); });
}, },
getOperate(operate) { getOperate(operate) {
this.backOperate = operate;
if (operate.cancel) { if (operate.cancel) {
this.disabledClose = false;
this.disabledSure = this.disabledSend = false; this.disabledSure = this.disabledSend = false;
this.disabledClose = false;
} }
if (operate.commit || operate.timeout) { if (operate.commit || operate.timeout) {
this.disabledSend = this.disabledSure = true; this.disabledSend = this.disabledSure = true;
this.disabledClose = false; this.disabledClose = true;
} }
} }
} }
}; };
</script> </script>
<style lang="scss" scoped>
.xian-01__systerm .el-dialog .control_button button{
max-width:180px;
width:auto ;
padding-left: 5px ;
padding-right: 5px ;
min-width: 80px;
}
</style>

View File

@ -0,0 +1,218 @@
<template>
<el-dialog
v-dialogDrag
style="pointer-events: none"
z-index="2008"
class="chengdou-03__systerm switch-control __menuButton"
:title="title"
:visible.sync="show"
width="350px"
:before-close="doClose"
:modal="false"
append-to-body
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="4"><span>Turnout</span></el-col>
<el-col :span="18" :offset="2">
<el-select v-model="selected" disabled filterable placeholder="Please select">
<el-option
v-for="item in switchList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-col>
</el-row>
<el-row v-if="isLock" style="margin-top: 10px;">
<el-col :span="11">
<el-radio v-model="lockRadio" label="1" :disabled="lockRadio == 2" style="display: block; text-align: center;">
Turnout lock</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="lockRadio" label="2" :disabled="lockRadio == 1" style="display: block; text-align: center;">
Turnout unlock</el-radio>
</el-col>
</el-row>
<el-row v-if="isTurnBlock" style="margin-top: 10px;">
<el-col :span="11">
<el-radio v-model="turnRadio" label="1" :disabled="turnRadio == 2" style="display: block; text-align: center;">
Turnout normal</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="turnRadio" label="2" :disabled="turnRadio == 1" style="display: block; text-align: center;">
Turnout reverse</el-radio>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">Confirm</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" :pop-class="'chengdou-03__systerm'" />
</el-dialog>
</template>
<script>
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {mapGetters} from 'vuex';
export default {
name: 'SwitchControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: '',
isLock: false,
isTurnBlock: false,
turnRadio: '1',
lockRadio: '1'
};
},
computed: {
...mapGetters('map', [
'switchList'
]),
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) : '';
},
title() {
if (this.operation == OperationEvent.Switch.lock.mBar.operation) {
return 'Turnout lock';
} else if (this.operation == OperationEvent.Switch.unlock.mbar.operation) {
return 'Turnout unlock';
} else if (this.operation == OperationEvent.Switch.locate.mbar.operation) {
return 'Turnout normal';
} else if (this.operation == OperationEvent.Switch.reverse.mbar.operation) {
return 'Turnout reverse';
}
return '';
}
},
watch: {
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device && device.code && device._type === 'Switch' && this.show) {
this.selected = device.code;
}
}
},
methods: {
doShow(operate) {
this.selected = null;
if (!this.dialogShow) {
this.operation = operate.operation;
this.isLock = false;
this.isTurnBlock = false;
if (this.operation == OperationEvent.Switch.locate.mbar.operation) {
this.isTurnBlock = true;
this.turnRadio = '1';
} else if (this.operation == OperationEvent.Switch.reverse.mbar.operation) {
this.isTurnBlock = true;
this.turnRadio = '2';
} else if (this.operation == OperationEvent.Switch.lock.mBar.operation) {
this.isLock = true;
this.lockRadio = '1';
} else if (this.operation == OperationEvent.Switch.unlock.mbar.operation) {
this.isLock = true;
this.lockRadio = '2';
}
}
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.operation == OperationEvent.Switch.lock.mBar.operation) {
this.lock(); //
} else if (this.operation == OperationEvent.Switch.unlock.mbar.operation) {
this.unlock(); //
} else if (this.operation == OperationEvent.Switch.locate.mbar.operation) {
this.locate(); //
} else if (this.operation == OperationEvent.Switch.reverse.mbar.operation) {
this.reverse(); //
}
},
//
lock() {
this.sendCommand(menuOperate.Switch.block);
},
//
unlock() {
this.sendCommand(menuOperate.Switch.unblock);
},
//
locate() {
this.sendCommand(menuOperate.Switch.locate);
},
//
reverse() {
this.sendCommand(menuOperate.Switch.reverse);
},
sendCommand(operate) {
this.loading = true;
commitOperate(operate, {switchCode: this.selected}, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style lang="scss">
.__menuButton {
.el-dialog,
.el-dialog__wrapper {
pointer-events: none !important;
}
.el-dialog__header,
.el-dialog__body {
pointer-events: all !important;
}
}
</style>

View File

@ -19,12 +19,12 @@
> >
<el-table-column <el-table-column
type="index" type="index"
label="序号" label="Index"
width="70" width="70"
/> />
<el-table-column <el-table-column
prop="stationCode" prop="stationCode"
label="站名" label="Station name"
width="120" width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -33,27 +33,27 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="arriveTipNum" prop="arriveTipNum"
label="到达车次" label="Arrivals"
width="80" width="80"
/> />
<el-table-column <el-table-column
prop="arriveTime" prop="arriveTime"
label="到达时间" label="Arrival time"
width="80" width="80"
/> />
<el-table-column <el-table-column
prop="leaveTipNum" prop="leaveTipNum"
label="出发车次" label="Departure"
width="80" width="80"
/> />
<el-table-column <el-table-column
prop="leaveTime" prop="leaveTime"
label="出发时间" label="Departure time"
width="80" width="80"
/> />
<el-table-column <el-table-column
prop="masterCode" prop="masterCode"
label="股道名" label="Track name"
width="75" width="75"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -64,7 +64,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="backStationCode" prop="backStationCode"
label="来方车站" label="Arriving station"
width="120" width="120"
> >
<!-- 后方车站 --> <!-- 后方车站 -->
@ -76,7 +76,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="fontStationCode" prop="fontStationCode"
label="去方车站" label="Departure station"
width="120" width="120"
> >
<!-- 前方车站 --> <!-- 前方车站 -->
@ -88,7 +88,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="enterDirCode" prop="enterDirCode"
label="入口" label="Entrance"
width="170" width="170"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -99,7 +99,7 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="outDirCode" prop="outDirCode"
label="出口" label="Exit"
width="170" width="170"
> >
<template slot-scope="scope"> <template slot-scope="scope">
@ -111,13 +111,13 @@
</el-table> </el-table>
<el-row justify="center" class="button-group" style="margin-top:20px"> <el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="3" :offset="5"> <el-col :span="3" :offset="5">
<el-button :id="domIdLoad " type="primary" :loading="loading" @click="loadUpdateTrainFixedPath">加载 </el-button> <el-button :id="domIdLoad " type="primary" :loading="loading" @click="loadUpdateTrainFixedPath">Loading</el-button>
</el-col> </el-col>
<el-col :span="3" :offset="2"> <el-col :span="3" :offset="2">
<el-button :id="domIdUpdate " type="primary" :loading="loading" @click="updateTrainFixedPath2Station">更新 </el-button> <el-button :id="domIdUpdate " type="primary" :loading="loading" @click="updateTrainFixedPath2Station">Update</el-button>
</el-col> </el-col>
<el-col :span="3" :offset="2"> <el-col :span="3" :offset="2">
<el-button :id="domIdCancel" @click="cancel">取消</el-button> <el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
@ -182,7 +182,7 @@ export default {
}, },
methods:{ methods:{
doShow(stationCode) { doShow(stationCode) {
const title = '固定径路信息'; const title = 'Fixed path information';
const operate = { const operate = {
start: true, start: true,
over: true, over: true,
@ -198,7 +198,7 @@ export default {
this.stationCode = stationCode; this.stationCode = stationCode;
this.trainFixedPathList = response.data.data; this.trainFixedPathList = response.data.data;
this.dialogShow = true; this.dialogShow = true;
this.title = title + ' 版本:' + response.data.version; this.title = title + ' versions:' + response.data.version;
this.$nextTick(() => { this.$store.dispatch('training/emitTipFresh'); }); this.$nextTick(() => { this.$store.dispatch('training/emitTipFresh'); });
} }
}).catch(e => { }).catch(e => {
@ -225,11 +225,11 @@ export default {
}; };
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { if (valid) {
this.$message.success('加载成功!'); this.$message.success('Loaded successfully!');
this.$nextTick(() => { this.$store.dispatch('training/emitTipFresh'); }); this.$nextTick(() => { this.$store.dispatch('training/emitTipFresh'); });
} }
}).catch(() => { }).catch(() => {
this.$message.error('加载失败!'); this.$message.error('Load failure!');
}); });
}, },
// //
@ -247,11 +247,11 @@ export default {
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => { this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) { if (valid) {
sendCommandNew(this.$route.query.group, menuOperate.CTC.getStationTrainFixedPath.cmdType.value, { stationCode: this.stationCode }).then(resp => { sendCommandNew(this.$route.query.group, menuOperate.CTC.getStationTrainFixedPath.cmdType.value, { stationCode: this.stationCode }).then(resp => {
const title = '固定径路信息'; const title = 'Fixed path information';
this.trainFixedPathList = resp.data.data; this.trainFixedPathList = resp.data.data;
this.title = title + ' 版本 :' + resp.data.version; this.title = title + ' Versions :' + resp.data.version;
}).catch(() => { }).catch(() => {
this.$message.error('获取数据失败!'); this.$message.error('Data acquisition failure!');
}); });
} }
}).catch(e => { }).catch(e => {

View File

@ -0,0 +1,188 @@
<template>
<el-dialog
v-dialogDrag
title="Train Control"
:visible.sync="dialogVisible"
width="30%"
:modal="false"
:before-close="handleClose"
>
<el-row>
<el-col :span="4" :offset="1">Train</el-col>
<el-col :span="19">
<el-select v-model="groupNumber" size="small" style="width:230px" @change="trainChange">
<el-option
v-for="option in activeTrainList"
:key="option"
:label="option"
:value="option"
/>
</el-select>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="18" :offset="1">
<el-slider
v-model="speed"
:step="10"
:max="55"
:disabled="!groupNumber"
:marks="marks"
show-stops
@input="inputSpeed"
@change="changeSpeed"
/>
</el-col>
<el-col :span="3" :offset="2">
<el-button size="mini" type="danger" :disabled="!groupNumber" style="margin-top: 15px;" @click="brakeTrain">brake</el-button>
</el-col>
</el-row>
<el-row style="margin-top: 40px">
<el-col :span="3" :offset="7" style="text-align: right;">
<el-button :disabled="!showRight || !groupNumber" type="primary" size="mini" icon="el-icon-arrow-left" @click="adjustDirection" />
</el-col>
<el-col :span="3" style="text-align: center;">
<img style="width: 50px" :src="trainPic">
</el-col>
<el-col :span="3">
<el-button :disabled="showRight || !groupNumber" type="primary" size="mini" icon="el-icon-arrow-right" @click="adjustDirection" />
</el-col>
</el-row>
<el-row style="text-align: center;margin-top: 15px;">
<el-button type="primary" :disabled="!groupNumber" size="mini" @click="handleRun">Run</el-button>
</el-row>
</el-dialog>
</template>
<script>
import LeftTrain from '@/assets/left_train.png';
import RightTrain from '@/assets/right_train.png';
import { sandTableTrainControl } from '@/api/simulation';
import { menuOperate } from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'TrainOperation',
data() {
return {
speed: 0,
dialogVisible: false,
leftTrainPic: LeftTrain,
rightTrainPic: RightTrain,
groupNumber: '',
changeSpeedFlag: false,
right: true,
reversal: false,
train: null,
marks: {
0: '0',
10: '10km/h',
20: '20km/h',
30: '30km/h',
40: '40km/h',
50: {
style: {
whiteSpace:'nowrap'
},
label: '50km/h'
}
}
};
},
computed: {
showRight() {
return (this.right && !this.reversal) || (!this.right && this.reversal);
},
trainPic() {
if ((this.right && this.reversal) || (!this.right && !this.reversal)) {
return this.leftTrainPic;
} else {
return this.rightTrainPic;
}
},
activeTrainList() {
return this.$store.state.map.activeTrainList;
}
},
methods: {
handleClose() {
this.$store.dispatch('menuOperation/setSelected', {device: {}});
this.dialogVisible = false;
},
trainChange(val) {
const train = this.$store.getters['map/getDeviceByCode'](val);
if (train && train.trainWindowCode) {
const trainWindow = this.$store.getters['map/getDeviceByCode'](train.trainWindowCode);
this.reversal = trainWindow.reversal;
}
this.groupNumber = train.groupNumber;
this.train = train;
if (this.right != train.right) {
this.right = !!train.right;
}
if (this.speed != train.speed && !this.changeSpeedFlag) {
this.speed = train.speed;
this.$nextTick(() => { this.changeSpeedFlag = false; });
}
},
doShow() {
this.dialogVisible = true;
},
inputSpeed(val) {
this.changeSpeedFlag = true;
},
changeSpeed(val) {
if (!this.groupNumber) {
return;
}
sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: this.speed }).then(resp => {
}).catch(err => { this.$message.error(err.message); this.speed = this.train.speed; }).finally(() => { this.changeSpeedFlag = false; });
},
adjustDirection() {
if (!this.groupNumber) {
return;
}
sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: !this.right, speed: this.speed }).then(resp => {
this.right = !this.right;
}).catch(err => { this.$message.error(err.message); });
},
brakeTrain() {
if (!this.groupNumber) {
return;
}
sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: 0 }).then(resp => {
this.speed = 0;
}).catch(err => { this.$message.error(err.message); }).finally(() => { this.changeSpeedFlag = false; });
},
handleRun() {
if (!this.groupNumber) {
return;
}
const step = {
over: true,
operation: menuOperate.Common.trainDrive.operation,
cmdType: menuOperate.Common.trainDrive.cmdType,
param: {
groupNumber: this.groupNumber,
param: {
speedLimit: '',
through: 0,
targetDeviceCode: ''
}
}
};
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$messageBox('Failed to set or cancel the fault!');
}
}).catch((error) => {
this.$messageBox(error.message || 'Failed to set or cancel the fault!');
});
}
}
};
</script>
<style scoped>
</style>

View File

@ -2,7 +2,7 @@
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="chengdou-03__systerm view-name" class="chengdou-03__systerm view-name"
title="名称显示设置" title="UI Control"
:visible.sync="show" :visible.sync="show"
width="320px" width="320px"
:before-close="doClose" :before-close="doClose"
@ -12,60 +12,24 @@
> >
<el-checkbox-group v-model="nameLevels"> <el-checkbox-group v-model="nameLevels">
<el-row> <el-row>
<el-col :span="10"> <el-checkbox :label="1">Signal Name</el-checkbox>
<el-checkbox :label="1">信号机名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="2">站台轨名称</el-checkbox>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-checkbox :label="11">Section Name</el-checkbox>
<el-checkbox :label="3" disabled>按钮名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox :label="4">折返轨名称</el-checkbox>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-checkbox :label="7">Turnout Name</el-checkbox>
<el-checkbox :label="5">轨道名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="6">转换轨名称</el-checkbox>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="10"> <el-checkbox :label="9">Turnout Section Name</el-checkbox>
<el-checkbox :label="7">道岔名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="8">标识灯名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="9">道岔区段名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="10">目的地名称</el-checkbox>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-checkbox :label="11">计轴区段名称</el-checkbox>
</el-col>
<el-col :span="10" :offset="4">
<el-checkbox dio :label="12">公里标</el-checkbox>
</el-col>
</el-row> </el-row>
</el-checkbox-group> </el-checkbox-group>
<el-row class="button-group"> <el-row class="button-group">
<el-col :span="6" :offset="2"> <el-col :span="6" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">Confirm</el-button>
</el-col> </el-col>
<el-col :span="4" :offset="8"> <el-col :span="4" :offset="8">
<el-button :id="domIdCancel" @click="cancel"></el-button> <el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
@ -98,6 +62,12 @@ export default {
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : ''; return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
mapData() {
return this.$store.state.map.map;
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
} }
}, },
mounted() { mounted() {
@ -136,23 +106,8 @@ export default {
}); });
}, },
commit() { 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('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.setNameDisplay(); this.setNameDisplay();
} this.doClose();
}).catch(() => {
this.loading = false;
});
}, },
setNameDisplay() { setNameDisplay() {
const deviceList = []; const deviceList = [];
@ -162,7 +117,10 @@ export default {
const signalList = this.$store.getters['map/signalList']; const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) { if (signalList && signalList.length > 0) {
signalList.forEach(elem => { signalList.forEach(elem => {
const signal = this.$store.getters['map/getDeviceByCode'](elem.code);
if (signal.instance) {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow })); deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
}
}); });
} }
@ -175,18 +133,21 @@ export default {
const switchList = this.$store.getters['map/switchList']; const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) { if (switchList && switchList.length > 0) {
switchList.forEach(elem => { switchList.forEach(elem => {
const switchD = this.$store.getters['map/getDeviceByCode'](elem.code);
if (switchD.instance) {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow })); deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
}
}); });
} }
// // //
const indicatorShow = this.nameLevels.includes(8); // const indicatorShow = this.nameLevels.includes(8);
const control = this.$store.getters['map/stationControlList']; // const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) { // if (control && control.length > 0) {
control.forEach(elem => { // control.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // // deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //
}); // });
} // }
// //
nameShow = false; nameShow = false;
@ -226,31 +187,34 @@ export default {
if (elem.transferTrack) { if (elem.transferTrack) {
transferTrackNameShow = this.nameLevels.includes(6); transferTrackNameShow = this.nameLevels.includes(6);
} }
const section = this.$store.getters['map/getDeviceByCode'](elem.code);
if (section.instance) {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow })); deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
}
}); });
} }
// //
const destCodeShow = this.nameLevels.includes(10); // const destCodeShow = this.nameLevels.includes(10);
const stopPointList = this.$store.getters['map/stopPointList']; // const stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) { // if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => { // stopPointList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow })); // deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
}); // });
} // }
// //
const kmPostShow = this.nameLevels.includes(12); // const kmPostShow = this.nameLevels.includes(12);
const stationList = this.$store.getters['map/stationList']; // const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) { // if (stationList && stationList.length > 0) {
stationList.forEach(elem => { // stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // // deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
}); // });
// }
this.$store.dispatch('map/updateMapDevices', deviceList);
} }
this.$store.dispatch('map/updateMapDevices', deviceList);
}
} }
}; };
</script> </script>

View File

@ -3,28 +3,28 @@
<div class="card" style="padding: 5px;"> <div class="card" style="padding: 5px;">
<div style="background: #999EA7;display: flex;align-items: center;"> <div style="background: #999EA7;display: flex;align-items: center;">
<div class="button-box"> <div class="button-box">
<img :src="t3Pic" class="img-button" @click.stop="activeMenu = 't3'" /> <img :src="t3Pic" class="img-button" @click.stop="activeMenu = 't3'">
<settings-menu :items="T3MenuItems" v-if="activeMenu === 't3'" @select="handleT3MenuSelect" /> <!-- <settings-menu v-if="activeMenu === 't3'" :items="T3MenuItems" @select="handleT3MenuSelect" />-->
</div> </div>
<div class="button-box"> <div class="button-box">
<img :src="panelPic" class="img-button" @click="showLineBoard" /> <img :src="panelPic" class="img-button" @click="showLineBoard">
</div> </div>
<div class="button-box"> <div class="button-box">
<img :src="trainPic" class="img-button" /> <img :src="trainPic" class="img-button">
</div> </div>
<div class="button-box"> <div class="button-box">
<img :src="linkPic" class="img-button" /> <img :src="linkPic" class="img-button">
</div> </div>
<div class="button-box"> <div class="button-box">
<img :src="cameraPic" class="img-button" /> <img :src="cameraPic" class="img-button">
</div> </div>
<div style="width: 205px;height: 36px; background: #fff;border-radius: 5px;" /> <div style="width: 205px;height: 36px; background: #fff;border-radius: 5px;" />
<div class="button-box"> <div class="button-box">
<img :src="settingPic" class="img-button" @click.stop="activeMenu = 'setting'" /> <img :src="settingPic" class="img-button" @click.stop="activeMenu = 'setting'">
<settings-menu :items="settingsMenuItems" v-if="activeMenu === 'setting'" @select="handleSettingsMenuSelect" /> <!-- <settings-menu v-if="activeMenu === 'setting'" :items="settingsMenuItems" @select="handleSettingsMenuSelect" />-->
</div> </div>
<div class="button-box"> <div class="button-box">
<img :src="shutdownPic" class="img-button" /> <img :src="shutdownPic" class="img-button">
</div> </div>
</div> </div>
</div> </div>
@ -41,26 +41,26 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex';
import { MouseEvent } from '@/scripts/ConstDic' import { MouseEvent } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo' import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import T3Pic from '@/assets/ctc_icon/t3.png' import T3Pic from '@/assets/ctc_icon/t3.png';
import TrainPic from '@/assets/ctc_icon/train.png' import TrainPic from '@/assets/ctc_icon/train.png';
import PanelPic from '@/assets/ctc_icon/panel.png' import PanelPic from '@/assets/ctc_icon/panel.png';
import LinkPic from '@/assets/ctc_icon/link.png' import LinkPic from '@/assets/ctc_icon/link.png';
import CameraPic from '@/assets/ctc_icon/camera.png' import CameraPic from '@/assets/ctc_icon/camera.png';
import SettingPic from '@/assets/ctc_icon/setting.png' import SettingPic from '@/assets/ctc_icon/setting.png';
import ShutdownPic from '@/assets/ctc_icon/shutdown.png' import ShutdownPic from '@/assets/ctc_icon/shutdown.png';
import { EventBus } from '@/scripts/event-bus' import { EventBus } from '@/scripts/event-bus';
import SettingsMenu from './components/menu.vue' import SettingsMenu from './components/menu.vue';
import BoardViewSetting from './dialog/boardViewSetting.vue' import BoardViewSetting from './dialog/boardViewSetting.vue';
import RailViewSetting from './dialog/railViewSetting.vue' import RailViewSetting from './dialog/railViewSetting.vue';
import PowerSupplyArmSetting from './dialog/powerSupplyArmSetting.vue' import PowerSupplyArmSetting from './dialog/powerSupplyArmSetting.vue';
import BlockDevice from './dialog/blockDevice' import BlockDevice from './dialog/blockDevice';
import RegionBatchOperation from './dialog/regionBatchOperation' import RegionBatchOperation from './dialog/regionBatchOperation';
import StationTrainManage from './dialog/stationTrainManage' import StationTrainManage from './dialog/stationTrainManage';
import OperationLogQuery from './dialog/operationLogQuery' import OperationLogQuery from './dialog/operationLogQuery';
import InfoDialog from './dialog/infoDialog' import InfoDialog from './dialog/infoDialog';
export default { export default {
name: 'MenuPanel', name: 'MenuPanel',
@ -74,7 +74,7 @@ export default {
RegionBatchOperation, RegionBatchOperation,
StationTrainManage, StationTrainManage,
OperationLogQuery, OperationLogQuery,
InfoDialog, InfoDialog
}, },
data() { data() {
return { return {
@ -95,7 +95,7 @@ export default {
{ {
label: '方向显示设置', label: '方向显示设置',
id: 'directionView', id: 'directionView',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }], children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }]
}, },
{ {
label: '调车参数配置', label: '调车参数配置',
@ -103,8 +103,8 @@ export default {
children: [ children: [
{ label: '标准站', id: 'Station58852' }, { label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' }, { label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' }, { label: '标准丙站', id: 'Station47980' }
], ]
}, },
{ {
label: '调车优先级配置', label: '调车优先级配置',
@ -112,8 +112,8 @@ export default {
children: [ children: [
{ label: '标准站', id: 'Station58852' }, { label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' }, { label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' }, { label: '标准丙站', id: 'Station47980' }
], ]
}, },
{ {
label: '调车规则配置', label: '调车规则配置',
@ -121,8 +121,8 @@ export default {
children: [ children: [
{ label: '标准站', id: 'Station58852' }, { label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' }, { label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' }, { label: '标准丙站', id: 'Station47980' }
], ]
}, },
{ {
label: '功能按钮设置', label: '功能按钮设置',
@ -130,15 +130,15 @@ export default {
children: [ children: [
{ label: '标准站', id: 'Station58852' }, { label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' }, { label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' }, { label: '标准丙站', id: 'Station47980' }
], ]
}, },
{ label: '站场界面显示设置', id: 'UIDisplay' }, { label: '站场界面显示设置', id: 'UIDisplay' },
{ label: '报警提示设置', id: 'alarm' }, { label: '报警提示设置', id: 'alarm' },
{ label: '版本信息', id: 'version' }, { label: '版本信息', id: 'version' }
], ],
T3MenuItems: [ T3MenuItems: [
{ label: '设置供电臂状态', id: 'powerSupplyArm', ctc: true }, { label: 'Set power arm status', id: 'powerSupplyArm', ctc: true },
{ label: '封锁设备操作', id: 'blockedDeviceOperation', ctc: true }, { label: '封锁设备操作', id: 'blockedDeviceOperation', ctc: true },
{ {
label: '区域批量设备操作', label: '区域批量设备操作',
@ -147,8 +147,8 @@ export default {
children: [ children: [
{ label: '标准站', id: 'Station58852' }, { label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' }, { label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' }, { label: '标准丙站', id: 'Station47980' }
], ]
}, },
{ {
label: '站存车管理', label: '站存车管理',
@ -157,8 +157,8 @@ export default {
children: [ children: [
{ label: '标准站', id: 'Station58852' }, { label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' }, { label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' }, { label: '标准丙站', id: 'Station47980' }
], ]
}, },
{ {
label: '设备影响分析', label: '设备影响分析',
@ -167,19 +167,19 @@ export default {
children: [ children: [
{ label: '标准站', id: 'Station58852' }, { label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' }, { label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' }, { label: '标准丙站', id: 'Station47980' }
], ]
}, },
{ label: '操作日志查询', id: 'operationLog' }, { label: '操作日志查询', id: 'operationLog' },
{ label: '防溜设置查询', id: 'antiSlipSettingQuery' }, { label: '防溜设置查询', id: 'antiSlipSettingQuery' },
{ label: '信息提示', id: 'info' }, { label: '信息提示', id: 'info' }
], ]
} };
}, },
computed: { computed: {
...mapGetters('map', ['stationList', 'sectionList']), ...mapGetters('map', ['stationList', 'sectionList']),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
createDisable() { createDisable() {
return !( return !(
@ -188,122 +188,123 @@ export default {
this.nowSectionCode && this.nowSectionCode &&
this.newTrainCode && this.newTrainCode &&
this.newTrainCode.length === 8 this.newTrainCode.length === 8
) );
}, },
updateDisable() { updateDisable() {
return !(this.newTrainCode && this.newTrainCode.length === 8) return !(this.newTrainCode && this.newTrainCode.length === 8);
}, },
moveDisable() { moveDisable() {
return !this.newSectionCode return !this.newSectionCode;
}, },
deleteDisable() { deleteDisable() {
return !this.nowTrainCode return !this.nowTrainCode;
}, }
}, },
watch: { watch: {
'$store.state.menuOperation.selectedCount': function(em) { '$store.state.menuOperation.selectedCount': function(em) {
const device = this.$store.state.menuOperation.selected const device = this.$store.state.menuOperation.selected;
if (device && device.code && device._type === 'Section') { if (device && device.code && device._type === 'Section') {
this.nowSectionCode = device.code this.nowSectionCode = device.code;
} else if (device && device.code && device._type === 'Train' && device._event === MouseEvent.Left) { } else if (device && device.code && device._type === 'Train' && device._event === MouseEvent.Left) {
this.doShow(device) this.doShow(device);
}
} }
}, },
},
mounted() { mounted() {
this.dragEvent() // 24 this.dragEvent(); // 24
window.addEventListener('click', this.closeMenus) window.addEventListener('click', this.closeMenus);
}, },
unmounted() { unmounted() {
window.removeEventListener('click', this.closeMenus) window.removeEventListener('click', this.closeMenus);
}, },
methods: { methods: {
doShow(selected) { doShow(selected) {
this.dialogShow = true this.dialogShow = true;
this.$nextTick(function() { this.$nextTick(function() {
this.dragEvent() this.dragEvent();
}) });
}, },
doClose() { doClose() {
this.loading = false this.loading = false;
this.dialogShow = false this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh') this.$store.dispatch('training/emitTipFresh');
}, },
showLineBoard() { showLineBoard() {
EventBus.$emit('showLineBoard') EventBus.$emit('showLineBoard');
}, },
closeMenus() { closeMenus() {
this.activeMenu = '' this.activeMenu = '';
}, },
handleSettingsMenuSelect(id) { handleSettingsMenuSelect(id) {
this.closeMenus() this.closeMenus();
const params = id.split('-') const params = id.split('-');
switch (params[0]) { switch (params[0]) {
case 'boardView': case 'boardView':
this.$refs.boardViewSetting.doShow() this.$refs.boardViewSetting.doShow();
break break;
case 'railView': case 'railView':
this.$refs.railViewSetting.doShow() this.$refs.railViewSetting.doShow();
break break;
} }
}, },
handleT3MenuSelect(id) { handleT3MenuSelect(id) {
this.closeMenus() console.log(id);
const params = id.split('-') this.closeMenus();
const params = id.split('-');
switch (params[0]) { switch (params[0]) {
case 'powerSupplyArm': case 'powerSupplyArm':
this.$refs.powerSupplyArmSetting.doShow() this.$refs.powerSupplyArmSetting.doShow();
break break;
case 'blockedDeviceOperation': case 'blockedDeviceOperation':
this.$refs.blockDevice.doShow() this.$refs.blockDevice.doShow();
break break;
case 'regionBatchOperation': case 'regionBatchOperation':
if (!params[1]) return if (!params[1]) return;
this.$refs.regionBatchOperation.doShow(params[1]) this.$refs.regionBatchOperation.doShow(params[1]);
break break;
case 'stationTrainManage': case 'stationTrainManage':
if (!params[1]) return if (!params[1]) return;
this.$refs.stationTrainManage.doShow(params[1]) this.$refs.stationTrainManage.doShow(params[1]);
break break;
case 'operationLog': case 'operationLog':
case 'antiSlipSettingQuery': case 'antiSlipSettingQuery':
this.$refs.operationLogQuery.doShow() this.$refs.operationLogQuery.doShow();
break break;
case 'info': case 'info':
this.$refs.infoDialog.doShow() this.$refs.infoDialog.doShow();
break break;
} }
}, },
dragEvent() { dragEvent() {
const offset = this.offset const offset = this.offset;
const dragDom = document.querySelector('#faultChoose') const dragDom = document.querySelector('#faultChoose');
dragDom.style.cursor = 'move' dragDom.style.cursor = 'move';
/** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/ /** 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);*/
const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null) const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
dragDom.onmousedown = e => { dragDom.onmousedown = e => {
/** 鼠标按下,计算当前元素距离可视区的距离*/ /** 鼠标按下,计算当前元素距离可视区的距离*/
const disX = e.clientX const disX = e.clientX;
const disY = e.clientY const disY = e.clientY;
/** 获取到的值带px 正则匹配替换*/ /** 获取到的值带px 正则匹配替换*/
let styL, styT let styL, styT;
/** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/ /** 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px*/
if (sty.left.includes('%')) { if (sty.left.includes('%')) {
// eslint-disable-next-line no-useless-escape // eslint-disable-next-line no-useless-escape
styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100) styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100);
styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100) styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100);
} else { } else {
// eslint-disable-next-line no-useless-escape // eslint-disable-next-line no-useless-escape
styL = +sty.left.replace(/\px/g, '') styL = +sty.left.replace(/\px/g, '');
// eslint-disable-next-line no-useless-escape // eslint-disable-next-line no-useless-escape
styT = +sty.top.replace(/\px/g, '') styT = +sty.top.replace(/\px/g, '');
} }
document.onmousemove = function(e) { document.onmousemove = function(e) {
/** 通过事件委托,计算移动的距离*/ /** 通过事件委托,计算移动的距离*/
const l = e.clientX - disX const l = e.clientX - disX;
const t = e.clientY - disY const t = e.clientY - disY;
/** 移动当前元素*/ /** 移动当前元素*/
// dragDom.style.left = `${l + styL}px`; // dragDom.style.left = `${l + styL}px`;
@ -311,31 +312,31 @@ export default {
/** 移动当前元素*/ /** 移动当前元素*/
if (l + styL < 0) { if (l + styL < 0) {
dragDom.style.left = `0px` dragDom.style.left = `0px`;
} else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) { } else if (l + styL > document.body.clientWidth - dragDom.clientWidth - 10) {
dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px` dragDom.style.left = `${document.body.clientWidth - dragDom.clientWidth - 10}px`;
} else { } else {
dragDom.style.left = `${l + styL}px` dragDom.style.left = `${l + styL}px`;
} }
if (t + styT <= offset) { if (t + styT <= offset) {
dragDom.style.top = offset + `px` dragDom.style.top = offset + `px`;
} else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) { } else if (t + styT > document.body.clientHeight - dragDom.clientHeight - 10) {
dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px` dragDom.style.top = `${document.body.clientHeight - dragDom.clientHeight - 10}px`;
} else { } else {
dragDom.style.top = `${t + styT}px` dragDom.style.top = `${t + styT}px`;
} }
/** 将此时的位置传出去*/ /** 将此时的位置传出去*/
// binding.value({ x: e.pageX, y: e.pageY }); // binding.value({ x: e.pageX, y: e.pageY });
} };
document.onmouseup = function() { document.onmouseup = function() {
document.onmousemove = null document.onmousemove = null;
document.onmouseup = null document.onmouseup = null;
};
};
} }
} }
}, };
},
}
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@ -55,22 +55,28 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: [ menuNormal: [
// {
// label: 'Increase the number of trips',
// handler: this.addSpare,
// cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN,
// isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
// isShow: (section, work) => ['01', '02', '03'].includes(section.type)
// },
{ {
label: '增加车次', label: 'Add Train',
handler: this.addSpare, handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN, cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork', isDisabled: (section, station, work) => station.controlMode !== 'Local' && work === 'localWork'
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
}, },
{ {
label: '分路不良', label: 'Bad split',
handler: this.forkDirective, handler: this.forkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork', isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'ctcWork' isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'ctcWork'
}, },
{ {
label: '空闲', label: 'Spare',
handler: this.cancleForkDirective, handler: this.cancleForkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork', isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
@ -79,19 +85,14 @@ export default {
], ],
menuForce: [ menuForce: [
{ {
label: '设置故障', label: 'Set faults',
handler: this.setStoppage, handler: this.setStoppage,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
{ {
label: '取消故障', label: 'Cancel faults',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
},
{
label: '设置备用车',
handler: this.loadSpare,
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
} }
] ]
}; };
@ -128,7 +129,7 @@ export default {
initMenu() { initMenu() {
// //
this.menu = []; this.menu = [];
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode); const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
this.menuNormal.forEach(menuItem => { this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, station || {}, this.work) : false; menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, station || {}, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true; menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;

View File

@ -59,7 +59,7 @@ export default {
menu: [], menu: [],
menuNormal: [ menuNormal: [
{ {
label: '办理 通过进路', label: 'Processing Passing approach',
handler: this.arrangementRoute, handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, station, work) => station.controlMode !== 'Local', isDisabled: (signal, station, work) => station.controlMode !== 'Local',
@ -70,28 +70,28 @@ export default {
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '列车 办理进路', label: 'Trains Process approach',
handler: this.arrangementRoute, handler: this.arrangementRoute,
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
isDisabled: (signal, station, work) => station.controlMode !== 'Local', isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '取消进路', label: 'Cancellation of approach',
handler: this.cancelTrainRoute, handler: this.cancelTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE,
isDisabled: (signal, station, work) => station.controlMode !== 'Local', isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '信号重开', label: 'Signal reopening',
handler: this.reopenSignal, handler: this.reopenSignal,
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL,
isDisabled: (signal, station, work) => station.controlMode !== 'Local', isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '封锁/解封', label: 'Blocking/unblocking',
handler: this.lockOrUnlock, handler: this.lockOrUnlock,
cmdType: '', cmdType: '',
isDisabled: (signal, station, work) => station.controlMode !== 'Local', isDisabled: (signal, station, work) => station.controlMode !== 'Local',
@ -100,7 +100,7 @@ export default {
}, },
{ {
label: '总人解', label: 'Master unblock',
handler: this.humanTrainRoute, handler: this.humanTrainRoute,
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE,
isDisabled: (signal, station, work) => station.controlMode !== 'Local', isDisabled: (signal, station, work) => station.controlMode !== 'Local',
@ -111,14 +111,14 @@ export default {
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '引导', label: 'Guiding',
handler: this.guide, handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
isDisabled: (signal, station, work) => station.controlMode !== 'Local', isDisabled: (signal, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '坡道解锁', label: 'Ramp unlocking',
handler: '', handler: '',
cmdType: '', cmdType: '',
isDisabled: (signal, station, work) => station.controlMode !== 'Local', isDisabled: (signal, station, work) => station.controlMode !== 'Local',
@ -127,12 +127,12 @@ export default {
], ],
menuForce: [ menuForce: [
{ {
label: '设置故障', label: 'Set faults',
handler: this.setStoppage, handler: this.setStoppage,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
{ {
label: '取消故障', label: 'Cancel faults',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
} }

View File

@ -54,15 +54,15 @@ export default {
menuNormal: [], menuNormal: [],
menuForce: [ menuForce: [
{ {
label: '设置ZC故障', label: 'Set ZC fault',
handler: this.setStoppage handler: this.setStoppage
}, },
{ {
label: '取消ZC故障', label: 'Cancel ZC fault',
handler: this.cancelStoppage handler: this.cancelStoppage
}, },
{ {
label: '重启联锁机', label: 'Restart interlocking level',
handler: this.restartInterlock, handler: this.restartInterlock,
cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE cmdType: CMD.Station.CMD_STATION_RESTART_INTERLOCK_MACHINE
} }

View File

@ -42,12 +42,12 @@ export default {
menuNormal: [], menuNormal: [],
menuForce: [ menuForce: [
{ {
label: '设置故障', label: 'Set faults',
handler: this.setStoppage, handler: this.setStoppage,
cmdType: CMD.Stand.CMD_STAND_ADD_FAULT cmdType: CMD.Stand.CMD_STAND_ADD_FAULT
}, },
{ {
label: '取消故障', label: 'Cancel faults',
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT cmdType: CMD.Stand.CMD_STAND_REMOVE_FAULT
} }

View File

@ -65,77 +65,77 @@ export default {
menu: [], menu: [],
menuNormal: [ menuNormal: [
{ {
label: '定操', label: 'Directional operations',
handler: this.locate, handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '反操', label: 'Reverse operation',
handler: this.reverse, handler: this.reverse,
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '单锁', label: 'Individually locked',
handler: this.lock, handler: this.lock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '单解', label: 'Individually unlocked',
handler: this.unlock, handler: this.unlock,
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '道岔钩锁', label: 'Turnout hook lock',
handler: this.hookLock, handler: this.hookLock,
cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK, cmdType: CMD.Switch.CMD_SWITCH_HOOK_LOCK,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '封锁/解封', label: 'Blocking/unblocking',
handler: this.blockOrUnblock, handler: this.blockOrUnblock,
cmdType: CMD.Switch.CMD_SWITCH_BLOCK, cmdType: CMD.Switch.CMD_SWITCH_BLOCK,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '区故解', label: 'Zone fault release',
handler: this.fault, handler: this.fault,
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK,
isDisabled: (_section, station, work) => station.controlMode !== 'Local', isDisabled: (_section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '岔前 分路不良', label: 'Poor switchback split',
handler: this.beforeForkDirective, handler: this.beforeForkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '定位 分路不良', label: 'Poor normal split',
handler: this.locateForkDirective, handler: this.locateForkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '反位 分路不良', label: 'Poor reverse split',
handler: this.reverseForkDirective, handler: this.reverseForkDirective,
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING, cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
isShow: (section, work) => work === 'ctcWork' isShow: (section, work) => work === 'ctcWork'
}, },
{ {
label: '空闲', label: 'Leisure',
handler: this.cancleForkDirective, handler: this.cancleForkDirective,
cmdType: CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING, cmdType: CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING,
isDisabled: (section, station, work) => station.controlMode !== 'Local', isDisabled: (section, station, work) => station.controlMode !== 'Local',
@ -174,11 +174,11 @@ export default {
], ],
menuForce: [ menuForce: [
{ {
label: '设置故障', label: 'Set faults',
handler: this.setStoppage handler: this.setStoppage
}, },
{ {
label: '取消故障', label: 'Cancel faults',
handler: this.cancelStoppage handler: this.cancelStoppage
} }
] ]
@ -216,7 +216,7 @@ export default {
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') { if (!this.$store.state.scriptRecord.bgSet || this.$store.state.scriptRecord.userRole == 'STATION_SWITCH_MAN') {
const menuHook = [{ const menuHook = [{
label: '道岔钩锁', label: 'Turnout hook lock',
handler: this.hookLock handler: this.hookLock
}]; }];
this.menu = [...this.menuForce, ...menuHook]; this.menu = [...this.menuForce, ...menuHook];
@ -381,8 +381,8 @@ export default {
}, },
undeveloped() { undeveloped() {
this.doClose(); this.doClose();
this.$alert('实现中......', '提示', { this.$alert('In implementation......', 'Hint', {
confirmButtonText: '确定', confirmButtonText: 'Confirm',
callback: action => { callback: action => {
} }
}); });

View File

@ -59,69 +59,59 @@ export default {
menu: [], menu: [],
menuNormal: [ menuNormal: [
{ {
label: '变更车次号', label: 'Remove train number',
handler: this.modifyTripNumber,
cmdType: CMD.Train.CMD_TRAIN_UPDATE_TRIP_NUMBER_TRAIN
},
{
label: '删车次号',
handler: this.removeTripNumber, handler: this.removeTripNumber,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE, cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
isShow: (train, work) => work === 'localWork' || work === 'ctcWork' isDisabled: (section, station, work) => station.controlMode !== 'Local' && work === 'localWork',
}, isShow: (train, work) => work === 'localWork' || work === 'dispatchWork'
{
label: '换端',
handler: this.turnDirection,
cmdType: CMD.Train.CMD_TRAIN_REMOVE_TRAIN_TRACE,
isShow: (train, work) => work === 'localWork' || work === 'ctcWork'
} }
], ],
menuForce: [ menuForce: [
{ {
label: '设置故障', label: 'Set faults',
handler: this.setStoppage handler: this.setStoppage
}, },
{ {
label: '取消故障', label: 'Cancel faults',
handler: this.cancelStoppage handler: this.cancelStoppage
} }
], ],
menuDirective: [ menuDirective: [
{ {
label: '切换驾驶模式', label: 'Change driving mode',
children: [ children: [
{ {
label: '转AM-C模式', label: 'Change to AM-C mode',
handler: this.handlerApplyAmcMode handler: this.handlerApplyAmcMode
}, },
{ {
label: '转SM-C模式', label: 'Change to SM-C mode',
handler: this.handlerApplySmcMode handler: this.handlerApplySmcMode
}, },
{ {
label: '转AM-I模式', label: 'Change to AM-I mode',
handler: this.handlerApplyAmiMode handler: this.handlerApplyAmiMode
}, },
{ {
label: '转SM-I模式', label: 'Change to SM-I mode',
handler: this.handlerApplySmiMode handler: this.handlerApplySmiMode
}, },
{ {
label: '转RM模式', label: 'Change to RM mode',
handler: this.handlerApplyRmMode handler: this.handlerApplyRmMode
} }
] ]
}, },
{ {
label: '驾驶', label: 'Driving',
handler: this.handleDriveTo handler: this.handleDriveTo
}, },
{ {
label: '换端', label: 'Change end',
handler: this.turnDirection handler: this.turnDirection
}, },
{ {
label: '停车', label: 'Stop',
handler: this.handleParkingTrain handler: this.handleParkingTrain
} }
] ]
@ -150,15 +140,23 @@ export default {
}, },
'$store.state.menuOperation.selected': function (val) { '$store.state.menuOperation.selected': function (val) {
if (val._type === 'Train' && val._event === MouseEvent.Left && this.project === 'thailandsandbox') { if (val._type === 'Train' && val._event === MouseEvent.Left && this.project === 'thailandsandbox') {
if (this.work === 'localWork') {
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
if (station && station.controlMode === 'Local') {
this.$refs.trainOperation.doShow(val); this.$refs.trainOperation.doShow(val);
} }
} else {
this.$refs.trainOperation.doShow(val);
}
}
} }
}, },
methods: { methods: {
initMenu() { initMenu() {
// //
this.menu = []; this.menu = [];
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode); const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
this.menuNormal.forEach(menuItem => { this.menuNormal.forEach(menuItem => {
menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, station || {}, this.work) : false; menuItem.disabled = menuItem.isDisabled ? menuItem.isDisabled(this.selected, station || {}, this.work) : false;
menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true; menuItem.show = menuItem.isShow ? menuItem.isShow(this.selected, this.work) : true;
@ -405,8 +403,8 @@ export default {
}, },
undeveloped() { undeveloped() {
this.doClose(); this.doClose();
this.$alert('实现中......', '提示', { this.$alert('In implementation......', 'Hint', {
confirmButtonText: '确定', confirmButtonText: 'Confirm',
callback: action => { callback: action => {
} }
}); });

View File

@ -45,31 +45,31 @@
</div> </div>
<div class="runplanMenuButton"> <div class="runplanMenuButton">
<div class="runplanLine" /> <div class="runplanLine" />
<div class="rpDispacherCommand runplanClickBtn" :class="{flicker: hasCommandMsg, redFlick: hasCommandMsg}" @click="showCmdManage">调度命令</div> <div class="rpDispacherCommand runplanClickBtn" :class="{flicker: hasCommandMsg, redFlick: hasCommandMsg}" @click="showCmdManage">Scheduling order</div>
<div class="runplanBtnGroup"> <div class="runplanBtnGroup">
<div id="stageRunplan" class="runplanClickBtn" @click="stageRunplan">阶段计划(F8)</div> <div id="stageRunplan" class="runplanClickBtn" @click="stageRunplan">Phase plan(F8)</div>
<div id="sendRunplan" class="runplanClickBtn" @click="sendRunplan">发送计划</div> <div id="sendRunplan" class="runplanClickBtn" @click="sendRunplan">Sending plan</div>
<div class="runplanClickBtn">阶段记事</div> <div class="runplanClickBtn">Stage record</div>
</div> </div>
<div class="runplanStatusGroup"> <div class="runplanStatusGroup">
<div class="eachRunplanStatus">{{ dateString1 + ' ' + time }}</div> <div class="eachRunplanStatus">{{ dateString1 + ' ' + time }}</div>
<div class="eachRunplanStatus">与中心通信正常</div> <div class="eachRunplanStatus">Communication with the centre is normal</div>
<div class="eachRunplanStatus">与车站服务器通信正常</div> <div class="eachRunplanStatus">Communication with the station server is normal</div>
</div> </div>
</div> </div>
<div class="runplanContent"> <div class="runplanContent">
<div class="runplanContentL"> <div class="runplanContentL">
<div class="runplanVLine" /> <div class="runplanVLine" />
<div class="runplanContentLIn"> <div class="runplanContentLIn">
<div class="runplanContentBtn" @click="sendNotcie">预告(F1)</div> <div class="runplanContentBtn" @click="sendNotcie">Foretell(F1)</div>
<div class="runplanContentBtn" @click="agreeNotcie">同意(F2)</div> <div class="runplanContentBtn" @click="agreeNotcie">Agreed(F2)</div>
<div class="runplanContentBtn">到达(F3)</div> <div class="runplanContentBtn">Arrive(F3)</div>
<div class="runplanContentBtn">出发(F4)</div> <div class="runplanContentBtn">Depart(F4)</div>
<div class="runplanContentBtn">通过(F11)</div> <div class="runplanContentBtn">Passed(F11)</div>
<div class="runplanContentBtn">邻站(F6)</div> <div class="runplanContentBtn">Neighbouring station(F6)</div>
<div class="runplanContentBtn" @click="cancleArrive">取消接车(Esc)</div> <div class="runplanContentBtn" @click="cancleArrive">Cancellation of pick-up(Esc)</div>
<div class="runplanContentBtn" @click="cancleBlock">取消闭塞(F6)</div> <div class="runplanContentBtn" @click="cancleBlock">Cancellation of blocking(F6)</div>
<div class="runplanContentBtn" @click="cancleDepature">取消发车(F7)</div> <div class="runplanContentBtn" @click="cancleDepature">Cancellation of departure(F7)</div>
</div> </div>
</div> </div>
<div class="runplanContentR"> <div class="runplanContentR">
@ -78,7 +78,7 @@
ref="runplanContentTable" ref="runplanContentTable"
:data="tableData" :data="tableData"
border border
height="695" height="540"
highlight-current-row highlight-current-row
:row-class-name="judgeColor" :row-class-name="judgeColor"
style="width: 100%;border:1px #ccc solid" style="width: 100%;border:1px #ccc solid"
@ -93,15 +93,15 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div :class="scope.row.twinkle?'flashTrip noChange':'noChange'" style="color:#000"> <div :class="scope.row.twinkle?'flashTrip noChange':'noChange'" style="color:#000">
{{ scope.row.tripNumber }} {{ scope.row.status==-1?'()':scope.row.twinkle?'(*)':scope.row.keyTrains?'()':'' }} {{ scope.row.tripNumber }} {{ scope.row.status==-1?'(Delete)':scope.row.twinkle?'(*)':scope.row.keyTrains?'(Again)':'' }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到 达"> <el-table-column label="Arrive">
<el-table-column label="列 车 车 次" style="text-align:center"> <el-table-column label="Train number" style="text-align:center">
<el-table-column width="80" prop="arriveRunPlan.down"> <el-table-column width="80" prop="arriveRunPlan.down">
<template slot="header"> <template slot="header">
<div class="runplanTableTname"><br><br>&nbsp;</div> <div class="runplanTableTname">Downbound<br>&nbsp;</div>
<div class="runplanTableNo">1</div> <div class="runplanTableNo">1</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -110,7 +110,7 @@
</el-table-column> </el-table-column>
<el-table-column width="80" prop="arriveRunPlan.up"> <el-table-column width="80" prop="arriveRunPlan.up">
<template slot="header"> <template slot="header">
<div class="runplanTableTname"><br><br>&nbsp;</div> <div class="runplanTableTname">Upbound<br>&nbsp;</div>
<div class="runplanTableNo">2</div> <div class="runplanTableNo">2</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -120,7 +120,7 @@
</el-table-column> </el-table-column>
<el-table-column width="155" prop="arriveRunPlan.accessName"> <el-table-column width="155" prop="arriveRunPlan.accessName">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanTwo2Level"><br><br><br></div> <div class="runplanTableTname runplanTwo2Level">Pickup<br>port<br></div>
<div class="runplanTableNo">3</div> <div class="runplanTableNo">3</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -129,7 +129,7 @@
</el-table-column> </el-table-column>
<el-table-column width="60" prop="arriveRunPlan.sectionCode"> <el-table-column width="60" prop="arriveRunPlan.sectionCode">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanTwo1Level"><br><br><br></div> <div class="runplanTableTname runplanTwo1Level">Pickup<br>strand</div>
<div class="runplanTableNo">4</div> <div class="runplanTableNo">4</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -151,14 +151,15 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="时 分"> <el-table-column label="Time">
<el-table-column width="70" prop="arriveRunPlan.adjacentMessage"> <el-table-column width="70" prop="arriveRunPlan.adjacentMessage">
<template slot="header"> <template slot="header">
<div class="runplanTableTname"> <div class="runplanTableTname">
<div class="runplanThreeLevel"><span style="margin-left:5px;"></span></div> <div class="runplanThreeLevel">Agree<span style="margin-left:5px;">Departure from neighbouring stations</span></div>
<div class="runplanThreeLevel"><span style="margin-left: 21px;"></span></div> <!-- <div class="runplanThreeLevel"><span style="margin-left:5px;"></span></div>-->
<div class="runplanThreeLevel"><span style="margin-left: 21px;"></span></div> <!-- <div class="runplanThreeLevel"><span style="margin-left: 21px;"></span></div>-->
<div class="runplanThreeLevel"><span style="margin-left:5px;"></span></div> <!-- <div class="runplanThreeLevel"><span style="margin-left: 21px;"></span></div>-->
<!-- <div class="runplanThreeLevel"><span style="margin-left:5px;"></span></div>-->
</div> </div>
<div class="runplanTableNo">5</div> <div class="runplanTableNo">5</div>
</template> </template>
@ -170,14 +171,14 @@
</el-table-column> </el-table-column>
<el-table-column width="70" prop="arriveRunPlan.adjacentDepart"> <el-table-column width="70" prop="arriveRunPlan.adjacentDepart">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"><br><br><br></div> <div class="runplanTableTname runplanThreeLevel">Departure from neighbouring stations</div>
<div class="runplanTableNo">6</div> <div class="runplanTableNo">6</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本站到达" style="height:30px"> <el-table-column label="Arrival at this station" style="height:30px">
<el-table-column width="70" prop="arriveRunPlan.planTime"> <el-table-column width="70" prop="arriveRunPlan.planTime">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanFourLevel"><br></div> <div class="runplanTableTname runplanFourLevel">Regulations</div>
<div class="runplanTableNo">7</div> <div class="runplanTableNo">7</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -186,7 +187,7 @@
</el-table-column> </el-table-column>
<el-table-column width="70" prop="arriveRunPlan.actualTime"> <el-table-column width="70" prop="arriveRunPlan.actualTime">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanFourLevel"><br></div> <div class="runplanTableTname runplanFourLevel">Actual</div>
<div class="runplanTableNo">8</div> <div class="runplanTableNo">8</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -197,30 +198,30 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="摘 车 辆 数"> <el-table-column label="Number of vehicles picked">
<el-table-column label="运用车"> <el-table-column label="Operating vehicles">
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanFourLevel"><br></div> <div class="runplanTableTname runplanFourLevel">Heavy vehicles</div>
<div class="runplanTableNo">9</div> <div class="runplanTableNo">9</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanFourLevel"><br></div> <div class="runplanTableTname runplanFourLevel">Empty</div>
<div class="runplanTableNo">10</div> <div class="runplanTableNo">10</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"><br><br><br></div> <div class="runplanTableTname runplanThreeLevel">Non-operational</div>
<div class="runplanTableNo">11</div> <div class="runplanTableNo">11</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<div class="runplanTableTname" style="line-height: 40px;"><br></div> <div class="runplanTableTname" style="line-height: 40px;">Guarded vehicles</div>
<div class="runplanTableNo">12</div> <div class="runplanTableNo">12</div>
</template> </template>
</el-table-column> </el-table-column>
@ -229,43 +230,45 @@
<template slot="header"> <template slot="header">
<div class="runplanTableTname"> <div class="runplanTableTname">
<!-- 占用区间<br>凭证号码 --> <!-- 占用区间<br>凭证号码 -->
<div class="runplanTwo1Level"><span style="margin-left:5px;"></span></div> <div class="runplanTwo1Level">Occupancy<span style="margin-left:5px;">Voucher number</span></div>
<div class="runplanTwo1Level"><span style="margin-left:5px;"></span></div> <!-- <div class="runplanTwo1Level"><span style="margin-left:5px;"></span></div>-->
<div class="runplanTwo1Level"><span style="margin-left:5px;"></span></div> <!-- <div class="runplanTwo1Level"><span style="margin-left:5px;"></span></div>-->
<div class="runplanTwo1Level"><span style="margin-left:5px;"> </span></div> <!-- <div class="runplanTwo1Level"><span style="margin-left:5px;"></span></div>-->
<!-- <div class="runplanTwo1Level"><span style="margin-left:5px;"> </span></div>-->
</div> </div>
<div class="runplanTableNo">13</div> <div class="runplanTableNo">13</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="电 话 记 录 号 码"> <el-table-column label="Phone Record Number">
<el-table-column width="70"> <el-table-column width="70">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"><br><br><br></div> <div class="runplanTableTname runplanThreeLevel">Acknowledgement of blocking</div>
<div class="runplanTableNo">14</div> <div class="runplanTableNo">14</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="70"> <el-table-column width="70">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"> <div class="runplanTableTname runplanThreeLevel">
<div class="runplanThreeLevel"><span style="margin-left:11px;"></span></div> <div class="runplanThreeLevel">Train arrives to make up the return</div>
<div class="runplanThreeLevel"><span style="margin-left:11px;"></span></div> <!-- <div class="runplanThreeLevel"><span style="margin-left:11px;"></span></div>-->
<div class="runplanThreeLevel"><span style="margin-left:11px;"></span></div> <!-- <div class="runplanThreeLevel"><span style="margin-left:11px;"></span></div>-->
<div class="runplanThreeLevel"><span style="margin-left:11px;"></span></div> <!-- <div class="runplanThreeLevel"><span style="margin-left:11px;"></span></div>-->
<!-- <div class="runplanThreeLevel"><span style="margin-left:11px;"></span></div>-->
</div> </div>
<div class="runplanTableNo">15</div> <div class="runplanTableNo">15</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="70"> <el-table-column width="70">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"><br><br><br></div> <div class="runplanTableTname runplanThreeLevel">Cancel<br>blockage</div>
<div class="runplanTableNo">16</div> <div class="runplanTableNo">16</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="70"> <el-table-column width="70">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"> <div class="runplanTableTname runplanThreeLevel">
<div style="width:16px;float:left;line-height: 13px;margin-left: 13px;margin-top: 3px;">出站 -跟踪 -</div> <div style="width:50px;float:left;line-height: 13px;margin-left: 13px;margin-top: 3px;">Tracking and shunting</div>
<div style="width: 16px;display:inline-block;line-height:20px;"><br><br><br></div> <!-- <div style="width: 16px;display:inline-block;line-height:20px;"><br><br><br></div>-->
</div> </div>
<div class="runplanTableNo">17</div> <div class="runplanTableNo">17</div>
</template> </template>
@ -273,19 +276,19 @@
<el-table-column width="70"> <el-table-column width="70">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"> <div class="runplanTableTname runplanThreeLevel">
<div style="width:16px;float:left;line-height: 13px;margin-left: 13px;margin-top: 3px;">出站 -跟踪 -</div> <div style="width:50px;float:left;line-height: 13px;margin-left: 13px;margin-top: 3px;">Battle tracking completed</div>
<div style="width: 16px;display:inline-block;line-height:20px;">调车完毕</div> <!-- <div style="width: 16px;display:inline-block;line-height:20px;">调车完毕</div>-->
</div> </div>
<div class="runplanTableNo">18</div> <div class="runplanTableNo">18</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label=" 出 发 "> <el-table-column label=" Depart ">
<el-table-column label="列 车 车 次" style="text-align:center"> <el-table-column label="Train number" style="text-align:center">
<el-table-column width="80" prop="departRunPlan.down"> <el-table-column width="80" prop="departRunPlan.down">
<template slot="header"> <template slot="header">
<div class="runplanTableTname"><br><br>&nbsp;</div> <div class="runplanTableTname">Downbound<br>&nbsp;</div>
<div class="runplanTableNo">19</div> <div class="runplanTableNo">19</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -294,7 +297,7 @@
</el-table-column> </el-table-column>
<el-table-column width="80" prop="departRunPlan.up"> <el-table-column width="80" prop="departRunPlan.up">
<template slot="header"> <template slot="header">
<div class="runplanTableTname"><br><br>&nbsp;</div> <div class="runplanTableTname">Upbound<br>&nbsp;</div>
<div class="runplanTableNo">20</div> <div class="runplanTableNo">20</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -304,7 +307,7 @@
</el-table-column> </el-table-column>
<el-table-column width="60" prop="departRunPlan.sectionCode"> <el-table-column width="60" prop="departRunPlan.sectionCode">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanTwo1Level"><br><br><br></div> <div class="runplanTableTname runplanTwo1Level">Starting strand</div>
<div class="runplanTableNo">21</div> <div class="runplanTableNo">21</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -327,21 +330,22 @@
</el-table-column> </el-table-column>
<el-table-column width="155" prop="departRunPlan.accessName"> <el-table-column width="155" prop="departRunPlan.accessName">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanTwo2Level"><br><br><br></div> <div class="runplanTableTname runplanTwo2Level">Departure<br>port<br></div>
<div class="runplanTableNo">22</div> <div class="runplanTableNo">22</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.departRunPlan" class="noChange" :title="mapStationDirectionData[scope.row.departRunPlan.accessName].name">{{ mapStationDirectionData[scope.row.departRunPlan.accessName].name }}</div> <div v-if="scope.row.departRunPlan" class="noChange" :title="mapStationDirectionData[scope.row.departRunPlan.accessName].name">{{ mapStationDirectionData[scope.row.departRunPlan.accessName].name }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="时 分"> <el-table-column label="Time">
<el-table-column width="70" prop="departRunPlan.adjacentMessage"> <el-table-column width="70" prop="departRunPlan.adjacentMessage">
<template slot="header"> <template slot="header">
<div class="runplanTableTname"> <div class="runplanTableTname">
<div class="runplanThreeLevel"><span style="margin-left:5px;"></span></div> <div class="runplanThreeLevel">Neighbor consent<span style="margin-left:5px;">Depart</span></div>
<div class="runplanThreeLevel"><span style="margin-left: 21px;" /></div> <!-- <div class="runplanThreeLevel"><span style="margin-left:5px;"></span></div>-->
<div class="runplanThreeLevel"><span style="margin-left: 21px;" /></div> <!-- <div class="runplanThreeLevel"><span style="margin-left: 21px;" /></div>-->
<div class="runplanThreeLevel"><span style="margin-left:5px;"></span></div> <!-- <div class="runplanThreeLevel"><span style="margin-left: 21px;" /></div>-->
<!-- <div class="runplanThreeLevel"><span style="margin-left:5px;"></span></div>-->
</div> </div>
<div class="runplanTableNo">23</div> <div class="runplanTableNo">23</div>
</template> </template>
@ -353,14 +357,14 @@
</el-table-column> </el-table-column>
<el-table-column width="70" prop="departRunPlan.adjacentDepart"> <el-table-column width="70" prop="departRunPlan.adjacentDepart">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"><br><br><br></div> <div class="runplanTableTname runplanThreeLevel">Adjacent<br>station<br>arrival</div>
<div class="runplanTableNo">24</div> <div class="runplanTableNo">24</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本站出发" style="height:30px"> <el-table-column label="Departure from the station" style="height:30px">
<el-table-column width="70" prop="departRunPlan.planTime"> <el-table-column width="70" prop="departRunPlan.planTime">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanFourLevel"><br></div> <div class="runplanTableTname runplanFourLevel">Regulations</div>
<div class="runplanTableNo">25</div> <div class="runplanTableNo">25</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -369,7 +373,7 @@
</el-table-column> </el-table-column>
<el-table-column width="70" prop="departRunPlan.actualTime"> <el-table-column width="70" prop="departRunPlan.actualTime">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanFourLevel"><br></div> <div class="runplanTableTname runplanFourLevel">Actual</div>
<div class="runplanTableNo">26</div> <div class="runplanTableNo">26</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -380,30 +384,30 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="挂 车 辆 数"> <el-table-column label="Number of trains">
<el-table-column label="运用车"> <el-table-column label="Operating vehicles">
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanFourLevel"><br></div> <div class="runplanTableTname runplanFourLevel">Heavy<br>vehicles</div>
<div class="runplanTableNo">27</div> <div class="runplanTableNo">27</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanFourLevel"><br></div> <div class="runplanTableTname runplanFourLevel">Empty</div>
<div class="runplanTableNo">28</div> <div class="runplanTableNo">28</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanThreeLevel"><br><br><br></div> <div class="runplanTableTname runplanThreeLevel">Non-operational</div>
<div class="runplanTableNo">29</div> <div class="runplanTableNo">29</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<div class="runplanTableTname" style="line-height: 40px;"><br></div> <div class="runplanTableTname" style="line-height: 40px;">Guarded vehicles</div>
<div class="runplanTableNo">30</div> <div class="runplanTableNo">30</div>
</template> </template>
</el-table-column> </el-table-column>
@ -413,19 +417,18 @@
<template slot="header"> <template slot="header">
<div class="runplanTableTname"> <div class="runplanTableTname">
<!-- 列车停站超过规定时间原因 --> <!-- 列车停站超过规定时间原因 -->
<div class="runplanOneLevel"><span style="margin-left:5px;"></span></div> <div class="runplanOneLevel">Train<span style="margin-left:5px;">Regulations</span></div>
<div class="runplanOneLevel"><span style="margin-left: 5px;"></span></div> <div class="runplanOneLevel">Stop<span style="margin-left: 5px;">Time</span></div>
<div class="runplanOneLevel"><span style="margin-left: 5px;"></span></div> <div class="runplanOneLevel">Exceed<span style="margin-left:5px;">Reason</span></div>
<div class="runplanOneLevel"><span style="margin-left:5px;"></span></div>
<div class="runplanOneLevel"><span style="margin-left:5px;"></span></div>
<div class="runplanOneLevel"><span style="margin-left:5px;"></span></div>
</div> </div>
<div class="runplanTableNo">31</div> <div class="runplanTableNo">31</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="70" prop="planProperties"> <el-table-column width="70" prop="planProperties">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanTwo2Level"><br><br><br></div> <div class="runplanTableTname runplanTwo2Level">
Program<br>properties
</div>
<div class="runplanTableNo">32</div> <div class="runplanTableNo">32</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -434,13 +437,13 @@
</el-table-column> </el-table-column>
<el-table-column width="70"> <el-table-column width="70">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanTwo3Level"><br><br></div> <div class="runplanTableTname runplanTwo3Level">Notation<br></div>
<div class="runplanTableNo">33</div> <div class="runplanTableNo">33</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="90" prop="transfinite"> <el-table-column width="90" prop="transfinite">
<template slot="header"> <template slot="header">
<div class="runplanTableTname runplanTwo3Level"><br><br></div> <div class="runplanTableTname runplanTwo3Level">Overrun<br></div>
<div class="runplanTableNo">33</div> <div class="runplanTableNo">33</div>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
@ -464,37 +467,37 @@
</el-table> </el-table>
<div v-show="rpMenuPopShow" class="rpMenuPopOut" @click="closeRpMenu"> <div v-show="rpMenuPopShow" class="rpMenuPopOut" @click="closeRpMenu">
<div class="rpMenuPop" :style="{'top':rpMenuPopTop+'px'}"> <div class="rpMenuPop" :style="{'top':rpMenuPopTop+'px'}">
<div class="eachRpMenu">上报到达点</div> <div class="eachRpMenu">Reporting point of arrival</div>
<div class="eachRpMenu">上报出发点</div> <div class="eachRpMenu">Report to the starting point</div>
<div class="eachRpMenu">上报通过点</div> <div class="eachRpMenu">Report through point</div>
<div class="eachRpMenu" @click="setStartRunplan"> <div class="eachRpMenu" @click="setStartRunplan">
<span v-if="startRunplan" class="eachRpMenuSelect"></span> <span v-if="startRunplan" class="eachRpMenuSelect"></span>
<span>为始发车</span> <span>Is the starting train</span>
</div> </div>
<div class="eachRpMenu" @click="setEndRunplan"> <div class="eachRpMenu" @click="setEndRunplan">
<span v-if="endRunplan" class="eachRpMenuSelect"></span> <span v-if="endRunplan" class="eachRpMenuSelect"></span>
<span>为终到车</span> <span>Is the last train</span>
</div> </div>
<div class="eachRpSep" /> <div class="eachRpSep" />
<div class="eachRpMenu">上报速报信息</div> <div class="eachRpMenu">Report quick information</div>
<div class="eachRpMenu" @click="modifyTripNumber">修改车次号</div> <div class="eachRpMenu" @click="modifyTripNumber">Change the train number</div>
<div class="eachRpMenu" @click="modifyAdjacentStation">修改相关邻站</div> <div class="eachRpMenu" @click="modifyAdjacentStation">Modify the related neighbor station</div>
<!-- <div class="eachRpMenu" @click="deleteRunplan">删除</div> --> <!-- <div class="eachRpMenu" @click="deleteRunplan">删除</div> -->
<!-- setDeleteRunplanLabel --> <!-- setDeleteRunplanLabel -->
<div class="eachRpSep" /> <div class="eachRpSep" />
<div class="eachRpMenu" @click="clearFlash">清除闪烁</div> <div class="eachRpMenu" @click="clearFlash">Clear flicker</div>
<div class="eachRpMenu">全体信息</div> <div class="eachRpMenu">Overall information</div>
<div class="eachRpSep" /> <div class="eachRpSep" />
<div class="eachRpMenu" @click="modifyTrainRunplan">修改列车</div> <div class="eachRpMenu" @click="modifyTrainRunplan">Modified train</div>
<div class="eachRpMenu" @click="setKeyTrains">设置取消重点列车</div> <div class="eachRpMenu" @click="setKeyTrains">Set up and cancel key trains</div>
<div class="eachRpMenu" @click="deleteRunplan">设置删除标识</div> <div class="eachRpMenu" @click="deleteRunplan">Set delete flag</div>
<div class="eachRpMenu" @click="setTrackDiscordant"> <div class="eachRpMenu" @click="setTrackDiscordant">
<span v-if="trackDiscordant" class="eachRpMenuSelect"></span> <span v-if="trackDiscordant" class="eachRpMenuSelect"></span>
<span>允许股道与基本路径不一致</span> <span>Allow the stock path to be inconsistent with the base path</span>
</div> </div>
<div class="eachRpMenu" @click="setEntryOutDiscordant"> <div class="eachRpMenu" @click="setEntryOutDiscordant">
<span v-if="entryOutDiscordant" class="eachRpMenuSelect"></span> <span v-if="entryOutDiscordant" class="eachRpMenuSelect"></span>
<span>允许出入口与基本路径不一致</span> <span>The allowed entry and exit are inconsistent with the base path</span>
</div> </div>
</div> </div>
</div> </div>
@ -506,7 +509,7 @@
<div class="runplanBottomLLine" /> <div class="runplanBottomLLine" />
<div class="runplanBottomIn"> <div class="runplanBottomIn">
<div class="runplanBottomL"> <div class="runplanBottomL">
<div class="runplanBottomLTitle">与调度台的信息</div> <div class="runplanBottomLTitle">Information with the dispatch desk</div>
<div class="runplanBottomLIn"> <div class="runplanBottomLIn">
<div class="runplanBottomLInM"> <div class="runplanBottomLInM">
<!-- <div class="runplanMessage" style="color:#db2312">casco下达新阶段计划 22:30</div> --> <!-- <div class="runplanMessage" style="color:#db2312">casco下达新阶段计划 22:30</div> -->
@ -515,28 +518,28 @@
</div> </div>
</div> </div>
<div class="runplanBottomC"> <div class="runplanBottomC">
<div class="runplanBottomCTitle">键盘输入区</div> <div class="runplanBottomCTitle">Keyboard input area</div>
<div class="runplanBottomCIn"> <div class="runplanBottomCIn">
<div class="runplanBottomCInT"> <div class="runplanBottomCInT">
[HOME]复位 类型0股道 1预告 2同意邻站发车 3到达 4出发 5出发机车号码 6取消同意邻站发车 7取消发车 8记事 9邻站同意发车 10邻站出发 11邻站到达 12接车线别 13发车线别 14通过 [HOME]Reset Type0Strand 1Foretell 2Agreed departure from neighbouring stations 3Arrive 4Depart 5Departure locomotive number 6Cancel permission for adjacent station to depart 7Cancel a train 8Notation 9The neighboring station agreed to depart 10Departure from neighbouring station 11Adjacent station arrival 12Pick-up line 13Different starting line 14Pass
</div> </div>
<div class="runplanBottomCInB"> <div class="runplanBottomCInB">
<div class="runplanBottomCInB1"> <div class="runplanBottomCInB1">
<div style="width:15%" class="runplanBottomCInB1in"> <div style="width:15%" class="runplanBottomCInB1in">
<div>车次</div> <div>Train Number</div>
<input type="text" style="height:20px;width: 100%;"> <input type="text" style="height:20px;width: 100%;">
</div> </div>
<div style="width:10%" class="runplanBottomCInB1in"> <div style="width:10%" class="runplanBottomCInB1in">
<div>类型</div> <div>Type</div>
<input type="text" style="height:20px;width: 100%;"> <input type="text" style="height:20px;width: 100%;">
</div> </div>
<div style="width:73%" class="runplanBottomCInB1in"> <div style="width:73%" class="runplanBottomCInB1in">
<div>内容</div> <div>Content</div>
<input type="text" style="height:20px;width: 100%;"> <input type="text" style="height:20px;width: 100%;">
</div> </div>
</div> </div>
<div class="runplanBottomCInB2"> <div class="runplanBottomCInB2">
<div style="margin-right:5px;line-height:20px">常用记事词汇</div> <div style="margin-right:5px;line-height:20px">Often use memorizing words</div>
<div style="flex-grow:1"><input type="text" style="height:20px;width: 100%;"></div> <div style="flex-grow:1"><input type="text" style="height:20px;width: 100%;"></div>
</div> </div>
<div class="runplanBottomCInB3" /> <div class="runplanBottomCInB3" />
@ -544,7 +547,7 @@
</div> </div>
</div> </div>
<div class="runplanBottomR"> <div class="runplanBottomR">
<div class="runplanBottomRTitle">与邻站的信息</div> <div class="runplanBottomRTitle">Information with neighbouring stations</div>
<div class="runplanBottomRIn"> <div class="runplanBottomRIn">
<div class="runplanBottomRInM"> <div class="runplanBottomRInM">
<!-- <div class="runplanMessage" style="color:#0816cf">王岗收到计划22:32:02</div> --> <!-- <div class="runplanMessage" style="color:#0816cf">王岗收到计划22:32:02</div> -->
@ -706,7 +709,7 @@ export default {
initDate(date) { initDate(date) {
this.time = timestampFormat('HH:mm:ss', date); this.time = timestampFormat('HH:mm:ss', date);
this.dateString = timestampFormat('YYYYMMDD', date); this.dateString = timestampFormat('YYYYMMDD', date);
this.dateString1 = timestampFormat('YYYY年MM月DD日', date); this.dateString1 = timestampFormat('YYYY-MM-DD', date);
}, },
judgeColor({row, rowIndex}) { judgeColor({row, rowIndex}) {
if (row.effect) { if (row.effect) {
@ -1289,13 +1292,13 @@ export default {
align-items: flex-start; align-items: flex-start;
} }
.runplanContent{ .runplanContent{
height: 695px; height: 540px;
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
.runplanContentL{ .runplanContentL{
width:62px; width:85px;
height:100%; height:100%;
background: #f0f0f0; background: #f0f0f0;
border-bottom: 1px #afafaf solid; border-bottom: 1px #afafaf solid;

View File

@ -1,292 +0,0 @@
<template>
<div v-show="showTable" style="background: #F0F0F0;z-index: 10;position: absolute;left: 0;bottom: 0;width: 100%;font-size: 14px;">
<i class="el-icon-close close_icon" @click.stop="doClose" />
<el-row>
<el-col :span="11" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;margin-top: 10px;">
<div style="position: relative; top: -8px;left: 15px;width: 130px;background: #f0f0f0;">列车进路序列 可修改</div>
<div style="width: 100%;background: #9F9F9F">
<el-table
ref="sequenceTable"
:data="sequenceList"
height="90"
:row-class-name="tableRowClassName"
border
style="width: 650px"
:cell-style="{padding: 0}"
:default-sort="{prop: 'startTime', order: 'ascending'}"
>
<el-table-column type="index" width="30" label="序" label-class-name="bottom-table-label-header" />
<el-table-column property="tripNumber" label="车次" width="60" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<div style="width: 100%;height: 22px;" @contextmenu="popMenuShow(scope.row, '' ,$event)">{{ scope.row.tripNumber }}</div>
</template>
</el-table-column>
<el-table-column property="trackName" label="股道" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="autoTrigger" label="自触" width="50" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.autoTrigger" @change="triggerChange(scope.row)" />
</template>
</el-table-column>
<el-table-column property="direction" label="方向" width="100" label-class-name="bottom-table-label-header" />
<el-table-column property="startTime" label="开始" width="80" label-class-name="bottom-table-label-header" />
<el-table-column property="planTime" label="计划" width="90" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="90" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<span>{{ getRouteStatus(scope.row.status) }}</span>
</template>
</el-table-column>
<el-table-column property="description" label="进路描述" label-class-name="bottom-table-label-header">
<template slot-scope="scope">
<span>{{ getRouteName(scope.row.routeCode) }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<div style="display: flex;align-items: center;">
<div style="margin-right: 10px;">车站</div>
<el-select v-model="stationCode" size="mini" @change="stationChange">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">释放权限</div>
<div style="margin-left: 10px;">字体</div>
<div style="margin-left: 10px;border: 1px inset #C7C7C7;padding: 3px;">常规</div>
</div>
</el-col>
<el-col :span="13">
<div style="border: 1px solid #C7C7C7;margin-top: 10px;">
<div style="position: relative; top: -8px;left: 15px;width: 103px;background: #f0f0f0;">调车进路 可修改</div>
<el-row>
<el-col :span="12" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;">
<div style="position: relative; top: -8px;left: 15px;width: 86px;background: #f0f0f0;">调车进路序列</div>
<div style="width: 100%;background: #9F9F9F">
<el-table :data="tableData" height="55" border style="width: 465px" :cell-style="{padding: 0}">
<el-table-column type="index" label="顺序" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="勾序" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="进路及方向" width="95" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="自触" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="触发时间" width="80" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="占用时间" label-class-name="bottom-table-label-header" />
</el-table>
</div>
</div>
</el-col>
<el-col :span="12" style="padding: 0 10px;">
<div style="border: 1px solid #C7C7C7;">
<div style="position: relative; top: -8px;left: 15px;width: 44px;background: #f0f0f0;">勾序列</div>
<div style="width: 100%;background: #9F9F9F">
<el-table :data="tableData" height="55" style="width: 360px" border :cell-style="{padding: 0}">
<el-table-column type="index" label="钩计划" width="70" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="股道" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="操作" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="状态" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="记事" width="50" label-class-name="bottom-table-label-header" />
<el-table-column property="" label="作业时间" label-class-name="bottom-table-label-header" />
</el-table>
</div>
</div>
</el-col>
</el-row>
</div>
<el-row>
<div style="display: flex;align-items: center;">
<div>作业单</div>
<el-select v-model="sheetValue" size="mini" style="margin-left: 10px;width: 500px;">
<el-option
v-for="item in sheetList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">单头信息</div>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">删除</div>
<div style="border: 1px outset #C7C7C7;margin-left: 20px;padding: 3px;">发送</div>
</div>
</el-row>
<el-row>
<div style="display: flex;">
<div>历史进路</div>
<div style="margin-left: 300px;">状态</div>
</div>
</el-row>
</el-col>
</el-row>
<pop-menu ref="popMenu" :menu="menu" style="background: #DFE3E6;" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { EventBus } from '@/scripts/event-bus'; // 996
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import PopMenu from '@/components/PopMenu';
export default {
name: 'BottomTable',
components: {
PopMenu
},
data() {
return {
tableData: [{}],
stationCode: '',
sheetValue: '',
routeParam: {},
showTable: false,
sheetList: [{ label: '历史进路', value: 'historyRoute' }],
sequenceList: [],
sequenceMap: {},
menu: [{label: '人工触发', handler: this.artificialTrigger, disabled: false}, {label: '删除', handler: this.artificialTrigger, disabled: true}]
};
},
computed: {
...mapGetters('map', [
'stationList'
])
},
watch: {
'showTable': function (val) {
const offset = val ? 162 : 0;
EventBus.$emit('setMenuButtonPosition', offset);
},
'$store.state.socket.railCtcStatusMsg': function (val) {
if (val && val.length) {
val.forEach(item => {
if (item && item.routeSequence && item.routeSequence.lines && item.routeSequence.lines.length) {
item.routeSequence.lines.forEach(elem => {
if (!this.sequenceMap[elem.id]) {
this.sequenceMap[elem.id] = Object.assign(elem, { stationCode: item.stationCode, readOnly: item.readOnly });
} else {
this.sequenceMap[elem.id] = Object.assign(this.sequenceMap[elem.id], elem, { stationCode: item.stationCode, readOnly: item.readOnly });
}
});
}
});
this.sequenceList = [];
for (const key in this.sequenceMap) {
if (this.sequenceMap[key].stationCode === this.stationCode) {
this.sequenceList.push(this.sequenceMap[key]);
}
}
}
}
},
mounted() {
EventBus.$on('bottomTableShowOrHidden', () => {
this.showTable = !this.showTable;
});
if (this.stationList && this.stationList.length) {
this.stationCode = this.stationList[0].code;
}
},
methods: {
doShow() {
this.showTable = true;
},
doClose() {
this.showTable = false;
},
getRouteStatus(status) {
if (status === '2') {
return '触发完成';
} else if (status === '1') {
return '正在触发';
} else {
return '等待中';
}
},
triggerChange(row) {
const triggerParam = { stationCode: this.stationCode, tripNumber: row.tripNumber, routeCode: row.routeCode, trigger: row.autoTrigger };
if (row.autoTrigger) {
this.setTrigger(triggerParam, row);
} else {
this.cancelTrigger(triggerParam, row);
}
},
stationChange(stationCode) {
this.sequenceList = [];
for (const key in this.sequenceMap) {
if (this.sequenceMap[key].stationCode === stationCode) {
this.sequenceList.push(this.sequenceMap[key]);
}
}
},
tableRowClassName({row, rowIndex}) {
if (row.status === '0') {
return 'bottom-table-route-wait';
} else if (row.tripNumber) {
return 'bottom-table-route-green';
} else {
return 'bottom-table-route-gray';
}
},
getRouteName(code) {
if (code) {
const route = this.$store.state.map.routeData[code];
return route ? route.name : '';
} else { return ''; }
},
setTrigger(triggerParam, row) {
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
if (valid) {
this.$message.success('设置自动触发成功!');
}
}).catch((e) => {
console.error(e);
row.autoTrigger = false;
this.$message.error('设置自动触发失败!');
});
},
popMenuShow(item, type, e) {
this.routeParam = {routeCode: item.routeCode, tripNumber: item.tripNumber, force: false, duration: null};
this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y});
},
cancelTrigger(triggerParam, row) {
commitOperate(menuOperate.CTC.autoTrigger, triggerParam, 3).then(({valid, operate})=>{
if (valid) {
this.$message.success('取消自动触发成功!');
}
}).catch((e) => {
console.error(e);
row.autoTrigger = true;
this.$message.error('取消自动触发失败!');
});
},
artificialTrigger() {
commitOperate(menuOperate.CTC.setRoute, this.routeParam, 3).then(({valid, operate})=>{
if (valid) {
this.$message.success('人工触发成功!');
}
}).catch((e) => {
console.error(e);
this.$message.error('人工触发失败!');
});
}
}
};
</script>
<style scoped>
</style>
<style>
.bottom-table-label-header{
background: #FFF3EE;
}
.bottom-table-route-wait {
background: #ff0 !important;
}
.bottom-table-route-gray{
background: #c0c0c0 !important;
}
.bottom-table-route-green{
background: #0f0 !important;
}
</style>

View File

@ -1,210 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="11">车次号</el-col>
<el-col :span="11" :offset="1">上下行</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-input v-model="addModel.tripNumber" size="mini" @blur="handleTripNumber" />
<div class="tripNumberTips">{{ messageTip1 }}</div>
</el-col>
<el-col :span="11" :offset="1">
<el-select v-model="addModel.right" size="mini" disabled>
<el-option :value="true" :label="rightTrueLabel" />
<el-option :value="false" :label="rightFalseLabel" />
</el-select>
<div class="tripNumberTips">{{ messageTip2 }}</div>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default {
name: 'TrainSetPlan',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
messageTip1:'',
messageTip2:'',
addModel: {
tripNumber: '',
right: '',
sectionCode: ''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'mapConfig'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
},
title() {
return '模拟车次输入';
},
rightTrueLabel() {
return this.mapConfig.upRight ? '上行' : '下行';
},
rightFalseLabel() {
return this.mapConfig.upRight ? '下行' : '上行';
}
},
watch:{},
methods: {
doShow(operate, selected) {
this.$root.$emit('dialogOpen', selected);
this.selected = selected;
//
this.addModel.sectionCode = selected.code;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.addModel = {
tripNumber: '',
right: '',
sectionCode: ''
};
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected);
},
handleTripNumber() {
const figuresOfServiceMinNumber = 2;
const figuresOfServiceMaxNumber = 6;
// this.$store.state.map.mapConfig.figuresOfServiceNumber;
const tripNumber = this.addModel.tripNumber;
const judge = /^[a-zA-Z0-9]*[\d]$/.test(this.addModel.tripNumber);
if (judge) {
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
this.messageTip1 = '车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
} else {
this.addModel.tripNumber = tripNumber;
this.messageTip1 = '';
const result = this.addModel.tripNumber.match(/[\d]$(?=[a-zA-Z0-9]*)/);
if (result) {
const is_even = result[0] % 2 == 0;
this.addModel.right = is_even;
}
}
} else {
this.addModel.tripNumber = '';
this.messageTip1 = '请输入车次号(最后一位必须是数字)';
}
},
commit() {
const figuresOfServiceMinNumber = 2;
const figuresOfServiceMaxNumber = 6;
let result = false;
const tripNumber = this.addModel.tripNumber;
if (tripNumber.toString().length > figuresOfServiceMaxNumber || tripNumber.toString().length < figuresOfServiceMinNumber) {
result = false;
} else {
result = true;
}
if (this.addModel.tripNumber && result) {
// if (this.addModel.right === '') {
// this.messageTip2 = '';
// return;
// }
const params = {
tripNumber: this.addModel.tripNumber,
sectionCode: this.addModel.sectionCode,
right: this.addModel.right
};
this.messageTip1 = '';
this.loading = true;
commitOperate(menuOperate.Section.addSpareTrain, params, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
} else {
if (this.addModel.tripNumber) {
this.messageTip1 = '该车次号长度' + figuresOfServiceMinNumber + '-' + figuresOfServiceMaxNumber + '位';
} else {
this.messageTip1 = '请输入车次号';
}
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.ningbo-01__systerm .el-dialog .base-label {
// background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.tripNumberTips{
margin-top: 7px;
color: #f00;
font-size: 13px;
}
</style>

View File

@ -1,141 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control"
: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">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'ConfirmControl',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
}
}
return '';
}
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
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() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
}
},
//
signalClose() {
const operate = {
over: true,
operation: OperationEvent.Signal.signalClose.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,156 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control-speed"
:title="title"
:visible.sync="show"
width="540px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="6" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'ConfirmControlSpeed',
data() {
return {
dialogShow: false,
loading: false,
type: '',
operation: '',
message: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
return '区段设置限速';
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
return '区段取消限速';
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
return '道岔设置限速';
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
return '道岔取消限速';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
return OperationEvent.Section.setSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
return OperationEvent.Section.cancelSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
return OperationEvent.Switch.setSpeed.confirm.domId;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
return OperationEvent.Switch.cancelSpeed.confirm.domId;
}
return '';
}
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.type = operate.type;
this.operation = operate.operation;
this.message = operate.message;
}
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() {
const operate = {
type: this.type
};
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
/** 区段设置限速*/
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
/** 区段取消限速*/
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
/** 道岔设置限速*/
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
/** 道岔取消限速*/
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
}
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose();
});
},
cancel() {
const operate = {
type: this.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,74 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control-speed"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="11">
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
</el-col>
<el-col :span="11" :offset="2">
<el-button @click="doClose"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'ConfirmTip',
data() {
return {
dialogShow: false,
message: '',
confirmId: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
}
},
mounted() {
},
methods: {
doShow(operate) {
this.message = operate.message;
this.dialogShow = true;
this.confirmId = operate.confirmId;
},
confirm() {
this.$emit('close');
},
doClose() {
this.dialogShow = false;
}
}
};
</script>
<style scoped>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.chengdou-03__systerm .el-dialog .el-button{
display: block;
margin: 0 auto;
}
</style>

View File

@ -1,173 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control"
: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">
<span :key="index">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
export default {
name: 'ConfirmTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: {},
messages: '',
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
return '添加列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
return '修改列车识别号';
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
return '删除列车识别号';
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
return '移动列车识别号';
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
return '交换列车识别号';
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
return '修改车组号';
}
return '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
/** 添加列车识别号*/
return OperationEvent.Train.addTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
/** 修改列车识别号*/
return OperationEvent.Train.editTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
/** 删除列车识别号*/
return OperationEvent.Train.delTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
/** 移动列车识别号*/
return OperationEvent.Train.moveTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
/** 交换列车识别号*/
return OperationEvent.Train.switchTrainId.confirm.domId;
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
/** 修改车组号*/
return OperationEvent.Train.editTrainNo.confirm.domId;
}
return '';
}
},
methods: {
doShow(operate) {
if (!this.dialogShow) {
this.loading = false;
this.operate = operate || {};
this.messages = operate.messages;
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('map/setTrainWindowShow', false);
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
this.routeSetting();
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
this.routeSetting();
}
},
//
routeSetting() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Train.addTrainId.confirm.operation
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>
<style>
.confirm-control .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,193 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
title="密码校验"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :span="22" :offset="1">
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
</el-col>
</el-row>
<el-row v-if="showMistake">
<el-col :span="22" :offset="1">
<span class="password-error">*密码输入错误请重新输入*</span>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">7</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">8</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">9</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">4</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">5</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">6</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">1</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">2</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputNum">3</el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button @click="inputNum">0</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="inputClear">C</el-button>
</el-col>
<el-col :span="4" :offset="4">
<el-button @click="backSpace"> &lt; </el-button>
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="4" :offset="12">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'PasswordBox',
data() {
return {
/* 写死的初始密码*/
correctPassword: '123',
dialogShow: false,
operation: '',
checkHasInput: false,
/* 输入值*/
passwordCheck: '',
/* 输入值替换为对应长度的星号*/
encryptionPassword: '',
loading: false,
showMistake: false
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.password.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
}
},
methods: {
doShow(operate) {
this.operate = operate || {};
this.operation = operate.operation;
if (operate.operateNext) {
this.operation = operate.operateNext;
}
this.dialogShow = true;
this.checkHasInput = false;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.showMistake = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() { //
if (this.passwordCheck === this.correctPassword) {
this.$emit('checkOver', this.operate);
this.doClose();
this.inputClear();
} else {
this.showMistake = true;
}
},
/* 软键盘输入*/
inputNum(e) {
this.showMistake = false;
this.passwordCheck += e.path[0].innerText;
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
},
/* 软键盘清除*/
inputClear() {
this.showMistake = false;
this.passwordCheck = '';
this.encryptionPassword = '';
},
/* 软键盘回退*/
backSpace() {
this.showMistake = false;
const password = this.passwordCheck;
if (password !== '') {
this.passwordCheck = password.substring(0, password.length - 1);
this.encryptionPassword = this.passwordCheck;
}
},
cancel() {
const operate = {
send: false,
type: this.operate.type,
operation: OperationEvent.Command.cancel.password.operation
};
this.$emit('checkCancel');
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.inputClear();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow();
});
}
}
};
</script>
<style>
.notice-info .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.password-error {
color: red;
}
</style>

View File

@ -1,94 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm popup-alarm"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<el-row>
<el-col :offset="2">
<span v-for="(message, index) in messages" :key="index">{{ message }}</span><br>
</el-col>
</el-row>
<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>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
export default {
name: 'PopupAlarm',
data() {
return {
dialogShow: false,
messages: [],
operate: null,
operation: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '弹出式告警';
},
domIdSure() {
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
}
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
this.operation = operate.operation;
this.dialogShow = true;
this.messages = messages || [];
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
//
this.alxeEffective();
}
},
alxeEffective() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.alarm.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
}
});
}
}
};
</script>
<style>
.popup-alarm .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
</style>

View File

@ -1,99 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="280px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="text-align: center;">
确定删除该列车的行车信息
</div>
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="8" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="3">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'DeleteRunplan',
data() {
return {
dialogShow: false,
loading: false,
model:{
stationCode:'',
runPlanCode:''
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.deleteRunplan.menu.domId : '';
},
title() {
return '警告';
}
},
methods: {
doShow(row) {
// 4. CTC_REMOVE_RUN_PLAN stationCode runPlanCode
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.code;
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.loading = true;
commitOperate(menuOperate.CTC.deleteRunplan, this.model, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('clearRpRow');
this.doClose();
this.$emit('noticeInfo');
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>

View File

@ -1,163 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
:title="title"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-form v-if="selected" :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="设备类型:">
<el-select v-model="form.deviceType" :disabled="true" style="width: 150px;">
<el-option
v-for="item in deviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="设备名称:">
<el-input v-model="form.deviceName" :disabled="true" style="width: 150px;" />
</el-form-item>
</el-form>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="fileName"
label="文件"
width="400"
/>
<el-table-column
prop="name"
label="操作"
>
<template slot-scope="scope">
<div class="text-button" @click="openPdf(scope.row)">打开</div>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import CancelMouseState from '@/mixin/CancelMouseState';
import { getUploadFile } from '@/api/pdf';
import { DrawingType } from '@/scripts/ConstDic';
export default {
name: 'TrainMove',
mixins: [
CancelMouseState
],
data() {
return {
selected: null,
selectedType: '',
dialogShow: false,
loading: false,
tableData: [],
deviceTypeList: [
{ label: '区段', value: 'Section' },
{ label: '信号机', value: 'Signal' },
{ label: '道岔', value: 'Switch' },
{ label: '车站', value: 'Station' }
],
deviceIdList: [],
form: {
mapId: '',
deviceId: '',
deviceCode: '',
deviceName: ''
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.selectedType === 'normStudy') {
return '规范学习';
} else if (this.selectedType === 'clCaAn') {
return '经典案例分析';
} else if (this.selectedType === 'baDeTr') {
return '基础设备培训';
} else {
return '图纸检索';
}
}
},
methods: {
doShow(selected, selectedType) {
this.selectedType = selectedType;
const params = { mapId: this.$route.query.mapId, fileType: DrawingType[selectedType] };
this.selected = selected;
if (this.selected) {
this.form.deviceName = selected.name;
this.form.deviceType = selected._type;
params.deviceType = selected._type.toUpperCase();
params.deviceId = selected.code;
}
this.loading = true;
getUploadFile(params).then(resp => {
this.tableData = resp.data;
this.loading = false;
}).catch(() => {
this.loading = false;
this.$message.error('图纸检索失败!');
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
openPdf(row) {
const url = `https://joylink.club/oss/joylink/${row.filePath}`;
window.open(url, '_blank');
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.text-button{
color: #148ad0;
cursor:pointer;
}
.text-button:active{
color: #b938e1;
text-decoration: underline;
}
.text-button:hover{
color: #b938e1;
text-decoration: underline;
}
</style>

View File

@ -1,154 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
:title="title"
:visible.sync="show"
width="360px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="modifyAdjacentStation">
<div class="adjacentStationTrip"> {{ tripNumber }}次列车</div>
<div class="adjacentStationStart">
<el-select
v-model="model.arriveStationCode"
placeholder=""
size="mini"
style="width:100px"
popper-class="stationSelect"
>
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div style="display:inline-block">站驶来</div>
</div>
<div class="adjacentStationEnd">
<div style="display:inline-block">驶向</div>
<el-select
v-model="model.departStationCode"
placeholder=""
size="mini"
style="width:100px"
popper-class="stationSelect"
>
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<div style="display:inline-block"></div>
</div>
</div>
<el-row justify="center" class="button-group" style="margin-top:20px">
<el-col :span="8" :offset="4">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="1">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
// import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'ModifyAdjacentStation',
data() {
return {
dialogShow: false,
loading: false,
tripNumber:'',
stationList:[],
model:{
stationCode:'', //
runPlanCode:'', //
arriveStationCode:'', //
departStationCode:'' //
}
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.modifyAdjacentStation.menu.domId : '';
},
title() {
return '修改相关车站';
}
},
mounted() {
this.stationList = this.$store.state.map.map.stationList;
},
methods: {
doShow(row) {
this.model.stationCode = row.stationCode;
this.model.runPlanCode = row.code;
this.model.arriveStationCode = (row.arriveRunPlan && row.arriveRunPlan.stationCode) || '';
this.model.departStationCode = (row.departRunPlan && row.departRunPlan.stationCode) || '';
this.tripNumber = row.tripNumber;
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.loading = true;
commitOperate(menuOperate.CTC.modifyAdjacentStation, this.model, 2).then(({valid})=>{
this.loading = false;
this.$emit('clearRpRow');
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('clearRpRow');
this.doClose();
this.$emit('noticeInfo');
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$emit('clearRpRow');
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style lang="scss" scoped>
.modifyAdjacentStation{text-align: center;font-size: 14px;color: #000;}
.adjacentStationTrip{text-align: center;}
.adjacentStationStart{margin-top: 10px;}
.adjacentStationEnd{margin-top: 10px;}
</style>
<style lang="scss">
.stationSelect{
z-index:2014 !important;
}
</style>

Some files were not shown because too many files have changed in this diff Show More