116 lines
3.0 KiB
Vue
116 lines
3.0 KiB
Vue
<template>
|
||
<div style="flex: 1">
|
||
<bottomMiddleContainer name="订单产量跟踪·万m²" icon="cockpitItemIcon" size="bottomBasic">
|
||
<!-- 1. 移除 .kpi-content 的固定高度,改为自适应 -->
|
||
<div style="display: flex;gap: 9px;padding: 14px 16px;">
|
||
<orderItem />
|
||
</div>
|
||
</bottomMiddleContainer>
|
||
</div>
|
||
</template>
|
||
<script>
|
||
import bottomMiddleContainer from './bottomMiddleContainer.vue'
|
||
// import * as echarts from 'echarts'
|
||
import topItem from './top-product-item.vue'
|
||
import coreBottomBar from './productBottomBar.vue'
|
||
import orderItem from './order-bottom-leftItem.vue'
|
||
|
||
|
||
export default {
|
||
name: 'ProductionStatus',
|
||
components: { bottomMiddleContainer, topItem, coreBottomBar, orderItem },
|
||
// mixins: [resize],
|
||
props: {
|
||
leftEqInfoData: { // 接收父组件传递的设备数据数组
|
||
type: Array,
|
||
default: () => [] // 默认空数组,避免报错
|
||
},
|
||
productionOverviewVo: { // 恢复生产概览数据(原代码注释了,需根据实际需求保留)
|
||
type: Object,
|
||
default: () => ({})
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
maintenanceTasks: [
|
||
{ id: 1, eqName: '连续化', taskName: '例行维护', },
|
||
{ id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
|
||
{ id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
|
||
// { id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
|
||
// { id: 2, eqName: '螺杆挤出', taskName: '例行维护', },
|
||
|
||
],
|
||
tableProps: [
|
||
// { prop: 'id', label: '序号', width: 50, align: 'center' },
|
||
{ prop: 'eqName', label: '攻坚指标', align: 'left' },
|
||
{ prop: 'taskName', label: '攻坚目标', align: 'left' },
|
||
{ prop: 'taskName', label: '当月实际', align: 'left' },
|
||
{ prop: 'taskName', label: '累计', align: 'left' },
|
||
|
||
]
|
||
}
|
||
},
|
||
watch: {
|
||
productionOverviewVo: {
|
||
handler(newValue, oldValue) {
|
||
this.updateChart()
|
||
},
|
||
deep: true // 若对象内属性变化需触发,需加 deep: true
|
||
}
|
||
},
|
||
mounted() {
|
||
// 初始化图表(若需展示图表,需在模板中添加对应 DOM)
|
||
// this.$nextTick(() => this.updateChart())
|
||
},
|
||
beforeDestroy() {
|
||
// 销毁图表,避免内存泄漏
|
||
},
|
||
methods: {
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style lang='scss' scoped>
|
||
.legend-group {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
/* 两个图例项之间的间距 */
|
||
}
|
||
|
||
/* 单个图例项 */
|
||
.legend-item {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
/* 图例小方块 */
|
||
.legend-dot {
|
||
display: inline-block;
|
||
width: 12px;
|
||
height: 12px;
|
||
margin-right: 5px;
|
||
border-radius: 2px;
|
||
/* 可选:轻微圆角 */
|
||
}
|
||
|
||
/* 已完成(绿色) */
|
||
.legend-dot.done {
|
||
background-color: #4CAF50;
|
||
/* 绿色,可根据需求调整色值 */
|
||
}
|
||
|
||
/* 未完成(橙色) */
|
||
.legend-dot.pending {
|
||
background-color: #FF9800;
|
||
/* 橙色,可根据需求调整色值 */
|
||
}
|
||
|
||
/* 图例文字 */
|
||
.legend-text {
|
||
font-size: 14px;
|
||
color: #333;
|
||
}
|
||
|
||
</style>
|