1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288 |
- <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>
-
- <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>(m/s)</span>
- </view>
- <view class="cardinstallnumbergreen">{{windspeedpowermodule.index_windSpeed_power_target_detail.pjfs}}</view>
- <view class="cardinstallnumbergreenmin">
- <view class="redMinText">min: {{windspeedpowermodule.index_windSpeed_power_target_detail.pjfsMin}}</view>
- </view>
- <view class="cardinstallnumbergreenmax">
- <view class="redMaxText">max: {{windspeedpowermodule.index_windSpeed_power_target_detail.pjfsMax}}</view>
- </view>
- </view>
- <view class="cardinstallredSpeed">
- <view class="cardinstalltitlegreen">
- 预测风速
- <span>(m/s)</span>
- </view>
- <view class="cardinstallnumbergreen">{{windspeedpowermodule.index_windSpeed_power_target_detail.ycfs}}</view>
- <view class="cardinstallnumbergreenmin">
- <view class="redMinText">min: {{windspeedpowermodule.index_windSpeed_power_target_detail.ycfsMin}}</view>
- </view>
- <view class="cardinstallnumbergreenmax">
- <view class="redMaxText">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: '',
- 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 = 'CL_FDC';
- };
- if (this.windStationName == '代县') {
- this.FDC = 'DX_FDC';
- };
- if (this.windStationName == '康保') {
- this.FDC = 'KB_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_comprehensive_target = uni.connectSocket({
-
- 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 => {
-
- _this.windpowerstationdetail.comprehensive_target = JSON.parse(res.data)[_this.FDC];
-
-
- });
- });
-
-
- },
- async windpowerstationdetail_springbox_target() {
- let _this = this;
-
- this.socketTask_windpowerstationdetail_springbox_target = uni.connectSocket({
-
- 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 => {
-
- _this.windpowerstationdetail.windpowerstationdetail_springbox_target = JSON.parse(res.data)[_this.FDC];
- });
- });
- },
- async index_windSpeed_power_target_detail() {
- let _this = this;
-
- this.socketTask_index_windSpeed_power_target_detail = uni.connectSocket({
-
- 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 => {
-
- _this.windspeedpowermodule.index_windSpeed_power_target_detail = JSON.parse(res.data)[_this.FDC];
-
- });
- });
- },
- async windpowerstationdetail_twentyfourhourlinechart_target() {
- let _this = this;
-
- this.socketTask_windpowerstationdetail_twentyfourhourlinechart_target = uni.connectSocket({
-
- 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 => {
-
- _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_windpowerstationdetail_sevendaycolumn_target = uni.connectSocket({
-
- 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 => {
-
- _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 + 'm/s';
- },
- 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.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.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.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'
-
- },
- yAxis: {
- data: [{
- type: 'value',
- fontColor: 'silver',
- disabled: false,
- min: 0,
- max: 40,
- position: 'left',
- axisLineColor: '#2E2E2E',
- title: 'y轴',
- titleFontColor: 'silver'
- },
- {
- fontColor: 'silver',
- disabled: false,
- 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("MM/dd");
- Column.categories.push(_this.rfdl[i].pointTime);
- Column.series[0].data.push(_this.rfdl[i].pointValueInDouble);
- }
-
-
-
-
-
-
-
-
-
- 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',
-
- position: 'top',
- float: 'right'
- },
- fontSize: 11,
- background: '#121212',
- pixelRatio: _self.pixelRatio,
- animation: true,
- categories: chartData.categories,
- series: chartData.series,
- enableScroll: true,
- xAxis: {
-
- rotateLabel: false,
- disableGrid: true,
- axisLineColor: '#2D2D2D',
- fontColor: '#ffffff',
- itemCount: 10,
-
- scrollShow: false
-
- },
- yAxis: {
- showTitle: 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: 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 {
-
- 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: calc(48% - 175px);
- width: 115px;
- height: 35px;
- font-size: 13px;
- line-height: 35px;
- float: left;
- }
- .informationCardText3 {
-
- 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;
-
- 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;
-
-
- }
- .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;
-
- 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;
-
- float: left;
- }
- .cardinstallnumbergreenmax {
-
- 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;
-
- 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;
-
- }
- .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;
-
- 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;
-
- 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;
-
- float: right;
- }
- .redMinText {
- line-height: 20px;
- float: right;
- }
- .redMaxText {
- line-height: 20px;
- float: left;
- }
-
-
- .quatoCard {
- width: 32%;
- height: 30px;
- float: left;
- margin-right: 1.5%;
- margin-bottom: 8px;
- text-align: center;
- line-height: 30px;
- font-size: 14px;
-
- </style>
|