Browse Source

Merge branch 'master' of http://39.106.8.246:3003/BDTP/adm-front into ql

qule 3 years ago
parent
commit
1baeec9883
3 changed files with 9 additions and 6 deletions
  1. 4 4
      package.json
  2. 4 2
      src/components/globaluploader/index.vue
  3. 1 0
      static/systemConf.js

+ 4 - 4
package.json

@@ -19,10 +19,10 @@
     "publish": "node publish.js"
   },
   "dependencies": {
-    "@saga-web/base": "2.1.27",
-    "@saga-web/cad-engine": "2.0.595",
-    "@saga-web/draw": "2.1.113",
-    "@saga-web/graph": "2.1.138",
+    "@saga-web/base": "^2.1.28",
+    "@saga-web/cad-engine": "^2.0.595",
+    "@saga-web/draw": "^2.1.114",
+    "@saga-web/graph": "^2.1.139",
     "axios": "^0.18.0",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",

+ 4 - 2
src/components/globaluploader/index.vue

@@ -67,6 +67,8 @@ import { getUploadId, mergeMultipart } from '@/api/uploader';
 import request from "@/api/model/file.js";
 import { mapGetters, mapMutations } from 'vuex'
 
+const chunkSize = window.__systemConf.chunkSize; // 切片尺寸 duxiangyu 2021-12-20
+
 export default {
   data() {
     return {
@@ -79,7 +81,7 @@ export default {
       },
       options: {
         target: '/image-service/common/multipart_upload',
-        chunkSize: 1*1024*1024,
+        chunkSize: chunkSize,
         fileParameterName: 'file',
         allowDuplicateUploads: true, //允许重复上传
         maxChunkRetries: 3,
@@ -248,7 +250,7 @@ export default {
       let time = new Date().getTime();
       let blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
       let currentChunk = 0;
-      const chunkSize = 1 * 1024 * 1024;
+      // const chunkSize = chunkSize;
       let chunks = Math.ceil(file.size / chunkSize);
     //   let chunks = Math.floor(file.size / chunkSize);
       let spark = new SparkMD5.ArrayBuffer();

+ 1 - 0
static/systemConf.js

@@ -125,5 +125,6 @@ var __systemConf = {
       group_code: "WD"
     }
   ],
+  chunkSize: 1024 * 1024 * 5, // 断点续传 切片大小 5M
 };
 window.__systemConf = __systemConf;