From f51abffcdd194a7e040c9b50ade6fc01b3e502f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com>
Date: Tue, 7 Nov 2023 14:49:34 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9C=8B=E6=9D=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/board/caseShell/index2.vue | 45 +-
src/views/board/door/index.vue | 6 +-
src/views/board/finalAssembly/index.vue | 6 +-
src/views/board/foaming/index.vue | 4 +-
src/views/board/week/index.vue | 1067 ++++++++++++++++++++++-
5 files changed, 1087 insertions(+), 41 deletions(-)
diff --git a/src/views/board/caseShell/index2.vue b/src/views/board/caseShell/index2.vue
index a8d73f8..2e6dc3d 100644
--- a/src/views/board/caseShell/index2.vue
+++ b/src/views/board/caseShell/index2.vue
@@ -165,7 +165,7 @@ export default {
containLabel: true,
},
legend: {
- data: e.chart1.y.map(val=>val.name),
+ data: e.liner.ImportAndExportStatistics.y.map(val => val.name),
right: 'center',
top: 0,
textStyle: {
@@ -177,7 +177,7 @@ export default {
},
xAxis: {
type: "category",
- data: e.chart1.x,
+ data: e.liner.ImportAndExportStatistics.x,
axisLine: {
lineStyle: {
color: "white",
@@ -207,7 +207,7 @@ export default {
},
series: [
{
- name: e.chart1.y[0].name,
+ name: e.liner.ImportAndExportStatistics.y[0].name,
type: "bar",
barWidth: "30%",
barMaxWidth: 50,
@@ -220,15 +220,15 @@ export default {
},
{
offset: 1,
- color: "#f5804d",
+ color: "#5affa6",
},
]),
},
},
- data: e.chart1.y[0].data,
+ data: e.liner.ImportAndExportStatistics.y[0].data,
},
{
- name: e.chart1.y[1].name,
+ name: e.liner.ImportAndExportStatistics.y[1].name,
type: "bar",
barWidth: "30%",
barMaxWidth: 50,
@@ -237,16 +237,16 @@ export default {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
- color: "#47cbfd",
+ color: "#4adfff",
},
{
offset: 1,
- color: "#3e8aff",
+ color: "#3d7aff",
},
]),
},
},
- data: e.chart1.y[1].data,
+ data: e.liner.ImportAndExportStatistics.y[1].data,
},
],
})
@@ -352,6 +352,17 @@ export default {
],
})
this.$refs.chart3.setData({
+ legend: {
+ data: e.liner.foamFixtureState.y.map(val => val.name),
+ right: 'center',
+ top: 0,
+ textStyle: {
+ color: "#fff",
+ },
+ itemWidth: 12,
+ itemHeight: 10,
+ // itemGap: 35
+ },
tooltip: {
trigger: "axis",
axisPointer: {
@@ -368,7 +379,7 @@ export default {
},
xAxis: {
type: "category",
- data: e.chart14.x,
+ data: e.liner.foamFixtureState.x,
axisLine: {
lineStyle: {
color: "white",
@@ -396,11 +407,11 @@ export default {
},
axisLabel: {},
},
- series: [
- {
- name: e.chart14.y.name,
+ series: e.liner.foamFixtureState.y.map(val => {
+ return {
+ name: val.name,
type: "bar",
- barWidth: "30%",
+ barWidth: 100 / (e.liner.foamFixtureState.y.length + 2) + "%",
barMaxWidth: 50,
itemStyle: {
normal: {
@@ -416,9 +427,9 @@ export default {
]),
},
},
- data: e.chart14.y.data,
- },
- ],
+ data: val.data,
+ }
+ })
})
})
},
diff --git a/src/views/board/door/index.vue b/src/views/board/door/index.vue
index f360d5a..c5c31b4 100644
--- a/src/views/board/door/index.vue
+++ b/src/views/board/door/index.vue
@@ -358,7 +358,7 @@ export default {
},
xAxis: {
type: "category",
- data: e.chart7.x,
+ data: e.chart3.x,
axisLine: {
lineStyle: {
color: "white",
@@ -388,7 +388,7 @@ export default {
},
series: [
{
- name: e.chart7.y.name,
+ name: e.chart3.y.name,
type: "bar",
barWidth: "30%",
barMaxWidth: 50,
@@ -406,7 +406,7 @@ export default {
]),
},
},
- data: e.chart7.y.data,
+ data: e.chart3.y.data,
},
],
})
diff --git a/src/views/board/finalAssembly/index.vue b/src/views/board/finalAssembly/index.vue
index 7a04634..097570e 100644
--- a/src/views/board/finalAssembly/index.vue
+++ b/src/views/board/finalAssembly/index.vue
@@ -98,7 +98,7 @@ export default {
'工单计划',
'泡后库存',
'小时产量',
- '出入库统计',
+ '库存统计',
],
titlePosition: [
{
@@ -302,7 +302,7 @@ export default {
},
xAxis: {
type: "category",
- data: e.chart7.x,
+ data: e.chart3.x,
axisLine: {
lineStyle: {
color: "white",
@@ -350,7 +350,7 @@ export default {
]),
},
},
- data: e.chart7.y.data,
+ data: e.chart3.y.data,
},
],
})
diff --git a/src/views/board/foaming/index.vue b/src/views/board/foaming/index.vue
index b7deee2..5d4ce08 100644
--- a/src/views/board/foaming/index.vue
+++ b/src/views/board/foaming/index.vue
@@ -754,8 +754,8 @@ export default {
yAxis: [
{
type: "value",
- min: 0,
- // max: 140,
+ min: 18,
+ max: 24,
splitNumber: 4,
splitLine: {
show: true,
diff --git a/src/views/board/week/index.vue b/src/views/board/week/index.vue
index 49c97d2..9870c8d 100644
--- a/src/views/board/week/index.vue
+++ b/src/views/board/week/index.vue
@@ -11,8 +11,59 @@
-
<
-
+
+
+
+ 编号
+
+
+ 型号
+
+
+ 计划数量
+
+
+ 完成数量
+
+
+ 差异值
+
+
+
+
+
+
+ {{ item.value1 }}
+
+
+ {{ item.value2 }}
+
+
+ {{ item.value3 }}
+
+
+ {{ item.value4 }}
+
+
+ {{ item.value5 }}
+
+
+
+
@@ -38,11 +89,12 @@
-
+
+
@@ -105,13 +157,976 @@ export default {
waitTime: 0,
},
scrollTableData: [],
-
+ safeDayHtml: null
}
},
- mounted(){
+ mounted() {
+ getData().then(e => {
+ this.scrollTableData = e.table8
+ })
+ let min = Math.ceil(Math.min(...[61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],))
+ let max = Math.ceil(Math.max(...[61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],))
+ const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
+
+ this.$refs.manpowerAttendance.setData({
+ color: ['#33a2fe', '#33a2fe', '#33a2fe', '#33a2fe', '#33a2fe'],
+ grid: {
+ top: "20%",
+ bottom: "15%",
+ right: "5%"
+ },
+ dataZoom: [],
+ xAxis: {
+ margin: 10,
+ nameTextStyle: {
+ color: '#c0c3cd',
+ padding: [0, 0, -10, 0],
+ fontSize: 14,
+ },
+ axisLabel: {
+ color: '#c0c3cd', //X轴文字
+ fontSize: 14,
+ interval: 0,
+ margin: 20,
+ rotate: -20,
+ },
+ axisTick: {
+ lineStyle: {
+ color: '#0B1535',
+ width: 1,
+ },
+ show: false,
+ },
+ splitLine: {
+ show: false,
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#384267',
+ width: 1,
+ type: 'dashed',
+ },
+ show: true,
+ },
+ data: ['0时', '2时', '4时', '6时', '8时', '10时', '12时', '14时'],
+ type: 'category',
+ },
+ yAxis: {
+ type: 'value',
+ nameTextStyle: {
+ color: '#c0c3cd',
+ padding: [0, 0, -10, 0],
+ fontSize: 14,
+ },
+ axisLabel: {
+ color: '#c0c3cd', //Y轴文字
+ fontSize: 14,
+ },
+ axisTick: {
+ lineStyle: {
+ color: '#384267',
+ width: 1,
+ },
+ show: true,
+ },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: '#384267',
+ type: 'line',
+ },
+ },
+ axisLine: {
+ lineStyle: {
+ color: '#fff',
+ width: 1,
+ type: 'line',
+ },
+ show: false,
+ },
+ },
+ series: [
+ {
+ data: [38, 60, 40, 55, 42, 39, 45, 40],
+ type: 'pictorialBar',
+ barMaxWidth: 'auto',
+ barWidth: 1.5 * vw,
+ symbol: 'rect',
+ itemStyle: {
+ color: function (val) {
+ if ([38, 60, 40, 55, 42, 39, 45, 40].length - val.dataIndex === 1) {
+ return 'red'
+ } else if ([38, 60, 40, 55, 42, 39, 45, 40].length - val.dataIndex === 2) {
+ return 'yellow'
+
+ } else {
+ return '#35AAFE'
+ }
+ }
+ },
+ label: {
+ normal: {
+ show: true,
+ position: "top",
+ textStyle: {
+ color: "#a8aab0",
+ fontStyle: "normal",
+ fontFamily: "微软雅黑",
+ fontSize: 0.75 * vw,
+ },
+ },
+ }
+ },
+ {
+ data: [38, 60, 40, 55, 42, 39, 45, 40],
+ type: 'pictorialBar',
+ barWidth: 1.5 * vw,
+ symbolPosition: 'end',
+ symbol: 'diamond',
+ itemStyle: {
+ color: function (val) {
+ if ([38, 60, 40, 55, 42, 39, 45, 40].length - val.dataIndex === 1) {
+ return 'red'
+ } else if ([38, 60, 40, 55, 42, 39, 45, 40].length - val.dataIndex === 2) {
+ return 'yellow'
+
+ } else {
+ return '#66c8ff'
+ }
+ }
+ },
+ symbolOffset: ['0%', '-50%'],
+ symbolSize: [1.5 * vw, 10],
+ zlevel: 4,
+ },
+ {
+ data: [38, 60, 40, 55, 42, 39, 45, 40].map(val => 1),
+ type: 'pictorialBar',
+ barWidth: 1.5 * vw,
+ symbolPosition: 'end',
+ symbol: 'diamond',
+ itemStyle: {
+ color: function (val) {
+ if ([38, 60, 40, 55, 42, 39, 45, 40].length - val.dataIndex === 1) {
+ return 'red'
+ } else if ([38, 60, 40, 55, 42, 39, 45, 40].length - val.dataIndex === 2) {
+ return 'yellow'
+
+ } else {
+ return '#66c8ff'
+ }
+ }
+ },
+ symbolOffset: ['0%', '-20%'],
+ symbolSize: [1.5 * vw, 10],
+ zlevel: 4,
+ },
+ // {
+ // type: 'pictorialBar',
+ // name: 'pictorial element',
+ // symbol: function (val, index) {
+ // // return 'image://' + 'http://10.100.70.5:9090/' + data.yImg[index.dataIndex]
+ // },
+ // symbolSize: [40, 40],
+ // z: 10,
+ // data: [38, 60, 40, 55, 42, 39, 45, 40].map(val => {
+ // return {
+ // value: val,
+ // symbolPosition: 'end',
+ // symbolOffset: [0, '-190%']
+ // }
+ // })
+ // },
+ ]
+ })
+ this.$refs.topLeft.setData({
+ grid: {
+ top: "20%",
+ left: "1%",
+ right: "5%",
+ bottom: "1%",
+ containLabel: true,
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow'
+ }
+ },
+ legend: {
+ right: '0',
+ data: ['计划', '实际'],
+ textStyle: {
+ fontSize: 0.75 * vw,
+ color: "#F1F1F3",
+ },
+ },
+ xAxis: [
+ {
+ type: 'category',
+ axisTick: {show: false},
+ axisLabel: {
+ rotate: -20,
+ margin: 20,
+ textStyle: {
+ fontSize: 0.75 * vw,
+ color: "#F1F1F3",
+ },
+ },
+ data: ['A-01', 'A-02', 'A-03', 'A-04', 'A-05', 'A-06', 'A-07']
+ }
+ ],
+ yAxis: [
+ {
+ axisLabel: {
+ textStyle: {
+ fontSize: 0.75 * vw,
+ color: "#F1F1F3",
+ },
+ },
+ splitLine: {
+ lineStyle: {
+ color: "rgba(255,255,255,0.1)",
+ },
+ },
+ type: 'value'
+ }
+ ],
+ series: [
+ {
+ name: '计划',
+ type: 'bar',
+ barGap: 0,
+ emphasis: {
+ focus: 'series'
+ },
+ barWidth: '30%',
+ barMaxWidth: '50px',
+ itemStyle: {
+ //图形样式
+ normal: {
+ color: true ? '#db8151' : "#64BCEC",
+ },
+ },
+ label: {
+ show: true,
+ position: "top",
+ formatter: `{c}${''}`,
+ textStyle: {
+ color: "rgba(255,255,255,0.5)",
+ fontSize: 0.75 * vw
+ },
+ },
+ data: [22, 52, 55, 12, 35, 44, 66],
+ },
+ {
+ name: '实际',
+ type: 'bar',
+ emphasis: {
+ focus: 'series'
+ },
+ barWidth: '30%',
+ barMaxWidth: '50px',
+ barGap: '40%',
+ label: {
+ show: true,
+ position: "top",
+ formatter: `{c}${''}`,
+ textStyle: {
+ color: "rgba(255,255,255,0.5)",
+ fontSize: 0.75 * vw
+ },
+ },
+ itemStyle: {
+ //图形样式
+ normal: {
+ color: true ? '#9ce375' : "#4FD3B9",
+ },
+ },
+ data: [32, 42, 50, 22, 30, 40, 52],
+ },
+ ]
+ })
+ this.$refs.productionEfficiency.setData({
+ grid: {
+ top: "10%",
+ left: '10%',
+ right: "5%",
+ bottom: '15%',
+ // containLabel: true
+ },
+ dataZoom: [],
+ xAxis: {
+ data: ["A-1", "A-2", "A-3", "A-4", "A-5", "A-6", "A-7"],
+ axisLine: {
+ lineStyle: {
+ color: "#0177d4",
+ },
+ },
+ axisLabel: {
+ color: "#fff",
+ fontSize: 0.5 * vw,
+ interval: 0,
+ rotate: -20,
+ },
+ },
+ yAxis: {
+ nameTextStyle: {
+ color: "#fff",
+ fontSize: 16,
+ },
+ axisLine: {
+ lineStyle: {
+ color: "#0177d4",
+ },
+ },
+ axisLabel: {
+ color: "#fff",
+ fontSize: 16,
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: "#0177d4",
+ },
+ },
+ },
+ series: [
+ {
+ type: "bar",
+ barWidth: 1 * vw,
+ itemStyle: {
+ normal: {
+ color: new echarts.graphic.LinearGradient(
+ 0,
+ 0,
+ 0,
+ 1,
+ [
+ {
+ offset: 0,
+ color: "#00b0ff",
+ },
+ {
+ offset: 0.8,
+ color: "#7052f4",
+ },
+ ],
+ false
+ ),
+ },
+ },
+ label: {
+ show: true,
+ position: "top",
+ textStyle: {
+ color: "#fff",
+ fontSize: 0.75 * vw
+ },
+ },
+ data: [12, 20, 11, 30, 14, 80, 50],
+ },
+ ],
+ })
+ this.$refs.equipmentPowerOne.setData({
+ grid: {
+ top: '28%',
+ left: '5%',
+ right: '5%',
+ bottom: '0%',
+ containLabel: true,
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow',
+ label: {
+ show: true,
+ },
+ },
+ },
+ legend: {
+ top: '5%',
+ itemWidth: 20,
+ itemHeight: 10,
+ itemStyle: {
+ borderWidth: 1,
+ borderHeight: 1,
+ },
+ formatter: function (val) {
+ return `${val} `
+ },
+ textStyle: {
+ fontSize: 0.75 * vw,
+ color: function () {
+
+ },
+ },
+ },
+ xAxis: {
+ type: 'category',
+ data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ axisLine: {
+ show: true,
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: '#ffffff', //X轴文字颜色
+ },
+ },
+ },
+ yAxis: [
+ {
+ name: '合格率',
+ min: (min - 2 < 0) ? 0 : min - 2,
+ max: (max + 2 > 100) ? 100 : max + 2,
+ type: 'value',
+ nameTextStyle: {
+ color: '#fff',
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: '#eeeeee',
+ },
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLine: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ textStyle: {
+ color: '#ffffff',
+ },
+ },
+ },
+ ],
+ series: [
+ {
+ name: "内胆检漏",
+ type: 'line',
+ smooth: false,
+ showAllSymbol: true, //显示所有图形。
+ symbol: 'circle', //标记的图形为实心圆
+ symbolSize: 4, //标记的大小
+ itemStyle: {
+ //折线拐点标志的样式
+ color: '#389af4',
+ borderWidth: '2',
+ borderColor: '#389af4',
+ },
+ lineStyle: {
+ color: '#389af4',
+ },
+ label: {
+ //图形上的文本标签
+ normal: {
+ formatter: `{c}${''}`,
+ show: true,
+ position: "top",
+ textStyle: {
+ color: '#389af4',
+ fontStyle: "normal",
+ fontFamily: "微软雅黑",
+ fontSize: 0.5 * vw,
+ },
+ },
+ },
+ data: [61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],
+ },
+ ]
+ })
+ this.$refs.equipmentPowerTwo.setData({
+ grid: {
+ top: '28%',
+ left: '5%',
+ right: '5%',
+ bottom: '0%',
+ containLabel: true,
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow',
+ label: {
+ show: true,
+ },
+ },
+ },
+ legend: {
+ top: '5%',
+ itemWidth: 20,
+ itemHeight: 10,
+ itemStyle: {
+ borderWidth: 1,
+ borderHeight: 1,
+ },
+ formatter: function (val) {
+ return `${val} `
+ },
+ textStyle: {
+ fontSize: 0.75 * vw,
+ color: function () {
+
+ },
+ },
+ },
+ xAxis: {
+ type: 'category',
+ data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ axisLine: {
+ show: true,
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: '#ffffff', //X轴文字颜色
+ },
+ },
+ },
+ yAxis: [
+ {
+ name: '合格率',
+ min: (min - 2 < 0) ? 0 : min - 2,
+ max: (max + 2 > 100) ? 100 : max + 2,
+ type: 'value',
+ nameTextStyle: {
+ color: '#fff',
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: '#eeeeee',
+ },
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLine: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ textStyle: {
+ color: '#ffffff',
+ },
+ },
+ },
+ ],
+ series: [
+ {
+ name: "安全检测",
+ type: 'line',
+ smooth: false,
+ showAllSymbol: true, //显示所有图形。
+ symbol: 'circle', //标记的图形为实心圆
+ symbolSize: 4, //标记的大小
+ itemStyle: {
+ //折线拐点标志的样式
+ color: '#ff8c37',
+ borderWidth: '2',
+ borderColor: '#ff8c37',
+ },
+ lineStyle: {
+ color: '#ff8c37',
+ },
+ label: {
+ //图形上的文本标签
+ normal: {
+ formatter: `{c}${''}`,
+ show: true,
+ position: "top",
+ textStyle: {
+ color: '#ff8c37',
+ fontStyle: "normal",
+ fontFamily: "微软雅黑",
+ fontSize: 0.5 * vw,
+ },
+ },
+ },
+ data: [61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],
+ },
+ ]
+ })
+ this.$refs.equipmentPowerThree.setData({
+ grid: {
+ top: '28%',
+ left: '5%',
+ right: '5%',
+ bottom: '0%',
+ containLabel: true,
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow',
+ label: {
+ show: true,
+ },
+ },
+ },
+ legend: {
+ top: '5%',
+ itemWidth: 20,
+ itemHeight: 10,
+ itemStyle: {
+ borderWidth: 1,
+ borderHeight: 1,
+ },
+ formatter: function (val) {
+ return `${val} `
+ },
+ textStyle: {
+ fontSize: 0.75 * vw,
+ color: function () {
+
+ },
+ },
+ },
+ xAxis: {
+ type: 'category',
+ data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ axisLine: {
+ show: true,
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: '#ffffff', //X轴文字颜色
+ },
+ },
+ },
+ yAxis: [
+ {
+ name: '合格率',
+ min: (min - 2 < 0) ? 0 : min - 2,
+ max: (max + 2 > 100) ? 100 : max + 2,
+ type: 'value',
+ nameTextStyle: {
+ color: '#fff',
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: '#eeeeee',
+ },
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLine: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ textStyle: {
+ color: '#ffffff',
+ },
+ },
+ },
+ ],
+ series: [
+ {
+ name: "成品检漏",
+ type: 'line',
+ smooth: false,
+ showAllSymbol: true, //显示所有图形。
+ symbol: 'circle', //标记的图形为实心圆
+ symbolSize: 4, //标记的大小
+ itemStyle: {
+ //折线拐点标志的样式
+ color: '#ffc257',
+ borderWidth: '2',
+ borderColor: '#ffc257',
+ },
+ lineStyle: {
+ color: '#ffc257',
+ },
+ label: {
+ //图形上的文本标签
+ normal: {
+ formatter: `{c}${''}`,
+ show: true,
+ position: "top",
+ textStyle: {
+ color: '#ffc257',
+ fontStyle: "normal",
+ fontFamily: "微软雅黑",
+ fontSize: 0.5 * vw,
+ },
+ },
+ },
+ data: [61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],
+ },
+ ]
+ })
+ this.$refs.equipmentPowerFour.setData({
+ grid: {
+ top: '28%',
+ left: '5%',
+ right: '5%',
+ bottom: '0%',
+ containLabel: true,
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow',
+ label: {
+ show: true,
+ },
+ },
+ },
+ legend: {
+ top: '5%',
+ itemWidth: 20,
+ itemHeight: 10,
+ itemStyle: {
+ borderWidth: 1,
+ borderHeight: 1,
+ },
+ formatter: function (val) {
+ return `${val} `
+ },
+ textStyle: {
+ fontSize: 0.75 * vw,
+ color: function () {
+
+ },
+ },
+ },
+ xAxis: {
+ type: 'category',
+ data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ axisLine: {
+ show: true,
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: '#ffffff', //X轴文字颜色
+ },
+ },
+ },
+ yAxis: [
+ {
+ name: '合格率',
+ min: (min - 2 < 0) ? 0 : min - 2,
+ max: (max + 2 > 100) ? 100 : max + 2,
+ type: 'value',
+ nameTextStyle: {
+ color: '#fff',
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: '#eeeeee',
+ },
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLine: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ textStyle: {
+ color: '#ffffff',
+ },
+ },
+ },
+ ],
+ series: [
+ {
+ name: "测温性能",
+ type: 'line',
+ smooth: false,
+ showAllSymbol: true, //显示所有图形。
+ symbol: 'circle', //标记的图形为实心圆
+ symbolSize: 4, //标记的大小
+ itemStyle: {
+ //折线拐点标志的样式
+ color: '#fd6f97',
+ borderWidth: '2',
+ borderColor: '#fd6f97',
+ },
+ lineStyle: {
+ color: '#fd6f97',
+ },
+ label: {
+ //图形上的文本标签
+ normal: {
+ formatter: `{c}${''}`,
+ show: true,
+ position: "top",
+ textStyle: {
+ color: '#fd6f97',
+ fontStyle: "normal",
+ fontFamily: "微软雅黑",
+ fontSize: 0.5 * vw,
+ },
+ },
+ },
+ data: [61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],
+ },
+ ]
+ })
+ this.$refs.equipmentPowerFive.setData({
+ grid: {
+ top: '28%',
+ left: '5%',
+ right: '5%',
+ bottom: '0%',
+ containLabel: true,
+ },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'shadow',
+ label: {
+ show: true,
+ },
+ },
+ },
+ legend: {
+ top: '5%',
+ itemWidth: 20,
+ itemHeight: 10,
+ itemStyle: {
+ borderWidth: 1,
+ borderHeight: 1,
+ },
+ formatter: function (val) {
+ return `${val} `
+ },
+ textStyle: {
+ fontSize: 0.75 * vw,
+ color: function () {
+
+ },
+ },
+ },
+ xAxis: {
+ type: 'category',
+ data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
+ axisLine: {
+ show: true,
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ textStyle: {
+ color: '#ffffff', //X轴文字颜色
+ },
+ },
+ },
+ yAxis: [
+ {
+ name: '合格率',
+ min: (min - 2 < 0) ? 0 : min - 2,
+ max: (max + 2 > 100) ? 100 : max + 2,
+ type: 'value',
+ nameTextStyle: {
+ color: '#fff',
+ },
+ splitLine: {
+ show: false,
+ lineStyle: {
+ color: '#eeeeee',
+ },
+ },
+ axisTick: {
+ show: false,
+ },
+ axisLine: {
+ show: false,
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ textStyle: {
+ color: '#ffffff',
+ },
+ },
+ },
+ ],
+ series: [
+ {
+ name: "成品外观",
+ type: 'line',
+ smooth: false,
+ showAllSymbol: true, //显示所有图形。
+ symbol: 'circle', //标记的图形为实心圆
+ symbolSize: 4, //标记的大小
+ itemStyle: {
+ //折线拐点标志的样式
+ color: '#a181fc',
+ borderWidth: '2',
+ borderColor: '#a181fc',
+ },
+ lineStyle: {
+ color: '#a181fc',
+ },
+ label: {
+ //图形上的文本标签
+ normal: {
+ formatter: `{c}${''}`,
+ show: true,
+ position: "top",
+ textStyle: {
+ color: '#a181fc',
+ fontStyle: "normal",
+ fontFamily: "微软雅黑",
+ fontSize: 0.5 * vw,
+ },
+ },
+ },
+ data: [61, 25, 57, 83, 87, 73, 17, 25, 57, 83, 87, 73],
+ },
+ ]
+ })
+ this.day()
},
- methods: {}
-};
+ methods: {
+
+ day() {
+ const today = () => {
+ const currentYear = new Date().getFullYear().toString();
+ const hasTimestamp = new Date() - new Date(currentYear) + (8 * 60 * 60 * 1000);
+ const hasDays = Math.ceil(hasTimestamp / 86400000);
+ return hasDays
+ }
+ this.safeDayHtml = `
+ ${new Date().getFullYear().toString()}年连续安全生产天数
+ ${today()}天
+ 智能互联工厂
+ `
+ }
+ }
+}