|
@@ -227,19 +227,9 @@ export default {
|
|
ChangZhanVal() {
|
|
ChangZhanVal() {
|
|
api.benchmarkingWplist({}).then((res) => {
|
|
api.benchmarkingWplist({}).then((res) => {
|
|
this.ChangZhan = res.data;
|
|
this.ChangZhan = res.data;
|
|
- this.value1 = res.data[0].code
|
|
|
|
- this.XiangMuVal(res.data[0].code)
|
|
|
|
|
|
+ this.value1 = res.data[0].code;
|
|
|
|
+ this.XiangMuVal(res.data[0].code);
|
|
});
|
|
});
|
|
-
|
|
|
|
- // var that = this;
|
|
|
|
- // that.API.requestData({
|
|
|
|
- // method: "GET",
|
|
|
|
- // baseURL: "http://10.83.66.220:8020/",
|
|
|
|
- // subUrl: "benchmarking/wplist",
|
|
|
|
- // success(res) {
|
|
|
|
- // that.ChangZhan = res.data;
|
|
|
|
- // },
|
|
|
|
- // });
|
|
|
|
},
|
|
},
|
|
ChangZhanChange(val) {
|
|
ChangZhanChange(val) {
|
|
this.value1 = val;
|
|
this.value1 = val;
|
|
@@ -250,26 +240,13 @@ export default {
|
|
XiangMuVal(val) {
|
|
XiangMuVal(val) {
|
|
api
|
|
api
|
|
.benchmarkingWtList({
|
|
.benchmarkingWtList({
|
|
- wpid: val?val:'',
|
|
|
|
|
|
+ wpid: val ? val : "",
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.XiangMu = res.data;
|
|
this.XiangMu = res.data;
|
|
- this.value2.push(res.data[0].id)
|
|
|
|
|
|
+ this.value2.push(res.data[0].id);
|
|
this.AjaxCommon();
|
|
this.AjaxCommon();
|
|
});
|
|
});
|
|
-
|
|
|
|
- // var that = this;
|
|
|
|
- // that.API.requestData({
|
|
|
|
- // method: "GET",
|
|
|
|
- // baseURL: "http://10.83.66.220:8020/",
|
|
|
|
- // subUrl: "benchmarking/wtList",
|
|
|
|
- // data: {
|
|
|
|
- // wpid: val,
|
|
|
|
- // },
|
|
|
|
- // success(res) {
|
|
|
|
- // that.XiangMu = res.data;
|
|
|
|
- // },
|
|
|
|
- // });
|
|
|
|
},
|
|
},
|
|
XiangMuChange(val) {
|
|
XiangMuChange(val) {
|
|
var that = this;
|
|
var that = this;
|
|
@@ -293,6 +270,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
AjaxCommon() {
|
|
AjaxCommon() {
|
|
|
|
+ this.list = []
|
|
api
|
|
api
|
|
.ajaxName({
|
|
.ajaxName({
|
|
ajaxName: this.ajaxName,
|
|
ajaxName: this.ajaxName,
|
|
@@ -392,109 +370,6 @@ export default {
|
|
this.tableData.data = data2;
|
|
this.tableData.data = data2;
|
|
});
|
|
});
|
|
|
|
|
|
- // var that = this;
|
|
|
|
- // that.API.requestData({
|
|
|
|
- // method: "GET",
|
|
|
|
- // baseURL: "http://10.83.66.220:8020/",
|
|
|
|
- // subUrl: "benchmarking/" + that.ajaxName,
|
|
|
|
- // data: {
|
|
|
|
-
|
|
|
|
- // wpid: that.value1,
|
|
|
|
- // wtids: that.value2,
|
|
|
|
- // date: that.value4,
|
|
|
|
- // target: "",
|
|
|
|
- // sort: "",
|
|
|
|
- // },
|
|
|
|
- // success(res) {
|
|
|
|
- // var data = res.data,
|
|
|
|
- // data2 = [],
|
|
|
|
- // chart = [],
|
|
|
|
- // fzy = [],
|
|
|
|
- // fzyArr = [],
|
|
|
|
- // jfpl = [],
|
|
|
|
- // jfplArr = [];
|
|
|
|
- // let thisItem = [];
|
|
|
|
- // jfpl = data.pop(); //静风频率
|
|
|
|
- // fzy = data.pop(); //风资源
|
|
|
|
- // if (fzy["1"] == null) {
|
|
|
|
- // that.BASE.showMsg({
|
|
|
|
- // msg: "此风机无数据",
|
|
|
|
- // type: "success",
|
|
|
|
- // });
|
|
|
|
- // return false;
|
|
|
|
- // }
|
|
|
|
- // data.forEach((ele, index) => {
|
|
|
|
- // for (let key in ele) {
|
|
|
|
- // if (key !== "name") {
|
|
|
|
- // thisItem.push(ele[key]);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
- // var count = thisItem.length / data.length;
|
|
|
|
-
|
|
|
|
- // data.forEach((item, index) => {
|
|
|
|
- // data2.push({
|
|
|
|
- // index: index + 1,
|
|
|
|
- // name: item.name,
|
|
|
|
- // data1: thisItem[index * count],
|
|
|
|
- // data2: count >= 2 ? thisItem[index * count + 1] : [],
|
|
|
|
- // data3: count >= 3 ? thisItem[index * count + 2] : [],
|
|
|
|
- // data4: count >= 4 ? thisItem[index * count + 3] : [],
|
|
|
|
- // data5: count >= 5 ? thisItem[index * count + 4] : [],
|
|
|
|
- // is_light: false,
|
|
|
|
- // });
|
|
|
|
- // });
|
|
|
|
-
|
|
|
|
- // Object.keys(fzy).map((key) => {
|
|
|
|
- // fzyArr.push(fzy[key]);
|
|
|
|
- // });
|
|
|
|
- // Object.keys(jfpl).map((key) => {
|
|
|
|
- // jfplArr.push(jfpl[key]);
|
|
|
|
- // });
|
|
|
|
- // fzyArr.pop();
|
|
|
|
- // var jfplName = jfplArr.pop();
|
|
|
|
- // var indicator = [
|
|
|
|
- // "北",
|
|
|
|
- // "北北西",
|
|
|
|
- // "北西",
|
|
|
|
- // "西北西",
|
|
|
|
- // "西",
|
|
|
|
- // "西南西",
|
|
|
|
- // "南西",
|
|
|
|
- // "南南西",
|
|
|
|
- // "南",
|
|
|
|
- // "南南东",
|
|
|
|
- // "东南",
|
|
|
|
- // "东南东",
|
|
|
|
- // "东",
|
|
|
|
- // "东北东",
|
|
|
|
- // "北东",
|
|
|
|
- // "北北东",
|
|
|
|
- // ];
|
|
|
|
-
|
|
|
|
- // var fzyDataArr = [];
|
|
|
|
- // fzyArr.forEach((item, index) => {
|
|
|
|
- // var arr = [];
|
|
|
|
- // item.forEach((e, i) => {
|
|
|
|
- // arr.push(e.value);
|
|
|
|
- // });
|
|
|
|
- // fzyDataArr.push([
|
|
|
|
- // {
|
|
|
|
- // indicator: indicator,
|
|
|
|
- // data: [
|
|
|
|
- // {
|
|
|
|
- // value: arr,
|
|
|
|
- // },
|
|
|
|
- // ],
|
|
|
|
- // name: jfplArr[index],
|
|
|
|
- // },
|
|
|
|
- // ]);
|
|
|
|
- // });
|
|
|
|
- // that.fzyData = fzyDataArr;
|
|
|
|
- // that.tableData.data = data2;
|
|
|
|
- // },
|
|
|
|
- // });
|
|
|
|
|
|
|
|
api
|
|
api
|
|
.benchmarkingDjhxdbbottom({
|
|
.benchmarkingDjhxdbbottom({
|
|
@@ -503,115 +378,62 @@ export default {
|
|
date: this.value4,
|
|
date: this.value4,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- console.log(res);
|
|
|
|
- var data = res.data;
|
|
|
|
- var arrName = [],
|
|
|
|
- arrKey = [],
|
|
|
|
- arrData = [],
|
|
|
|
- tempArray = [];
|
|
|
|
- data.forEach((ele) => {
|
|
|
|
- for (let key in ele) {
|
|
|
|
- if (key !== "name") {
|
|
|
|
- arrKey.push(key);
|
|
|
|
- arrData.push(ele[key]);
|
|
|
|
- } else {
|
|
|
|
- arrName.push(ele[key]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- this.listName = arrName;
|
|
|
|
- for (var i = 0; i < arrKey.length - 1; i++) {
|
|
|
|
- //冒泡排序
|
|
|
|
- for (var j = 0; j < arrKey.length - 1 - i; j++) {
|
|
|
|
- if (parseInt(arrKey[j]) > parseInt(arrKey[j + 1])) {
|
|
|
|
- var temp = arrKey[j];
|
|
|
|
- arrKey[j] = arrKey[j + 1];
|
|
|
|
- arrKey[j + 1] = temp;
|
|
|
|
- var temp2 = arrData[j];
|
|
|
|
- arrData[j] = arrData[j + 1];
|
|
|
|
- arrData[j + 1] = temp2;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ console.log(res.data);
|
|
|
|
+
|
|
|
|
+ // var data = res.data;
|
|
|
|
+ // var arrName = [],
|
|
|
|
+ // arrKey = [],
|
|
|
|
+ // arrData = [],
|
|
|
|
+ // tempArray = [];
|
|
|
|
+ // data?.forEach((ele) => {
|
|
|
|
+ // for (let key in ele) {
|
|
|
|
+ // if (key !== "name") {
|
|
|
|
+ // arrKey.push(key);
|
|
|
|
+ // arrData.push(ele[key]);
|
|
|
|
+ // } else {
|
|
|
|
+ // arrName.push(ele[key]);
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // this.listName = arrName;
|
|
|
|
+ // for (var i = 0; i < arrKey.length - 1; i++) {
|
|
|
|
+ // //冒泡排序
|
|
|
|
+ // for (var j = 0; j < arrKey.length - 1 - i; j++) {
|
|
|
|
+ // if (parseInt(arrKey[j]) > parseInt(arrKey[j + 1])) {
|
|
|
|
+ // var temp = arrKey[j];
|
|
|
|
+ // arrKey[j] = arrKey[j + 1];
|
|
|
|
+ // arrKey[j + 1] = temp;
|
|
|
|
+ // var temp2 = arrData[j];
|
|
|
|
+ // arrData[j] = arrData[j + 1];
|
|
|
|
+ // arrData[j + 1] = temp2;
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // for (var i = 0; i < data.length; i++) {
|
|
|
|
+ // var arr = [];
|
|
|
|
+ // arrData.forEach((e, index) => {
|
|
|
|
+ // if (index * data.length + i < arrData.length) {
|
|
|
|
+ // arr.push({
|
|
|
|
+ // text: arrKey[index * data.length + i],
|
|
|
|
+ // value: arrData[index * data.length + i],
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // tempArray.push({
|
|
|
|
+ // title: arrName[i],
|
|
|
|
+ // value: arr,
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // this.list = res.data;
|
|
|
|
+
|
|
|
|
+ for (const key in res.data) {
|
|
|
|
+ let obj = {}
|
|
|
|
+ obj.name = key
|
|
|
|
+ obj.value = res.data[key]
|
|
|
|
+ this.list.push(obj)
|
|
}
|
|
}
|
|
- for (var i = 0; i < data.length; i++) {
|
|
|
|
- var arr = [];
|
|
|
|
- arrData.forEach((e, index) => {
|
|
|
|
- if (index * data.length + i < arrData.length) {
|
|
|
|
- arr.push({
|
|
|
|
- text: arrKey[index * data.length + i],
|
|
|
|
- value: arrData[index * data.length + i],
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- tempArray.push({
|
|
|
|
- title: arrName[i],
|
|
|
|
- value: arr,
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- console.log(tempArray);
|
|
|
|
- this.list = tempArray;
|
|
|
|
|
|
+ console.log(" this.list", this.list);
|
|
});
|
|
});
|
|
-
|
|
|
|
- // that.API.requestData({
|
|
|
|
- // method: "GET",
|
|
|
|
- // baseURL: "http://10.83.66.220:8020/",
|
|
|
|
- // subUrl: "benchmarking/djhxdbbottom",
|
|
|
|
- // data: {
|
|
|
|
- // wpid: that.value1,
|
|
|
|
- // wtids: that.value2,
|
|
|
|
- // date: that.value4,
|
|
|
|
- // },
|
|
|
|
- // success(res) {
|
|
|
|
- // console.log(res);
|
|
|
|
- // var data = res.data;
|
|
|
|
-
|
|
|
|
- // var arrName = [],
|
|
|
|
- // arrKey = [],
|
|
|
|
- // arrData = [],
|
|
|
|
- // tempArray = [];
|
|
|
|
- // data.forEach((ele) => {
|
|
|
|
- // for (let key in ele) {
|
|
|
|
- // if (key !== "name") {
|
|
|
|
- // arrKey.push(key);
|
|
|
|
- // arrData.push(ele[key]);
|
|
|
|
- // } else {
|
|
|
|
- // arrName.push(ele[key]);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
- // that.listName = arrName;
|
|
|
|
- // for (var i = 0; i < arrKey.length - 1; i++) {
|
|
|
|
- // //冒泡排序
|
|
|
|
- // for (var j = 0; j < arrKey.length - 1 - i; j++) {
|
|
|
|
- // if (parseInt(arrKey[j]) > parseInt(arrKey[j + 1])) {
|
|
|
|
- // var temp = arrKey[j];
|
|
|
|
- // arrKey[j] = arrKey[j + 1];
|
|
|
|
- // arrKey[j + 1] = temp;
|
|
|
|
- // var temp2 = arrData[j];
|
|
|
|
- // arrData[j] = arrData[j + 1];
|
|
|
|
- // arrData[j + 1] = temp2;
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // for (var i = 0; i < data.length; i++) {
|
|
|
|
- // var arr = [];
|
|
|
|
- // arrData.forEach((e, index) => {
|
|
|
|
- // if (index * data.length + i < arrData.length) {
|
|
|
|
- // arr.push({
|
|
|
|
- // text: arrKey[index * data.length + i],
|
|
|
|
- // value: arrData[index * data.length + i],
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
- // tempArray.push({
|
|
|
|
- // title: arrName[i],
|
|
|
|
- // value: arr,
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
- // console.log(tempArray);
|
|
|
|
- // that.list = tempArray;
|
|
|
|
- // },
|
|
|
|
- // });
|
|
|
|
},
|
|
},
|
|
reset() {
|
|
reset() {
|
|
//重置
|
|
//重置
|
|
@@ -623,8 +445,8 @@ export default {
|
|
TypeClick(val) {
|
|
TypeClick(val) {
|
|
this.TypeClass = val;
|
|
this.TypeClass = val;
|
|
// 重置状态start
|
|
// 重置状态start
|
|
- this.value1 = "";
|
|
|
|
- this.value2 = "";
|
|
|
|
|
|
+ // this.value1 = "";
|
|
|
|
+ // this.value2 = "";
|
|
this.value4 = this.getTime(1);
|
|
this.value4 = this.getTime(1);
|
|
this.ajaxName = this.ajaxArr[val];
|
|
this.ajaxName = this.ajaxArr[val];
|
|
this.AjaxCommon();
|
|
this.AjaxCommon();
|