Commit 632f359f authored by 罗超's avatar 罗超

1

parent 83b16c6a
...@@ -375,9 +375,11 @@ ...@@ -375,9 +375,11 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<span class="backInfo_Title">附件:</span> <span class="backInfo_Title"
>附件:<span v-if="fj.length === 0"></span></span
>
</div> </div>
<div class="row flex"> <div class="row flex" v-if="fj.length > 0">
<div class="_addUpload_box clearfix flex"> <div class="_addUpload_box clearfix flex">
<template v-for="(item, index) in fj"> <template v-for="(item, index) in fj">
<div <div
...@@ -399,7 +401,7 @@ ...@@ -399,7 +401,7 @@
<span <span
v-if="item.type === 3" v-if="item.type === 3"
class="" class=""
@click="showUpLoadFile(item)" @click="downloadFile(item)"
>{{ item.url }}</span >{{ item.url }}</span
> >
</div> </div>
...@@ -640,9 +642,11 @@ export default { ...@@ -640,9 +642,11 @@ export default {
EmployeeList: [], EmployeeList: [],
AllemployeeList: [], AllemployeeList: [],
tempPeople: [], //抄送人数组 tempPeople: [], //抄送人数组
//附件---s
picIsShow: false, picIsShow: false,
picObj: [], picObj: [],
initialIndex: 0, initialIndex: 0,
//附件---e
}; };
}, },
computed: { computed: {
...@@ -651,7 +655,6 @@ export default { ...@@ -651,7 +655,6 @@ export default {
let fjlist = this.setingObj.ReceiptFileList; let fjlist = this.setingObj.ReceiptFileList;
fjlist.map((item) => { fjlist.map((item) => {
let suffix = item.split(".")[item.split(".").length - 1].toUpperCase(); let suffix = item.split(".")[item.split(".").length - 1].toUpperCase();
console.log(653, item.split("."));
if ("DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF|TXT".indexOf(suffix) != "-1") { if ("DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF|TXT".indexOf(suffix) != "-1") {
let obj = { let obj = {
url: item, url: item,
...@@ -817,7 +820,7 @@ export default { ...@@ -817,7 +820,7 @@ export default {
this.picObj.push(i.url); this.picObj.push(i.url);
this.picIsShow = true; this.picIsShow = true;
} else { } else {
if (i.suffix == "PDF") { if (i.suffix == "PDF" || i.suffix == "TXT") {
this.previewPDF(i.url); this.previewPDF(i.url);
} else { } else {
window.open( window.open(
...@@ -826,6 +829,12 @@ export default { ...@@ -826,6 +829,12 @@ export default {
} }
} }
}, },
downloadFile(i) {
const a = document.createElement("a");
a.setAttribute("download", "");
a.setAttribute("href", i.url);
a.click();
},
}, },
}; };
</script> </script>
...@@ -586,7 +586,7 @@ ...@@ -586,7 +586,7 @@
<span <span
v-if="item.type === 3" v-if="item.type === 3"
class="" class=""
@click="showUpLoadFile(item)" @click="downloadFile(item)"
>{{ item.url }}</span >{{ item.url }}</span
> >
</div> </div>
...@@ -1084,7 +1084,7 @@ export default { ...@@ -1084,7 +1084,7 @@ export default {
this.picObj.push(i.url); this.picObj.push(i.url);
this.picIsShow = true; this.picIsShow = true;
} else { } else {
if (i.suffix == "PDF") { if (i.suffix == "PDF" || i.suffix == "TXT") {
this.previewPDF(i.url); this.previewPDF(i.url);
} else { } else {
window.open( window.open(
...@@ -1093,6 +1093,12 @@ export default { ...@@ -1093,6 +1093,12 @@ export default {
} }
} }
}, },
downloadFile(i) {
const a = document.createElement("a");
a.setAttribute("download", "");
a.setAttribute("href", i.url);
a.click();
},
}, },
}; };
</script> </script>
This diff is collapsed.
...@@ -396,9 +396,11 @@ ...@@ -396,9 +396,11 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<span class="backInfo_Title">附件:</span> <span class="backInfo_Title"
>附件:<span v-if="fj.length === 0"></span></span
>
</div> </div>
<div class="row flex"> <div class="row flex" v-if="fj.length > 0">
<div class="_addUpload_box clearfix flex"> <div class="_addUpload_box clearfix flex">
<template v-for="(item, index) in fj"> <template v-for="(item, index) in fj">
<div <div
...@@ -659,9 +661,11 @@ export default { ...@@ -659,9 +661,11 @@ export default {
EmployeeList: [], EmployeeList: [],
AllemployeeList: [], AllemployeeList: [],
tempPeople: [], //抄送人数组 tempPeople: [], //抄送人数组
//附件---s
picIsShow: false, picIsShow: false,
picObj: [], picObj: [],
initialIndex: 0, initialIndex: 0,
//附件---e
}; };
}, },
computed: { computed: {
...@@ -670,7 +674,6 @@ export default { ...@@ -670,7 +674,6 @@ export default {
let fjlist = this.setingObj.ReceiptFileList; let fjlist = this.setingObj.ReceiptFileList;
fjlist.map((item) => { fjlist.map((item) => {
let suffix = item.split(".")[item.split(".").length - 1].toUpperCase(); let suffix = item.split(".")[item.split(".").length - 1].toUpperCase();
console.log(653, item.split("."));
if ("DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF|TXT".indexOf(suffix) != "-1") { if ("DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF|TXT".indexOf(suffix) != "-1") {
let obj = { let obj = {
url: item, url: item,
......
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
<span <span
v-if="item.type === 3" v-if="item.type === 3"
class="" class=""
@click="showUpLoadFile(item)" @click="downloadFile(item)"
>{{ item.url }}</span >{{ item.url }}</span
> >
</div> </div>
...@@ -842,7 +842,7 @@ export default { ...@@ -842,7 +842,7 @@ export default {
this.picObj.push(i.url); this.picObj.push(i.url);
this.picIsShow = true; this.picIsShow = true;
} else { } else {
if (i.suffix == "PDF") { if (i.suffix == "PDF" || i.suffix == "TXT") {
this.previewPDF(i.url); this.previewPDF(i.url);
} else { } else {
window.open( window.open(
...@@ -851,6 +851,12 @@ export default { ...@@ -851,6 +851,12 @@ export default {
} }
} }
}, },
downloadFile(i) {
const a = document.createElement("a");
a.setAttribute("download", "");
a.setAttribute("href", i.url);
a.click();
},
}, },
}; };
</script> </script>
...@@ -182,9 +182,11 @@ export default { ...@@ -182,9 +182,11 @@ export default {
}, },
}, },
saveMsg: [], saveMsg: [],
//附件---s
picIsShow: false, picIsShow: false,
picObj: [], picObj: [],
initialIndex: 0, initialIndex: 0,
//附件---e
}; };
}, },
mounted() { mounted() {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment