panhui 5 سال پیش
والد
کامیت
dce7c0d7e6

+ 13 - 0
src/main/h5/src/components/previewRate.vue

@@ -14,6 +14,12 @@
       <div class="list" ref="list">
       <div class="list" ref="list">
         <rate-info :info="info" :rateInfo="rate" isPreview></rate-info>
         <rate-info :info="info" :rateInfo="rate" isPreview></rate-info>
       </div>
       </div>
+
+      <div class="submit">
+        <van-button @click="submit" :color="$colors.prim" block round
+          >确认提交</van-button
+        >
+      </div>
     </div>
     </div>
   </van-popup>
   </van-popup>
 </template>
 </template>
@@ -48,6 +54,9 @@ export default {
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.list.scrollTop = 0;
         this.$refs.list.scrollTop = 0;
       });
       });
+    },
+    submit() {
+      this.$emit("submit");
     }
     }
   }
   }
 };
 };
@@ -72,6 +81,10 @@ export default {
   overflow: hidden;
   overflow: hidden;
 }
 }
 
 
+.submit {
+  padding: 6px 26px;
+}
+
 /deep/ .van-popup--bottom {
 /deep/ .van-popup--bottom {
   .van-popup__close-icon--top-right {
   .van-popup__close-icon--top-right {
     top: 20px;
     top: 20px;

+ 21 - 9
src/main/h5/src/views/expert/expertAdd.vue

@@ -69,7 +69,7 @@
       <div class="text2">上传现场图片材料</div>
       <div class="text2">上传现场图片材料</div>
     </div>
     </div>
 
 
-    <van-uploader
+    <!-- <van-uploader
       :after-read="afterRead"
       :after-read="afterRead"
       :before-read="beforeRead"
       :before-read="beforeRead"
       :before-delete="beforeDelete"
       :before-delete="beforeDelete"
@@ -81,20 +81,20 @@
         <img src="../../assets/icon_add.svg" alt="" />
         <img src="../../assets/icon_add.svg" alt="" />
         <div class="text">点击上传</div>
         <div class="text">点击上传</div>
       </div>
       </div>
-    </van-uploader>
+    </van-uploader> -->
 
 
     <div class="bottom">
     <div class="bottom">
-      <van-button
+      <!-- <van-button
         @click="$refs.preview.init()"
         @click="$refs.preview.init()"
         class="preview"
         class="preview"
         color="#C4C7CC"
         color="#C4C7CC"
         block
         block
         round
         round
         >预览</van-button
         >预览</van-button
-      >
+      > -->
       <van-button
       <van-button
         class="submit"
         class="submit"
-        @click="submit"
+        @click="$refs.preview.init()"
         :color="$colors.prim"
         :color="$colors.prim"
         block
         block
         round
         round
@@ -103,7 +103,12 @@
       >
       >
     </div>
     </div>
 
 
-    <preview-rate ref="preview" :info="subJson" :rate="form"></preview-rate>
+    <preview-rate
+      ref="preview"
+      @submit="submit"
+      :info="subJson"
+      :rate="form"
+    ></preview-rate>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -224,6 +229,10 @@ export default {
     },
     },
     submit() {
     submit() {
       let form = { ...this.form };
       let form = { ...this.form };
+      this.$toast.loading({
+        message: "加载中...",
+        forbidClick: true
+      });
       this.$http
       this.$http
         .post("/rateExpertAudit/batchSave", {
         .post("/rateExpertAudit/batchSave", {
           audits: JSON.stringify(this.subJson)
           audits: JSON.stringify(this.subJson)
@@ -235,7 +244,8 @@ export default {
               id: this.$route.query.rateId,
               id: this.$route.query.rateId,
               status: "SUBMIT_GRADE",
               status: "SUBMIT_GRADE",
               img: form.img,
               img: form.img,
-              remark: form.remark
+              remark: form.remark,
+              submit: true
             },
             },
             { body: "json" }
             { body: "json" }
           );
           );
@@ -243,7 +253,9 @@ export default {
         .then(() => {
         .then(() => {
           this.saving = false;
           this.saving = false;
           this.$toast.success("成功");
           this.$toast.success("成功");
-          this.$router.go(-1);
+          setTimeout(() => {
+            this.$router.go(-1);
+          }, 1500);
         })
         })
         .catch(e => {
         .catch(e => {
           console.log(e);
           console.log(e);
@@ -273,7 +285,7 @@ export default {
   }
   }
   .submit {
   .submit {
     flex-grow: 1;
     flex-grow: 1;
-    margin-left: 13px;
+    // margin-left: 13px;
   }
   }
 }
 }
 .container {
 .container {

+ 57 - 6
src/main/vue/src/views/organization/GradeList.vue

@@ -43,16 +43,28 @@
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
 
 
-            <el-table-column label="专家评分" align="center" fixed="right" width="80">
+            <el-table-column label="最终评分" align="center" width="120">
                 <template slot-scope="{ row }">
                 <template slot-scope="{ row }">
                     <span v-if="getExpertScore(row.value)">{{ getExpertScore(row.value) }}</span>
                     <span v-if="getExpertScore(row.value)">{{ getExpertScore(row.value) }}</span>
-                    <el-button v-else-if="isEXPERT" @click="addScore(row)" type="primary" size="mini" plain
-                        >评分</el-button
-                    >
+                    <div v-else>
+                        <el-input-number
+                            style="width:100%"
+                            v-model="form[row.value]"
+                            size="mini"
+                            :min="1"
+                            :max="row.score"
+                            :step="1"
+                        >
+                        </el-input-number>
+                    </div>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
         </el-table>
         </el-table>
-        <div style="margin-top: 10px"><el-button @click="$router.go(-1)">返回</el-button></div>
+        <div style="margin-top: 10px;display:flex">
+            <el-button @click="$router.go(-1)">返回</el-button>
+            <div style="flex-grow:1"></div>
+            <el-button type="primary" v-if="submitList.length !== 0" @click="saveExpertScore">最终评分</el-button>
+        </div>
     </div>
     </div>
 </template>
 </template>
 <script>
 <script>
@@ -69,7 +81,9 @@ export default {
             downloading: false,
             downloading: false,
             spanArr: [],
             spanArr: [],
             tableHeight1: 620,
             tableHeight1: 620,
-            rateList: []
+            rateList: [],
+            info: {},
+            form: {}
         };
         };
     },
     },
     computed: {
     computed: {
@@ -83,12 +97,34 @@ export default {
             });
             });
 
 
             return !!info;
             return !!info;
+        },
+        submitList() {
+            return [...this.rateList]
+                .filter(item => {
+                    return !item.expertScore;
+                })
+                .map(item => {
+                    return {
+                        ...item,
+                        expertScore: this.form[item.type]
+                    };
+                });
         }
         }
     },
     },
     mounted() {
     mounted() {
         this.getGride();
         this.getGride();
     },
     },
     methods: {
     methods: {
+        saveExpertScore() {
+            this.$http
+                .post('/rateExpertAudit/batchSave', {
+                    audits: JSON.stringify(this.submitList)
+                })
+                .then(res => {
+                    this.$message.success('添加成功');
+                    this.getGride();
+                });
+        },
         getGride() {
         getGride() {
             this.$http
             this.$http
                 .post(
                 .post(
@@ -104,6 +140,16 @@ export default {
                 .then(res => {
                 .then(res => {
                     if (!res.empty) {
                     if (!res.empty) {
                         this.rateList = res.content;
                         this.rateList = res.content;
+
+                        let form = {};
+                        console.log(this.categories);
+
+                        [...this.categories].forEach(item => {
+                            form[item.value] = this.getValue(item.value);
+                        });
+                        console.log(form);
+
+                        this.form = form;
                     }
                     }
                 });
                 });
         },
         },
@@ -251,6 +297,11 @@ export default {
                         return total + this.getValue(currentValue.value);
                         return total + this.getValue(currentValue.value);
                     }, 0);
                     }, 0);
                     return;
                     return;
+                } else if (index === 6) {
+                    sums[index] = data.reduce((total, currentValue) => {
+                        return total + this.form[currentValue.value];
+                    }, 0);
+                    return;
                 } else {
                 } else {
                     return;
                     return;
                 }
                 }