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 | 36 +++++++++++++++++++++++++-----------
1 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/src/components/tool/onlyoffice.vue b/src/components/tool/onlyoffice.vue
index db2ccb5..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) {
@@ -83,7 +97,7 @@
lang: option.lang, //璇█璁剧疆
//瀹氬埗
customization: {
- autosave: false, //鏄惁鑷姩淇濆瓨
+ autosave: true, //鏄惁鑷姩淇濆瓨
chat: true,
comments: false,
help: false,
--
Gitblit v1.9.3