|
@@ -325,22 +325,28 @@
|
|
|
<view class="uni-list">
|
|
|
<view class="align-items" style="margin-bottom: 20px;">
|
|
|
<view class="container" style="color: gainsboro;">*请上传文件</view>
|
|
|
- <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
|
|
|
+ <view>
|
|
|
+ <!-- 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 style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
|
|
|
{{item.fileName}}
|
|
|
- <image :src="item.picUrl" mode=""
|
|
|
+ <image
|
|
|
+ v-if="item.picUrl.substring(item.picUrl.length - 3) == 'png' || item.picUrl.substring(item.picUrl.length - 3) == 'jpg' || item.picUrl.substring(item.picUrl.length - 4) == 'jpeg' "
|
|
|
+ :src="item.picUrl" @click="this.showPhoto(index,fileArr)" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
|
|
|
+ </image>
|
|
|
+ <video v-else-if="item.picUrl.substring(item.picUrl.length - 3) == 'mp4'" :src="item.picUrl"
|
|
|
+ style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
|
|
|
+ </video>
|
|
|
+ <image v-else :src="item.picUrl"
|
|
|
style="width: 100rpx; height: 100rpx; margin: 0 12rpx;">
|
|
|
</image>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
<view v-if="isShowRemoveFile(item)" @click="removeFile(index)"
|
|
|
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>
|
|
@@ -401,6 +407,14 @@
|
|
|
isEmpty(str) {
|
|
|
return (!str || 0 === str.length);
|
|
|
},
|
|
|
+ showPhoto(index, list) {
|
|
|
+ console.log("index:"+index+"_list:"+list)
|
|
|
+ uni.previewImage({
|
|
|
+ current: index,
|
|
|
+ urls: list,
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
pickerShow(e) {
|
|
|
if (e == 'name') {
|
|
|
this.open = true;
|
|
@@ -429,10 +443,10 @@
|
|
|
this.isNeedSupport = this.projectObj.needSupport == "1";
|
|
|
if (this.isNeedSupport) {
|
|
|
this.needSupportText = "是";
|
|
|
- this.projectObj.needSupport="1";
|
|
|
+ this.projectObj.needSupport = "1";
|
|
|
} else {
|
|
|
this.needSupportText = "否";
|
|
|
- this.projectObj.needSupport="0";
|
|
|
+ this.projectObj.needSupport = "0";
|
|
|
}
|
|
|
|
|
|
this.isBushing = this.projectObj.casingPresent == "1";
|
|
@@ -475,7 +489,7 @@
|
|
|
uni.chooseMessageFile({
|
|
|
// sizeType: ['album', 'camera'],
|
|
|
type: 'all',
|
|
|
- extension: ['dwg', 'dwt', 'doc', 'docx', 'xls', 'xlsx', 'jpg', 'png', 'jpeg', 'mp4'],
|
|
|
+ // extension: ['dwg', 'dwt', 'doc', 'docx', 'xls', 'xlsx', 'jpg', 'png', 'jpeg', 'mp4'],
|
|
|
success(resp) {
|
|
|
resp.tempFiles.forEach((item, index) => {
|
|
|
const task = uni.uploadFile({
|
|
@@ -536,14 +550,10 @@
|
|
|
},
|
|
|
})
|
|
|
},
|
|
|
- isShowRemoveFile(item){
|
|
|
- var isShow=item.createBy==this.$user.name;
|
|
|
- console.log("isShow:"+isShow)
|
|
|
- if(isShow){
|
|
|
- return true;
|
|
|
- }else{
|
|
|
- return false;
|
|
|
- }
|
|
|
+ isShowRemoveFile(item) {
|
|
|
+ var isShow = item.createBy == this.$user.state.name;
|
|
|
+ console.log("isShow:" + isShow + "_name:" + this.$user.state.name + "_createBy:" + item.createBy)
|
|
|
+ return isShow;
|
|
|
},
|
|
|
removeFile(index) {
|
|
|
uni.showModal({
|
|
@@ -681,7 +691,7 @@
|
|
|
}
|
|
|
this.projectObj.enginTime = this.projectTime;
|
|
|
this.projectObj.pics = this.fileArr;
|
|
|
-
|
|
|
+
|
|
|
updateDangerousWorkProject(this.projectObj).then(res => {
|
|
|
this.$modal.msg(res.msg);
|
|
|
uni.navigateBack();
|