按单据登记和按发票登记的上传文件提示不一致,上传doc文件无法预览

dev
黄泽腾 2 years ago
parent 834626858f
commit 30557649ad

@ -680,12 +680,25 @@ export default {
this.$message.error('文件名异常!')
return false
}
if (this.inputQuery.licenseUrl.substr(index + 1) === 'doc') {
let doc = 'application/msword';
let binaryData = [];
previewFile(this.certFileUrl).then(res => {
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: doc}));
console.log(URL);
window.open(URL);
});
return false;
}
if (this.inputQuery.licenseUrl.substr(index + 1) === 'pdf') {
let pdf = 'application/pdf'
let binaryData = []
previewFile(this.certFileUrl).then(res => {
binaryData.push(res)
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}))
console.log(URL)
window.open(URL)
})
// window.open(this.imgList[0])

@ -125,7 +125,8 @@
:limit.sync="filterQuery.limit"
@pagination="getList"
/>
</el-card>
<!-- 忽略预警弹窗 -->
@ -207,7 +208,7 @@
</el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
@ -226,7 +227,7 @@ export default {
type: 1,
page: 1,
limit: 20,
certName:null
certName:null,
},
list: [],
total: 0,
@ -281,6 +282,7 @@ export default {
},
search() {
this.filterQuery.page = 1;
this.filterQuery.limit = 20;
this.getList();
},
getList() {
@ -288,13 +290,8 @@ export default {
getSupCertRemindMsgList(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.list = [];
this.total = 0;
}
})
.catch(() => {
this.loading = false;
@ -351,11 +348,12 @@ export default {
}
},
created() {
//
this.getList();
if(this.$store.getters.customerId == 110){
this.ckeck=true;
}
//
this.getList();
},
};
</script>

Loading…
Cancel
Save