更新汝阳bug
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<!--
|
||||
filename: index.vue
|
||||
author: liubin
|
||||
date: 2023-08-31 09:14:19
|
||||
@@ -20,6 +20,7 @@
|
||||
:table-props="table.tableProps"
|
||||
:table-data="table.dataManager?.dataList ?? []"
|
||||
:span-method="spanMethod"
|
||||
:max-height="tableH"
|
||||
@emitFun="(val) => handleEmitFun(table, val)"></base-table>
|
||||
<pagination
|
||||
:key="table.key + '__pagination'"
|
||||
@@ -35,8 +36,7 @@
|
||||
" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="no-data-bg">
|
||||
</div>
|
||||
<div v-else class="no-data-bg"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -44,9 +44,11 @@
|
||||
import LocalDataManager from './utils/local-data-manager';
|
||||
// import response from './response';
|
||||
import moment from 'moment';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
|
||||
export default {
|
||||
name: 'EquipmentFullParams',
|
||||
mixins: [tableHeightMixin],
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
@@ -94,7 +96,7 @@ export default {
|
||||
},
|
||||
],
|
||||
queryParams: {
|
||||
id: null,
|
||||
equipmentId: null,
|
||||
time: [new Date(aWeekAgo), new Date(today)],
|
||||
},
|
||||
tableList: [
|
||||
@@ -121,7 +123,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.id) this.$set(this.queryParams, 'id', this.id);
|
||||
if (this.id) this.$set(this.queryParams, 'equipmentId', this.id);
|
||||
if (this.code)
|
||||
this.$set(this.searchBarFormConfig[0], 'defaultSelect', this.code);
|
||||
if (this.name)
|
||||
|
||||
2323
src/views/monitoring/equipmentProcessAmount/data.js
Normal file
2323
src/views/monitoring/equipmentProcessAmount/data.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
<!--
|
||||
filename: graph.vue
|
||||
author: liubin
|
||||
date: 2023-08-31 14:00:02
|
||||
description:
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import edata from './data';
|
||||
|
||||
export default {
|
||||
name: 'LineChartInEquipmentProcessAmount',
|
||||
@@ -30,6 +31,12 @@ export default {
|
||||
right: 64,
|
||||
bottom: 56,
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
},
|
||||
},
|
||||
title: {
|
||||
show: false,
|
||||
text: '各设备加工数量',
|
||||
@@ -40,18 +47,30 @@ export default {
|
||||
left: 'center',
|
||||
top: 24,
|
||||
},
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#777',
|
||||
toolbox: {
|
||||
feature: {
|
||||
dataZoom: {
|
||||
xAxisIndex: false,
|
||||
},
|
||||
saveAsImage: {
|
||||
pixelRatio: 2,
|
||||
},
|
||||
},
|
||||
axisTick: {
|
||||
show: false,
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'slider',
|
||||
yAxisIndex: 0,
|
||||
filterMode: 'none',
|
||||
},
|
||||
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
{
|
||||
type: 'inside',
|
||||
yAxisIndex: 0,
|
||||
filterMode: 'none',
|
||||
},
|
||||
],
|
||||
yAxis: {
|
||||
type: 'category',
|
||||
data: [],
|
||||
name: '设备名',
|
||||
nameTextStyle: {
|
||||
@@ -60,12 +79,6 @@ export default {
|
||||
},
|
||||
xAxis: {
|
||||
type: 'value',
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#777',
|
||||
},
|
||||
},
|
||||
name: '数量',
|
||||
nameTextStyle: {
|
||||
fontSize: 14,
|
||||
@@ -73,7 +86,6 @@ export default {
|
||||
},
|
||||
series: [
|
||||
{
|
||||
// data: [120, 200, 150, 80, 70, 110, 130],
|
||||
data: [],
|
||||
type: 'bar',
|
||||
barWidth: 20,
|
||||
@@ -82,10 +94,8 @@ export default {
|
||||
distance: 50,
|
||||
formatter: '{c}',
|
||||
},
|
||||
showBackground: true,
|
||||
backgroundStyle: {
|
||||
color: 'rgba(180, 180, 180, 0.2)',
|
||||
},
|
||||
large: true,
|
||||
largeThreshold: 20,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -96,7 +106,7 @@ export default {
|
||||
handler: function (newVal, oldVal) {
|
||||
if (!this.chart) this.chart = echarts.init(this.$refs.chart);
|
||||
this.$nextTick(() => {
|
||||
if (this.chart) this.chart.setOption(this.updateConfig(this.option));
|
||||
if (this.chart) this.chart.setOption(this.updateConfig(this.option),true);
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<!--
|
||||
filename: index.vue
|
||||
author: liubin
|
||||
date: 2023-08-30 14:02:49
|
||||
@@ -23,15 +23,13 @@
|
||||
@mouseleave="factoryListOpen = false">
|
||||
{{ currentFactory?.label || '点我选择工厂' }}
|
||||
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
|
||||
<ul
|
||||
class="factory-list"
|
||||
v-if="sidebarContent.length"
|
||||
@click.prevent="factoryChangeHandler">
|
||||
<ul class="factory-list" v-if="sidebarContent.length">
|
||||
<li
|
||||
v-for="fc in sidebarContent"
|
||||
:key="fc.id"
|
||||
:data-value="fc.id"
|
||||
class="factory-list__item"
|
||||
@click.prevent="factoryChangeHandler(fc.id)"
|
||||
:class="{ 'is-current': fc.id == currentFactory?.id }">
|
||||
<span>
|
||||
{{ fc.label }}
|
||||
@@ -83,6 +81,7 @@
|
||||
:page="1"
|
||||
:limit="999"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
@emitFun="handleEmitFun">
|
||||
<!-- <method-btn
|
||||
v-if="tableBtn.length"
|
||||
@@ -114,10 +113,12 @@
|
||||
|
||||
<script>
|
||||
import Graph from './graph.vue';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
|
||||
export default {
|
||||
name: 'EquipmentProcessAmount',
|
||||
components: { Graph },
|
||||
mixins: [tableHeightMixin],
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
@@ -269,7 +270,7 @@ export default {
|
||||
// { prop: 'externalCode', label: '设备编码' },
|
||||
{ prop: 'equipmentId', label: '设备编码' },
|
||||
{ prop: 'equipmentName', label: '设备名称' },
|
||||
{ prop: 'totalQuantity', label: '加工数量' },
|
||||
{ prop: 'totalQuantity', label: '加工数量[片]' },
|
||||
],
|
||||
mode: 'table', // table | graph
|
||||
queryParams: {
|
||||
@@ -333,11 +334,10 @@ export default {
|
||||
if (tab.name == 'graph') this.renderKey = Math.random();
|
||||
},
|
||||
|
||||
factoryChangeHandler(event) {
|
||||
factoryChangeHandler(id) {
|
||||
this.factoryListOpen = false;
|
||||
const fcId = event.target.dataset.value;
|
||||
this.handleSidebarItemClick({ id: fcId, type: '工厂' });
|
||||
this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
|
||||
this.handleSidebarItemClick({ id: id, type: '工厂' });
|
||||
this.currentFactory = this.sidebarContent.find((item) => item.id == id);
|
||||
},
|
||||
|
||||
handleSidebarItemClick({ label, id, type }) {
|
||||
@@ -390,6 +390,7 @@ export default {
|
||||
params: this.queryParams,
|
||||
});
|
||||
this.list = data;
|
||||
if (this.activeName == 'graph') this.renderKey = Math.random();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<!--
|
||||
filename: index.vue
|
||||
author: liubin
|
||||
date: 2023-08-04 14:44:58
|
||||
@@ -17,6 +17,7 @@
|
||||
:span-method="mergeColumnHandler"
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
@emitFun="handleEmitFun"></base-table>
|
||||
<!-- :page="queryParams.pageNo"
|
||||
:limit="queryParams.pageSize" -->
|
||||
@@ -26,10 +27,12 @@
|
||||
|
||||
<script>
|
||||
import moment from 'moment';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
|
||||
export default {
|
||||
name: 'QualityRecentHours',
|
||||
components: {},
|
||||
mixins: [tableHeightMixin],
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
@@ -58,8 +61,13 @@ export default {
|
||||
const props = [
|
||||
{ prop: 'productLine', label: '产线' },
|
||||
{ prop: 'specification', label: '规格' },
|
||||
{ prop: 'equipmentName', label: '设备' },
|
||||
{ prop: 'totalQuantity', label: '生产总数' },
|
||||
{
|
||||
prop: 'equipmentName',
|
||||
width: 180,
|
||||
showOverflowtooltip: true,
|
||||
label: '设备',
|
||||
},
|
||||
{ prop: 'totalQuantity', width: 120, label: '生产总数[片]' },
|
||||
];
|
||||
|
||||
for (const key of Object.keys(hourData).sort()) {
|
||||
@@ -67,13 +75,13 @@ export default {
|
||||
// label: 'key',
|
||||
label: moment(key).format('YYYY-MM-DD HH:mm:ss'),
|
||||
children: [
|
||||
{ prop: key + '__in', label: '进数据' },
|
||||
{ prop: key + '__out', label: '出数据' },
|
||||
{ prop: key + '__nok', label: '报废数据' },
|
||||
{ prop: key + '__in', width: 100, label: '进数据[片]' },
|
||||
{ prop: key + '__out', width: 100, label: '出数据[片]' },
|
||||
{ prop: key + '__nok', width: 100, label: '报废数据[片]' },
|
||||
{
|
||||
prop: key + '__ratio',
|
||||
label: '报废率',
|
||||
filter: (val) => (val != null ? val + ' %' : '-'),
|
||||
filter: (val) => (val != null ? val.toFixed(2) : '-'),
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -88,11 +96,7 @@ 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;
|
||||
|
||||
@@ -72,16 +72,27 @@ export default {
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{
|
||||
width: 128,
|
||||
prop: 'lineName',
|
||||
label: '产线名',
|
||||
},
|
||||
{
|
||||
prop: 'workshopName',
|
||||
label: '工段名',
|
||||
showOverflowtooltip :true,
|
||||
},
|
||||
{
|
||||
width: 200,
|
||||
prop: 'equipmentName',
|
||||
label: '设备名称',
|
||||
},
|
||||
{
|
||||
width: 150,
|
||||
showOverflowtooltip :true,
|
||||
prop: 'equipmentCode',
|
||||
label: '设备编码',
|
||||
},
|
||||
{ width: 128, prop: 'inQuantity', label: '投入数' },
|
||||
{ width: 128, prop: 'outQuantity', label: '产出数' },
|
||||
{ width: 128, prop: 'inQuantity', label: '投入数[片]' },
|
||||
{ width: 128, prop: 'outQuantity', label: '产出数[片]' },
|
||||
{
|
||||
width: 128,
|
||||
prop: 'run',
|
||||
|
||||
Reference in New Issue
Block a user