|
@@ -25,24 +25,24 @@ import (
|
|
|
)
|
|
|
|
|
|
type TableData struct {
|
|
|
- List []TableRow `json:"table";description:"列数据"`
|
|
|
+ List []TableRow `json:"table" description:"列数据"`
|
|
|
}
|
|
|
|
|
|
type TableRow struct {
|
|
|
- RowList []TableCel `json:"row";description:"列数据"`
|
|
|
+ RowList []TableCel `json:"row" description:"列数据"`
|
|
|
}
|
|
|
|
|
|
type TableCel struct {
|
|
|
- Value string `json:"value";description:"展示的数据"`
|
|
|
- ColumnSpan int `json:"column_span";description:"需要合同的列数量"`
|
|
|
- RowSpan int `json:"row_span";description:"需要合同的行数量"`
|
|
|
- IsMerged bool `json:"is_merged";description:"是否需要上下行合并"`
|
|
|
- IsFirstMerged bool `json:"is_first_merged";description:"是否是第一次合并上下行"`
|
|
|
- Background string `json:"background";description:"背景色"`
|
|
|
- IsBold bool `json:"is_bold";description:"是否加粗显示"`
|
|
|
- TextAlign string `json:"text_align";description:"对齐方式"`
|
|
|
- FontSize float64 `json:"font_size";description:"字体大小"`
|
|
|
- WidthPercent float64 `json:"width_percent";description:"单元格宽度占整个表格的百分比"`
|
|
|
+ Value string `json:"value" description:"展示的数据"`
|
|
|
+ ColumnSpan int `json:"column_span" description:"需要合同的列数量"`
|
|
|
+ RowSpan int `json:"row_span" description:"需要合同的行数量"`
|
|
|
+ IsMerged bool `json:"is_merged" description:"是否需要上下行合并"`
|
|
|
+ IsFirstMerged bool `json:"is_first_merged" description:"是否是第一次合并上下行"`
|
|
|
+ Background string `json:"background" description:"背景色"`
|
|
|
+ IsBold bool `json:"is_bold" description:"是否加粗显示"`
|
|
|
+ TextAlign string `json:"text_align" description:"对齐方式"`
|
|
|
+ FontSize float64 `json:"font_size" description:"字体大小"`
|
|
|
+ WidthPercent float64 `json:"width_percent" description:"单元格宽度占整个表格的百分比"`
|
|
|
}
|
|
|
|
|
|
//获取颜色配置
|
|
@@ -276,8 +276,8 @@ func GenerateWord(contractDetail *contract.ContractDetail) (err error) {
|
|
|
tableCel := TableCel{
|
|
|
Value: tmpCellList[k],
|
|
|
TextAlign: "center",
|
|
|
- //ColumnSpan int `json:"column_span";description:"需要合同的列数量"`
|
|
|
- //IsMerged bool `json:"is_merged";description:"是否需要上下行合并"`
|
|
|
+ //ColumnSpan int `json:"column_span" description:"需要合同的列数量"`
|
|
|
+ //IsMerged bool `json:"is_merged" description:"是否需要上下行合并"`
|
|
|
Background: backgrandColor,
|
|
|
IsBold: isBold,
|
|
|
FontSize: fontSize,
|
|
@@ -688,8 +688,8 @@ func GetHtmlByContractDetail(contractDetail *contract.ContractDetail, htmlType s
|
|
|
tableCel := TableCel{
|
|
|
Value: tmpCellList[k],
|
|
|
TextAlign: "center",
|
|
|
- //ColumnSpan int `json:"column_span";description:"需要合同的列数量"`
|
|
|
- //IsMerged bool `json:"is_merged";description:"是否需要上下行合并"`
|
|
|
+ //ColumnSpan int `json:"column_span" description:"需要合同的列数量"`
|
|
|
+ //IsMerged bool `json:"is_merged" description:"是否需要上下行合并"`
|
|
|
Background: backgrandColor,
|
|
|
IsBold: isBold,
|
|
|
FontSize: fontSize,
|