123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293 |
- <template>
- <view>
- <!--导航栏-->
- <view @tap="closeFrame">
- <cu-custom bgColor="bg-gradual-sisBlack" :isBack="true">
- <block slot="backText">
- <view style="height: 80rpx;line-height: 80rpx;color: silver;">返回</view>
- </block>
- <block slot="content">
- <view style="color: silver;">{{ windStationName }}</view>
- </block>
- </cu-custom>
- </view>
- <!--电量卡片-->
- <view class="InformationCard" @tap="frameShow">
- <view class="informationCardAll">
- <view class="informationCardTextOne">
- <view class="informationCardText">
- <view class="textSilver">安全天数( 天 ) :</view>
- <view class="textWhite"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.aqts}}</view></view>
- </view>
- <view class="informationCardTextzj">
- <view class="textSilver">装机容量(MV):</view>
- <view class="textWhite"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.zjrl}}</view></view>
- </view>
- </view>
- <view class="informationCardTextTwo">
- <view class="informationCardTextNo1">
- <view class="textSilver">日发电量(kwh):</view>
- <view class="textWhite"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.rfdl}}</view></view>
- </view>
- <view class="informationCardText3">
- <view class="textSilver">预测发电量(kwh):</view>
- <view class="textWhite2"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.ycfdl}}</view></view>
- </view>
- <view class="informationCardText2">
- <view class="textSilver">上网电量(kwh):</view>
- <view class="textWhite"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.swdl}}</view></view>
- <view class="img"></view>
- </view>
- </view>
- </view>
- </view>
- <!-- 指标卡片 -->
- <view class="quatoCardAndFrame">
- <view class="quatoCardContainer" @tap="frameShow">
- <view :class="sanJiao"></view>
- <!-- <view class="icon cuIcon-unfold"></view> -->
- </view>
- <!-- 弹框 -->
- <view class="frame" v-show="isFrameShow">
- <view class="frameCardLeft">
- mttr(h):
- <a class="frameCardLeftValue"><view style="font-size: 12px;position: absolute;transform: scale(0.8);margin-left: -12.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.mttr}}</view></a>
- </view>
- <view class="frameCardMiddle">
- 月利用小时(h):
- <a class="frameCardMiddleValue"><view style="font-size: 12px;position: absolute;transform: scale(0.8);margin-left: -5.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.ylyxs}}</view></a>
- </view>
- <view class="frameCardRight">
- 综合场用电率(%):
- <a class="frameCardRightValue"><view style="font-size: 12px;position: absolute;transform: scale(0.8);margin-left: -5.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.zhcydl}}</view></a>
- </view>
- <view class="frameCardLeft">
- mtbf(h):
- <a class="frameCardLeftValue"><view style="font-size: 12px;position: absolute;transform: scale(0.80);margin-left: -12.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.mtbf}}</view></a>
- </view>
- <view class="frameCardMiddle">
- 年利用小时(h):
- <a class="frameCardMiddleValue"><view style="font-size: 12px;position: absolute;transform: scale(0.80);margin-left: -5.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.nlyxs}}</view></a>
- </view>
- <view class="frameCardRight">
- 设备可利用率(%):
- <a class="frameCardRightValue"><view style="font-size: 12px;position: absolute;transform: scale(0.80);margin-left: -5.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.sbklyl}}</view></a>
- </view>
- <view class="frameCardLeft">
- 节约标煤(吨):
- <a class="frameCardLeftValue"><view style="font-size: 12px;position: absolute;transform: scale(0.80);margin-left: -5.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.jybm}}</view></a>
- </view>
- <view class="frameCardMiddle">
- 节约用水(吨):
- <a class="frameCardMiddleValue"><view style="font-size: 12px;position: absolute;transform: scale(0.80);margin-left: -5.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.jyys}}</view></a>
- </view>
- <view class="frameCardRight">
- 减排二氧化碳(吨):
- <a class="frameCardRightValue"><view style="font-size: 12px;position: absolute;transform: scale(0.80);margin-left: -5.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.jpeyht}}</view></a>
- </view>
- <view class="frameCardLeft">
- 减排二氧化硫(吨):
- <a class="frameCardRightValue"><view style="font-size: 12px;position: absolute;transform: scale(0.80);margin-left: -5.5%;margin-top: 0.3%;">{{windpowerstationdetail.windpowerstationdetail_springbox_target.jpeyhl}}</view></a>
- </view>
- </view>
- </view>
- <!--风速卡片-->
- <view class="speedPower" @tap="closeFrame">
- <view class="cardinstallredSpeed">
- <view class="cardinstalltitlegreen">
- 平均风速
- <span>(km/h)</span>
- </view>
- <view class="cardinstallnumbergreen">{{windspeedpowermodule.index_windSpeed_power_target_detail.pjfs}}</view>
- <view class="cardinstallnumbergreenmin">
- <view class="greenMinText">min: {{windspeedpowermodule.index_windSpeed_power_target_detail.pjfsMin}}</view>
- </view>
- <view class="cardinstallnumbergreenmax">
- <view class="greenMaxText">max: {{windspeedpowermodule.index_windSpeed_power_target_detail.pjfsMax}}</view>
- </view>
- </view>
- <view class="cardinstallredSpeed">
- <view class="cardinstalltitlegreen">
- 预测风速
- <span>(km/h)</span>
- </view>
- <view class="cardinstallnumbergreen">{{windspeedpowermodule.index_windSpeed_power_target_detail.ycfs}}</view>
- <view class="cardinstallnumbergreenmin">
- <view class="greenMinText">min: {{windspeedpowermodule.index_windSpeed_power_target_detail.ycfsMin}}</view>
- </view>
- <view class="cardinstallnumbergreenmax">
- <view class="greenMaxText">max: {{windspeedpowermodule.index_windSpeed_power_target_detail.ycfsMax}}</view>
- </view>
- </view>
- <view class="cardinstallredSpeed">
- <view class="cardinstalltitleRed">
- 实际功率
- <span>(万kw)</span>
- </view>
- <view class="cardinstallnumberred">{{windspeedpowermodule.index_windSpeed_power_target_detail.sjgl}}</view>
- <view class="cardinstallnumberredmin">
- <view class="redMinText">min: {{windspeedpowermodule.index_windSpeed_power_target_detail.sjglMin}}</view>
- </view>
- <view class="cardinstallnumberredmax">
- <view class="redMaxText">max: {{windspeedpowermodule.index_windSpeed_power_target_detail.sjglMax}}</view>
- </view>
- </view>
- <view class="cardinstallredSpeed">
- <view class="cardinstalltitleRed">
- 理论功率
- <span>(万kw)</span>
- </view>
- <view class="cardinstallnumberred">{{windspeedpowermodule.index_windSpeed_power_target_detail.llgl}}</view>
- <view class="cardinstallnumberredmin">
- <view class="redMinText">min: {{windspeedpowermodule.index_windSpeed_power_target_detail.llglMin}}</view>
- </view>
- <view class="cardinstallnumberredmax">
- <view class="redMaxText">max: {{windspeedpowermodule.index_windSpeed_power_target_detail.llglMax}}</view>
- </view>
- </view>
- </view>
- <!-- 曲线图 -->
- <view class="lineChart" @tap="closeFrame">
- <view class="qiun-charts">
- <view class="speedPowerDiagram">风速功率曲线图</view>
- <canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchstart="touchLineA"></canvas>
- </view>
- </view>
- <!--柱状图-->
- <view class="Histogram" @tap="closeFrame">
- <view class="qiun-charts">
- <view class="PowerColunm">发电量柱状图</view>
- <canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" disable-scroll="true" @touchstart="touchColumn"
- @touchmove="moveColumn" @touchend="touchEndColumn"></canvas>
- </view>
- </view>
- </view>
- </template>
- <script>
- 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;
- };
- import uCharts from '../tools/u-charts/u-charts.js';
- var _self;
- var canvaLineA = null;
- var canvaColumn = null;
- export default {
- data: function() {
- return {
- FDC: "MHS_FDC",
- socketTask_comprehensive_target: '',
- socketTask_index_windSpeed_power_target_detail: '',
- socketTask_windpowerstationdetail_springbox_target: '',
- socketTask_windpowerstationdetail_twentyfourhourlinechart_target:'',
- socketTask_index_windStation_card:'',
- windpowerstationdetail: {
- comprehensive_target: "",
- windpowerstationdetail_springbox_target: ""
- },
- windspeedpowermodule:{
- index_windSpeed_power_target_detail:""
- },
- windspeedpowercurvedetail:{
- windpowerstationdetail_twentyfourhourlinechart_target:"",
- windpowerstationdetail_sevendaycolumn_target:""
- },
- index_windStation_cardmodule:{
- index_windStation_cardmodule:""
- },
- gl:[],
- fs:[],
- llgl:[],
- ycgl:[],
- rfdl:[],
- windStationName: '',
- isFrameShow: false,
- count: 0,
- cWidth: '',
- cHeight: '',
- pixelRatio: 1,
- serverData: '',
- sanJiao: 'sanJiaoDown',
- };
- },
- onLoad(option) {
- this.windStationName = option.option;
- if(this.windStationName == '麻黄山'){
- this.FDC = 'MHS_FDC'
- };
- if(this.windStationName == '牛首山'){
- this.FDC = 'NSS_FDC'
- };
- if(this.windStationName == "石板泉"){
- this.FDC = 'SBQ_FDC'
- };
- if(this.windStationName == "香山"){
- this.FDC = 'XS_FDC'
- };
- if(this.windStationName == "青山"){
- this.FDC = 'QS_FDC'
- };
- this.cWidth = uni.upx2px(750);
- this.cHeight = uni.upx2px(400);
-
-
- this.getServerData();
- this.getColumnServerData();
- this.comprehensive_target();
- this.windpowerstationdetail_springbox_target();
- this.index_windSpeed_power_target_detail();
- this.windpowerstationdetail_twentyfourhourlinechart_target();
- this.windpowerstationdetail_sevendaycolumn_target();
- },
- computed: {
- backStageIp: function() {
- return this.$store.state.wholeSituationBackStageIp;
- },
- backStagePort: function() {
- return this.$store.state.wholeSituationBackStagePort;
- },
- windpowerstationNameToId: function() {
- return this.$store.state.windpowerstationNameToId;
- }
- },
- methods: {
-
-
-
-
- async comprehensive_target() {
- let _this = this;
- // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
- this.socketTask_comprehensive_target = uni.connectSocket({
- // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
- url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_1',
- success(data) {
- console.log('websocket连接成功');
- }
- });
- let windpowerstationid = uni.getStorageSync('windpowerstationName');
- // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
- this.socketTask_comprehensive_target.onOpen(res => {
- console.log('WebSocket连接正常打开中...!');
- this.is_open_socket = true;
- // 注:只有连接正常打开中 ,才能正常收到消息
- this.socketTask_comprehensive_target.onMessage(res => {
- //console.log("收到服务器内容:" + res.data);
- _this.windpowerstationdetail.comprehensive_target = JSON.parse(res.data)[_this.FDC];
- });
- });
- // 这里仅是事件监听【如果socket关闭了会执行】
- /* this.socketTask_comprehensive_target.onClose(() => {
- uni.request({
- url: 'http://'+this.backStageIp+':'+this.backStagePort+'/targetdetail/close_targetdetail_target?pointKey='+this.pointKey,
- success: (res) => {
-
- }
- });
- }) */
- },
- async windpowerstationdetail_springbox_target() {
- let _this = this;
- // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
- this.socketTask_windpowerstationdetail_springbox_target = uni.connectSocket({
- // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
- url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_2',
- success(data) {
- console.log('websocket连接成功');
- }
- });
- let windpowerstationid = uni.getStorageSync('windpowerstationName');
- // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
- this.socketTask_windpowerstationdetail_springbox_target.onOpen(res => {
- console.log('WebSocket连接正常打开中...!');
- this.is_open_socket = true;
- // 注:只有连接正常打开中 ,才能正常收到消息
- this.socketTask_windpowerstationdetail_springbox_target.onMessage(res => {
- //console.log("收到服务器内容:" + res.data);
- _this.windpowerstationdetail.windpowerstationdetail_springbox_target = JSON.parse(res.data)[_this.FDC];
- });
- });
- },
- async index_windSpeed_power_target_detail() {
- let _this = this;
- // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
- this.socketTask_index_windSpeed_power_target_detail = uni.connectSocket({
- // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
- url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_3',
- success(data) {
- console.log('websocket连接成功');
- }
- });
- let windpowerstationid = uni.getStorageSync('windpowerstationName');
- // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
- this.socketTask_index_windSpeed_power_target_detail.onOpen(res => {
- console.log('WebSocket连接正常打开中...!');
- this.is_open_socket = true;
-
- // 注:只有连接正常打开中 ,才能正常收到消息
- this.socketTask_index_windSpeed_power_target_detail.onMessage(res => {
- //console.log("收到服务器内容:" + res.data);
- _this.windspeedpowermodule.index_windSpeed_power_target_detail = JSON.parse(res.data)[_this.FDC];
-
- });
- });
- },
- async windpowerstationdetail_twentyfourhourlinechart_target() {
- let _this = this;
- // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
- this.socketTask_windpowerstationdetail_twentyfourhourlinechart_target = uni.connectSocket({
- // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
- url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_4',
- success(data) {
- console.log('websocket连接成功');
- }
- });
- let windpowerstationid = uni.getStorageSync('windpowerstationName');
- // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
- this.socketTask_windpowerstationdetail_twentyfourhourlinechart_target.onOpen(res => {
- console.log('WebSocket连接正常打开中...!');
- this.is_open_socket = true;
-
- // 注:只有连接正常打开中 ,才能正常收到消息
- this.socketTask_windpowerstationdetail_twentyfourhourlinechart_target.onMessage(res => {
- //console.log("收到服务器内容:" + res.data);
- _this.windspeedpowercurvedetail.windpowerstationdetail_twentyfourhourlinechart_target = JSON.parse(res.data)[_this.FDC];
- _this.gl = _this.windspeedpowercurvedetail.windpowerstationdetail_twentyfourhourlinechart_target.gl;
- _this.fs = _this.windspeedpowercurvedetail.windpowerstationdetail_twentyfourhourlinechart_target.fs;
- _this.llgl = _this.windspeedpowercurvedetail.windpowerstationdetail_twentyfourhourlinechart_target.llgl;
- _this.ycgl = _this.windspeedpowercurvedetail.windpowerstationdetail_twentyfourhourlinechart_target.ycgl;
- _this.getServerData();
- });
- });
- },
- async windpowerstationdetail_sevendaycolumn_target() {
- let _this = this;
- // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
- this.socketTask_windpowerstationdetail_sevendaycolumn_target = uni.connectSocket({
- // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
- url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_5',
- success(data) {
- console.log('websocket连接成功');
- }
- });
- let windpowerstationid = uni.getStorageSync('windpowerstationName');
- // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
- this.socketTask_windpowerstationdetail_sevendaycolumn_target.onOpen(res => {
- console.log('WebSocket连接正常打开中...!');
- this.is_open_socket = true;
-
- // 注:只有连接正常打开中 ,才能正常收到消息
- this.socketTask_windpowerstationdetail_sevendaycolumn_target.onMessage(res => {
- //console.log("收到服务器内容:" + res.data);
- _this.windspeedpowercurvedetail.windpowerstationdetail_sevendaycolumn_target = JSON.parse(res.data)[_this.FDC];
- _this.rfdl = _this.windspeedpowercurvedetail.windpowerstationdetail_sevendaycolumn_target.rfdl;
- _this.getColumnServerData();
- });
- });
- },
- frameShow: function() {
- this.count = this.count + 1;
- if (this.count % 2 == 0) {
- this.isFrameShow = false;
- this.sanJiao = 'sanJiaoDown';
- } else {
- this.isFrameShow = true;
- this.sanJiao = 'sanJiaoUp';
- }
- },
- closeFrame: function() {
- this.count = this.count + 1;
- if (this.isFrameShow) {
- this.isFrameShow = false;
- this.sanJiao = 'sanJiaoDown';
- }
- },
- getServerData() {
- // 折线图
- let LineA = {
- categories: [
- ' 17:26',
- '18:56',
- '19:56',
- '20:56',
- '21:56',
- '22:56',
- '23:56',
- '00:56',
- '01:56',
- '02:56',
- '03:56',
- '04:56',
- '05:56',
- '06:56',
- '07:56',
- '08:56',
- '09:56',
- '10:56',
- '11:56',
- '12:56',
- '13:56',
- '14:56',
- '15:56',
- '16:56',
- '17:56 '
- ],
- series: [{
- name: '功率',
- data: [11, 12, 14, 12, 13, 12, 16, 14, 11, 13, 10, 14, 11, 13, 11, 12, 11, 12.1, 12.2, 11.5, 11.7, 11.3, 12.7,
- 13, 12.8
- ],
- color: '#4BB94B',
- textColor: '#FFFFFF',
- textSize: this.seriesTextSize,
- format: val => {
- return val + 'kwh';
- },
- index: 0,
- legendShape: 'circle'
- },
- {
- name: '风速',
- data: [21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22.1, 22.2, 21.5, 21.7, 21.3, 22.7,
- 23, 22.8
- ],
- color: '#E82E2F',
- textColor: '#FFFFFF',
- textSize: this.seriesTextSize,
- format: val => {
- return val + 'km/h';
- },
- index: 1,
- legendShape: 'circle'
- },
- {
- name: '理论功率',
- data: [31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32, 31, 32.1, 32.2, 31.5, 31.7, 31.3, 32.7,
- 33, 32.8
- ],
- color: '#F5A83C',
- textColor: '#FFFFFF',
- textSize: this.seriesTextSize,
- format: val => {
- return val + 'kwh';
- },
- index: 0,
- legendShape: 'circle'
- },
- {
- name: '预测功率',
- data: [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2.1, 2.2, 1.5, 1.7, 1.3, 2.7, 3, 2.8],
- color: '#4A80B1',
- textColor: '#FFFFFF',
- textSize: this.seriesTextSize,
- format: val => {
- return val + 'kwh';
- },
- index: 1,
- legendShape: 'circle'
- }
- ]
- };
- let _this = this;
- LineA.categories = [];
- LineA.series[0].data = [];
- LineA.series[1].data = [];
- LineA.series[2].data = [];
- LineA.series[3].data = [];
-
- // for(let i=0;i<_this.gl.length;i++){
- // _this.gl[i].pointTime = new Date(_this.gl[i].pointTime*1000).Format("hh");
- // LineA.categories.push(_this.gl[i].pointTime);
- // LineA.series[1].data.push(_this.gl[i].pointValueInDouble);
- // console.log(_this.gl[i].pointValueInDouble)
- // };
- for(let i=0;i<_this.gl.length;i++){
- _this.gl[i].pointTime = new Date(_this.gl[i].pointTime*1000).Format("hh");
- // LineA.categories.push(_this.fs[i].pointTime);
- LineA.series[0].data.push(_this.gl[i].pointValueInDouble);
- }
- for(let i=0;i<_this.fs.length;i++){
- _this.fs[i].pointTime = new Date(_this.fs[i].pointTime*1000).Format("hh");
- LineA.categories.push(_this.fs[i].pointTime);
- LineA.series[1].data.push(_this.fs[i].pointValueInDouble);
- }
- for(let i=0;i<_this.llgl.length;i++){
- _this.llgl[i].pointTime = new Date(_this.llgl[i].pointTime*1000).Format("hh");
- // LineA.categories.push(_this.ycgl[i].pointTime);
- LineA.series[2].data.push(_this.llgl[i].pointValueInDouble);
- }
- for(let i=0;i<_this.ycgl.length;i++){
- _this.ycgl[i].pointTime = new Date(_this.ycgl[i].pointTime*1000).Format("hh");
- // LineA.categories.push(_this.ycgl[i].pointTime);
- LineA.series[3].data.push(_this.ycgl[i].pointValueInDouble);
- }
- this.showLineA('canvasLineA', LineA);
- },
- showLineA(canvasId, chartData) {
- var _self = this;
- canvaLineA = new uCharts({
- $this: _self,
- canvasId: canvasId,
- type: 'line',
- fontSize: 11,
- legend: {
- show: true,
- position: 'top',
- float: 'right',
- fontColor: 'silver',
- itemGap: '4',
- itemWidth: '3'
- },
- dataLabel: false,
- dataPointShape: false,
- background: '#FFFFFF',
- pixelRatio: _self.pixelRatio,
- categories: chartData.categories,
- series: chartData.series,
- animation: true,
- xAxis: {
- type: 'grid',
- gridColor: 'silver',
- fontColor: 'silver',
- gridType: 'solid',
- gridColor: '#2E2E2E',
- axisLineColor: '#2E2E2E',
- labelCount: '3'
- // itemCount:"3"
- },
- yAxis: {
- data: [{
- type: 'value',
- fontColor: 'silver',
- disabled: false, //y轴轴线
- min: 0,
- max: 40,
- position: 'left',
- axisLineColor: '#2E2E2E',
- title: '风速:(km/h)',
- titleFontColor: 'silver'
- },
- {
- fontColor: 'silver',
- disabled: false, //y轴轴线
- min: 0,
- max: 40,
- position: 'right',
- axisLineColor: '#2E2E2E',
- title: '功率:(kwh)',
- titleFontColor: 'silver'
- }
- ],
- gridColor: '#2E2E2E',
- splitNumber: 4,
- gridType: 'solid',
- dashLength: 8,
- showTitle: 'true',
- format: val => {
- return val.toFixed(0) + '元';
- }
- },
- width: _self.cWidth * _self.pixelRatio,
- height: _self.cHeight * _self.pixelRatio,
- extra: {
- line: {
- type: 'line',
- width: '1'
- }
- }
- });
- },
- touchLineA(e) {
- canvaLineA.showToolTip(e, {
- format: function(item, category) {
- return category + ' ' + item.name + ':' + item.data;
- }
- });
- },
- moveLineA(e) {
- canvaLineA.scroll(e);
- },
- getColumnServerData() {
- let Column = {
- categories: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17',
- '18', '19', '20', '21', '22', '23', '24'
- ],
- series: [{
- legendShape: 'circle',
- name: '发电量',
- data: [10, 20, 30, 40, 20, 15, 20, 10, 20, 30, 40, 20, 15, 20, 10, 20, 30, 40, 20, 15, 20, 20, 15, 20, 10],
- textColor: '#ffffff',
- color: '#2fc25b'
- }]
- };
- let _this = this;
- Column.categories = [];
- Column.series[0].data = [];
- for(let i=0;i<_this.rfdl.length;i++){
- // _this.rfdl[i].pointTime = new Date(_this.rfdl[i].pointTime * 1000).Format("hh");
- _this.rfdl[i].pointTime = new Date(_this.rfdl[i].pointTime*1000).Format("MM/dd");
- Column.categories.push(_this.rfdl[i].pointTime);
- Column.series[0].data.push(_this.rfdl[i].pointValueInDouble);
- }
- // res.data.data = res.data;
- // let Column = {
- // categories: [],
- // series: []
- // };
- // //这里我后台返回的是数组,所以用等于,如果您后台返回的是单条数据,需要push进去
- // Column.categories = res.data.data.ColumnB.categories;
- // Column.series = res.data.data.ColumnB.series;
- // _self.textarea = JSON.stringify(res.data.data.ColumnB);
- this.showColumn('canvasColumn', Column);
- },
- showColumn(canvasId, chartData) {
- var _self = this;
- canvaColumn = new uCharts({
- $this: _self,
- canvasId: canvasId,
- type: 'column',
- legend: {
- show: true,
- fontSize: 12,
- padding: 5,
- fontColor: 'silver',
- itemGap: '4',
- // margin:0,
- position: 'top',
- float: 'right'
- },
- fontSize: 11,
- background: '#121212',
- pixelRatio: _self.pixelRatio,
- animation: true,
- categories: chartData.categories,
- series: chartData.series,
- enableScroll: true,
- xAxis: {
- // disabled:true,
- rotateLabel: false,
- disableGrid: true,
- axisLineColor: '#2D2D2D',
- fontColor: '#ffffff',
- itemCount: 10,
- // labelCount:10,
- scrollShow: false
- // gridColor:'#2D2D2D',
- },
- yAxis: {
- showTitle: true,
- // disableGrid:true,
- gridType: 'solid',
- dashLength: 8,
- gridColor: '#2D2D2D',
- splitNumber: 5,
- min: 0,
- max: 40,
- data: [{
- min: 0,
- max: 40,
- position: 'left',
- axisLine: false,
- fontColor: 'silver',
- title: ' 发电量:(kw/h)',
- titleFontColor: 'silver',
- titleFontSize: 11,
- format: val => {
- return val.toFixed(0) + '';
- }
- }]
- },
- dataLabel: true,
- width: _self.cWidth * _self.pixelRatio,
- height: _self.cHeight * _self.pixelRatio,
- extra: {
- column: {
- type: 'group',
- // width: _self.cWidth * _self.pixelRatio * 0.45 / chartData.categories.length
- width: 12,
- lineStyle: {
- width: 5
- }
- }
- }
- });
- },
- touchEndColumn(e) {
- canvaColumn.scrollEnd(e);
- canvaColumn.showToolTip(e, {
- format: function(item, category) {
- if (typeof item.data === 'object') {
- return category + ' ' + item.name + ':' + item.data.value;
- } else {
- return category + ' ' + item.name + ':' + item.data;
- }
- }
- });
- },
- touchColumn(e) {
- canvaColumn.scrollStart(e);
- },
- moveColumn(e) {
- canvaColumn.scroll(e);
- }
- }
- };
- </script>
- <style>
- .textSmail{
- font-size: 12px;
- transform: scale(0.80);
- }
- body {
- font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', STHeiti, 'Microsoft Yahei', Tahoma, Simsun, sans-serif;
- font-size: 20px;
- color: silver;
- background: #020202;
- }
- @font-face {
- font-family: '方正兰亭细黑_GBK';
- src: url(../../static/fzltxh.TTF);
- }
- page {
- background-color: #1f1f1f;
- font-family: '方正兰亭细黑_GBK';
- color: silver;
- }
- .InformationCard {
- margin-top: 10px;
- width: 100%;
- height: 90px;
- background-color: #242424;
- float: left;
- }
- .informationCardAll {
- width: 100%;
- margin-top: 10px;
- height: 60px;
- float: left;
- }
- .informationCardTextOne {
- width: 100%;
- height: 35px;
- float: left;
- }
- .informationCardTextNo1 {
- margin-left: 2%;
- width: 115px;
- height: 35px;
- font-size: 13px;
- line-height: 35px;
- float: left;
- }
- .informationCardText {
- margin-left: 2%;
- width: 115px;
- height: 35px;
- line-height: 35px;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: silver;
- font-size: 13px;
- float: left;
- }
- .informationCardTextzj {
- /* margin-left: 43%; */
- width: 115px;
- height: 35px;
- line-height: 35px;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: silver;
- font-size: 13px;
- float: right;
- margin-right: 1%;
- }
- .informationCardTextTwo {
- width: 100%;
- height: 35px;
- float: left;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: silver;
- }
- .informationCardText2 {
- /* margin-left: 6%; */
- margin-left: calc(48% - 175px);
- width: 115px;
- height: 35px;
- font-size: 13px;
- line-height: 35px;
- float: left;
- }
- .informationCardText3 {
- /* margin-left: 6%; */
- margin-left: calc(48% - 175px);
- width: 120px;
- height: 35px;
- font-size: 13px;
- line-height: 35px;
- float: left;
- }
- .textWhite {
- color: white;
- float: left;
- width: 24px;
- text-align: right;
- }
- .textWhite2 {
- color: white;
- float: left;
- text-align: right;
- }
- .textSilver {
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: silver;
- float: left;
- }
- .speedPower {
- width: 100%;
- height: 180px;
- background-color: #242424;
- float: left;
- margin-top: 20rpx;
- margin-bottom: 10px;
- }
- .cardinstallredSpeed {
- margin-top: 8px;
- margin-left: 9px;
- width: 46%;
- height: 78px;
- background-color: #1f1f1f;
- /* background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%); */
- border-radius: 5px;
- float: left;
- }
- .cardinstalltitlegreen {
- width: 80%;
- height: 25px;
- text-align: center;
- margin-left: 10%;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- font-size: 14px;
- color: silver;
- line-height: 25px;
- float: left;
- }
- .cardinstalltitlegreen span {
- color: white;
- /* float: right; */
- /* margin-right: 70px; */
- }
- .cardinstallnumbergreen {
- width: 100%;
- height: 25px;
- text-align: center;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- font-size: 20px;
- color: silver;
- /* color: #449618; */
- line-height: 25px;
- float: left;
- }
- .cardinstallnumbergreenmin {
- margin-left: 2px;
- width: 45%;
- height: 20px;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- font-size: 12px;
- color: silver;
- /* color: #449618; */
- float: left;
- }
- .cardinstallnumbergreenmax {
- /* font-weight: bold; */
- margin-right: 2px;
- width: 45%;
- height: 20px;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- font-size: 12px;
- color: silver;
- /* color: #449618; */
- float: right;
- }
- .greenMinText {
- line-height: 20px;
- float: right;
- }
- .greenMaxText {
- line-height: 20px;
- float: left;
- }
- .cardinstalltitleRed {
- width: 80%;
- height: 25px;
- text-align: center;
- margin-left: 10%;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- font-size: 14px;
- color: silver;
- line-height: 25px;
- float: left;
- }
- .cardinstalltitleRed span {
- color: white;
- /* float: right;
- margin-right: 85px; */
- }
- .cardinstallnumberred {
- width: 100%;
- height: 25px;
- text-align: center;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- font-size: 20px;
- color: silver;
- /* color: #E93131; */
- line-height: 25px;
- float: left;
- }
- .cardinstallnumberredmin {
- margin-left: 2px;
- width: 45%;
- height: 20px;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- font-size: 12px;
- color: silver;
- /* color: #E93131; */
- float: left;
- }
- .cardinstallnumberredmax {
- margin-right: 2px;
- width: 45%;
- height: 20px;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- font-size: 12px;
- color: silver;
- /* color: #E93131; */
- float: right;
- }
- .redMinText {
- line-height: 20px;
- float: right;
- }
- .redMaxText {
- line-height: 20px;
- float: left;
- }
- /* .quatoCardAndFrame {
- clear: both;
- width: 100%;
- height: 10px;
- background-color:red;
- position: relative;
- } */
- /* .quatoCardContainer {
- width: 375px;
- height: 12px;
- background-color:blue;
- } */
- .quatoCard {
- width: 32%;
- height: 30px;
- float: left;
- margin-right: 1.5%;
- margin-bottom: 8px;
- text-align: center;
- line-height: 30px;
- font-size: 14px;
- /* background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%);
- }
- .quatoCardLast {
- width: 32%;
- height: 30px;
- float: left;
- text-align: center;
- line-height: 30px;
- margin-bottom: 8px;
- font-size: 14px;
- /* background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%); */
- }
- .sanJiaoUp {
- clear: both;
- width: 0;
- height: 0;
- /* border-right: 20px solid transparent;
- border-left: 20px solid transparent;
- border-bottom: 15px solid #E47369; */
- margin-left: calc(50% - 20px);
- }
- .sanJiaoDown {
- clear: both;
- width: 0;
- height: 0;
- /* border-right: 20px solid transparent;
- border-left: 20px solid transparent;
- border-top: 15px solid #E47369; */
- margin-left: calc(50% - 20px);
- }
- .frame {
- width: calc(100% - 18px);
- margin-left: 9px;
- height: 150px;
- position: absolute;
- /* top: 20px; */
- left: 0px;
- z-index: 20;
- /* background: -webkit-linear-gradient(top, rgba(159, 131, 111, 0.1) 0%, rgba(193, 94, 21, 0.2) 100%); */
- background-color: #242424;
- border-top: 0.5px solid #242424;
- }
- .frameCardLeft {
- width: 34%;
- height: 10px;
- float: left;
- /* margin-right: 1.5%; */
- margin-bottom: 8px;
- /* text-align: center; */
- line-height: 30px;
- font-size: 13px;
- color: #a1a1a1;
- margin-top: 15px;
- }
- .frameCardLeftValue {
- float: right;
- color: #ffffff;
- margin-right: 25px;
- /* margin-left: 20px; */
- }
-
- .frameCardLeftValueSulfurdioxide{
-
- }
- .frameCardMiddleValue {
- float: right;
- color: #ffffff;
- }
- .frameCardRightValue {
- float: right;
- color: #ffffff;
- }
- .frameCardMiddle {
- width: 29%;
- height: 10px;
- float: left;
- /* margin-right: 1.5%; */
- margin-left: -5.5%;
- margin-bottom: 8px;
- /* text-align: center; */
- line-height: 30px;
- font-size: 13px;
- color: #a1a1a1;
- margin-top: 15px;
- }
- .frameCardRight {
- width: 34%;
- height: 10px;
- float: left;
- /* text-align: center; */
- line-height: 30px;
- margin-bottom: 8px;
- font-size: 13px;
- color: #a1a1a1;
- margin-left: 5.5%;
- margin-top: 15px;
- }
- .speedPowerDiagram {
- clear: both;
- width: 130px;
- height: 30px;
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: silver;
- float: left;
- margin-top: 18px;
- margin-left: 9px;
- font-size: 11px;
- }
- .qiun-charts {
- width: 750upx;
- height: 400upx;
- }
- .charts {
- width: 750upx;
- height: 400upx;
- }
- .lineChart {
- clear: both;
- width: 100%;
- height: 225px;
- background-color: #242424;
- }
- .Histogram {
- width: 100%;
- height: 225px;
- clear: both;
- background-color: #242424;
- margin-top: 10px;
- margin-bottom: 20px;
- }
- .PowerColunm {
- width: 130px;
- height: 30px;
- /* user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text; */
- color: silver;
- float: left;
- margin-top: 18px;
- margin-left: 10px;
- font-size: 11px;
- position: relative;
- z-index: 20;
- /* overflow:auto; */
- }
- .img {
- width: 18px;
- height: 20px;
- float: right;
- background-color: #242424;
- /* background-color: red; */
- margin-top: -10px;
- margin-right: -10px;
- /* margin-top: -15px; */
- background-image: url(../../static/picture/zuizhongsanjiao2.png);
- }
- .value {
- color: #ffffff;
- font-size: 14px;
- float: right;
- }
- .rightValue {
- color: #ffffff;
- font-size: 14px;
- float: right;
- }
- .informationCardText4 {
- width: 120px;
- height: 35px;
- font-size: 14px;
- line-height: 35px;
- float: right;
- /* margin-left: 4px; */
- margin-right: 9px;
- }
- .textSilverDay {
- user-select: text;
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- color: silver;
- float: left;
- font-size: 14px;
- margin-left: 2%;
- }
- </style>
|