update 设备分析-状态时序图

This commit is contained in:
lb 2023-08-31 16:58:17 +08:00
parent 62256b57a5
commit 0158a11644
3 changed files with 72 additions and 13 deletions

View File

@ -7,7 +7,7 @@
<template>
<div class="sequence-graph">
<SequenceGraphItem />
<SequenceGraphItem v-for="eq in Object.keys(list)" :key="eq" />
</div>
</template>
@ -23,7 +23,55 @@ export default {
},
},
data() {
return {};
return {
list: {
打孔机: {
equipmentId: 1,
equipmentName: 'EQ1',
status: '',
startTime: '',
duration: '',
startPos: '',
relativeDuring: '',
},
磨边机: {
equipmentId: 12,
equipmentName: 'EQ2',
status: '',
startTime: '',
duration: '',
startPos: '',
relativeDuring: '',
},
清洗机: {
equipmentId: 13,
equipmentName: 'EQ3',
status: '',
startTime: '',
duration: '',
startPos: '',
relativeDuring: '',
},
窑炉: {
equipmentId: 14,
equipmentName: 'EQ4',
status: '',
startTime: '',
duration: '',
startPos: '',
relativeDuring: '',
},
AGV: {
equipmentId: 15,
equipmentName: 'EQ5',
status: '',
startTime: '',
duration: '',
startPos: '',
relativeDuring: '',
},
},
};
},
computed: {},
methods: {},

View File

@ -42,6 +42,8 @@ export default {
<style scoped lang="scss">
.sequence-graph-item {
background: #fff;
padding: 12px;
width: 40px;
height: 32px;
display: inline-block;

View File

@ -117,14 +117,15 @@ export default {
label: '时间段',
dateType: 'daterange', // datetimerange
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
// valueFormat: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'timestamp',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
defaultTime: ['00:00:00', '23:59:59'],
param: 'timeVal',
width: 350,
defaultSelect: [new Date(aWeekAgo), new Date(today)],
// defaultSelect: [new Date(aWeekAgo), new Date(today)],
},
{
type: 'button',
@ -439,9 +440,23 @@ export default {
},
methods: {
/** 查询 */
handleQuery() {},
async handleQuery() {
const { data } = this.$axios({
url: '/monitoring/equipment-monitor/runLog',
method: 'get',
params: this.queryParams,
});
console.log('data', data);
},
handleSearchBarBtnClick() {},
async handleSearchBarBtnClick({ btnName, timeVal }) {
if (timeVal && timeVal.length > 0) {
this.queryParams.time = timeVal;
} else {
this.queryParams.time = [];
}
await this.handleQuery();
},
handleEmitFun(table, val) {
console.log('table val', table, val);
@ -467,15 +482,9 @@ export default {
<style scoped>
.full-param-page {
/* overflow-y: auto; */
background: lightblue;
position: relative;
}
/* .full-param-page >>> .baseTable:not(:last-child) {
margin-bottom: 18px;
} */
.tables {
display: grid;
grid-template-columns: 1fr 1fr;
@ -483,6 +492,6 @@ export default {
}
.tables >>> .baseTable {
overflow-x: hidden;
overflow-x: hidden;
}
</style>