iscs 闸机调整
This commit is contained in:
parent
e2b51b6737
commit
1f8bb3c80b
@ -14,7 +14,9 @@ const iscs = {
|
||||
closeMusicNum: 0, // 关闭音乐标识
|
||||
faultList: [], // 故障 元素状态
|
||||
incidentList: [], // 事件列表
|
||||
alarmList: [] // 报警列表
|
||||
alarmList: [], // 报警列表
|
||||
gateFaultList: [], // 闸机故障
|
||||
gateFaultCount: 0
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -184,6 +186,15 @@ const iscs = {
|
||||
},
|
||||
updateIscsState: (state, deviceStatus) => {
|
||||
Vue.prototype.$iscs && Vue.prototype.$iscs.update(deviceStatus);
|
||||
},
|
||||
handlerGateFaultList: (state, data) => {
|
||||
if (data.type === 'SET') {
|
||||
state.gateFaultList.push(data.stationCode);
|
||||
} else if (data.type === 'CANCEL') {
|
||||
const index = state.gateFaultList.findIndex(item => item === data.stationCode);
|
||||
state.gateFaultList.splice(index, 1);
|
||||
}
|
||||
state.gateFaultCount++;
|
||||
}
|
||||
},
|
||||
|
||||
@ -224,6 +235,9 @@ const iscs = {
|
||||
},
|
||||
setDelIncidentList: ( { commit }) => {
|
||||
commit('setDelIncidentList');
|
||||
},
|
||||
handlerGateFaultList: ({ commit }, data) => {
|
||||
commit('handlerGateFaultList', data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="iscs_fuzhou-01__systerm route-detail"
|
||||
title="故障设置"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
@ -60,12 +60,14 @@ export default {
|
||||
options: [
|
||||
{ label: '104A断路器故障', value: 'group_2' },
|
||||
{ label: '104B断路器故障', value: 'group_52' },
|
||||
{ label: '框架电流保护故障', value: 'frame_group' }
|
||||
{ label: '框架电流保护故障', value: 'frame_group' },
|
||||
{ label: '闸机故障', value: 'gate_fault' }
|
||||
],
|
||||
list: {
|
||||
valve: ['控分', '控合']
|
||||
},
|
||||
farmed: ''
|
||||
farmed: '',
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -74,10 +76,17 @@ export default {
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.type === 'CANCEL' ? '故障取消' : '故障设置';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
doShow(type) {
|
||||
this.type = type;
|
||||
if (type === 'CANCEL') {
|
||||
this.options = [{ label: '闸机故障', value: 'gate_fault' }];
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.elemList = [];
|
||||
},
|
||||
@ -91,6 +100,12 @@ export default {
|
||||
this.farmed = '';
|
||||
if (this.formModel.value == 'frame_group') {
|
||||
this.setMalfunction();
|
||||
} else if (this.formModel.value === 'gate_fault') {
|
||||
if (this.$route.query.stationId && this.$route.params.mode === 'autoTicket') {
|
||||
this.$store.dispatch('iscs/handlerGateFaultList', { type: this.type, stationCode: this.$route.query.stationId });
|
||||
} else {
|
||||
this.$message.error('请在车站自动售检票系统中设置或取消故障!');
|
||||
}
|
||||
} else {
|
||||
this.setModelMalfunction(this.$iscs.iscsDevice[this.formModel.value].model);
|
||||
}
|
||||
|
@ -11,8 +11,6 @@
|
||||
<script>
|
||||
import iscsSystem from '../canvas/iscsCanvas';
|
||||
import {getIscsData} from '@/api/iscs';
|
||||
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
export default {
|
||||
name:'TicketOrEntrance',
|
||||
components:{
|
||||
@ -25,8 +23,7 @@ export default {
|
||||
loading:false,
|
||||
width:window.innerWidth,
|
||||
scaleRate:window.innerWidth / 2200,
|
||||
height: 1000,
|
||||
flag: false
|
||||
height: 1000
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@ -45,10 +42,8 @@ export default {
|
||||
this.mode = this.$route.params.mode;
|
||||
this.getInitData();
|
||||
},
|
||||
'$route.query.stationId': function (val, oldVal) {
|
||||
if (this.flag && this.mode == 'autoTicket') {
|
||||
this.clearSubscribe(oldVal);
|
||||
}
|
||||
'$store.state.iscs.gateFaultCount': function(val) {
|
||||
this.$store.dispatch('iscs/updateIscsState', [{deviceType: 'GATE', status: this.$store.state.iscs.gateFaultList.includes(this.stationId) ? 0 : 1}]);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -57,9 +52,6 @@ export default {
|
||||
mounted() {
|
||||
this.getInitData();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearSubscribe(this.$route.query.stationId);
|
||||
},
|
||||
methods:{
|
||||
getInitData() {
|
||||
const params = {
|
||||
@ -95,22 +87,13 @@ export default {
|
||||
const data = JSON.parse(resp.data.graphData);
|
||||
this.$refs.iscsPlate.show(data, this.width, this.height, this.scaleRate);
|
||||
document.querySelector('.fasIndex').scrollTop = 0;
|
||||
if (this.mode == 'autoTicket') {
|
||||
this.subscribe(this.$route.query.stationId);
|
||||
this.flag = true;
|
||||
if (this.mode === 'autoTicket') {
|
||||
this.$store.dispatch('iscs/updateIscsState', [{deviceType: 'GATE', status: this.$store.state.iscs.gateFaultList.includes(this.stationId) ? 0 : 1}]);
|
||||
}
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
subscribe(stationCode) {
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(getTopic('ISCSGATE', this.$route.query.group, {stationCode} ), header);
|
||||
this.$store.dispatch('app/animationsClose');
|
||||
},
|
||||
clearSubscribe(stationCode) {
|
||||
clearSubscribe(getTopic('ISCSGATE', this.$route.query.group, {stationCode}));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -4,15 +4,15 @@
|
||||
<div class="station-nav">
|
||||
<div class="stationList">
|
||||
<div class="station-line" />
|
||||
<div v-for="(item, index) in stationList" :key="index" class="station-box-out">
|
||||
<div class="station-box">
|
||||
<div v-for="(item, index) in stationList" :key="index" class="station-box-out">
|
||||
<div class="station-box">
|
||||
<div class="leftRect" />
|
||||
<div class="rightRect" />
|
||||
<div class="station-list-box" :class="{'active': selectStation == item.id,'currentStation':tractionList.includes(item.name)}" @click="changeStation(item.id)" />
|
||||
</div>
|
||||
<div class="station-name" :class="index==0?'station-name-first':index%2==1?'station-name-up':'station-name-down'">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="station-name" :class="index==0?'station-name-first':index%2==1?'station-name-up':'station-name-down'">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rightButtonGroup">
|
||||
<div class="rightButtonGroupL">
|
||||
<div class="controlCenter">
|
||||
@ -64,6 +64,7 @@
|
||||
<!-- <span v-show="!alarmInfo" class="point_box" /> -->
|
||||
</div>
|
||||
<div class="bottom-back" @click="getIncidentList">事件</div>
|
||||
<div class="bottom-back" @click="cancelMalfunction">故障取消</div>
|
||||
<div class="bottom-back" @click="handleMalfunction">故障设置</div>
|
||||
</div>
|
||||
<alarm-config ref="alarmConfig" />
|
||||
@ -460,7 +461,10 @@ export default {
|
||||
},
|
||||
// 设置故障
|
||||
handleMalfunction() {
|
||||
this.$refs.malfunction.doShow();
|
||||
this.$refs.malfunction.doShow('SET');
|
||||
},
|
||||
cancelMalfunction() {
|
||||
this.$refs.malfunction.doShow('CANCEL');
|
||||
},
|
||||
selectChildren(type, isReplace = false) { // 选择菜单
|
||||
let stationName = '';
|
||||
|
Loading…
Reference in New Issue
Block a user