Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
c4d2f7ca23
@ -380,3 +380,11 @@ export function getIbpInitialState (group, stationCode) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
// 获取报警列表
|
||||
export function getAlarmList(group, params) {
|
||||
return request({
|
||||
url: `/simulation/${group}/alarm`,
|
||||
method: 'get',
|
||||
params:params
|
||||
});
|
||||
}
|
||||
|
@ -113,7 +113,7 @@
|
||||
<img :src="voiceIcon" style="width: 40px;height: 40px;" @click="controlAudio(false)">
|
||||
</el-row>
|
||||
<el-row class="button-row">
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报警</div>
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="showHimAlarm">报警</div>
|
||||
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">运图</div>
|
||||
</el-row>
|
||||
<el-row class="button-row" style="margin-top: 10px;">
|
||||
|
@ -42,13 +42,13 @@
|
||||
<div style="position: relative;height: 20px;line-height: 20px;top: -120px;text-align: left;right: -80px;background: #F0F0F0;width: 88px;">筛选条件查询</div>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-button>消息确认</el-button>
|
||||
<el-button @click="infoConfirm">消息确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button>消息打印</el-button>
|
||||
<el-button :disabled="true">消息打印</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button>删除备注</el-button>
|
||||
<el-button :disabled="true">删除备注</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
@ -63,8 +63,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="level" label="报警级别" />
|
||||
<el-table-column prop="time" label="日期/时间" width="150px" />
|
||||
<el-table-column prop="address" label="报警序号" />
|
||||
<el-table-column prop="address" label="设备编号" />
|
||||
<el-table-column prop="code" label="报警序号" />
|
||||
<el-table-column prop="deviceCode" label="设备编号" />
|
||||
<el-table-column prop="address" label="信号编号" />
|
||||
<el-table-column prop="address" label="元素编号" />
|
||||
<el-table-column prop="recover" label="确认">
|
||||
@ -87,6 +87,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getAlarmList} from '@/api/simulation';
|
||||
export default {
|
||||
name: 'AlarmHmi',
|
||||
data() {
|
||||
@ -103,12 +104,6 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
alarmInfoList() {
|
||||
return this.$store.state.socket.simulationAlarmInfoList;
|
||||
},
|
||||
totalNum() {
|
||||
return this.alarmInfoList.length;
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
doShow(level) {
|
||||
@ -123,32 +118,21 @@ export default {
|
||||
this.show = false;
|
||||
},
|
||||
operateChange(row) {
|
||||
console.log(row, '----------');
|
||||
},
|
||||
queryData(flag) {
|
||||
const list = [];
|
||||
if (!flag) {
|
||||
this.endTime = '';
|
||||
this.startTime = '';
|
||||
this.deviceCode = '';
|
||||
this.elementCode = '';
|
||||
}
|
||||
this.alarmInfoList.forEach(item => {
|
||||
let flag = true;
|
||||
if (this.level && item.level !== this.level) {
|
||||
flag = false;
|
||||
}
|
||||
if (this.endTime && Date.parse(item.time) > Date.parse(this.endTime)) {
|
||||
flag = false;
|
||||
}
|
||||
if (this.startTime && Date.parse(item.time) < Date.parse(this.startTime)) {
|
||||
flag = false;
|
||||
}
|
||||
if (flag) {
|
||||
list.push(item);
|
||||
}
|
||||
const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
|
||||
getAlarmList(this.$route.query.group, params).then(resp => {
|
||||
this.totalData = resp.data;
|
||||
});
|
||||
this.totalData = list;
|
||||
},
|
||||
infoConfirm() {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -25,10 +25,14 @@
|
||||
>
|
||||
<el-table-column prop="time" label="日期/时间" width="150px" />
|
||||
<el-table-column prop="level" label="等级" />
|
||||
<el-table-column prop="address" label="设备类型" />
|
||||
<el-table-column prop="address" label="设备编号" />
|
||||
<el-table-column prop="address" label="故障号" />
|
||||
<el-table-column prop="address" label="故障描述" />
|
||||
<el-table-column prop="deviceCode" label="设备类型">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handleDeviceType(scope.row.deviceCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deviceCode" label="设备编号" />
|
||||
<el-table-column prop="code" label="故障号" />
|
||||
<el-table-column prop="description" label="故障描述" />
|
||||
<el-table-column prop="recover" label="已恢复">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.recover" />
|
||||
@ -44,18 +48,13 @@
|
||||
<el-table-column prop="address" label="确认时间" />
|
||||
<el-table-column prop="address" label="备注信息" width="200px" />
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="currentPage"
|
||||
:page-size="20"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="totalNum"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getAlarmList} from '@/api/simulation';
|
||||
import {deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
export default {
|
||||
name: 'AlarmLow',
|
||||
data() {
|
||||
@ -70,11 +69,13 @@ export default {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
alarmInfoList() {
|
||||
return this.$store.state.socket.simulationAlarmInfoList;
|
||||
},
|
||||
watch: {
|
||||
startTime() {
|
||||
this.queryData();
|
||||
},
|
||||
totalNum() {
|
||||
return this.alarmInfoList.length;
|
||||
endTime() {
|
||||
this.queryData();
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
@ -83,10 +84,6 @@ export default {
|
||||
this.level = level;
|
||||
this.queryData();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val;
|
||||
this.pageQuery();
|
||||
},
|
||||
handleClose() {
|
||||
this.level = '';
|
||||
this.startTime = '';
|
||||
@ -94,33 +91,14 @@ export default {
|
||||
this.show = false;
|
||||
},
|
||||
queryData() {
|
||||
const list = [];
|
||||
this.alarmInfoList.forEach(item => {
|
||||
let flag = true;
|
||||
if (this.level && item.level !== this.level) {
|
||||
flag = false;
|
||||
}
|
||||
if (this.endTime && Date.parse(item.time) > Date.parse(this.endTime)) {
|
||||
flag = false;
|
||||
}
|
||||
if (this.startTime && Date.parse(item.time) < Date.parse(this.startTime)) {
|
||||
flag = false;
|
||||
}
|
||||
if (flag) {
|
||||
list.push(item);
|
||||
}
|
||||
const params = { level: this.level, startTime: this.startTime, endTime:this.endTime };
|
||||
getAlarmList(this.$route.query.group, params).then(resp => {
|
||||
this.totalData = resp.data;
|
||||
});
|
||||
this.totalData = list;
|
||||
this.pageQuery();
|
||||
},
|
||||
pageQuery() {
|
||||
const list = [];
|
||||
this.totalData.forEach((item, index) => {
|
||||
if (index >= 20 * (this.currentPage - 1) && index < 20 * this.currentPage) {
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.tableData = list;
|
||||
handleDeviceType(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return deviceType[device.type];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -19,7 +19,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">序列号</el-col>
|
||||
<el-col :span="11">车次号</el-col>
|
||||
<el-col :span="11" :offset="2">服务号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -105,11 +105,7 @@ export default {
|
||||
if (val.length == 4) {
|
||||
this.trainNoChange(val);
|
||||
} else {
|
||||
this.addModel = {
|
||||
groupNumber: '',
|
||||
tripNumber: val,
|
||||
serviceNumber: ''
|
||||
};
|
||||
this.addModel.serviceNumber = '';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -65,7 +65,6 @@ function handle(state, data) {
|
||||
break;
|
||||
case 'Simulation_Reset': // 仿真-仿真重置消息 退出计划行车
|
||||
state.simulationReset += 1;
|
||||
state.simulationAlarmInfoList = [];
|
||||
break;
|
||||
case 'Simulation_Conversation': // 仿真-用户交互消息(聊天/命令)
|
||||
handleSimulationInfo(state, msg);
|
||||
@ -141,7 +140,6 @@ function handle(state, data) {
|
||||
break;
|
||||
case 'Simulation_Alarm':
|
||||
state.simulationAlarmInfo = msg;
|
||||
state.simulationAlarmInfoList.push(msg);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -278,8 +276,7 @@ const socket = {
|
||||
simulationTimeSync: '', // 仿真时间
|
||||
simulationIbpStatus: null,
|
||||
competitionPracticeFinish:0, // 竞赛场景结束标识
|
||||
simulationAlarmInfo: {}, // 仿真报警信息
|
||||
simulationAlarmInfoList: []
|
||||
simulationAlarmInfo: {} // 仿真报警信息
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user