heyang %!s(int64=2) %!d(string=hai) anos
pai
achega
9e50e09270

+ 1 - 1
api/request/config.js

@@ -10,7 +10,7 @@ const config = {
 
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试
 	 base_url: 'https://lab.zjznai.com/labAppTest/',//43服务器线上
-    // base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
+    //base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
 	 //base_url: 'https://lab.zjznai.com/labSystem/', //矿大地址
       // base_url: 'https://lab.zjznai.com/labSaasSystem/', //矿大化工
 	// base_url: 'https://lab.zjznai.com/jdlabSystem/', //交大地址

+ 57 - 28
pages/safetyExamineWorkbench.vue

@@ -101,14 +101,16 @@
 						</view>
 						<!-- 开始检查 -->
 						<view v-if="curTabTow==2 && item.rectifyStatus==3" class="list_tow_li_b" @click="handleTowClick(item,'check')">复核</view>
-						<view v-if="(curTabTow==0 || curTabTow==1) && item.manageStatus==0 && item.notStarted" class="list_tow_li_b" @click="handleTowClick(item,'add')">开始检查</view>
-						<view v-if="(curTabTow==0 || curTabTow==1) &&item.manageStatus==1" class="list_tow_li_b" @click="handleTowClick(item,'edit')">编辑</view>
-						<view v-if="(curTabTow==0 || curTabTow==1) &&!item.notStarted" class="list_tow_li_b_tow"><img src="@/images/Version3.3.3/icon_xyxcgl_jhwks.png"/>计划未开始</view>
-						<view v-if="(curTabTow==0 || curTabTow==1) &&item.manageStatus==2" class="list_tow_li_b_three">
-							<img src="@/images/Version3.3.3/icon_djcsys.png"/>
-							<text>整改进度:</text>
-							<text>{{item.rectifySchedule}}</text>
-							<text class="report">整改报告</text>
+						<view v-if="item.buttonHide && item.isSelfData==1">
+							<view v-if="(curTabTow==0 || curTabTow==1) && item.manageStatus==0 && item.notStarted" class="list_tow_li_b" @click="handleTowClick(item,'add')">开始检查</view>
+							<view v-if="(curTabTow==0 || curTabTow==1) &&item.manageStatus==1 && item.notStarted" class="list_tow_li_b" @click="handleTowClick(item,'edit')">编辑</view>
+							<view v-if="(curTabTow==0 || curTabTow==1) &&!item.notStarted" class="list_tow_li_b_tow"><img src="@/images/Version3.3.3/icon_xyxcgl_jhwks.png"/>计划未开始</view>
+							<view v-if="(curTabTow==0 || curTabTow==1) &&item.manageStatus==2 && item.notStarted" class="list_tow_li_b_three">
+								<img src="@/images/Version3.3.3/icon_djcsys.png"/>
+								<text>整改进度:</text>
+								<text>{{item.rectifySchedule}}</text>
+								<text class="report">整改报告</text>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -277,10 +279,14 @@ export default {
 	  isSubPlan:false,//判断管理员和检查者扫码的实验室是否有检查计划
 	  dialogVisible:false,
 	  hiddenList:[],
+	  myApplyGentle:'',//自查身份 校院巡查管理 里操作按钮隐藏
+	  applyGentle:'',//检查组身份 实验室自查管理 里操作按钮隐藏
+	  buttonHide:false,//判断按钮显示隐藏
     }
   },
   onLoad() {
-	
+	this.myApplyGentle=uni.getStorageSync('gentleIdentifierData').myApplyGentle
+	this.applyGentle=uni.getStorageSync('gentleIdentifierData').applyGentle
   },
   onShow() {
 	 
@@ -672,11 +678,33 @@ export default {
 	  	const {data} = await checkManageList(this.getData2);
 	  	if(data.code==200){
 	  		//判断计划是否开始
-	  		data.data.records.forEach(function(item){
-	  			item.notStarted=self.compareTime(item.cycleStartTime)
-	  		})
-	  		this.dataList2=[...this.dataList2,...data.data.records]
-	  		this.total2=data.data.total;
+			self.buttonHide=false;
+			for(let i=0;i<data.data.records.length;i++){
+				data.data.records[i].notStarted=self.compareTime(data.data.records[i].cycleStartTime)
+				
+				if(data.data.records[i].checkType==1){
+					if(self.myApplyGentle && !self.applyGentle){
+						data.data.records[i].buttonHide=false
+					}if(!self.myApplyGentle && !self.applyGentle){
+						data.data.records[i].buttonHide=false
+					}else{
+						data.data.records[i].buttonHide=true;
+					}
+							  
+				}else if(data.data.records[i].checkType==2){
+					if(!self.myApplyGentle && self.applyGentle){
+						data.data.records[i].buttonHide=false
+					}if(!self.myApplyGentle && !self.applyGentle){
+						data.data.records[i].buttonHide=false
+					}else{
+						data.data.records[i].buttonHide=true;
+					}
+				}
+				
+			}
+	  		self.dataList2=[...self.dataList2,...data.data.records]
+	  		self.total2=data.data.total;
+			
 	  	}
 	  },
 	  //待复核列表
@@ -1149,14 +1177,15 @@ export default {
 		.list_tow_li{
 			position: relative;
 			width: 690rpx;
-			height: 360rpx;
+			height: auto;
 			background: #fff;
 			border-radius: 10rpx;
 			overflow: hidden;
 			margin-bottom: 20rpx;
 			.list_tow_li_t{
 				width: 100%;
-				position: absolute;
+				height: 110rpx;
+				position: relative;
 				left: 0;
 				top: 0;
 				.list_tow_li_t_l{
@@ -1219,9 +1248,9 @@ export default {
 				}
 			}
 			.list_tow_li_m{
-				position: absolute;
-				top: 110rpx;
-				left: 0;
+				// position: absolute;
+				// top: 110rpx;
+				// left: 0;
 				width: 690rpx;
 				height: 168rpx;
 				padding-left: 30rpx;
@@ -1277,9 +1306,9 @@ export default {
 			.list_tow_li_b{
 				height: 80rpx;
 				width: 100%;
-				position: absolute;
-				top: 278rpx;
-				left: 0;
+				// position: absolute;
+				// top: 278rpx;
+				// left: 0;
 				border-top: 1rpx solid #E0E0E0;
 				font-size: 28rpx;
 				font-family: PingFang SC-Medium, PingFang SC;
@@ -1291,9 +1320,9 @@ export default {
 			.list_tow_li_b_tow{
 				height: 80rpx;
 				width: 100%;
-				position: absolute;
-				top: 278rpx;
-				left: 0;
+				// position: absolute;
+				// top: 278rpx;
+				// left: 0;
 				border-top: 1rpx solid #E0E0E0;
 				font-size: 28rpx;
 				font-family: PingFang SC-Medium, PingFang SC;
@@ -1311,9 +1340,9 @@ export default {
 			}
 			.list_tow_li_b_three{
 				height: 80rpx;
-				position: absolute;
-				top: 278rpx;
-				left: 0;
+				// position: absolute;
+				// top: 278rpx;
+				// left: 0;
 				display: flex;
 				justify-content: flex-start;
 				align-items: center;

+ 25 - 7
pages_safetyExamine/examineManage/examineAdd.vue

@@ -59,7 +59,7 @@
 				</picker>
 			</view>
 			<view class="period">
-				<view class="period_l">检查周期</view>
+				<view class="period_l">计划周期</view>
 				<view class="period_r">
 					<picker mode="date" @change="startChange(form,$event)" :disabled="isCustom">
 						<input class="picker-text"  disabled type="text" v-model="form.cycleStartTime" placeholder="开始时间">
@@ -271,7 +271,7 @@ export default {
 			  return
 		  }
 		  if( doType=='nextStep'){//下一步	
-			  uni.redirectTo({
+			  uni.navigateTo({
 				  url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))
 			  });
 		  }
@@ -279,6 +279,15 @@ export default {
 	    },
 		customFun(){
 			let self=this;
+			if(!self.isCustom){
+				uni.showToast({
+					title: '该实验室暂无可选择计划!',
+					icon:"none",
+					mask:true,
+					duration: 2000
+				});
+				return
+			}
 			
 			self.isCustom=!self.isCustom
 			if(self.isCustom){//自定义
@@ -513,7 +522,7 @@ export default {
 		//扫一扫进入通过id查询实验室列表
 		async getByIdLaboratoryList(){
 			let self = this;
-			const {data} = await buildBySub({'name':this.room});
+			const {data} = await buildBySub({'searchValue':this.room});
 			if(data.code==200){
 				if(data.data[0]){
 					this.laboratoryList = data.data;
@@ -542,20 +551,20 @@ export default {
 			let self = this;
 			if(!this.room){
 				uni.showToast({
-					title: '请输入要搜索房间号',
+					title: '请输入要搜索关键词',
 					icon:"none",
 					mask:true,
 					duration: 2000
 				});
 				return
 			}
-			const {data} = await buildBySub({'name':this.room});
+			const {data} = await buildBySub({'searchValue':this.room});
 			if(data.code==200){
 				if(data.data[0]){
 					this.roomList = data.data;
 				}else{
 					uni.showToast({
-						title: '未找到相关房间',
+						title: '未找到相关实验室',
 						icon:"none",
 						mask:true,
 						duration: 2000
@@ -620,11 +629,20 @@ export default {
 	    //提交
 	    async submitForm(){
 			let self = this;
+			if(this.currentDate<this.form.cycleStartTime){
+				uni.showToast({
+					title: '当前时间不在计划周期内',
+					icon:"none",
+					mask:true,
+					duration: 2000
+				});
+				return
+			}
 			this.form.manageStatus=2;
 			let obj=self.form;
 			//复合的情况下,删除隐患项
 			 obj.checkHazardDtoList=[];
-			if(self.form.checkPlanId){
+			if(self.form.id){
 				const {data} = await checkManageUpdate(obj);
 				if(data.code == 200){
 					uni.showToast({

+ 27 - 2
pages_safetyExamine/examineManage/examineAddTow.vue

@@ -139,10 +139,13 @@
 				gradeIndex :0,
 				gradeArray:['一般隐患','重大隐患','管理问题'],
 				bottomBtnList:['上一步','保存','提交'],
+				currentDate:'',//当前时间
 				
             }
         },
         onLoad(option) {
+			//获取当前日期
+			this.currentDate=this.getNowFormatDate()
 			if(option.form){
 				this.form=JSON.parse(decodeURIComponent(option.form)); 
 			}
@@ -151,6 +154,17 @@
 			this.getCheckOptionList();
         },
         methods: {
+			//获取当前日期函数
+			getNowFormatDate() {
+			  let date = new Date(),
+			    year = date.getFullYear(), //获取完整的年份(4位)
+			    month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
+			    strDate = date.getDate() // 获取当前日(1-31)
+			  if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
+			  if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
+			 
+			  return `${year}-${month}-${strDate}`
+			},
 			//隐患等级
 			gradeChange(item,e){
 				console.log(item)
@@ -383,6 +397,8 @@
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckPro',e.detail.value[e.detail.value.length-1].value);
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckCode',jcxSstkNum);
 					this.$set(this.form.checkHazardDtoList[index],'hazardCheckName',e.detail.value[e.detail.value.length-1].text);
+					this.$set(this.form.checkHazardDtoList[index],'hazardCheckPoint',e.detail.value[e.detail.value.length-1].text);
+					
 				}else{
 					uni.showToast({
 						title: '暂无数据',
@@ -515,7 +531,7 @@
 					this.form.manageStatus=index;//1保存 2提交
 					for(let i=0;i<self.form.checkHazardDtoList.length;i++){
 						let num = i+1;
-						if(!self.form.checkHazardDtoList[i].hazardCheckName){
+						if(!self.form.checkHazardDtoList[i].hazardCheckName && !self.form.checkHazardDtoList[i].hazardCheckPoint){
 							uni.showToast({
 								title: '第'+num+'未选择隐患项',
 								icon:"none",
@@ -540,6 +556,15 @@
 			//提交
 			async submitForm(){
 				let self = this;
+				if(this.currentDate<this.form.cycleStartTime){
+					uni.showToast({
+						title: '当前时间不在计划周期内',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+					return
+				}
 				let obj=JSON.parse(JSON.stringify(self.form));
 				//语音备注JSON对象转字符串
 				for(let i=0;i<obj.checkHazardDtoList.length;i++){
@@ -547,7 +572,7 @@
 						obj.checkHazardDtoList[i].voiceRemark=JSON.stringify(obj.checkHazardDtoList[i].voiceRemark)
 					}
 				}
-				if(self.form.checkPlanId){
+				if(self.form.id){
 					const {data} = await checkManageUpdate(obj);
 					if(data.code == 200){
 						uni.showToast({

+ 3 - 3
pages_safetyExamine/examineManage/examineList.vue

@@ -50,11 +50,11 @@
 					</view>
 				</view>
 				<!-- 开始检查 -->
-				<view v-if="buttonHide">
+				<view v-if="buttonHide && item.isSelfData==1">
 					<view v-if="item.manageStatus==0 && item.notStarted" class="list_three_li_b" @click="handleClick(item,'add')">开始检查</view>
-					<view v-if="item.manageStatus==1" class="list_three_li_b" @click="handleClick(item,'edit')">编辑</view>
+					<view v-if="item.manageStatus==1 && item.notStarted" class="list_three_li_b" @click="handleClick(item,'edit')">编辑</view>
 					<view v-if="!item.notStarted" class="list_three_li_b_tow"><img src="@/pages_safetyExamine/images/icon_xyxcgl_jhwks.png"/>计划未开始</view>
-					<view v-if="item.manageStatus==2" class="list_three_li_b_three">
+					<view v-if="item.manageStatus==2 && item.notStarted" class="list_three_li_b_three">
 						<img src="@/pages_safetyExamine/images/icon_djcsys.png"/>
 						<text>整改进度:</text>
 						<text v-if="item.checkResult==0" @click="handleClick(item,'detail')">{{item.rectifySchedule}}</text>

+ 4 - 4
pages_safetyExamine/snapshotManage/snapshotAdd.vue

@@ -20,7 +20,7 @@
 			<view class="basics_li">
 				<view class="basics_li_l">实验室</view>
 				<view class="basics_li_r lab_r">
-					<input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.subName" placeholder="请选择房间" placeholder-style="font-size: 30rpx;color:#333;">
+					<input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.subName" placeholder="请输入实验室关键词查询" placeholder-style="font-size: 30rpx;color:#333;">
 					<view class="img-box" @click.stop="saoCode">
 						<img src="@/pages_safetyExamine/images/icon_aqjc_sm.png">
 					</view>
@@ -225,20 +225,20 @@ export default {
 			let self = this;
 			if(!this.room){
 				uni.showToast({
-					title: '请输入要搜索房间号',
+					title: '请输入要搜索关键词',
 					icon:"none",
 					mask:true,
 					duration: 2000
 				});
 				return
 			}
-			const {data} = await buildBySub({'name':this.room,'deptId':this.form.deptId});
+			const {data} = await buildBySub({'searchValue':this.room,'deptId':this.form.deptId});
 			if(data.code==200){
 				if(data.data[0]){
 					this.roomList = data.data;
 				}else{
 					uni.showToast({
-						title: '未找到相关房间',
+						title: '未找到相关实验室',
 						icon:"none",
 						mask:true,
 						duration: 2000