소스 검색

kml上传路径修改

lamphua 3 달 전
부모
커밋
9715074e9e

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesAchievementController.java 파일 보기

@@ -218,10 +218,10 @@ public class FilesAchievementController extends BaseController
218 218
                 File profilePath = new File(profile);
219 219
                 if (!profilePath.exists())//若此目录不存在,则创建之
220 220
                     profilePath.mkdirs();
221
-                File transferFile = new File( profilePath + "\\" + uploadKmlFile.getOriginalFilename());
221
+                File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadKmlFile.getOriginalFilename());
222 222
                 if (!transferFile.exists())
223 223
                     uploadKmlFile.transferTo(transferFile);
224
-                filesAchievement.setKmlUrl(transferFile.getName());
224
+                filesAchievement.setKmlUrl("/uploadKmlFiles/" + transferFile.getName());
225 225
                 return false;
226 226
             }
227 227
             else

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java 파일 보기

@@ -158,7 +158,7 @@ public class FilesProjectController extends BaseController {
158 158
                 File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadProjectKmlFile.getOriginalFilename());
159 159
                 if (!transferFile.exists())
160 160
                     uploadProjectKmlFile.transferTo(transferFile);
161
-                cmcProject.setProjectKml(transferFile.getName());
161
+                cmcProject.setProjectKml("/uploadKmlFiles/" + transferFile.getName());
162 162
                 return false;
163 163
             }
164 164
             else

+ 2
- 1
oa-ui/src/views/file/filesProject/project.vue 파일 보기

@@ -545,7 +545,7 @@ export default {
545 545
           const formDataEntries = [];
546 546
           // 遍历 modifyForm,收集非空、非对象、非特定跳过的字段  
547 547
           for (let key in this.modifyForm) {
548
-            if (key === 'contract' || key === 'partyA' || key === 'projectPlannerUser' || this.modifyForm[key] instanceof Object) {
548
+            if (key === 'contract' || key === 'partyA' || key.endsWith('User')  || this.modifyForm[key] instanceof Object) {
549 549
               continue;
550 550
             }
551 551
 
@@ -764,6 +764,7 @@ export default {
764 764
           /* line  */
765 765
           if (polylines.length != 0) {
766 766
             let coords = polylines[0].getElementsByTagName('coordinates')[0].childNodes[0].nodeValue.trim();
767
+            console.log(coords);
767 768
             let points = coords.split(" ");
768 769
             let polylinesList = [];
769 770
             for (const p of points) {

Loading…
취소
저장