|
@@ -188,21 +188,37 @@ export default {
|
|
|
},
|
|
|
handlePreview(file) {
|
|
|
// console.log(file);
|
|
|
-
|
|
|
+ // return false
|
|
|
+ var item={
|
|
|
+ name:file.name,
|
|
|
+ suffix:'',
|
|
|
+ downLoad:true
|
|
|
+ }
|
|
|
var index = file.raw.type.lastIndexOf('/')
|
|
|
var type = file.raw.type.substring(index+1,file.raw.type.length)
|
|
|
var arr = ['png','jpeg','bmp','jpg']
|
|
|
if(arr.includes(type)){
|
|
|
- this.FileVisible = true
|
|
|
+ // this.FileVisible = true
|
|
|
this.FileUrl = URL.createObjectURL(file.raw)
|
|
|
- this.srcList = [URL.createObjectURL(file.raw)]
|
|
|
+ var isPicture = 1
|
|
|
+ // this.srcList = [URL.createObjectURL(file.raw)]
|
|
|
}else if(type == 'pdf'){
|
|
|
- this.FileVisible = true
|
|
|
+ // this.FileVisible = true
|
|
|
this.FileUrl = URL.createObjectURL(file.raw)
|
|
|
- this.srcList = []
|
|
|
+ var isPicture = 0
|
|
|
+ // this.srcList = []
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
}
|
|
|
- // this.imageUrl ='https://view.xdocin.com/view?src=' + URL.createObjectURL(file.raw)
|
|
|
- // this.showFile = true
|
|
|
+ const router = this.$router.resolve({
|
|
|
+ path: '/checkFile',
|
|
|
+ query: {
|
|
|
+ row: JSON.stringify(item),
|
|
|
+ FileUrl: this.FileUrl,
|
|
|
+ isPicture:isPicture
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(router.href, '_blank');
|
|
|
},
|
|
|
submit(){
|
|
|
let formData = new FormData()
|