From 57e76b55709e8ea88a83ab6c3f665fd9ee7fd64c Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期三, 03 七月 2024 14:23:48 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master --- src/components/tool/onlyoffice.vue | 37 +++++++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/components/tool/onlyoffice.vue b/src/components/tool/onlyoffice.vue index f9865c6..209b12a 100644 --- a/src/components/tool/onlyoffice.vue +++ b/src/components/tool/onlyoffice.vue @@ -6,6 +6,7 @@ <script> export default { name: "VabOnlyOffice", + props: ['options'], data() { return { doctype: "", @@ -24,16 +25,29 @@ }; }, created() { - const option = this.$route.query - this.option.url = option.url - this.option.isEdit = option.isEdit === "true" ? true : false - this.option.fileType = option.fileType - this.option.title = option.title - this.option.lang = option.lang - this.option.isPrint = option.isPrint - this.option.user.id = option.user_id - this.option.user.name = option.user_name - this.option.editUrl = option.editUrl + if(this.options){ + const option = this.options + this.option.url = option.url + this.option.isEdit = option.isEdit === "true" ? true : false + this.option.fileType = option.fileType + this.option.title = option.title + this.option.lang = option.lang + this.option.isPrint = option.isPrint + this.option.user.id = option.user_id + this.option.user.name = option.user_name + this.option.editUrl = option.editUrl + }else{ + const option = this.$route.query + this.option.url = option.url + this.option.isEdit = option.isEdit === "true" ? true : false + this.option.fileType = option.fileType + this.option.title = option.title + this.option.lang = option.lang + this.option.isPrint = option.isPrint + this.option.user.id = option.user_id + this.option.user.name = option.user_name + this.option.editUrl = option.editUrl + } }, beforeDestroy() { if (this.docEditor !== null) { @@ -57,7 +71,6 @@ }, methods: { async setEditor(option) { - console.log(`output->option`,option) if (this.docEditor !== null) { this.docEditor.destroyEditor(); this.docEditor = null; @@ -88,7 +101,7 @@ chat: true, comments: false, help: false, - // "hideRightMenu": false,//瀹氫箟鍦ㄧ涓�娆″姞杞芥椂鏄樉绀鸿繕鏄殣钘忓彸渚ц彍鍗曘�� 榛樿鍊间负false + "hideRightMenu": false,//瀹氫箟鍦ㄧ涓�娆″姞杞芥椂鏄樉绀鸿繕鏄殣钘忓彸渚ц彍鍗曘�� 榛樿鍊间负false //鏄惁鏄剧ず鎻掍欢 plugins: false }, -- Gitblit v1.9.3