提交 f4527808 authored 作者: 龙菲's avatar 龙菲

替换caj阅读器的地址,删除本地包

上级 6dc69893
......@@ -360,7 +360,7 @@ export default {
}
.pagnaition input {
width: 36px;
height: 36px;
height: 26px;
margin-right: 5px;
}
.main {
......
......@@ -238,6 +238,7 @@ const fileFunction = {
* @param {array} fileList 文件列表
*/
handleFileNameClickNew(row, currentIndex = 0, fileList = []) {
// console.log(11, row);
// 若是文件夹则进入该文件夹
if (row.isDir) {
router.push({
......@@ -252,7 +253,9 @@ const fileFunction = {
const PDF = ['pdf']
// 若当前点击项是word
let extendName = row.extendName || row.suffix || row.showType || row.docSType
const { fileId, userId, id, docId } = row
// console.log('extendName', extendName);
const { fileId, userId, id, docId, fileUrl } = row
if (WORD.includes(extendName.toLowerCase())) {
let flag = false
// 根据当前文件的作者的userId进行判断,和本人一致则是可编辑
......@@ -281,17 +284,25 @@ const fileFunction = {
return false
// 实际实现逻辑---end
}
// 若当前点击项是pdf
else if (PDF.includes(extendName.toLowerCase())) {
// console.log(666, 'pdf');
// 若当前点击项是pdf
if (!fileUrl) {
Message.error('预览失败!请检查该文件路径是否正确。文件路径:' + fileUrl)
return
}
let resolve = router.resolve({
path: '/pdfReader',
query: {
fileId,
url: fileUrl
}
})
// console.log(333, row);
window.open(resolve.href, '_blank')
return false
}
}
},
/**
......
......@@ -158,8 +158,8 @@ export function openFile(file, $el, localStorage, flag = false) {
export function handleDownloadCajViewer() {
let a = document.createElement("a");
a.href = "/caj-viewer/CAJViewer 8.1_x64-setup.exe";
a.download = "CAJViewer 8.1_x64-setup.exe";
a.href = "http://192.168.1.5:5432/cajview/CAJViewer8.1.exe";
a.download = "CAJViewer8.1.exe.exe";
a.style.display = "none";
document.body.appendChild(a);
a.click();
......
......@@ -78,11 +78,14 @@ export default {
panelVisible: false, //笔记的窗口
noteList: [],
pdfAnnotInstance: null,
// url: "",
};
},
mounted() {
const { fileId } = this.$route.query;
const { fileId, url } = this.$route.query;
console.log(222, url);
this.form.docId = fileId;
this.url = url;
},
methods: {
// 关闭笔记窗口
......@@ -114,9 +117,9 @@ export default {
updateNoteList(noteList) {
this.noteList = noteList;
if (!this.pdfAnnotInstance) {
return
return;
}
this.renderNote()
this.renderNote();
},
// 渲染笔记
renderNote() {
......
......@@ -52,26 +52,26 @@
</template>
</el-table-column>
<el-table-column
<!-- <el-table-column
label="作者"
align="center"
prop="author"
show-overflow-tooltip
>
</el-table-column>
</el-table-column> -->
<!-- <el-table-column
show-overflow-tooltip
label="年份"
prop="year"
align="center"
/> -->
<el-table-column
<!-- <el-table-column
show-overflow-tooltip
label="机构"
prop="organize"
align="center"
>
</el-table-column>
</el-table-column> -->
<el-table-column
label="文件大小"
align="center"
......@@ -133,6 +133,7 @@
<script>
import { getInnerFileList } from "@/api/resource";
import { uploadModeConstant, fileTypeConstant } from "@/constants/index";
import { newfile } from "@/api/wps";
const { INTERNAL_RESOURCE } = fileTypeConstant;
export default {
data() {
......@@ -223,7 +224,6 @@ export default {
// 点击收藏
handleCollect(row) {
console.log("点击收藏", row);
this.loading = true;
const { extendName, fileName } = row;
const filePath = "/我的收藏";
......
......@@ -44,7 +44,28 @@ module.exports = {
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
}
}
},
// "/files": {
// target: "http://192.168.1.5:5236",
// changeOrigin: true,
// pathRewrite: {
// "^/files": "",
// },
// },
"/basePdfFiles": {
target: "http://192.168.1.5:5236",
changeOrigin: true,
pathRewrite: {
"^/basePdfFiles": "",
},
},
"/kbaseFiles": {
target: "http://192.168.1.5:5236",
changeOrigin: true,
pathRewrite: {
"^/kbaseFiles": "",
},
},
},
disableHostCheck: true
},
......@@ -76,7 +97,7 @@ module.exports = {
},
// 解决其他插件的es6语法向下兼容问题
transpileDependencies: [
'@pdftron/webviewer',
'@pdftron/webviewer',
],
chainWebpack(config) {
config.plugins.delete('preload') // TODO: need test
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论