Browse Source

2023-02-06 update

1. update 温度曲线  增加markLine
moccus 2 years ago
parent
commit
b77eb0904d
1 changed files with 21 additions and 0 deletions
  1. 21 0
      src/pages/dataAnalysis/tempAnalysis/index.vue

+ 21 - 0
src/pages/dataAnalysis/tempAnalysis/index.vue

@@ -102,6 +102,7 @@ const funCurrentChange = ({ current, currentNode }) => {
 }
 /**chart */
 let chartId = 1
+const powerproductionNum = ref(0)
 /**submit */
 const funSubmit = async () => {
 	const tempRes = await request.get('/temperature/rated/power', {
@@ -121,8 +122,12 @@ const funSubmit = async () => {
 		if (tempRes.data?.length) {
 			for (const chart of tempRes.data) {
 				powerproduction.value = `(额定功率=${chart.power.powerproduction}kW)` 
+				powerproductionNum.value = chart.power.powerproduction
 				barxAxis.data = Object.keys(chart.res1)
 				barSeries[0].data = Object.values(chart.res1)
+				barSeries[0].markLine.data = [{
+					yAxis: 0,
+				}]
 				chartId++
 				lineSeries.value = [
 					{
@@ -136,6 +141,15 @@ const funSubmit = async () => {
 						symbolSize: 5,
 						data: chart.res2,
 						yAxisIndex: 0,
+						markLine: {
+							symbol: 'none',
+							label: {
+								show: false,
+							},
+							data: [{
+								yAxis: powerproductionNum.value,
+							}]
+						}
 					}
 				]
 				chartId++
@@ -292,6 +306,13 @@ const barSeries = reactive([{
 	name: "",
 	type: "bar",
 	data: [],
+	markLine: {
+		symbol: 'none',
+		label: {
+			show: false,
+		},
+		data: []
+	}
 }])
 /**dialog 数据 */
 const wtDialog = ref(false)