|
@@ -1,4 +1,4 @@
|
|
|
-import * as echarts from "echarts";
|
|
|
+import { mapMutations , mapGetters} from "vuex";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
@@ -20,10 +20,11 @@ export default {
|
|
|
selectrowdate: {},
|
|
|
histogram_Date: [],
|
|
|
histogram_sers: [],
|
|
|
- h_Date:[],
|
|
|
+ h_Date:{},
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapMutations(["loadingStore"]),
|
|
|
/**
|
|
|
* 查询风场
|
|
|
*/
|
|
@@ -66,37 +67,49 @@ export default {
|
|
|
},
|
|
|
/**
|
|
|
* 矩阵选中 获取行数据
|
|
|
+ *
|
|
|
*/
|
|
|
changeFun(val) {
|
|
|
+ this.$store.commit("loadingStore",true);
|
|
|
let wt = [];
|
|
|
- this.histogram_Date = {};
|
|
|
+ this.histogram_Date = [];
|
|
|
this.histogram_sers = [];
|
|
|
- for (let i = 0; i < Object.keys(val).length; i++) {
|
|
|
- wt.push(val[i].windturbine);
|
|
|
+ if( Object.keys(val).length > 2){
|
|
|
+ this.$message.error('只能选俩袄!');
|
|
|
+ this.$refs.table_sty.clearSelection();
|
|
|
+ this.histogram_sers = [];
|
|
|
+ this.histogram_Date = [];
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ for (let i = 0; i < Object.keys(val).length; i++) {
|
|
|
+ wt.push(val[i].windturbine);
|
|
|
+ }
|
|
|
+ this.API
|
|
|
+ .get(
|
|
|
+ "leaderboard/fittingtopchart?wtIds=" +
|
|
|
+ wt +
|
|
|
+ "&beginDate=" +
|
|
|
+ this.beginDate +
|
|
|
+ "&endDate=" +
|
|
|
+ this.endDate
|
|
|
+ )
|
|
|
+ .then((res) => {
|
|
|
+ this.histogram_Date = [];
|
|
|
+ this.h_Date = {};
|
|
|
+ this.h_Date = res.data;
|
|
|
+ this.histogram_sers = res.data.sers;
|
|
|
+
|
|
|
+ }).catch(e=>e);
|
|
|
}
|
|
|
- this.API
|
|
|
- .get(
|
|
|
- "leaderboard/fittingtopchart?wtIds=" +
|
|
|
- wt +
|
|
|
- "&beginDate=" +
|
|
|
- this.beginDate +
|
|
|
- "&endDate=" +
|
|
|
- this.endDate
|
|
|
- )
|
|
|
- .then((res) => {
|
|
|
- this.histogram_Date = [];
|
|
|
- this.h_Date = [];
|
|
|
- this.h_Date = res.data;
|
|
|
- this.histogram_sers = res.data.sers;
|
|
|
- }).catch(e=>e);;
|
|
|
+ this.$store.commit('loadingStore',false);
|
|
|
|
|
|
},
|
|
|
- // toExcel() {
|
|
|
- // let that = this;
|
|
|
- // excelHelper.exportExcel("tableData", "拟合优度排行榜", ".xls", true);
|
|
|
- // },
|
|
|
+ toExcel() {
|
|
|
+ this.BASE.excelHelp("tableData", "拟合优度排行榜", ".xls", true);
|
|
|
+ },
|
|
|
/**
|
|
|
- * 转换格式
|
|
|
+ * 转换格式
|
|
|
+ *
|
|
|
*/
|
|
|
filter_bdate(cellValue) {
|
|
|
let date = new Date(cellValue.beginDate);
|
|
@@ -120,20 +133,26 @@ export default {
|
|
|
curveCreation() {
|
|
|
let that = this;
|
|
|
let design = [];
|
|
|
- for (let j = 0; j < Object.keys(this.histogram_sers).length; j++) {
|
|
|
- let name1 = that.histogram_sers[j];
|
|
|
- design = that.h_Date[name1];
|
|
|
- that.histogram_Date.push({
|
|
|
- type: "line",
|
|
|
- name: name1,
|
|
|
- stack: "总量",
|
|
|
- data: design,
|
|
|
- });
|
|
|
- }
|
|
|
this.dialogTableVisible = true;
|
|
|
- this.$nextTick(function () {
|
|
|
- this.ECZM.zzt_cdbqd('histogram' , this.histogram_sers , this.histogram_Date);
|
|
|
- });
|
|
|
+ for (let j = 0; j < Object.keys(this.histogram_sers).length; j++) {
|
|
|
+
|
|
|
+ let name1 = that.histogram_sers[j];
|
|
|
+ design = that.h_Date[name1];
|
|
|
+ that.histogram_Date.push({
|
|
|
+ type: "line",
|
|
|
+ name: name1,
|
|
|
+ stack: "总量",
|
|
|
+ data: design,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.$nextTick(function () {
|
|
|
+ this.ECZM.zzt_cdbqd('histogram' , this.histogram_sers , this.histogram_Date);
|
|
|
+ this.$refs.table_sty.clearSelection();
|
|
|
+ this.histogram_sers = [];
|
|
|
+ this.histogram_Date = [];
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|