提交 3b6caec3 authored 作者: tb53863844's avatar tb53863844

开发

上级 a4de93ee
...@@ -215,12 +215,19 @@ class FormList extends React.Component { ...@@ -215,12 +215,19 @@ class FormList extends React.Component {
modify = record => { modify = record => {
// if (this.state.formItem.length < 10) { // if (this.state.formItem.length < 10) {
this.getOptions(); this.getOptions();
this.props.dispatch({
type: 'formList/getDetail',
payload: { dataObjId:this.state.objId,key:this.state.primaryKey ,value:record[this.state.primaryKey] ,isBase:false },
callback:record => {
this.setState({ this.setState({
formData: record, formData: record,
modalVisible: true, modalVisible: true,
isAdd: false, isAdd: false,
isView: false, isView: false,
}); });
},
});
// } else { // } else {
// router.push({ // router.push({
// pathname: '/admin/ddl/dataObj/formEdit', // pathname: '/admin/ddl/dataObj/formEdit',
...@@ -435,7 +442,6 @@ class FormList extends React.Component { ...@@ -435,7 +442,6 @@ class FormList extends React.Component {
this.columns = this.props.value.columns; this.columns = this.props.value.columns;
let cacheList = []; let cacheList = [];
let cacheChecked = []; let cacheChecked = [];
console.log(this.props.value.columns);
// 表头筛选逻辑 // 表头筛选逻辑
Array.isArray(this.props.value.columns) && Array.isArray(this.props.value.columns) &&
this.props.value.columns.map(item => { this.props.value.columns.map(item => {
...@@ -901,7 +907,6 @@ class FormList extends React.Component { ...@@ -901,7 +907,6 @@ class FormList extends React.Component {
} else if (item.referenceObjId != null) { } else if (item.referenceObjId != null) {
const { options } = this.state; const { options } = this.state;
const ops = options[item.id + ''] || []; const ops = options[item.id + ''] || [];
return ( return (
<FormItem labelCol={labelCol} wrapperCol={wrapperCol} label={item.title} key={item.id}> <FormItem labelCol={labelCol} wrapperCol={wrapperCol} label={item.title} key={item.id}>
{form.getFieldDecorator(item.name, { {form.getFieldDecorator(item.name, {
...@@ -921,11 +926,11 @@ class FormList extends React.Component { ...@@ -921,11 +926,11 @@ class FormList extends React.Component {
placeholder="请选择" placeholder="请选择"
allowClear allowClear
> >
{ops.map(r => ( {ops.map(r =>
<Option value={r[item.referenceCodeName]} key={r[item.referenceCodeName]}> <Option value={r[item.referenceCodeName]} key={r[item.referenceCodeName]}>
{r[item.referenceNameName]} {r[item.referenceNameName]}
</Option> </Option>
))} )}
</Select>, </Select>,
)} )}
</FormItem> </FormItem>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论