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