Browse Source

手环页面地图层级

wangjiawen 4 years ago
parent
commit
bda16977b8

+ 2 - 0
components/drawer/forecastThreeLineDrawer.vue

@@ -75,7 +75,9 @@
 				this.inconList = inconList;
 			},
 			closeDrawer: function() {
+				
 				this.drawerIsShow = false;
+				this.$parent.leftbar();
 			},
 			clickChangeColor: function(index) {
 				this.changeGary = index;

+ 3 - 2
components/drawer/plusDrawer.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
-		<!-- <scroll-view scroll-y class="DrawerPage" :class="modalName=='viewModal'?'show':''" >
-		</scroll-view> -->
+		<scroll-view scroll-y class="DrawerPage" :class="modalName=='viewModal'?'show':''" >
+		</scroll-view>
 		<view class="DrawerClose" :class="modalName=='viewModal'?'show':''" @tap="hideModal" >
 			<text class="cuIcon-pullright"></text>
 		</view>
@@ -55,6 +55,7 @@
 			},
 			hideModal(modalName) {
 				this.modalName = null;
+				this.drawerIsShow = false;
 			},
 			// tabSelect(e) {
 			// 	this.TabCur = e.currentTarget.dataset.id;

+ 29 - 15
pages/forecast/Forecast.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content" @click="closeDrawer">
+	<view class="content">
 		 <!-- <third-comp :key="menuKey"></third-comp> -->
 		 <view v-if="toggleSwitch==false">
 		<view>
@@ -14,7 +14,7 @@
 				</block>
 				<block slot="right"></block>
 				<block slot="content">{{ address }}</block>
-				<block slot="right"><view class="plus" @tap="" data-target="viewModal">+</view></block>
+				<block slot="right"><view class="plus" @tap="showModal" data-target="viewModal">+</view></block>
 				<!-- <block slot="right"><view class="plus" @tap="showModal" data-target="viewModal">+</view></block> -->
 			</cu-custom>
 		</view>
@@ -23,18 +23,19 @@
 		<!-- 地图组件 -->
 		
 				<div>
-					<drawer ref="drawer"></drawer>
+					<drawer ref="drawer" @tap="closeDrawer"></drawer>
 				</div>
 				<div class="plusDrawer" @tap="hideModal">
 					<plusDrawer ref="plusDrawer"></plusDrawer>
 				</div>
-				<scroll-view scroll-y  :class="modalName == 'viewModal' ? 'show' : ''">
-				<view >
+				
+				
+				<view v-if="kg==true">
 									
 									<!-- <div class="plusDrawer" @tap="hideModal"><plusDrawer ref="plusDrawer"></plusDrawer></div> -->
 									<view class="page-body">
-										<view class="page-section page-section-gap">
-											<map  style="width: 100%; height: 300px;"
+										<view    class="page-section page-section-gap">
+											<map style="width: 100%; height: 300px;"
 												:controls="controls"
 												:circles="circles"
 												:polyline="polyline"
@@ -43,9 +44,9 @@
 												:longitude="longitude"
 												:markers="covers"
 											>
-										<!-- 	
+										
 										 <cover-view style="color: #000000;" > 经度:{{  mapEnd_1 }}</cover-view>
-										 <cover-view style="color: #000000;"> 纬度:{{  mapEnd_2 }}</cover-view> -->
+										 <cover-view style="color: #000000;"> 纬度:{{  mapEnd_2 }}</cover-view> 
 											 
 											</map>
 										</view>
@@ -68,6 +69,7 @@
 				</view>
 			</view>
 		</view> -->
+		<scroll-view @tap="hideModal" scroll-y class="DrawerPage" :class="modalName == 'viewModal' ? 'show' : ''">
 		<!-- 个人信息组件 -->
 		<view class="Personal_information_W">
 				<view class="name">姓名:李占国</view>
@@ -77,13 +79,13 @@
 				<view class="skills">技能:电力类,机械类</view>
 		</view>
 		<!-- 历史曲线组件 -->
-		<view class="curve">
+		<view class="curve" >
 			<view class="curve_l">健康情况</view>
 			<view class="curve_r" @tap="common.navTo('/components/bracelet/braceletHistoryCurve?braceletCurve=' + braceletCurve)">历史曲线</view>
 			<div class="greater"></div>
 		</view>
 		<!-- 健康详情组件 -->
-		<view class="healthy">
+		<view class="healthy" >
 			<view class="healthy_H">
 		
 				<view class="details_z">心跳频率:{{xtpl_computed}}<!-- ({{ bracelet[deviceName][targetName_xtpl][targetName_xtpl_size].value }}) --></view>
@@ -101,7 +103,7 @@
 		<view v-if="toggleSwitch==true">
 			<WeatherProphethomepage ref="r1"></WeatherProphethomepage>
 		</view>
-		<view class="DrawerClose" :class="modalName == 'viewModal' ? 'show' : ''" @tap="hideModal"><text class="cuIcon-pullright"></text></view>
+		<!-- <view class="DrawerClose" :class="modalName == 'viewModal' ? 'show' : ''" @tap="hideModal"><text class="cuIcon-pullright"></text></view> -->
 	</view>
 </template>
 
@@ -119,6 +121,8 @@ export default {
 	},
 	data: function() {
 		return {
+			kg:true,
+			leftbarkg:false,
 			bs_computed:'',
 			xtpl_computed:'',
 			ssxy_computed:'',
@@ -177,7 +181,7 @@ export default {
 				targetdetail: { targetdetail_target: '', targetdetail_curve: '', targetdetail_histogram: ''}, */
 			targetName: '日发电量',
 			targetUnit: '万kwh',
-			kg:true,
+			
 			bool:true,
 			pld: '',
 			ssxy: '',
@@ -571,9 +575,11 @@ export default {
 				this.$forceUpdate();
 			},
 		openDrawer: function() {
+			this.kg=false;
 			this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList);
 		},
 		closeDrawer: function() {
+			
 			this.drawerIsShow = false;
 		},
 		pushWindPowerStationNameToSessionStorage(windpowerstationName) {
@@ -586,7 +592,14 @@ export default {
 			uni.getStorageSync('windpowerstationName');
 			return uni.getStorageSync('windpowerstationName');
 		},
+		leftbar(){
+			
+				this.kg=true;
+			
+			
+		},
 		onHide() {
+			
 			this.$refs.drawer.closeDrawer();
 			this.hideModal();
 		},
@@ -600,9 +613,10 @@ export default {
 			this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
 		},
 		hideModal() {
-			this.kg=true;
+			this.leftbar();
 			this.modalName = null;
-			this.$refs.plusDrawer.hideModal(this.modalName);
+			//this.$refs.plusDrawer.hideModal(this.modalName);
+			
 		},
 		braceletData() {
 			let _this = this;