Browse Source

无勾选,不提示

chenjz 3 years ago
parent
commit
e4ec937238
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/webapp/static/js/analysis/special_analysis.js

+ 2 - 2
src/main/webapp/static/js/analysis/special_analysis.js

@@ -142,7 +142,7 @@ function itemCheck(o){
142 142
 		productTypeList.push(type);
143 143
 		productNameList.push(data[1]);
144 144
 	});
145
-	if((new Set(productTypeList)).size != 1){
145
+	if(productTypeList.length > 0 && (new Set(productTypeList)).size != 1){
146 146
         alert("请选择同是产品或栏目对标分析。");
147 147
         $(o).attr("checked", false);
148 148
 		$.checkbox();
@@ -175,7 +175,7 @@ function setBenchmark(){
175 175
 	    productTypeList.push(type);
176 176
 		productNameList.push(data[1]);
177 177
 	});
178
-	if((new Set(productTypeList)).size != 1){
178
+	if(productTypeList.length > 0 && (new Set(productTypeList)).size != 1){
179 179
         alert("请选择同是产品或栏目对标分析。");
180 180
 		return false;
181 181
     }