lvxinghai 4 tahun lalu
induk
melakukan
6c3e68964b

+ 5 - 0
pages/creatingSituations/components/checkPlan.vue

@@ -97,6 +97,11 @@
 				return this.checkPlan.checkList.length;
 			}
 		},
+		created: function() {
+			const {start,end} = this.checkPlan.dateObj;
+			this.start = start;
+			this.end = end;
+		},
 		methods: {
 			checkModel: function(item) {
 				this.myCommit('checkedItem', item);

+ 22 - 12
pages/situationDetail/situationDetail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="detail-page">
-		<tm-top-menu>
+		<tm-top-menu v-if="isAdmin">
 			<button class="copy-btn" @click="editSituation('POST')">复制创建</button>
 		</tm-top-menu>
 		<view class="content-info">
@@ -39,19 +39,19 @@
 			</view>
 		</view>
 		<view class="button-box">
-			<view class="btn-left" @click="delSituation" v-show="isAdmin">
+			<view class="btn-left btn-item" @click="delSituation" v-show="isAdmin">
 				<text class="left-text">作废</text>
 			</view>
-			<view class="btn-right" @click="editSituation('PUT')" v-show="isAdmin">
+			<view class="btn-right btn-item" @click="editSituation('PUT')" v-show="canEdit">
 				<text class="right-text">编辑</text>
 			</view>
-			<view class="btn-center" v-show="isChecker" @click="startUnplanned">
+			<view class="btn-center btn-item" v-show="isChecker" @click="startUnplanned">
 				<text class="center-text">开始一次计划外查核</text>
 			</view>
-			<view class="btn-left" v-show="isUnplanned" @click="createCheck">
+			<view class="btn-left btn-item" v-show="isUnplanned" @click="createCheck">
 				<text class="left-text">新建一个计划外查核</text>
 			</view>
-			<view class="btn-right" v-show="isUnplanned" @click="startCheck">
+			<view class="btn-right btn-item" v-show="isUnplanned" @click="startCheck">
 				<text class="right-text">提前开始一个计划内查核</text>
 			</view>
 		</view>
@@ -89,6 +89,11 @@
         checkGroupId: 0, // 查核组id
 			}
 		},
+		computed: {
+			canEdit: function() {
+				return this.compareTime(this.firstCheckTime) && this.isAdmin;
+			}
+		},
 		onLoad({ situationId }){ // situationId:情景id
 		  this.situationID=situationId;
 		},
@@ -451,10 +456,15 @@
 			}
 		}
 		.button-box{
+			display: flex;
+			flex-direction: row;
 			width: 750rpx;
 			height: 75rpx;
 			position: fixed;
 			bottom: 0;
+			.btn-item {
+				flex: 1;
+			}
 			.btn-center{
 				background: #3377FF;
 				text-align: center;
@@ -467,10 +477,10 @@
 				}
 			}
 			.btn-left{
-				width: 375rpx;
-				height: 75rpx;
+				// width: 375rpx;
+				// height: 75rpx;
 				background: #FFFFFF;
-				float: left;
+				// float: left;
 				text-align: center;
 				border: 0.62rpx solid #DADEE6;
 				.left-text{
@@ -482,10 +492,10 @@
 				}
 			}
 			.btn-right{
-				width: 375rpx;
-				height: 75rpx;
+				// width: 375rpx;
+				// height: 75rpx;
 				background: #3377FF;
-				float: right;
+				// float: right;
 				text-align: center;
 				.right-text{
 					font-size: 22.5rpx;