|
@@ -70,6 +70,19 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="titlebg2">
|
|
|
+ <view class="titlet1" ></view>
|
|
|
+ <view class="titlet2" >附件</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ <view v-for="(attachment, indexfj) in swiperList" :key="indexfj" style="margin-left: 20rpx;padding-bottom: 20rpx;">
|
|
|
+ <view @click="viewAttachment(attachment)" style="width: 100%;color: blue;">{{ attachment.name }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
<view style="height: 50rpx;background-color: white;"></view>
|
|
|
|
|
@@ -104,6 +117,7 @@
|
|
|
des3: '',
|
|
|
des4: '',
|
|
|
des6: '',
|
|
|
+ des7: '',
|
|
|
},
|
|
|
text1:'',
|
|
|
text2:'',
|
|
@@ -115,6 +129,7 @@
|
|
|
lyIndex: '',
|
|
|
showLYList: [],
|
|
|
showfx:false,
|
|
|
+ swiperList: [],
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -197,12 +212,61 @@
|
|
|
}) => {
|
|
|
|
|
|
this.setData(data);
|
|
|
+
|
|
|
+
|
|
|
+ let pics=this.inputForm.des7.split(",");
|
|
|
+ for (let j = 0; j < pics.length; j++) {
|
|
|
+ let aa=pics[j].split("&name=")
|
|
|
+ this.swiperList.push({
|
|
|
+ 'url': "http://47.97.69.114:8089/yd_qycpfbWeb"+pics[j],
|
|
|
+ 'uuid': pics[j],
|
|
|
+ 'name': aa[1]
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}).catch((e) => {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ viewAttachment(attachment) {
|
|
|
+ let aa=this.checkFileTypeByExtension(attachment.url);
|
|
|
+ if(aa=='Image'){
|
|
|
+ uni.previewImage({
|
|
|
+ urls: [attachment.url], // 图片链接列表
|
|
|
+ indicator: 'number', // 显示页码
|
|
|
+ loop: true // 是否循环播放
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.downloadFile(attachment.url);
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ checkFileTypeByExtension(url) {
|
|
|
+ const extension = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
|
|
|
+ if (['jpg', 'jpeg', 'png', 'gif'].includes(extension)) {
|
|
|
+ return 'Image';
|
|
|
+ } else if (['doc', 'docx', 'xls', 'xlsx', 'pdf'].includes(extension)) {
|
|
|
+ return 'Document';
|
|
|
+ } else {
|
|
|
+ return 'Unknown';
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ downloadFile(url) {
|
|
|
+
|
|
|
+ const a = document.createElement('a');
|
|
|
+ a.href = url; //filePath 这里的地址是 uni.downloadFile 中的返回值里的地址
|
|
|
+ let aa=url.split("&name=")
|
|
|
+ a.download = aa[1]; // 可以设置下载文件名,如果是空字符串,则使用服务器端设置的文件名
|
|
|
+ a.click();
|
|
|
+ },
|
|
|
+
|
|
|
|
|
|
//账号分享
|
|
|
sharezz(){
|