diff --git a/src/components/Preview_onlyoffice/fun.js b/src/components/Preview_onlyoffice/fun.js
new file mode 100644
index 00000000..75a62a67
--- /dev/null
+++ b/src/components/Preview_onlyoffice/fun.js
@@ -0,0 +1,23 @@
+import Vue from "vue";
+import OnlyOffice from "./index.vue";
+
+const PreviewConstructor = Vue.extend(OnlyOffice);
+
+const onlyOffice = options => {
+ const { path, type, title } = options;
+ if (!path) throw `path is requred.but ${path}`
+ const id = `OnlyOffice_${new Date().getTime()}`;
+ const instance = new PreviewConstructor();
+ instance.id = id;
+ instance.vm = instance.$mount();
+ if (instance.vm.visible) return;
+ document.body.appendChild(instance.vm.$el);
+ instance.vm.open(path, type, title);
+ instance.vm.$on("closed", () => {
+ instance.vm.docEditor = null
+ document.body.removeChild(instance.vm.$el);
+ instance.vm.$destroy();
+ });
+ return instance.vm;
+}
+export default onlyOffice;
\ No newline at end of file
diff --git a/src/components/Preview_onlyoffice/index.js b/src/components/Preview_onlyoffice/index.js
new file mode 100644
index 00000000..b549c70f
--- /dev/null
+++ b/src/components/Preview_onlyoffice/index.js
@@ -0,0 +1,7 @@
+import OnlyOffice from "./index.vue";
+import onlyOffice from "./fun";
+
+export default Vue => {
+ Vue.component(OnlyOffice.name, OnlyOffice);
+ Vue.prototype.$onlyOffice = onlyOffice;
+};
\ No newline at end of file
diff --git a/src/components/Preview_onlyoffice/index.vue b/src/components/Preview_onlyoffice/index.vue
new file mode 100644
index 00000000..ae94ac95
--- /dev/null
+++ b/src/components/Preview_onlyoffice/index.vue
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 574da621..76e99388 100644
--- a/src/main.js
+++ b/src/main.js
@@ -54,6 +54,8 @@ import upload from '@/components/element-ui/upload'
Vue.use(upload)
import Preview from '@/components/Preview/index'
Vue.use(Preview)
+import Onlyoffice from '@/components/Preview_onlyoffice/index'
+Vue.use(Onlyoffice)
import MFA from '@/components/MFA/index'
Vue.use(MFA)
import FB from '@/components/feedBack/index'
diff --git a/src/utils/onlyOffice_type.js b/src/utils/onlyOffice_type.js
new file mode 100644
index 00000000..b7f6e7c9
--- /dev/null
+++ b/src/utils/onlyOffice_type.js
@@ -0,0 +1,66 @@
+let TYPES = ['word', 'cell', 'slide', 'pdf']
+
+let DOCUMENTTYPE = {
+ '.doc': TYPES[0],
+ '.docm': TYPES[0],
+ '.docx': TYPES[0],
+ '.dot': TYPES[0],
+ '.dotm': TYPES[0],
+ '.dotx': TYPES[0],
+ '.epub': TYPES[0],
+ '.fb2': TYPES[0],
+ '.fodt': TYPES[0],
+ '.htm': TYPES[0],
+ '.html': TYPES[0],
+ '.mht': TYPES[0],
+ '.mhtml': TYPES[0],
+ '.odt': TYPES[0],
+ '.ott': TYPES[0],
+ '.pages': TYPES[0],
+ '.rtf': TYPES[0],
+ '.stw': TYPES[0],
+ '.sxw': TYPES[0],
+ '.txt': TYPES[0],
+ '.wps': TYPES[0],
+ '.wpt': TYPES[0],
+ '.xml': TYPES[0],
+ '.csv': TYPES[1],
+ '.et': TYPES[1],
+ '.ett': TYPES[1],
+ '.fods': TYPES[1],
+ '.numbers': TYPES[1],
+ '.ods': TYPES[1],
+ '.ots': TYPES[1],
+ '.sxc': TYPES[1],
+ '.xls': TYPES[1],
+ '.xlsb': TYPES[1],
+ '.xlsm': TYPES[1],
+ '.xlsx': TYPES[1],
+ '.xlt': TYPES[1],
+ '.xltm': TYPES[1],
+ '.xltx': TYPES[1],
+ '.xml': TYPES[1],
+ '.dps': TYPES[2],
+ '.dpt': TYPES[2],
+ '.fodp': TYPES[2],
+ '.key': TYPES[2],
+ '.odp': TYPES[2],
+ '.otp': TYPES[2],
+ '.pot': TYPES[2],
+ '.potm': TYPES[2],
+ '.potx': TYPES[2],
+ '.pps': TYPES[2],
+ '.ppsm': TYPES[2],
+ '.ppsx': TYPES[2],
+ '.ppt': TYPES[2],
+ '.pptm': TYPES[2],
+ '.pptx': TYPES[2],
+ '.sxi': TYPES[2],
+ '.djvu': TYPES[3],
+ '.docxf': TYPES[3],
+ '.oform': TYPES[3],
+ '.oxps': TYPES[3],
+ '.pdf': TYPES[3],
+ '.xps': TYPES[3]
+}
+export default DOCUMENTTYPE
\ No newline at end of file
diff --git a/src/views/trials/trials-workbench/components/auditDocument/index.vue b/src/views/trials/trials-workbench/components/auditDocument/index.vue
index d977f916..4b4d0da4 100644
--- a/src/views/trials/trials-workbench/components/auditDocument/index.vue
+++ b/src/views/trials/trials-workbench/components/auditDocument/index.vue
@@ -67,6 +67,8 @@
+
{{ scope.row.Name }}
+
+
+
+
+
+
+
+
+
+
+
+