Browse Source

修改微型消防站会议,任务管理的照片模块

“yueshang” 1 year ago
parent
commit
857d21d6d0

+ 59 - 51
pagesA/fire/add_fireRun/add_fireEvent/add_fireEvent.vue

@@ -1,32 +1,36 @@
 <template>
 	<view class="uni-container uni-container-bg">
 		<view class="example container" :style="'height: ' + (screenHeight - wheight - 75) + 'px'">
-		<view class="event">
-			<view class="event-title">事件时间</view>
-			<uni-datetime-picker class="time-item-check" type="date" :clear-icon="false":disabled="isview"  v-model="eventTime"
-				@maskClick="startMaskClick" placeholder="请选择事件时间" />
-			<view class="content">
-				<view class="event-title">出动人数</view>
-				<u-input v-model="eventPeples" placeholder="请输入出动人数" :maxlength="1000" :disabled="isview"  count height="150">
-				</u-input>
-			</view>
-			<view class="content">
-				<view class="event-title">燃烧面积</view>
-				<u-input v-model="burnArea" placeholder="请输入燃烧面积" :maxlength="1000" :disabled="isview" count height="150">
-				</u-input>
-			</view>
-			<view class="content">
-				<view class="event-title">过火面积</view>
-				<u-input v-model="fireArea" placeholder="请输入过火面积" :maxlength="1000" :disabled="isview"  count height="150">
-				</u-input>
-			</view>
-			<view class="content" style="margin-bottom: 60rpx;">
-				<view class="event-title">事件内容</view>
-				<u--textarea v-model="eventContent" placeholder="请输入内容" :disabled="isview" :maxlength="1000" count height="150">
-				</u--textarea >
+			<view class="event">
+				<view class="event-title"> <text class="xinghao">*</text>事件时间</view>
+				<uni-datetime-picker class="time-item-check" type="date" :clear-icon="false" :disabled="isview"
+					v-model="eventTime" @maskClick="startMaskClick" placeholder="请选择事件时间" />
+				<view class="content">
+					<view class="event-title"> <text class="xinghao">*</text>出动人数</view>
+					<u-input v-model="eventPeples" placeholder="请输入出动人数" :maxlength="1000" :disabled="isview" count
+						height="150">
+					</u-input>
+				</view>
+				<view class="content">
+					<view class="event-title"> <text class="xinghao">*</text>燃烧面积</view>
+					<u-input v-model="burnArea" placeholder="请输入燃烧面积" :maxlength="1000" :disabled="isview" count
+						height="150">
+					</u-input>
+				</view>
+				<view class="content">
+					<view class="event-title"> <text class="xinghao">*</text>过火面积</view>
+					<u-input v-model="fireArea" placeholder="请输入过火面积" :maxlength="1000" :disabled="isview" count
+						height="150">
+					</u-input>
+				</view>
+				<view class="content" style="margin-bottom: 60rpx;">
+					<view class="event-title"> <text class="xinghao">*</text>事件内容</view>
+					<u--textarea v-model="eventContent" placeholder="请输入内容" :disabled="isview" :maxlength="1000" count
+						height="150">
+					</u--textarea>
+				</view>
 			</view>
 		</view>
-		</view>
 		<view class="bottons heigthButton" v-if="!isview">
 			<view class="buttons-item">
 				<u-button shape="circle" type="primary" text="取消"
@@ -57,18 +61,18 @@
 				eventTime: '',
 				riliicon: riliicon,
 				isEditId: false,
-				eventPeples:'',//出动人数
-				burnArea:"",//燃烧面积
-				fireArea:'',//过火面积
-				runId:'',
-				isview:false
+				eventPeples: '', //出动人数
+				burnArea: "", //燃烧面积
+				fireArea: '', //过火面积
+				runId: '',
+				isview: false
 			}
 		},
 		onLoad: function(option) {
-			if(option.isview=="isview"){
-				this.isview=true
+			if (option.isview == "isview") {
+				this.isview = true
 			}
-			this.runId=option.runId
+			this.runId = option.runId
 			if (option.id) {
 				this.isEditId = option.id
 				getOneMicrostation({
@@ -76,10 +80,10 @@
 				}).then(reponse => {
 					this.eventTime = reponse.data.eventTime
 					this.eventContent = reponse.data.eventContent
-					this.eventPeples=reponse.data.eventPeples,//出动人数
-					this.burnArea=reponse.data.burnArea,//燃烧面积
-					this.fireArea=reponse.data.fireArea,//过火面积
-					console.log(reponse, 'opt');
+					this.eventPeples = reponse.data.eventPeples, //出动人数
+						this.burnArea = reponse.data.burnArea, //燃烧面积
+						this.fireArea = reponse.data.fireArea, //过火面积
+						console.log(reponse, 'opt');
 				})
 			}
 		},
@@ -90,22 +94,19 @@
 		},
 		methods: {
 			submit() {
-				console.log(this.runId,'this.runIdthis.runId');
+				console.log(this.runId, 'this.runIdthis.runId');
 				const that = this
-				if (!this.eventContent) {
-					return this.$modal.msgError('请填写事件内容')
-				}
-				if (!this.eventTime) {
-					return this.$modal.msgError('请选择事件时间')
+				if (!this.eventPeples || !this.eventTime || !this.eventContent || !this.burnArea || !this.fireArea) {
+					return this.$modal.msgError('未填写必填项')
 				}
 				if (!this.isEditId) {
 					createStationEvent({
 						eventContent: this.eventContent,
 						eventTime: this.eventTime + '',
-						eventPeples:this.eventPeples,//出动人数
-						burnArea:this.burnArea,//燃烧面积
-						fireArea:this.fireArea,//过火面积
-						microstationid:this.runId
+						eventPeples: this.eventPeples, //出动人数
+						burnArea: this.burnArea, //燃烧面积
+						fireArea: this.fireArea, //过火面积
+						microstationid: this.runId
 					}).then(reponse => {
 						that.$modal.msg('保存成功')
 						setTimeout(() => {
@@ -118,10 +119,10 @@
 						eventContent: this.eventContent,
 						eventTime: this.eventTime + '',
 						id: this.isEditId,
-						eventPeples:this.eventPeples,//出动人数
-						burnArea:this.burnArea,//燃烧面积
-						fireArea:this.fireArea,//过火面积
-						microstationid:this.runId
+						eventPeples: this.eventPeples, //出动人数
+						burnArea: this.burnArea, //燃烧面积
+						fireArea: this.fireArea, //过火面积
+						microstationid: this.runId
 					}).then(reponse => {
 						that.$modal.msg('编辑成功')
 						setTimeout(() => {
@@ -207,10 +208,17 @@
 		bottom: 30rpx;
 		right: 0;
 	}
-	/deep/ .u-input{
+
+	/deep/ .u-input {
 		background: #fff;
 	}
+
 	.example {
 		overflow-y: auto;
 	}
+
+	.xinghao {
+		color: red;
+		margin-right: 10rpx;
+	}
 </style>

+ 36 - 12
pagesA/fire/check_active/check_implement/check_implement.vue

@@ -221,10 +221,11 @@
 					<view class="show-title">
 						<view class="">巡检拍照:<text style="color:#822e2e;"></text></view>
 						<view class="">
-							<image :src="photograph" @click="photoUpload(item)" class="tiantupian"></image> <!-- 加载中 -->
+							<image :src="photograph" @click="photoUpload(item,index)" class="tiantupian"></image>
+							<!-- 加载中 -->
 							<!-- <isLodingModel></isLodingModel> -->
 						</view>
-						<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
+						<uni-load-more v-show="item.loading" status="loading" :content-text="contentText" />
 					</view>
 					<view class="uni-grid-wraps">
 						<view style="position: relative;width: 180rpx;float: left;margin: 10rpx 15rpx 0 0rpx;"
@@ -234,7 +235,7 @@
 								</u-icon>
 						</view>
 					</view>
-					<view style="width: 60%;position: absolute;left:150rpx;;bottom:60rpx;z-index: 9999;">
+					<view style="width: 60%;position: fixed;left:150rpx;;bottom:60rpx;z-index: 9999;">
 						<div class="btnList" v-if="tableData.length!=0">
 							<u-button shape="circle" type="primary" color="#4CB2B6" text="保存"
 								customStyle="margin-right:20%" @click="checkPopupConfirm(item.id)">
@@ -251,8 +252,8 @@
 				</view>
 				<view style="width: 60%;position: absolute;left:150rpx;;bottom:60rpx;z-index: 9999;">
 					<div class="btnList" v-if="tableData.length!=0">
-						<u-button shape="circle" type="primary" color="#4CB2B6" text="保存"
-							customStyle="margin-right:20%" @click="checkPopupConfirm(item.id)">
+						<u-button shape="circle" type="primary" color="#4CB2B6" text="保存" customStyle="margin-right:20%"
+							@click="checkPopupConfirm(item.id)">
 						</u-button>
 						<u-button shape="circle" type="primary" color="#4CB2B6" text="取消" @click="checkPopupCancel">
 						</u-button>
@@ -482,7 +483,7 @@
 			checkboxConfirm3(index) {
 				this.description2 = this.checkedPopupDanger.toString()
 				if (this.description2.startsWith(',')) {
-					this.description2=this.description2.slice(1);
+					this.description2 = this.description2.slice(1);
 				}
 				this.showPopupDanger = false
 				this.$forceUpdate()
@@ -750,7 +751,7 @@
 						this.tableData = response.data.records
 						this.tableData.map(i => {
 							i.inspId = i.id
-							i.loading=false
+							i.loading = false
 							// i.inspName = i.insp_name
 							// i.inspCode = i.insp_code
 							i.isreport = 0
@@ -954,7 +955,8 @@
 							})
 							this.insTypeData = []
 							this.insTypeData.map(k => {
-								k.attUrl = []
+								k.attUrl = [],
+									k.loading = false
 							})
 							this.maShow = false
 
@@ -995,10 +997,16 @@
 			},
 
 			//拍照上传
-			photoUpload(val,index) {
+			photoUpload(val, index) {
 				let pictures = [];
 				var that = this;
-				that.tableData[index].loading=true
+				if (that.tableData[index].loading) {
+					that.tableData[index].loading = true
+					console.log(that.tableData, 'that.insTypeData111');
+				} else {
+					console.log(that.insTypeData, 'that.insTypeData');
+					that.insTypeData[index].loading = true
+				}
 				this.$forceUpdate()
 				uni.chooseImage({
 					sourceType: ['camera'], //实现拍照
@@ -1040,7 +1048,15 @@
 												}, //请求token
 												success: (res) => {
 													// that.loading = false
-														that.tableData[index].loading=false
+													if (that.tableData[index]
+														.loading) {
+														that.tableData[index]
+															.loading = false
+													} else if(that.insTypeData[index]
+															.loading){
+														that.insTypeData[index]
+															.loading = false
+													}
 													let imgUrl = JSON.parse(res
 														.data)
 													// that.imageList.push(imgUrl.data)
@@ -1075,7 +1091,15 @@
 												},
 												fail: (err) => {
 													// that.loading = false
-													that.tableData[index].loading=false
+													if (that.tableData[index]
+														.loading) {
+														that.tableData[index]
+															.loading = false
+													} else if(that.insTypeData[index]
+															.loading){
+														that.insTypeData[index]
+															.loading = false
+													}
 													this.$modal.msg(err.msg)
 												}
 											})

+ 3 - 3
pagesA/fire/fire_station/people_fireStation/people_fireStation.vue

@@ -466,15 +466,15 @@
 			},
 			userBlur() {
 				const regex = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}[\dxX]$/;
-				if (regex.test(this.membersList[0].userNum)) {
+				if (this.membersList[0].userNum&&regex.test(this.membersList[0].userNum)||!this.membersList[0].userNum) {
 					this.userRules = false
-				} else {
+				} else{
 					this.userRules = true
 				}
 			},
 			phoneBlur() {
 				const regex = /^1[3-9]\d{9}$/;
-				if (regex.test(this.membersList[0].phone)) {
+				if (regex.test(this.membersList[0].phone)||!this.membersList[0].phone) {
 					this.phoneRules = false
 				} else {
 					this.phoneRules = true

+ 1 - 0
pagesA/fire/metting_regsiter/metting_sigin.vue

@@ -206,6 +206,7 @@
 			},
 			//查看已上传附件
 			viewSee(val) {
+				this.showModal=false
 				downSee(val)
 			},
 			// 移出图片函数

+ 5 - 1
pagesB/fire/check_record/index.vue

@@ -280,7 +280,7 @@
 					pageSize: this.pageSize,
 					userId: this.$store.state.user.id,
 					inspectTime: this.kewords,
-					inspName: this.taskname
+					taskName: this.taskname
 				}
 				if (this.my == 'onlymy') {
 					getSelfInspecthisPage(formChuan).then(response => {
@@ -373,6 +373,10 @@
 <style scoped lang="scss">
 	.uni-container {
 		height: 100vh;
+
+	}
+	page{
+		background-color:#F5F7F9 ;
 	}
 
 	.top {