瀏覽代碼

fix:管理规则发生日期回显

zqbao 6 月之前
父節點
當前提交
851a5227ad
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      services/data/excel/excel_info.go

+ 6 - 3
services/data/excel/excel_info.go

@@ -720,10 +720,8 @@ func ExcelRuleFormat(req *request.ExcelRuleMappingReq, lang string) (res *excel.
 			return nil, err
 		}
 		res.LeftValue = fmt.Sprintf("%d,%d", x, y)
-		res.LeftValueShow = req.LeftValue
 	default:
 		res.LeftValue = req.LeftValue
-		res.LeftValueShow = req.LeftValue
 	}
 	switch req.RightValueType {
 	// 坐标
@@ -738,7 +736,12 @@ func ExcelRuleFormat(req *request.ExcelRuleMappingReq, lang string) (res *excel.
 		res.RightValue = req.RightValue
 		res.RightValueShow = req.RightValue
 	}
-
+	if res.LeftValueShow == "" {
+		res.LeftValueShow = req.LeftValue
+	}
+	if res.RightValueShow == "" {
+		res.RightValueShow = req.RightValue
+	}
 	res.RuleType = req.RuleType
 	res.ExcelInfoId = req.ExcelInfoId
 	res.ExcelInfoRuleMappingId = req.ExcelRuleMappingId