|
@@ -114,16 +114,24 @@
|
|
|
<view class="align-items" style="margin-bottom: 20px;">
|
|
|
<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
|
|
|
<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}}
|
|
|
|
|
|
- </view>
|
|
|
- <view @click="removeFile(index)" v-if="this.$user.state.name==this.createBy"
|
|
|
- style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
|
|
|
- <image src="../../static/images/icon_close.png" style=" width: 15px; height: 15px;">
|
|
|
+ <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 v-else style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
|
|
|
+ @click="chooseModel(item.picUrl,item.fileName)">
|
|
|
+ {{item.fileName}}
|
|
|
+ </view>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
@@ -269,7 +277,6 @@
|
|
|
getToken
|
|
|
} from '../../utils/auth';
|
|
|
|
|
|
- import storage from '../../utils/storage';
|
|
|
export default {
|
|
|
components: {
|
|
|
SelectPicker,
|
|
@@ -281,12 +288,6 @@
|
|
|
|
|
|
|
|
|
return {
|
|
|
- user: {
|
|
|
- nickName: "",
|
|
|
- phonenumber: "",
|
|
|
- email: "",
|
|
|
- sex: ""
|
|
|
- },
|
|
|
historyList: {}, //历史数据
|
|
|
show_loding: false,
|
|
|
popupText: '', //对话框内容
|
|
@@ -324,6 +325,7 @@
|
|
|
dictOptions: [],
|
|
|
imgArr: [],
|
|
|
fileArr: [],
|
|
|
+ fileImageArr: [],
|
|
|
fileNameArr: [],
|
|
|
type: '',
|
|
|
jlPhoneValue: '', //监理电话
|
|
@@ -343,7 +345,6 @@
|
|
|
enginId: '', //工程id
|
|
|
createTime: '',
|
|
|
infonId: '', //info id
|
|
|
- createBy: '',
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -373,13 +374,6 @@
|
|
|
methods: {
|
|
|
//判断是否选择
|
|
|
|
|
|
- // getUser() {
|
|
|
- // console.log("aaaa", this.$user.state.name)
|
|
|
- // getUserProfile().then(response => {
|
|
|
- // //this.user = response.data.user
|
|
|
- // console.log("dddd", response.data)
|
|
|
- // })
|
|
|
- // },
|
|
|
isEmpty(str) {
|
|
|
|
|
|
return (!str || 0 === str.length);
|
|
@@ -402,9 +396,8 @@
|
|
|
let h = time.getHours();
|
|
|
let mm = time.getMinutes();
|
|
|
let s = time.getSeconds();
|
|
|
- return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this
|
|
|
- .addTimes(
|
|
|
- mm) + ':' + this.addTimes(s);
|
|
|
+ return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this.addTimes(
|
|
|
+ mm) + ':' + this.addTimes(s);
|
|
|
|
|
|
|
|
|
},
|
|
@@ -453,11 +446,10 @@
|
|
|
this.open = true;
|
|
|
//请求
|
|
|
console.log("sss", this.objValue.value)
|
|
|
- getengineeringNameList(this.projectType.dictValue, "1", this.objValue.value).then(
|
|
|
- response => {
|
|
|
+ getengineeringNameList(this.projectType.dictValue, "1", this.objValue.value).then(response => {
|
|
|
|
|
|
- this.selectList = response.data;
|
|
|
- });
|
|
|
+ this.selectList = response.data;
|
|
|
+ });
|
|
|
|
|
|
|
|
|
}
|
|
@@ -466,7 +458,13 @@
|
|
|
|
|
|
},
|
|
|
|
|
|
+ showPhotoFile(index) {
|
|
|
+ uni.previewImage({
|
|
|
+ current: index,
|
|
|
+ urls: this.fileImageArr,
|
|
|
+ })
|
|
|
|
|
|
+ },
|
|
|
|
|
|
showPhoto(index) {
|
|
|
uni.previewImage({
|
|
@@ -475,20 +473,7 @@
|
|
|
})
|
|
|
|
|
|
},
|
|
|
- removeFile(index) {
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '是否删除该文件?',
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- this.fileArr.splice(index, 1)
|
|
|
- this.fileNameArr.splice(index, 1)
|
|
|
- console.log('this.fileArr', this.fileArr)
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
remove(index) {
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
@@ -545,8 +530,7 @@
|
|
|
_this.$modal.msg(data.msg)
|
|
|
} else {
|
|
|
if (_this.progress === 100) {
|
|
|
- console.log('_this.progress', _this
|
|
|
- .progress)
|
|
|
+ console.log('_this.progress', _this.progress)
|
|
|
//console.log('data----', data)data
|
|
|
console.log('res--', res)
|
|
|
_this.imgArr.push(data.data.url)
|
|
@@ -660,10 +644,10 @@
|
|
|
this.xmfzrValue = ''; //重置项目负责人
|
|
|
this.jsdwValue = ''; //重置建设单位
|
|
|
this.enginId = ''; //重置工程id
|
|
|
- this.fileArr = ''
|
|
|
+ this.fileArr = '';
|
|
|
+ this.fileImageArr = [];
|
|
|
this.createTime = '';
|
|
|
this.infonId = '';
|
|
|
- this.createBy = '';
|
|
|
|
|
|
},
|
|
|
changeSelect(item, index) {
|
|
@@ -694,7 +678,6 @@
|
|
|
uni.hideLoading();
|
|
|
console.log("res", response)
|
|
|
// this.enginList = response.data
|
|
|
- this.createBy = response.data.createBy;
|
|
|
this.jlPhoneValue = response.data.supervisionPhone; //监理电话
|
|
|
this.jlfzrValue = response.data.supervisionHead; //监理负责人
|
|
|
this.jldwValue = response.data.supervisionUnit; //监理单位
|
|
@@ -707,8 +690,16 @@
|
|
|
this.enginId = response.data.id; //工程id
|
|
|
this.fileArr = response.data.pics
|
|
|
this.createTime = response.data.createTime;
|
|
|
- this.infonId = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
|
|
|
- .id
|
|
|
+ this.infonId = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0].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)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
},
|