Browse Source

Merge branch 'master' of http://47.92.161.104:10080/zkx/jp-housekeep-electric

常志远 1 year ago
parent
commit
cf7f2e5ad9

+ 1 - 1
config/.env.dev.js

@@ -14,7 +14,7 @@ const UNI_APP = {
 	openId:"111111", //sz
 	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
 	// openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
-	//openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
+	openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
 	
 	//appid
 	VUE_APP_WXAPPID:"wx0b3c41a903053808",

+ 8 - 7
pages.json

@@ -1,6 +1,13 @@
 {
 
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
+		{
+			"path": "pages/login/login",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+		},
 		{
 			"path": "pages/statistics/statistics",
 			"style": {
@@ -92,13 +99,7 @@
 				"enablePullDownRefresh": false
 			}
 		},
-		{
-			"path": "pages/login/login",
-			"style": {
-				"navigationBarTitleText": "",
-				"enablePullDownRefresh": false
-			}
-		},
+		
 		{
 			"path": "pages/equipmentDataMonitoring/electricityDetails",
 			"style": {

+ 4 - 2
pages/equipmentDataMonitoring/dataMonitoring-list.vue

@@ -14,7 +14,7 @@
 			<view class="title">
 				设备数据监测<image class="img" src="@/assets/img/refresh-line.svg"></image>
 			</view>
-			<view class="right" @click="toDataMonitoringMap">
+			<view class="right" @click="toDataMonitoringMap" v-if="false">
 				<image class="img" src="@/assets/img/riLine-road-map-line.svg" mode=""></image>地图
 			</view>
 		</view>
@@ -125,7 +125,9 @@
 					</view>
 				</view>
 			</view>
-
+			
+			<u-divider :isnone="deviceList.length==0" v-if="deviceList.length==recordsTotal"  nonetext="没有找到相关内容"
+				border-color="#CFD2D5">已经到底了</u-divider>
 		</view>
 	</view>
 </template>

+ 2 - 0
pages/equipmentDataMonitoring/equipmentElectricity.vue

@@ -64,6 +64,8 @@
 </template>
 
 <script>
+	import * as API from '@/apis/pagejs/energy/index.js'
+	
 	export default {
 		data() {
 			return {

+ 1 - 1
pages/login/login.vue

@@ -52,7 +52,7 @@
 				
 				//this.gotoUrl("pages/user/index")
 				uni.redirectTo({
-					url: '/pages/index/index'
+					url: '/'
 				})
 			},
 			query(){

+ 2 - 2
pages/statistics/statistics-index.vue

@@ -11,11 +11,11 @@
 		</view>
 		<!-- 标签 -->
 		<view class="tabs-box">
-			<view class="tabs" v-if="companyList.length != 0">
+			<view class="tabs"  v-if="companyList.length >2">
 				<u-tabs :list="merchantList1" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF" bg-color="#1677FF"
 					:current="current" @change="change"></u-tabs>
 			</view>
-			<view class="more" @click="popShow=true" v-if="companyList.length != 0">
+			<view class="more" @click="popShow=true"  v-if="companyList.length >2">
 				<u-icon name="arrow-down" color="#fff" size="40"></u-icon>
 			</view>
 		</view>

+ 23 - 14
pages/statistics/statistics.vue

@@ -3,19 +3,19 @@
 		<!-- 导航栏 -->
 		<view class="navbar">
 			<view class="title">
-				能源中心 (电力110)
+				能源中心
 			</view>
 			<view class="icon" @click="toDataMonitoringList">
 				<image class="img" src="@/assets/img/riLine-equalizer-line.svg" mode=""></image>
 			</view>
 		</view>
 		<!-- 标签 -->
-		<view class="tabs-box">
-			<view class="tabs" v-if="companyList.length != 0">
+		<view class="tabs-box" >
+			<view class="tabs" v-if="companyList.length >2">
 				<u-tabs :list="merchantList1" :is-scroll="false" active-color="#fff" inactive-color="#CCE2FF" bg-color="#1677FF"
 					:current="current" @change="change"></u-tabs>
 			</view>
-			<view class="more" @click="popShow=true" v-if="companyList.length != 0">
+			<view class="more" @click="popShow=true" v-if="companyList.length >2">
 				<u-icon name="arrow-down" color="#fff" size="40"></u-icon>
 			</view>
 		</view>
@@ -44,42 +44,42 @@
 				<view class="item" @click="toDataMonitoringList">
 					<view class="item-top">
 						<view class="img-box">
-							<u-circle-progress active-color="#2979ff" :percent="8/15*100" width="88">
+							<u-circle-progress active-color="#2979ff" :percent="0" width="88">
 							</u-circle-progress>
 						</view>
 						<view class="number">
 							<view class="normal">
-								正常:8
+								正常:0
 							</view>
 							<view class="abnormal">
-								异常:7
+								异常:0
 							</view>
 						</view>
 					</view>
 					<!-- 累计 -->
 					<view class="total">
-						本月累计报警 <text class="total-number">12</text> 次
+						本月累计报警 <text class="total-number">0</text> 次
 					</view>
 				</view>
 
 				<view class="item" @click="toWorkOrderManagement()">
 					<view class="item-top">
 						<view class="img-box">
-							<u-circle-progress active-color="#2979ff" :percent="12/20*100" width="88">
+							<u-circle-progress active-color="#2979ff" :percent="0" width="88">
 							</u-circle-progress>
 						</view>
 						<view class="number">
 							<view class="normal">
-								未处理:8
+								未处理:0
 							</view>
 							<view class="abnormal">
-								已处理:12
+								已处理:0
 							</view>
 						</view>
 					</view>
 					<!-- 累计 -->
 					<view class="total">
-						本月累计工单 <text class="total-number">20</text> 条
+						本月累计工单 <text class="total-number">0</text> 条
 					</view>
 				</view>
 
@@ -144,7 +144,7 @@
 				</view>
 			</view>
 			<!-- 统计2 异常告警记录 -->
-			<view class="statistics-2 statistics">
+			<view class="statistics-2 statistics" v-if="false">
 				<view class="title">
 					<view class="icon">
 						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
@@ -269,7 +269,7 @@
 			</view>
 		</view>
 
-		<energyCenterTabbar :current="0"></energyCenterTabbar>
+		<energyCenterTabbar :current="0"  v-if="0"></energyCenterTabbar>
 	</view>
 </template>
 
@@ -313,6 +313,11 @@
 				var n = this.merchantList1[this.current];
 				this.merchantList1[this.current] = m;
 				this.merchantList2[index] = n;
+				
+				this.companyId = item.id;
+				this.getPowerConsumption(0);
+				this.getEquipmentDataMonitoring(0);
+				this.popShow = false;
 			},
 			// 单位
 			getCompanyInfoList() {
@@ -425,21 +430,25 @@
 				this.getEquipmentDataMonitoring(0);
 			},
 			toDataMonitoringList() {
+				return
 				uni.navigateTo({
 					url: '/pages/equipmentDataMonitoring/dataMonitoring-list'
 				})
 			},
 			toWorkOrderManagement() {
+				return
 				uni.navigateTo({
 					url: '/pages/workOrderManagement/workOrderManagement'
 				})
 			},
 			toEquipmentElectricity() {
+				return
 				uni.navigateTo({
 					url: '/pages/equipmentDataMonitoring/equipmentElectricity'
 				})
 			},
 			toElectronicMonitoring(item) {
+				return
 				uni.navigateTo({
 					url: '/pages/equipmentDataMonitoring/electronicMonitoring'
 				})