diff --git a/.env.dev b/.env.dev index 35ec1e31..ec8ac65b 100644 --- a/.env.dev +++ b/.env.dev @@ -1,7 +1,7 @@ ### # @Author: Do not edit # @Date: 2023-08-29 09:40:39 - # @LastEditTime: 2024-03-22 14:18:33 + # @LastEditTime: 2024-03-25 15:59:53 # @LastEditors: zhp # @Description: ### diff --git a/src/views/OperationalOverview/coldBoard.vue b/src/views/OperationalOverview/coldBoard.vue index dcea1163..dba2685b 100644 --- a/src/views/OperationalOverview/coldBoard.vue +++ b/src/views/OperationalOverview/coldBoard.vue @@ -1,7 +1,7 @@ diff --git a/src/views/OperationalOverview/components/coldDoubleYChart.vue b/src/views/OperationalOverview/components/coldDoubleYChart.vue index 12279dae..e61dbcbf 100644 --- a/src/views/OperationalOverview/components/coldDoubleYChart.vue +++ b/src/views/OperationalOverview/components/coldDoubleYChart.vue @@ -2,7 +2,7 @@ @@ -158,7 +158,7 @@ export default { legend: { itemWidth: 10, itemHeight: 10, - top: '1%', + top: '20', // right: '20px', data: ['产线产量', '产线良品率'], textStyle: { @@ -286,7 +286,7 @@ export default { } diff --git a/src/views/OperationalOverview/components/linearBarChart.vue b/src/views/OperationalOverview/components/linearBarChart.vue index f166f979..abcd3892 100644 --- a/src/views/OperationalOverview/components/linearBarChart.vue +++ b/src/views/OperationalOverview/components/linearBarChart.vue @@ -1,6 +1,6 @@ @@ -19,7 +19,7 @@ export default { }, className: { type: String, - default: 'chart' + default: 'enChart' }, width: { type: String, @@ -84,7 +84,7 @@ export default { }, methods: { initChart(nameList, dataList) { - console.log('1111', dataList); + // console.log('1111', dataList); // console.log(1) this.chart = echarts.init(document.getElementById(this.id)) // if (dataList.length !== 0) { @@ -123,13 +123,7 @@ export default { type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' } }, - grid: { - top: 30, - left: '2%', - right: '2%', - bottom: '3%', - containLabel: true - }, + grid: { top: 90, right: 60, bottom: 20, left: 90 }, // legend: { // itemWidth: 10, // itemHeight: 10, @@ -205,4 +199,11 @@ export default { } } - + diff --git a/src/views/OperationalOverview/components/pileBarChart.vue b/src/views/OperationalOverview/components/pileBarChart.vue index e03ec577..90edc21a 100644 --- a/src/views/OperationalOverview/components/pileBarChart.vue +++ b/src/views/OperationalOverview/components/pileBarChart.vue @@ -1,7 +1,7 @@ @@ -92,18 +92,20 @@ export default { methods: { initChart(nameList, topNameList, nameWasteList, passRateList, wasteList) { let rawData = [] - rawData.push(passRateList,wasteList) - // console.log(1) - const totalData = []; - for (let i = 0; i < rawData[0].length; ++i) { - let sum = 0; - for (let j = 0; j < rawData.length; ++j) { - sum += rawData[j][i]; + let colors = ['#0fdedb', '#2359ec'] + if (passRateList && wasteList) { + rawData.push(passRateList, wasteList) + // console.log(1) + const totalData = []; + for (let i = 0; i < rawData[0].length; ++i) { + let sum = 0; + for (let j = 0; j < rawData.length; ++j) { + sum += rawData[j][i]; + } + totalData.push(sum); } - totalData.push(sum); + console.log('total', totalData); } - let colors = ['#0fdedb', '#2359ec' ] - console.log('total', totalData); this.chart = echarts.init(document.getElementById(this.id)) const series = [ '良品', @@ -123,9 +125,9 @@ export default { formatter: (params) => Math.round(params.value * 1000) / 10 + '%' }, color:colors[sid], - data: rawData[sid].map((d, did) => + data: rawData.length != 0 ? rawData[sid].map((d, did) => totalData[did] <= 0 ? 0 : d / totalData[did] - ) + ) : [] }; }); // let series = [ @@ -172,6 +174,7 @@ export default { legend: { itemWidth: 12, itemHeight: 12, + top:'30', icon: 'rect', textStyle: { color: '#ffffff' diff --git a/src/views/OperationalOverview/processingBoard.vue b/src/views/OperationalOverview/processingBoard.vue index dcf702b4..3011c0cb 100644 --- a/src/views/OperationalOverview/processingBoard.vue +++ b/src/views/OperationalOverview/processingBoard.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-07-19 15:18:30 * @LastEditors: zhp - * @LastEditTime: 2024-03-21 16:07:39 + * @LastEditTime: 2024-03-25 16:54:49 * @Description: -->