Compare commits
3 Commits
de165d3ce7
...
2c35309a66
| Author | SHA1 | Date |
|---|---|---|
|
|
2c35309a66 | |
|
|
e942847b89 | |
|
|
697d1f0d77 |
|
|
@ -1003,7 +1003,7 @@ public class ExcelUtil<T>
|
|||
String separator = attr.separator();
|
||||
if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value))
|
||||
{
|
||||
cell.getCellStyle().setDataFormat(this.wb.getCreationHelper().createDataFormat().getFormat(dateFormat));
|
||||
cell.setCellStyle(createCellStyle(cell.getCellStyle(), dateFormat));
|
||||
cell.setCellValue(parseDateToStr(dateFormat, value));
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value))
|
||||
|
|
@ -1033,6 +1033,21 @@ public class ExcelUtil<T>
|
|||
return cell;
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用自定义格式,同时避免样式污染
|
||||
*
|
||||
* @param cellStyle 从此样式复制
|
||||
* @param format 格式匹配的字符串
|
||||
* @return 格式化后CellStyle对象
|
||||
*/
|
||||
private CellStyle createCellStyle(CellStyle cellStyle, String format)
|
||||
{
|
||||
CellStyle style = wb.createCellStyle();
|
||||
style.cloneStyleFrom(cellStyle);
|
||||
style.setDataFormat(wb.getCreationHelper().createDataFormat().getFormat(format));
|
||||
return style;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 POI XSSFSheet 单元格提示或选择框
|
||||
*
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@
|
|||
<if test="visible != null">visible = #{visible},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="perms !=null">perms = #{perms},</if>
|
||||
<if test="icon !=null and icon != ''">icon = #{icon},</if>
|
||||
icon = #{icon},
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@
|
|||
@show="$refs['iconSelect'].reset()"
|
||||
>
|
||||
<IconSelect ref="iconSelect" @selected="selected" :active-icon="form.icon" />
|
||||
<el-input slot="reference" v-model="form.icon" placeholder="点击选择图标" readonly>
|
||||
<el-input slot="reference" v-model="form.icon" placeholder="点击选择图标" clearable>
|
||||
<svg-icon
|
||||
v-if="form.icon"
|
||||
slot="prefix"
|
||||
|
|
|
|||
Loading…
Reference in New Issue