yangbifan преди 2 години
родител
ревизия
5801054a9f
променени са 10 файла, в които са добавени 97 реда и са изтрити 1 реда
  1. BIN
      dist (2).zip
  2. BIN
      dist (3).zip
  3. BIN
      dist (4).zip
  4. BIN
      dist (5).zip
  5. BIN
      dist.zip
  6. 1 0
      package.json
  7. 71 0
      src/pages/main/onlineOffice/index.vue
  8. 6 0
      src/router/index.js
  9. 14 1
      vue.config.js
  10. 5 0
      yarn.lock

BIN
dist (2).zip


BIN
dist (3).zip


BIN
dist (4).zip


BIN
dist (5).zip


BIN
dist.zip


+ 1 - 0
package.json

@@ -12,6 +12,7 @@
     "@fullcalendar/daygrid": "^5.10.1",
     "@fullcalendar/interaction": "^5.10.1",
     "@fullcalendar/vue": "^5.10.1",
+    "@onlyoffice/document-editor-vue": "^1.2.0",
     "@tinymce/tinymce-vue": "^3.0.1",
     "axios": "^0.19.0",
     "canvg": "^3.0.7",

+ 71 - 0
src/pages/main/onlineOffice/index.vue

@@ -0,0 +1,71 @@
+<template>
+      <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
+                        </myUpload>
+    <!-- <DocumentEditor id="docEditor" documentServerUrl="http://documentserver/" :config="config" /> -->
+</template>
+
+<script>
+
+import { DocumentEditor } from "@onlyoffice/document-editor-vue";
+import myUpload from '../../../components/upload'
+export default {
+    name: 'ExampleComponent',
+    components: {
+        DocumentEditor,
+        myUpload
+    },
+    data() {
+        return {
+            config: {
+
+            },
+            configs: {
+                document: {
+                    fileType: "docx",
+                    key: "Khirz6zTPdfd7",
+                    title: "Example Document Title.docx",
+                    url: "https://example.com/url-to-example-document.docx"
+                },
+                documentType: "word",
+                editorConfig: {
+                    callbackUrl: "https://example.com/url-to-callback.ashx"
+                }
+            },
+            fileInfo: {
+                    limit: 10,
+                    url: '/aps/api/file/upload',
+                    fileList: []
+                },
+        }
+    },
+    mounted(){
+     this.getList()
+    }, 
+    methods: {
+        getList() {
+            this.$http({
+                url: "/aps/restEdit",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    edit:true,
+                    userId:'fanyan',
+                    userName:'范岩'
+                },
+            }).then((res) => {
+                console.log(res);
+            });
+        },
+        onDocumentReady() {
+            console.log("Document is loaded");
+        },
+        uploadBack(){
+
+        }
+    },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 6 - 0
src/router/index.js

@@ -16,6 +16,12 @@ const routes = [{
             component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/infotech/index.vue'], resolve)
         },
         {
+            meta: { name: '在线onlineOffice', keepAlive: false },
+            path: '/onlineOffice',
+            name: 'onlineOffice',
+            component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/onlineOffice/index.vue'], resolve)
+        },
+        {
             meta: { name: '绩效', keepAlive: false },
             path: '/performance',
             name: 'performance',

+ 14 - 1
vue.config.js

@@ -100,6 +100,15 @@ module.exports = {
                     "^/market": "",
                 },
             },
+            "/aps": {
+                target: "http://192.168.2.124:7779",
+                ws: false,
+                changeOrigin: true,
+                logLevel:'debug',
+                pathRewrite: {
+                    "^/aps": "/api/file",
+                },
+            },
             "/market/mk": {
                 target: "http://192.168.2.124:9113",
                 ws: false,
@@ -124,7 +133,7 @@ module.exports = {
                     "^/market": "",
                 },
             },
-            // 开发环境变化可注释 ⬆️⬆️
+            // 开发环境变化可注释 
             "/": {
                 // target: 'http://192.168.2.145:9600/spfm',
                 // target: 'http://192.168.2.149:9600',
@@ -138,6 +147,10 @@ module.exports = {
                 // target: "http://124.223.66.248:9600",
                 // target: "http://43.138.50.94:9600",
                 changeOrigin: true,
+                logLevel:'debug',
+                pathRewrite: {
+                    "^/market": "/",
+                },
             },
         },
     },

+ 5 - 0
yarn.lock

@@ -1129,6 +1129,11 @@
   resolved "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
   integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
 
+"@onlyoffice/document-editor-vue@^1.2.0":
+  version "1.2.0"
+  resolved "https://registry.yarnpkg.com/@onlyoffice/document-editor-vue/-/document-editor-vue-1.2.0.tgz#8c466db70549bba5e68a311b59f51d6bd687b5e9"
+  integrity sha512-sFRElG3gyLeKr6GR2iokLxWnYKRLy2bEeFWZMiHlX0z0M+GpWd14pkCTncJQt+u8HufkKQUtjkdzjuROfKcxxQ==
+
 "@socket.io/component-emitter@~3.1.0":
   version "3.1.0"
   resolved "https://registry.npmmirror.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553"