Browse Source

fix:表格管理规则数据校验

zqbao 6 months ago
parent
commit
0cdc263c33
1 changed files with 2 additions and 6 deletions
  1. 2 6
      controllers/data_manage/excel/excel_info.go

+ 2 - 6
controllers/data_manage/excel/excel_info.go

@@ -3152,12 +3152,8 @@ func (c *ExcelInfoController) AddExcelRule() {
 		br.Msg = "应用选区不能为空"
 		return
 	}
-	if req.FontColor == "" {
-		br.Msg = "字体颜色不能为空"
-		return
-	}
-	if req.BackgroundColor == "" {
-		br.Msg = "背景颜色不能为空"
+	if req.FontColor == "" && req.BackgroundColor == "" {
+		br.Msg = "字体颜色和背景颜色不能同时为空"
 		return
 	}
 	if req.RuleType == 3 && req.RightValue == "" {