From e703b41ee825c66016f5f0fb80b5564d901ae666 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期一, 28 十月 2024 15:06:19 +0800
Subject: [PATCH] 优化出入库
---
src/components/tool/onlyoffice.vue | 39 ++++++++++++++++++++++++++-------------
1 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/src/components/tool/onlyoffice.vue b/src/components/tool/onlyoffice.vue
index f9865c6..1371068 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;
@@ -84,11 +97,11 @@
lang: option.lang, //璇█璁剧疆
//瀹氬埗
customization: {
- autosave: false, //鏄惁鑷姩淇濆瓨
+ autosave: true, //鏄惁鑷姩淇濆瓨
chat: true,
comments: false,
help: false,
- // "hideRightMenu": false,//瀹氫箟鍦ㄧ涓�娆″姞杞芥椂鏄樉绀鸿繕鏄殣钘忓彸渚ц彍鍗曘�� 榛樿鍊间负false
+ "hideRightMenu": false,//瀹氫箟鍦ㄧ涓�娆″姞杞芥椂鏄樉绀鸿繕鏄殣钘忓彸渚ц彍鍗曘�� 榛樿鍊间负false
//鏄惁鏄剧ず鎻掍欢
plugins: false
},
--
Gitblit v1.9.3