提交 619ae000 authored 作者: 龙菲's avatar 龙菲

修改我的文件icon、网格文件名称展示等样式

上级 477ee4a5
...@@ -12,4 +12,11 @@ export const verity = params => { ...@@ -12,4 +12,11 @@ export const verity = params => {
params params
}) })
} }
// 新增阅读记录,浏览历史接口
export const addNearRead = data => {
return request({
url: baseUrl + '/user/nearRead/add',
method: 'post',
data
})
}
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1693905752136" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1677" width="80" height="80" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M918.673 883H104.327C82.578 883 65 867.368 65 848.027V276.973C65 257.632 82.578 242 104.327 242h814.346C940.422 242 958 257.632 958 276.973v571.054C958 867.28 940.323 883 918.673 883z" fill="#FFE9B4" p-id="1678"></path><path d="M512 411H65V210.37C65 188.597 82.598 171 104.371 171h305.92c17.4 0 32.71 11.334 37.681 28.036L512 411z" fill="#FFB02C" p-id="1679"></path><path d="M918.673 883H104.327C82.578 883 65 865.42 65 843.668V335.332C65 313.58 82.578 296 104.327 296h814.346C940.422 296 958 313.58 958 335.332v508.336C958 865.32 940.323 883 918.673 883z" fill="#FFCA28" p-id="1680"></path></svg>
\ No newline at end of file
<template> <template>
<div class="breadcrumb-wrapper"> <div class="breadcrumb-wrapper">
<div class="title">当前位置:</div> <div class="title">当前位置:</div>
<!-- <el-input <div class="breadcrumb-box" @click.self="handleClickBreadCrumbSelf">
class="file-path-input"
ref="filePathInputRef"
placeholder="请输入路径"
v-model="inputFilePath"
size="mini"
:autofocus="true"
v-show="isShowInput"
@blur="handleInputBlurEnter"
@change="handleInputBlurEnter"
></el-input> -->
<div
class="breadcrumb-box"
@click.self="handleClickBreadCrumbSelf"
>
<el-breadcrumb separator-class="el-icon-arrow-right"> <el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item <el-breadcrumb-item
v-for="(item, index) in breadCrumbList" v-for="(item, index) in breadCrumbList"
...@@ -45,18 +31,6 @@ export default { ...@@ -45,18 +31,6 @@ export default {
}, },
data() { data() {
return { return {
fileTypeMap: {
1: "全部图片",
2: "全部文档",
3: "全部视频",
4: "全部音乐",
5: "其他",
6: "回收站",
10: "我的创作",
11: "我的收藏",
12: "我的笔记",
},
isShowInput: false, // 是否展示路径输入框
inputFilePath: "", // 路径输入 inputFilePath: "", // 路径输入
breadCrumbList: [], breadCrumbList: [],
}; };
...@@ -78,79 +52,22 @@ export default { ...@@ -78,79 +52,22 @@ export default {
// 根目录 // 根目录
filePathList[i] = ""; filePathList[i] = "";
_path.push(filePathList[i]); _path.push(filePathList[i]);
// res.push({
// path: "/",
// name:
// this.fileType === 0
// ? "全部文件"
// : this.fileType === 8
// ? "我的分享"
// : this.$route.name === "Share"
// ? "全部分享"
// : "",
// });
} }
} }
this.breadCrumbList = res; this.breadCrumbList = res;
}, },
}, },
computed: {
/**
* 面包屑导航栏数组
*/
// breadCrumbList: {
// get() {
// let filePath = this.$route.query.filePath;
// let filePathList = filePath ? filePath.split("/") : [];
// let res = []; // 返回结果数组
// let _path = []; // 存放祖先路径
// for (let i = 0; i < filePathList.length; i++) {
// if (filePathList[i]) {
// _path.push(filePathList[i]);
// res.push({
// path: _path.join("/"),
// name: filePathList[i],
// });
// } else if (i === 0) {
// // 根目录
// filePathList[i] = "";
// _path.push(filePathList[i]);
// res.push({
// path: "/",
// name:
// this.fileType === 0
// ? "全部文件"
// : this.fileType === 8
// ? "我的分享"
// : this.$route.name === "Share"
// ? "全部分享"
// : "",
// });
// }
// }
// return res;
// },
// set() {
// return [];
// },
// },
},
methods: { methods: {
/** /**
* 点击面包屑导航栏空白处 * 点击面包屑导航栏空白处
*/ */
handleClickBreadCrumbSelf() { handleClickBreadCrumbSelf() {
this.inputFilePath = this.filePath; this.inputFilePath = this.filePath;
this.isShowInput = true;
this.$nextTick(() => {
this.$refs.filePathInputRef.focus();
});
}, },
/** /**
* 路径输入框失去焦点或用户按下回车时触发 * 路径输入框失去焦点或用户按下回车时触发
*/ */
handleInputBlurEnter() { handleInputBlurEnter() {
this.isShowInput = false;
if (this.inputFilePath !== this.filePath) { if (this.inputFilePath !== this.filePath) {
const fixInputFilePath = this.inputFilePath.endsWith("/") const fixInputFilePath = this.inputFilePath.endsWith("/")
? this.inputFilePath.slice(0, -1) ? this.inputFilePath.slice(0, -1)
...@@ -162,25 +79,6 @@ export default { ...@@ -162,25 +79,6 @@ export default {
}, },
// 获取文件参数 // 获取文件参数
getRouteQuery(item) { getRouteQuery(item) {
// debugger;
// let routeName = this.$route.name;
// if (routeName === "Share") {
// // 当前是查看他人分享列表的页面
// return { query: { filePath: item.path } };
// } else if (this.fileType === 8) {
// // 当前是我的已分享列表页面
// return {
// query: {
// fileType: 8,
// filePath: item.path,
// shareBatchNum:
// item.path === "/" ? undefined : this.$route.query.shareBatchNum, // 当查看的是根目录,批次号置空
// },
// };
// } else {
// // 网盘页面
// return { query: { filePath: item.path, fileType: item.fileType } };
// }
return { return {
query: { filePath: item.path, fileType: this.$route.query.fileType }, query: { filePath: item.path, fileType: this.$route.query.fileType },
}; };
......
...@@ -416,10 +416,8 @@ export default { ...@@ -416,10 +416,8 @@ export default {
.file-table-wrapper { .file-table-wrapper {
margin-top: 2px; margin-top: 2px;
height: calc(100vh - 262px) !important; height: calc(100vh - 270px) !important;
.file-type-0 { .file-type-0 {
// height: calc(100vh - 206px) !important;
::v-deep .el-table__body-wrapper { ::v-deep .el-table__body-wrapper {
height: calc(100vh - 262px) !important; height: calc(100vh - 262px) !important;
} }
...@@ -443,7 +441,7 @@ export default { ...@@ -443,7 +441,7 @@ export default {
.file-table { .file-table {
width: 100% !important; width: 100% !important;
height: calc(100vh - 290px); height: calc(100%);
::v-deep .el-table__header-wrapper { ::v-deep .el-table__header-wrapper {
th { th {
......
...@@ -238,7 +238,7 @@ export default { ...@@ -238,7 +238,7 @@ export default {
left: "126px", left: "126px",
right: "auto", right: "auto",
}, },
dirImg: require("@/assets/images/file/dir.png"), dirImg: require("@/assets/images/file/dir.svg"),
wordImg: require("@/assets/images/file/file_word.svg"), wordImg: require("@/assets/images/file/file_word.svg"),
excelImg: require("@/assets/images/file/file_excel.svg"), excelImg: require("@/assets/images/file/file_excel.svg"),
pptImg: require("@/assets/images/file/file_ppt.svg"), pptImg: require("@/assets/images/file/file_ppt.svg"),
...@@ -292,7 +292,7 @@ export default { ...@@ -292,7 +292,7 @@ export default {
}, },
// 分享按钮是否显示 // 分享按钮是否显示
shareBtnShow() { shareBtnShow() {
return this.fileType !=this.TEMPLATE_MANAGE;//模板管理不能分享 return this.fileType != this.TEMPLATE_MANAGE; //模板管理不能分享
}, },
// 下载按钮是否显示 // 下载按钮是否显示
downloadBtnShow() { downloadBtnShow() {
......
<template> <template>
<!-- 文件平铺 --> <!-- 文件平铺 -->
<div class="file-grid-wrapper"> <div class="file-grid-wrapper">
<div
class="file-list empty"
v-loading="loading"
element-loading-text="文件加载中……"
v-if="fileListSorted.length == 0"
>
<el-empty></el-empty>
</div>
<ul <ul
v-else
class="file-list" class="file-list"
v-loading="loading" v-loading="loading"
element-loading-text="文件加载中……" element-loading-text="文件加载中……"
...@@ -353,10 +362,10 @@ export default { ...@@ -353,10 +362,10 @@ export default {
line-height: 22px; line-height: 22px;
font-size: 12px; font-size: 12px;
word-break: break-all; word-break: break-all;
@include setEllipsis(2); // @include setEllipsis(2);
::v-deep .keyword { // ::v-deep .keyword {
color: $Danger; // color: $Danger;
} // }
} }
.file-checked-wrapper { .file-checked-wrapper {
...@@ -383,6 +392,10 @@ export default { ...@@ -383,6 +392,10 @@ export default {
background: $tabBackColor; background: $tabBackColor;
} }
} }
.empty{
display: flex;
justify-content: center;
}
.right-menu-list { .right-menu-list {
position: fixed; position: fixed;
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</el-dropdown-item> </el-dropdown-item>
<!-- 只有我的创作采用到新建word文档 --> <!-- 只有我的创作采用到新建word文档 -->
<el-dropdown-item <el-dropdown-item
v-if="[MY_CREATE].includes(fileType)" v-if="[MY_CREATE,TEMPLATE_MANAGE].includes(fileType)"
divided divided
@click.native="handleCreateFileByTemplate('docx')" @click.native="handleCreateFileByTemplate('docx')"
> >
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
}, },
operatePopoverVisible: false, // 收纳栏是否显示 operatePopoverVisible: false, // 收纳栏是否显示
fileGroupLable: 0, // 文件展示模式 fileGroupLable: 0, // 文件展示模式
dirImg: require("@/assets/images/file/dir.png"), dirImg: require("@/assets/images/file/dir.svg"),
wordImg: require("@/assets/images/file/file_word.svg"), wordImg: require("@/assets/images/file/file_word.svg"),
excelImg: require("@/assets/images/file/file_excel.svg"), excelImg: require("@/assets/images/file/file_excel.svg"),
pptImg: require("@/assets/images/file/file_ppt.svg"), pptImg: require("@/assets/images/file/file_ppt.svg"),
......
...@@ -304,35 +304,13 @@ const fileFunction = { ...@@ -304,35 +304,13 @@ const fileFunction = {
console.log('row', row); console.log('row', row);
// 若是文件夹则进入该文件夹 // 若是文件夹则进入该文件夹
if (row.isDir) { if (row.isDir) {
if (router.currentRoute.name === 'Share') { router.push({
// 当前是查看他人分享列表的页面 query: {
router.push({ filePath: `${row.filePath === '/' ? '' : row.filePath}/${row.fileName
query: { }`,
filePath: `${row.shareFilePath === '/' ? '' : row.shareFilePath}/${row.fileName fileType: router.currentRoute.query.fileType
}` }
} })
})
} else if (Number(router.currentRoute.query.fileType) === 8) {
// 当前是我的已分享列表页面
router.push({
query: {
fileType: 8,
filePath: `${row.shareFilePath === '/' ? '' : row.shareFilePath}/${row.fileName
}`,
shareBatchNum: row.shareBatchNum
}
})
} else if (Number(router.currentRoute.query.fileType) !== 6) {
// 回收站页面不允许打开文件夹
// 网盘页面
router.push({
query: {
filePath: `${row.filePath === '/' ? '' : row.filePath}/${row.fileName
}`,
fileType: router.currentRoute.query.fileType
}
})
}
} else { } else {
const WORD = ['doc', 'docx'] const WORD = ['doc', 'docx']
const PDF = ['pdf'] const PDF = ['pdf']
...@@ -341,25 +319,28 @@ const fileFunction = { ...@@ -341,25 +319,28 @@ const fileFunction = {
if (WORD.includes(extentName.toLowerCase())) { if (WORD.includes(extentName.toLowerCase())) {
let flag = false let flag = false
const { fileId, userId, id } = row const { fileId, userId, id } = row
// 根据当前文件的作者的userId进行判断,和本人一致则是可编辑 // 根据当前文件的作者的userId进行判断,和本人一致则是可编辑
if (store.getters.userInfo.userId == userId) { if (store.getters.userInfo.userId == userId) {
flag = true flag = true
} }
const params = { // 暂时写死---start
fileId: fileId,
flag
}
let resolve = router.resolve({ let resolve = router.resolve({
path: '/wpsReader', path: '/wpsReader',
query: { query: {
wpsUrl: `https://wwo.wps.cn/office/w/2c9a8083849eac7001849eae1df50001?_w_userid=1638778159578505218&_w_filrread=1&_w_filetype=db&_w_filepath=http://222.85.214.245:9559/ls/public/stream?randomCode=34df183096eb4996a93c3f779702e45d&_w_tokentype=1&_w_appid=1058dd766ec443c79f95933ec6a41169&_w_redirectkey=123456&_w_signature=E1OEcnnGEgVfK7mcnGDFgXJSLPY%3D`, wpsUrl: `https://wwo.wps.cn/office/w/2c9a8083849eac7001849eae1df50001?_w_userid=1638778159578505218&_w_filrread=1&_w_filetype=db&_w_filepath=http://222.85.214.245:9559/ls/public/stream?randomCode=34df183096eb4996a93c3f779702e45d&_w_tokentype=1&_w_appid=1058dd766ec443c79f95933ec6a41169&_w_redirectkey=123456&_w_signature=E1OEcnnGEgVfK7mcnGDFgXJSLPY%3D`,
// wpsUrl: `http://localhost/office/w/2c9a8083849eac7001849eae1df50001?_w_userid=1638778159578505218&_w_filrread=1&_w_filetype=db&_w_filepath=http://222.85.214.245:9559/ls/public/stream?randomCode=34df183096eb4996a93c3f779702e45d&_w_tokentype=1&_w_appid=1058dd766ec443c79f95933ec6a41169&_w_redirectkey=123456&_w_signature=E1OEcnnGEgVfK7mcnGDFgXJSLPY%3D`,
token: `0617753de96249a5a9839daf9b8ff8b5`, token: `0617753de96249a5a9839daf9b8ff8b5`,
fileId fileId
} }
}) })
window.open(resolve.href, '_blank') window.open(resolve.href, '_blank')
// 暂时写死---end
// 实际实现逻辑---start
// const params = {
// fileId: fileId,
// flag
// }
// getViewUrlDbPath(params).then(res => { // getViewUrlDbPath(params).then(res => {
// if (res.data) { // if (res.data) {
// // console.log('res.data', res.data); // // console.log('res.data', res.data);
...@@ -379,9 +360,12 @@ const fileFunction = { ...@@ -379,9 +360,12 @@ const fileFunction = {
// } // }
// }) // })
// return false // return false
// 实际实现逻辑---end
} }
// 若当前点击项是pdf // 若当前点击项是pdf
if (PDF.includes(row.extendName.toLowerCase())) { else if (PDF.includes(extentName.toLowerCase())) {
router.push('/pdfReader') router.push('/pdfReader')
return false return false
} }
......
...@@ -27,7 +27,7 @@ export const fileImgMap = new Map([ ...@@ -27,7 +27,7 @@ export const fileImgMap = new Map([
['sass', require('@/assets/images/file/file_sass.png')], ['sass', require('@/assets/images/file/file_sass.png')],
['csv', require('@/assets/images/file/file_csv.png')], ['csv', require('@/assets/images/file/file_csv.png')],
['dmg', require('@/assets/images/file/file_dmg.png')], ['dmg', require('@/assets/images/file/file_dmg.png')],
['dir', require('@/assets/images/file/dir.png')], ['dir', require('@/assets/images/file/dir.svg')],
['doc', require('@/assets/images/file/file_word.svg')], ['doc', require('@/assets/images/file/file_word.svg')],
['docx', require('@/assets/images/file/file_word.svg')], ['docx', require('@/assets/images/file/file_word.svg')],
['exe', require('@/assets/images/file/file_exe.png')], ['exe', require('@/assets/images/file/file_exe.png')],
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</div> </div>
<div :span="19" class="right"> <div :span="19" class="right">
<div class="note-container"> <div class="note-container">
<div class="card-group" v-if="noteList.records.length>0"> <div class="card-group" v-if="noteList.records.length > 0">
<el-card <el-card
class="card-item" class="card-item"
shadow="hover" shadow="hover"
...@@ -136,7 +136,6 @@ ...@@ -136,7 +136,6 @@
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<AddOrUpdateNoteDialog <AddOrUpdateNoteDialog
...@@ -170,12 +169,6 @@ export default { ...@@ -170,12 +169,6 @@ export default {
total: 0, total: 0,
}, },
editNoteDialogVisible: false, //笔记笔记弹窗可见性 editNoteDialogVisible: false, //笔记笔记弹窗可见性
form: {
docId: "", //文档Id
bookmarkContent: "", //原文内容
noteContent: "", //笔记内容
tagsArr: [], //标签
},
loading: false, loading: false,
}; };
}, },
......
...@@ -165,12 +165,6 @@ export default { ...@@ -165,12 +165,6 @@ export default {
total: 0, total: 0,
}, },
loading: false, loading: false,
form: {
docId: "", //文档Id
bookmarkContent: "", //原文内容
noteContent: "", //笔记内容
tagsArr: [], //标签
},
}; };
}, },
computed: { computed: {
......
// mixins
// 混入了笔记的复制、预览、编辑、删除等操作,在此文件写的方法和属性可以被共享使用
import { textCopy } from "@/utils/index"; import { textCopy } from "@/utils/index";
import { deleteNote } from "@/api/doc/bookMark"; import { deleteNote } from "@/api/doc/bookMark";
import AddOrUpdateNoteDialog from "@/views/read/wpsReader/component/addOrUpdateNoteDialog.vue"; import AddOrUpdateNoteDialog from "@/views/read/wpsReader/component/addOrUpdateNoteDialog.vue";
...@@ -5,6 +8,16 @@ export default { ...@@ -5,6 +8,16 @@ export default {
components: { components: {
AddOrUpdateNoteDialog AddOrUpdateNoteDialog
}, },
data() {
return {
form: {
docId: "", //文档Id
bookmarkContent: "", //原文内容
noteContent: "", //笔记内容
tagsArr: [], //标签
},
}
},
methods: { methods: {
// 笔记操作 // 笔记操作
handleNoteOperation(type, item) { handleNoteOperation(type, item) {
...@@ -37,7 +50,7 @@ export default { ...@@ -37,7 +50,7 @@ export default {
docId, docId,
bookmarkContent, bookmarkContent,
noteContent, noteContent,
tagsArr: tagName.split(","), tagsArr: tagName && tagName.length > 0 ? tagName.split(",") : [],
}; };
this.$refs.AddOrUpdateNoteDialog.dialogVisible = true; this.$refs.AddOrUpdateNoteDialog.dialogVisible = true;
}, },
......
...@@ -40,24 +40,28 @@ ...@@ -40,24 +40,28 @@
:key="index" :key="index"
shadow="hover" shadow="hover"
> >
<div class="tag" v-if="item.tagName && item.tagName.length > 0"> <div class="card-header">
<el-tag <div class="tag" v-if="item.tagName && item.tagName.length > 0">
style="margin-right: 8px" <el-tag
type="warning" style="margin-right: 8px"
v-for="(v, i) in item.tagName.split(',')" type="warning"
>{{ v }} v-for="(v, i) in item.tagName.split(',')"
</el-tag> :key="i"
>{{ v }}
<el-dropdown> </el-tag>
<el-link>更多</el-link> </div>
<el-dropdown-menu slot="dropdown"> <div class="operations">
<el-dropdown-item <el-dropdown>
v-for="(dropItem, i) in dropdownList" <el-link>更多</el-link>
@click.native="handleClickDropdown(dropItem.value, item)" <el-dropdown-menu slot="dropdown">
>{{ dropItem.label }}</el-dropdown-item <el-dropdown-item
> v-for="(dropItem, i) in dropdownList"
</el-dropdown-menu> @click.native="handleNoteOperation(dropItem.value, item)"
</el-dropdown> >{{ dropItem.label }}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</div>
</div> </div>
<div class="origin oneRow"> <div class="origin oneRow">
<svg-icon <svg-icon
...@@ -115,6 +119,11 @@ ...@@ -115,6 +119,11 @@
:total="tagList.total" :total="tagList.total"
> >
</el-pagination> </el-pagination>
<AddOrUpdateNoteDialog
:formData="form"
ref="AddOrUpdateNoteDialog"
@update="loadNoteList"
/>
</div> </div>
</div> </div>
</template> </template>
...@@ -122,7 +131,10 @@ ...@@ -122,7 +131,10 @@
<script> <script>
// import { noteList, tagList } from "./mockData"; // import { noteList, tagList } from "./mockData";
import { getNoteByTag, getNoteAllTagList } from "@/api/doc/index"; import { getNoteByTag, getNoteAllTagList } from "@/api/doc/index";
import noteOperationMixins from "@/views/mine/myNote/components/noteOperationMixins";
export default { export default {
//noteOperationMixins主要混入属性form、handleNoteOperation方法、AddOrUpdateNoteDialog组件
mixins: [noteOperationMixins],
data() { data() {
return { return {
searchParams: { searchParams: {
...@@ -221,6 +233,7 @@ export default { ...@@ -221,6 +233,7 @@ export default {
console.log(type, item); console.log(type, item);
switch (type) { switch (type) {
case "view": case "view":
this.$file.handleFileNameClickNew(item);
break; break;
case "edit": case "edit":
this.handleOpenAddUpdateDialog(item); this.handleOpenAddUpdateDialog(item);
...@@ -314,5 +327,14 @@ export default { ...@@ -314,5 +327,14 @@ export default {
} }
} }
} }
.card-header {
height: 30px;
.tag {
float: left;
}
.operations {
float: right;
}
}
} }
</style> </style>
...@@ -6,44 +6,49 @@ ...@@ -6,44 +6,49 @@
@handleInsertText="handleInsertText" @handleInsertText="handleInsertText"
@handleOpenAddUpdateDialog="handleOpenAddUpdateDialog" @handleOpenAddUpdateDialog="handleOpenAddUpdateDialog"
/> />
<AddOrUpdateNoteDialog
:formData="form"
ref="AddOrUpdateNoteDialog"
@update="handleUpdateRightPanel"
/>
</div> </div>
</template> </template>
<script> <script>
import WebOfficeSDK from "/public/weboffice/web-office-sdk-v1.1.19.es"; import WebOfficeSDK from "/public/weboffice/web-office-sdk-v1.1.19.es";
import RightPanel from "./component/rightPanel.vue"; import RightPanel from "./component/rightPanel.vue";
import AddOrUpdateNoteDialog from "./component/addOrUpdateNoteDialog.vue";
export default { export default {
components: { components: {
RightPanel, RightPanel,
AddOrUpdateNoteDialog,
}, },
data() { data() {
return { return {
wpsInstance: null, //wps实例 wpsInstance: {}, //wps实例
controlButton: null, //新建笔记按钮 controlButton: {}, //新建笔记按钮
form: { routeParams:{},//路由传过来的参数
docId: "", //文档Id
bookmarkContent: "", //原文内容
noteContent: "", //笔记内容
tagsArr: [], //标签
},
}; };
}, },
mounted() { mounted() {
const { wpsUrl, token, fileId } = this.$route.query; const { wpsUrl, token, fileId } = this.$route.query;
this.form.docId = fileId; this.routeParams = { wpsUrl, token, fileId }
this.initWps(wpsUrl, token); this.initWps(wpsUrl, token);
}, },
destroyed() { destroyed() {
this.removeSelectionChangeListener(); this.removeSelectionChangeListener();
}, },
methods: { methods: {
// 新增阅读记录
async addViewRecord() {
const params = {
docId: this.routeParams.fileId,
docSType: "docx", //枚举值docx,pdf
};
try {
let res = await addNearRead(params);
if (res.code == 200) {
// console.log();
} else {
throw res.code;
}
} catch (error) {
console.error(error);
}
},
// 初始化WPS // 初始化WPS
async initWps(wpsUrl, token) { async initWps(wpsUrl, token) {
this.wpsInstance = WebOfficeSDK.config({ this.wpsInstance = WebOfficeSDK.config({
...@@ -55,6 +60,7 @@ export default { ...@@ -55,6 +60,7 @@ export default {
await this.wpsInstance.ready(); await this.wpsInstance.ready();
this.addSelectionListen(); this.addSelectionListen();
this.initAddNoteButton(); this.initAddNoteButton();
this.addViewRecord();
}, },
// 添加监听选取文字 // 添加监听选取文字
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论