Forráskód Böngészése

民用调压柜 改版

zhanghongrui 11 hónapja
szülő
commit
ca7c6182f7
4 módosított fájl, 42 hozzáadás és 221 törlés
  1. 2 2
      config.js
  2. 1 4
      pages/open_bolt/open_bolt.vue
  3. 24 193
      pages/surge_tank/surge_tank.vue
  4. 15 22
      pages/work/index.vue

+ 2 - 2
config.js

@@ -3,8 +3,8 @@ module.exports = {
 
 	//baseUrl: 'https://www.xcx.cczdsz.cn/prod-api',
 	//baseUrl: 'http://192.168.4.88:8080',
-	 baseUrl: 'http://192.168.4.23:8080',
-	// baseUrl: 'http://192.168.4.20:8080',
+	//baseUrl: 'http://192.168.4.23:8080',
+	baseUrl: 'http://192.168.4.20:8080',
 	// baseUrl: 'http://192.168.4.6:8080',
 
 	baseIconUrl: 'https://www.xcx.cczdsz.cn/app/images/',

+ 1 - 4
pages/open_bolt/open_bolt.vue

@@ -1365,10 +1365,7 @@
 			line-height: 20px;
 		}
 
-		// checkbox {
-		//     transform: scale(0.67);
-		//     border-radius: 50rpx;
-		//   }
+	
 
 		checkbox .wx-checkbox-input {
 			// border-radius: 50%;

+ 24 - 193
pages/surge_tank/surge_tank.vue

@@ -97,22 +97,22 @@
 					</view>
 
 					<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
-						<view class="container" style="color: #b2b2b2;">*请上传调压箱名牌照片</view>
+						<view class="container" style="color: #b2b2b2;">*请上传照片</view>
 						<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
 							<image :src="loadImgSrc('updateimg.png')" mode=""
-								style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Box')"
+								style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"
 								v-show="reviewStatus!='1'"></image>
-							<view v-for="(item,index) in imgBoxArr" :key="index" style="position: relative;">
+							<view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
 								<view
 									v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
 									<image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
-										@click="showPhoto(index,'Box')">
+										@click="showPhoto(index)">
 									</image>
 								</view>
 								<view v-else>
 									<video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
 								</view>
-								<view @click="remove(index,'Box')"
+								<view @click="remove(index)"
 									style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
 									<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
 									</image>
@@ -120,110 +120,10 @@
 							</view>
 						</view>
 					</view>
-					<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
-						<view class="container" style="color: #b2b2b2;">*请上传调压箱内石粉回填照片</view>
-						<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
-							<image :src="loadImgSrc('updateimg.png')" mode=""
-								style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Sfht')"
-								v-show="reviewStatus!='1'"></image>
-							<view v-for="(item,index) in imgSfhtArr" :key="index" style="position: relative;">
-								<view
-									v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
-									<image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
-										@click="showPhoto(index,'Sfht')">
-									</image>
-								</view>
-								<view v-else>
-									<video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
-								</view>
-								<view @click="remove(index,'Sfht')"
-									style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
-									<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
-									</image>
-								</view>
-							</view>
-						</view>
-
-						<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
-							<view class="container" style="color: #b2b2b2;">*请上传调压箱防雷接地照片</view>
-							<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
-								<image :src="loadImgSrc('updateimg.png')" mode=""
-									style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Fljd')"
-									v-show="reviewStatus!='1'"></image>
-								<view v-for="(item,index) in imgFljdArr" :key="index" style="position: relative;">
-									<view
-										v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
-										<image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
-											@click="showPhoto(index,'Fljd')">
-										</image>
-									</view>
-									<view v-else>
-										<video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
-									</view>
-									<view @click="remove(index,'Fljd')"
-										style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
-										<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
-										</image>
-									</view>
-								</view>
-							</view>
-
-							<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
-								<view class="container" style="color: #b2b2b2;">*请上传调压箱底腿连接照片</view>
-								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
-									<image :src="loadImgSrc('updateimg.png')" mode=""
-										style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Dtlj')"
-										v-show="reviewStatus!='1'"></image>
-									<view v-for="(item,index) in imgDtljArr" :key="index" style="position: relative;">
-										<view
-											v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
-											<image :src="item" mode=""
-												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
-												@click="showPhoto(index,'Dtlj')">
-											</image>
-										</view>
-										<view v-else>
-											<video :src="item"
-												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
-										</view>
-										<view @click="remove(index,'Dtlj')"
-											style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
-											<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
-											</image>
-										</view>
-									</view>
-								</view>
-							</view>
-							<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
-								<view class="container" style="color: #b2b2b2;">*请上传调压箱护栏及地面硬化(远景)照片</view>
-								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
-									<image :src="loadImgSrc('updateimg.png')" mode=""
-										style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('Hldmyh')"
-										v-show="reviewStatus!='1'"></image>
-									<view v-for="(item,index) in imgHldmyhArr" :key="index" style="position: relative;">
-										<view
-											v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
-											<image :src="item" mode=""
-												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
-												@click="showPhoto(index,'Hldmyh')">
-											</image>
-										</view>
-										<view v-else>
-											<video :src="item"
-												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
-										</view>
-										<view @click="remove(index,'Hldmyh')"
-											style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
-											<image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
-											</image>
-										</view>
-									</view>
-								</view>
-							</view>
-						</view>
-					</view>
 				</view>
 			</view>
+			</view>
+			</view>
 			<view class="action-btn" v-show="reviewStatus!='1'">
 				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 			</view>
@@ -238,7 +138,7 @@
 
 	<script>
 		import SelectPicker from '../../components/selectPicker/select_picker.vue'
-		import bottomSheet from '../../components/bottomSheet/bottomSheetMore.vue'
+		import bottomSheet from '../../components/bottomSheet/bottomSheetMoreNew.vue'
 
 		import {
 			getDicts
@@ -277,11 +177,7 @@
 					selectList: [],
 					dictOptions: [],
 
-					imgSfhtArr: [],
-					imgFljdArr: [],
-					imgBoxArr: [],
-					imgDtljArr: [],
-					imgHldmyhArr: [],
+					imgArr: [],
 
 					videoArr: [],
 					XQValue: {},
@@ -392,22 +288,10 @@
 				handleHiddenShare() {
 					this.shareState = false;
 				},
-				showPhoto(index, type) {
-					let typeArr = [];
-					let newArr = [];
-					if (type == 'Box') {
-						typeArr = this.imgBoxArr;
-					} else if (type == 'Sfht') {
-						typeArr = this.imgSfhtArr;
-					} else if (type == 'Fljd') {
-						typeArr = this.imgFljdArr;
-					} else if (type == 'Dtlj') {
-						typeArr = this.imgDtljArr;
-					} else if (type == 'Hldmyh') {
-						typeArr = this.imgHldmyhArr;
-					}
+				showPhoto(index) {
 
-					typeArr.forEach((item, index) => {
+					let newArr = [];
+					this.imgArr.forEach((item, index) => {
 						if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
 							item.substring(item.length - 4) == 'jpeg') {
 							newArr.push(item)
@@ -419,32 +303,20 @@
 					})
 
 				},
-				remove(index, e) {
+				remove(index) {
 
 					uni.showModal({
 						title: '提示',
 						content: '是否删除该图片或视频',
 						success: (res) => {
 							if (res.confirm) {
-
-								if (e == 'Box') {
-									this.imgBoxArr.splice(index, 1)
-								} else if (e == 'Sfht') {
-									this.imgSfhtArr.splice(index, 1)
-								} else if (e == 'Fljd') {
-									this.imgFljdArr.splice(index, 1)
-								} else if (e == 'Dtlj') {
-									this.imgDtljArr.splice(index, 1)
-								} else if (e == 'Hldmyh') {
-									this.imgHldmyhArr.splice(index, 1)
-								}
-
+								this.imgArr.splice(index, 1)
 
 							}
 						}
 					})
 				},
-				choose(e) {
+				choose() {
 
 
 					uni.showActionSheet({
@@ -452,14 +324,14 @@
 						itemList: ['图片', '视频'],
 						success: (res) => {
 							if (res.tapIndex == 0) {
-								this.chooseimage(e)
+								this.chooseimage()
 							} else {
-								this.choosevideo(e)
+								this.choosevideo()
 							}
 						}
 					})
 				},
-				chooseimage(e) {
+				chooseimage() {
 
 					let _this = this;
 					uni.chooseImage({
@@ -480,18 +352,7 @@
 											_this.$modal.msg(data.msg)
 										} else {
 											if (_this.progress === 100) {
-												if (e == 'Box') {
-													_this.imgBoxArr.push(data.data.url)
-												} else if (e == 'Sfht') {
-													_this.imgSfhtArr.push(data.data.url)
-												} else if (e == 'Fljd') {
-													_this.imgFljdArr.push(data.data.url)
-												} else if (e == 'Dtlj') {
-													_this.imgDtljArr.push(data.data.url)
-												} else if (e == 'Hldmyh') {
-													_this.imgHldmyhArr.push(data.data.url)
-												}
-
+												_this.imgArr.push(data.data.url)
 												_this.$modal.msg('上传成功!')
 											}
 										}
@@ -524,7 +385,7 @@
 					})
 				},
 
-				choosevideo(e) {
+				choosevideo() {
 					let _this = this;
 					uni.chooseVideo({
 						sourceType: ['album', 'camera'],
@@ -544,17 +405,7 @@
 									} else {
 										//上传成功
 										if (_this.progress === 100) {
-											if (e == 'Box') {
-												_this.imgBoxArr.push(data.data.url)
-											} else if (e == 'Sfht') {
-												_this.imgSfhtArr.push(data.data.url)
-											} else if (e == 'Fljd') {
-												_this.imgFljdArr.push(data.data.url)
-											} else if (e == 'Dtlj') {
-												_this.imgDtljArr.push(data.data.url)
-											} else if (e == 'Hldmyh') {
-												_this.imgHldmyhArr.push(data.data.url)
-											}
+											_this.imgArr.push(data.data.url)
 											_this.$modal.msg('上传成功!')
 										}
 									}
@@ -783,24 +634,8 @@
 
 
 
-					if (this.imgBoxArr.length <= 0) {
-						this.$modal.msg('请上传调压箱名牌照片')
-						return
-					}
-					if (this.imgSfhtArr.length <= 0) {
-						this.$modal.msg('请上传调压箱内石粉回填照片')
-						return
-					}
-					if (this.imgFljdArr.length <= 0) {
-						this.$modal.msg('请上传调压箱防雷接地照片')
-						return
-					}
-					if (this.imgDtljArr.length <= 0) {
-						this.$modal.msg('请上传调压箱底腿连接照片')
-						return
-					}
-					if (this.imgHldmyhArr.length <= 0) {
-						this.$modal.msg('请上传调压箱护栏及地面硬化(远景)照片')
+					if (this.imgArr.length <= 0) {
+						this.$modal.msg('请上传照片')
 						return
 					}
 
@@ -841,11 +676,7 @@
 
 								constructTime: this.time, //施工时间
 								remark: this.projectContent, //施工内容
-								boxBrand: this.imgBoxArr,
-								stonePowder: this.imgSfhtArr,
-								lightning: this.imgFljdArr,
-								bottomLeg: this.imgDtljArr,
-								groundHardening: this.imgHldmyhArr,
+								zEngiineeringPhotoBoList: this.imgArr,
 
 							}
 

+ 15 - 22
pages/work/index.vue

@@ -302,18 +302,10 @@ border-radius: 50%; margin-right: 20rpx;">旧</view>
 
 				} else if (e.dictValue == 'pressure_regulating') {
 					//调压柜
-					const obj = {
-						enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
-						enginType: this.enginType, //旧改 还是新建  写死
-						enginClassification: this.enginClassification //室内  庭院  架空
-
-					};
-					console.log("===", obj)
-					uni.navigateTo({
-						url: '/pages/surge_tank/surge_tank?params=' + encodeURIComponent(JSON
-							.stringify(
-								obj))
-					})
+					getDicts("gy_tyg").then(response => {
+						this.typeList = response.data;
+					});
+					this.handleShowSheet();
 				}
 
 			},
@@ -373,17 +365,11 @@ border-radius: 50%; margin-right: 20rpx;">旧</view>
 					})
 				} else if (e.dictValue == 'pressure_regulating') {
 					//调压柜
-					const obj = {
-						enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
-						enginType: this.enginType, //旧改 还是新建  写死
-						enginClassification: this.enginClassification //室内  庭院  架空
+					getDicts("gy_tyg").then(response => {
+						this.typeList = response.data;
+					});
+					this.handleShowSheet();
 
-					};
-					uni.navigateTo({
-						url: '/pages/surge_tank/surge_tank?params=' + encodeURIComponent(JSON
-							.stringify(
-								obj))
-					})
 				}
 
 			},
@@ -438,6 +424,13 @@ border-radius: 50%; margin-right: 20rpx;">旧</view>
 										obj))
 							})
 						}
+					} else {
+						//调压柜
+						uni.navigateTo({
+							url: '/pages/surge_tank/surge_tank?params=' + encodeURIComponent(JSON
+								.stringify(
+									obj))
+						})
 					}
 				} else if (this.projectType == 'ShiZheng') {
 					let obj = {