maxiaoshan 3 жил өмнө
parent
commit
2305fdb282

+ 9 - 0
src/lua/spiderwarn.go

@@ -59,6 +59,15 @@ func (l *Lua) SpiderWarn() {
 		}
 		if level != -1 {
 			query["level"] = level
+			//错误中区分中文错误和其他错误
+			if level == 2 {
+				query["info"] = "Field Value Not Contains Chinese"
+			} else if level == 3 {
+				query["level"] = 2
+				query["info"] = map[string]interface{}{
+					"$ne": "Field Value Not Contains Chinese",
+				}
+			}
 		}
 		if search != "" {
 			query["$or"] = []interface{}{

+ 7 - 6
src/web/templates/lua/spiderwarn.html

@@ -149,14 +149,15 @@
          "</div>&nbsp;"
           
           var selectStype="<div class='form-group' style='margin-top: -4px'><label for='name'>异常类型:</label>"+
-    				"<select id='errtype' onchange='checkclick(this.value)' class='form-control input-sm'>"+
-    				   "<option value='-1'>全部</option>"+
+              "<select id='errtype' onchange='checkclick(this.value)' class='form-control input-sm'>"+
+              "<option value='-1'>全部</option>"+
               "<option value='1'>警告</option>"+
-              "<option value='2'>错误</option>"+
-    				"</select></div>"
+              "<option value='2'>中文错误</option>"+
+              "<option value='3'>其他错误</option>"+
+              "</select></div>"
           $("#spiderwarn_filter").prepend(errStype);
-    				$("#spiderwarn_filter").prepend("&nbsp;");
-    				$("#spiderwarn_filter").prepend(selectStype);
+          $("#spiderwarn_filter").prepend("&nbsp;");
+          $("#spiderwarn_filter").prepend(selectStype);
           $("#spiderwarn_length").parent().css("width", "30%")
           $("#spiderwarn_filter").parent().css("width", "70%")
           $("#spiderwarn_filter").css({"display": "flex","text-align": "right","align-items": "center","justify-content": "flex-end"})