zs пре 8 месеци
родитељ
комит
bfd3f441ba

+ 3 - 0
src/config/config.default.ts

@@ -17,4 +17,7 @@ export default {
     es: 'http://127.0.0.1:9701/cxyy/es',
     mq: 'http://127.0.0.1:9702/cxyy/mq',
   },
+  PathConfig: {
+    path: 'C:\\temp\\cxyy\\',
+  },
 } as MidwayConfig;

+ 3 - 0
src/config/config.local.ts

@@ -72,4 +72,7 @@ export default {
   upload: {
     whitelist: null,
   },
+  PathConfig: {
+    path: 'C:\\temp\\cxyy\\',
+  },
 } as MidwayConfig;

+ 3 - 0
src/config/config.prod.ts

@@ -74,4 +74,7 @@ export default {
   upload: {
     whitelist: null,
   },
+  PathConfig: {
+    path: '/home/workspace/service/proxy/upload/cxyy/export',
+  },
 } as MidwayConfig;

+ 4 - 1
src/config/config.self.ts

@@ -72,6 +72,9 @@ export default {
     },
   },
   upload: {
-    whitelist: null,
+    // whitelist: null,
+  },
+  PathConfig: {
+    path: 'D:\\temp\\cxyy\\',
   },
 } as MidwayConfig;

+ 3 - 3
src/service/util.service.ts

@@ -39,15 +39,15 @@ export class UtilService {
   @Inject()
   dictDataService: DictDataService;
 
-  @Config('upload.realdir')
-  uploadDir;
+  @Config('PathConfig.path')
+  path;
 
   // 导出
   async toExport(query) {
     const { table, config, user } = query;
     const nowDate = new Date().getTime();
     const filename = `产学研用导出-${table}-${nowDate}.xlsx`;
-    const path = 'D:\\temp\\cxyy\\';
+    const path = this.path;
     if (!path) {
       throw new ServiceError('服务端没有设置存储路径');
     }