Kaynağa Gözat

矩阵方法移植

lizaixun 4 yıl önce
ebeveyn
işleme
7c2f05f3c6
1 değiştirilmiş dosya ile 30 ekleme ve 16 silme
  1. 30 16
      components/monitor/MatrixMonitor.vue

+ 30 - 16
components/monitor/MatrixMonitor.vue

@@ -1,24 +1,27 @@
 <template>
 	<view>
 		<!--导航栏-->
-		<view class="top">
-			<view class="threeLine" @tap="openDrawer">
-				<image src="../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-top: 18px;margin-left: 10px;"></image>
-			</view>
-			<view class="text">
-				<view class="notice">
-					<view class="icon cuIcon-notice text-white" v-if="badge != 0">
-						<view class="cu-tag looknumber" style="margin-top: 10px;">
-							<block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
-						</view>
+		<cu-custom bgColor="bg-blacks" :isBack="false">
+			<block slot="right">
+				<image src="../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-left: 2%;" @tap="openDrawer"></image>
+			</block>
+			<block slot="right">
+				<view class="icon cuIcon-notice text-white" v-if="badge != 0" style="margin-left: -70%;">
+					<view class="cu-tag looknumber" style="margin-top: -2%;">
+						<block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
 					</view>
 				</view>
-				<view class="textWindpowerstation">{{ address }}</view>
-			</view>
-			<view class="plus" @tap="openPlusDrawer" data-target="viewModal">+</view>
-		</view>
+			</block>
+			<block slot="right">
+		
+			</block>
+			<block slot="content">{{address}}</block>
+			<block slot="right">
+				<view class="plus" @tap="showModal" data-target="viewModal">+</view>
+			</block>
+		</cu-custom>
 		<!-- 抽屉组件 -->
-		<div>
+		<div v-if="conflict==false">
 			<drawer ref="drawer"></drawer>
 		</div>
 		<div class="plusDrawer" @tap="closePlusDrawer">
@@ -176,6 +179,7 @@
 		},
 		data: function() {
 			return {
+				conflict:false,
 				address: '',
 				userid: '',
 				permissionsInformation: [],
@@ -1254,8 +1258,13 @@
 				return uni.getStorageSync('windpowerstationName');
 			},
 			openDrawer: function() {
+				if(this.$refs.drawer != undefined){
 				//this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList);
 				this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList, this.leftNavigationtitle);
+				}
+				else{
+					
+				}
 			},
 			openPlusDrawer(e) {
 				this.modalName = e.currentTarget.dataset.target;
@@ -1266,10 +1275,16 @@
 				this.$refs.plusDrawer.hideModal(this.modalName);
 			},
 			showModal(e) {
+				this.conflict = true;
 				this.modalName = e.currentTarget.dataset.target;
+				this.viewUserid();
+				this.monitoringAuthority();
+				this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
 			},
 			hideModal(e) {
+				this.conflict = false;
 				this.modalName = null;
+				this.$refs.plusDrawer.hideModal(this.modalName);
 				this.choiceIndex = -1;
 			},
 			showCardModal(modalName) {
@@ -1652,7 +1667,6 @@
 		clear: both;
 		width: 100%;
 		height: 50px;
-		margin-top: 71px;
 		/* border: 1px solid red; */
 	}