Browse Source

晋能发电场站生产实时运营管理平台APP,数据简报页面及其场站数据简报页面服务联调;公司首页及其场站首页服务联调;场站电量预测页面服务联调。

SunZehao 1 year ago
parent
commit
5fe96b626f

+ 2 - 1
App.vue

@@ -8,7 +8,8 @@
 	export default {
 		onLaunch: function() {
 			this.initApp()
-			// plus.screen.lockOrientation('portrait-primary');
+			//禁止手机横屏
+			plus.screen.lockOrientation('portrait-primary');
 		},
 		methods: {
 			// 初始化应用

+ 26 - 0
api/common.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 基础矩阵服务
+export function windPowerDataApi(params) {
+	return request({
+		url: '/matrix/basic',
+		'method': 'GET',
+		params: params
+	})
+}
+
+// 获取用户详细信息
+export function getInfo() {
+	return request({
+		url: '/system/auth/get-permission-info',
+		'method': 'GET'
+	})
+}
+
+// 退出方法
+export function logout() {
+	return request({
+		url: '/system/auth/logout',
+		'method': 'POST'
+	})
+}

+ 19 - 0
api/home.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 获取公司首页数据
+export function cockpitMonitor(params) {
+	return request({
+		url: '/cockpit/monitor',
+		'method': 'GET',
+		params: params
+	})
+}
+
+// 获取场站首页数据
+export function stationCaldataApi(params) {
+	return request({
+		url: '/station/caldata',
+		'method': 'GET',
+		params: params
+	})
+}

+ 1 - 1
api/login.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 登录方法
 export function login(params) {
 	return request({
-		baseUrl: 'http://192.168.2.2:48080',
+		baseUrl: 'http://192.168.2.10:48080',
 		url: '/admin-api/system/auth/login',
 		headers: {
 			isToken: false

+ 18 - 0
api/power.js

@@ -0,0 +1,18 @@
+import request from '@/utils/request'
+
+// 获取场站日发电量
+export function statisticsHisdataApi(params) {
+	return request({
+		url: '/station/hisdata',
+		'method': 'GET',
+		params: params
+	})
+}
+// 获取场站月发电量
+export function electricityStatisticsApi(params) {
+	return request({
+		url: '/electricity/statistics',
+		'method': 'GET',
+		params: params
+	})
+}

+ 10 - 0
api/report.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 获取数据简报数据
+export function bulletinappBulletinApi(params) {
+	return request({
+		url: '/bulletinapp/bulletin',
+		'method': 'GET',
+		params: params
+	})
+}

+ 1 - 1
config.js

@@ -1,7 +1,7 @@
 // 应用全局配置
 module.exports = {
 	// baseUrl: 'http://api-dashboard.yudao.iocoder.cn',
-	baseUrl: 'http://192.168.2.2:6060',
+	baseUrl: 'http://192.168.2.10:6060',
 	baseApi: '',
 	// 应用信息
 	appInfo: {

+ 6 - 0
pages.json

@@ -12,6 +12,12 @@
 				"navigationStyle": "custom"
 			}
 		}, {
+			"path": "pages/common/windStatusPage",
+			"style": {
+				"navigationBarTitleText": "风场状态",
+				"navigationStyle": "custom"
+			}
+		}, {
 			"path": "pages/home/index",
 			"style": {
 				"navigationBarTitleText": "首页",

+ 2 - 2
pages/common/companyHeader.vue

@@ -21,10 +21,10 @@
 		},
 		methods: {
 			changeMsg() {
-				this.$tab.navigateTo('/pages/common/messagePage')
+				this.$tab.redirectTo('/pages/common/messagePage')
 			},
 			changeStation() {
-				this.$tab.navigateTo('/pages/common/stationListPage')
+				this.$tab.redirectTo('/pages/common/stationListPage')
 			}
 		}
 	}

+ 8 - 1
pages/common/messagePage.vue

@@ -152,7 +152,14 @@
 
 		.box-bg {
 			width: 100vw;
-			padding: 5px 0;
+			padding: 0;
+
+			.uni-navbar {
+				.uni-navbar__content {
+					padding: 5px 0;
+					height: 50px;
+				}
+			}
 		}
 
 		.messageDataCharts {

+ 51 - 12
pages/common/stationListPage.vue

@@ -5,19 +5,20 @@
 		</view>
 		<view class="stationList_logo flex justify-end">
 			<view class="stationList_logo_sty flex">
-				<image src="../../static/jnImage/loginPage/logo.png" mode=""></image>
-				<text>请选择风场</text>
+				<!-- <image src="../../static/jnImage/loginPage/logo.png" mode=""></image> -->
+				<text>请选择风场/电站</text>
 			</view>
 		</view>
 		<view class="stationList_List">
 			<uni-list>
-				<uni-list-item title="宝龙山风电场" thumb="../../static/jnImage/commonPage/wind.png" thumb-size="sm" clickable
-					@click="onClick('宝龙山风电场')" />
-				<uni-list-item title="乌力吉风电场" thumb="../../static/jnImage/commonPage/wind.png" thumb-size="sm" />
-				<uni-list-item title="浩日格吐风电场" thumb="../../static/jnImage/commonPage/wind.png" thumb-size="sm" />
-				<uni-list-item title="开鲁风电场" thumb="../../static/jnImage/commonPage/wind.png" thumb-size="sm" />
-				<uni-list-item title="景观风电场" thumb="../../static/jnImage/commonPage/wind.png" thumb-size="sm" />
-				<uni-list-item title="高力板风电场" thumb="../../static/jnImage/commonPage/wind.png" thumb-size="sm" />
+				<uni-list-item v-for="(item, index) in windData" :key="index" :title="item.wpname"
+					thumb="../../static/jnImage/commonPage/wind.png" thumb-size="sm" clickable
+					@click="onClick(item.wpname, item.wpid)" />
+			</uni-list>
+			<uni-list>
+				<uni-list-item v-for="(item, index) in powerData" :key="index" :title="item.wpname"
+					thumb="../../static/jnImage/commonPage/power.png" thumb-size="sm" clickable
+					@click="onClick(item.wpname, item.wpid)" />
 			</uni-list>
 		</view>
 		<view class="stationListback flex justify-center">
@@ -27,17 +28,55 @@
 </template>
 
 <script>
+	import {
+		windPowerDataApi
+	} from '../../api/common.js'
 	export default {
 		data() {
-			return {}
+			return {
+				windData: [],
+				powerData: []
+			}
+		},
+		created() {
+			this.requestData("0", "-1");
+			this.requestData("0", "-2");
 		},
 		methods: {
+			requestData(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 => {
+									let obj = {
+										wpname: item.wpname,
+										wpid: item.wpid
+									}
+									if (type2 === "-1") {
+										this.windData.push(obj)
+									} else {
+										this.powerData.push(obj)
+									}
+								})
+							}
+
+						} else {
+							this.windData = [];
+							this.powerData = [];
+						}
+					});
+			},
 			back() {
 				this.$tab.navigateBack()
 			},
-			onClick(name) {
-				this.$tab.navigateTo('/pages/home/stationIndex')
+			onClick(name, wpid) {
 				uni.setStorageSync('stationName', name)
+				uni.setStorageSync('stationWpid', wpid)
+				this.$tab.redirectTo('/pages/home/stationIndex')
 			},
 		}
 	}

+ 5 - 5
pages/common/stationTab.vue

@@ -40,15 +40,15 @@
 				this.showTab = it
 				// this.$emit('stationTab', it)
 				if (it === '首页') {
-					this.$tab.navigateTo('/pages/home/stationIndex')
+					this.$tab.redirectTo('/pages/home/stationIndex')
 				} else if (it === '电量预测') {
-					this.$tab.navigateTo('/pages/power/stationIndex')
+					this.$tab.redirectTo('/pages/power/stationIndex')
 				} else if (it === '故障分类') {
-					this.$tab.navigateTo('/pages/type/stationIndex')
+					this.$tab.redirectTo('/pages/type/stationIndex')
 				} else if (it === '数据简报') {
-					this.$tab.navigateTo('/pages/report/stationIndex')
+					this.$tab.redirectTo('/pages/report/stationIndex')
 				} else if (it === '故障预警') {
-					this.$tab.navigateTo('/pages/warn/stationIndex')
+					this.$tab.redirectTo('/pages/warn/stationIndex')
 				}
 				// uni.setStorageSync('stationTab', it)
 			}

+ 215 - 0
pages/common/windStatusPage.vue

@@ -0,0 +1,215 @@
+<template>
+	<view class="windStatus">
+		<view class="box-bg">
+			<uni-nav-bar :fixed="true" dark left-icon="left" background-color='#202246' :title="stationTit"
+				@clickLeft="back" />
+		</view>
+		<view class="windPowerStatus">
+			<view class="windStatusMain" v-if="statusFrom === 'wind'">
+				<view class="windAllStatus flex justify-between">
+					<view class="statusAllName" v-for="(item, index) in statusAll" :key="index" :style="backSty(item)">
+						{{item.name}}
+					</view>
+				</view>
+				<view class="windAllStatusData" v-for="(item, index) in windData" :key="index">
+					<view class="statusOneName">{{item.name}}</view>
+					<view class="statusAllValue flex justify-between">
+						<view class="statusOneVal" :style="`color: ${colorAll[index]}`"
+							v-for="(itv, index) in item.value" :key="index">
+							{{itv}}
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="windStatusMain" v-else>
+				<view class="windAllStatus flex justify-between">
+					<view class="statusAllName" v-for="(item, index) in statusAll" :key="index" :style="backSty(item)">
+						{{item.name}}
+					</view>
+				</view>
+				<view class="windAllStatusData" v-for="(item, index) in powerData" :key="index">
+					<view class="statusOneName">{{item.name}}</view>
+					<view class="statusAllValue flex justify-between">
+						<view class="statusOneVal" :style="`color: ${colorAll[index]}`"
+							v-for="(itv, index) in item.value" :key="index">
+							{{itv}}
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		windPowerDataApi
+	} from '../../api/common.js'
+	export default {
+		onLoad: function(e) {
+			this.statusFrom = e.status
+		},
+		data() {
+			return {
+				stationTit: '',
+				statusFrom: '',
+				statusAll: [],
+				windData: [],
+				powerData: [],
+				colorAll: ['#1d99ff', '#05bb4c', '#ba3237', '#e17e23', '#c531c7', '#fff', '#606769']
+			}
+		},
+		created() {
+			this.stationTit = this.statusFrom === 'wind' ? '各风场状态' : '各电站状态'
+			this.statusAll = [{
+					name: '待机',
+					color: '#1d99ff'
+				},
+				{
+					name: '运行',
+					color: '#05bb4c'
+				},
+				{
+					name: '故障',
+					color: '#ba3237'
+				},
+				{
+					name: '检修',
+					color: '#e17e23'
+				},
+				{
+					name: '限电',
+					color: '#c531c7'
+				},
+				{
+					name: '受累',
+					color: '#fff'
+				},
+				{
+					name: '离线',
+					color: '#606769'
+				},
+			]
+
+			this.requestData("0", "-1");
+			this.requestData("0", "-2");
+		},
+		mounted() {},
+		methods: {
+			requestData(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 => {
+									let obj = {
+										name: item.wpname,
+										value: [Math.ceil(item.djts), Math.ceil(item.bwts), Math.ceil(
+												item
+												.gzts), Math.ceil(item.jxts), Math.ceil(item.xdts),
+											Math.ceil(item.slts), Math.ceil(item.lxts)
+										]
+									}
+									if (type2 === "-1") {
+										this.windData.push(obj)
+									} else {
+										this.powerData.push(obj)
+									}
+								})
+							}
+
+						} else {
+							this.windData = [];
+							this.powerData = [];
+						}
+					});
+			},
+			backSty(item) {
+				let backSty = ''
+				if (item.name === '受累') {
+					backSty = `color: #000;background-color: ${item.color};`
+				} else {
+					backSty = `background-color: ${item.color};`
+				}
+				return backSty
+			},
+			back() {
+				this.$tab.switchTab('/pages/home/index')
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #202246;
+	}
+
+	.windStatus {
+		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;
+
+		.box-bg {
+			width: 100vw;
+			padding: 0;
+
+			.uni-navbar {
+				.uni-navbar__content {
+					padding: 5px 0;
+					height: 50px;
+				}
+			}
+		}
+
+		.windPowerStatus {
+			padding: 0 20px;
+
+			.windStatusMain {
+				margin-top: 20px;
+
+				.windAllStatus {
+					width: 100%;
+
+					.statusAllName {
+						border-right: 2px solid #202246;
+						text-align: center;
+						line-height: 23px;
+						color: #fff;
+						font-size: 24upx;
+						width: 14%;
+						height: 23px;
+					}
+				}
+
+				.windAllStatusData {
+					.statusOneName {
+						margin-top: 10px;
+						font-size: 28upx;
+						color: #B2B5C5;
+					}
+
+					.statusAllValue {
+						width: 100%;
+						margin-top: 5px;
+
+						.statusOneVal {
+							border-right: 2px solid #202246;
+							text-align: center;
+							line-height: 23px;
+							color: #fff;
+							font-size: 24upx;
+							width: 14%;
+							height: 23px;
+							background-color: rgba(63, 69, 114, 0.7);
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 261 - 103
pages/home/index.vue

@@ -15,9 +15,9 @@
 			<view class="main_time">
 				<view class="mesTime">
 					<image src="../../static/jnImage/indexPage/time.png"></image>
-					<text>2023年11月20日</text>
-					<text>星期一</text>
-					<text>09:19</text>
+					<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">
@@ -51,7 +51,7 @@
 						</uni-col>
 					</uni-row>
 					<view class="windMsg">
-						<view class="flex justify-center" style="margin-bottom: 6px;">
+						<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>
@@ -61,23 +61,21 @@
 							<view class="windMsg_main_msg flex justify-between">
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/yunxingNew.png" mode=""></image>
-										<!-- <view class="windMsgCom" style="background-color: #c2c2c2">
-										</view> -->
+										<image src="../../static/jnImage/indexPage/jn_jieru.png" mode=""></image>
 										<text>接入</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<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/daijiNew.png" mode=""></image>
+										<image src="../../static/jnImage/indexPage/jn_daiji.png" mode=""></image>
 										<text>待机</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.fd_djnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
@@ -85,21 +83,43 @@
 							<view class="windMsg_main_msg flex justify-between">
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/qidongNew.png" mode=""></image>
-										<text>启动</text>
+										<image src="../../static/jnImage/indexPage/jn_bingwang.png" mode=""></image>
+										<text>并网</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.fd_yxnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/gzdjNew.png" mode=""></image>
-										<text class="fourFont">故障\n待机</text>
+										<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>600</text>
+										<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>
@@ -107,21 +127,21 @@
 							<view class="windMsg_main_msg flex justify-between">
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/tingjiNew.png" mode=""></image>
-										<text>停机</text>
+										<image src="../../static/jnImage/indexPage/jn_shoulei.png" mode=""></image>
+										<text>受累</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.fd_slnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/lixianNew.png" mode=""></image>
+										<image src="../../static/jnImage/indexPage/jn_lixian.png" mode=""></image>
 										<text>离线</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.fd_lxnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
@@ -129,7 +149,7 @@
 						</view>
 					</view>
 					<view class="powerMsg">
-						<view class="flex justify-center" style="margin-bottom: 6px;">
+						<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>
@@ -139,21 +159,21 @@
 							<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>
+										<image src="../../static/jnImage/indexPage/jn_jieru.png" mode=""></image>
 										<text>接入</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<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/daijiP.png" mode=""></image>
+										<image src="../../static/jnImage/indexPage/jn_daiji.png" mode=""></image>
 										<text>待机</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.gf_djnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
@@ -161,21 +181,21 @@
 							<view class="windMsg_main_msg flex justify-between">
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/yunxingP.png" mode=""></image>
-										<text>运行</text>
+										<image src="../../static/jnImage/indexPage/jn_bingwang.png" mode=""></image>
+										<text>并网</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.gf_yxnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/guzhangNew.png" mode=""></image>
+										<image src="../../static/jnImage/indexPage/jn_guzhang.png" mode=""></image>
 										<text>故障</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.gf_gznum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
@@ -183,21 +203,43 @@
 							<view class="windMsg_main_msg flex justify-between">
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/gzwhNew.png" mode=""></image>
-										<text>维护</text>
+										<image src="../../static/jnImage/indexPage/jn_jianxiu.png" mode=""></image>
+										<text>检修</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.gf_jxnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/lixianNew.png" mode=""></image>
+										<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>600</text>
+										<text>{{Math.ceil(windstatusData.gf_lxnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
@@ -210,10 +252,10 @@
 							<text>实时监控</text>
 						</view>
 						<view class="ssjk_main">
-							<view class="ssjk_main_msg">
+							<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>宝龙山</text>
+									<text>{{item.name}}</text>
 								</view>
 								<view class="ssjk_main_msg_data flex">
 									<view class="msg_data_sty flex">
@@ -221,16 +263,16 @@
 											<text>风速</text>
 										</view>
 										<view class="dataSty flex">
-											<text>0.00</text>
+											<text>{{item.fs}}</text>
 											<text>m/s</text>
 										</view>
 									</view>
 									<view class="msg_data_sty flex">
 										<view class="msg_data_name">
-											<text>有功功率</text>
+											<text>实际功率</text>
 										</view>
 										<view class="dataSty flex">
-											<text>0.00</text>
+											<text>{{item.sjgl}}</text>
 											<text>MW</text>
 										</view>
 									</view>
@@ -239,7 +281,44 @@
 											<text>出现功率</text>
 										</view>
 										<view class="dataSty flex">
-											<text>0.00</text>
+											<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>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>
@@ -254,82 +333,161 @@
 </template>
 </template>
 <script>
+	import {
+		cockpitMonitor
+	} from '../../api/home.js'
+	import {
+		windPowerDataApi
+	} from '../../api/common.js'
 	export default {
 		onLoad: function() {},
 		data() {
 			return {
 				mesExData: [],
-				windPowerData: []
+				windPowerData: [],
+				timeData: {},
+				windstatusData: {},
+				powerstatusData: {},
+				windData: [],
+				powerData: []
 			}
 		},
 		created() {
-			this.windPowerData = [{
-					name: '风速',
-					value: 7,
-					code: '(m/s)',
-					min: 6,
-					max: 8
-				},
-				{
-					name: '日照强度',
-					value: 10,
-					code: '(m/s)',
-					min: 6,
-					max: 20
-				},
-				{
-					name: '功率',
-					value: 191,
-					code: '(万kW)',
-					min: 0,
-					max: 200
-				},
-				{
-					name: '理论功率',
-					value: 459,
-					code: '(万kW)',
-					min: 0,
-					max: 500
-				}
-			]
-			this.mesExData = [{
-					leftName: '容量',
-					leftValue: 282.3,
-					leftCode: '(WM)',
-				},
-				{
-					leftName: '安全天数',
-					leftValue: 20,
-					leftCode: '(天)',
-				},
-				{
-					leftName: '日发电量',
-					leftValue: 282.3,
-					leftCode: '(万kWh)'
-				},
-				{
-					leftName: '预测电量',
-					leftValue: 282.3,
-					leftCode: '(万kWh)'
-				},
-				{
-					leftName: '月发电量',
-					leftValue: 282.3,
-					leftCode: '(万kWh)'
-				},
-				{
-					leftName: '年发电量',
-					leftValue: 282.3,
-					leftCode: '(万kWh)'
-				},
-			]
+			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
+							that.mesExData = [{
+									leftName: '容量',
+									leftValue: datas.zzjrl,
+									leftCode: '(WM)',
+								},
+								{
+									leftName: '安全天数',
+									leftValue: datas.aqts,
+									leftCode: '(天)',
+								},
+								{
+									leftName: '日发电量',
+									leftValue: datas.rfdl,
+									leftCode: '(万kWh)'
+								},
+								{
+									leftName: '利用小时',
+									leftValue: datas.fdylyxs + datas.fdnlyxs,
+									leftCode: '(万kWh)'
+								},
+								{
+									leftName: '月发电量',
+									leftValue: datas.yfdl,
+									leftCode: '(万kWh)'
+								},
+								{
+									leftName: '年发电量',
+									leftValue: datas.nfdl,
+									leftCode: '(万kWh)'
+								},
+							]
+							that.windPowerData = [{
+								name: '风速',
+								value: datas.ssfs,
+								code: '(m/s)',
+								min: 6,
+								max: 8
+							}, {
+								name: '日照强度',
+								value: datas.gzzs,
+								code: '(m/s)',
+								min: 6,
+								max: 20
+							}, {
+								name: '功率',
+								value: datas.sjgl,
+								code: '(万kW)',
+								min: 0,
+								max: 200
+							}, {
+								name: '理论功率',
+								value: datas.llgl,
+								code: '(万kW)',
+								min: 0,
+								max: 500
+							}]
+						}
+						if (res.data.cblpoint) {
+							that.powerstatusData = res.data.cblpoint
+						}
+						if (res.data.mxztmap) {
+							that.windstatusData = res.data.mxztmap
+						}
+					}
+				})
+			},
+			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),
+											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),
+											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}`)
 			}
 		}
 	}

+ 367 - 90
pages/home/stationIndex.vue

@@ -8,9 +8,9 @@
 			<view class="main_time">
 				<view class="mesTime">
 					<image src="../../static/jnImage/indexPage/time.png"></image>
-					<text>2023年11月20日</text>
-					<text>星期一</text>
-					<text>09:19</text>
+					<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">
@@ -26,8 +26,25 @@
 							</view>
 						</uni-col>
 					</uni-row>
-					<view class="windMsg">
-						<view class="flex justify-center" style="margin-bottom: 6px;">
+					<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" v-if="stationWpid.indexOf('_FDC') > -1">
+						<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>
@@ -37,23 +54,119 @@
 							<view class="windMsg_main_msg flex justify-between">
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/yunxingNew.png" mode=""></image>
-										<!-- <view class="windMsgCom" style="background-color: #c2c2c2">
-										</view> -->
+										<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" v-else>
+						<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/jn_jieru.png" mode=""></image>
 										<text>接入</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<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/daijiNew.png" mode=""></image>
+										<image src="../../static/jnImage/indexPage/jn_daiji.png" mode=""></image>
 										<text>待机</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.gf_djnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
@@ -61,21 +174,21 @@
 							<view class="windMsg_main_msg flex justify-between">
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/qidongNew.png" mode=""></image>
-										<text>启动</text>
+										<image src="../../static/jnImage/indexPage/jn_bingwang.png" mode=""></image>
+										<text>并网</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.gf_yxnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/gzdjNew.png" mode=""></image>
-										<text class="fourFont">故障\n待机</text>
+										<image src="../../static/jnImage/indexPage/jn_guzhang.png" mode=""></image>
+										<text>故障</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.gf_gznum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
@@ -83,21 +196,43 @@
 							<view class="windMsg_main_msg flex justify-between">
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/tingjiNew.png" mode=""></image>
-										<text>停机</text>
+										<image src="../../static/jnImage/indexPage/jn_jianxiu.png" mode=""></image>
+										<text>检修</text>
 									</view>
 									<view class="windMsgSty_right flex justify-between">
-										<text>600</text>
+										<text>{{Math.ceil(windstatusData.gf_jxnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
 								<view class="windMsgSty flex">
 									<view class="windMsgSty_left">
-										<image src="../../static/jnImage/indexPage/lixianNew.png" mode=""></image>
+										<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>600</text>
+										<text>{{Math.ceil(windstatusData.gf_lxnum)}}</text>
 										<text>台</text>
 									</view>
 								</view>
@@ -106,11 +241,21 @@
 					</view>
 
 					<view class="matrix">
-						<view class="matrixItem" v-for="(item,index) in 2" :key="index">
-							<view class="matrixText">乌力吉一期</view>
+						<view class="matrixItem" v-if="stationWpid.indexOf('_FDC') > -1"
+							v-for="(item,index) in windData" :key="index">
+							<view class="matrixText">{{item.wpname}}</view>
+							<uni-row class="matrixItemRow">
+								<uni-col :span="3" v-for="(itv,index) in item.wtlist" :key="index">
+									<view class="matrixItemRowOne" :style="getColor(itv)">{{itv.wtname}}</view>
+								</uni-col>
+							</uni-row>
+						</view>
+						<view class="matrixItem" v-if="stationWpid.indexOf('_GDC') > -1"
+							v-for="(item,index) in powerData" :key="index">
+							<view class="matrixText">{{item.wpname}}</view>
 							<uni-row class="matrixItemRow">
-								<uni-col :span="3" v-for="(item,index) in 45" :key="index">
-									<view class="matrixItemRowOne">A01</view>
+								<uni-col :span="3" v-for="(itv,index) in item.wtlist" :key="index">
+									<view class="matrixItemRowOne" :style="getColor(itv)">{{itv.wtname}}</view>
 								</uni-col>
 							</uni-row>
 						</view>
@@ -123,9 +268,16 @@
 </template>
 <script>
 	import stationBar from '../common/stationTab.vue'
+	import {
+		windPowerDataApi
+	} from '../../api/common.js'
+	import {
+		cockpitMonitor,
+		stationCaldataApi
+	} from '../../api/home.js'
 	export default {
 		onLoad: function(e) {
-			this.stationName = uni.getStorageSync('stationName')
+
 		},
 		components: {
 			stationBar
@@ -133,77 +285,170 @@
 		data() {
 			return {
 				stationName: '',
+				stationWpid: '',
 				stationTab: '',
 				mesExData: [],
-				windPowerData: []
+				windPowerData: [],
+				windstatusData: [],
+				powerstatusData: [],
+				windData: [],
+				powerData: [],
+				timeData: {},
 			}
 		},
 		created() {
-			this.windPowerData = [{
-					name: '实际风速',
-					value: 7,
-					code: '(m/s)',
-					min: 6,
-					max: 8
-				},
-				{
-					name: '预测风速',
-					value: 10,
-					code: '(m/s)',
-					min: 6,
-					max: 20
-				},
-				{
-					name: '实际功率',
-					value: 191,
-					code: '(万kW)',
-					min: 0,
-					max: 200
-				},
-				{
-					name: '理论功率',
-					value: 459,
-					code: '(万kW)',
-					min: 0,
-					max: 500
-				}
-			]
-			this.mesExData = [{
-					leftName: '容量',
-					leftValue: 282.3,
-					leftCode: '(WM)',
-				},
-				{
-					leftName: '安全天数',
-					leftValue: 20,
-					leftCode: '(天)',
-				},
-				{
-					leftName: '日发电量',
-					leftValue: 282.3,
-					leftCode: '(万kWh)'
-				},
-				{
-					leftName: '预测电量',
-					leftValue: 282.3,
-					leftCode: '(万kWh)'
-				},
-				{
-					leftName: '月发电量',
-					leftValue: 282.3,
-					leftCode: '(万kWh)'
-				},
-				{
-					leftName: '年发电量',
-					leftValue: 282.3,
-					leftCode: '(万kWh)'
-				},
-			]
+			this.stationName = uni.getStorageSync('stationName')
+			this.stationWpid = uni.getStorageSync('stationWpid')
+			this.getTimeDaya()
+			this.getHomeData()
+			this.getHomeDataTwo()
+			if (this.stationWpid.indexOf('_FDC') > -1) {
+				this.getwindPowerData("0", "-1");
+			} else {
+				this.getwindPowerData("0", "-2");
+			}
 		},
 		mounted() {
 			this.$refs.stationBar.showTab = '首页'
 		},
 		methods: {
+			getColor(itv) {
+				switch (Math.ceil(itv.status)) {
+					case 0:
+						return "background: #1d99ff";
+					case 1:
+						return "background: #05bb4c";
+					case 2:
+						return "background: #ba3237";
+					case 3:
+						return "background: #e17e23";
+					case 4:
+						return "background: #c531c7";
+					case 5:
+						return "background: #fff";
+					case 6:
+						return "background: #606769";
+				}
+			},
+			//获取时间
+			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: that.stationWpid
+				}).then(res => {
+					if (res.data) {
+						if (res.data.cblpoint) {
+							that.powerstatusData = res.data.cblpoint
+						}
+						if (res.data.mxztmap) {
+							that.windstatusData = res.data.mxztmap
+						}
+					}
+				})
+			},
+			getHomeDataTwo() {
+				let that = this
+				stationCaldataApi({
+					wpid: that.stationWpid
+				}).then(res => {
+					if (res.data.data) {
+						let datas = res.data.data
+						that.mesExData = [{
+								leftName: '容量',
+								leftValue: datas.zzjrl / 1000,
+								leftCode: '(WM)',
+							},
+							{
+								leftName: '安全天数',
+								leftValue: Math.ceil(datas.aqts),
+								leftCode: '(天)',
+							},
+							{
+								leftName: '日发电量',
+								leftValue: datas.rfdl,
+								leftCode: '(万kWh)'
+							},
+							{
+								leftName: '利用小时',
+								leftValue: datas.ylyxs + datas.nlyxs,
+								leftCode: '(万kWh)'
+							},
+							{
+								leftName: '月发电量',
+								leftValue: datas.yfdl,
+								leftCode: '(万kWh)'
+							},
+							{
+								leftName: '年发电量',
+								leftValue: datas.nfdl,
+								leftCode: '(万kWh)'
+							},
+						]
+						that.windPowerData = [{
+							name: '风速',
+							value: Math.ceil(datas.sspjfsgzd),
+							code: '(m/s)',
+							min: 6,
+							max: 8
+						}, {
+							name: '日照强度',
+							value: 0,
+							code: '(m/s)',
+							min: 6,
+							max: 20
+						}, {
+							name: '功率',
+							value: datas.yggl,
+							code: '(万kW)',
+							min: 0,
+							max: 200
+						}, {
+							name: '负荷率',
+							value: Math.ceil(datas.fhl),
+							code: '(万kW)',
+							min: 0,
+							max: 500
+						}]
+					}
+				})
+			},
+			getwindPowerData(type1, type2) {
+				let that = this
+				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 (that.stationWpid === item.wpid) {
+										if (type2 === "-1") {
+											that.windData.push(item)
+										} else {
+											that.powerData.push(item)
+										}
+									}
+								})
+							}
+
+						} else {
+							this.windData = [];
+							this.powerData = [];
+						}
+					});
+			},
 			back() {
 				this.$tab.switchTab('/pages/home/index')
 			},
@@ -227,7 +472,14 @@
 
 		.box-bg {
 			width: 100vw;
-			padding: 5px 0;
+			padding: 0;
+
+			.uni-navbar {
+				.uni-navbar__content {
+					padding: 5px 0;
+					height: 50px;
+				}
+			}
 		}
 
 		.home_main {
@@ -307,9 +559,34 @@
 
 					}
 
+					.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 {
+					.windMsg,
+					.powerMsg {
 						margin-top: 15px;
 
 						.windMsg_title {

+ 9 - 25
pages/login/login.vue

@@ -48,15 +48,15 @@
 			// 登录方法
 			handleLogin(params) {
 				let that = this
-				// if (this.loginForm.username === "") {
-				// 	this.$modal.msgError("请输入您的账号")
-				// } else if (this.loginForm.password === "") {
-				// 	this.$modal.msgError("请输入您的密码")
-				// } else {
-				// 	this.pwdLogin({})
-				// }
-
-				that.$tab.switchTab('/pages/home/index')
+				if (this.loginForm.username === "") {
+					this.$modal.msgError("请输入您的账号")
+				} else if (this.loginForm.password === "") {
+					this.$modal.msgError("请输入您的密码")
+				} else {
+					this.pwdLogin({})
+				}
+
+				// that.$tab.switchTab('/pages/home/index')
 			},
 			// 密码登录
 			pwdLogin() {
@@ -73,22 +73,6 @@
 					}
 				})
 			},
-			// 登录成功后,处理函数
-			loginSuccess(result) {
-				// 设置用户信息
-				// this.$store.dispatch('GetInfo').then(res => {
-				// 	this.$tab.reLaunch('/pages/index')
-				// })
-				// this.$tab.reLaunch('/pages/index')
-				uni.navigateTo({
-					url: '/pages/index',
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-				// this.$tab.navigateTo('/pages/index')
-
-			}
 		}
 	}
 </script>

+ 156 - 40
pages/power/stationIndex.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="power">
+	<view class="stationpower">
 		<view class="box-bg">
 			<uni-nav-bar :fixed="true" dark left-icon="left" background-color='#202246' :title="stationName"
 				@clickLeft="back" />
@@ -13,18 +13,18 @@
 			</view>
 			<view class="fdwcl" v-if="powerTab === 'DL'">
 				<view class="fdwcl_DataAll" v-for="(item,index) in powerProgressData" :key="index">
-					<view class="fdwcl_Data flex justify-between">
-						<view class="fdwcl_Data_1 flex">
+					<uni-row class="fdwcl_Data flex justify-between">
+						<uni-col :span="8" class="fdwcl_Data_1 flex">
 							<image src="../../static/jnImage/indexPage/windIcon.png" mode=""></image>
 							<text>{{item.inPower}}万kWh</text>
-						</view>
-						<view class="fdwcl_Data_2">
+						</uni-col>
+						<uni-col :span="8" class="fdwcl_Data_2">
 							<text>{{item.name}}</text>
-						</view>
-						<view class="fdwcl_Data_3">
+						</uni-col>
+						<uni-col :span="8" class="fdwcl_Data_3 flex justify-end">
 							<text>{{item.allPower}}万kWh</text>
-						</view>
-					</view>
+						</uni-col>
+					</uni-row>
 					<view class="fdwcl_Data_msg">
 						<view class="show_msg" :style="showProgress(item, index)">
 
@@ -110,14 +110,14 @@
 					<text>日发电量</text>
 				</view>
 				<view class="qiun-charts">
-					<qiun-data-charts type="column" :opts="opts" :chartData="chartData" />
+					<qiun-data-charts type="column" :opts="optsDay" :chartData="chartDataDay" />
 				</view>
 				<view class="rdldb_title flex justify-center">
 					<image src="../../static/jnImage/powerPage/powerDayIcon.png" mode=""></image>
 					<text>月发电量</text>
 				</view>
 				<view class="qiun-charts">
-					<qiun-data-charts type="column" :opts="opts" :chartData="chartData" />
+					<qiun-data-charts type="column" :opts="optsMonth" :chartData="chartDataMonth" />
 				</view>
 			</view>
 			<view class="xsfsgl" v-else>
@@ -136,10 +136,17 @@
 
 <script>
 	import stationBar from '../common/stationTab.vue'
+	import {
+		electricityStatisticsApi,
+		statisticsHisdataApi
+	} from '../../api/power.js'
+	import {
+		bulletinappBulletinApi
+	} from '../../api/report.js'
 	var uChartsInstance = {};
 	export default {
 		onLoad: function(e) {
-			this.stationName = uni.getStorageSync('stationName')
+
 		},
 		components: {
 			stationBar
@@ -147,6 +154,7 @@
 		data() {
 			return {
 				stationName: '',
+				stationWpid: '',
 				stationTab: '',
 				powerTab: 'DL',
 				yearTab: 'month',
@@ -154,13 +162,18 @@
 				yearData: [],
 				powerProgressData: [],
 				powerNowData: [],
-				chartData: {},
+				chartDataDay: {},
+				chartDataMonth: {},
 				chartDataLine: {},
-				opts: {},
+				optsDay: {},
+				optsMonth: {},
 				optsLine: {},
 			}
 		},
 		created() {
+			this.stationName = uni.getStorageSync('stationName')
+			this.stationWpid = uni.getStorageSync('stationWpid')
+			this.getReportData()
 			this.powerTabData = [{
 					nameZN: '电量',
 					nameEN: 'DL',
@@ -185,19 +198,7 @@
 
 				}
 			]
-			this.powerProgressData = [{
-					type: 'wind',
-					inPower: 961,
-					allPower: 1865,
-					name: '月发电完成率'
-				},
-				{
-					type: 'wind',
-					inPower: 852,
-					allPower: 1865,
-					name: '年发电完成率'
-				}
-			]
+
 			this.powerNowData = [{
 					type: 'wind',
 					inPower: 961,
@@ -214,16 +215,44 @@
 		},
 		mounted() {
 			this.$refs.stationBar.showTab = '电量预测'
-			this.getPowerBar()
+			// this.getPowerBar()
+			this.getStationDayPowerData()
+			this.getStationMonthPowerData()
 		},
 		methods: {
 			back() {
-				this.$tab.switchTab('/pages/power/index')
+				this.$tab.switchTab('/pages/home/index')
 			},
 			stationTabXY(it) {
 				this.stationTab = it
 			},
-			getPowerBar() {
+			// 获取场站日发电量
+			getStationDayPowerData() {
+				let that = this
+				let params = {
+					wpid: that.stationWpid
+				}
+				statisticsHisdataApi(params).then(res => {
+					if (res && res.data) {
+						that.getPowerBar('day', res.data.data)
+					}
+				})
+			},
+			// 获取场站月发电量
+			getStationMonthPowerData() {
+				let that = this
+				let params = {
+					wpId: that.stationWpid,
+					timetype: 'month',
+					year: new Date().getFullYear()
+				}
+				electricityStatisticsApi(params).then(res => {
+					if (res && res.data) {
+						that.getPowerBar('month', res.data.value)
+					}
+				})
+			},
+			getPowerBar(type, values) {
 				let opts = {
 					color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
 						"#ea7ccc"
@@ -239,7 +268,10 @@
 						axisLineColor: "#A49EAC",
 						fontColor: "#A49EAC",
 						fontSize: 10,
-						marginTop: 5
+						marginTop: 5,
+						titleFontColor: "#A49EAC",
+						titleFontSize: 10,
+						titleOffsetY: -18
 					},
 					yAxis: {
 						showTitle: true,
@@ -265,17 +297,33 @@
 					'#766FF1', '#4951B2',
 				]
 				//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
+				if (type === 'day') {
+					let valData = []
+					if (values.length === 0) {
+						valData = [{
+							rfdldb: 250000,
+							recordDate: '2023-12-05'
+						}]
+					} else {
+						valData = values
+					}
+					this.dayBarData(opts, proColor, valData)
+				} else if (type === 'month') {
+					this.monthBarData(opts, proColor, values)
+				}
 
+			},
+			dayBarData(opts, proColor, values) {
 				let xAxis = []
 				let series = []
-				this.powerProgressData.forEach((item, index) => {
-					xAxis.push(item.name)
+				values.forEach((item, index) => {
+					xAxis.push(item.recordDate.substring(5))
 					let obj = {
 						color: '',
 						name: '',
 						textSize: 10,
 						textColor: "#A49EAC",
-						value: item.inPower
+						value: item.rfdldb / 1000
 					}
 					proColor.forEach((it, idx) => {
 						if (index.toString().length > 1) {
@@ -289,11 +337,48 @@
 				let res = {
 					categories: xAxis,
 					series: [{
+						name: '日发电量',
+						textColor: "#FFFFFF",
+						textSize: 12,
 						data: series
 					}]
 				};
-				this.opts = opts
-				this.chartData = JSON.parse(JSON.stringify(res));
+				this.optsDay = opts
+				this.chartDataDay = JSON.parse(JSON.stringify(res));
+			},
+			monthBarData(opts, proColor, values) {
+				let xAxis = []
+				let series = []
+				values.forEach((item, index) => {
+					xAxis.push((index + 1) + '月')
+					let obj = {
+						color: '',
+						name: '',
+						textSize: 10,
+						textColor: "#A49EAC",
+						value: item.sjdl
+					}
+					proColor.forEach((it, idx) => {
+						if (index.toString().length > 1) {
+							obj.color = proColor[index.toString().slice(-1)]
+						} else {
+							obj.color = proColor[index]
+						}
+					})
+					series.push(obj)
+				})
+				let res = {
+					categories: xAxis,
+					series: [{
+						name: '实发电量',
+						textColor: "#FFFFFF",
+						textSize: 12,
+						data: series
+					}]
+				};
+				opts.xAxis.title = '月'
+				this.optsMonth = opts
+				this.chartDataMonth = JSON.parse(JSON.stringify(res));
 			},
 			getLineBar() {
 				let opts = {
@@ -416,7 +501,30 @@
 				let ss = `width: ${pro};background: ${showColor}`
 				return ss
 			},
-
+			getReportData() {
+				let that = this
+				bulletinappBulletinApi({
+					wpId: that.stationWpid
+				}).then(res => {
+					if (res && res.data) {
+						that.reportDataAll = res.data
+						let datas = res.data
+						that.powerProgressData = [{
+								type: 'wind',
+								inPower: datas['月发电量'],
+								allPower: datas['月计划发电量'],
+								name: '月发电完成率'
+							},
+							{
+								type: 'wind',
+								inPower: datas['年发电量'],
+								allPower: datas['年计划发电量'],
+								name: '年发电完成率'
+							}
+						]
+					}
+				})
+			},
 		},
 	}
 </script>
@@ -426,7 +534,7 @@
 		background-color: #202246;
 	}
 
-	.power {
+	.stationpower {
 		width: 100vw;
 		background: url('../../static/jnImage/loginPage/windBack.png'), url('../../static/jnImage/loginPage/backWav.png');
 		background-repeat: no-repeat, repeat;
@@ -434,11 +542,19 @@
 
 		.box-bg {
 			width: 100vw;
-			padding: 5px 0;
+			padding: 0;
+
+			.uni-navbar {
+				.uni-navbar__content {
+					padding: 5px 0;
+					height: 50px;
+				}
+			}
 		}
 
 		.power_main {
-			padding: 0 20px;
+			padding: 25px;
+			// margin: 20px 0;
 
 			.power_tab {
 				text {

+ 105 - 65
pages/report/index.vue

@@ -3,18 +3,18 @@
 		<company-header></company-header>
 		<view class="report_main">
 			<view class="report_DataAll" v-for="(item,index) in reportProgressData" :key="index">
-				<view class="report_Data flex justify-between">
-					<view class="report_Data_1 flex">
+				<uni-row class="report_Data flex justify-between">
+					<uni-col :span="8" class="report_Data_1 flex">
 						<image src="../../static/jnImage/indexPage/windIcon.png" mode=""></image>
 						<text>{{item.inPower}}</text>
-					</view>
-					<view class="report_Data_2">
+					</uni-col>
+					<uni-col :span="8" class="report_Data_2">
 						<text>{{item.name}}</text>
-					</view>
-					<view class="report_Data_3">
+					</uni-col>
+					<uni-col :span="8" class="report_Data_3 flex justify-end">
 						<text>{{item.allPower}}</text>
-					</view>
-				</view>
+					</uni-col>
+				</uni-row>
 				<view class="report_Data_msg">
 					<view class="show_msg" :style="showProgress(item)">
 
@@ -29,15 +29,11 @@
 				<uni-table ref="table" border emptyText="暂无更多数据" width="100%">
 					<uni-tr>
 						<uni-th align="center">性能指标</uni-th>
-						<uni-th width="45" align="center">数据</uni-th>
-						<uni-th width="45" align="center">数据</uni-th>
-						<uni-th width="45" align="center">数据</uni-th>
+						<uni-th width="125" align="center">数据</uni-th>
 					</uni-tr>
 					<uni-tr v-for="(item, index) in tableData" :key="index">
 						<uni-td>{{ item.name }}</uni-td>
-						<uni-td align="center">{{ item.data1 }}</uni-td>
-						<uni-td align="center">{{ item.data2 }}</uni-td>
-						<uni-td align="center">{{ item.data3 }}</uni-td>
+						<uni-td align="center">{{ item.value }}</uni-td>
 					</uni-tr>
 				</uni-table>
 			</view>
@@ -46,6 +42,9 @@
 </template>
 
 <script>
+	import {
+		bulletinappBulletinApi
+	} from '../../api/report.js'
 	import companyHeader from '../common/companyHeader.vue'
 	export default {
 		onLoad: function() {},
@@ -57,71 +56,36 @@
 				reportProgressData: [],
 				yearTab: 'day',
 				yearData: [],
-				tableData: []
+				tableData: [],
+				reportDataAll: {}
 			}
 		},
 		created() {
-			this.tableData = [{
-					name: '指标一',
-					data1: '2.8',
-					data2: '3.6',
-					data3: '4.8'
+			this.getReportData()
+			this.yearData = [{
+					nameZN: '日简报',
+					nameEN: 'day',
+					showColor: true
 				},
 				{
-					name: '指标二',
-					data1: '2.8',
-					data2: '3.6',
-					data3: '4.8'
+					nameZN: '月简报',
+					nameEN: 'month',
+					showColor: false
 				},
 				{
-					name: '指标三',
-					data1: '2.8',
-					data2: '3.6',
-					data3: '4.8'
-				},
-			]
-			this.reportProgressData = [{
-						inPower: '961万kWh',
-						allPower: '1865万kWh',
-						progress: '70%',
-						name: '年发电量'
-					},
-					{
-						inPower: '171天',
-						allPower: '365天',
-						progress: '56%',
-						name: '日历进度'
-					},
-					{
-						inPower: '日历进程',
-						allPower: '年发电量',
-						progress: '65%',
-						name: '完成度'
-					},
-				],
-				this.yearData = [{
-						nameZN: '日简报',
-						nameEN: 'day',
-						showColor: true
-					},
-					{
-						nameZN: '月简报',
-						nameEN: 'month',
-						showColor: false
-					},
-					{
-						nameZN: '年简报',
-						nameEN: 'year',
-						showColor: false
+					nameZN: '年简报',
+					nameEN: 'year',
+					showColor: false
 
-					}
-				]
+				}
+			]
 		},
 		methods: {
 			showProgress(item) {
 				return `width: ${item.progress};`
 			},
 			changeYearTab(item) {
+				this.tableData = []
 				this.yearData.forEach(it => {
 					it.showColor = false
 					if (it.nameEN === item.nameEN) {
@@ -129,7 +93,83 @@
 						this.yearTab = it.nameEN
 					}
 				})
+				for (let i in this.reportDataAll) {
+					let obj = {}
+					if (this.yearTab === 'day' && i.indexOf('日') > -1) {
+						obj = {
+							name: i,
+							value: this.reportDataAll[i]
+						}
+						this.tableData.push(obj)
+					}
+					if (this.yearTab === 'month' && i.indexOf('月') > -1) {
+						obj = {
+							name: i,
+							value: this.reportDataAll[i]
+						}
+						this.tableData.push(obj)
+					}
+					if (this.yearTab === 'year' && i.indexOf('年') > -1) {
+						obj = {
+							name: i,
+							value: this.reportDataAll[i]
+						}
+						this.tableData.push(obj)
+					}
+				}
 			},
+			getReportData() {
+				let that = this
+				that.tableData = []
+				that.reportDataAll = {}
+				bulletinappBulletinApi({
+					wpId: 'KGDL_FGS0'
+				}).then(res => {
+					if (res && res.data) {
+						that.reportDataAll = res.data
+						let datas = res.data
+						let nowDay = that.getDayOfYear()
+						let nowPro = nowDay / 365 * 100
+						that.reportProgressData = [{
+								inPower: datas['年发电量'] + '万kWh',
+								allPower: datas['年计划发电量'] + '万kWh',
+								progress: datas['年完成率'],
+								name: '年发电量'
+							},
+							{
+								inPower: nowDay + '天',
+								allPower: '365天',
+								progress: nowPro + '%',
+								name: '日历进度'
+							},
+							{
+								inPower: '日历进程',
+								allPower: '年发电量',
+								progress: datas['年完成率'],
+								name: '完成度'
+							},
+						]
+						for (let i in datas) {
+							let obj = {}
+							if (that.yearTab === 'day' && i.indexOf('日') > -1) {
+								obj = {
+									name: i,
+									value: datas[i]
+								}
+								that.tableData.push(obj)
+							}
+						}
+					}
+				})
+			},
+			getDayOfYear() {
+				var date = new Date();
+				var start = new Date(date.getFullYear(), 0, 0);
+				var diff = (date - start) + ((start.getTimezoneOffset() - date.getTimezoneOffset()) * 60 * 1000);
+				var oneDay = 1000 * 60 * 60 * 24;
+				var dayOfYear = Math.floor(diff / oneDay);
+				return dayOfYear;
+			}
 		}
 	}
 </script>

+ 109 - 61
pages/report/stationIndex.vue

@@ -1,23 +1,23 @@
 <template>
-	<view class="report">
+	<view class="stationreport">
 		<view class="box-bg">
 			<uni-nav-bar :fixed="true" dark left-icon="left" background-color='#202246' :title="stationName"
 				@clickLeft="back" />
 		</view>
 		<view class="report_main">
 			<view class="report_DataAll" v-for="(item,index) in reportProgressData" :key="index">
-				<view class="report_Data flex justify-between">
-					<view class="report_Data_1 flex">
+				<uni-row class="report_Data flex justify-between">
+					<uni-col :span="8" class="report_Data_1 flex">
 						<image src="../../static/jnImage/indexPage/windIcon.png" mode=""></image>
 						<text>{{item.inPower}}</text>
-					</view>
-					<view class="report_Data_2">
+					</uni-col>
+					<uni-col :span="8" class="report_Data_2">
 						<text>{{item.name}}</text>
-					</view>
-					<view class="report_Data_3">
+					</uni-col>
+					<uni-col :span="8" class="report_Data_3 flex justify-end">
 						<text>{{item.allPower}}</text>
-					</view>
-				</view>
+					</uni-col>
+				</uni-row>
 				<view class="report_Data_msg">
 					<view class="show_msg" :style="showProgress(item)">
 
@@ -32,15 +32,11 @@
 				<uni-table ref="table" border emptyText="暂无更多数据" width="100%">
 					<uni-tr>
 						<uni-th align="center">性能指标</uni-th>
-						<uni-th width="45" align="center">数据</uni-th>
-						<uni-th width="45" align="center">数据</uni-th>
-						<uni-th width="45" align="center">数据</uni-th>
+						<uni-th width="125" align="center">数据</uni-th>
 					</uni-tr>
 					<uni-tr v-for="(item, index) in tableData" :key="index">
 						<uni-td>{{ item.name }}</uni-td>
-						<uni-td align="center">{{ item.data1 }}</uni-td>
-						<uni-td align="center">{{ item.data2 }}</uni-td>
-						<uni-td align="center">{{ item.data3 }}</uni-td>
+						<uni-td align="center">{{ item.value }}</uni-td>
 					</uni-tr>
 				</uni-table>
 			</view>
@@ -50,63 +46,30 @@
 </template>
 
 <script>
+	import {
+		bulletinappBulletinApi
+	} from '../../api/report.js'
 	import stationBar from '../common/stationTab.vue'
 	export default {
-		onLoad: function() {
-			this.stationName = uni.getStorageSync('stationName')
-		},
+		onLoad: function() {},
 		components: {
-			stationName: '',
 			stationBar
 		},
 		data() {
 			return {
+				stationWpid: '',
 				stationName: '',
 				reportProgressData: [],
 				yearTab: 'day',
 				yearData: [],
-				tableData: []
+				tableData: [],
+				reportDataAll: []
 			}
 		},
 		created() {
-			this.tableData = [{
-					name: '指标一',
-					data1: '2.8',
-					data2: '3.6',
-					data3: '4.8'
-				},
-				{
-					name: '指标二',
-					data1: '2.8',
-					data2: '3.6',
-					data3: '4.8'
-				},
-				{
-					name: '指标三',
-					data1: '2.8',
-					data2: '3.6',
-					data3: '4.8'
-				},
-			]
-			this.reportProgressData = [{
-					inPower: '961万kWh',
-					allPower: '1865万kWh',
-					progress: '70%',
-					name: '年发电量'
-				},
-				{
-					inPower: '171天',
-					allPower: '365天',
-					progress: '56%',
-					name: '日历进度'
-				},
-				{
-					inPower: '日历进程',
-					allPower: '年发电量',
-					progress: '65%',
-					name: '完成度'
-				},
-			]
+			this.stationName = uni.getStorageSync('stationName')
+			this.stationWpid = uni.getStorageSync('stationWpid')
+			this.getReportData()
 			this.yearData = [{
 					nameZN: '日简报',
 					nameEN: 'day',
@@ -130,7 +93,7 @@
 		},
 		methods: {
 			back() {
-				this.$tab.switchTab('/pages/report/index')
+				this.$tab.switchTab('/pages/home/index')
 			},
 			showProgress(item) {
 				return `width: ${item.progress};`
@@ -142,6 +105,7 @@
 				this.$tab.navigateTo('/pages/common/stationListPage')
 			},
 			changeYearTab(item) {
+				this.tableData = []
 				this.yearData.forEach(it => {
 					it.showColor = false
 					if (it.nameEN === item.nameEN) {
@@ -149,7 +113,83 @@
 						this.yearTab = it.nameEN
 					}
 				})
+				for (let i in this.reportDataAll) {
+					let obj = {}
+					if (this.yearTab === 'day' && i.indexOf('日') > -1) {
+						obj = {
+							name: i,
+							value: this.reportDataAll[i]
+						}
+						this.tableData.push(obj)
+					}
+					if (this.yearTab === 'month' && i.indexOf('月') > -1) {
+						obj = {
+							name: i,
+							value: this.reportDataAll[i]
+						}
+						this.tableData.push(obj)
+					}
+					if (this.yearTab === 'year' && i.indexOf('年') > -1) {
+						obj = {
+							name: i,
+							value: this.reportDataAll[i]
+						}
+						this.tableData.push(obj)
+					}
+				}
 			},
+			getReportData() {
+				let that = this
+				that.tableData = []
+				that.reportDataAll = {}
+				bulletinappBulletinApi({
+					wpId: 'KGDL_FGS0'
+				}).then(res => {
+					if (res && res.data) {
+						that.reportDataAll = res.data
+						let datas = res.data
+						let nowDay = that.getDayOfYear()
+						let nowPro = nowDay / 365 * 100
+						that.reportProgressData = [{
+								inPower: datas['年发电量'] + '万kWh',
+								allPower: datas['年计划发电量'] + '万kWh',
+								progress: datas['年完成率'],
+								name: '年发电量'
+							},
+							{
+								inPower: nowDay + '天',
+								allPower: '365天',
+								progress: nowPro + '%',
+								name: '日历进度'
+							},
+							{
+								inPower: '日历进程',
+								allPower: '年发电量',
+								progress: datas['年完成率'],
+								name: '完成度'
+							},
+						]
+						for (let i in datas) {
+							let obj = {}
+							if (that.yearTab === 'day' && i.indexOf('日') > -1) {
+								obj = {
+									name: i,
+									value: datas[i]
+								}
+								that.tableData.push(obj)
+							}
+						}
+					}
+				})
+			},
+			getDayOfYear() {
+				var date = new Date();
+				var start = new Date(date.getFullYear(), 0, 0);
+				var diff = (date - start) + ((start.getTimezoneOffset() - date.getTimezoneOffset()) * 60 * 1000);
+				var oneDay = 1000 * 60 * 60 * 24;
+				var dayOfYear = Math.floor(diff / oneDay);
+				return dayOfYear;
+			}
 		}
 	}
 </script>
@@ -159,7 +199,7 @@
 		background-color: #202246;
 	}
 
-	.report {
+	.stationreport {
 		width: 100vw;
 		background: url('../../static/jnImage/loginPage/windBack.png'), url('../../static/jnImage/loginPage/backWav.png');
 		background-repeat: no-repeat, repeat;
@@ -167,11 +207,19 @@
 
 		.box-bg {
 			width: 100vw;
-			padding: 5px 0;
+			padding: 0;
+
+			.uni-navbar {
+				.uni-navbar__content {
+					padding: 5px 0;
+					height: 50px;
+				}
+			}
 		}
 
 		.report_main {
 			padding: 0 20px;
+			margin-top: 20px;
 
 			.report_DataAll {
 				margin-top: 10px;

+ 14 - 6
pages/type/stationIndex.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="faultType">
+	<view class="stationfaultType">
 		<view class="box-bg">
 			<uni-nav-bar :fixed="true" dark left-icon="left" background-color='#202246' :title="stationName"
 				@clickLeft="back" />
@@ -57,7 +57,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="ssdl">
+			<!-- <view class="ssdl">
 				<view class="flex justify-between">
 					<view class="gzcs_title flex justify-center">
 						<image src="../../static/jnImage/powerPage/powerDayIcon.png" mode=""
@@ -102,7 +102,7 @@
 						</view>
 					</view>
 				</view>
-			</view>
+			</view> -->
 			<view class="wxss">
 				<view class="flex justify-between">
 					<view class="gzcs_title flex justify-center">
@@ -312,7 +312,7 @@
 		},
 		methods: {
 			back() {
-				this.$tab.switchTab('/pages/type/index')
+				this.$tab.switchTab('/pages/home/index')
 			},
 			getPieBar() {
 				let proColor = ['#5CB2EF', '#3E78C5', '#00299D', '#3EAD9F', '#3F3A99', '#5EAC88', '#5D56D0', '#CD8D23',
@@ -413,7 +413,7 @@
 		background-color: #202246;
 	}
 
-	.faultType {
+	.stationfaultType {
 		width: 100vw;
 		background: url('../../static/jnImage/loginPage/windBack.png'), url('../../static/jnImage/loginPage/backWav.png');
 		background-repeat: no-repeat, repeat;
@@ -421,11 +421,19 @@
 
 		.box-bg {
 			width: 100vw;
-			padding: 5px 0;
+			padding: 0;
+
+			.uni-navbar {
+				.uni-navbar__content {
+					padding: 5px 0;
+					height: 50px;
+				}
+			}
 		}
 
 		.faultType_main {
 			padding: 0 20px;
+			margin-top: 20px;
 
 			.faultType_tab {
 				text {

+ 31 - 3
pages/warn/stationIndex.vue

@@ -1,6 +1,9 @@
 <template>
 	<view class="stationFaultwarn">
-		<company-header></company-header>
+		<view class="box-bg">
+			<uni-nav-bar :fixed="true" dark left-icon="left" background-color='#202246' :title="stationName"
+				@clickLeft="back" />
+		</view>
 		<view class="falutWarn_main">
 			<view class="faultwarn_main_com flex" style="margin:10px 0" v-for="(item,index) in faultwarnData"
 				:key="index">
@@ -16,18 +19,24 @@
 				</view>
 			</view>
 		</view>
+		<station-bar ref="stationBar"></station-bar>
 	</view>
 </template>
 
 <script>
 	import companyHeader from '../common/companyHeader.vue'
+	import stationBar from '../common/stationTab.vue'
 	export default {
-		onLoad: function() {},
+		onLoad: function() {
+			this.stationName = uni.getStorageSync('stationName')
+		},
 		components: {
-			companyHeader
+			companyHeader,
+			stationBar
 		},
 		data() {
 			return {
+				stationName: '',
 				faultwarnData: []
 			}
 		},
@@ -46,7 +55,13 @@
 				},
 			]
 		},
+		mounted() {
+			this.$refs.stationBar.showTab = '故障预警'
+		},
 		methods: {
+			back() {
+				this.$tab.switchTab('/pages/home/index')
+			},
 			getSty(item) {
 				let sty = ''
 				if (item.reson.length > 16) {
@@ -77,8 +92,21 @@
 		background-repeat: no-repeat, repeat;
 		background-size: 100% 260px, 100% 5px;
 
+		.box-bg {
+			width: 100vw;
+			padding: 0;
+
+			.uni-navbar {
+				.uni-navbar__content {
+					padding: 5px 0;
+					height: 50px;
+				}
+			}
+		}
+
 		.falutWarn_main {
 			padding: 0 20px;
+			margin-top: 20px;
 
 			.faultwarn_main_com {
 				height: 60px;

+ 31 - 29
plugins/tab.js

@@ -1,30 +1,32 @@
 export default {
-  // 关闭所有页面,打开到应用内的某个页面
-  reLaunch(url) {
-    return uni.reLaunch({
-      url: url
-    })
-  },
-  // 跳转到tabBar页面,并关闭其他所有非tabBar页面
-  switchTab(url) {
-    return uni.switchTab({
-      url: url
-    })
-  },
-  // 关闭当前页面,跳转到应用内的某个页面
-  redirectTo(url) {
-    return uni.redirectTo({
-      url: url
-    })
-  },
-  // 保留当前页面,跳转到应用内的某个页面
-  navigateTo(url) {
-    return uni.navigateTo({
-      url: url
-    })
-  },
-  // 关闭当前页面,返回上一页面或多级页面
-  navigateBack() {
-    return uni.navigateBack()
-  }
-}
+	// 关闭所有页面,打开到应用内的某个页面
+	reLaunch(url) {
+		return uni.reLaunch({
+			url: url
+		})
+	},
+	// 跳转到tabBar页面,并关闭其他所有非tabBar页面
+	switchTab(url) {
+		return uni.switchTab({
+			url: url
+		})
+	},
+	// 关闭当前页面,跳转到应用内的某个页面
+	redirectTo(url) {
+		return uni.redirectTo({
+			url: url,
+			animationType: 'none',
+		})
+	},
+	// 保留当前页面,跳转到应用内的某个页面
+	navigateTo(url) {
+		return uni.navigateTo({
+			url: url,
+			animationType: 'none',
+		})
+	},
+	// 关闭当前页面,返回上一页面或多级页面
+	navigateBack() {
+		return uni.navigateBack()
+	}
+}

BIN
static/jnImage/indexPage/daiji.png


BIN
static/jnImage/indexPage/guzhang.png


BIN
static/jnImage/indexPage/jieru.png


BIN
static/jnImage/indexPage/jieruP.png


BIN
static/jnImage/indexPage/jn_bingwang.png


BIN
static/jnImage/indexPage/jn_daiji.png


BIN
static/jnImage/indexPage/jn_guzhang.png


BIN
static/jnImage/indexPage/jn_jianxiu.png


BIN
static/jnImage/indexPage/jn_jieru.png


BIN
static/jnImage/indexPage/jn_lixian.png


BIN
static/jnImage/indexPage/jn_shoulei.png


BIN
static/jnImage/indexPage/jn_xiandian.png


BIN
static/jnImage/indexPage/lixian.png


BIN
static/jnImage/indexPage/yunxing.png