Commit eb003dc9 by xiehao

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/reviewSituation/tab1.vue
2 parents 17b04cd0 8635a277
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Autor: pan * @Autor: pan
* @Date: 2024-03-12 14:55:59 * @Date: 2024-03-12 14:55:59
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-05-07 15:00:21 * @LastEditTime: 2024-06-21 10:47:29
--> -->
<template> <template>
<div class="form-box"> <div class="form-box">
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
</template> </template>
<SearchFormItem <SearchFormItem
ref="formItem"
v-else v-else
v-model="formData[item.prop]" v-model="formData[item.prop]"
:itemOptions="item" :itemOptions="item"
...@@ -105,14 +106,10 @@ export default { ...@@ -105,14 +106,10 @@ export default {
* @param {any} value 修改的值 * @param {any} value 修改的值
* @return {void} * @return {void}
* @author: pan * @author: pan
*/ */
changeFormItemData(prop, value) { changeFormItemData(prop, value) {
this.$nextTick(() => { this.$nextTick(() => {
this.$set( this.$set(this.formData, prop, value)
this.formData,
prop,
value,
)
this.$refs['formRef'].clearValidate(prop) this.$refs['formRef'].clearValidate(prop)
}) })
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<script> <script>
import loadScript from './loadScript.js' import loadScript from './loadScript.js'
import { EADC_SHARED_ABILITY } from '@/config/micromodule'
export default { export default {
name: 'DocumentEditor', name: 'DocumentEditor',
props: { props: {
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
}, },
documentServerUrl: { documentServerUrl: {
type: String, type: String,
default: '', default: SystemConfig.documentServerUrl2,
}, },
config: { config: {
type: Object, type: Object,
...@@ -36,20 +36,29 @@ export default { ...@@ -36,20 +36,29 @@ export default {
}, },
editorConfig_lang: { editorConfig_lang: {
type: String, type: String,
default: '', default: 'zh-CN',
}, },
height: { height: {
type: String, type: String,
default: '', default: '100%',
}, },
type: { type: {
type: String, type: String,
default: '', default: '',
}, },
width: { fileId: {
type: String, type: String,
default: '', default: '',
}, },
//阅读状态 view/edit
mode: {
type: String,
default: 'edit',
},
width: {
type: String,
default: '100%',
},
events_onAppReady: { events_onAppReady: {
type: Function, type: Function,
default: () => {}, default: () => {},
...@@ -194,11 +203,35 @@ export default { ...@@ -194,11 +203,35 @@ export default {
document: { document: {
fileType: this.document_fileType, fileType: this.document_fileType,
title: this.document_title, title: this.document_title,
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${this.documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${this.fileId}`,
}, },
documentType: this.documentType, documentType: this.documentType,
editorConfig: { editorConfig: {
//语言:zh-CN简体中文/en英文
lang: this.editorConfig_lang, lang: this.editorConfig_lang,
//阅读状态 view/edit
mode: this.mode,
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${this.documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${this.fileId}`,
}, },
events: { events: {
onAppReady: this.onAppReady, onAppReady: this.onAppReady,
onDocumentStateChange: this.events_onDocumentStateChange, onDocumentStateChange: this.events_onDocumentStateChange,
......
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
v-for="tag in visitedViews" v-for="tag in visitedViews"
ref="tag" ref="tag"
:key="tag.path" :key="tag.path"
:class="[isActive(tag) ? 'active' : '', {'length1': visitedViews.length == 1}]" :class="[
isActive(tag) ? 'active' : '',
{ length1: visitedViews.length == 1 },
]"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
tag="span" tag="span"
class="tags-view-item" class="tags-view-item"
...@@ -20,9 +23,15 @@ ...@@ -20,9 +23,15 @@
/> />
</router-link> </router-link>
</scroll-pane> </scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu"> <ul
v-show="visible"
:style="{ left: left + 'px', top: top + 'px' }"
class="contextmenu"
>
<li @click="refreshSelectedTag(selectedTag)">刷新</li> <li @click="refreshSelectedTag(selectedTag)">刷新</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">关闭</li> <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">
关闭
</li>
<li @click="closeOthersTags(selectedTag)">关闭其他</li> <li @click="closeOthersTags(selectedTag)">关闭其他</li>
<!-- <li @click="closeAllTags(selectedTag)">关闭所有</li> --> <!-- <li @click="closeAllTags(selectedTag)">关闭所有</li> -->
</ul> </ul>
...@@ -234,7 +243,7 @@ export default { ...@@ -234,7 +243,7 @@ export default {
scrollbar-width: none; scrollbar-width: none;
} }
.length1 { .length1 {
padding-right: 20px!important; padding-right: 20px !important;
} }
.tags-view-container { .tags-view-container {
height: 32px; height: 32px;
...@@ -329,7 +338,7 @@ export default { ...@@ -329,7 +338,7 @@ export default {
&:before { &:before {
transform: scale(0.6); transform: scale(0.6);
display: inline-block; display: inline-block;
vertical-align: -3px; vertical-align: middle;
} }
&:hover { &:hover {
background-color: #b4bccc; background-color: #b4bccc;
......
...@@ -169,6 +169,7 @@ export default { ...@@ -169,6 +169,7 @@ export default {
value: 'assetId', value: 'assetId',
checkStrictly: true, checkStrictly: true,
}, },
'append-to-body': false,
events: { events: {
change(e) { change(e) {
that.superiorNodeChange(e) that.superiorNodeChange(e)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab1-1" id="office-preview-tab1-1"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -25,14 +25,20 @@ ...@@ -25,14 +25,20 @@
<el-select class="select-title" v-model="select"> <el-select class="select-title" v-model="select">
<el-option label="概要设计说明书.doc" value="1"></el-option> <el-option label="概要设计说明书.doc" value="1"></el-option>
</el-select> </el-select>
<el-button type="primary" size='mini' class="backBtn" @click="backRoute">返回</el-button> <el-button
type="primary"
size="mini"
class="backBtn"
@click="backRoute"
>返回</el-button
>
</div> </div>
<div class="right_container_content flex-1"> <div class="right_container_content flex-1">
<div class="office w-100 h-100"> <div class="office w-100 h-100">
<vab-only-office <vab-only-office
id="office-preview-tab1-2" id="office-preview-tab1-2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -74,6 +80,7 @@ import { ...@@ -74,6 +80,7 @@ import {
saveReviewArchiFollowCheckRightSuggestion, saveReviewArchiFollowCheckRightSuggestion,
queryReviewArchiFollowCheckRightSuggestionDetails, queryReviewArchiFollowCheckRightSuggestionDetails,
} from '@/api/index.js' } from '@/api/index.js'
import { documentServerUrl2 } from '@/config'
export default { export default {
name: 'tab1', name: 'tab1',
components: { vabOnlyOffice }, components: { vabOnlyOffice },
...@@ -92,47 +99,23 @@ export default { ...@@ -92,47 +99,23 @@ export default {
}, },
], ],
select: '1', select: '1',
documentServerUrl: 'http://192.168.0.120:18050/', documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '71df19fbd1',
// 文件名
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.120:7005/downloadFile/29',
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '',
},
// 指定文档存储服务器的绝对路径
callbackUrl: 'http://192.168.0.120:7005/callback?fileId=29',
},
}, },
} }
}, },
computed: {
readonlyConfig() {
return {
...this.config,
mode: 'view',
}
},
},
created() { created() {
this.getDetail() this.getDetail()
}, },
...@@ -170,8 +153,11 @@ export default { ...@@ -170,8 +153,11 @@ export default {
} }
}) })
}, },
backRoute(){ backRoute() {
this.$router.push({path: '/main/artPolicyExamine', query: {activeName: '2'}}) this.$router.push({
path: '/main/artPolicyExamine',
query: { activeName: '2' },
})
}, },
}, },
} }
...@@ -179,9 +165,9 @@ export default { ...@@ -179,9 +165,9 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/styles/common.scss'; @import '@/styles/common.scss';
@import '@/views/reviewArchiPoliticeCheck/index.scss'; @import '@/views/reviewArchiPoliticeCheck/index.scss';
.backBtn{ .backBtn {
position: absolute; position: absolute;
right: 10px; right: 10px;
top: 10px; top: 10px;
} }
</style> </style>
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @Autor: pan * @Autor: pan
* @Date: 2024-03-21 20:58:31 * @Date: 2024-03-21 20:58:31
* @LastEditors: pan * @LastEditors: pan
* @LastEditTime: 2024-03-29 09:24:54 * @LastEditTime: 2024-06-24 09:05:56
--> -->
<template> <template>
<div class="flex-column m-10 w-100 conceptualExamine"> <div class="flex-column m-10 w-100 conceptualExamine">
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<vab-only-office <vab-only-office
id="office-preview" id="office-preview"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
<template v-else> <template v-else>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<vab-only-office <vab-only-office
id="office-preview2" id="office-preview2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
<template v-else> <template v-else>
...@@ -189,43 +189,10 @@ export default { ...@@ -189,43 +189,10 @@ export default {
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/302`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
}, },
selectData: [], selectData: [],
} }
...@@ -308,10 +275,7 @@ export default { ...@@ -308,10 +275,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -327,8 +291,7 @@ export default { ...@@ -327,8 +291,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.selectData = res.data this.selectData = res.data
if (this.selectData.length) { if (this.selectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${this.selectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${this.selectData[0].fileId}`
} }
} }
}) })
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<vab-only-office <vab-only-office
id="office-preview" id="office-preview"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -91,43 +91,10 @@ export default { ...@@ -91,43 +91,10 @@ export default {
onlineReviewState: 1, onlineReviewState: 1,
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/302`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
}, },
} }
}, },
...@@ -153,8 +120,7 @@ export default { ...@@ -153,8 +120,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const selectData = res.data const selectData = res.data
if (selectData.length) { if (selectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${selectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${selectData[0].fileId}`
} }
} }
}) })
......
...@@ -94,7 +94,7 @@ import { ...@@ -94,7 +94,7 @@ import {
getQryByTree, getQryByTree,
queryRepeatAssetByNumber, queryRepeatAssetByNumber,
getAssetDetail, getAssetDetail,
getAssetCode getAssetCode,
} from '@/api/index' } from '@/api/index'
import { archiEleColor } from '@/config' import { archiEleColor } from '@/config'
export default { export default {
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
graphId: '', graphId: '',
// 选择的上级节点对应的详细信息 // 选择的上级节点对应的详细信息
selectedObject: {}, selectedObject: {},
assetNumberDis: false assetNumberDis: false,
} }
}, },
components: { Form, ChooseSvg }, components: { Form, ChooseSvg },
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
{ required: true, trigger: 'blur', message: '不能为空' }, { required: true, trigger: 'blur', message: '不能为空' },
{ validator: this.assetNameValidator, trigger: 'blur' }, { validator: this.assetNameValidator, trigger: 'blur' },
], ],
readonly: this.assetNumberDis readonly: this.assetNumberDis,
}, },
{ {
label: '所属元素', // label文字 label: '所属元素', // label文字
...@@ -214,6 +214,7 @@ export default { ...@@ -214,6 +214,7 @@ export default {
element: 'el-cascader', // 指定elementui组件 element: 'el-cascader', // 指定elementui组件
initValue: undefined, // 字段初始值 initValue: undefined, // 字段初始值
placeholder: '请选择', // elementui组件属性 placeholder: '请选择', // elementui组件属性
// __slotName: 'superiorNode',
filterable: true, filterable: true,
options: this.treeSelectData, options: this.treeSelectData,
props: { props: {
...@@ -222,6 +223,8 @@ export default { ...@@ -222,6 +223,8 @@ export default {
value: 'assetId', value: 'assetId',
checkStrictly: true, checkStrictly: true,
}, },
'append-to-body': false,
ref: 'cascader',
events: { events: {
change(e) { change(e) {
that.superiorNodeChange(e) that.superiorNodeChange(e)
...@@ -330,7 +333,7 @@ export default { ...@@ -330,7 +333,7 @@ export default {
(item) => item.elementId == data, (item) => item.elementId == data,
) )
this.getParentElementOptions(currentItem) this.getParentElementOptions(currentItem)
if (addRowData) { if (addRowData) {
console.log('addRowData.fieldsValue', addRowData.fieldsValue) console.log('addRowData.fieldsValue', addRowData.fieldsValue)
if (addRowData.assetId || addRowData.id) { if (addRowData.assetId || addRowData.id) {
...@@ -357,7 +360,6 @@ export default { ...@@ -357,7 +360,6 @@ export default {
} else { } else {
this.getDicArray(data) this.getDicArray(data)
} }
}, },
getDicArray(data) { getDicArray(data) {
const params = { const params = {
...@@ -428,10 +430,10 @@ export default { ...@@ -428,10 +430,10 @@ export default {
// 当选中值变化时,更新绑定的对象 // 当选中值变化时,更新绑定的对象
this.selectedObject = {} this.selectedObject = {}
if (value && value.length) { if (value && value.length) {
this.selectedObject =
this.$refs.addForm.$refs.formItem[4].$refs.cascader.getCheckedNodes()[0].data
// 假设我们根据id来查询对象 // 假设我们根据id来查询对象
this.selectedObject = this.findObjectById(this.treeSelectData, value[0]) // this.selectedObject = this.findObjectById(this.treeSelectData, value[0])
} else {
this.selectedObject = null
} }
this.superiorNodeValue = this.selectedObject.assetId this.superiorNodeValue = this.selectedObject.assetId
this.superiorNodeLabel = this.selectedObject.assetName this.superiorNodeLabel = this.selectedObject.assetName
...@@ -439,10 +441,10 @@ export default { ...@@ -439,10 +441,10 @@ export default {
getAssetCode({ getAssetCode({
archiType: this.getArchiType, archiType: this.getArchiType,
superiorAssetCode: this.selectedObject.assetNumber superiorAssetCode: this.selectedObject.assetNumber,
}).then(res => { }).then((res) => {
this.assetNumberDis = true this.assetNumberDis = true
if(res.code === 200) { if (res.code === 200) {
this.selectCode = res.msg this.selectCode = res.msg
this.$refs['addForm'].changeFormItemData('assetNumber', res.msg) this.$refs['addForm'].changeFormItemData('assetNumber', res.msg)
} }
...@@ -520,7 +522,19 @@ export default { ...@@ -520,7 +522,19 @@ export default {
v.initValue = item.parentElement[0] v.initValue = item.parentElement[0]
} }
} else if (v.prop === 'superiorNode') { } else if (v.prop === 'superiorNode') {
v.initValue = item.parentAsset ? item.parentAsset.split(', ') : [] let su
if (item.superiorNode) {
su = item.superiorNode
v.initValue = su
} else {
su = item.parentAsset ? item.parentAsset.split(', ') : []
v.initValue = su
}
if (su.length) {
this.$nextTick(() => {
this.superiorNodeChange(su)
})
}
} else { } else {
v.initValue = item[v.prop] v.initValue = item[v.prop]
} }
...@@ -533,6 +547,7 @@ export default { ...@@ -533,6 +547,7 @@ export default {
}, },
// 处理完善时,带入一些其他的不在页面展示的参数 // 处理完善时,带入一些其他的不在页面展示的参数
handleOtherProp(item) { handleOtherProp(item) {
debugger
this.selectGraphSrc = item.icon || '' this.selectGraphSrc = item.icon || ''
this.selectGraphShape = item.iconName this.selectGraphShape = item.iconName
this.graphId = item.graphId this.graphId = item.graphId
...@@ -555,6 +570,7 @@ export default { ...@@ -555,6 +570,7 @@ export default {
this.graphId = '' this.graphId = ''
this.dynamicForm_ = [] this.dynamicForm_ = []
this.archiEleOptions = [] this.archiEleOptions = []
this.selectedObject = {}
// 上级元素集合 // 上级元素集合
this.parentElementOptions = [] this.parentElementOptions = []
// 上级节点 // 上级节点
...@@ -599,6 +615,7 @@ export default { ...@@ -599,6 +615,7 @@ export default {
name: params.assetName, name: params.assetName,
parentId: params.parentAssetId, parentId: params.parentAssetId,
archiAssetType, archiAssetType,
id: this.addRowData.id,
}, },
], ],
} }
...@@ -619,9 +636,11 @@ export default { ...@@ -619,9 +636,11 @@ export default {
name: params.assetName, name: params.assetName,
} }
} }
if(archiAssetType === 3) { if (archiAssetType === 3) {
console.log('emit', emitParams)
this.$emit('add', emitParams) this.$emit('add', emitParams)
} else { } else {
console.log('emit', emitParams)
this.$emit('perfect', emitParams) this.$emit('perfect', emitParams)
} }
this.handleClose() this.handleClose()
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<vab-only-office <vab-only-office
id="office-preview" id="office-preview"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -74,6 +74,8 @@ import { ...@@ -74,6 +74,8 @@ import {
} 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' import vabOnlyOffice from '@/components/onlyOffice/index.vue'
import { documentServerUrl2 } from '@/config'
export default { export default {
name: 'tab1', name: 'tab1',
components: { components: {
...@@ -89,45 +91,12 @@ export default { ...@@ -89,45 +91,12 @@ export default {
rightImageSrc: null, rightImageSrc: null,
prjId: null, prjId: null,
rightSelect: [], rightSelect: [],
documentServerUrl: 'http://192.168.0.120:18050/', documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.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/302',
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '',
},
// 指定文档存储服务器的绝对路径
callbackUrl: 'http://192.168.0.103:7005/callback?fileId=302',
},
}, },
} }
}, },
...@@ -202,7 +171,7 @@ export default { ...@@ -202,7 +171,7 @@ export default {
}, },
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.tab1 { .tab1 {
height: 100%; height: 100%;
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab1-1" id="office-preview-tab1-1"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab1-2" id="office-preview-tab1-2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -96,43 +96,10 @@ export default { ...@@ -96,43 +96,10 @@ export default {
select: '1', select: '1',
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/302`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: ''
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
}, },
} }
}, },
...@@ -140,10 +107,7 @@ export default { ...@@ -140,10 +107,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -164,8 +128,7 @@ export default { ...@@ -164,8 +128,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const selectData = res.data const selectData = res.data
if (selectData.length) { if (selectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${selectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${selectData[0].fileId}`
} }
} }
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab2-1" id="office-preview-tab2-1"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab2-2" id="office-preview-tab2-2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -95,42 +95,10 @@ export default { ...@@ -95,42 +95,10 @@ export default {
select: '1', select: '1',
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/293`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=293`,
},
}, },
} }
}, },
...@@ -138,10 +106,7 @@ export default { ...@@ -138,10 +106,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -161,8 +126,7 @@ export default { ...@@ -161,8 +126,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const selectData = res.data const selectData = res.data
if (selectData.length) { if (selectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${selectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${selectData[0].fileId}`
} }
} }
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab3-1" id="office-preview-tab3-1"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab3-2" id="office-preview-tab3-2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -86,43 +86,10 @@ export default { ...@@ -86,43 +86,10 @@ export default {
select: '1', select: '1',
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/302`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
}, },
} }
}, },
...@@ -130,10 +97,7 @@ export default { ...@@ -130,10 +97,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -153,8 +117,7 @@ export default { ...@@ -153,8 +117,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const selectData = res.data const selectData = res.data
if (selectData.length) { if (selectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${selectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${selectData[0].fileId}`
} }
} }
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab4-1" id="office-preview-tab4-1"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab4-2" id="office-preview-tab4-2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -86,43 +86,10 @@ export default { ...@@ -86,43 +86,10 @@ export default {
select: '1', select: '1',
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/302`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
}, },
} }
}, },
...@@ -130,10 +97,7 @@ export default { ...@@ -130,10 +97,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -153,8 +117,7 @@ export default { ...@@ -153,8 +117,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const selectData = res.data const selectData = res.data
if (selectData.length) { if (selectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${selectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${selectData[0].fileId}`
} }
} }
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab5-1" id="office-preview-tab5-1"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab5-2" id="office-preview-tab5-2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -86,42 +86,10 @@ export default { ...@@ -86,42 +86,10 @@ export default {
select: '1', select: '1',
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/293`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=293`,
},
}, },
} }
}, },
...@@ -129,10 +97,7 @@ export default { ...@@ -129,10 +97,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -152,8 +117,7 @@ export default { ...@@ -152,8 +117,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const selectData = res.data const selectData = res.data
if (selectData.length) { if (selectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${selectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${selectData[0].fileId}`
} }
} }
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab6-1" id="office-preview-tab6-1"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab6-2" id="office-preview-tab6-2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -95,43 +95,10 @@ export default { ...@@ -95,43 +95,10 @@ export default {
select: '1', select: '1',
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/302`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
}, },
} }
}, },
...@@ -139,10 +106,7 @@ export default { ...@@ -139,10 +106,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -162,8 +126,7 @@ export default { ...@@ -162,8 +126,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
const selectData = res.data const selectData = res.data
if (selectData.length) { if (selectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${selectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${selectData[0].fileId}`
} }
} }
}) })
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<vab-only-office <vab-only-office
id="office-preview" id="office-preview"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<vab-only-office <vab-only-office
id="office-preview2" id="office-preview2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -106,43 +106,10 @@ export default { ...@@ -106,43 +106,10 @@ export default {
row: {}, row: {},
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/419`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=419`,
},
}, },
leftSelectData: [], leftSelectData: [],
} }
...@@ -151,10 +118,7 @@ export default { ...@@ -151,10 +118,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -175,9 +139,7 @@ export default { ...@@ -175,9 +139,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.leftSelectData = res.data this.leftSelectData = res.data
if (this.leftSelectData.length) { if (this.leftSelectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${this.leftSelectData[0].fileId}` this.config.fileId = selectData[0].fileId
console.log("文档下载地址:", this.config.document.url)
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${this.leftSelectData[0].fileId}`
} }
} }
}) })
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab4-1" id="office-preview-tab4-1"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="readonlyConfig" v-bind="readonlyConfig"
/> />
</div> </div>
</div> </div>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab4-2" id="office-preview-tab4-2"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -76,43 +76,10 @@ export default { ...@@ -76,43 +76,10 @@ export default {
row: {}, row: {},
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/302`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'edit',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
}, },
leftSelectData: [], leftSelectData: [],
} }
...@@ -121,10 +88,7 @@ export default { ...@@ -121,10 +88,7 @@ export default {
readonlyConfig() { readonlyConfig() {
return { return {
...this.config, ...this.config,
editorConfig: { mode: 'view',
...this.config.editorConfig,
mode: 'view',
},
} }
}, },
}, },
...@@ -145,8 +109,7 @@ export default { ...@@ -145,8 +109,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.leftSelectData = res.data this.leftSelectData = res.data
if (this.leftSelectData.length) { if (this.leftSelectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${this.leftSelectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${this.leftSelectData[0].fileId}`
} }
} }
}) })
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<vab-only-office <vab-only-office
id="office-preview-tab5" id="office-preview-tab5"
:documentServerUrl="documentServerUrl" :documentServerUrl="documentServerUrl"
:config="config" v-bind="config"
/> />
</div> </div>
</div> </div>
...@@ -73,43 +73,11 @@ export default { ...@@ -73,43 +73,11 @@ export default {
row: {}, row: {},
documentServerUrl: documentServerUrl2, documentServerUrl: documentServerUrl2,
config: { config: {
document: { document_fileType: 'docx',
fileType: 'docx', document_title: '概要设计说明书.docx',
// 给服务端用的唯一id,同一个id就会获取服务器缓存里的文件(有这个key,就会先根据它去缓存里找),这项如果最开始只是先试用,可以先给个空字符串
key: '',
// 文件名
title: '概要设计说明书.docx',
//相关权限
// permissions: {
// copy: true, //定义内容是否可以复制到剪贴板。如果该参数设置为false,则只能在当前文档编辑器中粘贴内容。默认值为true。
// download: true, //定义文档是可以下载还是只能在线查看或编辑。如果下载权限设置为“假”的下载为...菜单选项将是缺席的文件菜单。默认值为true。
// edit: true, //定义文档是可以编辑还是只能查看。如果编辑权限设置为“true”,则文件菜单将包含编辑文档菜单选项;请注意,如果编辑权限设置为“false”,文档将在查看器中打开,即使模式参数设置为edit,您也无法将其切换到编辑器。默认值为true。
// print: true, //定义是否可以打印文档。如果打印权限设置为“false”的打印菜单选项将是缺席的文件菜单。默认值为true
// },
// 所要渲染的文件的绝对路径,这个参数很重要,它传的不是文件的本地地址,而是需要把文件传到项目所依赖的服务器,然后拿到文件在服务器的url地址(这个一般情况需要后端支持)才可以用,这个参数决定了能不能实例化出来onlyoffice对象
url: `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/302`,
},
documentType: 'word', documentType: 'word',
height: '100%', fileId: '',
width: '100%', mode: 'view',
editorConfig: {
//语言:zh-CN简体中文/en英文
lang: 'zh-CN',
//阅读状态 view/edit
mode: 'view',
customization: {
//是否显示插件
plugins: false,
forcesave: true,
autosave: false,
},
user: {
// 当前正在view/edit此文档的用户信息
name: '管理员',
},
// 指定文档存储服务器的绝对路径
callbackUrl: `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=302`,
},
}, },
rightImgs: [], rightImgs: [],
leftSelectData: [], leftSelectData: [],
...@@ -133,8 +101,7 @@ export default { ...@@ -133,8 +101,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.leftSelectData = res.data this.leftSelectData = res.data
if (this.leftSelectData.length) { if (this.leftSelectData.length) {
this.config.document.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/downloadFile/${this.leftSelectData[0].fileId}` this.config.fileId = selectData[0].fileId
this.config.editorConfig.url = `${documentServerUrl}${EADC_SHARED_ABILITY}/callback?fileId=${this.leftSelectData[0].fileId}`
} }
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!