123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840 |
- <template>
- <view class="home">
- <view class="home_header">
- <view class="header_message" @click="changeMsg">
- <image src="../../static/jnImage/indexPage/alarmSet.png"></image>
- </view>
- <view class="header_title">
- <text class="titleName">发电场站生产实时运营管理平台</text>
- </view>
- <view class="header_more" @click="changeStation">
- <image src="../../static/jnImage/indexPage/moreNew.png"></image>
- </view>
- </view>
- <view class="home_main">
- <view class="main_time">
- <view class="mesTime">
- <image src="../../static/jnImage/indexPage/time.png"></image>
- <text>{{timeData.year}}年{{timeData.month}}月{{timeData.day}}日</text>
- <text>{{timeData.week}}</text>
- <text>{{timeData.hour}}{{timeData.minute}}</text>
- </view>
- <view class="mesAll">
- <uni-row class="mesEx">
- <uni-col :span="12" v-for="(item,index) in mesExData" :key="index">
- <view class="mesEx_left flex">
- <view class="mesEx_left_top">
- <text class="nameSty">{{item.leftName}}</text>
- </view>
- <view class="mesEx_left_end">
- <text>{{item.leftValue}}</text>
- <text>{{item.leftCode}}</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <uni-row class="windpowerCl">
- <uni-col :span="12" v-for="(item,index) in windPowerData" :key="index">
- <view class="windpowerMsg">
- <view class="windpowerMsg_com flex justify-between">
- <text style="font-size: 28upx">{{item.name}}</text>
- <text>{{item.code}}</text>
- </view>
- <view class="windpowerMsg_Data">
- <text>{{item.value}}</text>
- </view>
- <view class="windpowerMsg_com flex justify-between">
- <text>min:{{item.min}}</text>
- <text>max:{{item.max}}</text>
- </view>
- </view>
- </uni-col>
- </uni-row>
- <view class="windMsg">
- <view class="flex justify-center" style="margin-bottom: 6px;" @click="watchWindStatus('wind')">
- <view class="windMsg_title">
- <image src="../../static/jnImage/indexPage/wancheng.png" mode=""></image>
- <text>风机状态</text>
- </view>
- </view>
- <view class="windMsg_main">
- <view class="windMsg_main_msg flex justify-between">
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_jieru.png" mode=""></image>
- <text>接入</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(powerstatusData.jr_fj_ts)}}</text>
- <text>台</text>
- </view>
- </view>
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_daiji.png" mode=""></image>
- <text>待机</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.fd_djnum)}}</text>
- <text>台</text>
- </view>
- </view>
- </view>
- <view class="windMsg_main_msg flex justify-between">
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_bingwang.png" mode=""></image>
- <text>并网</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.fd_yxnum)}}</text>
- <text>台</text>
- </view>
- </view>
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_guzhang.png" mode=""></image>
- <text>故障</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.fd_gznum)}}</text>
- <text>台</text>
- </view>
- </view>
- </view>
- <view class="windMsg_main_msg flex justify-between">
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_jianxiu.png" mode=""></image>
- <text>检修</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.fd_jxnum)}}</text>
- <text>台</text>
- </view>
- </view>
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_xiandian.png" mode=""></image>
- <text>限电</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.fd_xdnum)}}</text>
- <text>台</text>
- </view>
- </view>
- </view>
- <view class="windMsg_main_msg flex justify-between">
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_shoulei.png" mode=""></image>
- <text>受累</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.fd_slnum)}}</text>
- <text>台</text>
- </view>
- </view>
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_lixian.png" mode=""></image>
- <text>离线</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.fd_lxnum)}}</text>
- <text>台</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="powerMsg">
- <view class="flex justify-center" style="margin-bottom: 6px;" @click="watchWindStatus('power')">
- <view class="windMsg_title">
- <image src="../../static/jnImage/indexPage/wancheng.png" mode=""></image>
- <text>光伏状态</text>
- </view>
- </view>
- <view class="windMsg_main">
- <view class="windMsg_main_msg flex justify-between">
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/yunxingGFNew.png" mode=""></image>
- <text>接入</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(powerstatusData.jr_gf_jzts+powerstatusData.jr_gf_zcts)}}</text>
- <text>台</text>
- </view>
- </view>
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_daiji.png" mode=""></image>
- <text>待机</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.gf_djnum)}}</text>
- <text>台</text>
- </view>
- </view>
- </view>
- <view class="windMsg_main_msg flex justify-between">
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_bingwang.png" mode=""></image>
- <text>并网</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.gf_yxnum)}}</text>
- <text>台</text>
- </view>
- </view>
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_guzhang.png" mode=""></image>
- <text>故障</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.gf_gznum)}}</text>
- <text>台</text>
- </view>
- </view>
- </view>
- <view class="windMsg_main_msg flex justify-between">
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_jianxiu.png" mode=""></image>
- <text>检修</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.gf_jxnum)}}</text>
- <text>台</text>
- </view>
- </view>
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_xiandian.png" mode=""></image>
- <text>限电</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.gf_xdnum)}}</text>
- <text>台</text>
- </view>
- </view>
- </view>
- <view class="windMsg_main_msg flex justify-between">
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_shoulei.png" mode=""></image>
- <text>受累</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.gf_slnum)}}</text>
- <text>台</text>
- </view>
- </view>
- <view class="windMsgSty flex">
- <view class="windMsgSty_left">
- <image src="../../static/jnImage/indexPage/jn_lixian.png" mode=""></image>
- <text>离线</text>
- </view>
- <view class="windMsgSty_right flex justify-between">
- <text>{{Math.ceil(windstatusData.gf_lxnum)}}</text>
- <text>台</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="ssjk">
- <view class="ssjk_title flex justify-center">
- <image src="../../static/jnImage/indexPage/timeNow.png" mode=""></image>
- <text>实时监控</text>
- </view>
- <view class="ssjk_main">
- <view class="ssjk_main_msg" v-for="(item, index) in windData" :key="index">
- <view class="ssjk_main_msg_tit flex">
- <image src="../../static/jnImage/indexPage/windIcon.png" mode=""></image>
- <text>{{item.name}}</text>
- </view>
- <view class="ssjk_main_msg_data flex">
- <view class="msg_data_sty flex">
- <view class="msg_data_name">
- <text>风速</text>
- </view>
- <view class="dataSty flex">
- <text>{{item.fs}}</text>
- <text>m/s</text>
- </view>
- </view>
- <view class="msg_data_sty flex">
- <view class="msg_data_name">
- <text>实际功率</text>
- </view>
- <view class="dataSty flex">
- <text>{{item.sjgl}}</text>
- <text>MW</text>
- </view>
- </view>
- <view class="msg_data_sty flex">
- <view class="msg_data_name">
- <text>出线功率</text>
- </view>
- <view class="dataSty flex">
- <text>{{item.cxgl}}</text>
- <text>MW</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="ssjk_main">
- <view class="ssjk_main_msg" v-for="(item, index) in powerData" :key="index">
- <view class="ssjk_main_msg_tit flex">
- <image src="../../static/jnImage/indexPage/powerIcon.png" mode=""></image>
- <text>{{item.name}}</text>
- </view>
- <view class="ssjk_main_msg_data flex">
- <view class="msg_data_sty flex">
- <view class="msg_data_name">
- <text>光照强度</text>
- </view>
- <view class="dataSty flex">
- <text>{{item.gzqd}}</text>
- <text>Kw/m²</text>
- </view>
- </view>
- <view class="msg_data_sty flex">
- <view class="msg_data_name">
- <text>实际功率</text>
- </view>
- <view class="dataSty flex">
- <text>{{item.sjgl}}</text>
- <text>MW</text>
- </view>
- </view>
- <view class="msg_data_sty flex">
- <view class="msg_data_name">
- <text>出线功率</text>
- </view>
- <view class="dataSty flex">
- <text>{{item.cxgl}}</text>
- <text>MW</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- </template>
- <script>
- import {
- cockpitMonitor,
- cockpitProjectplanApi
- } from '../../api/home.js'
- import {
- windPowerDataApi
- } from '../../api/common.js'
- export default {
- onLoad: function() {},
- data() {
- return {
- mesExData: [],
- windPowerData: [],
- timeData: {},
- windstatusData: {},
- powerstatusData: {},
- windData: [],
- powerData: []
- }
- },
- created() {
- this.getTimeDaya()
- this.getHomeData()
- this.getwindPowerData("0", "-1");
- this.getwindPowerData("0", "-2");
- },
- methods: {
- //获取时间
- getTimeDaya() {
- let currentDate = new Date()
- this.timeData.year = currentDate.getFullYear()
- this.timeData.month = currentDate.getMonth() + 1
- this.timeData.day = currentDate.getDate()
- this.timeData.hour = currentDate.getHours() + ':'
- this.timeData.minute = currentDate.getMinutes() < 10 ? '0' + currentDate.getMinutes() : currentDate
- .getMinutes()
- this.timeData.week = new Array('星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六')[currentDate.getDay()]
- },
- //获取首页整体数据
- getHomeData() {
- let that = this
- cockpitMonitor({
- wpId: 'KGDL_FGS0'
- }).then(res => {
- if (res.data) {
- if (res.data.qt) {
- let datas = res.data.qt
- let arr = [{
- leftName: '容量',
- leftValue: datas.zzjrl,
- leftCode: '(MW)',
- },
- {
- leftName: '安全天数',
- leftValue: Math.ceil(datas.aqts),
- leftCode: '(天)',
- },
- {
- leftName: '利用小时',
- leftValue: Math.ceil(datas.fdnlyxs),
- leftCode: '(h/年)'
- }
- ]
- that.windPowerData = [{
- name: '风速',
- value: datas.ssfs,
- code: '(m/s)',
- min: 6,
- max: 8
- }, {
- name: '日照强度',
- value: datas.gzzs,
- code: '(W/m²)',
- min: 6,
- max: 20
- }, {
- name: '功率',
- value: datas.sjgl,
- code: '(MW)',
- min: 0,
- max: 200
- }, {
- name: '理论功率',
- value: datas.llgl,
- code: '(万kW)',
- min: 0,
- max: 500
- }]
- that.getHomeData2(arr)
- }
- if (res.data.cblpoint) {
- that.powerstatusData = res.data.cblpoint
- }
- if (res.data.mxztmap) {
- that.windstatusData = res.data.mxztmap
- }
- }
- })
- },
- getHomeData2(arr) {
- let that = this
- cockpitProjectplanApi({
- wpId: 'KGDL_FGS0'
- }).then(res => {
- if (res && res.data) {
- let item = res.data.proplanmap
- let arr2 = [{
- leftName: '日发电量',
- leftValue: Math.ceil(item.qy_r_sjdl / 10000),
- leftCode: '(万kWh)'
- },
- {
- leftName: '月发电量',
- leftValue: Math.ceil(item.qy_y_sjdl / 10000),
- leftCode: '(万kWh)'
- },
- {
- leftName: '年发电量',
- leftValue: Math.ceil(item.qy_n_sjdl / 10000 / 10000),
- leftCode: '(亿kWh)'
- },
- ]
- that.mesExData = [...arr, ...arr2]
- }
- })
- },
- getwindPowerData(type1, type2) {
- windPowerDataApi({
- company: type1,
- type: type2
- })
- .then((res) => {
- if (Object.values(res.data.data).length) {
- if (res.data.data.powerVos.length > 0) {
- res.data.data.powerVos.forEach(item => {
- if (type2 === "-1") {
- let obj = {
- name: item.wpname,
- fs: Math.ceil(item.spped),
- sjgl: Math.ceil(item.sjgl / 1000),
- cxgl: Math.ceil(item.cxgl)
- }
- this.windData.push(obj)
- } else {
- let obj = {
- name: item.wpname,
- gzqd: Math.ceil(item.spped),
- sjgl: Math.ceil(item.sjgl / 1000),
- cxgl: Math.ceil(item.cxgl)
- }
- this.powerData.push(obj)
- }
- })
- }
- } else {
- this.windData = [];
- this.powerData = [];
- }
- });
- },
- changeMsg() {
- this.$tab.navigateTo('/pages/common/messagePage')
- },
- changeStation() {
- this.$tab.navigateTo('/pages/common/stationListPage')
- },
- watchWindStatus(type) {
- this.$tab.navigateTo(`/pages/common/windStatusPage?status=${type}`)
- }
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #202246;
- }
- .home {
- width: 100vw;
- background: url('../../static/jnImage/loginPage/windBack.png'), url('../../static/jnImage/loginPage/backWav.png');
- background-repeat: no-repeat, repeat;
- background-size: 100% 260px, 100% 5px;
- .home_header {
- width: calc(100% -32px);
- display: flex;
- justify-content: space-between;
- height: 60px;
- padding-top: 16px;
- // position: fixed;
- .header_message {
- width: 15%;
- image {
- position: relative;
- top: 5px;
- left: 10px;
- width: 25px;
- height: 25px;
- }
- }
- .header_title {
- width: 70%;
- position: relative;
- left: 5px;
- image {
- width: 28px;
- height: 22px;
- position: relative;
- top: 5px;
- }
- .titleName {
- line-height: 20px;
- font-size: 36upx;
- font-family: FZZhengHeiS-M-GB;
- font-weight: 600;
- color: #fff;
- position: relative;
- top: 8px;
- }
- }
- .header_more {
- width: 15%;
- position: relative;
- top: 10px;
- left: 10px;
- image {
- width: 25px;
- height: 18px;
- }
- }
- }
- .home_main {
- padding: 0 20px;
- .main_time {
- margin-top: 10px;
- .mesTime {
- display: flex;
- padding: 3px 0;
- border-bottom: 1px solid rgba(255, 255, 255, 0.25);
- image {
- width: 20px;
- height: 20px;
- }
- text {
- font-size: 34upx;
- color: #fff;
- margin-left: 15px;
- }
- text:nth-of-type(3) {
- position: relative;
- top: 3px;
- }
- }
- .mesAll {
- .mesEx {
- // display: flex;
- line-height: 30px;
- color: #fff;
- .mesEx_left {
- width: 100%;
- border-bottom: 1px solid rgba(255, 255, 255, 0.25);
- padding: 3px 0;
- .mesEx_left_top {
- width: 40%;
- font-size: 28upx;
- .nameSty {
- width: 100%;
- display: inline-block;
- position: relative;
- text-align-last: justify;
- text-align: justify;
- }
- }
- .mesEx_left_end {
- width: 56%;
- margin: 0 10px;
- display: flex;
- justify-content: space-between;
- text:nth-of-type(1) {
- font-size: 34upx;
- }
- text:nth-of-type(2) {
- font-size: 20upx;
- color: #92949B;
- }
- }
- }
- }
- .windpowerCl {
- .windpowerMsg {
- margin-top: 10px;
- padding: 5px 10px;
- color: #fff;
- background-image: url('../../static/jnImage/indexPage/windpower.png');
- background-repeat: no-repeat;
- background-size: cover;
- .windpowerMsg_com {
- text {
- font-size: 24upx;
- color: #AFB2C1;
- }
- }
- .windpowerMsg_Data {
- margin: 5px;
- text-align: center;
- font-size: 40upx;
- }
- }
- }
- .windMsg,
- .powerMsg {
- margin-top: 15px;
- .windMsg_title {
- width: 40%;
- height: 30px;
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 6px 13px;
- background: rgba(51, 57, 118, 0.7);
- border-radius: 5px;
- image {
- width: 18px;
- height: 18px;
- }
- text {
- margin-left: 5px;
- font-size: 34upx;
- color: #fff;
- }
- }
- .windMsg_main {
- .windMsg_main_msg {
- margin-bottom: 8px;
- .windMsgSty {
- padding: 5px 8px;
- width: 49%;
- background: #3F4572;
- border-radius: 5px;
- .windMsgSty_left {
- width: 49%;
- height: 32px;
- image {
- width: 32px;
- height: 32px;
- }
- text {
- width: 100px;
- display: inline-block;
- color: #9A9BA6;
- font-size: 28upx;
- margin-left: 10px;
- position: relative;
- top: -26px;
- left: 28px;
- }
- .fourFont {
- top: -38px;
- }
- }
- .windMsgSty_right {
- width: 49%;
- position: relative;
- top: 9px;
- text:nth-of-type(1) {
- margin-left: 5px;
- width: 50%;
- font-size: 34upx;
- color: #fff;
- }
- text:nth-of-type(2) {
- font-size: 28upx;
- color: #9A9BA6;
- }
- }
- }
- }
- }
- }
- .ssjk {
- margin-top: 15px;
- margin-bottom: 30px;
- .ssjk_title {
- width: 120px;
- height: 45px;
- // background: #333976;
- background: linear-gradient(90deg, #333976, transparent);
- align-items: center;
- image {
- width: 22px;
- height: 22px;
- }
- text {
- margin-left: 10px;
- font-size: 16px;
- color: #fff;
- }
- }
- .ssjk_main {
- .ssjk_main_msg {
- margin-top: 15px;
- .ssjk_main_msg_tit {
- image {
- width: 18px;
- height: 18px;
- }
- text {
- margin-left: 10px;
- font-size: 14px;
- color: #A49EAC;
- position: relative;
- top: -2px;
- }
- }
- .ssjk_main_msg_data {
- width: 100%;
- color: #fff;
- font-size: 10px;
- .msg_data_sty {
- width: 33%;
- margin-right: 2px;
- background: #2E336D;
- .msg_data_name {
- width: 50%;
- padding: 3px 0;
- display: inline-block;
- background: #3F4572;
- text-align: center;
- }
- .dataSty {
- width: 50%;
- background: #2E336D;
- padding: 0 3px;
- justify-content: space-between;
- text {
- position: relative;
- top: 5px;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- </style>
|