dedsudiyu 1 рік тому
батько
коміт
7694bad9e0

+ 140 - 1
pages_safetyExamine/views/examineManage/examineAdd.vue

@@ -71,6 +71,13 @@
 						</view>
 					</picker>
 				</view>
+				<view class="content" v-if="form.checkCategory==2">
+					<view class="content_l">检查内容</view>
+					<view class="content_r">
+						<view class="content_r_l" @click="clickContent()">选择检查内容</view>
+						<!-- <view class="content_r_r">已选择<text>{{form.hazardNum}}</text>种</view> -->
+					</view>
+				</view>
 				<view class="period">
 					<view class="period_l">计划周期</view>
 					<view class="period_r" :class="isCustom?'addDisabled':''">
@@ -156,7 +163,7 @@
 				</view>
 			</view>
 		</uni-popup>
-		<view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.checkResult==0 || form.checkCategory==2">
+		<view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.checkResult==0  && form.checkCategory!=2">
 			下一步</view>
 		<view class="bottom_btn" @click="handleClick('submitForm')" v-if="form.checkResult==1 && form.checkCategory==1">
 			提交</view>
@@ -229,6 +236,7 @@
 						uploadDtoList: [], //隐患照片
 					}],
 					checkHazardInfoVoList: [],
+					seleteListDevice:[],//专项检查设备
 				},
 				collegeIndex: 0,
 				collegeArray: [],
@@ -700,6 +708,88 @@
 					this.form.checkCategory = 2
 				}
 			},
+			//检查内容
+			clickContent() {
+				let self = this;
+				if (!this.form.subIds) {
+					uni.showToast({
+						title: '请选择实验室!',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				if (!this.form.deptId) {
+					uni.showToast({
+						title: '请选择学院!',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				if (!this.form.buildId) {
+					uni.showToast({
+						title: '请选择楼栋!',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				if (!this.form.title) {
+					if (!this.isCustom) {
+						uni.showToast({
+							title: '请输入计划标题!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+					} else {
+						uni.showToast({
+							title: '请选择计划标题!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+					}
+					return
+				}
+				if (!this.form.cycleStartTime || !this.form.cycleEndTime) {
+					uni.showToast({
+						title: '请选择计划周期!',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				if (this.currentDate < this.form.cycleStartTime) {
+					uni.showToast({
+						title: '当前时间不在计划周期内',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				if (!this.form.rectifyDeadline) {
+					uni.showToast({
+						title: '请选择整改日期',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				// this.form.tiemQuickList = this.tiemQuickList //检查周期快捷存储
+				// this.form.scopeIndex = this.scopeIndex //检查范围
+				uni.redirectTo({
+					url: '/pages_safetyExamine/views/examineManage/examineAddContent?form=' + encodeURIComponent(
+						JSON.stringify(this.form)) + '&pageType=1'
+				});
+			},
 			//计划
 			planChange(e) {
 				this.planIndex = e.target.value;
@@ -1023,6 +1113,55 @@
 			background-color: #f5f5f5;
 		}
 
+		.content {
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+			margin: 26rpx 0;
+
+			.content_l {
+				width: 146rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				line-height: 42rpx;
+				text-align: left;
+			}
+
+			.content_r {
+				flex: 1;
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+
+				.content_r_l {
+					width: 220rpx;
+					height: 80rpx;
+					background: #0183FA;
+					border-radius: 10rpx 10rpx 10rpx 10rpx;
+					text-align: center;
+					font-size: 30rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #FFFFFF;
+					line-height: 80rpx;
+					margin-right: 26rpx;
+				}
+
+				.content_r_r {
+					font-size: 30rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 42rpx;
+
+					>text {
+						color: #0183FA;
+					}
+				}
+			}
+		}
 		.basics {
 			margin: 0 30rpx;
 			width: 690rpx;

+ 2 - 2
pages_safetyExamine/views/examineManage/examineAddContent.vue

@@ -35,7 +35,7 @@
 	} from '@/api/request/config.js'
 	import {
 		getHazardInfoBySubId
-	} from '@/api/apiDemo/index.js'
+	} from '@/pages_safetyExamine/api/index.js'
 	export default {
 		name: "rectifyList",
 		components: {
@@ -149,7 +149,7 @@
 				}
 
 				uni.redirectTo({
-					url: '/pages_safetyExamine/examineManage/examineAddTow?form=' + encodeURIComponent(JSON
+					url: '/pages_safetyExamine/views/examineManage/examineAddTow?form=' + encodeURIComponent(JSON
 						.stringify(this.form)) + '&joinHazardIds=' + this.form.joinHazardIds
 				});
 

+ 20 - 11
pages_safetyExamine/views/examineManage/examineAddTow.vue

@@ -839,21 +839,24 @@
 			goMinButton(index) {
 				let self = this;
 				if (index == 0) {
-
+					console.log('index1');
 					if (this.form.checkCategory == 1) { //综合检查
+					console.log('index2');
 						uni.redirectTo({
-							url: '/pages_safetyExamine/examineManage/examineAdd?form=' + encodeURIComponent(JSON
+							url: '/pages_safetyExamine/views/examineManage/examineAdd?form=' + encodeURIComponent(JSON
 								.stringify(this.form))
 						});
 					} else if (this.form.checkCategory == 2) { //专项检查
+					console.log('index3');
 						if (!this.form.isCustom) {
 							this.form.checkHazardInfoVoList = [];
 						}
 						uni.redirectTo({
-							url: '/pages_safetyExamine/examineManage/examineAdd?form=' + encodeURIComponent(JSON
+							url: '/pages_safetyExamine/views/examineManage/examineAdd?form=' + encodeURIComponent(JSON
 								.stringify(this.form))
 						});
 					}
+					console.log('index4');
 				} else if (index == 1 || index == 2) {
 					this.form.manageStatus = index; //1保存 2提交
 					if (this.form.checkCategory == 1) { //综合检查
@@ -1032,10 +1035,13 @@
 							mask: true,
 							duration: 2000
 						});
-						uni.redirectTo({
-							url: '/pages_safetyExamine/views/examineManage/examineList?pageType=' + this.form
-								.checkType
-						});
+						setTimeout(function() {
+							uni.navigateBack();
+						}, 2000)
+						// uni.redirectTo({
+						// 	url: '/pages_safetyExamine/views/examineManage/examineList?pageType=' + this.form
+						// 		.checkType
+						// });
 					}
 				} else {
 					const {
@@ -1048,10 +1054,13 @@
 							mask: true,
 							duration: 2000
 						});
-						uni.redirectTo({
-							url: '/pages_safetyExamine/views/examineManage/examineList?pageType=' + this.form
-								.checkType
-						});
+						setTimeout(function() {
+							uni.navigateBack();
+						}, 2000)
+						// uni.redirectTo({
+						// 	url: '/pages_safetyExamine/views/examineManage/examineList?pageType=' + this.form
+						// 		.checkType
+						// });
 					}
 				}
 			},