|
@@ -28,7 +28,7 @@
|
|
|
<view class="UChartContainer">
|
|
|
<view class="windStationUChart">
|
|
|
<view class="windStationQiun-charts">
|
|
|
- <canvas canvas-id="windStationCanvasLineC" id="windStationCanvasLineC" class="windStationCharts" @touchstart="c"></canvas>
|
|
|
+ <canvas canvas-id="windStationCanvasLineC" id="windStationCanvasLineC" class="windStationCharts" @touchstart="touchLineB3"></canvas>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="UChartTitle">风速功率曲线图</view>
|
|
@@ -82,6 +82,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import uCharts from '../tools/u-charts/u-charts.js';
|
|
|
+ var _self;
|
|
|
+ var canvaLineB3 = null;
|
|
|
export default {
|
|
|
data: function() {
|
|
|
return {
|
|
@@ -103,9 +106,7 @@
|
|
|
},
|
|
|
methods: {
|
|
|
getWindfieldid:function(plusDrawerList) {
|
|
|
- this.plusDrawerList = plusDrawerList;
|
|
|
- console.log(this.plusDrawerList)
|
|
|
-
|
|
|
+ this.plusDrawerList = plusDrawerList;
|
|
|
},
|
|
|
getWindfielddata:function(index_windStation_cardmodule){
|
|
|
this.cardmodule = false;
|
|
@@ -119,9 +120,25 @@
|
|
|
getUchartData:function(lineChartdata){
|
|
|
this.lineChartdata = [];
|
|
|
this.lineChartdata = lineChartdata;
|
|
|
- console.log(this.lineChartdata);
|
|
|
+ this.getLinAcharts();
|
|
|
},
|
|
|
getLinAcharts: function() {
|
|
|
+ Date.prototype.Format = function(fmt) {
|
|
|
+ var o = {
|
|
|
+ 'M+': this.getMonth() + 1, //月份
|
|
|
+ 'd+': this.getDate(), //日
|
|
|
+ 'h+': this.getHours(), //小时
|
|
|
+ 'm+': this.getMinutes(), //分
|
|
|
+ 's+': this.getSeconds(), //秒
|
|
|
+ 'q+': Math.floor((this.getMonth() + 3) / 3), //季度
|
|
|
+ S: this.getMilliseconds() //毫秒
|
|
|
+ };
|
|
|
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
|
|
|
+ for (var k in o)
|
|
|
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[
|
|
|
+ k]).substr(('' + o[k]).length));
|
|
|
+ return fmt;
|
|
|
+ };
|
|
|
let LineC = {
|
|
|
categories: [],
|
|
|
series: [{
|
|
@@ -177,35 +194,26 @@
|
|
|
let _this = this;
|
|
|
LineC.categories = [];
|
|
|
LineC.series[0].data = [];
|
|
|
- for (var i = 0; i < _this.index_curve_columnar_windSpeed_powermodule.index_curve_columnar_windSpeed_powermodule[
|
|
|
- 'KB_FDC']['gl'].length; i++) {
|
|
|
+ console.log( _this.lineChartdata)
|
|
|
+ for (var i = 0; i < _this.lineChartdata.length; i++) {
|
|
|
+
|
|
|
let time = new Date(
|
|
|
- _this.index_curve_columnar_windSpeed_powermodule.index_curve_columnar_windSpeed_powermodule['KB_FDC'][
|
|
|
- 'gl'
|
|
|
- ][i].pointTime * 1000
|
|
|
+ _this.lineChartdata[i].value2.pointTime * 1000
|
|
|
).Format('hh');
|
|
|
-
|
|
|
+ // console.log(time)
|
|
|
LineC.categories.push(time);
|
|
|
//console.log(_this.index_curve_columnar_windSpeed_powermodule.index_curve_columnar_windSpeed_powermodule['MHS_FDC']['gl'][i].pointValueInDouble);
|
|
|
LineC.series[0].data.push(
|
|
|
- _this.index_curve_columnar_windSpeed_powermodule.index_curve_columnar_windSpeed_powermodule['KB_FDC'][
|
|
|
- 'gl'
|
|
|
- ][i].pointValueInDouble
|
|
|
+ _this.lineChartdata[i].value2.pointValueInDouble
|
|
|
);
|
|
|
LineC.series[1].data.push(
|
|
|
- _this.index_curve_columnar_windSpeed_powermodule.index_curve_columnar_windSpeed_powermodule['KB_FDC'][
|
|
|
- 'fs'
|
|
|
- ][i].pointValueInDouble
|
|
|
+ _this.lineChartdata[i].value4.pointValueInDouble
|
|
|
);
|
|
|
LineC.series[2].data.push(
|
|
|
- _this.index_curve_columnar_windSpeed_powermodule.index_curve_columnar_windSpeed_powermodule['KB_FDC'][
|
|
|
- 'llgl'
|
|
|
- ][i].pointValueInDouble
|
|
|
+ _this.lineChartdata[i].value3.pointValueInDouble
|
|
|
);
|
|
|
LineC.series[3].data.push(
|
|
|
- _this.index_curve_columnar_windSpeed_powermodule.index_curve_columnar_windSpeed_powermodule['KB_FDC'][
|
|
|
- 'ycgl'
|
|
|
- ][i].pointValueInDouble
|
|
|
+ _this.lineChartdata[i].value1.pointValueInDouble
|
|
|
);
|
|
|
}
|
|
|
_this.showWindStationCardLineA3('windStationCanvasLineC', LineC);
|