Ming 3 rokov pred
rodič
commit
1f5818aa38

+ 1 - 1
common/common.scss

@@ -424,7 +424,7 @@ radio,checkbox {
 		}
 	
 		input,
-		select {
+		select,textarea {
 			width: 500rpx;
 			font-size: 24rpx;
 		}

+ 1 - 1
pages/authAdd/authAdd.vue

@@ -211,7 +211,7 @@
 				
 				//修改验证
 				
-				if (!this.selectedData.length) {
+				if (!this.selectedData.length||this.selectedData.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请选择站点",
 						icon: "none"

+ 6 - 6
pages/deviceAdd/deviceAdd.vue

@@ -165,21 +165,21 @@
 
 			//新增验证并提交
 			addSubmit() {
-				if (!this.formMess.deviceCode) {
+				if (!this.formMess.deviceCode.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请填写设备编号",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.formMess.deviceName) {
+				if (!this.formMess.deviceName.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请填写设备名称",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.formMess.deviceInstallationPosition) {
+				if (!this.formMess.deviceInstallationPosition.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请填写安装位置",
 						icon: "none"
@@ -220,21 +220,21 @@
 
 			//编辑验证并提交
 			editSubmit() {
-				if (!this.deviceMessage.deviceCode) {
+				if (!this.deviceMessage.deviceCode.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请填写设备编号",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.deviceMessage.deviceName) {
+				if (!this.deviceMessage.deviceName.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请填写设备名称",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.deviceMessage.deviceInstallationPosition) {
+				if (!this.deviceMessage.deviceInstallationPosition.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请填写安装位置",
 						icon: "none"

+ 16 - 5
pages/eleControl/controlReport/controlReportAdd/controlReportAdd.vue

@@ -101,25 +101,36 @@
 		methods: {
 			upFile(input, event) {
 			 var _self = this;
+			 
 			 uni.uploadFile({
 			  url: 'http://124.71.174.104:8081/USKYOF/USKYOF.php/Home/MonitoringReporting/setUpload',
+			 
 			  files: [
 			   {
 			    file: input.files[0],
 			    uri: event.srcElement.value
 			   }
 			  ],
+			  
+			  
+
+
+
+
+
+
 			  success: (uploadFileRes) => {
-				 
+
 			   var data=JSON.parse(uploadFileRes.data)
-			   
+			    alert('上传成功')
+				alert(data.img_url)
 			   console.log('data')
 			   console.log(data.img_url)
-			   
-			     console.log('uploadFileRes')
+			   console.log('uploadFileRes')
 			   this.img=data.img_url
 			  },
 			  fail: (err) => {
+				  alert('上传失败')
 			   console.log(err)
 			  }
 			 });
@@ -148,7 +159,7 @@
 					});
 					return
 				}
-				if (!this.img.length > 0) {
+				if (!this.img) {
 					uni.showToast({
 						title: "请上传图片",
 						icon: "none"

+ 15 - 15
pages/siteAdd/siteAdd.vue

@@ -226,42 +226,42 @@
 
 			//新增验证并提交
 			addSubmit() {
-				if (!this.siteName) {
+				if (!this.siteName.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入站点名称...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.address) {
+				if (!this.address.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入地址...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.longitude) {
+				if (!this.longitude.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入经度...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.latitude) {
+				if (!this.latitude.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入纬度...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.userName) {
+				if (!this.userName.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入联系人...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.phone) {
+				if (!this.phone.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入手机号码...",
 						icon: "none"
@@ -284,14 +284,14 @@
 				 	});
 				 	return
 				 }
-				 if (!this.installed_capacity) {
+				 if (!this.installed_capacity.replace(/^\s*/g,'')) {
 				 	uni.showToast({
 				 		title: "请输入装机容量...",
 				 		icon: "none"
 				 	});
 				 	return
 				 }
-				 if (!this.rheological_change) {
+				 if (!this.rheological_change.replace(/^\s*/g,'')) {
 				 	uni.showToast({
 				 		title: "请输入流变变化...",
 				 		icon: "none"
@@ -321,35 +321,35 @@
 					});
 					return
 				}
-				if (!this.siteMessage.address) {
+				if (!this.siteMessage.address.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入地址...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.siteMessage.longitude) {
+				if (!this.siteMessage.longitude.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入经度...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.siteMessage.latitude) {
+				if (!this.siteMessage.latitude.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入纬度...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.siteMessage.userName) {
+				if (!this.siteMessage.userName.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入联系人...",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.siteMessage.phone) {
+				if (!this.siteMessage.phone.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入手机号码...",
 						icon: "none"
@@ -370,14 +370,14 @@
 				 	});
 				 	return
 				 }
-				 if (!this.siteMessage.installed_capacity) {
+				 if (!this.siteMessage.installed_capacity.replace(/^\s*/g,'')) {
 				 	uni.showToast({
 				 		title: "请输入装机容量...",
 				 		icon: "none"
 				 	});
 				 	return
 				 }
-				 if (!this.siteMessage.rheological_change) {
+				 if (!this.siteMessage.rheological_change.replace(/^\s*/g,'')) {
 				 	uni.showToast({
 				 		title: "请输入流变变化...",
 				 		icon: "none"

+ 2 - 1
pages/siteArchive/archiveDetail/archiveDetail.vue

@@ -254,7 +254,8 @@
 			</view>
 			<view class="form-item">
 				<view class="title">备注:</view>
-				<input type="text" disabled="true" v-model="detailInfo.remarks">
+				<!-- <input type="text" disabled="true" v-model="detailInfo.remarks"> -->
+				<textarea name="" id="" disabled="true" v-model="detailInfo.remarks"></textarea>
 			</view>
 			
 			<br>

+ 9 - 8
pages/siteArchive/siteArchiveAdd/siteArchiveAdd.vue

@@ -7,15 +7,15 @@
 					<text class="necessary">*</text>
 					户号:
 				</view>
-				<input name="input" v-model="formMess.account_number"  maxlength="8"></input>
+				<input name="input" v-model="formMess.account_number"  maxlength="20"></input>
 			</view>
 			<view class="form-item">
 				<view class="title"><text class="necessary">*</text>流变变比:</view>
-				<input name="input" v-model="formMess.rheological_change"  maxlength="8"></input>
+				<input name="input" v-model="formMess.rheological_change"  maxlength="20"></input>
 			</view>
 			<view class="form-item">
 				<view class="title" style="width:240rpx"><text class="necessary">*</text>单路电源容量:</view>
-				<input name="input" v-model="formMess.power_capacity"  maxlength="8"></input>
+				<input name="input" v-model="formMess.power_capacity"  maxlength="20"></input>
 			</view>
 			<view class="form-item">
 				<view class="title"><text class="necessary">*</text>线路:</view>
@@ -170,7 +170,8 @@
 			</view>
 			<view class="form-item">
 				<view class="title">备注:</view>
-				<input type="text" v-model="formMess.remarks">
+				<textarea name="" id=""v-model="formMess.remarks"></textarea>
+				<!-- <input type="text" v-model="formMess.remarks"> -->
 			</view>
 			
 			<view class="btn-area submitBottomBtn padding-lr-sm  " style="position:static">
@@ -283,21 +284,21 @@
 			async addSubmit() {
 				
 				//提交验证
-				if (!this.formMess.account_number) {
+				if (!this.formMess.account_number.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入户号",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.formMess.rheological_change) {
+				if (!this.formMess.rheological_change.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入流变变化",
 						icon: "none"
 					});
 					return
 				}
-				if (!this.formMess.power_capacity) {
+				if (!this.formMess.power_capacity.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入单路电源容量",
 						icon: "none"
@@ -318,7 +319,7 @@
 					});
 					return
 				}
-				if (!this.formMess.supervision_department_id) {
+				if (!this.formMess.supervision_department_id.replace(/^\s*/g,'')) {
 					uni.showToast({
 						title: "请输入所属监察",
 						icon: "none"