Commit 9cd95366 by xiehao

1、修改改了在线文档

1 parent d5c1e41f
Showing with 51 additions and 4 deletions
...@@ -6,6 +6,13 @@ ...@@ -6,6 +6,13 @@
<el-select v-model="select1" class="leftSelect"> <el-select v-model="select1" class="leftSelect">
<el-option label="本项目-安全防护方案.pdf" value="1"></el-option> <el-option label="本项目-安全防护方案.pdf" value="1"></el-option>
</el-select> </el-select>
<div class="left_container_content w-100 h-100 flex-1">
<vab-only-office
id="office-preview"
:documentServerUrl="documentServerUrl"
:config="config"
/>
</div>
</div> </div>
<div class="right_container"> <div class="right_container">
<el-alert title="评审内容" type="success" :closable="false"></el-alert> <el-alert title="评审内容" type="success" :closable="false"></el-alert>
...@@ -37,17 +44,19 @@ ...@@ -37,17 +44,19 @@
</template> </template>
<script> <script>
import { import {
getReviewArchiFollowCheckRightGraph, getReviewArchiFollowCheckRightGraph,
saveReviewArchiFollowCheckRightSuggestion, saveReviewArchiFollowCheckRightSuggestion,
queryReviewArchiFollowCheckRightSuggestionDetails queryReviewArchiFollowCheckRightSuggestionDetails
} from '@/api/index.js'; } from '@/api/index.js';
import { MessageBox, Message } from 'element-ui'; import { MessageBox, Message } from 'element-ui';
import vabOnlyOffice from "@/components/onlyOffice/index.vue";
export default { export default {
name: 'tab1', name: 'tab1',
components: { components: {
vabOnlyOffice
}, },
data() { data() {
return { return {
radio: '1', radio: '1',
...@@ -57,7 +66,45 @@ export default { ...@@ -57,7 +66,45 @@ export default {
rightImageArray: [], rightImageArray: [],
rightImageSrc: null, rightImageSrc: null,
prjId: null, prjId: null,
rightSelect: [] rightSelect: [],
documentServerUrl: 'http://192.168.0.120:18050/',
config: {
document: {
fileType: 'docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: 'f0db25df77',
// 文件名
title: '65f90a662c18a9e9f1878156.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: 'http://192.168.0.103:7005/downloadFile/289',
},
documentType: 'word',
height: '100%',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '',
},
// 指定文档存储服务器的绝对路径
callbackUrl: 'http://192.168.0.103:7005/callback?fileId=289',
},
},
}; };
}, },
mounted(){ mounted(){
...@@ -87,7 +134,7 @@ export default { ...@@ -87,7 +134,7 @@ export default {
getReviewArchiFollowCheckRightGraph(params).then(res => { getReviewArchiFollowCheckRightGraph(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
if(res.data.length > 0) { if(res.data.length > 0) {
res.data.map(item => { res.data.map(item => {
item.metaModelSvg = 'data:image/svg+xml;base64,'+ item.metaModelSvg; item.metaModelSvg = 'data:image/svg+xml;base64,'+ item.metaModelSvg;
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!