提交 46f79e95 authored 作者: wangtianjiao's avatar wangtianjiao

撤销 "表单新增修改添加隐藏域"

这将还原提交 0d777914
上级 0d777914
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State />
<State>
<id>Abstraction issuesJava</id>
</State>
<State>
<id>AccessibilityHTML</id>
</State>
<State>
<id>Android</id>
</State>
<State>
<id>Code style issuesJava</id>
</State>
<State>
<id>Compiler issuesJava</id>
</State>
<State>
<id>CorrectnessLintAndroid</id>
</State>
<State>
<id>Declaration redundancyJava</id>
</State>
<State>
<id>GPathGroovy</id>
</State>
<State>
<id>Groovy</id>
</State>
<State>
<id>Guice</id>
</State>
<State>
<id>HTML</id>
</State>
<State>
<id>Hibernate</id>
</State>
<State>
<id>IconsUsabilityLintAndroid</id>
</State>
<State>
<id>Inheritance issuesJava</id>
</State>
<State>
<id>JBoss Seam</id>
</State>
<State>
<id>Java</id>
</State>
<State>
<id>Java 8Java language level migration aidsJava</id>
</State>
<State>
<id>Java 9Java language level migration aidsJava</id>
</State>
<State>
<id>Java EE</id>
</State>
<State>
<id>Java language level migration aidsJava</id>
</State>
<State>
<id>Kotlin</id>
</State>
<State>
<id>LintAndroid</id>
</State>
<State>
<id>Micronaut</id>
</State>
<State>
<id>Other problemsKotlin</id>
</State>
<State>
<id>PerformanceJava</id>
</State>
<State>
<id>PerformanceLintAndroid</id>
</State>
<State>
<id>Plugin DevKit</id>
</State>
<State>
<id>Plugin descriptorPlugin DevKit</id>
</State>
<State>
<id>Potentially confusing code constructsGroovy</id>
</State>
<State>
<id>Probable bugsJava</id>
</State>
<State>
<id>RESTful Web Service (JAX-RS)</id>
</State>
<State>
<id>Reactor</id>
</State>
<State>
<id>Serialization issuesJava</id>
</State>
<State>
<id>Style issuesKotlin</id>
</State>
<State>
<id>UsabilityLintAndroid</id>
</State>
<State>
<id>Verbose or redundant code constructsJava</id>
</State>
</expanded-state>
<selected-state>
<State>
<id>Android</id>
</State>
</selected-state>
</profile-state>
</entry>
</component>
</project>
\ No newline at end of file
# Default ignored files
/workspace.xml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectDictionaryState">
<dictionary name="junjun" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/webPublic.iml" filepath="$PROJECT_DIR$/.idea/webPublic.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
...@@ -102,23 +102,23 @@ const CreateForm = Form.create()(props => { ...@@ -102,23 +102,23 @@ const CreateForm = Form.create()(props => {
} }
} }
}else if (number.includes(item.type)) { }else if (number.includes(item.type)) {
for (let d in fieldsValue) { for (let d in fieldsValue) {
if (item.name === d&&fieldsValue[d]=="") { if (item.name === d&&fieldsValue[d]=="") {
fieldsValue[d]=null fieldsValue[d]=null
break break
} }
} }
} }
}); });
let params = { ...fieldsValue }; let params = { ...fieldsValue };
handleAdd(params, isAdd); handleAdd(params, isAdd);
}); });
}; };
//需要获取动态表单 //需要获取动态表单
return ( return (
<Modal <Modal
...@@ -391,11 +391,11 @@ class FormList extends React.Component { ...@@ -391,11 +391,11 @@ class FormList extends React.Component {
componentWillReceiveProps(nextProps){ componentWillReceiveProps(nextProps){
const b = nextProps.value||{} const b = nextProps.value||{}
const a = this.props.value||{} const a = this.props.value||{}
const jsonb=JSON.stringify(b) const jsonb=JSON.stringify(b)
const jsona=JSON.stringify(a) const jsona=JSON.stringify(a)
this.custom=Base16Encode(jsonb) this.custom=Base16Encode(jsonb)
if(jsona!=jsonb){ if(jsona!=jsonb){
let params= { let params= {
...@@ -403,13 +403,13 @@ class FormList extends React.Component { ...@@ -403,13 +403,13 @@ class FormList extends React.Component {
pageSize: b.pageSize?b.pageSize:this.state.data.pagination.pageSize, pageSize: b.pageSize?b.pageSize:this.state.data.pagination.pageSize,
query: JSON.stringify(this.state.formValues), query: JSON.stringify(this.state.formValues),
}; };
if(nextProps.value.columns!=null&&nextProps.value.columns.length>0){ if(nextProps.value.columns!=null&&nextProps.value.columns.length>0){
this.columns=nextProps.value.columns this.columns=nextProps.value.columns
} }
if( nextProps.value.getPage){ if( nextProps.value.getPage){
this.getPage(params,null,nextProps.value.getPage); this.getPage(params,null,nextProps.value.getPage);
}else{ }else{
...@@ -780,18 +780,6 @@ class FormList extends React.Component { ...@@ -780,18 +780,6 @@ class FormList extends React.Component {
} }
getItem = (isQuery,form, item, isAdd, formData, labelCol, wrapperCol) => { getItem = (isQuery,form, item, isAdd, formData, labelCol, wrapperCol) => {
const {groups} =this.state; const {groups} =this.state;
//如果字段隐藏 就用隐藏域
if(item.isHidden){
return (
<FormItem >
{form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name],
})(<Input type='hidden' placeholder="请输入"/>)}
</FormItem>
);
}
if (item.isPrimaryKey) { if (item.isPrimaryKey) {
if (isAdd) { if (isAdd) {
return (<></>); return (<></>);
...@@ -931,7 +919,7 @@ class FormList extends React.Component { ...@@ -931,7 +919,7 @@ class FormList extends React.Component {
form, form,
get, get,
} = this.props; } = this.props;
const { querys } = this.state const { querys } = this.state
if (querys.length == 0) { if (querys.length == 0) {
return ''; return '';
......
...@@ -87,8 +87,6 @@ export function changeFromDraftState2(editorState) { ...@@ -87,8 +87,6 @@ export function changeFromDraftState2(editorState) {
} }
export function preHandle(values) { export function preHandle(values) {
console.log("values",values)
for (var key in values) { for (var key in values) {
if(!values[key]) continue; if(!values[key]) continue;
...@@ -126,7 +124,7 @@ export function preHandle(values) { ...@@ -126,7 +124,7 @@ export function preHandle(values) {
if(childObj[j]!=null){ if(childObj[j]!=null){
if (childObj[j].editorState) { if (childObj[j].editorState) {
values[key][k][j]= changeFromDraftState(values[key][k][j].editorState).blocks values[key][k][j]= changeFromDraftState(values[key][k][j].editorState).blocks
}else if (childObj[j] instanceof moment) { }else if (childObj[j] instanceof moment) {
values[key][k][j] = values[key][k][j].valueOf() values[key][k][j] = values[key][k][j].valueOf()
}else if (childObj[j] instanceof Date) { }else if (childObj[j] instanceof Date) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论