소스 검색

修改 bug

“yueshang” 1 년 전
부모
커밋
187e7bf49a

+ 52 - 49
pagesA/fire/fire_inspetItem/add-street/streetCzfpczl.vue

@@ -31,11 +31,11 @@
 						<view class="paizhao-posit" v-if="!isview">
 							<view class="">
 								<image :src="photograph" @click="photoUpload" class="tiantupian-photo"></image>
-								<span v-if="loading" class="photo-loading">上传照片中...</span>
+								<uni-load-more v-show="loading" status="loading" :content-text="contentText" />
+								<!-- <span v-show="loading" class="photo-loading">上传照片中...</span> -->
 							</view>
 							<view class="">
 								拍照上传
-								
 							</view>
 						</view>
 					</view>
@@ -92,6 +92,9 @@
 	export default {
 		data() {
 			return {
+				contentText: {
+					contentrefresh: '上传照片中',
+				},
 				photograph: `${baseUrlImg}/checkActive/photograph.png`,
 				dateTime: '',
 				formData: {
@@ -166,60 +169,60 @@
 				this.formData.streetRepPicsDOList.splice(index, 1)
 			},
 			photoUpload() {
-				this.loading = true
+				// this.loading = true
 				takePhotos(this)
-		},
-		bindDateChange(e) {
-			this.formData.reporttime = e.detail.value
-		},
-		submit(ref) {
-			this.$refs[ref].validate().then(res => {
-				const formList = this.formData
-				Object.keys(formList).forEach(key => {
-					formList[key] = formList[key] === '' ? 0 : formList[key];
-				});
-				formList.streetRepPicsDOList.forEach((item) => {
-					// 删除除了feildname和url以外的多余字段
-					Object.keys(item).forEach((key) => {
-						if (key !== 'feildname' && key !== 'url' && key !== 'repid') {
-							delete item[key];
+			},
+			bindDateChange(e) {
+				this.formData.reporttime = e.detail.value
+			},
+			submit(ref) {
+				this.$refs[ref].validate().then(res => {
+					const formList = this.formData
+					Object.keys(formList).forEach(key => {
+						formList[key] = formList[key] === '' ? 0 : formList[key];
+					});
+					formList.streetRepPicsDOList.forEach((item) => {
+						// 删除除了feildname和url以外的多余字段
+						Object.keys(item).forEach((key) => {
+							if (key !== 'feildname' && key !== 'url' && key !== 'repid') {
+								delete item[key];
+							}
+						});
+						// 如果feildname为空,赋值为默认名称
+						if (!item.feildname) {
+							item.feildname = '默认名称';
+						}
+						if (this.isedit && !item.repid) {
+							item.repid = this.parentId
 						}
 					});
-					// 如果feildname为空,赋值为默认名称
-					if (!item.feildname) {
-						item.feildname = '默认名称';
-					}
-					if(this.isedit&&!item.repid){
-						item.repid=this.parentId
+					console.log(formList, 'this.formData');
+					if (this.isedit) {
+						updateCzfpczl(JSON.stringify(this.formData)).then(res => {
+							this.$modal.msg('修改成功')
+							this.isedit = false
+							setTimeout(() => {
+								uni.navigateBack()
+							}, 400)
+						})
+					} else if (this.isview) {
+						this.isview = false
+						uni.navigateBack()
+					} else {
+						createCzfpczl(JSON.stringify(this.formData)).then(res => {
+							this.$modal.msg('新增成功')
+							setTimeout(() => {
+								uni.navigateBack()
+							}, 400)
+						})
 					}
-				});
-				console.log(formList, 'this.formData');
-				if (this.isedit) {
-					updateCzfpczl(JSON.stringify(this.formData)).then(res => {
-						this.$modal.msg('修改成功')
-						this.isedit = false
-						setTimeout(() => {
-							uni.navigateBack()
-						}, 400)
-					})
-				} else if (this.isview) {
-					this.isview = false
-					uni.navigateBack()
-				} else {
-					createCzfpczl(JSON.stringify(this.formData)).then(res => {
-						this.$modal.msg('新增成功')
-						setTimeout(() => {
-							uni.navigateBack()
-						}, 400)
-					})
-				}
 
-			}).catch(err => {
-				console.log(err);
-			})
+				}).catch(err => {
+					console.log(err);
+				})
+			}
 		}
 	}
-	}
 </script>
 
 

+ 11 - 13
pagesA/fire/fire_station/index.vue

@@ -206,7 +206,7 @@
 					this.isLoaded = true
 					this.tableData = [...this.tableData, ...response.data.list]
 					this.loading = false
-					this.total=response.data.total
+					this.total = response.data.total
 					// this.tableData = response.data.list;
 					// console.log(this.tableData[0].id, 'ppp');
 					// localStorage.setItem('fireId',this.tableData[0].id)
@@ -290,7 +290,7 @@
 		},
 		// 触底的事件
 		onReachBottom() {
-			console.log(this.loading,'ssss');
+			console.log(this.loading, 'ssss');
 			// 判断是否还有下一页数据
 			if (this.pageNo * this.pageSize >= this.total)
 				return uni.showToast({
@@ -341,37 +341,36 @@
 
 	.an-niu {
 		float: right;
-		font-size: 10px;
 		text-align: center;
 		display: flex;
 		// margin-top: -64upx;
 		padding-bottom: 30rpx;
 		// margin-top: 50rpx;
 		color: #fff;
+		font-size: 30rpx;
 
 		.detail {
-			width: 60px;
+			width: 120rpx;
 			padding: 0 20rpx;
 			height: 60rpx;
-			border-radius: 30px;
+			border-radius: 60rpx;
 			background-color: #f7c41e;
 			margin-right: 20rpx;
 			text-align: center;
 			line-height: 60rpx;
-			font-size: 30rpx;
+
 		}
 
 		.detailDel {
-			width: 60px;
+			width: 120rpx;
 			height: 60rpx;
 			padding: 0 20rpx;
-			border-radius: 30px;
+			border-radius: 60rpx;
 			background-color: #ff2e31;
 			color: white;
 			margin-right: 20rpx;
 			text-align: center;
 			line-height: 60rpx;
-			font-size: 30rpx;
 		}
 
 		.operation {
@@ -380,13 +379,12 @@
 
 		.solve,
 		.operation {
-			width: 62px;
+			width: 124rpx;
 			height: 60rpx;
 			margin-right: 20rpx;
-			border-radius: 30px;
+			border-radius: 60rpx;
 			background-color: #4cb2b6;
 			line-height: 60rpx;
-			font-size: 30rpx;
 		}
 
 		/deep/ .padding-tb-sm {
@@ -395,7 +393,7 @@
 		}
 
 		.deletes {
-			width: 62px;
+			width: 124rpx;
 			height: 60rpx;
 			border-radius: 60rpx;
 			background-color: red;

+ 0 - 1
pagesA/fire/hidden_trouble/index.vue

@@ -393,7 +393,6 @@
 		},
 		// 在 vue页面,向起始页通过事件传递数据
 		onLoad: function(option) {
-
 			console.log("this.$store.state: ", this.$store.state);
 			console.log('DICT_TYPE', getDictDatas(DICT_TYPE.DENGER_HANDLE));
 		},

+ 0 - 6
pagesB/components/drill/index.vue

@@ -116,7 +116,6 @@
 				pageSize: this.pageSize,
 				userId: this.$store.state.user.id
 			}).then(response => {
-				console.log(response, 'response');
 				// 取到用户对应的单位名称与id
 				response.data.map(v => {
 					this.actions.push({
@@ -124,7 +123,6 @@
 						name: v.orgName
 					});
 				});
-				console.log(response.data, '21321312');
 				this.formData.orgName = response.data[0].orgName;
 				this.formData.orgId = response.data[0].dwid;
 				this.tableData = []
@@ -135,7 +133,6 @@
 		mixins: [uni.$u.mixin],
 		methods: {
 			search(val) {
-				console.log(val, 'valvals');
 				this.isLoaded =false
 				this.tableData = []
 				this.getData(1)
@@ -155,7 +152,6 @@
 					this.total=response.data.total
 					this.loading = false
 					this.tableData.map(i => {
-						console.log(i);
 						if (i.drillType == 1) {
 							i.drillTypeName = '培训'
 						} else if (i.drillType == 2) {
@@ -166,14 +162,12 @@
 			},
 			// 传递数据
 			onClick(val, orgName) {
-				console.log(val, orgName, 'val');
 				this.isLoaded = false
 				uni.navigateTo({
 					url: '/pagesA/fire/drill/drill_details/drill_details?id=' + val.id + '&orgName=' + orgName+'&historyView=historyView',
 					events: {
 						// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
 						acceptDataFromOpenedPage: function(val) {
-							console.log(val, '打开页面传送到当前页面的数据');
 						}
 					},
 					success: function(res) {

+ 1 - 6
pagesB/components/fireSpecial/index.vue

@@ -121,7 +121,6 @@
 				pageSize: this.pageSize,
 				userId: this.$store.state.user.id
 			}).then(response => {
-				console.log(response, 'response');
 				// 取到用户对应的单位名称与id
 				response.data.map(v => {
 					this.actions.push({
@@ -129,7 +128,6 @@
 						name: v.orgName
 					});
 				});
-				console.log(response.data, '21321312');
 				this.formData.orgName = response.data[0].orgName ? response.data[0].orgName : '';
 				this.formData.orgId = response.data[0].dwid;
 				this.tableData = []
@@ -141,7 +139,6 @@
 		mixins: [uni.$u.mixin],
 		methods: {
 			search(val) {
-				console.log(val, 'valvals',this.formData);
 				this.tableData = []
 				this.getData()
 			},
@@ -149,10 +146,9 @@
 				var t = this;
 				t.$.getlocation()
 					.then(res => {
-						console.log(res, 'res');
+	
 					})
 					.catch(err => {
-						console.log(err, 'err');
 					});
 			},
 			//查看详情
@@ -172,7 +168,6 @@
 					orgIds: arrOrg,	
 					empName:this.keyword
 				}).then(response => {
-					console.log(response,'sdsdsd');
 					this.isLoaded = true
 					this.tableData = response.data?[...this.tableData, ...response.data.list]:[]
 					this.total = response.data?response.data.total:0

+ 0 - 8
pagesB/components/fireWork/index.vue

@@ -133,7 +133,6 @@
 				pageSize: this.pageSize,
 				userId: this.$store.state.user.id
 			}).then(response => {
-				console.log(response, 'response');
 				// 取到用户对应的单位名称与id
 				response.data.map(v => {
 					this.actions.push({
@@ -141,7 +140,6 @@
 						name: v.orgName
 					});
 				});
-				console.log(response.data, '21321312');
 				this.formData.orgName = response.data[0].orgName ? response.data[0].orgName : '';
 				this.formData.orgId = response.data[0].dwid;
 				this.tableData = []
@@ -170,7 +168,6 @@
 				this.showShenHe = false
 			},
 			search(val) {
-				console.log(val, 'valvals', this.formData);
 				this.tableData = []
 				this.getData()
 			},
@@ -188,7 +185,6 @@
 			showModal(val) {
 				this.show = true;
 				this.id = val;
-				console.log(val, 'val.id');
 			},
 			confirm() {
 				this.show = false;
@@ -199,16 +195,13 @@
 					this.isLoaded = false
 					this.tableData = []
 					this.getData();
-					console.log(this.tableData, '获取建筑信息详细信息获取建筑信息详细信息获取建筑信息详细信息获取建筑信息详细信息');
 				});
 			},
 			close() {
 				this.show = false;
-				console.log('close');
 			},
 			cancel() {
 				this.show = false;
-				console.log('cancel');
 			},
 			//查看详情
 			addClickDetail(val) {
@@ -228,7 +221,6 @@
 					orgIds: arrOrg,
 					executor: this.keyword
 				}).then(response => {
-					console.log(response, 'sdsdsd');
 					this.isLoaded = true
 					this.tableData = response.data ? [...this.tableData, ...response.data.list] : []
 					this.total = response.data ? response.data.total : 0

+ 1 - 12
pagesB/components/fpd_detection/fpd_detection.vue

@@ -118,11 +118,9 @@
 		methods: {
 			//搜索
 			search() {
-				console.log('keyword', this.keyword);
 				getFpdDetectionPage({
 					detinspect: this.keyword
 				}).then(res => {
-					console.log('res', res);
 					if (res.data) {
 						//对检测结果进行初始化
 						const reArr = getDictDatas(DICT_TYPE.BACKEND_DET_RESULT)
@@ -160,15 +158,11 @@
 			getData() {
 				this.loading = true;
 				getFpdDetectionPage(this.queryParams).then(response => {
-					// console.log('res',response	);
-					if (response.data) {
-						
+					if (response.data) {	
 						//对检测结果进行初始化
 						const reArr = getDictDatas(DICT_TYPE.BACKEND_DET_RESULT)
-						// console.log('reArr',reArr);
 						this.tableData = response.data.list.map(item => {
 							const thisItem = reArr.find(par=>par.value === item.detresult)
-							// console.log('thisItem',thisItem);
 							if(thisItem){
 								item.detresult = {id:thisItem.value,name:thisItem.label}
 							}
@@ -179,7 +173,6 @@
 					}
 					this.isLoaded = true
 					this.loading = false;
-					console.log('tableData', this.tableData);
 
 				}).catch(err => {
 						this.isLoaded = true
@@ -190,11 +183,9 @@
 			},
 			// 传递数据
 			onClick(val, orgName) {
-				console.log(val.orgName, val, 'val');
 				const navData = JSON.stringify({
 					...val
 				})
-				console.log('navData', navData);
 				this.isLoaded = false
 				uni.navigateTo({
 					url: '/pagesA/fire/fpd_detection/detection_details/detection_details?id=' + val.id+'&historyView=historyView',
@@ -217,7 +208,6 @@
 				pageSize: this.pageSize,
 				userId: this.$store.state.user.id
 			}).then(response => {
-				// console.log(response, 'response');
 				// 取到用户对应的单位名称与id
 				response.data.map(v => {
 					this.actions.push({
@@ -225,7 +215,6 @@
 						name: v.orgName
 					});
 				});
-				// console.log(response.data, '21321312');
 				this.formData.orgName = response.data[0].orgName;
 				this.formData.orgId = response.data[0].dwid;
 				this.tableData = []

+ 0 - 6
pagesB/fire/check_record/index.vue

@@ -225,7 +225,6 @@
 					default:
 						break;
 				}
-				console.log(this.current, 'l');
 
 			},
 			setInverted(value, rotues) { //标签的点击事件
@@ -265,7 +264,6 @@
 					this.kewords[1] = this.kewords[1] + ' 23:59:59'
 				}
 				this.getData(1)
-				console.log(this.kewords, 'ddddddddddd', e);
 			},
 			// =================数据转换==================
 			statusListTran(val) {
@@ -286,7 +284,6 @@
 				}
 				if (this.my == 'onlymy') {
 					getSelfInspecthisPage(formChuan).then(response => {
-						console.log('response', response);
 						// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
 						this.isLoaded = true
 						this.tableData = [...this.tableData, ...response.data.records];
@@ -299,7 +296,6 @@
 					});
 				} else {
 					getInspecthisPage(formChuan).then(response => {
-						console.log('1111', response);
 						this.isLoaded = true
 						// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
 						this.tableData = [...this.tableData, ...response.data.list];
@@ -314,7 +310,6 @@
 
 			},
 			onClick(val) {
-				console.log(val);
 				this.isLoaded = false
 				if (this.my == "myonly") {
 					uni.navigateTo({
@@ -328,7 +323,6 @@
 			},
 			gotoDetails(val) {
 				this.isLoaded = false
-				console.log('val.status', val.status);
 				var url = '';
 				if (val.status == 1) {
 					//主动检查详情

+ 1 - 7
pagesB/fire/check_record/personnel_record/personnel_record.vue

@@ -119,7 +119,6 @@
 		//这里用onshow()也可以
 		onLoad(options) {
 			var data = options.id;
-			console.log(data)
 			this.getData(data)
 		},
 		// onLoad: function(option) {
@@ -127,8 +126,7 @@
 		// 	const eventChannel = this.getOpenerEventChannel();
 		// 	// eventChannel.emit('acceptDataFromOpenedPage', {
 		// 	// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
-		// 	eventChannel.on('acceptDataFromOpenerPage', function(val) {
-		// 		console.log(' val', val) 
+		// 	eventChannel.on('acceptDataFromOpenerPage', function(val) 
 		// 		that.getData(val.id)
 		// 	})
 		// },
@@ -146,12 +144,10 @@
 			// =============获取数据===================s
 			// 获取数据
 			getData(id) {
-				console.log('id', id);
 				this.loading = true
 				getTaskDetails({
 					id: id
 				}).then(response => {
-					console.log(response);
 					// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接 
 					this.formData = response.data
 					this.loading = false;
@@ -164,7 +160,6 @@
 				// 如果有错误,会在catch中返回报错信息数组,校验通过则在then中返回true  
 				this.$refs.uForm.validate().then(res => {
 					getTaskSubmit(this.formData).then(response => {
-						console.log('response.data.msg0,', response.data.msg);
 						uni.showLoading({
 							title: response.data.msg
 						});
@@ -174,7 +169,6 @@
 						}, 2000);
 					});
 				}).catch(errors => {
-					console.log('err', errors);
 					uni.$u.toast('校验失败')
 				})
 			}, 

+ 0 - 5
pagesB/fire/check_record/picture/picture.vue

@@ -225,10 +225,8 @@
 		onLoad(options) {
 			if (options.items) {
 				this.my = JSON.parse(options.items)
-				console.log(this.my, 'jjjj');
 			} else {
 				var data = options.id;
-				console.log(data)
 				this.getData(data)
 			}
 
@@ -241,7 +239,6 @@
 				// uni.redirectTo({
 				// 	url: `/pagesA/fire/check_record/index?my=${this.my}`
 				// });
-				console.log('id', id);
 				this.loading = true
 				getInspEcthisDetail({
 					hisId: id
@@ -256,7 +253,6 @@
 						
 					})
 					this.tableData.inspectInfo.createTime=shijianc(this.tableData.inspectInfo.createTime)
-						console.log(this.tableData, 'responseresponse')
 					// this.dictTypeValue = this.tableData.inspType
 					// this.tableData.inspType = checkType(this.dictTypeData, this.dictTypeValue)
 					// this.times = this.tableData.taskInfo ? shijianc(this.tableData.taskInfo.publishTime) : ''
@@ -264,7 +260,6 @@
 				getInsHisImgurl({
 					hisId: id,
 				}).then(response => {
-					console.log('response', response);
 					this.tableData.url = response.data
 				});
 			},

+ 2 - 6
pagesB/fire/fireSpecial/addSpecial/index.vue

@@ -173,7 +173,6 @@
 				this.isedit = false
 				this.isview = false
 			}
-            console.log(this.isedit,'ffffffff',this.isview);
 		},
 		methods: {
 			//查看已上传附件
@@ -183,7 +182,6 @@
 			// 移出图片函数
 			async deleteFile(e) {
 				this.formData.attId = [];
-				// console.log('移除了:');
 			},
 			selectFile(e) {
 			  let promises = [];
@@ -217,7 +215,6 @@
 					id: this.parentId
 				}).then(response => {
 					this.formData = response.data
-					console.log(response, 'response')
 				})
 			},
 			bindDateChange(e) {
@@ -227,9 +224,9 @@
 				this.formData.issueDate = e.detail.value
 			},
 			submit(ref) {
-				
 				this.$refs[ref].validate().then(res => {
-					this.formData.att = this.formData.attId?this.formData.attId.join(''):this.formData.att
+				this.formData.att = this.formData.attId.length > 0 && this.formData.attId[0] ? this.formData
+					.attId[0] : this.formData.att
 					if (this.isedit) {
 						fireSpecialUpdate(JSON.stringify(this.formData)).then(res => {
 							this.$modal.msg('修改成功')
@@ -251,7 +248,6 @@
 					}
 
 				}).catch(err => {
-					console.log(err);
 				})
 			}
 		}

+ 0 - 10
pagesB/fire/fireSpecial/index.vue

@@ -133,7 +133,6 @@
 				pageSize: this.pageSize,
 				userId: this.$store.state.user.id
 			}).then(response => {
-				console.log(response, 'response');
 				// 取到用户对应的单位名称与id
 				response.data.map(v => {
 					this.actions.push({
@@ -141,7 +140,6 @@
 						name: v.orgName
 					});
 				});
-				console.log(response.data, '21321312');
 				this.formData.orgName = response.data[0].orgName ? response.data[0].orgName : '';
 				this.formData.orgId = response.data[0].dwid;
 				this.tableData = []
@@ -153,7 +151,6 @@
 		mixins: [uni.$u.mixin],
 		methods: {
 			search(val) {
-				console.log(val, 'valvals',this.formData);
 				this.tableData = []
 				this.getData()
 			},
@@ -161,17 +158,14 @@
 				var t = this;
 				t.$.getlocation()
 					.then(res => {
-						console.log(res, 'res');
 					})
 					.catch(err => {
-						console.log(err, 'err');
 					});
 			},
 			// 模态框内容
 			showModal(val) {
 				this.show = true;
 				this.id = val;
-				console.log(val,'val.id');
 			},
 			confirm() {
 				this.show = false;
@@ -182,16 +176,13 @@
 					this.isLoaded = false
 					this.tableData = []
 					this.getData();
-					console.log(this.tableData, '获取建筑信息详细信息获取建筑信息详细信息获取建筑信息详细信息获取建筑信息详细信息');
 				});
 			},
 			close() {
 				this.show = false;
-				console.log('close');
 			},
 			cancel() {
 				this.show = false;
-				console.log('cancel');
 			},
 			//查看详情
 			addClickDetail(val) {
@@ -210,7 +201,6 @@
 					orgIds: arrOrg,	
 					empName:this.keyword
 				}).then(response => {
-					console.log(response,'sdsdsd');
 					this.isLoaded = true
 					this.tableData = response.data?[...this.tableData, ...response.data.list]:[]
 					this.total = response.data?response.data.total:0

+ 22 - 26
pagesB/fire/fireWork/addWork/index.vue

@@ -13,11 +13,10 @@
 						@click="showExecutor = true; hideKeyboard()">
 						<u-input v-model="formData.executor" placeholder="请选择" :disabled="isview" />
 					</u-form-item>
-					<u-form-item label="动火台账状态" prop="workStatus" :required="true" 
-						 v-if="isview">
-							 <u-input  v-model="formData.workStatus" placeholder="请选择" :disabled="isview" />
-						 <!-- @click="showSex = true; hideKeyboard()" -->
-						
+					<u-form-item label="动火台账状态" prop="workStatus" :required="true" v-if="isview">
+						<u-input v-model="formData.workStatus" placeholder="请选择" :disabled="isview" />
+						<!-- @click="showSex = true; hideKeyboard()" -->
+
 					</u-form-item>
 					<picker mode="date" :value="dateTime" @change="bindDateChange" :disabled="isview">
 						<view class="datatime-street">
@@ -63,8 +62,8 @@
 			<u-button v-if="isedit" @click="submit('customForm')" type="primary" shape="circle" size="large"
 				color="#4CB2B6" text="确认修改" style="width:200px">
 			</u-button>
-			<u-button v-else-if="!isedit&&!isview" @click="submit('customForm')" type="primary" shape="circle" size="large"
-				color="#4CB2B6" text="确认新增" style="width:200px">
+			<u-button v-else-if="!isedit&&!isview" @click="submit('customForm')" type="primary" shape="circle"
+				size="large" color="#4CB2B6" text="确认新增" style="width:200px">
 			</u-button>
 			<u-button v-else-if="isview" @click="submit('customForm')" type="primary" shape="circle" size="large"
 				color="#4CB2B6" text="返回" style="width:200px">
@@ -73,11 +72,11 @@
 		<u-action-sheet :show="showSex" :actions="actionsSex" title="请选择动火台账状态" @close="showSex = false"
 			@select="sexSelect">
 		</u-action-sheet>
-		<u-action-sheet :show="showExecutor" :actions="actionsExecutor" class="popups" title="请选择动火作业执行人" @close="showExecutor = false"
-			@select="clickExecutor">
+		<u-action-sheet :show="showExecutor" :actions="actionsExecutor" class="popups" title="请选择动火作业执行人"
+			@close="showExecutor = false" @select="clickExecutor">
 		</u-action-sheet>
-		<u-action-sheet :show="showOrg" :actions="orgaction" title="请选择单位" class="org-choice popups" @close="showOrg = false"
-			@select="orgSelect"></u-action-sheet>
+		<u-action-sheet :show="showOrg" :actions="orgaction" title="请选择单位" class="org-choice popups"
+			@close="showOrg = false" @select="orgSelect"></u-action-sheet>
 	</view>
 </template>
 
@@ -105,7 +104,7 @@
 				screenHeight: this.$screenHeight,
 				wheight: '',
 				showExecutor: false, //动火台账执行人
-				actionsExecutor:[],
+				actionsExecutor: [],
 				formData: {
 					orgName: '',
 					orgId: '',
@@ -156,7 +155,7 @@
 				dateTime: '',
 				showSex: false,
 				actionsSex: getDictDatas(DICT_TYPE.FIRE_WORK_STATUS), //性别
-				workStatus:getDictDatas(DICT_TYPE.FIRE_WORK_STATUS),//台账状态
+				workStatus: getDictDatas(DICT_TYPE.FIRE_WORK_STATUS), //台账状态
 				orgaction: [], //单位
 				showOrg: false
 			}
@@ -200,14 +199,12 @@
 				pageSize: 100,
 				orgIds: arrOrg,
 			}).then(response => {
-				console.log(response, 'sdsdsd');
 				this.actionsExecutor = response.data ? response.data.list : []
 				this.actionsExecutor.map(i => {
 					i.name = i.empName
 				})
 
 			});
-			console.log(this.isedit, 'ffffffff', this.isview);
 		},
 		methods: {
 			clickExecutor(e) { //动火台账执行人
@@ -220,7 +217,6 @@
 			// 移出图片函数
 			async deleteFile(e) {
 				this.formData.attId = [];
-				// console.log('移除了:');
 			},
 			selectFile(e) {
 				let promises = [];
@@ -254,29 +250,28 @@
 					id: this.parentId
 				}).then(response => {
 					this.formData = response.data
-					this.workStatus.map(i=>{
-						if(this.formData.workStatus==i.value)
-						this.formData.workStatus=i.label
+					this.workStatus.map(i => {
+						if (this.formData.workStatus == i.value)
+							this.formData.workStatus = i.label
 					})
-					console.log(response, 'response')
 				})
 			},
 			bindDateChange(e) {
 				this.formData.workBegin = e.detail.value
 			},
 			bindDateChange2(e) {
-				console.log(e.detail, '3');
 				this.formData.workEnd = e.detail.value
 			},
 			submit(ref) {
 				const end = new Date(this.formData.workEnd).getTime()
 				const start = new Date(this.formData.workBegin).getTime()
 				if (start > end) {
-					console.log(start,end,'000000000000');
 					return this.$modal.msg('结束时间不能小于开始时间')
-				} 
+				}
 				this.$refs[ref].validate().then(res => {
-					this.formData.att = this.formData.attId? this.formData.attId.join('') :this.formData.att
+
+					this.formData.att = this.formData.attId.length > 0 && this.formData.attId[0] ? this.formData
+						.attId[0] : this.formData.att
 					if (this.isedit) {
 						fireWorkUpdate(JSON.stringify(this.formData)).then(res => {
 							this.$modal.msg('修改成功')
@@ -298,7 +293,6 @@
 					}
 
 				}).catch(err => {
-					console.log(err);
 				})
 			}
 		}
@@ -350,13 +344,15 @@
 		font-size: 30rpx;
 		background-color: #4cb2b6;
 	}
-	.popups{
+
+	.popups {
 		/deep/.u-action-sheet {
 			overflow-y: auto;
 			height: 1000rpx;
 			background-color: #fff;
 		}
 	}
+
 	.example {
 		overflow-y: auto;
 	}

+ 0 - 10
pagesB/fire/fireWork/index.vue

@@ -146,7 +146,6 @@
 				pageSize: this.pageSize,
 				userId: this.$store.state.user.id
 			}).then(response => {
-				console.log(response, 'response');
 				// 取到用户对应的单位名称与id
 				response.data.map(v => {
 					this.actions.push({
@@ -154,7 +153,6 @@
 						name: v.orgName
 					});
 				});
-				console.log(response.data, '21321312');
 				this.formData.orgName = response.data[0].orgName ? response.data[0].orgName : '';
 				this.formData.orgId = response.data[0].dwid;
 				this.tableData = []
@@ -183,7 +181,6 @@
 				this.showShenHe = false
 			},
 			search(val) {
-				console.log(val, 'valvals', this.formData);
 				this.tableData = []
 				this.getData()
 			},
@@ -191,17 +188,14 @@
 				var t = this;
 				t.$.getlocation()
 					.then(res => {
-						console.log(res, 'res');
 					})
 					.catch(err => {
-						console.log(err, 'err');
 					});
 			},
 			// 模态框内容
 			showModal(val) {
 				this.show = true;
 				this.id = val;
-				console.log(val, 'val.id');
 			},
 			confirm() {
 				this.show = false;
@@ -212,16 +206,13 @@
 					this.isLoaded = false
 					this.tableData = []
 					this.getData();
-					console.log(this.tableData, '获取建筑信息详细信息获取建筑信息详细信息获取建筑信息详细信息获取建筑信息详细信息');
 				});
 			},
 			close() {
 				this.show = false;
-				console.log('close');
 			},
 			cancel() {
 				this.show = false;
-				console.log('cancel');
 			},
 			//查看详情
 			addClickDetail(val) {
@@ -241,7 +232,6 @@
 					orgIds: arrOrg,
 					executor: this.keyword
 				}).then(response => {
-					console.log(response, 'sdsdsd');
 					this.isLoaded = true
 					this.tableData = response.data ? [...this.tableData, ...response.data.list] : []
 					this.total = response.data ? response.data.total : 0

+ 2 - 2
static/scss/global.scss

@@ -24,9 +24,9 @@
 }
 //加载中拍照
 .photo-loading{
-	color: #c85820;
+	color: #c8732c;
 	margin-left: 20px;
-	font-size: 20px;
+	font-size: 18px;
 	vertical-align: middle;
 }
 //卡片前面位置对齐每日巡查

+ 14 - 3
utils/common.js

@@ -121,7 +121,12 @@ export function takePhotos(vm) {
 		sizeType: ['original', 'compressed'],
 		// sourceType: ['album','camera'], //打开系统相册
 		success(res) {
-			vm.loading = true
+			  if (res.tempFilePaths.length === 0) {
+			    vm.loading = false;
+			    return;
+			  }else{
+				  vm.loading=true
+			  }
 			if (Array.isArray(res.tempFilePaths)) {
 				res.tempFilePaths.forEach(item => {
 					loadImage(
@@ -147,7 +152,7 @@ export function takePhotos(vm) {
 										vm.formData.streetRepPicsDOList.push({
 											url: imgUrl.data,
 											feildname: '',
-											repid:''
+											repid: ''
 										});
 										vm.$forceUpdate();
 									},
@@ -173,11 +178,15 @@ export function takePhotos(vm) {
 				});
 			}
 		},
+		fail: (err) => {
+			vm.loading = false;
+		},
 	})
 }
 export function choiceStreet(vm) {
 	const deptValue = uni.getStorageSync('getDepartment_key'); //所有部门
-	const deptId =uni.getStorageSync('getUserInfo_key').streetInfo?uni.getStorageSync('getUserInfo_key').streetInfo.id:''; //登录用户
+	const deptId = uni.getStorageSync('getUserInfo_key').streetInfo ? uni.getStorageSync('getUserInfo_key').streetInfo
+		.id : ''; //登录用户
 	var newArrar = {}; //新对象
 	if (deptId) {
 		console.log(deptValue, 'deptValue部门', deptId);
@@ -309,7 +318,9 @@ export function uploadFile(tempFilePaths, i, that) {
 			},
 			success: res => {
 				let data = JSON.parse(res.data);
+				
 				// that.formData.attId.push(data.data)
+				that.formData.attId=['']
 				that.formData.attId[0] = data.data
 				uni.showToast({
 					title: '文件上传成功!'