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

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

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