梅杰 6 سال پیش
والد
کامیت
e9a8e2b65c

+ 1 - 1
src/main/java/com/mooctest/controller/FinalReportController.java

@@ -53,7 +53,7 @@ public class FinalReportController {
 
     @PutMapping("final_report/{reportId}")
     @ResponseBody
-    public FinalReportDTO deleteReport(@PathVariable long reportId,
+    public FinalReportDTO updateReport(@PathVariable long reportId,
                              @RequestBody FinalReportDTO dto) {
         return finalReportService.update(reportId, dto);
     }

+ 2 - 0
src/main/java/com/mooctest/service/FinalReportService.java

@@ -33,7 +33,9 @@ public class FinalReportService {
         FinalReport report = finalReportDao.findOne(reportId);
         dto.setCreateTime(report.getCreateTime());
         BeanUtils.copyProperties(dto, report);
+        report.setImgUrls(String.join(",", dto.getImgUrls()));
         finalReportDao.save(report);
+
         return dto;
     }
 

+ 1 - 1
src/main/resources/templates/agg_report_new.html

@@ -479,6 +479,7 @@
         /*<![CDATA[*/
         for (var i=0;i<editReport.imgUrls.length;i++) {
             var src = editReport.imgUrls[i]
+            images.push(src);
             var $img = $('<img />')
             $img.attr("src", src);
             $img.attr("class", "my-img-thumbnail pointer to-delete");
@@ -497,7 +498,6 @@
             $new_report_img.append($img)
         }
         /*]]>*/
-        $("#new-report-img").val(editReport.description);
     }
     function deleteReport(finalReportId) {
         $.ajax({

+ 1 - 1
src/main/resources/templates/base.html

@@ -48,7 +48,7 @@
         <!-- Logo -->
         <a href="/home" class="logo">
             <span class="logo-lg">
-                    <b>MOOCTEST</b>
+                    <b>众包审核</b>
                 </span>
         </a>