PSL
@ -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 |
231
src/jmapNew/theme/components/menus/dialog/psl.vue
Normal file
@ -0,0 +1,231 @@
|
||||
<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>
|
||||
<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 => {
|
||||
console.log(resp);
|
||||
if (resp.data) {
|
||||
this.data.indicators = resp.data;
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$message.error("获取PSL盘初始状态异常!");
|
||||
});
|
||||
},
|
||||
|
||||
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)
|
||||
// .then(resp => {})
|
||||
// .catch(err => {
|
||||
// this.$message.error("PSL盘操作异常!");
|
||||
// });
|
||||
console.log(`${btnType} button clicked`)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.socket.simulationPslStatus': function(val){
|
||||
if (val && val[standCode]) {
|
||||
console.log(`socket msg of psl: ${val[standCode]}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style 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,9 +176,16 @@ export default {
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
console.log(this.menu);
|
||||
if (this.$store.state.training.prdType === '01') { //角色为车站值班员
|
||||
this.menu = [
|
||||
...this.menu,
|
||||
{
|
||||
label: 'PSL',
|
||||
handler: this.openPsl
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
doShow(point) {
|
||||
this.initMenu();
|
||||
@ -295,9 +305,11 @@ export default {
|
||||
// 触发故障管理
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
// 打开PSL面板
|
||||
openPsl(){
|
||||
this.$refs.psl.doShow(this.selected)
|
||||
}
|
||||
// PSL
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -189,6 +189,9 @@ function handle(state, data) {
|
||||
store.dispatch('training/over');
|
||||
}
|
||||
break;
|
||||
case 'Simulation_PslStatus':
|
||||
state.simulationPslStatus = msg;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|