Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
c90da32501
@ -322,3 +322,10 @@ export function generateTrainingData(data) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 根据mapId获取列车信息 */
|
||||||
|
export function getTrainListByMapId(mapId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/map/${mapId}/trains`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -56,58 +56,53 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="alarm-message-All">
|
<div class="alarm-message-All">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<el-collapse v-model="activeName" accordion>
|
<el-table
|
||||||
<div v-for="(item, index) in alarmDetailMessageGroup" :key="index">
|
:data="alarmDetailMessageListShow"
|
||||||
<el-collapse-item>
|
border
|
||||||
<template slot="title">
|
:cell-style="{'text-align':'center'}"
|
||||||
故障汇总:{{ item[0].levelNew }}
|
:header-cell-style="{'text-align':'center'}"
|
||||||
</template>
|
style="width: 100%"
|
||||||
<el-table
|
max-height="250"
|
||||||
:data="item"
|
>
|
||||||
border
|
<el-table-column
|
||||||
:cell-style="{'text-align':'center'}"
|
prop="time"
|
||||||
:header-cell-style="{'text-align':'center'}"
|
label="时间"
|
||||||
style="width: 100%"
|
width="100"
|
||||||
max-height="250"
|
/>
|
||||||
>
|
<el-table-column
|
||||||
<el-table-column
|
prop="levelNew"
|
||||||
prop="time"
|
label="级别"
|
||||||
label="时间"
|
width="70"
|
||||||
width="100"
|
/>
|
||||||
/>
|
<el-table-column
|
||||||
<el-table-column
|
prop="deviceCodeNew"
|
||||||
prop="levelNew"
|
label="设备"
|
||||||
label="级别"
|
width="105"
|
||||||
width="70"
|
/>
|
||||||
/>
|
<el-table-column
|
||||||
<el-table-column
|
prop="typeNew"
|
||||||
prop="deviceCodeNew"
|
label="类型"
|
||||||
label="设备"
|
width="80"
|
||||||
width="105"
|
/>
|
||||||
/>
|
<el-table-column
|
||||||
<el-table-column
|
prop="descriptionNew"
|
||||||
prop="typeNew"
|
label="信息"
|
||||||
label="类型"
|
/>
|
||||||
width="80"
|
<el-table-column
|
||||||
/>
|
prop="reason"
|
||||||
<el-table-column
|
label="原因"
|
||||||
prop="descriptionNew"
|
width="105"
|
||||||
label="信息"
|
/>
|
||||||
/>
|
</el-table>
|
||||||
<!-- <el-table-column label="操作" width="90">
|
<el-pagination
|
||||||
<template slot-scope="scope">
|
:current-page="pagination.currentPage"
|
||||||
<el-button
|
:page-size="2"
|
||||||
size="mini"
|
:pager-count="8"
|
||||||
:type="dealAlarmMessage[scope.$index] ? 'success' : 'danger'"
|
layout="total, prev, pager, next"
|
||||||
@click="handleAlarmMessage(scope.$index,scope.row)"
|
:total="pagination.total"
|
||||||
>{{ dealAlarmMessage[scope.$index] ? '已处理' : '未处理' }}</el-button>
|
@current-change="handleCurrentChange"
|
||||||
</template>
|
/>
|
||||||
</el-table-column> -->
|
</el-card></div>
|
||||||
</el-table>
|
|
||||||
</el-collapse-item>
|
|
||||||
</div>
|
|
||||||
</el-collapse></el-card>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -138,11 +133,14 @@ export default {
|
|||||||
]),
|
]),
|
||||||
showDecisionMessage:{},
|
showDecisionMessage:{},
|
||||||
alarmDetailMessageList:[],
|
alarmDetailMessageList:[],
|
||||||
alarmDetailMessageGroup:[],
|
alarmDetailMessageListShow:[],
|
||||||
showAlarmImportantMessage:{},
|
showAlarmImportantMessage:{},
|
||||||
dealAlarmMessage:[true, false],
|
|
||||||
alarmReasonMap:[],
|
alarmReasonMap:[],
|
||||||
oldShowAlarmMessage:{}
|
oldShowAlarmMessage:{},
|
||||||
|
pagination:{
|
||||||
|
total:1,
|
||||||
|
currentPage: 1
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -157,7 +155,7 @@ export default {
|
|||||||
alarmDetailMessage(newValue, oldValue) {
|
alarmDetailMessage(newValue, oldValue) {
|
||||||
if (newValue.length > 0) {
|
if (newValue.length > 0) {
|
||||||
const clone = JSON.parse(JSON.stringify(this.alarmDetailMessage));
|
const clone = JSON.parse(JSON.stringify(this.alarmDetailMessage));
|
||||||
this.alarmDetailMessageList.push(...clone);
|
this.alarmDetailMessageList.unshift(...clone);
|
||||||
this.alarmDetailMessageList.forEach((item, i)=>{
|
this.alarmDetailMessageList.forEach((item, i)=>{
|
||||||
this.$set(item, 'show', true);
|
this.$set(item, 'show', true);
|
||||||
});
|
});
|
||||||
@ -201,7 +199,7 @@ export default {
|
|||||||
showAlarmMessage.showDecisionMessage = this.decisionMessage[1];
|
showAlarmMessage.showDecisionMessage = this.decisionMessage[1];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const newAlarmMessage = this.alarmDetailMessageList.at(-1);
|
const newAlarmMessage = this.alarmDetailMessageList[0];
|
||||||
if (this.oldShowAlarmMessage.level == undefined) {
|
if (this.oldShowAlarmMessage.level == undefined) {
|
||||||
this.oldShowAlarmMessage = newAlarmMessage;
|
this.oldShowAlarmMessage = newAlarmMessage;
|
||||||
this.showAlarmImportantMessage = newAlarmMessage;
|
this.showAlarmImportantMessage = newAlarmMessage;
|
||||||
@ -211,38 +209,16 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.showAlarmImportantMessage = this.oldShowAlarmMessage;
|
this.showAlarmImportantMessage = this.oldShowAlarmMessage;
|
||||||
}
|
}
|
||||||
if (this.alarmDetailMessageGroup.length == 0) {
|
this.alarmDetailMessageListShow = this.alarmDetailMessageList.slice(0, 2);
|
||||||
this.alarmDetailMessageGroup.push([newAlarmMessage]);
|
this.pagination.total = this.alarmDetailMessageList.length;
|
||||||
this.alarmReasonMap.push(newAlarmMessage.reason);
|
|
||||||
} else if (this.alarmReasonMap.includes(newAlarmMessage.reason)) {
|
|
||||||
const index = this.alarmReasonMap.indexOf(newAlarmMessage.reason);
|
|
||||||
this.alarmDetailMessageGroup[index].push(newAlarmMessage);
|
|
||||||
} else {
|
|
||||||
this.alarmReasonMap.push(newAlarmMessage.reason);
|
|
||||||
this.alarmDetailMessageGroup.push([newAlarmMessage]);
|
|
||||||
}
|
|
||||||
this.showAlarmMessageList = true;
|
this.showAlarmMessageList = true;
|
||||||
},
|
},
|
||||||
goToAlarmDetail() {
|
goToAlarmDetail() {
|
||||||
|
},
|
||||||
|
handleCurrentChange(page) {
|
||||||
|
this.pagination.currentPage = page;
|
||||||
|
this.alarmDetailMessageListShow = this.alarmDetailMessageList.slice((page - 1) * 2, page * 2);
|
||||||
}
|
}
|
||||||
/* handleAlarmMessage(index, row) {
|
|
||||||
this.$confirm('此操作将处理故障信息, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
this.dealAlarmMessage.splice(index, 1, !this.dealAlarmMessage[index]);
|
|
||||||
this.$message({
|
|
||||||
type: 'success',
|
|
||||||
message: '处理成功!'
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消处理'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} */
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
@ -283,7 +259,7 @@ export default {
|
|||||||
.alarm-message-All{
|
.alarm-message-All{
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
.box-card{
|
.box-card{
|
||||||
padding: 0 10px;
|
padding:10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.yellow{
|
.yellow{
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<div class="scheduling_body">
|
<div class="scheduling_body">
|
||||||
<div class="scheduling_body-table">
|
<div class="scheduling_body-table">
|
||||||
<edit-table ref="table" v-loading="loading" border stripe :table-data="tableData" :table-form="tableForm" :row-style="handleRowStyle" />
|
<edit-table ref="table" v-loading="loading" border stripe :height="maxHeight" :max-height="maxHeight" :table-data="tableData" :table-form="tableForm" :row-style="handleRowStyle" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { querySechedulingNew, generateSchedulingNew, saveSchedulingNew } from '@/api/scheduling';
|
import { querySechedulingNew, generateSchedulingNew, saveSchedulingNew } from '@/api/scheduling';
|
||||||
|
import { getTrainListByMapId } from '@/api/jmap/map';
|
||||||
import { hexColor } from '@/jmapNew/theme/parser/util';
|
import { hexColor } from '@/jmapNew/theme/parser/util';
|
||||||
import EditTable from '@/views/components/editTable/index';
|
import EditTable from '@/views/components/editTable/index';
|
||||||
export default {
|
export default {
|
||||||
@ -185,16 +186,18 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
group() {
|
group() {
|
||||||
return this.$route.query.group;
|
return this.$route.query.group;
|
||||||
|
},
|
||||||
|
maxHeight() {
|
||||||
|
return this.$store.state.app.height - 200;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
mounted() {
|
||||||
'$store.state.map.mapDataLoadedCount': function () {
|
getTrainListByMapId(this.$route.query.mapId).then(resp => {
|
||||||
const trainList = this.$store.state.map.map.trainList || [];
|
|
||||||
this.groupNumberList = [];
|
this.groupNumberList = [];
|
||||||
trainList.forEach(item => {
|
resp.data.forEach(item => {
|
||||||
this.groupNumberList.push({value: item.code, label: item.groupNumber});
|
this.groupNumberList.push({value: item.code, label: item.groupNumber});
|
||||||
});
|
});
|
||||||
}
|
}).catch(e => console.error(e));
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleQuery(day) {
|
handleQuery(day) {
|
||||||
|
Loading…
Reference in New Issue
Block a user