Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
@ -451,6 +451,27 @@ export function getSimulationDestinationList(group) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 获取PSL盘状态 */
|
||||
export function getPslStatus(group, standCode) {
|
||||
return request({
|
||||
url: `/simulation/${group}/${standCode}/psl/status`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 按下IBP盘按钮
|
||||
* @param {String} button
|
||||
* YXJZ-允许/禁止;
|
||||
* HSJC-互锁解除;
|
||||
* KM-开门;
|
||||
* GM-关门;
|
||||
* SD-试灯;
|
||||
*/
|
||||
export function pressPslButton(group, standCode, button) {
|
||||
return request({
|
||||
url: `/simulation/${group}/${standCode}/psl/${button}`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 查询运行线或者列车经过的站台 */
|
||||
export function getStandListByRunLineOrTrainCode(group, params) {
|
||||
return request({
|
||||
|
BIN
src/assets/psl_images/green_btn.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
src/assets/psl_images/green_off.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/psl_images/green_on.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/psl_images/key.png
Normal file
After Width: | Height: | Size: 12 KiB |
22
src/assets/psl_images/psl_icons.js
Normal file
@ -0,0 +1,22 @@
|
||||
import red_on from "@/assets/psl_images/red_on.png";
|
||||
import red_off from "@/assets/psl_images/red_off.png";
|
||||
import red_btn from "@/assets/psl_images/red_btn.png";
|
||||
import green_on from "@/assets/psl_images/green_on.png";
|
||||
import green_off from "@/assets/psl_images/green_off.png";
|
||||
import green_btn from "@/assets/psl_images/green_btn.png";
|
||||
import top_on from "@/assets/psl_images/top_on.png";
|
||||
import top_off from "@/assets/psl_images/top_off.png";
|
||||
import key from "@/assets/psl_images/key.png";
|
||||
const icons = {
|
||||
red_on,
|
||||
red_off,
|
||||
red_btn,
|
||||
green_on,
|
||||
green_off,
|
||||
green_btn,
|
||||
top_on,
|
||||
top_off,
|
||||
key
|
||||
};
|
||||
|
||||
export default icons;
|
BIN
src/assets/psl_images/red_btn.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
src/assets/psl_images/red_off.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
src/assets/psl_images/red_on.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/psl_images/top_off.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/psl_images/top_on.png
Normal file
After Width: | Height: | Size: 13 KiB |
223
src/jmapNew/theme/components/menus/dialog/psl.vue
Normal file
@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-01__systerm psl-panel"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="psl-title">
|
||||
<div>{{ title }}</div>
|
||||
</div>
|
||||
<div class="psl-content">
|
||||
<!-- <div class="content-row">
|
||||
<div class="btn">
|
||||
<div class="btn-text">
|
||||
有滑动门/应急门未关闭且锁紧指示灯
|
||||
</div>
|
||||
<img
|
||||
:src="getIcon('top', indicators.lock ? 'on' : 'off')"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="content-row">
|
||||
<div class="cell">
|
||||
<div class="btn-text">PSL操作指示灯</div>
|
||||
<img
|
||||
:src="
|
||||
getIcon('red', indicators.pslczLight ? 'on' : 'off')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="btn-text">互锁解除指示灯</div>
|
||||
<img
|
||||
:src="
|
||||
getIcon('red', indicators.hsjcLight ? 'on' : 'off')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell">
|
||||
<div class="btn-text">开门状态指示灯</div>
|
||||
<img
|
||||
:src="getIcon('red', indicators.kmLight ? 'on' : 'off')"
|
||||
/>
|
||||
</div>
|
||||
<div class="cell">
|
||||
<div class="btn-text">关门状态指示灯</div>
|
||||
<img
|
||||
:src="
|
||||
getIcon('green', indicators.gmLight ? 'on' : 'off')
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">禁止</div>
|
||||
<img
|
||||
:src="getIcon('key')"
|
||||
:class="['key', { 'key-on': indicators.yxjzKey }]"
|
||||
@click="btnClickHandler('YXJZ')"
|
||||
/>
|
||||
<div class="btn-text-opt">允许</div>
|
||||
</div>
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">禁止</div>
|
||||
<img
|
||||
:src="getIcon('key')"
|
||||
:class="['key', { 'key-on': indicators.hsjcKey }]"
|
||||
@click="btnClickHandler('HSJC')"
|
||||
/>
|
||||
<div class="btn-text-opt">互锁解除</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">开门按钮</div>
|
||||
<img
|
||||
:src="getIcon('red', 'btn')"
|
||||
@click="btnClickHandler('KM')"
|
||||
/>
|
||||
</div>
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">关门按钮</div>
|
||||
<img
|
||||
:src="getIcon('green', 'btn')"
|
||||
@click="btnClickHandler('GM')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-row">
|
||||
<div class="cell btn">
|
||||
<div class="btn-text">试灯按钮</div>
|
||||
<div class="btn-sd btn-img"
|
||||
:src="getIcon('green', 'btn')"
|
||||
@mousedown.left="btnClickHandler('SD')"
|
||||
@mouseup.left="btnClickHandler('SD')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import icons from "@/assets/psl_images/psl_icons";
|
||||
import { getPslStatus, pressPslButton } from "@/api/simulation";
|
||||
let standCode, group;
|
||||
export default {
|
||||
name: "PSL",
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
indicators: {
|
||||
// lock: false,
|
||||
pslczLight: false,
|
||||
hsjcLight: false,
|
||||
kmLight: false,
|
||||
gmLight: false,
|
||||
yxjzKey: false,
|
||||
hsjcKey: false
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return "PSL";
|
||||
},
|
||||
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(selected) {
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function() {
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
});
|
||||
standCode = selected.code;
|
||||
group = this.$route.query.group;
|
||||
this.initData(group, standCode);
|
||||
},
|
||||
|
||||
initData(group, standCode) {
|
||||
getPslStatus(group, standCode)
|
||||
.then(resp => {
|
||||
if (resp.data) {
|
||||
this.indicators = resp.data;
|
||||
}
|
||||
})
|
||||
.catch(err => {});
|
||||
},
|
||||
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch("training/emitTipFresh");
|
||||
},
|
||||
getIcon(type, status) {
|
||||
return status !== undefined
|
||||
? icons[`${type}_${status}`]
|
||||
: icons[type];
|
||||
},
|
||||
btnClickHandler(btnType) {
|
||||
pressPslButton(group, standCode, btnType);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$store.state.socket.simulationPslStatus": function(val) {
|
||||
if (val && val[standCode]) {
|
||||
Object.assign(this.indicators, val[standCode])
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style vars="{icons}" lang="scss" scoped>
|
||||
.psl-title {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
color: #000;
|
||||
font-size: 18px;
|
||||
margin: 30px 0;
|
||||
}
|
||||
.psl-content {
|
||||
.content-row {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
margin: 10px 0;
|
||||
.cell {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 120px;
|
||||
height: 100px;
|
||||
.key {
|
||||
transition: 0.1s;
|
||||
}
|
||||
.key-on {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.btn-text-opt {
|
||||
position: absolute;
|
||||
left: 80%;
|
||||
top: 35%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -9,6 +9,7 @@
|
||||
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<set-fault ref="setFault" pop-class="xian-01__systerm" />
|
||||
<psl ref="psl" pop-class="xian-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -22,6 +23,7 @@ import StandStopTime from './dialog/standStopTime';
|
||||
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import Psl from '@/jmapNew/theme/components/menus/dialog/psl';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
@ -39,7 +41,8 @@ export default {
|
||||
StandBackStrategy,
|
||||
StandStopTime,
|
||||
StandDetainTrainAll,
|
||||
SetFault
|
||||
SetFault,
|
||||
Psl
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -173,8 +176,16 @@ export default {
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
if (this.$store.state.training.prdType === '01') { //角色为车站值班员
|
||||
this.menu = [
|
||||
...this.menu,
|
||||
{
|
||||
label: 'PSL',
|
||||
handler: this.openPsl
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
@ -291,8 +302,13 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 触发故障管理
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
// 打开PSL面板
|
||||
openPsl(){
|
||||
this.$refs.psl.doShow(this.selected)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -189,6 +189,9 @@ function handle(state, data) {
|
||||
store.dispatch('training/over');
|
||||
}
|
||||
break;
|
||||
case 'Simulation_PslStatus':
|
||||
state.simulationPslStatus = msg;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@ -333,7 +336,8 @@ const socket = {
|
||||
simulationAlarmInfo: [], // 仿真报警信息
|
||||
deviceStateMessages: null, // 新版订阅设备状态消息
|
||||
simulationSpeed: 1, // 仿真倍速
|
||||
simulationPause: false
|
||||
simulationPause: false,
|
||||
simulationPslStatus: [], //PSL面板按钮状态信息
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
|