|
@@ -20,28 +20,37 @@ export default {
|
|
|
year: "2021",
|
|
|
month: "01",
|
|
|
activeName: "no_1",
|
|
|
- loading:true,
|
|
|
- loading2:true,
|
|
|
- loading3:true,
|
|
|
+ loading: true,
|
|
|
+ loading2: true,
|
|
|
+ loading3: true,
|
|
|
xllist: [],
|
|
|
scatter_1: [],
|
|
|
scatter_2: [],
|
|
|
scatter_3: [],
|
|
|
};
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() { },
|
|
|
methods: {
|
|
|
+ /**
|
|
|
+ * 查询风场
|
|
|
+ */
|
|
|
query_wpid() {
|
|
|
let that = this;
|
|
|
let newData = new Date();
|
|
|
- this.year = newData.getFullYear()+'';
|
|
|
- let month = newData.getMonth()+1;
|
|
|
- if(month<10){that.month='0'+month};
|
|
|
- this.$http.get("powercompare/windfarmAjax?").then((res) => {
|
|
|
- this.wpIdslist = res.data.data;
|
|
|
- // this.query_xml();
|
|
|
+ this.year = newData.getFullYear() + '';
|
|
|
+ let month = newData.getMonth() +'';
|
|
|
+ if(this.month==0){that.month=12;that.year=that.year-1};
|
|
|
+ if (month < 10) { that.month = '0' + month };
|
|
|
+ this.API.get("powercompare/windfarmAjax?").then((res) => {
|
|
|
+ this.wpIdslist = res.data;
|
|
|
+ this.query_xml();
|
|
|
+ this.query_xl();
|
|
|
});
|
|
|
+ this.query_xl();
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 当前卡片判断
|
|
|
+ */
|
|
|
handleClick() {
|
|
|
if (this.activeName == "no_1") {
|
|
|
this.query_scatter_1();
|
|
@@ -51,15 +60,21 @@ export default {
|
|
|
this.query_scatter_3();
|
|
|
}
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 查线路
|
|
|
+ */
|
|
|
query_xl() {
|
|
|
this.xl = "";
|
|
|
Object.assign(this.$data.xlIdslist, this.$options.data().xlIdslist);
|
|
|
- this.$http
|
|
|
- .get("powercompare/lineAjax?pjIds=" + this.xllist)
|
|
|
+ this.API
|
|
|
+ .get("powercompare/lineWpIdAjax?wpId=" + this.fc)
|
|
|
.then((res) => {
|
|
|
- this.xlIdslist = res.data.data;
|
|
|
+ this.xlIdslist = res.data;
|
|
|
});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 查数据
|
|
|
+ */
|
|
|
query_scatter_1() {
|
|
|
let that = this;
|
|
|
Object.assign(this.$data.scatter_1, this.$options.data().scatter_1);
|
|
@@ -69,11 +84,11 @@ export default {
|
|
|
digital.append("pjId", "");
|
|
|
digital.append("year", this.year);
|
|
|
digital.append("month", this.month);
|
|
|
- this.$http.post("/scatter/scatterAjax", digital).then((res) => {
|
|
|
+ this.API.postL("/scatter/scatterAjax", digital).then((res) => {
|
|
|
this.scatter_1 = res.data.data;
|
|
|
- this.loading1=false;
|
|
|
- this.draw_scatter_diagram_1();
|
|
|
-
|
|
|
+ this.loading1 = false;
|
|
|
+ this.ECZM.sdt("scatter_diagram_1",this.scatter_1);
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
query_scatter_2() {
|
|
@@ -85,11 +100,11 @@ export default {
|
|
|
digital.append("pjId", this.pj);
|
|
|
digital.append("year", this.year);
|
|
|
digital.append("month", this.month);
|
|
|
- this.$http.post("/scatter/scatterAjax", digital).then((res) => {
|
|
|
+ this.API.postL("/scatter/scatterAjax", digital).then((res) => {
|
|
|
this.scatter_2 = res.data.data;
|
|
|
- this.loading2=false;
|
|
|
- this.draw_scatter_diagram_2();
|
|
|
-
|
|
|
+ this.loading2 = false;
|
|
|
+ this.ECZM.sdt("scatter_diagram_2",this.scatter_2);
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
query_scatter_3() {
|
|
@@ -100,12 +115,15 @@ export default {
|
|
|
digital.append("pjId", "");
|
|
|
digital.append("year", this.year);
|
|
|
digital.append("month", this.month);
|
|
|
- this.$http.post("/scatter/scatterAjax", digital).then((res) => {
|
|
|
+ this.API.postL("/scatter/scatterAjax", digital).then((res) => {
|
|
|
this.scatter_3 = res.data.data;
|
|
|
- this.loading3=false;
|
|
|
- this.draw_scatter_diagram_3();
|
|
|
+ this.loading3 = false;
|
|
|
+ this.ECZM.sdt("scatter_diagram_3",this.scatter_3);
|
|
|
});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 查项目
|
|
|
+ */
|
|
|
query_xml() {
|
|
|
let that = this;
|
|
|
Object.assign(this.$data.xllist, this.$options.data().xllist);
|
|
@@ -113,16 +131,18 @@ export default {
|
|
|
this.pj = "";
|
|
|
this.xl = "";
|
|
|
this.xllist = [];
|
|
|
- this.$http
|
|
|
+ this.API
|
|
|
.get("powercompare/projectAjax?wpIds=" + this.fc)
|
|
|
.then((res) => {
|
|
|
- this.pjIdslist = res.data.data;
|
|
|
+ this.pjIdslist = res.data;
|
|
|
for (let i = 0; i < Object.keys(this.pjIdslist).length; i++) {
|
|
|
that.xllist.push(that.pjIdslist[i].id);
|
|
|
}
|
|
|
- this.query_xl();
|
|
|
});
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 过滤
|
|
|
+ */
|
|
|
filter() {
|
|
|
for (let i = 0; i < Object.keys(this.QBlist).length; i++) {
|
|
|
fjj = "";
|
|
@@ -134,263 +154,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- draw_scatter_diagram_1() {
|
|
|
- var chartDom = document.getElementById("scatter_diagram_1");
|
|
|
- var myChart = echarts.init(chartDom);
|
|
|
- var option;
|
|
|
-
|
|
|
-
|
|
|
- option = {
|
|
|
- title: {
|
|
|
- text: "风机功率排布情况",
|
|
|
- lft: "300px",
|
|
|
- },
|
|
|
- legend: {
|
|
|
- data: ["功率"],
|
|
|
- right: "66px",
|
|
|
- },
|
|
|
-
|
|
|
- tooltip: {
|
|
|
- show: false,
|
|
|
- trigger: "axis",
|
|
|
- axisPointer: {
|
|
|
- type: "cross",
|
|
|
- },
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- type: "value",
|
|
|
- scale: true,
|
|
|
- splitLine: {
|
|
|
- lineStyle: {
|
|
|
- type: "dashed",
|
|
|
- },
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- formatter: "{value} m/s",
|
|
|
- },
|
|
|
- splitNumber: 20,
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- type: "value",
|
|
|
- scale: true,
|
|
|
- min: -40,
|
|
|
- splitLine: {
|
|
|
- lineStyle: {
|
|
|
- type: "dashed",
|
|
|
- },
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- formatter: "{value} 万kw",
|
|
|
- },
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "功率",
|
|
|
- type: "scatter",
|
|
|
- color: "#FF7F50",
|
|
|
- data: this.scatter_1,
|
|
|
- markPoint: {
|
|
|
- data: [
|
|
|
- { type: "max", name: "最大值" },
|
|
|
- { type: "min", name: "最小值" },
|
|
|
- ],
|
|
|
- symbol: "pin",
|
|
|
- symbolSize: 50,
|
|
|
- silent: true,
|
|
|
- },
|
|
|
- markLine: {
|
|
|
- data: [{ type: "average", name: "平均值" }],
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- name: "line",
|
|
|
- type: "line",
|
|
|
- smooth: true,
|
|
|
- datasetIndex: 1,
|
|
|
- symbolSize: 0.1,
|
|
|
- symbol: "circle",
|
|
|
- color: "#87CEFA",
|
|
|
- label: { show: false },
|
|
|
- labelLayout: { dx: -20 },
|
|
|
- encode: { label: 2, tooltip: 1 },
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
-
|
|
|
- option && myChart.setOption(option);
|
|
|
- },
|
|
|
- draw_scatter_diagram_2() {
|
|
|
- var chartDom = document.getElementById("scatter_diagram_2");
|
|
|
- var myChart = echarts.init(chartDom);
|
|
|
- var option;
|
|
|
-
|
|
|
- option = {
|
|
|
- title: {
|
|
|
- text: "项目功率排布情况",
|
|
|
- left: "300px",
|
|
|
- },
|
|
|
- legend: {
|
|
|
- data: ["功率"],
|
|
|
- right: "66px",
|
|
|
- },
|
|
|
-
|
|
|
- tooltip: {
|
|
|
- show: false,
|
|
|
- trigger: "axis",
|
|
|
- axisPointer: {
|
|
|
- type: "cross",
|
|
|
- },
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- splitLine: {
|
|
|
- lineStyle: {
|
|
|
- type: "dashed",
|
|
|
- },
|
|
|
- },
|
|
|
- scale: true,
|
|
|
- axisLabel: {
|
|
|
- formatter: "{value} m/s",
|
|
|
- },
|
|
|
- splitNumber: 20,
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- min: -40,
|
|
|
- splitLine: {
|
|
|
- lineStyle: {
|
|
|
- type: "dashed",
|
|
|
- },
|
|
|
- scale: true,
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- formatter: "{value} 万kw",
|
|
|
- },
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "功率",
|
|
|
- type: "scatter",
|
|
|
- color: "#FF7F50",
|
|
|
- data: this.scatter_2,
|
|
|
- markPoint: {
|
|
|
- data: [
|
|
|
- { type: "max", name: "最大值" },
|
|
|
- { type: "min", name: "最小值" },
|
|
|
- ],
|
|
|
- symbol: "pin",
|
|
|
- symbolSize: 50,
|
|
|
- silent: true,
|
|
|
- },
|
|
|
- markLine: {
|
|
|
- data: [{ type: "average", name: "平均值" }],
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- name: "line",
|
|
|
- type: "line",
|
|
|
- smooth: true,
|
|
|
- datasetIndex: 1,
|
|
|
- symbolSize: 0.1,
|
|
|
- symbol: "circle",
|
|
|
- color: "#87CEFA",
|
|
|
- label: { show: false },
|
|
|
- labelLayout: { dx: -20 },
|
|
|
- encode: { label: 2, tooltip: 1 },
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
-
|
|
|
- option && myChart.setOption(option);
|
|
|
- },
|
|
|
- draw_scatter_diagram_3() {
|
|
|
- var chartDom = document.getElementById("scatter_diagram_3");
|
|
|
- var myChart = echarts.init(chartDom);
|
|
|
- var option;
|
|
|
-
|
|
|
-
|
|
|
- option = {
|
|
|
- title: {
|
|
|
- text: "线路功率排布情况",
|
|
|
- left: "300px",
|
|
|
- },
|
|
|
- legend: {
|
|
|
- data: ["功率"],
|
|
|
- right: "66px",
|
|
|
- },
|
|
|
-
|
|
|
- tooltip: {
|
|
|
- show: false,
|
|
|
- trigger: "axis",
|
|
|
- axisPointer: {
|
|
|
- type: "cross",
|
|
|
- },
|
|
|
- },
|
|
|
- xAxis: {
|
|
|
- splitLine: {
|
|
|
- lineStyle: {
|
|
|
- type: "dashed",
|
|
|
- },
|
|
|
- },
|
|
|
- scale: true,
|
|
|
- axisLabel: {
|
|
|
- formatter: "{value} m/s",
|
|
|
- },
|
|
|
- splitNumber: 20,
|
|
|
- },
|
|
|
- yAxis: {
|
|
|
- min: -40,
|
|
|
- splitLine: {
|
|
|
- lineStyle: {
|
|
|
- type: "dashed",
|
|
|
- },
|
|
|
- },
|
|
|
- axisLabel: {
|
|
|
- formatter: "{value} 万kw",
|
|
|
- },
|
|
|
- },
|
|
|
- series: [
|
|
|
- {
|
|
|
- name: "功率",
|
|
|
- type: "scatter",
|
|
|
- color: "#FF7F50",
|
|
|
- data: this.scatter_3,
|
|
|
- markPoint: {
|
|
|
- data: [
|
|
|
- { type: "max", name: "最大值" },
|
|
|
- { type: "min", name: "最小值" },
|
|
|
- ],
|
|
|
- symbol: "pin",
|
|
|
- symbolSize: 50,
|
|
|
- silent: true,
|
|
|
- },
|
|
|
- // emphasis: {
|
|
|
- // label: {
|
|
|
- // show: true,
|
|
|
- // position: "top",
|
|
|
- // distance: 4,
|
|
|
- // fontStyle: "italic",
|
|
|
- // }
|
|
|
- // },
|
|
|
- markLine: {
|
|
|
- data: [{ type: "average", name: "平均值" }],
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- name: "line",
|
|
|
- type: "line",
|
|
|
- smooth: true,
|
|
|
- datasetIndex: 1,
|
|
|
- symbolSize: 0.1,
|
|
|
- symbol: "circle",
|
|
|
- color: "#87CEFA",
|
|
|
- label: { show: false },
|
|
|
- labelLayout: { dx: -20 },
|
|
|
- encode: { label: 2, tooltip: 1 },
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
-
|
|
|
- option && myChart.setOption(option);
|
|
|
- },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.query_wpid();
|