@@ -253,7 +256,7 @@ export default {
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
- param: 'recordTime',
+ param: 'timerange',
},
{
parent: 'dateFilterType',
@@ -264,7 +267,7 @@ export default {
placeholder: '选择日期',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
- param: 'recordTime',
+ param: 'timeday',
},
],
},
@@ -383,22 +386,18 @@ export default {
if (btnName == 'search') {
this.queryParams.factoryId = payload.factoryId || null;
this.queryParams.lineId = payload.lineId || null;
- if (payload.recordTime != null) {
- if (typeof payload.recordTime == 'string') {
- if (payload.recordTime.trim() !== '') {
- this.queryParams.recordTime = [
- `${payload.recordTime} 00:00:00`,
- `${payload.recordTime} 23:59:59`,
- ];
- }
- } else {
- this.queryParams.recordTime = payload.recordTime;
- }
- } else {
- this.queryParams.recordTime = null;
+ if (0 == payload.dateFilterType) {
+ this.queryParams.recordTime = payload.timerange;
+ } else if (1 == payload.dateFilterType) {
+ this.queryParams.recordTime = [
+ `${payload.timeday} 00:00:00`,
+ `${payload.timeday} 23:59:59`,
+ ];
}
- this.getList();
+ } else {
+ this.queryParams.recordTime = null;
}
+ this.getList();
},
cancel() {
diff --git a/src/views/equipment/analysis/quality/components/lineChart.vue b/src/views/equipment/analysis/quality/components/lineChart.vue
index b91b93f1..025af935 100644
--- a/src/views/equipment/analysis/quality/components/lineChart.vue
+++ b/src/views/equipment/analysis/quality/components/lineChart.vue
@@ -37,8 +37,14 @@ export default {
option() {
const opt = [];
this.list.map((eq) => {
- /** [设备名, ok数量, 不ok数量] */
- opt.push([eq.equipmentName, eq.okQuantity, eq.nokQuantity]);
+ /** [设备名, ok数量, 不ok数量, 加工数量, 合格率] */
+ opt.push([
+ eq.equipmentName,
+ eq.okQuantity,
+ eq.nokQuantity,
+ eq.totalQuantity,
+ eq.passRate.toFixed(2),
+ ]);
});
return {
color: ['#288AFF', '#8EF0AB'],
@@ -51,7 +57,7 @@ export default {
legend: {
itemWidth: 12,
itemHeight: 12,
- right: 0
+ right: 0,
},
grid: {
left: '1%',
@@ -104,6 +110,17 @@ export default {
stack: 's',
data: opt.map((item) => item[2]),
},
+ {
+ name: '加工数量',
+ type: 'bar',
+ barWidth: 20,
+ data: opt.map((item) => item[3]),
+ },
+ {
+ name: '合格率',
+ type: 'line',
+ data: opt.map((item) => item[4]),
+ },
],
};
},
diff --git a/src/views/equipment/timing-diagram/status/index.vue b/src/views/equipment/timing-diagram/status/index.vue
index ac4769a9..5e80e852 100644
--- a/src/views/equipment/timing-diagram/status/index.vue
+++ b/src/views/equipment/timing-diagram/status/index.vue
@@ -6,7 +6,9 @@
-->
-