Bläddra i källkod

解决无效分析对比结果为空报错

zhuhao 2 år sedan
förälder
incheckning
8c5b742a5d
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4 1
      RMS-FrontEnd/src/views/report/Invalid/InvalidPage/Result.vue

+ 4 - 1
RMS-FrontEnd/src/views/report/Invalid/InvalidPage/Result.vue

@@ -684,7 +684,10 @@ export default {
                 }
                 // this.tableData = []
                 this.$api.selectCompareRecord(a).then(response=>{
-                  if(response.code == 200){
+                  if (response.code == 200) {
+                    if (response.data.length == 0) {
+                      return false
+                    }
                     this.CompareRecord = JSON.parse(JSON.stringify(response.data.records))
                     // //console.log(response.data)
                     var b = JSON.parse(JSON.stringify(this.tableData[0]))