Browse Source

change readme

master
godo 6 months ago
parent
commit
d146fec6f9
  1. 1
      README.md
  2. 4
      frontend/components.d.ts
  3. 4
      frontend/src/components/setting/SetSystem.vue
  4. 55
      frontend/src/components/window/OnlyOffice.vue

1
README.md

@ -17,6 +17,7 @@
- 新增远程状态下是否支持跨域
- 修复系统重启错误
- 支持配置onlyOffice地址,onlyOffice编辑word/ppt/excel文件
## 🏭 第三阶段目标(十二月底发布)
1. **文档处理与Markdown智能升级**:(已完成)

4
frontend/components.d.ts

@ -74,9 +74,13 @@ declare module 'vue' {
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput']
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTag: typeof import('element-plus/es')['ElTag']
Error: typeof import('./src/components/taskbar/Error.vue')['default']
FileIcon: typeof import('./src/components/builtin/FileIcon.vue')['default']
FileIconImg: typeof import('./src/components/builtin/FileIconImg.vue')['default']

4
frontend/src/components/setting/SetSystem.vue

@ -81,10 +81,10 @@
<label>地址</label>
<el-input v-model="config.onlyoffice.url" placeholder="https://godoos.com/onlyoffice 不要加斜杠" />
</div>
<div class="setting-item">
<!-- <div class="setting-item">
<label>私钥</label>
<el-input v-model="config.onlyoffice.sceret" />
</div>
</div> -->
</template>
<div class="setting-item">
<label></label>

55
frontend/src/components/window/OnlyOffice.vue

@ -6,11 +6,10 @@
<script lang="ts" setup>
import { DocumentEditor } from "@onlyoffice/document-editor-vue";
import { getSystemConfig, getSplit } from "@/system/config";
import { BrowserWindow, Dialog, Notify, System } from "@/system";
import { BrowserWindow } from "@/system";
import { ref, onMounted, inject } from "vue";
const config = getSystemConfig();
const sys: any = inject<System>("system");
const win: any = inject<BrowserWindow>("browserWindow");
const props = defineProps({
@ -24,7 +23,7 @@ const props = defineProps({
},
ext: {
type: String,
default: "md",
default: "docx",
},
});
@ -38,69 +37,29 @@ onMounted(async () => {
if (path != "") {
title = path.split(SP).pop();
}
const apiUrl = config.storenet.url || config.apiUrl
const fileKey = "docx" + Math.random()
editorConfig.value = {
document: {
fileType: props.ext, // fileType
key:fileKey,
title: title,
//url: blobUrl
url: config.storenet.url + "/file/readfile?stream="+fileKey+"&path=" + path,
url: apiUrl + "/file/readfile?stream="+fileKey+"&path=" + path,
"info": {
"owner": "王重阳",
"owner": "GodoOS",
},
token: config.onlyoffice.sceret,
//
"permissions": {
"edit": true, //false
"fillForms": true, //
"print": true, //
"review": false, //
"comment": true, // truemodeeditedit
"copy": true, //true
"download": true, //线falsetrue
"modifyContentControl": true, //modeedittrue
"modifyFilter": true, //truefalsemodeedittrue
}
},
documentType: props.onlyType,
editorConfig: {
lang: "zh",
callbackUrl: config.storenet.url + "/file/onlyofficecallback",
"canCoAuthoring": true,
"canHistoryClose": true,
"canHistoryRestore": true,
"canMakeActionLink": true,
"canRename": true,
"canRequestClose": true,
"canRequestCompareFile": true,
"canRequestCreateNew": true,
"canRequestEditRights": true,
"canRequestInsertImage": true,
"canRequestMailMergeRecipients": true,
"canRequestOpen": true,
"canRequestReferenceData": true,
"canRequestReferenceSource": true,
"canRequestSaveAs": true,
"canRequestSelectDocument": true,
"canRequestSelectSpreadsheet": true,
"canRequestSendNotify": true,
"canRequestSharingSettings": true,
"canRequestUsers": true,
"canSaveDocumentToBinary": true,
"canSendEmailAddresses": true,
"canStartFilling": true,
"canUseHistory": true,
callbackUrl: apiUrl + "/file/onlyofficecallback",
"user": { //
"id": "godoos", //ID
"name": "写作员" //
},
},
"events": {
}
}
console.log(editorConfig.value)
//console.log(editorConfig.value)
})
const onDocumentReady = () => {

Loading…
Cancel
Save