This commit is contained in:
yuan 2021-06-04 17:55:39 +08:00
parent aa395d1206
commit 786d0f7a9f
2 changed files with 9 additions and 16 deletions

View File

@ -97,7 +97,7 @@
<div class="content-row">
<div class="cell btn">
<div class="btn-text">试灯按钮</div>
<img
<div class="btn-sd btn-img"
:src="getIcon('green', 'btn')"
@mousedown.left="btnClickHandler('SD')"
@mouseup.left="btnClickHandler('SD')"
@ -151,14 +151,11 @@ export default {
initData(group, standCode) {
getPslStatus(group, standCode)
.then(resp => {
console.log(resp);
if (resp.data) {
this.data.indicators = resp.data;
this.indicators = resp.data;
}
})
.catch(err => {
this.$message.error("获取PSL盘初始状态异常");
});
.catch(err => {});
},
doClose() {
@ -172,25 +169,20 @@ export default {
: icons[type];
},
btnClickHandler(btnType) {
// pressPslButton(group, standCode, btnType)
// .then(resp => {})
// .catch(err => {
// this.$message.error("PSL!");
// });
console.log(`${btnType} button clicked`)
pressPslButton(group, standCode, btnType);
}
},
watch: {
'$store.state.socket.simulationPslStatus': function(val){
"$store.state.socket.simulationPslStatus": function(val) {
if (val && val[standCode]) {
console.log(`socket msg of psl: ${val[standCode]}`);
Object.assign(this.indicators, val[standCode])
}
}
}
};
</script>
<style lang="scss" scoped>
<style vars="{icons}" lang="scss" scoped>
.psl-title {
display: flex;
justify-content: center;

View File

@ -336,7 +336,8 @@ const socket = {
simulationAlarmInfo: [], // 仿真报警信息
deviceStateMessages: null, // 新版订阅设备状态消息
simulationSpeed: 1, // 仿真倍速
simulationPause: false
simulationPause: false,
simulationPslStatus: [], //PSL面板按钮状态信息
},
getters: {
},