Przeglądaj źródła

Merge branch 'dev' of licailing/wenlvju into master

licailing 5 lat temu
rodzic
commit
d03887a0c1

+ 53 - 1
src/main/h5/src/views/expert/expertAdd.vue

@@ -84,6 +84,15 @@
     </van-uploader> -->
     </van-uploader> -->
 
 
     <div class="bottom">
     <div class="bottom">
+      <van-button
+        @click="save"
+        class="preview"
+        color="#ffcf6a"
+        block
+        round
+        style="margin-right:12px"
+        >暂存</van-button
+      >
       <!-- <van-button
       <!-- <van-button
         @click="$refs.preview.init()"
         @click="$refs.preview.init()"
         class="preview"
         class="preview"
@@ -169,7 +178,32 @@ export default {
         };
         };
       });
       });
     });
     });
-    this.submitList = subList;
+
+    this.$http
+      .post(
+        "/rateExpertAudit/all",
+        {
+          query: {
+            rateId: this.$route.query.rateId
+          }
+        },
+        { body: "json" }
+      )
+      .then(res => {
+        res.content.forEach(item => {
+          subList[item.type] = {
+            ...item,
+            imgs: item.img.map(img => {
+              return {
+                url: img
+              };
+            })
+          };
+        });
+
+        this.submitList = subList;
+        // this.rateList = res.content;
+      });
   },
   },
   methods: {
   methods: {
     afterRead(file, detail) {
     afterRead(file, detail) {
@@ -227,6 +261,24 @@ export default {
         });
         });
       });
       });
     },
     },
+    save() {
+      let form = { ...this.form };
+      this.$toast.loading({
+        message: "加载中...",
+        forbidClick: true
+      });
+      this.$http
+        .post("/rateExpertAudit/batchSave", {
+          audits: JSON.stringify(this.subJson)
+        })
+        .then(() => {
+          this.$toast.success("成功");
+        })
+        .catch(e => {
+          console.log(e);
+          this.$message.error(e.error);
+        });
+    },
     submit() {
     submit() {
       let form = { ...this.form };
       let form = { ...this.form };
       this.$toast.loading({
       this.$toast.loading({

+ 0 - 8
src/main/h5/src/views/expert/expertDetail.vue

@@ -162,14 +162,6 @@ export default {
             .then(res => {
             .then(res => {
               this.rateList = res.content;
               this.rateList = res.content;
             });
             });
-          let audit = {
-            rateId: this.rateInfo.id,
-            remark: "专家组已线下考察完毕",
-            status: "SUBMIT_GRADE"
-          };
-          this.$http.post("/rateAudit/save", audit, {
-            body: "json"
-          });
           return this.$http.get("/organization/get/" + res.organizationId);
           return this.$http.get("/organization/get/" + res.organizationId);
         })
         })
         .then(res => {
         .then(res => {

+ 9 - 2
src/main/java/com/izouma/wenlvju/service/RateService.java

@@ -62,6 +62,7 @@ public class RateService {
         String district = record.getDistrict();
         String district = record.getDistrict();
         if (record.getId() != null) {
         if (record.getId() != null) {
             Rate orig = rateRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
             Rate orig = rateRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
+            boolean examination = orig.isUndertakeExamination();
             ObjUtils.merge(orig, record);
             ObjUtils.merge(orig, record);
 
 
             switch (record.getStatus()) {
             switch (record.getStatus()) {
@@ -78,8 +79,14 @@ public class RateService {
                     njwlSmsService.sendSms(map.get("phone1"), map.get("message1"));
                     njwlSmsService.sendSms(map.get("phone1"), map.get("message1"));
                     break;
                     break;
                 case SUBMIT_GRADE:// 专家组提交成绩 4
                 case SUBMIT_GRADE:// 专家组提交成绩 4
-                    orig.setUndertakeExamination(orig.isUndertakeExamination());
-
+                    orig.setUndertakeExamination(examination);
+                    RateAudit rateAudit = RateAudit.builder()
+                            .userId(orig.getExpertUserId())
+                            .rateId(orig.getId())
+                            .remark("专家组已线下考察完毕")
+                            .status(RateStatus.SUBMIT_GRADE)
+                            .build();
+                    rateAuditRepo.save(rateAudit);
                     Map<String, String> gradeMessage = this.gradeMessage(now, orig.getExpertUserId(), orig
                     Map<String, String> gradeMessage = this.gradeMessage(now, orig.getExpertUserId(), orig
                             .getName());
                             .getName());
                     njwlSmsService.sendSms(gradeMessage.get("phone"), gradeMessage.get("message"));
                     njwlSmsService.sendSms(gradeMessage.get("phone"), gradeMessage.get("message"));

+ 2 - 2
src/main/vue/src/plugins/http.js

@@ -5,8 +5,8 @@ import qs from 'qs';
 let baseUrl = 'http://localhost:8080';
 let baseUrl = 'http://localhost:8080';
 switch (process.env.NODE_ENV) {
 switch (process.env.NODE_ENV) {
     case 'development':
     case 'development':
-        // baseUrl = 'http://localhost:8080';
-        baseUrl = 'http://wlj.izouma.com';
+        baseUrl = 'http://localhost:8080';
+        // baseUrl = 'http://wlj.izouma.com';
         break;
         break;
     case 'test':
     case 'test':
         baseUrl = 'http://localhost:8080';
         baseUrl = 'http://localhost:8080';