|
@@ -9,13 +9,15 @@
|
|
|
:footer="null"
|
|
|
destroyOnClose
|
|
|
>
|
|
|
- <iframe width="100%" height="100%" src="/fileEdit.html" frameborder="0" scrolling="no"></iframe>
|
|
|
+ <!-- <iframe width="100%" height="100%" src="D:/mky/apps/mky-vent-base/public/fileEdit.html" frameborder="0" scrolling="no"></iframe> -->
|
|
|
<!-- <FormModal :record="record" @saveOrUpdate="(values) => emit('saveOrUpdate', values)" /> -->
|
|
|
+ <div id="fileEdit"></div>
|
|
|
</BasicModal>
|
|
|
</template>
|
|
|
<script lang="ts" setup>
|
|
|
import { computed, unref, inject, reactive } from 'vue';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
+import { onMounted } from 'vue';
|
|
|
// import FormModal from './FormModal.vue';
|
|
|
// 声明Emits
|
|
|
// const emit = defineEmits(['saveOrUpdate', 'register']);
|
|
@@ -27,6 +29,48 @@
|
|
|
//重置表单
|
|
|
setModalProps({ confirmLoading: false });
|
|
|
Object.assign(record, data.record);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ new DocsAPI.DocEditor("fileEdit", // 元素id
|
|
|
+ {
|
|
|
+ type: "desktop",
|
|
|
+ width: "100%",
|
|
|
+ height: "1000px",
|
|
|
+ document: {
|
|
|
+ title: "文档管理",
|
|
|
+ url: "http://192.168.187.1:9999/ventanaly-sharefile/fileServer/onlyOffice/read?id=[[${id}]]",//id表示文件id,后端接口用这个id来加载文件
|
|
|
+ fileType: "docx",//当文件类型为doc、xls、ppt时,对应用docx、xlsx、pptx否则会保存异常。
|
|
|
+ key: "",
|
|
|
+ lang: "zh-CN",
|
|
|
+ permissions: {
|
|
|
+ "download": true,//是否可下载
|
|
|
+ "edit": true,
|
|
|
+ "fillForms": true,
|
|
|
+ "print": true,//是否可打印
|
|
|
+ }
|
|
|
+ },
|
|
|
+ editorConfig: {
|
|
|
+ "lang": "zh-CN",
|
|
|
+ mode: "edit",//view:只读且可复制内容,edit:可编辑
|
|
|
+ "callbackUrl": "http://192.168.187.1:9999/ventanaly-sharefile/fileServer/onlyOffice/save?id=[[${id}]]",//id表示文件id,后端接口用这个id来加载文件
|
|
|
+ "coEditing": {
|
|
|
+ "mode": "fast",
|
|
|
+ "change": true
|
|
|
+ },
|
|
|
+ "customization": {
|
|
|
+ "toolbarNoTabs": true,
|
|
|
+ "autosave": false,//是否自动保存
|
|
|
+ "forcesave": true,//定义保存按钮是否显示
|
|
|
+ "hideRightMenu": true,
|
|
|
+ },
|
|
|
+ //用户信息
|
|
|
+ "user": {
|
|
|
+ "id": "857857", //用户ID
|
|
|
+ "name": "小陈" //用户名称
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
//设置标题
|
|
@@ -47,7 +91,12 @@
|
|
|
|
|
|
// !unref(isUpdate) ? `新增(${record.strname || record.systemname})` : `编辑(${record.strname || record.systemname})`
|
|
|
);
|
|
|
+
|
|
|
+ onMounted(() => {
|
|
|
+
|
|
|
+ })
|
|
|
</script>
|
|
|
+
|
|
|
<style scoped lang="less">
|
|
|
::v-deep .suffix {
|
|
|
height: 32px;
|