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

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

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

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

Loading…
Cancel
Save