|
@@ -128,6 +128,157 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view v-if="title=='下沟'">
|
|
|
+
|
|
|
+ <view class="cz-style" v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
|
|
|
+ <view class="uni-media-list-text-top" style=" ">
|
|
|
+ <view class="tit-text">材质:</view>
|
|
|
+
|
|
|
+ <view class="uni-list-cell-db" style="margin-top: 10;"
|
|
|
+ @click="pickerShow('cz',key,index)">
|
|
|
+ <span
|
|
|
+ style="color: black;">{{a.materialQualityName==''?'请选择材质':a.materialQualityName}}</span>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="uni-media-list-text-top" style=" ">
|
|
|
+ <view class="tit-text">规格:</view>
|
|
|
+ <view class="uni-list-cell-db" style="margin-top: 10;"
|
|
|
+ @click="pickerShow('gg',key,index)">
|
|
|
+ <span
|
|
|
+ style="color: black;">{{a.specificationsName==''?'请选择规格':a.specificationsName}}</span>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
|
|
|
+ <text class="tit-text">米 数</text>
|
|
|
+ <view style="display: flex; justify-content: right; width: 70%;">
|
|
|
+ <input class="uni-input" type="number" :value="getIntegerPart(a.number,0)"
|
|
|
+ @change="setInfoBoNumber(key,index,$event.target.value,0)" maxlength="6"
|
|
|
+ style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
|
|
|
+ <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
|
|
|
+
|
|
|
+ <input class="uni-input" type="number" :value="getIntegerPart(a.number,1)"
|
|
|
+ @change="setInfoBoNumber(key,index,$event.target.value,1)" maxlength="1"
|
|
|
+ style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <button v-if="index!=0" @click="btnDel(key,index)" class="sc-btn">删除</button>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <button @click="btnAdd(key,index)" class="tj-btn">添加</button>
|
|
|
+
|
|
|
+ <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;">
|
|
|
+ <image :src="loadImgSrc('updateimg.png')" mode=""
|
|
|
+ style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
|
|
|
+ @click="chooseType('gdsgjl',key)">
|
|
|
+ </image>
|
|
|
+ <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)">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="removeht(index,key,'gdsgjl')"
|
|
|
+ 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="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;">
|
|
|
+ <image :src="loadImgSrc('updateimg.png')" mode=""
|
|
|
+ style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
|
|
|
+ @click="chooseType('gspsdcl',key)">
|
|
|
+ </image>
|
|
|
+ <view v-for="(item,index) in value.ductalEpithelium" :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.ductalEpithelium)">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="removeht(index,key,'gspsdcl')"
|
|
|
+ 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="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;">
|
|
|
+ <image :src="loadImgSrc('updateimg.png')" mode=""
|
|
|
+ style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
|
|
|
+ @click="chooseType('ggyj',key)">
|
|
|
+ </image>
|
|
|
+ <view v-for="(item,index) in value.trenchProspect" :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.trenchProspect)">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="removeht(index,key,'ggyj')"
|
|
|
+ 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="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;">
|
|
|
+ <image :src="loadImgSrc('updateimg.png')" mode=""
|
|
|
+ style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; "
|
|
|
+ @click="chooseType('video',key)">
|
|
|
+ </image>
|
|
|
+ <view v-for="(item,index) in value.video" :key="index" style="position: relative;">
|
|
|
+
|
|
|
+ <view>
|
|
|
+ <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="removeht(index,key,'video')"
|
|
|
+ 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>
|
|
@@ -177,6 +328,7 @@
|
|
|
dictOptions: [],
|
|
|
openDict: false,
|
|
|
dataIndex: 0, //数据用第几条
|
|
|
+ selectIndex: 0, //材质规格用的第几条
|
|
|
imageIndex: 0,
|
|
|
headers: {
|
|
|
Authorization: "Bearer " + getToken()
|
|
@@ -190,7 +342,7 @@
|
|
|
enginClassValue: '',
|
|
|
selectList: [],
|
|
|
open: false,
|
|
|
- chooseType: '',
|
|
|
+ selectType: '',
|
|
|
hideButton: false,
|
|
|
}
|
|
|
},
|
|
@@ -216,11 +368,93 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //关闭弹窗
|
|
|
+ close(e) {
|
|
|
+ this.open = false
|
|
|
+ },
|
|
|
+ btnAdd(key, index) {
|
|
|
+
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.push({
|
|
|
+
|
|
|
+ 'materialQuality': '',
|
|
|
+ 'materialQualityName': '',
|
|
|
+ 'number': '',
|
|
|
+ 'specifications': '',
|
|
|
+ 'specificationsName': ''
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ btnDel(key, index) {
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.splice(index, 1);
|
|
|
+ },
|
|
|
+ pickerShow(e, index, indexTwo) {
|
|
|
+ this.dataIndex = index;
|
|
|
+ this.selectIndex = indexTwo; //材质规格 第几条
|
|
|
+ this.selectType = e;
|
|
|
+ if (e == 'cz') {
|
|
|
+ this.open = true;
|
|
|
+ getEnginMaterialQualityList("民用工程", this.enginType, this.enginClassification, this.title)
|
|
|
+ .then(response => {
|
|
|
+ this.selectList = response.data;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (e == 'gg') {
|
|
|
+ if (this.isEmpty(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
|
|
|
+ .zEngineeringMaterialBo[this.selectIndex].materialQuality)) {
|
|
|
+ this.$modal.msg('请选择材质')
|
|
|
+ } else {
|
|
|
+ this.open = true;
|
|
|
+ getEnginSpecificationsList(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
|
|
|
+ .zEngineeringMaterialBo[this.selectIndex].materialQuality).then(res => {
|
|
|
+ this.selectList = res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ changeSelect(item, index) {
|
|
|
+ this.open = false;
|
|
|
+ if (this.selectType == 'cz') {
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
|
|
|
+ .selectIndex]
|
|
|
+ .materialQuality = item.id;
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
|
|
|
+ .selectIndex]
|
|
|
+ .materialQualityName = item.name;
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
|
|
|
+ .selectIndex]
|
|
|
+ .specifications = '';
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
|
|
|
+ .selectIndex]
|
|
|
+ .specificationsName = '';
|
|
|
+
|
|
|
+
|
|
|
+ } else if (this.selectType == 'gg') {
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
|
|
|
+ .selectIndex]
|
|
|
+ .specifications = item.id;
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
|
|
|
+ .selectIndex]
|
|
|
+ .specificationsName = item.name;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 截取小数点前的字符串
|
|
|
+ getIntegerPart(numStr, i) {
|
|
|
+ return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
|
|
|
+ },
|
|
|
+ setInfoBoNumber(key, index, number, i) {
|
|
|
+ let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index]
|
|
|
+ .number;
|
|
|
+ let resAry = Ynumber.toString().split('.');
|
|
|
+ resAry[i] = number
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index].number = resAry
|
|
|
+ .join('.');
|
|
|
+ },
|
|
|
bindTextAreaBlur(e, index) {
|
|
|
|
|
|
this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].remark = e;
|
|
|
|
|
|
},
|
|
|
+
|
|
|
removeht(index, key, type) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
@@ -240,6 +474,26 @@
|
|
|
this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].photosAfter
|
|
|
.splice(index, 1)
|
|
|
|
|
|
+ } else if (type == 'gdsgjl') {
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
|
|
|
+ .constructionRecords
|
|
|
+ .splice(index, 1)
|
|
|
+ } else if (type == 'gspsdcl') {
|
|
|
+
|
|
|
+
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
|
|
|
+ .ductalEpithelium
|
|
|
+ .splice(index, 1)
|
|
|
+ } else if (type == 'ggyj') {
|
|
|
+
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
|
|
|
+ .trenchProspect
|
|
|
+ .splice(index, 1)
|
|
|
+ } else if (type == 'video') {
|
|
|
+
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
|
|
|
+ .video
|
|
|
+ .splice(index, 1)
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -261,6 +515,16 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ chooseType(type, index) {
|
|
|
+ this.dataIndex = index;
|
|
|
+ let _this = this;
|
|
|
+ if (type == 'video') {
|
|
|
+ this.choosevideo(type)
|
|
|
+ } else {
|
|
|
+ this.chooseimage(type)
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
choose(type, index) {
|
|
|
this.dataIndex = index;
|
|
|
let _this = this;
|
|
@@ -316,6 +580,24 @@
|
|
|
.zEngineeringInfoBoList[_this.dataIndex]
|
|
|
.photosAfter.push(data.data
|
|
|
.url);
|
|
|
+ } else if (e == 'gdsgjl') {
|
|
|
+
|
|
|
+ _this.dataJson.zEngineeringNodeBo
|
|
|
+ .zEngineeringInfoBoList[_this.dataIndex]
|
|
|
+ .constructionRecords.push(data.data
|
|
|
+ .url);
|
|
|
+ } else if (e == 'gspsdcl') {
|
|
|
+
|
|
|
+ _this.dataJson.zEngineeringNodeBo
|
|
|
+ .zEngineeringInfoBoList[_this.dataIndex]
|
|
|
+ .ductalEpithelium.push(data.data
|
|
|
+ .url);
|
|
|
+ } else if (e == 'ggyj') {
|
|
|
+
|
|
|
+ _this.dataJson.zEngineeringNodeBo
|
|
|
+ .zEngineeringInfoBoList[_this.dataIndex]
|
|
|
+ .trenchProspect.push(data.data
|
|
|
+ .url);
|
|
|
}
|
|
|
|
|
|
_this.$modal.msg('上传成功!')
|
|
@@ -385,6 +667,10 @@
|
|
|
_this.dataJson.zEngineeringNodeBo
|
|
|
.zEngineeringInfoBoList[_this.dataIndex]
|
|
|
.photosAfter.push(data.data.url);
|
|
|
+ } else if (e == 'video') {
|
|
|
+ _this.dataJson.zEngineeringNodeBo
|
|
|
+ .zEngineeringInfoBoList[_this.dataIndex]
|
|
|
+ .video.push(data.data.url);
|
|
|
}
|
|
|
_this.$modal.msg('上传成功!')
|
|
|
}
|
|
@@ -471,6 +757,39 @@
|
|
|
isSubmit = false;
|
|
|
}
|
|
|
})
|
|
|
+ } else if (this.title == '下沟') {
|
|
|
+ this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ res.zEngineeringMaterialBo.forEach((itme) => {
|
|
|
+ if (itme.specifications == '') {
|
|
|
+ this.$modal.msg("请选择规格");
|
|
|
+ isSubmit = false;
|
|
|
+ }
|
|
|
+ if (itme.number == '') {
|
|
|
+ this.$modal.msg("请输入米数");
|
|
|
+ isSubmit = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ if (res.constructionRecords.length <= 0) {
|
|
|
+ this.$modal.msg('请上传管道施工记录照片')
|
|
|
+ isSubmit = false;
|
|
|
+ }
|
|
|
+ if (res.ductalEpithelium.length <= 0) {
|
|
|
+ this.$modal.msg('请上传管上皮深度测量照片')
|
|
|
+ isSubmit = false;
|
|
|
+ }
|
|
|
+ if (res.trenchProspect.length <= 0) {
|
|
|
+ this.$modal.msg('请上传管沟远景照片')
|
|
|
+ isSubmit = false;
|
|
|
+ }
|
|
|
+ if (res.video.length <= 0) {
|
|
|
+ this.$modal.msg('请上传视频')
|
|
|
+ isSubmit = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
} else {
|
|
|
|
|
|
|
|
@@ -680,6 +999,30 @@
|
|
|
color: #333;
|
|
|
}
|
|
|
|
|
|
+ .tj-btn {
|
|
|
+ height: 69rpx;
|
|
|
+ background: #3184f0;
|
|
|
+ border-radius: 6rpx;
|
|
|
+ font-size: 25rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: 69rpx;
|
|
|
+ margin: 40rpx 70rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .sc-btn {
|
|
|
+ height: 69rpx;
|
|
|
+ background: #f0686b;
|
|
|
+ border-radius: 6rpx;
|
|
|
+ font-size: 25rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: 69rpx;
|
|
|
+ margin: 40rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
// .gesture-area {
|
|
|
// //加浮动弹窗
|
|
|
// width: 100%;
|