| | |
| | | </svg> --> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="notBox" v-if="totalPage == 0 && !loading"> |
| | | <el-empty description="暂无数据"></el-empty> |
| | | </div> |
| | |
| | | window.open(await getResourcePath(this.preViewMd5)) |
| | | }, |
| | | domViewer() { |
| | | // let ele = (this.container ? this.container : document).getElementById( |
| | | // 'imageParent' |
| | | // ) |
| | | let ele = document.getElementById('imageParent') |
| | | this.viewerCon = new Viewer(ele, { |
| | | inline: false, |
| | |
| | | }, |
| | | getFileInfo() { |
| | | // 获取目录 |
| | | this.loading = true; |
| | | this.loading = true |
| | | this.MG.file |
| | | .getPdfInfo({ md5: this.preViewMd5 }) |
| | | .then((res) => { |
| | | this.totalPage = res.totalPages |
| | | try { |
| | | if(typeof res === 'string' && res !== null ){ |
| | | this.totalPage = JSON.parse(res).totalPages |
| | | }else if(typeof res === 'object' && res !== null) { |
| | | this.totalPage = res.totalPages |
| | | } |
| | | } catch (error) { |
| | | console.log(error,'pdf返回值类型错误'); |
| | | } |
| | | this.createDom(this.currentPage) |
| | | this.loading = false |
| | | }) |