Commit 2ed0388c authored by 赵啸非's avatar 赵啸非

引入新的表单生成器

parent e92e7d49
......@@ -180,6 +180,7 @@ export default {
},
methods: {
preview(){
console.log("list",this.list)
const clone = JSON.parse(JSON.stringify(this.list))
this.itemList = clone;
this.previewVisible= true;
......
......@@ -170,6 +170,12 @@ export default {
const jsonObject = JSON.parse(json);
this.designList = [];
this.designList = this.designList.concat(jsonObject.list);
},
refresh(value){
console.log("value",value)
const formData = JSON.parse(value);
this.designList= formData.list;
this.formConfig = formData.config;
}
},
computed:{
......@@ -193,7 +199,9 @@ export default {
},
watch:{
value(newVal){
if(newVal !==''){
console.log("newVal",newVal)
const formData = JSON.parse(newVal);
this.designList= formData.list;
this.formConfig = formData.config;
......
<template>
<div class="page">
<form-designer ref="formDesigner" :value="tmp" v-model="form1.fdForm"></form-designer>
<form-designer ref="formDesigner" :value=tmp v-model="form1.fdForm"></form-designer>
</div>
</template>
......@@ -13,11 +13,15 @@
created() {
console.log("form",this.form)
console.log("tmp",this.tmp)
this.$ref.formDesigner
},
methods: {
beforeRender(data) {
this.tmp=data.entity.formContent
console.log("data",data)
this.$refs.formDesigner.refresh(this.tmp);
return data
},
......
......@@ -3510,7 +3510,7 @@ debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0:
dependencies:
ms "2.1.2"
debuglog@*, debuglog@^1.0.1:
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.npmmirror.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
integrity sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==
......@@ -5687,7 +5687,7 @@ import-local@^2.0.0:
pkg-dir "^3.0.0"
resolve-cwd "^2.0.0"
imurmurhash@*, imurmurhash@^0.1.4:
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.nlark.com/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
......@@ -6775,11 +6775,6 @@ lockfile@^1.0.4:
dependencies:
signal-exit "^3.0.2"
lodash._baseindexof@*:
version "3.1.0"
resolved "https://registry.npmmirror.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c"
integrity sha512-bSYo8Pc/f0qAkr8fPJydpJjtrHiSynYfYBjtANIgXv5xEf1WlTC63dIDlgu0s9dmTvzRu1+JJTxcIAHe+sH0FQ==
lodash._baseuniq@~4.6.0:
version "4.6.0"
resolved "https://registry.npmmirror.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8"
......@@ -6788,33 +6783,11 @@ lodash._baseuniq@~4.6.0:
lodash._createset "~4.0.0"
lodash._root "~3.0.0"
lodash._bindcallback@*:
version "3.0.1"
resolved "https://registry.npmmirror.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
integrity sha512-2wlI0JRAGX8WEf4Gm1p/mv/SZ+jLijpj0jyaE/AXeuQphzCgD8ZQW4oSpoN8JAopujOFGU3KMuq7qfHBWlGpjQ==
lodash._cacheindexof@*:
version "3.0.2"
resolved "https://registry.npmmirror.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92"
integrity sha512-S8dUjWr7SUT/X6TBIQ/OYoCHo1Stu1ZRy6uMUSKqzFnZp5G5RyQizSm6kvxD2Ewyy6AVfMg4AToeZzKfF99T5w==
lodash._createcache@*:
version "3.1.2"
resolved "https://registry.npmmirror.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093"
integrity sha512-ev5SP+iFpZOugyab/DEUQxUeZP5qyciVTlgQ1f4Vlw7VUcCD8fVnyIqVUEIaoFH9zjAqdgi69KiofzvVmda/ZQ==
dependencies:
lodash._getnative "^3.0.0"
lodash._createset@~4.0.0:
version "4.0.3"
resolved "https://registry.npmmirror.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26"
integrity sha512-GTkC6YMprrJZCYU3zcqZj+jkXkrXzq3IPBcF/fIPpNEAB4hZEtXU8zp/RwKOvZl43NUmwDbyRk3+ZTbeRdEBXA==
lodash._getnative@*, lodash._getnative@^3.0.0:
version "3.9.1"
resolved "https://registry.npmmirror.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
integrity sha512-RrL9VxMEPyDMHOd9uFbvMe8X55X16/cGM5IgOKgRElQZutpX89iS6vwl64duTV1/16w5JY7tuFNXqoekmh1EmA==
lodash._root@~3.0.0:
version "3.0.1"
resolved "https://registry.npmmirror.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
......@@ -6860,11 +6833,6 @@ lodash.padend@4.6.1:
resolved "https://registry.npm.taobao.org/lodash.padend/download/lodash.padend-4.6.1.tgz#53ccba047d06e158d311f45da625f4e49e6f166e"
integrity sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=
lodash.restparam@*:
version "3.6.1"
resolved "https://registry.npmmirror.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
integrity sha512-L4/arjjuq4noiUJpt3yS6KIKDtJwNe2fIYgMqyYYKoeIfV1iEqvPwhCx23o+R9dzouGihDAPN1dTIRWa7zk8tw==
lodash.transform@^4.6.0:
version "4.6.0"
resolved "https://registry.nlark.com/lodash.transform/download/lodash.transform-4.6.0.tgz#12306422f63324aed8483d3f38332b5f670547a0"
......
......@@ -9,7 +9,7 @@ import lombok.Data;
public class ColumnsItem {
@JSONField(name = "labelWidth")
private int labelWidth;
private Integer labelWidth;
@JSONField(name = "rules")
private List<RulesItem> rules;
......@@ -18,10 +18,10 @@ public class ColumnsItem {
private String compName;
@JSONField(name = "showLabel")
private boolean showLabel;
private Boolean showLabel;
@JSONField(name = "required")
private boolean required;
private Boolean required;
@JSONField(name = "compType")
private String compType;
......@@ -36,7 +36,7 @@ public class ColumnsItem {
private String action;
@JSONField(name = "disabled")
private boolean disabled;
private Boolean disabled;
@JSONField(name = "id")
private String id;
......@@ -54,22 +54,22 @@ public class ColumnsItem {
private String ele;
@JSONField(name = "filterable")
private boolean filterable;
private Boolean filterable;
@JSONField(name = "clearable")
private boolean clearable;
private Boolean clearable;
@JSONField(name = "plain")
private boolean plain;
private Boolean plain;
@JSONField(name = "round")
private boolean round;
private Boolean round;
@JSONField(name = "circle")
private boolean circle;
private Boolean circle;
@JSONField(name = "loading")
private boolean loading;
private Boolean loading;
@JSONField(name = "icon")
private String icon;
......@@ -87,10 +87,10 @@ public class ColumnsItem {
private String dataType;
@JSONField(name = "multiple")
private boolean multiple;
private Boolean multiple;
@JSONField(name = "collapse-tags")
private boolean collapseTags;
private Boolean collapseTags;
@JSONField(name = "label")
private String label;
......@@ -99,7 +99,7 @@ public class ColumnsItem {
private String layout;
@JSONField(name = "gutter")
private int gutter;
private Integer gutter;
@JSONField(name = "ruleError")
private String ruleError;
......@@ -123,22 +123,22 @@ public class ColumnsItem {
private String _id;
@JSONField(name = "config")
private boolean config;
private Boolean config;
@JSONField(name = "border")
private boolean border;
private Boolean border;
@JSONField(name = "show-word-limit")
private boolean showWordLimit;
private Boolean showWordLimit;
@JSONField(name = "maxLength")
private int maxLength;
private Integer maxLength;
@JSONField(name = "rows")
private int rows;
private Integer rows;
@JSONField(name = "span")
private int span;
private Integer span;
@JSONField(name = "rulesType")
private String rulesType;
......@@ -150,7 +150,7 @@ public class ColumnsItem {
private String prefixIcon;
@JSONField(name = "readonly")
private boolean readonly;
private Boolean readonly;
@JSONField(name = "suffix-icon")
private String suffixIcon;
......
......@@ -10,7 +10,7 @@ public class FormDesignConfig {
private String formRef;
@JSONField(name="gutter")
private int gutter;
private Integer gutter;
@JSONField(name="size")
private String size;
......@@ -22,16 +22,16 @@ public class FormDesignConfig {
private String labelPosition;
@JSONField(name="dynamicTableAllowed")
private boolean dynamicTableAllowed;
private Boolean dynamicTableAllowed;
@JSONField(name="rules")
private String rules;
@JSONField(name="labelWidth")
private int labelWidth;
private Integer labelWidth;
@JSONField(name="disabled")
private boolean disabled;
private Boolean disabled;
@JSONField(name="formModel")
private String formModel;
......@@ -39,7 +39,6 @@ public class FormDesignConfig {
@JSONField(name="version")
private String version;
public void initAttribute() {
this.formRef = "elForm";
this.formModel="form";
......@@ -50,6 +49,7 @@ public class FormDesignConfig {
this.formRules="rules";
this.gutter=15;
this.disabled = false;
this.dynamicTableAllowed=true;
this.version = "1.10";
}
......
......@@ -8,22 +8,22 @@ import lombok.Data;
public class ListItem{
@JSONField(name="showIndex")
private boolean showIndex;
private Boolean showIndex;
@JSONField(name="visible")
private boolean visible;
private Boolean visible;
@JSONField(name="multiCheck")
private boolean multiCheck;
private Boolean multiCheck;
@JSONField(name="columns")
private List<ColumnsItem> columns;
@JSONField(name="buttonDel")
private boolean buttonDel;
private Boolean buttonDel;
@JSONField(name="labelWidth")
private int labelWidth;
private Integer labelWidth;
@JSONField(name="summary-text")
private String summaryText;
......@@ -32,10 +32,10 @@ public class ListItem{
private String compName;
@JSONField(name="showLabel")
private boolean showLabel;
private Boolean showLabel;
@JSONField(name="show-summary")
private boolean showSummary;
private Boolean showSummary;
@JSONField(name="layout")
private String layout;
......@@ -53,13 +53,13 @@ public class ListItem{
private String compIcon;
@JSONField(name="config")
private boolean config;
private Boolean config;
@JSONField(name="ele")
private String ele;
@JSONField(name="buttonAdd")
private boolean buttonAdd;
private Boolean buttonAdd;
@JSONField(name="sum-text")
private String sumText;
......@@ -74,10 +74,10 @@ public class ListItem{
private String label;
@JSONField(name="displayValue")
private boolean displayValue;
private Boolean displayValue;
@JSONField(name="form")
private boolean form;
private Boolean form;
@JSONField(name="background")
private String background;
......@@ -89,16 +89,16 @@ public class ListItem{
private String width;
@JSONField(name="fontSize")
private int fontSize;
private Integer fontSize;
@JSONField(name="value")
private String value;
@JSONField(name="span")
private int span;
private Integer span;
@JSONField(name="height")
private int height;
private Integer height;
@JSONField(name="content-position")
private String contentPosition;
......@@ -113,28 +113,28 @@ public class ListItem{
private String type;
@JSONField(name="loading")
private boolean loading;
private Boolean loading;
@JSONField(name="size")
private String size;
@JSONField(name="round")
private boolean round;
private Boolean round;
@JSONField(name="plain")
private boolean plain;
private Boolean plain;
@JSONField(name="disabled")
private boolean disabled;
private Boolean disabled;
@JSONField(name="circle")
private boolean circle;
private Boolean circle;
@JSONField(name="closable")
private boolean closable;
private Boolean closable;
@JSONField(name="center")
private boolean center;
private Boolean center;
@JSONField(name="description")
private String description;
......@@ -143,7 +143,7 @@ public class ListItem{
private String title;
@JSONField(name="show-icon")
private boolean showIcon;
private Boolean showIcon;
@JSONField(name="effect")
private String effect;
......@@ -155,16 +155,16 @@ public class ListItem{
private String color;
@JSONField(name="show")
private boolean show;
private Boolean show;
@JSONField(name="bold")
private int bold;
private Integer bold;
@JSONField(name="align")
private String align;
@JSONField(name="underline")
private boolean underline;
private Boolean underline;
@JSONField(name="target")
private String target;
......@@ -176,10 +176,10 @@ public class ListItem{
private String colConf;
@JSONField(name="required")
private boolean required;
private Boolean required;
@JSONField(name="multi")
private boolean multi;
private Boolean multi;
@JSONField(name="dval")
private String dval;
......@@ -191,7 +191,7 @@ public class ListItem{
private String action;
@JSONField(name="gutter")
private int gutter;
private Integer gutter;
@JSONField(name="list-type")
private String listType;
......@@ -200,22 +200,22 @@ public class ListItem{
private String tips;
@JSONField(name="show-file-list")
private boolean showFileList;
private Boolean showFileList;
@JSONField(name="buttonText")
private String buttonText;
@JSONField(name="showTip")
private boolean showTip;
private Boolean showTip;
@JSONField(name="multiple")
private boolean multiple;
private Boolean multiple;
@JSONField(name="accept")
private String accept;
@JSONField(name="fileSize")
private int fileSize;
private Integer fileSize;
@JSONField(name="name")
private String name;
......@@ -233,22 +233,22 @@ public class ListItem{
private String placeholder;
@JSONField(name="china-area-data")
private boolean chinaAreaData;
private Boolean chinaAreaData;
@JSONField(name="color-format")
private String colorFormat;
@JSONField(name="show-alpha")
private boolean showAlpha;
private Boolean showAlpha;
@JSONField(name="predefine")
private List<Object> predefine;
@JSONField(name="validateMaxText")
private boolean validateMaxText;
private Boolean validateMaxText;
@JSONField(name="max")
private int max;
private Integer max;
@JSONField(name="customRules")
private List<RulesItem> customRules;
......@@ -260,16 +260,16 @@ public class ListItem{
private List<RulesItem> rules;
@JSONField(name="readonly")
private boolean readonly;
private Boolean readonly;
@JSONField(name="arrow-control")
private boolean arrowControl;
private Boolean arrowControl;
@JSONField(name="is-range")
private boolean isRange;
private Boolean isRange;
@JSONField(name="clearable")
private boolean clearable;
private Boolean clearable;
@JSONField(name="range-separator")
private String rangeSeparator;
......@@ -278,7 +278,7 @@ public class ListItem{
private String valueFormat;
@JSONField(name="maxLength")
private int maxLength;
private Integer maxLength;
@JSONField(name="start-placeholder")
private String startPlaceholder;
......@@ -287,46 +287,46 @@ public class ListItem{
private String endPlaceholder;
@JSONField(name="show-score")
private boolean showScore;
private Boolean showScore;
@JSONField(name="allow-half")
private boolean allowHalf;
private Boolean allowHalf;
@JSONField(name="show-stops")
private boolean showStops;
private Boolean showStops;
@JSONField(name="range")
private boolean range;
private Boolean range;
@JSONField(name="show-tooltip")
private boolean showTooltip;
private Boolean showTooltip;
@JSONField(name="min")
private int min;
private Integer min;
@JSONField(name="step")
private int step;
private Integer step;
@JSONField(name="maxlength")
private int maxlength;
private Integer maxlength;
@JSONField(name="rows")
private int rows;
private Integer rows;
@JSONField(name="ruleError")
private String ruleError;
@JSONField(name="show-word-limit")
private boolean showWordLimit;
private Boolean showWordLimit;
@JSONField(name="status")
private String status;
@JSONField(name="step-strictly")
private boolean stepStrictly;
private Boolean stepStrictly;
@JSONField(name="precision")
private int precision;
private Integer precision;
@JSONField(name="controls-position")
private String controlsPosition;
......@@ -347,19 +347,19 @@ public class ListItem{
private String inactiveValue;
@JSONField(name="vertical")
private boolean vertical;
private Boolean vertical;
@JSONField(name="optionType")
private String optionType;
@JSONField(name="border")
private boolean border;
private Boolean border;
@JSONField(name="filterable")
private boolean filterable;
private Boolean filterable;
@JSONField(name="collapse-tags")
private boolean collapseTags;
private Boolean collapseTags;
@JSONField(name="rulesType")
private String rulesType;
......
......@@ -14,7 +14,7 @@ public class OptionsItem{
private String value;
@JSONField(name="disabled")
private boolean disabled;
private Boolean disabled;
@JSONField(name="children")
private List<ChildrenItem> children;
......
......@@ -7,13 +7,13 @@ import lombok.Data;
public class Props{
@JSONField(name="filterable")
private boolean filterable;
private Boolean filterable;
@JSONField(name="clearable")
private boolean clearable;
private Boolean clearable;
@JSONField(name="show-all-levels")
private boolean showAllLevels;
private Boolean showAllLevels;
@JSONField(name="separator")
private String separator;
......@@ -25,10 +25,10 @@ public class Props{
private String children;
@JSONField(name="multiple")
private boolean multiple;
private Boolean multiple;
@JSONField(name="checkStrictly")
private boolean checkStrictly;
private Boolean checkStrictly;
@JSONField(name="label")
private String label;
......
package com.mortals.xhx.common.formdesign;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
@Data
public class RulesItem {
@JSONField(name="msg")
......
......@@ -57,7 +57,7 @@ public class DesignDynamicTableComponent extends DesignComponent {
//创建输入框出初始值
columnsItem.setId(item.getVal());
columnsItem.set_id(item.getVal());
columnsItem.setCompType("input");
columnsItem.setCompType("el-input");
columnsItem.setCompName("单行文本");
columnsItem.setCompIcon("input");
columnsItem.setViewType("text");
......@@ -66,7 +66,7 @@ public class DesignDynamicTableComponent extends DesignComponent {
columnsItem.setShowLabel(true);
columnsItem.setLabel(item.getLabel());
columnsItem.setLabelWidth(120);
columnsItem.setPlaceholder("请输入" + cons.getLabel());
columnsItem.setPlaceholder("请输入" + item.getLabel());
columnsItem.setRequired(false);
columnsItem.setMaxLength(50);
columnsItem.setGutter(15);
......@@ -83,6 +83,57 @@ public class DesignDynamicTableComponent extends DesignComponent {
columnsItem.setAppend("");
columnsItem.setPrepend("");
columnsItem.setLayout("colItem");
}else if(item.getColType().equals(ComponentEnum.TEXTAREA.getValue())){
columnsItem.setId(item.getVal());
columnsItem.set_id(item.getVal());
columnsItem.setCompType("textarea");
columnsItem.setEle("el-input");
columnsItem.setCompName("多行文本");
columnsItem.setCompIcon("textarea");
columnsItem.setViewType("text");
columnsItem.setType("textarea");
columnsItem.setConfig(true);
columnsItem.setShowLabel(true);
columnsItem.setLabel(item.getLabel());
columnsItem.setLabelWidth(120);
columnsItem.setPlaceholder("请输入" + item.getLabel());
columnsItem.setRequired(false);
columnsItem.setMaxLength(200);
columnsItem.setShowWordLimit(true);
columnsItem.setGutter(15);
columnsItem.setSpan(24);
columnsItem.setClearable(true);
columnsItem.setDisabled(false);
columnsItem.setReadonly(false);
columnsItem.setRows(4);
columnsItem.setStatus("normal");
columnsItem.setValue(""); //设置默认值
columnsItem.setRules(Lists.newArrayList());
columnsItem.setRuleError("该字段不能为空");
columnsItem.setRulesType("default");
columnsItem.setLayout("colItem");
}else if(item.getColType().equals(ComponentEnum.DATE.getValue())){
columnsItem.setId(item.getVal());
columnsItem.set_id(item.getVal());
columnsItem.setCompType("date");
columnsItem.setEle("el-date-picker");
columnsItem.setCompName("日期");
columnsItem.setCompIcon("date");
columnsItem.setViewType("text");
columnsItem.setConfig(true);
columnsItem.setShowLabel(true);
columnsItem.setLabel(item.getLabel());
columnsItem.setLabelWidth(120);
columnsItem.setType("date");
columnsItem.setPlaceholder("请选择" + item.getLabel());
columnsItem.setRequired(false);
columnsItem.setMaxLength(50);
columnsItem.setGutter(15);
columnsItem.setSpan(12);
columnsItem.setRangeSeparator(" ");
columnsItem.setFormat("yyyy 年 MM 月 dd 日");
columnsItem.setValueFormat("yyyy 年 MM 月 dd 日");
columnsItem.setLayout("colItem");
}
return columnsItem;
}).collect(Collectors.toList());
......
......@@ -32,7 +32,7 @@ public class DesignInputComponent extends DesignComponent {
columnsItem.setCompType("input");
columnsItem.setCompName(cons.getLabel());
columnsItem.setCompIcon("input");
columnsItem.setEle("input");
columnsItem.setEle("el-input");
columnsItem.setViewType("text");
columnsItem.setConfig(true);
columnsItem.setShowLabel(true);
......
......@@ -31,7 +31,7 @@ public class DesignTextAreaComponent extends DesignComponent {
columnsItem.set_id(cons.getVal());
columnsItem.setCompType("textarea");
columnsItem.setEle("el-input");
columnsItem.setCompName(cons.getLabel());
columnsItem.setCompName("多行文本");
columnsItem.setCompIcon("textarea");
columnsItem.setViewType("text");
columnsItem.setType("textarea");
......
......@@ -82,7 +82,7 @@ public class DocBaseinfoServiceImpl extends AbstractCRUDServiceImpl<DocBaseinfoD
String newName = RandomUtil.randomNumbers(12) + ".jpg";
String filePathAll = filePath + newName;
//WordUtil.convertWordToJPEG(samplePath, filePathAll);
WordUtil.convertWordToJPEG(samplePath, filePathAll);
entity.setPreViewPath(prePath + newName);
//校验模板变量正确性 todo
......
......@@ -48,7 +48,6 @@ public class DocTemplateServiceImpl extends AbstractCRUDServiceImpl<DocTemplateD
@Autowired
private DocFormService docFormService;
@Value("${upload.path}")
private String filePath;
......@@ -249,7 +248,6 @@ public class DocTemplateServiceImpl extends AbstractCRUDServiceImpl<DocTemplateD
builderTable.buildGramer("[", "]");
XWPFTemplate templateTable = XWPFTemplate.compile(filepath, builderTable.build());
templateTable.getElementTemplates().forEach(col -> {
String colVal = StrUtil.strip(col.variable(), "[", "]");
List<String> colKeys = StrSplitter.split(colVal, "_", true, true);
if (colKeys.size() > 2) {
......@@ -275,24 +273,6 @@ public class DocTemplateServiceImpl extends AbstractCRUDServiceImpl<DocTemplateD
}
}
root.setList(collect);
// Component component = Component.createType(type);
// FieldsItem fieldItem = component.buildDefaultComponent(cons);
// //显示的label
// fieldItem.getConfig().setLabel(cons.getLabel());
// Integer formId = 100 + i + j;
// fieldItem.getConfig().setFormId(formId);
// fieldItem.getConfig().setRenderKey(formId + RandomUtil.randomNumbers(13));
// //设定输入框绑定的key
// fieldItem.setVModel(cons.getVal());
// root.getFields().add(fieldItem);
// }
//
// //data.put(item.variable(), item.variable());
// return null;
//
// }).collect(Collectors.toList());
DocFormEntity docFormEntity = docFormService.selectOne(new DocFormQuery().templateId(docTemplateEntity.getId()));
if (ObjectUtils.isEmpty(docFormEntity)) {
docFormEntity = new DocFormEntity();
......@@ -309,41 +289,7 @@ public class DocTemplateServiceImpl extends AbstractCRUDServiceImpl<DocTemplateD
docFormEntity.setUpdateUser(context.getUser().getLoginName());
docFormService.update(docFormEntity, context);
}
//template.render(data);
}
public List<OptionsItem> initYears() {
List<OptionsItem> list = new ArrayList<>();
for (int i = 2020; i < 2030; i++) {
OptionsItem optionsItem = new OptionsItem();
optionsItem.setLabel(i + "");
optionsItem.setValue(i + "");
list.add(optionsItem);
}
return list;
}
public List<OptionsItem> initMonths() {
List<OptionsItem> list = new ArrayList<>();
for (int i = 1; i <= 12; i++) {
OptionsItem optionsItem = new OptionsItem();
optionsItem.setLabel(i + "");
optionsItem.setValue(i + "");
list.add(optionsItem);
}
return list;
}
public List<OptionsItem> initDays() {
List<OptionsItem> list = new ArrayList<>();
for (int i = 1; i <= 31; i++) {
OptionsItem optionsItem = new OptionsItem();
optionsItem.setLabel(i + "");
optionsItem.setValue(i + "");
list.add(optionsItem);
}
return list;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment