|
@@ -23,7 +23,7 @@
|
|
|
justify-content: end;
|
|
|
margin-right: 53px;
|
|
|
">
|
|
|
- <!-- <div v-for="item in showpowerLegend" :key="item.name">
|
|
|
+ <div v-for="item in showpowerLegend" :key="item.name">
|
|
|
<span class="lineColor" :style="{ background: item.color }"></span>
|
|
|
<span class="powerLegendColor" :style="{ background: item.color }"></span>
|
|
|
<span :style="!theme ? 'color: #fff' : ''" style="
|
|
@@ -32,7 +32,7 @@
|
|
|
position: relative;
|
|
|
top: 1px;
|
|
|
">{{ item.name }}</span>
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="chart-name">
|
|
|
<div class="point point-left bottom"></div>
|
|
@@ -48,7 +48,7 @@
|
|
|
</div>
|
|
|
<!-- 两个按钮及以上 class="styleData" -->
|
|
|
<div class="styleOneData">
|
|
|
- <span class="changeStyle" @click="getWindorSunDate('风速')">风速</span>
|
|
|
+ <!-- <span class="changeStyle" @click="getWindorSunDate('风速')">风速</span> -->
|
|
|
<!-- <span
|
|
|
:class="sunShow ? 'changeStyle' : 'defaultSty'"
|
|
|
@click="getWindorSunDate('辐照度')"
|
|
@@ -1579,7 +1579,7 @@
|
|
|
}
|
|
|
if (datas.data.dataFormatList.length > 0) {
|
|
|
datas.data.dataFormatList.forEach((iten) => {
|
|
|
- // if (iten.name !== "短期") {
|
|
|
+ if (iten.name !== "短期") {
|
|
|
legend.push(iten.name);
|
|
|
let seriesObj = {
|
|
|
name: iten.name,
|
|
@@ -1590,7 +1590,7 @@
|
|
|
symbol: "none",
|
|
|
};
|
|
|
series.push(seriesObj);
|
|
|
- // }
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
that.getPowerLine("lineChart", "今日功率预测", xAxis, legend, series);
|
|
@@ -1655,65 +1655,65 @@
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: "axis",
|
|
|
- // formatter: name === "lineChart" ?
|
|
|
- // (item) => {
|
|
|
- // let str =
|
|
|
- // `<span style="display:inline-block;margin-bottom: 5px">${item[0].axisValue}</span></br>`;
|
|
|
- // let strMsg = "";
|
|
|
- // if (item.length > 1) {
|
|
|
- // item.forEach((it, index) => {
|
|
|
- // // if (index !== 3) {
|
|
|
- // if (it.seriesName !== "超短期") {
|
|
|
- // strMsg = `<div style="margin-bottom: 5px">
|
|
|
- // <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${it.color};\"></span>
|
|
|
- // <span style="display:inline-block;">${it.seriesName}:</span> <span>${it.value}</span>
|
|
|
- // </div>`;
|
|
|
-
|
|
|
- // // this.showpowerLegend[index].name = it.seriesName;
|
|
|
- // // this.showpowerLegend[index].color = it.color;
|
|
|
- // } else {
|
|
|
- // if (it.axisValue === "00:15:00") {
|
|
|
- // it.color = "#e96366";
|
|
|
- // }
|
|
|
- // strMsg = `<div style="margin-bottom: 5px">
|
|
|
- // <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
|
|
|
- // it.color
|
|
|
- // };\"></span>
|
|
|
- // <span style="display:inline-block;">${
|
|
|
- // it.color === "#e96366" ? "超短期" : "短期"
|
|
|
- // }:</span> <span>${it.value}</span>
|
|
|
- // </div>`;
|
|
|
- // // if (it.color === "#e96366") {
|
|
|
- // // this.showpowerLegend[index].name = "超短期";
|
|
|
- // // } else {
|
|
|
- // // this.showpowerLegend[index].name = "短期";
|
|
|
- // // }
|
|
|
- // // this.showpowerLegend[index].color = it.color;
|
|
|
- // }
|
|
|
- // str = str + strMsg;
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // if (item[0].axisValue === "00:15:00") {
|
|
|
- // item[0].color = "#e96366";
|
|
|
- // }
|
|
|
- // strMsg = `<div style="margin-bottom: 5px">
|
|
|
- // <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
|
|
|
- // item[0].color
|
|
|
- // };\"></span>
|
|
|
- // <span style="display:inline-block;">${
|
|
|
- // item[0].color === "#e96366" ? "超短期" : "短期"
|
|
|
- // }:</span> <span>${item[0].value}</span>
|
|
|
- // </div>`;
|
|
|
- // // if (item[0].color === "#e96366") {
|
|
|
- // // this.showpowerLegend[3].name = "超短期";
|
|
|
- // // } else {
|
|
|
- // // this.showpowerLegend[3].name = "短期";
|
|
|
- // // }
|
|
|
- // // this.showpowerLegend[3].color = item[0].color;
|
|
|
- // str = str + strMsg;
|
|
|
- // }
|
|
|
- // return str;
|
|
|
- // } : "",
|
|
|
+ formatter: name === "lineChart" ?
|
|
|
+ (item) => {
|
|
|
+ let str =
|
|
|
+ `<span style="display:inline-block;margin-bottom: 5px">${item[0].axisValue}</span></br>`;
|
|
|
+ let strMsg = "";
|
|
|
+ if (item.length > 1) {
|
|
|
+ item.forEach((it, index) => {
|
|
|
+ // if (index !== 3) {
|
|
|
+ if (it.seriesName !== "超短期") {
|
|
|
+ strMsg = `<div style="margin-bottom: 5px">
|
|
|
+ <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${it.color};\"></span>
|
|
|
+ <span style="display:inline-block;">${it.seriesName}:</span> <span>${it.value}</span>
|
|
|
+ </div>`;
|
|
|
+
|
|
|
+ // this.showpowerLegend[index].name = it.seriesName;
|
|
|
+ // this.showpowerLegend[index].color = it.color;
|
|
|
+ } else {
|
|
|
+ if (it.axisValue === "00:15:00") {
|
|
|
+ it.color = "#e96366";
|
|
|
+ }
|
|
|
+ strMsg = `<div style="margin-bottom: 5px">
|
|
|
+ <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
|
|
|
+ it.color
|
|
|
+ };\"></span>
|
|
|
+ <span style="display:inline-block;">${
|
|
|
+ it.color === "#e96366" ? "超短期" : "短期"
|
|
|
+ }:</span> <span>${it.value}</span>
|
|
|
+ </div>`;
|
|
|
+ // if (it.color === "#e96366") {
|
|
|
+ // this.showpowerLegend[index].name = "超短期";
|
|
|
+ // } else {
|
|
|
+ // this.showpowerLegend[index].name = "短期";
|
|
|
+ // }
|
|
|
+ // this.showpowerLegend[index].color = it.color;
|
|
|
+ }
|
|
|
+ str = str + strMsg;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ if (item[0].axisValue === "00:15:00") {
|
|
|
+ item[0].color = "#e96366";
|
|
|
+ }
|
|
|
+ strMsg = `<div style="margin-bottom: 5px">
|
|
|
+ <span style="display:inline-block;margin-right:4px;margin-top:3px;border-radius:10px;width:10px;height:10px;background-color:${
|
|
|
+ item[0].color
|
|
|
+ };\"></span>
|
|
|
+ <span style="display:inline-block;">${
|
|
|
+ item[0].color === "#e96366" ? "超短期" : "短期"
|
|
|
+ }:</span> <span>${item[0].value}</span>
|
|
|
+ </div>`;
|
|
|
+ // if (item[0].color === "#e96366") {
|
|
|
+ // this.showpowerLegend[3].name = "超短期";
|
|
|
+ // } else {
|
|
|
+ // this.showpowerLegend[3].name = "短期";
|
|
|
+ // }
|
|
|
+ // this.showpowerLegend[3].color = item[0].color;
|
|
|
+ str = str + strMsg;
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+ } : "",
|
|
|
},
|
|
|
// axisPointer: {
|
|
|
// link: {
|
|
@@ -1741,7 +1741,7 @@
|
|
|
right: name !== "lineChart1" ? "20" : "20%",
|
|
|
data: legend,
|
|
|
// show: name === 'lineChart' ? false : true
|
|
|
- show: true,
|
|
|
+ show: false,
|
|
|
// formatter: name === 'lineChart' ? (name, type) => {
|
|
|
// // debugger
|
|
|
// if (!type) {
|