Browse Source

更新分词显示效果

MarkHuang 6 years atrás
parent
commit
fa96e72057
1 changed files with 48 additions and 46 deletions
  1. 48 46
      push-web/src/main/resources/static/pages/relation/sample.html

+ 48 - 46
push-web/src/main/resources/static/pages/relation/sample.html

@@ -337,60 +337,62 @@
                                 var symptoms = outputInfo.symptoms;
                                 if (symptoms != null) {
                                     $.each(symptoms, function (symptom_index, symptom) {
-                                        h += "<tr><td><strong>";
+                                        if (symptom.symptomName.length > 0) {
+                                            h += "<tr><td><strong>";
 
-                                        if (symptom.negative != null) {
-                                            h += symptom.negative.negaName;
-                                        }
-                                        h += symptom.symptomName + "</strong></td>"
-
-                                        h += "<td>";
-                                        if (symptom.timestamp != null) {
-                                            $.each(symptom.timestamp, function (ts_index, ts) {
-                                                h += ts.value + ts.unit + " ";
-                                            });
-                                        }
-                                        h += "</td>";
-
-                                        h += "<td>";
-                                        if (symptom.property != null) {
-                                            h += symptom.property.propertyName;
-                                        }
-                                        h += "</td>";
+                                            if (symptom.negative != null) {
+                                                h += symptom.negative.negaName;
+                                            }
+                                            h += symptom.symptomName + "</strong></td>"
 
-                                        h += "<td>";
-                                        if (symptom.cause != null) {
-                                            h += symptom.cause.causeName;
-                                        }
-                                        h += "</td>";
+                                            h += "<td>";
+                                            if (symptom.timestamp != null) {
+                                                $.each(symptom.timestamp, function (ts_index, ts) {
+                                                    h += ts.value + ts.unit + " ";
+                                                });
+                                            }
+                                            h += "</td>";
 
-                                        h += "<td><span class=\"label label-success\">";
-                                        if (symptom.degree != null) {
-                                            if (symptom.degree.pd != null) {
-                                                h += symptom.degree.degreeName + "(" + symptom.degree.pd.value + symptom.degree.pd.unit + ")";
-                                            } else {
-                                                h += symptom.degree.degreeName;
+                                            h += "<td>";
+                                            if (symptom.property != null) {
+                                                h += symptom.property.propertyName;
                                             }
-                                        }
-                                        h += "</span></td>";
+                                            h += "</td>";
 
-                                        h += "<td>";
-                                        if (symptom.bodyPart != null) {
-                                            if (symptom.bodyPart.position != null) {
-                                                h += symptom.bodyPart.position.positionName + symptom.bodyPart.partBodyName;
-                                            } else {
-                                                h += symptom.bodyPart.partBodyName;
+                                            h += "<td>";
+                                            if (symptom.cause != null) {
+                                                h += symptom.cause.causeName;
                                             }
-                                        }
-                                        h += "</td>";
+                                            h += "</td>";
+
+                                            h += "<td><span class=\"label label-success\">";
+                                            if (symptom.degree != null) {
+                                                if (symptom.degree.pd != null) {
+                                                    h += symptom.degree.degreeName + "(" + symptom.degree.pd.value + symptom.degree.pd.unit + ")";
+                                                } else {
+                                                    h += symptom.degree.degreeName;
+                                                }
+                                            }
+                                            h += "</span></td>";
+
+                                            h += "<td>";
+                                            if (symptom.bodyPart != null) {
+                                                if (symptom.bodyPart.position != null) {
+                                                    h += symptom.bodyPart.position.positionName + symptom.bodyPart.partBodyName;
+                                                } else {
+                                                    h += symptom.bodyPart.partBodyName;
+                                                }
+                                            }
+                                            h += "</td>";
 
-                                        h += "<td>";
-                                        if (symptom.pds != null) {
-                                            $.each(symptom.pds, function (pd_index, pd) {
-                                                h += pd.value + pd.unit + " ";
-                                            });
+                                            h += "<td>";
+                                            if (symptom.pds != null) {
+                                                $.each(symptom.pds, function (pd_index, pd) {
+                                                    h += pd.value + pd.unit + " ";
+                                                });
+                                            }
+                                            h += "</td>";
                                         }
-                                        h += "</td>";
                                     });
                                 }