Parcourir la source

市政工程新增以及历史

zhanghongrui il y a 1 an
Parent
commit
6ef370be0f
4 fichiers modifiés avec 157 ajouts et 29 suppressions
  1. 126 16
      components/bottomSheet/bottomSheetMore.vue
  2. 1 1
      config.js
  3. 28 11
      pages/municipal/municipal.vue
  4. 2 1
      pages/work/index.vue

+ 126 - 16
components/bottomSheet/bottomSheetMore.vue

@@ -17,7 +17,7 @@
 
 							<view class="uni-media-list-text-top">
 								<view class="tit-text">施工时间:</view>
-								<view class="normal-text">{{value.constructTime}}</view>
+								<view class="normal-text">{{value.createTime}}</view>
 							</view>
 
 							<view class="uni-media-list-text-top">
@@ -72,13 +72,13 @@
 								</view>
 
 								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
-									<view v-for="(item,index) in value.constructionRecords
-" :key="index" style="position: relative;">
+									<view v-for="(item,index) in value.constructionRecords" :key="index"
+										style="position: relative;">
 										<view
 											v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'  || item.substring(item.length - 3) == 'jpeg'">
 											<image :src="item" mode=""
-												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;" @click="showPhoto(index,value.constructionRecords
-)">
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+												@click="showPhoto(index,value.constructionRecords)">
 											</image>
 										</view>
 										<view v-else>
@@ -153,6 +153,115 @@
 								</view>
 
 							</view>
+							<view v-else-if="title=='沟上施工'">
+								<view class="uni-common-mt" style="width: 100%;">
+									<text class="uni-title uni-common-pl" style=" font-size: 13px;color:
+											#000;margin-top: 5px;margin-left: 8px;">焊接照片:</text>
+								</view>
+								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+									<view v-for="(item,index) in value.welding" :key="index"
+										style="position: relative;">
+										<view
+											v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'  || item.substring(item.length - 3) == 'jpeg'">
+											<image :src="item" mode=""
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+												@click="showPhoto(index,value.welding)">
+											</image>
+										</view>
+										<view v-else>
+											<video :src="item"
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+										</view>
+									</view>
+								</view>
+
+								<view class="uni-common-mt" style="width: 100%;">
+									<text class="uni-title uni-common-pl" style=" font-size: 13px;color:
+											#000;margin-top: 5px;margin-left: 8px;">防腐照片:</text>
+								</view>
+								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+									<view v-for="(item,index) in value.aczoiling" :key="index"
+										style="position: relative;">
+										<view
+											v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'  || item.substring(item.length - 3) == 'jpeg'">
+											<image :src="item" mode=""
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+												@click="showPhoto(index,value.aczoiling)">
+											</image>
+										</view>
+										<view v-else>
+											<video :src="item"
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+										</view>
+									</view>
+								</view>
+
+
+							</view>
+							<view v-else-if="title=='沟下施工'">
+								<view class="uni-common-mt" style="width: 100%;">
+									<text class="uni-title uni-common-pl" style=" font-size: 13px;color:
+											#000;margin-top: 5px;margin-left: 8px;">管道下沟照片:</text>
+								</view>
+								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+									<view v-for="(item,index) in value.piping" :key="index" style="position: relative;">
+										<view
+											v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'  || item.substring(item.length - 3) == 'jpeg'">
+											<image :src="item" mode=""
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+												@click="showPhoto(index,value.piping)">
+											</image>
+										</view>
+										<view v-else>
+											<video :src="item"
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+										</view>
+									</view>
+								</view>
+
+								<view class="uni-common-mt" style="width: 100%;">
+									<text class="uni-title uni-common-pl" style=" font-size: 13px;color:
+											#000;margin-top: 5px;margin-left: 8px;">警示带铺设照片:</text>
+								</view>
+								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+									<view v-for="(item,index) in value.warning" :key="index"
+										style="position: relative;">
+										<view
+											v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'  || item.substring(item.length - 3) == 'jpeg'">
+											<image :src="item" mode=""
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+												@click="showPhoto(index,value.warning)">
+											</image>
+										</view>
+										<view v-else>
+											<video :src="item"
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+										</view>
+									</view>
+								</view>
+
+								<view class="uni-common-mt" style="width: 100%;">
+									<text class="uni-title uni-common-pl" style=" font-size: 13px;color:
+											#000;margin-top: 5px;margin-left: 8px;">回填照片:</text>
+								</view>
+								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+									<view v-for="(item,index) in value.backfilling" :key="index"
+										style="position: relative;">
+										<view
+											v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'  || item.substring(item.length - 3) == 'jpeg'">
+											<image :src="item" mode=""
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+												@click="showPhoto(index,value.backfilling)">
+											</image>
+										</view>
+										<view v-else>
+											<video :src="item"
+												style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+										</view>
+									</view>
+								</view>
+
+							</view>
 							<view v-else>
 								<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
 									<view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
