|
@@ -124,8 +124,7 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
- <view v-else
|
|
|
- @click="chooseModel(item.picUrl,item.fileName)">
|
|
|
+ <view v-else @click="chooseModel(item.picUrl,item.fileName)">
|
|
|
{{item.fileName}}
|
|
|
</view>
|
|
|
</view>
|
|
@@ -191,15 +190,17 @@
|
|
|
<image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="container" style="border-bottom: 1px solid #f8f8f8;">
|
|
|
<text>米 数</text>
|
|
|
<view style="display: flex; justify-content: right; width: 70%;">
|
|
|
- <input class="uni-input" type="number" v-model="a.sl.inputIntegerNumberValue" 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" v-model="a.sl.inputDecimalNumberValue" maxlength="1"
|
|
|
- style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
|
|
|
+ <input class="uni-input" type="number" v-model="a.sl.inputIntegerNumberValue"
|
|
|
+ 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" v-model="a.sl.inputDecimalNumberValue"
|
|
|
+ maxlength="1"
|
|
|
+ style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
<button v-if="index!=0" @click="this.czggslList.splice(index,1)" class="sc-btn">删除</button>
|
|
@@ -211,31 +212,141 @@
|
|
|
|
|
|
</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()"></image>
|
|
|
- <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.picUrl.substring(item.picUrl.length-4)=='jpeg' ">
|
|
|
- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
|
|
|
- @click="showPhoto(index)">
|
|
|
- </image>
|
|
|
+
|
|
|
+
|
|
|
+ <view v-if="objValue.value=='沟上施工'">
|
|
|
+ <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('hj')"
|
|
|
+ v-show="reviewStatus!='1'"></image>
|
|
|
+ <view v-for="(item,index) in imgHjArr" :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,'hj')">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="remove(index,'hj')"
|
|
|
+ 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 v-else>
|
|
|
- <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </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('ff')"
|
|
|
+ v-show="reviewStatus!='1'"></image>
|
|
|
+ <view v-for="(item,index) in imgFfArr" :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,'ff')">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="remove(index,'ff')"
|
|
|
+ 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 @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>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <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('gdxg')"
|
|
|
+ v-show="reviewStatus!='1'"></image>
|
|
|
+ <view v-for="(item,index) in imgGdxgArr" :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,'gdxg')">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="remove(index,'gdxg')"
|
|
|
+ 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('jsdps')"
|
|
|
+ v-show="reviewStatus!='1'"></image>
|
|
|
+ <view v-for="(item,index) in imgJspsArr" :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,'jsdps')">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <video :src="item"
|
|
|
+ style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="remove(index,'jsdps')"
|
|
|
+ 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('ht')"
|
|
|
+ v-show="reviewStatus!='1'"></image>
|
|
|
+ <view v-for="(item,index) in imgHtArr" :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,'ht')">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view v-else>
|
|
|
+ <video :src="item"
|
|
|
+ style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
|
+ </view>
|
|
|
+ <view @click="remove(index,'ht')"
|
|
|
+ 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 class="action-btn">
|
|
|
<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
|
|
|
</view>
|
|
@@ -327,6 +438,13 @@
|
|
|
selectList: [],
|
|
|
dictOptions: [],
|
|
|
imgArr: [],
|
|
|
+
|
|
|
+ imgHjArr: [],
|
|
|
+ imgFfArr: [],
|
|
|
+ imgGdxgArr: [],
|
|
|
+ imgJspsArr: [],
|
|
|
+ imgHtArr: [],
|
|
|
+
|
|
|
fileArr: [],
|
|
|
fileNameArr: [],
|
|
|
type: '',
|
|
@@ -358,7 +476,8 @@
|
|
|
onLoad(options) {
|
|
|
if ('params' in options) {
|
|
|
this.objValue = JSON.parse(decodeURIComponent(options.params));
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -458,41 +577,76 @@
|
|
|
|
|
|
},
|
|
|
|
|
|
- showPhoto(index) {
|
|
|
+ showPhoto(index, e) {
|
|
|
+ let typeArr = [];
|
|
|
+ let newArr = [];
|
|
|
+
|
|
|
+ if (e == 'hj') {
|
|
|
+ typeArr = this.imgHjArr;
|
|
|
+ } else if (e == 'ff') {
|
|
|
+ typeArr = this.imgFfArr;
|
|
|
+ } else if (e == 'gdxg') {
|
|
|
+ typeArr = this.imgGdxgArr;
|
|
|
+ } else if (e == 'jsdps') {
|
|
|
+ typeArr = this.imgJspsArr;
|
|
|
+ } else if (e == 'ht') {
|
|
|
+ typeArr = this.imgHtArr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ 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') {
|
|
|
+ newArr.push(item)
|
|
|
+ }
|
|
|
+ });
|
|
|
uni.previewImage({
|
|
|
current: index,
|
|
|
- urls: this.imgArr,
|
|
|
+ urls: newArr,
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
- remove(index) {
|
|
|
+ remove(index, e) {
|
|
|
+ let _this = this;
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '是否删除该图片或视频?',
|
|
|
success: (res) => {
|
|
|
if (res.confirm) {
|
|
|
- this.imgArr.splice(index, 1)
|
|
|
-
|
|
|
+ //this.imgArr.splice(index, 1)
|
|
|
+ if (e == 'hj') {
|
|
|
+ _this.imgHjArr.splice(index, 1)
|
|
|
+ } else if (e == 'ff') {
|
|
|
+ _this.imgFfArr.splice(index, 1)
|
|
|
+ } else if (e == 'gdxg') {
|
|
|
+ _this.imgGdxgArr.splice(index, 1)
|
|
|
+ } else if (e == 'jsdps') {
|
|
|
+ _this.imgJspsArr.splice(index, 1)
|
|
|
+ } else if (e == 'ht') {
|
|
|
+ _this.imgHtArr.splice(index, 1)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- choose() {
|
|
|
+ choose(e) {
|
|
|
let _this = this;
|
|
|
uni.showActionSheet({
|
|
|
title: '上传',
|
|
|
itemList: ['图片', '视频'],
|
|
|
success: (res) => {
|
|
|
if (res.tapIndex == 0) {
|
|
|
- this.chooseimage()
|
|
|
+ this.chooseimage(e)
|
|
|
} else {
|
|
|
- this.choosevideo()
|
|
|
+ this.choosevideo(e)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- chooseimage() {
|
|
|
+ chooseimage(e) {
|
|
|
|
|
|
let _this = this;
|
|
|
uni.chooseImage({
|
|
@@ -507,13 +661,23 @@
|
|
|
header: _this.headers,
|
|
|
|
|
|
success: res => {
|
|
|
-
|
|
|
+
|
|
|
let data = JSON.parse(res.data);
|
|
|
if (![200].includes(data.code)) {
|
|
|
_this.$modal.msg(data.msg)
|
|
|
} else {
|
|
|
if (_this.progress === 100) {
|
|
|
- _this.imgArr.push(data.data.url)
|
|
|
+ if (e == 'hj') {
|
|
|
+ _this.imgHjArr.push(data.data.url)
|
|
|
+ } else if (e == 'ff') {
|
|
|
+ _this.imgFfArr.push(data.data.url)
|
|
|
+ } else if (e == 'gdxg') {
|
|
|
+ _this.imgGdxgArr.push(data.data.url)
|
|
|
+ } else if (e == 'jsdps') {
|
|
|
+ _this.imgJspsArr.push(data.data.url)
|
|
|
+ } else if (e == 'ht') {
|
|
|
+ _this.imgHtArr.push(data.data.url)
|
|
|
+ }
|
|
|
_this.$modal.msg('上传成功!')
|
|
|
}
|
|
|
}
|
|
@@ -545,7 +709,7 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- choosevideo() {
|
|
|
+ choosevideo(e) {
|
|
|
let _this = this;
|
|
|
uni.chooseVideo({
|
|
|
sourceType: ['album', 'camera'],
|
|
@@ -565,7 +729,17 @@
|
|
|
} else {
|
|
|
//上传成功
|
|
|
if (_this.progress === 100) {
|
|
|
- _this.imgArr.push(data.data.url)
|
|
|
+ if (e == 'hj') {
|
|
|
+ _this.imgHjArr.push(data.data.url)
|
|
|
+ } else if (e == 'ff') {
|
|
|
+ _this.imgFfArr.push(data.data.url)
|
|
|
+ } else if (e == 'gdxg') {
|
|
|
+ _this.imgGdxgArr.push(data.data.url)
|
|
|
+ } else if (e == 'jsdps') {
|
|
|
+ _this.imgJspsArr.push(data.data.url)
|
|
|
+ } else if (e == 'ht') {
|
|
|
+ _this.imgHtArr.push(data.data.url)
|
|
|
+ }
|
|
|
_this.$modal.msg('上传成功!')
|
|
|
}
|
|
|
}
|
|
@@ -802,7 +976,7 @@
|
|
|
throw new Error('End Loop')
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
if (this.isEmpty(list.sl.inputIntegerNumberValue)) {
|
|
|
this.$modal.msg("请输入米数")
|
|
@@ -815,9 +989,32 @@
|
|
|
if (e.message === 'End Loop') throw e
|
|
|
}
|
|
|
|
|
|
- if (this.imgArr.length <= 0) {
|
|
|
- this.$modal.msg('请上传照片或视频')
|
|
|
- return
|
|
|
+ // if (this.imgArr.length <= 0) {
|
|
|
+ // this.$modal.msg('请上传照片或视频')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ if (this.objValue.value == '沟上施工') {
|
|
|
+ if (this.imgHjArr.length <= 0) {
|
|
|
+ this.$modal.msg('请上传焊接照片')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.imgFfArr.length <= 0) {
|
|
|
+ this.$modal.msg('请上传防腐照片')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.imgGdxgArr.length <= 0) {
|
|
|
+ this.$modal.msg('请上传管道下沟照片')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.imgJspsArr.length <= 0) {
|
|
|
+ this.$modal.msg('请上传警示带铺设照片')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.imgHtArr.length <= 0) {
|
|
|
+ this.$modal.msg('请上传回填照片')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
if (this.loading == false) {
|
|
|
this.$modal.msg('照片或视频未上传完毕,无法提交!')
|
|
@@ -828,7 +1025,8 @@
|
|
|
this.zEngineeringMaterialBo.push({
|
|
|
materialQuality: list.cz.id,
|
|
|
specifications: list.gg.id,
|
|
|
- number: list.sl.inputIntegerNumberValue + (list.sl.inputDecimalNumberValue == '' ?
|
|
|
+ number: list.sl.inputIntegerNumberValue + (list.sl.inputDecimalNumberValue ==
|
|
|
+ '' ?
|
|
|
'' : "." + list.sl.inputDecimalNumberValue)
|
|
|
})
|
|
|
})
|