|
@@ -77,23 +77,26 @@
|
|
|
|
|
|
<view class="uni-list">
|
|
<view class="uni-list">
|
|
<view class="align-items" style="margin-bottom: 20px;">
|
|
<view class="align-items" style="margin-bottom: 20px;">
|
|
- <!-- <view class="container" style="color: gainsboro;">*请上传文件</view> -->
|
|
|
|
<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
|
|
<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
|
|
- <!-- <image src="/static/images/chooseimg.png" mode=""
|
|
|
|
- style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="chooseFile()"></image> -->
|
|
|
|
<view v-for="(item,index) in fileArr" :key="index" style="position: relative;">
|
|
<view v-for="(item,index) in fileArr" :key="index" style="position: relative;">
|
|
- <view style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
|
|
|
|
- @click="chooseModel(item.picUrl,item.fileName)">
|
|
|
|
- {{item.fileName}}
|
|
|
|
- <!-- <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
|
|
|
|
- </image> -->
|
|
|
|
|
|
|
|
|
|
+ <view
|
|
|
|
+ v-if="item.picUrl.substring(item.picUrl.length - 3) == 'png' || item.picUrl.substring(item.picUrl.length - 3) == 'jpg'||item.picUrl.substring(item.picUrl.length-3)=='jpeg' ">
|
|
|
|
+ <image v-if="fileImageArr.concat(item.picUrl)" :src="item.picUrl" mode=""
|
|
|
|
+ style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
|
|
|
|
+ @click="showPhotoFile(fileImageArr.indexOf(item.picUrl))">
|
|
|
|
+ </image>
|
|
|
|
+ </view>
|
|
|
|
+ <view v-else-if="item.picUrl.substring(item.picUrl.length - 3) == 'mp4'">
|
|
|
|
+ <video :src="item.picUrl"
|
|
|
|
+ style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <!-- <view @click="removeFile(index)"
|
|
|
|
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
|
|
|
|
- <uni-icons type="close" color="darkgray" size="18"></uni-icons>
|
|
|
|
- </view> -->
|
|
|
|
|
|
+
|
|
|
|
+ <view v-else style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
|
|
|
|
+ @click="chooseModel(item.picUrl,item.fileName)">
|
|
|
|
+ {{item.fileName}}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -125,7 +128,7 @@
|
|
<view>
|
|
<view>
|
|
施工时间
|
|
施工时间
|
|
</view>
|
|
</view>
|
|
- <view @click="openDatetimePicker()">
|
|
|
|
|
|
+ <view @click="openDatetimePicker()">
|
|
<span style="color: black;">{{time}}</span>
|
|
<span style="color: black;">{{time}}</span>
|
|
<image src="../../static/images/icon_right.png"
|
|
<image src="../../static/images/icon_right.png"
|
|
style=" position: absolute; width: 15px;height: 15px;"></image>
|
|
style=" position: absolute; width: 15px;height: 15px;"></image>
|
|
@@ -142,8 +145,7 @@
|
|
材 质
|
|
材 质
|
|
</view>
|
|
</view>
|
|
<view v-if="isNew==false">
|
|
<view v-if="isNew==false">
|
|
- <view v-if="this.isEmpty(this.materialValue.id)"
|
|
|
|
- @click="pickerShow('cz')">
|
|
|
|
|
|
+ <view v-if="this.isEmpty(this.materialValue.id)" @click="pickerShow('cz')">
|
|
<span style="color: darkgray;">请选择材质</span>
|
|
<span style="color: darkgray;">请选择材质</span>
|
|
<image src="../../static/images/icon_right.png"
|
|
<image src="../../static/images/icon_right.png"
|
|
style=" position: absolute; width: 15px;height: 15px;"></image>
|
|
style=" position: absolute; width: 15px;height: 15px;"></image>
|
|
@@ -168,13 +170,12 @@
|
|
规 格
|
|
规 格
|
|
</view>
|
|
</view>
|
|
<view v-if="isNew==false">
|
|
<view v-if="isNew==false">
|
|
- <view v-if="this.isEmpty(this.specificationValue.id)"
|
|
|
|
- @click="pickerShow('gg')">
|
|
|
|
|
|
+ <view v-if="this.isEmpty(this.specificationValue.id)" @click="pickerShow('gg')">
|
|
<span style="color: darkgray;">请选择规格</span>
|
|
<span style="color: darkgray;">请选择规格</span>
|
|
<image src="../../static/images/icon_right.png"
|
|
<image src="../../static/images/icon_right.png"
|
|
style=" position: absolute; width: 15px;height: 15px;"></image>
|
|
style=" position: absolute; width: 15px;height: 15px;"></image>
|
|
</view>
|
|
</view>
|
|
- <view v-else class="uni-list-cell-db" @click="pickerShow('gg')">
|
|
|
|
|
|
+ <view v-else class="uni-list-cell-db" @click="pickerShow('gg')">
|
|
<span style="color: black;">{{specificationValue.name}}</span>
|
|
<span style="color: black;">{{specificationValue.name}}</span>
|
|
<image src="../../static/images/icon_right.png"
|
|
<image src="../../static/images/icon_right.png"
|
|
style=" position: absolute; width: 15px;height: 15px;"></image>
|
|
style=" position: absolute; width: 15px;height: 15px;"></image>
|
|
@@ -215,8 +216,8 @@
|
|
</view>
|
|
</view>
|
|
<view @click="remove(index)"
|
|
<view @click="remove(index)"
|
|
style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
|
|
style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
|
|
- <image src="../../../static/images/icon_close.png"
|
|
|
|
- style=" width: 15px; height: 15px;"></image>
|
|
|
|
|
|
+ <image src="../../../static/images/icon_close.png" style=" width: 15px; height: 15px;">
|
|
|
|
+ </image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -285,6 +286,7 @@
|
|
dictOptions: [],
|
|
dictOptions: [],
|
|
imgArr: [],
|
|
imgArr: [],
|
|
fileArr: [],
|
|
fileArr: [],
|
|
|
|
+ fileImageArr: [],
|
|
loading: false,
|
|
loading: false,
|
|
specificationValue: {}, //规格
|
|
specificationValue: {}, //规格
|
|
materialValue: {}, //材质
|
|
materialValue: {}, //材质
|
|
@@ -365,6 +367,13 @@
|
|
closeDatetimePicker() {
|
|
closeDatetimePicker() {
|
|
this.$refs.myPicker.hide();
|
|
this.$refs.myPicker.hide();
|
|
},
|
|
},
|
|
|
|
+ showPhotoFile(index) {
|
|
|
|
+ uni.previewImage({
|
|
|
|
+ current: index,
|
|
|
|
+ urls: this.fileImageArr,
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
showPhoto(index) {
|
|
showPhoto(index) {
|
|
uni.previewImage({
|
|
uni.previewImage({
|
|
current: index,
|
|
current: index,
|
|
@@ -656,6 +665,7 @@
|
|
|
|
|
|
if (this.type == 'gcmc') {
|
|
if (this.type == 'gcmc') {
|
|
this.projectName = item;
|
|
this.projectName = item;
|
|
|
|
+ this.fileImageArr = [];
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: '加载中'
|
|
title: '加载中'
|
|
})
|
|
})
|
|
@@ -672,6 +682,15 @@
|
|
this.gcnrValue = res.data.enginContent; //工程内容
|
|
this.gcnrValue = res.data.enginContent; //工程内容
|
|
this.fileArr = res.data.pics;
|
|
this.fileArr = res.data.pics;
|
|
this.id = res.data.id;
|
|
this.id = res.data.id;
|
|
|
|
+ this.fileArr.forEach((list, index) => {
|
|
|
|
+ if (list.picUrl.substring(list.picUrl.length - 3) == 'png' || list.picUrl
|
|
|
|
+ .substring(list.picUrl.length - 3) == 'jpg' || list.picUrl.substring(list
|
|
|
|
+ .picUrl.length - 3) == 'jpeg') {
|
|
|
|
+ this.fileImageArr.push(list.picUrl)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
|
|
|