|
@@ -1,7 +1,4 @@
|
|
|
-
|
|
|
import * as echarts from "echarts";
|
|
|
-// import formateDate from "@/utils/date";
|
|
|
-// import formateDate1 from "@/utils/date_1";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -163,11 +160,12 @@ export default {
|
|
|
this.selectrowdate = val;
|
|
|
},
|
|
|
query_fc() {
|
|
|
- var newData = new Date();
|
|
|
- this.beginDate = this.BASE.getBzDate(newData.getTime(), -1);
|
|
|
- this.endDate = this.BASE.getBzDate(newData.getTime(), 0);
|
|
|
- this.$http.get("powercompare/windfarmAjax?").then((res) => {
|
|
|
- this.FClist = res.data.data;
|
|
|
+ let that = this ;
|
|
|
+ var newData = new Date();
|
|
|
+ this.beginDate = this.BASE.getBzDate(newData,-1);
|
|
|
+ this.endDate = this.BASE.getBzDate(newData,0);
|
|
|
+ this.API.get("powercompare/windfarmAjax?").then((res) => {
|
|
|
+ that.FClist = res.data;
|
|
|
});
|
|
|
},
|
|
|
alert_jg() {
|
|
@@ -220,27 +218,27 @@ export default {
|
|
|
page.append("wpId", this.fc);
|
|
|
page.append("beginDate", this.beginDate);
|
|
|
page.append("endDate", this.endDate);
|
|
|
- this.$http.post("/contrast/benchmarkWpList", page).then((res) => {
|
|
|
- this.tableData = res.data.data;
|
|
|
+ this.API.post("/contrast/benchmarkWpList", page).then((res) => {
|
|
|
+ this.tableData = res.data;
|
|
|
let len = this.tableData.length;
|
|
|
for (let i = 0; i < len; i++) {
|
|
|
- // that.histogram.date[i] = formateDate(
|
|
|
- // new Date(res.data.data[i].recordDate) / 1000
|
|
|
- // );
|
|
|
+ that.histogram.date[i] = this.BASE.getBzDate(
|
|
|
+ new Date(res.data[i].recordDate) / 1000,0
|
|
|
+ );
|
|
|
|
|
|
- that.histogram.xdss[i] = res.data.data[i].xdss;
|
|
|
+ that.histogram.xdss[i] = res.data[i].xdss;
|
|
|
|
|
|
|
|
|
|
|
|
- that.histogram.gzss[i] = res.data.data[i].gzss;
|
|
|
+ that.histogram.gzss[i] = res.data[i].gzss;
|
|
|
|
|
|
|
|
|
|
|
|
- that.histogram.jxss[i] = res.data.data[i].whss;
|
|
|
+ that.histogram.jxss[i] = res.data[i].whss;
|
|
|
|
|
|
- that.histogram.xnss[i] = res.data.data[i].qfss;
|
|
|
+ that.histogram.xnss[i] = res.data[i].qfss;
|
|
|
|
|
|
- that.histogram.slss[i] = res.data.data[i].slss;
|
|
|
+ that.histogram.slss[i] = res.data[i].slss;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -250,7 +248,7 @@ export default {
|
|
|
filter_date(cellValue) {
|
|
|
let date = new Date(cellValue.recordDate);
|
|
|
|
|
|
- // return formateDate(date / 1000);
|
|
|
+ return this.BASE.getBzDate(date / 1000,0);
|
|
|
},
|
|
|
drawleidatu() {
|
|
|
var chartDom = document.getElementById("leidatu");
|
|
@@ -309,11 +307,11 @@ export default {
|
|
|
data: [
|
|
|
{
|
|
|
value: this.getChartDataValue,
|
|
|
- name: formateDate(new Date(this.wp_n_1.recordDate) / 1000),
|
|
|
+ name: this.BASE.getBzDate(new Date(this.wp_n_1.recordDate) / 1000,0),
|
|
|
},
|
|
|
{
|
|
|
value: this.getChartDataValue2,
|
|
|
- name: formateDate(new Date(this.wp_n_2.recordDate) / 1000),
|
|
|
+ name: this.BASE.getBzDate(new Date(this.wp_n_2.recordDate) / 1000,0),
|
|
|
},
|
|
|
],
|
|
|
},
|
|
@@ -368,8 +366,8 @@ export default {
|
|
|
{
|
|
|
type: "category",
|
|
|
data: [
|
|
|
- formateDate(new Date(this.wp_n_1.recordDate) / 1000),
|
|
|
- formateDate(new Date(this.wp_n_2.recordDate) / 1000),
|
|
|
+ this.BASE.getBzDate(new Date(this.wp_n_1.recordDate) / 1000,0),
|
|
|
+ this.BASE.getBzDate(new Date(this.wp_n_2.recordDate) / 1000,0),
|
|
|
],
|
|
|
axisPointer: {
|
|
|
type: "shadow",
|
|
@@ -497,6 +495,6 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.query_fc();
|
|
|
- // this.query_benchmarkWpList();
|
|
|
+ this.query_benchmarkWpList();
|
|
|
},
|
|
|
};
|