@@ -218,25 +327,26 @@
 			// },
 
 			showPhoto(index, list) {
+				let newArr = [];
+				list.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)
+					}
+				});
 				uni.previewImage({
 					current: index,
-					urls: list,
+					urls: newArr,
 				})
 
 			},
 			getParamsData() {
 				var selectData = this.data;
 				this.outPutData = selectData;
-				//this.title = selectData.zEngineeringNodeBo.type;
-
-				//this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
-				if (this.TitleType == '市政工程') {
-					this.title = '市政工程';
-					this.historyList = selectData.zEngineeringNodeBoList[0].zEngineeringInfoBoList;
-				} else {
-					this.title = this.TitleType;
-					this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
-				}
+
+				this.title = this.TitleType;
+				this.historyList = selectData.zEngineeringNodeBo.zEngineeringInfoBoList;
+
 
 
 

+ 1 - 1
config.js

@@ -1,7 +1,7 @@
 // 应用全局配置
 module.exports = {
 	//baseUrl: 'https://www.xcx.cczdsz.cn/prod-api',
-	baseUrl: 'http://192.168.4.20:8080',
+	baseUrl: 'http://192.168.4.88:8080',
 	//baseUrl: 'http://192.168.4.23:8080',
 	//baseUrl: 'http://192.168.4.11:8080',
 	// baseUrl: 'http://192.168.4.14:8089',

+ 28 - 11
pages/municipal/municipal.vue

@@ -148,7 +148,7 @@
 					<view class="uni-list">
 						<view
 							style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
-							{{objValue.value}}
+							{{objValue.Label}}
 
 							<span
 								style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 10px;"
@@ -165,7 +165,17 @@
 							</view>
 						</view>
 
-
+						<view class="container" style="border-bottom: 1px solid #f8f8f8;">
+							<view class="uni-common-mt" style="width: 100%;">
+								<text class="uni-title uni-common-pl">施工内容</text>
+								<view style="width: 100%;box-sizing: border-box;">
+									<textarea class="textarea" placeholder="请输入施工内容" maxlength="255"
+										placeholder-style="padding: 10rpx;"
+										style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
+										auto-height v-model="projectContent"></textarea>
+								</view>
+							</view>
+						</view>
 
 
 						<view v-for="(a,index) in czggslList" :key="index" class="num-style">
@@ -212,9 +222,9 @@
 
 					</view>
 
-				
 
-					<view v-if="objValue.value=='沟上施工'">
+
+					<view v-if="objValue.Label=='沟上施工'">
 						<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;">
@@ -351,7 +361,7 @@
 				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 			</view>
 
-			<bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.value"></bottom-sheet>
+			<bottom-sheet ref="refShare" :data="historyList" :TitleType="objValue.Label"></bottom-sheet>
 			<yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
 				:time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
 			<!-- 下载提示页面 -->
@@ -594,7 +604,6 @@
 					}
 
 
-					console.log("===", typeArr);
 					typeArr.forEach((item, index) => {
 						if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
 							item.substring(item.length - 4) == 'jpeg') {
@@ -937,10 +946,11 @@
 						this.$modal.msg('请选择工程名称')
 						return
 					}
-					getEngineeringHistoryList(this.enginId, '').then(response => {
+					getEngineeringHistoryList(this.enginId, this.objValue.value).then(response => {
 
 						this.historyList = response.data
-						if (response.data.zEngineeringNodeBoList != null) {
+						if (response.data.zEngineeringNodeBo != null && response.data.zEngineeringNodeBo
+							.zEngineeringInfoBoList != '') {
 							this.$refs.refShare.handleShowShare();
 						} else {
 							this.$modal.msg("暂无历史信息")
@@ -993,7 +1003,7 @@
 					// 	this.$modal.msg('请上传照片或视频')
 					// 	return
 					// }
-					if (this.objValue.value == '沟上施工') {
+					if (this.objValue.Label == '沟上施工') {
 						if (this.imgHjArr.length <= 0) {
 							this.$modal.msg('请上传焊接照片')
 							return
@@ -1051,11 +1061,18 @@
 						//enginClassification: this.objValue.value, // 工程分类  上一页面传过来的
 						zEngineeringNodeBo: {
 							createTime: this.createTime,
-							type: '市政工程', // 写死
+							type: this.objValue.value,
 							zEngineeringInfoBo: {
+								remark: this.projectContent, //施工内容
 								//engInfoId: this.infonId,
 								constructTime: this.time, //施工时间
-								zEngiineeringPhotoBoList: this.imgArr, //照片集合
+								//zEngiineeringPhotoBoList: this.imgArr, //照片集合
+								welding: this.imgHjArr,
+								aczoiling: this.imgFfArr,
+								piping: this.imgGdxgArr,
+								warning: this.imgJspsArr,
+								backfilling: this.imgHtArr,
+
 								zEngineeringMaterialBo: this.zEngineeringMaterialBo // 用料对象
 							}
 						}

+ 2 - 1
pages/work/index.vue

@@ -432,7 +432,8 @@ border-radius: 50%; margin-right: 20rpx;">旧</view>
 					}
 				} else if (this.projectType == 'ShiZheng') {
 					let obj = {
-						value: item.dictLabel
+						Label: item.dictLabel,
+						value: item.dictValue
 					};
 					uni.navigateTo({
 						url: '/pages/municipal/municipal?params=' + encodeURIComponent(JSON