Przeglądaj źródła

kml上传路径修改

lamphua 5 miesięcy temu
rodzic
commit
9715074e9e

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesAchievementController.java Wyświetl plik

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

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java Wyświetl plik

158
                 File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadProjectKmlFile.getOriginalFilename());
158
                 File transferFile = new File( profilePath + "/upload/uploadKmlFiles/" + uploadProjectKmlFile.getOriginalFilename());
159
                 if (!transferFile.exists())
159
                 if (!transferFile.exists())
160
                     uploadProjectKmlFile.transferTo(transferFile);
160
                     uploadProjectKmlFile.transferTo(transferFile);
161
-                cmcProject.setProjectKml(transferFile.getName());
161
+                cmcProject.setProjectKml("/uploadKmlFiles/" + transferFile.getName());
162
                 return false;
162
                 return false;
163
             }
163
             }
164
             else
164
             else

+ 2
- 1
oa-ui/src/views/file/filesProject/project.vue Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz