添加时间

This commit is contained in:
2024-01-18 14:05:39 +08:00
parent 2e5ba8a891
commit e1015e382f
26 changed files with 477 additions and 99 deletions

View File

@@ -1,6 +1,7 @@
<template>
<div style="flex: 1;">
<Container name="各工序缺陷汇总" size="middle" style="">
<TimePrompt class="timeShow" :timestr="timestr" />
<div style="padding: 5px 10px;">
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='defectScrollBoard'/>
</div>
@@ -9,9 +10,11 @@
</template>
<script>
import Container from '../components/Container.vue';
import TimePrompt from '../components/TimePrompt';
import { switchShowTime } from '../utils'
export default {
name: 'DefectSum',
components: { Container },
components: { Container, TimePrompt },
computed: {
defectSum() {
return this.$store.state.websocket.defectSum
@@ -19,6 +22,7 @@ export default {
},
data() {
return {
timestr: '',
config: {
header: ['序号', '产线', '工序','损耗片数','缺陷类型'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
@@ -32,6 +36,9 @@ export default {
}
}
},
mounted() {
this.timestr = switchShowTime('日')
},
watch:{
defectSum: {
handler(newVal, oldVal) {
@@ -44,8 +51,16 @@ export default {
]);
this.config.data = outArr
this.$refs['defectScrollBoard'].updateRows(outArr)
this.timestr = switchShowTime('日')
}
}
}
}
</script>
</script>
<style lang='scss' scoped>
.timeShow {
position: absolute;
top: 20px;
left: 240px;
}
</style>

View File

@@ -1,25 +1,41 @@
<template>
<Container name="能源监控" size="large" style="">
<TimePrompt class="timeShow" :timestr="timestr" />
<div class="chart" style="height: 370px; margin-top: 8px;">
<EnergeMonitoringChart/>
<EnergeMonitoringChart @emitFun='dateUpdate'/>
</div>
</Container>
</template>
<script>
import Container from '../components/Container.vue';
import EnergeMonitoringChart from '../components/EnergeMonitoringChart';
import TimePrompt from '../components/TimePrompt';
import { switchShowTime } from '../utils'
export default {
name: 'EnergyMonitoring',
components: { Container, EnergeMonitoringChart },
components: { Container, EnergeMonitoringChart, TimePrompt },
data() {
return {
timestr: ''
}
},
mounted() {
this.timestr = switchShowTime('日')
},
methods: {
// 数据更新
dateUpdate() {
this.timestr = switchShowTime('日')
}
}
}
</script>
<style lang='scss' scoped>
.timeShow {
position: absolute;
top: 18px;
left: 170px;
}
.timeToggle {
position: absolute;
right: 20px;

View File

@@ -1,6 +1,7 @@
<template>
<div style="flex: 1;">
<Container name="设备报警" size="middle" style="">
<TimePrompt class="timeShow" :timestr="timestr" />
<div style="padding: 5px 10px;">
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='eqScrollBoard'/>
</div>
@@ -9,9 +10,11 @@
</template>
<script>
import Container from '../components/Container.vue';
import TimePrompt from '../components/TimePrompt';
import { switchShowTime } from '../utils'
export default {
name: 'EqAlarm',
components: { Container },
components: { Container, TimePrompt },
computed: {
sjgEquipment() {
return this.$store.state.websocket.sjgEquipment
@@ -19,6 +22,7 @@ export default {
},
data() {
return {
timestr: '',
config: {
header: ['序号', '设备名称', '设备编码','设备状态','是否故障'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
@@ -44,6 +48,7 @@ export default {
}
},
mounted(){
this.timestr = switchShowTime('日')
},
watch:{
sjgEquipment: {
@@ -57,8 +62,16 @@ export default {
]);
this.config.data = outArr
this.$refs['eqScrollBoard'].updateRows(outArr)
this.timestr = switchShowTime('日')
}
}
}
}
</script>
</script>
<style lang='scss' scoped>
.timeShow {
position: absolute;
top: 20px;
left: 170px;
}
</style>

View File

@@ -1,25 +1,41 @@
<template>
<Container name="产线产量及良品率" size="large" style="">
<TimePrompt class="timeShow" :timestr="timestr" />
<div class="chart" style="height: 370px; margin-top: 8px;">
<NumRateChart />
<NumRateChart @emitFun='dateUpdate'/>
</div>
</Container>
</template>
<script>
import Container from '../components/Container';
import NumRateChart from '../components/NumRateChart';
import TimePrompt from '../components/TimePrompt';
import { switchShowTime } from '../utils'
export default {
name: 'NumRate',
components: { Container, NumRateChart },
components: { Container, NumRateChart, TimePrompt },
data() {
return {
timestr: ''
}
},
mounted() {
this.timestr = switchShowTime('日')
},
methods: {
// 数据更新
dateUpdate() {
this.timestr = switchShowTime('日')
}
}
}
</script>
<style lang='scss' scoped>
.timeShow {
position: absolute;
top: 20px;
left: 265px;
}
.timeToggle {
position: absolute;
right: 20px;

View File

@@ -1,5 +1,6 @@
<template>
<Container name="工单监控" size="middle" style="">
<TimePrompt class="timeShow" :timestr="timestr" />
<div style="padding: 5px 10px;" class="WOMonitoring">
<dv-scroll-board :config="config" style="width:900px;height:380px" ref='worderScrollBoard'/>
</div>
@@ -7,10 +8,12 @@
</template>
<script>
import Container from '../components/Container.vue';
import TimePrompt from '../components/TimePrompt';
import { switchShowTime } from '../utils'
import { formatDate } from '@/utils'
export default {
name: 'WorkOrderMonitoring',
components: { Container },
components: { Container, TimePrompt },
computed: {
order() {
return this.$store.state.websocket.workOrder
@@ -18,6 +21,7 @@ export default {
},
data() {
return {
timestr: '',
config: {
header: ['序号', '工单名称', '规格','产线','工单状态', '计划完成时间','计划产量','实际产量'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
@@ -30,7 +34,8 @@ export default {
}
}
},
methods:{
mounted(){
this.timestr = switchShowTime('日')
},
watch:{
order: {
@@ -47,8 +52,16 @@ export default {
]);
this.config.data = outArr
this.$refs['worderScrollBoard'].updateRows(outArr)
this.timestr = switchShowTime('日')
}
}
}
}
</script>
</script>
<style lang='scss' scoped>
.timeShow {
position: absolute;
top: 20px;
left: 170px;
}
</style>