This commit is contained in:
lb
2023-09-25 15:47:39 +08:00
parent 56f209a27e
commit bbbfa9644d
10 changed files with 296 additions and 43 deletions

View File

@@ -82,10 +82,11 @@ export default {
: undefined,
].filter((v) => v),
tableProps: [
{ width: 128, prop: 'productionLine', label: '产线' },
{ width: 128, prop: 'workshopSection', label: '工段' },
{ width: 128, prop: 'equipment', label: '设备名称' },
{ prop: 'productionLine', label: '产线' },
{ prop: 'workshopSection', label: '工段' },
{ prop: 'equipment', label: '设备名称' },
{
width: 90,
prop: 'alarmGrade',
label: '报警级别',
filter: publicFormatter(this.DICT_TYPE.EQU_ALARM_LEVEL),

View File

@@ -7,6 +7,7 @@
<template>
<div class="chart-wrapper">
<div class="blue-title">各设备加工数量</div>
<div class="chart" ref="chart"></div>
</div>
</template>
@@ -30,7 +31,7 @@ export default {
bottom: 56,
},
title: {
show: true,
show: false,
text: '各设备加工数量',
textStyle: {
color: '#232323',
@@ -132,4 +133,22 @@ export default {
width: 100%;
// background: lightcoral;
}
.blue-title {
position: relative;
padding: 4px 0;
padding-left: 12px;
font-size: 14px;
&::before {
content: '';
position: absolute;
left: 0;
top: 6px;
height: 16px;
width: 4px;
border-radius: 1px;
background: #0b58ff;
}
}
</style>

View File

@@ -21,7 +21,7 @@
title="点击切换工厂"
@mouseenter="factoryListOpen = true"
@mouseleave="factoryListOpen = false">
{{ currentFactory?.label || '工厂名称' }}
{{ currentFactory?.label || '点我选择工厂' }}
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
<ul
class="factory-list"
@@ -47,7 +47,7 @@
class="custom-tree-class"
:data="currentFactory?.children"
:props="treeProps"
:empty-text="' - 暂无数据 - '"
:empty-text="''"
icon-class="custom-icon-class"
@node-click="handleSidebarItemClick">
<!-- <div class="custom-tree-node" slot-scope="{ node, data }">
@@ -268,7 +268,8 @@ export default {
tableProps: [
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
{ prop: 'externalCode', label: '设备编码' },
// { prop: 'externalCode', label: '设备编码' },
{ prop: 'equipmentId', label: '设备编码' },
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'totalQuantity', label: '加工数量' },
],
@@ -526,6 +527,7 @@ li {
}
.custom-tree-class >>> .el-tree-node__content {
width: 100%;
height: auto !important;
padding: 8px 12px !important;
}

View File

@@ -25,6 +25,8 @@
</template>
<script>
import moment from 'moment';
export default {
name: 'QualityRecentHours',
components: {},
@@ -62,7 +64,8 @@ export default {
for (const key of Object.keys(hourData).sort()) {
const subprop = {
label: key,
// label: 'key',
label: moment(key).format('YYYY-MM-DD HH:mm:ss'),
children: [
{ prop: key + '__in', label: '进数据' },
{ prop: key + '__out', label: '出数据' },
@@ -85,7 +88,11 @@ export default {
this.list.splice(0);
let rowIndex = 0;
for (const line of list) {
const { productLine, specification, data } = line;
const {
productLine,
specification = [],
data,
} = line;
// 设置span的行数
this.spanInfo[rowIndex] = data.length;

View File

@@ -110,7 +110,7 @@ export default {
},
{
prop: 'statusRecordTime',
label: '状态记录时间',
label: '状态记录时间',
width: 180,
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
@@ -217,7 +217,7 @@ export default {
const { data } = await this.$axios({
url: '/base/equipment/listByLine',
method: 'get',
query: { id },
params: { id },
});
return data;
},