|
@@ -207,7 +207,7 @@ import {
|
|
|
swdlList,
|
|
|
lyxsList,
|
|
|
} from "@/api/curveAnalyse";
|
|
|
-import dataJson from "./dataJson.json"
|
|
|
+import dataJson from "./dataJson.json";
|
|
|
export default {
|
|
|
name: "curveAnalyse",
|
|
|
components: {
|
|
@@ -242,18 +242,18 @@ export default {
|
|
|
barList: [],
|
|
|
tableData: [],
|
|
|
tableHead: [
|
|
|
- "一月",
|
|
|
- "二月",
|
|
|
- "三月",
|
|
|
- "四月",
|
|
|
- "五月",
|
|
|
- "六月",
|
|
|
- "七月",
|
|
|
- "八月",
|
|
|
- "九月",
|
|
|
- "十月",
|
|
|
- "十一月",
|
|
|
- "十二月",
|
|
|
+ "一月(%)",
|
|
|
+ "二月(%)",
|
|
|
+ "三月(%)",
|
|
|
+ "四月(%)",
|
|
|
+ "五月(%)",
|
|
|
+ "六月(%)",
|
|
|
+ "七月(%)",
|
|
|
+ "八月(%)",
|
|
|
+ "九月(%)",
|
|
|
+ "十月(%)",
|
|
|
+ "十一月(%)",
|
|
|
+ "十二月(%)",
|
|
|
],
|
|
|
company: "",
|
|
|
companyOptions: [],
|
|
@@ -323,77 +323,77 @@ export default {
|
|
|
this.BASE.showLoading();
|
|
|
switch (this.selectValue) {
|
|
|
case "发电量":
|
|
|
- // this.dataChange(dataJson.data.fdldata)
|
|
|
+ // this.dataChange(dataJson.data.fdldata)
|
|
|
fdlList({
|
|
|
companys: this.company,
|
|
|
type: this.tabIndex,
|
|
|
year: this.monthChange(this.searchYear),
|
|
|
}).then(({ data: res }) => {
|
|
|
- this.dataChange(res.data)
|
|
|
+ this.dataChange(res.data);
|
|
|
});
|
|
|
break;
|
|
|
|
|
|
case "综合场用电量":
|
|
|
- // this.dataChange(dataJson.data.zhcydldata)
|
|
|
+ // this.dataChange(dataJson.data.zhcydldata)
|
|
|
zhcydlList({
|
|
|
companys: this.company,
|
|
|
type: this.tabIndex,
|
|
|
year: this.monthChange(this.searchYear),
|
|
|
}).then(({ data: res }) => {
|
|
|
- this.dataChange(res.data)
|
|
|
+ this.dataChange(res.data);
|
|
|
});
|
|
|
break;
|
|
|
case "上网电量":
|
|
|
- // this.dataChange(dataJson.data.swdldata)
|
|
|
+ // this.dataChange(dataJson.data.swdldata)
|
|
|
swdlList({
|
|
|
companys: this.company,
|
|
|
type: this.tabIndex,
|
|
|
year: this.monthChange(this.searchYear),
|
|
|
}).then(({ data: res }) => {
|
|
|
- this.dataChange(res.data)
|
|
|
+ this.dataChange(res.data);
|
|
|
});
|
|
|
break;
|
|
|
case "购网电量":
|
|
|
- // this.dataChange(dataJson.data.gwdldata)
|
|
|
+ // this.dataChange(dataJson.data.gwdldata)
|
|
|
gwdlList({
|
|
|
companys: this.company,
|
|
|
type: this.tabIndex,
|
|
|
year: this.monthChange(this.searchYear),
|
|
|
}).then(({ data: res }) => {
|
|
|
- this.dataChange(res.data)
|
|
|
+ this.dataChange(res.data);
|
|
|
});
|
|
|
break;
|
|
|
case "利用小时":
|
|
|
- // this.dataChange(dataJson.data.lyxsdata)
|
|
|
+ // this.dataChange(dataJson.data.lyxsdata)
|
|
|
lyxsList({
|
|
|
companys: this.company,
|
|
|
type: this.tabIndex,
|
|
|
year: this.monthChange(this.searchYear),
|
|
|
}).then(({ data: res }) => {
|
|
|
- this.dataChange(res.data)
|
|
|
+ this.dataChange(res.data);
|
|
|
});
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
dataChange(res) {
|
|
|
- if (res.length) {
|
|
|
- let arr = [
|
|
|
- {
|
|
|
- wpname: "",
|
|
|
- data: {
|
|
|
- wpname: "期次",
|
|
|
- current: "本期",
|
|
|
- sameperiod: "同期",
|
|
|
- },
|
|
|
+ if (res.length) {
|
|
|
+ let arr = [
|
|
|
+ {
|
|
|
+ wpname: "",
|
|
|
+ data: {
|
|
|
+ wpname: "期次",
|
|
|
+ current: "本期",
|
|
|
+ sameperiod: "同期",
|
|
|
},
|
|
|
- ];
|
|
|
- this.tableData = [...arr, ...res];
|
|
|
- this.rowClick(res[res.length - 1]);
|
|
|
- } else {
|
|
|
- this.BASE.closeLoading();
|
|
|
- this.barList = [];
|
|
|
- this.tableData = [];
|
|
|
- }
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ this.tableData = [...arr, ...res];
|
|
|
+ this.rowClick(res[res.length - 1]);
|
|
|
+ } else {
|
|
|
+ this.BASE.closeLoading();
|
|
|
+ this.barList = [];
|
|
|
+ this.tableData = [];
|
|
|
+ }
|
|
|
},
|
|
|
monthChange(data) {
|
|
|
let year = new Date(data).getFullYear().toString();
|
|
@@ -416,7 +416,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
initialization() {
|
|
|
- // this.dataChange(dataJson.data.fdldata)
|
|
|
+ // this.dataChange(dataJson.data.fdldata)
|
|
|
companys().then(({ data: res }) => {
|
|
|
if (res.data) {
|
|
|
this.companyOptions = res.data;
|