提交 78454828 authored 作者: 钟是志's avatar 钟是志

getActiveJson 修改

上级 6cd7f001
......@@ -853,10 +853,12 @@ export default class ZdyTable extends Component {
}
if (cell.uuid) {
// debugger;
cell.content = {
...cell.content,
...getActiveJson(currentFormKey, cell.uuid),
};
if(cell.content){
cell.content = {
...cell.content,
...getActiveJson(currentFormKey, cell.uuid),
};
}
// 27282 双选会报名后管理员修改举办时间 但是单位申请信息么有随着更新
}
......
......@@ -62,7 +62,7 @@ import {
getBase64,
getRender,
isJSON,
ShowComName
ShowComName,
} from './Split_Index/staticInfo';
import PictureSignature, {
SignArray,
......@@ -74,7 +74,7 @@ import getActiveJson from '@/webPublic/one_stop_public/Table/getActiveJson';
const {
MonthPicker,
WeekPicker
WeekPicker,
} = DatePicker;
/**
* 日期组件antd3.x有bug 详情见禅道 27152 毕业跟踪调查管理 毕业时间改为年级筛选
......@@ -101,7 +101,7 @@ const giveRender = (column = {}) => {
DataColumn,
SqlManageEntity,
formList,
loading
loading,
}) => ({
DataColumn,
SqlManageEntity,
......@@ -211,7 +211,7 @@ export default class TableCom extends Component {
setSelectedKeys,
selectedKeys,
confirm,
clearFilters
clearFilters,
}) => (
<div style={{ padding: 8 }}>
<Input
......@@ -229,11 +229,11 @@ export default class TableCom extends Component {
}}
/>
<Button
type="primary"
type='primary'
onClick={() => this.handleSearch(selectedKeys, confirm)}
icon="search"
icon='search'
loading={this.props.loading}
size="small"
size='small'
style={{
width: 90,
marginRight: 8,
......@@ -243,14 +243,14 @@ export default class TableCom extends Component {
<Button
loading={this.props.loading}
onClick={() => this.handleReset(clearFilters)}
size="small"
size='small'
style={{ width: 90 }}>
重置
</Button>
</div>
),
filterIcon: (filtered) => (
<Icon type="search" style={{ color: filtered ? '#1890ff' : 'red' }}/>
<Icon type='search' style={{ color: filtered ? '#1890ff' : 'red' }} />
),
onFilter: (value, record) =>
record[dataIndex]
......@@ -302,7 +302,7 @@ export default class TableCom extends Component {
const {
json,
mapData,
obj
obj,
} = props;
if (json == null || this.props.safe) {
return;
......@@ -423,7 +423,7 @@ export default class TableCom extends Component {
const { dispatch } = this.props;
const {
sqlKey,
optionType
optionType,
} = json;
if (optionType === 'sql') {
dispatch({
......@@ -1183,7 +1183,7 @@ export default class TableCom extends Component {
json,
mapData,
obj,
init
init,
} = this.props;
if (json == null) {
return;
......@@ -1438,7 +1438,7 @@ export default class TableCom extends Component {
getColumn = (key) => {
let {
mapData,
json
json,
} = this.props;
const columnIds = json?.columnIds;
......@@ -1484,13 +1484,14 @@ export default class TableCom extends Component {
} = this.props;
// 27282 双选会报名后管理员修改举办时间 但是单位申请信息么有随着更新
const json = {
...jsonStatic,
...getActiveJson(formKey, uuid),
let json = jsonStatic;
if (json) {
json = {
...jsonStatic,
...getActiveJson(formKey, uuid),
};
}
const {
options,
labels,
......@@ -1498,12 +1499,12 @@ export default class TableCom extends Component {
modalCode,
modalTitle,
modalInit,
modalProps
modalProps,
} = this.state;
const {
getFieldDecorator,
getFieldError,
getFieldProps
getFieldProps,
} = this.props.form;
const disabled = json != null ? json.disabled : false;
const permRank = json != null ? (json.permRank != null ? json.permRank : 0) : 0;
......@@ -1527,7 +1528,7 @@ export default class TableCom extends Component {
) {
return <></>;
}
return <QRCode {...this.state.option} key={uuid}/>;
return <QRCode {...this.state.option} key={uuid} />;
}
if (json.comName == 'Echart') {
return (
......@@ -1543,7 +1544,7 @@ export default class TableCom extends Component {
);
}
if (json.comName == 'Graph') {
return <Neo4jD3Com key={uuid} json={json} option={this.state.option || []}/>;
return <Neo4jD3Com key={uuid} json={json} option={this.state.option || []} />;
}
if (json.comName == 'PartForm') {
......@@ -1558,7 +1559,7 @@ export default class TableCom extends Component {
<>
{this.props.form.getFieldDecorator(uuid, {
initialValue: fk,
})(<Input type="hidden"/>)}
})(<Input type='hidden' />)}
{' '}
<ZdyTable
taskId={this.props.taskId}
......@@ -1634,7 +1635,7 @@ export default class TableCom extends Component {
<>
{this.props.form.getFieldDecorator(uid, {
initialValue: obj[uuid] || json.initialValue,
})(<Input type="hidden"/>)}
})(<Input type='hidden' />)}
<span
style={{
fontWeight: get === 'mobile' ? 'bold' : '',
......@@ -1650,7 +1651,7 @@ export default class TableCom extends Component {
<>
{this.props.form.getFieldDecorator(uid, {
initialValue: this.props.form.getFieldsValue()[uid] || json.initialValue,
})(<Input type="hidden"/>)}
})(<Input type='hidden' />)}
<span
style={{
fontWeight: get === 'mobile' ? 'bold' : '',
......@@ -1698,7 +1699,7 @@ export default class TableCom extends Component {
cm = (
<span style={{ paddingRight: get === 'mobile' ? 8 : '' }}>
{value}
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</span>
);
break;
......@@ -1706,7 +1707,7 @@ export default class TableCom extends Component {
cm = (
<span>
{value}
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</span>
);
......@@ -1724,7 +1725,7 @@ export default class TableCom extends Component {
cm = (
<span style={{ paddingRight: get == 'mobile' ? 8 : '' }}>
{value}
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</span>
);
......@@ -1733,7 +1734,7 @@ export default class TableCom extends Component {
cm = (
<span>
{value}
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</span>
);
......@@ -1743,7 +1744,7 @@ export default class TableCom extends Component {
<span>
{moment(parseInt(value))
.format('YYYY-MM-DD HH:mm:ss')}
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</span>
) : (
''
......@@ -1758,14 +1759,14 @@ export default class TableCom extends Component {
{filesX.map((f, index2) => {
return (
<li key={index2}>
<a target="_blank" key={f.path} href={queryApiActionPath() + f.path}>
<a target='_blank' key={f.path} href={queryApiActionPath() + f.path}>
{f.name}
</a>
</li>
);
})}
</ul>
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</>
);
......@@ -1778,14 +1779,14 @@ export default class TableCom extends Component {
{files.map((f, index2) => {
return (
<li key={index2}>
<a target="_blank" key={f.path} href={queryApiActionPath() + f.path}>
<a target='_blank' key={f.path} href={queryApiActionPath() + f.path}>
{f.name}
</a>
</li>
);
})}
</ul>
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</>
);
......@@ -1810,7 +1811,7 @@ export default class TableCom extends Component {
height: json.height,
}}
/>
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</>
);
}
......@@ -1836,7 +1837,7 @@ export default class TableCom extends Component {
height: json.height,
}}
/>
{get === 'mobile' ? <br/> : ''}
{get === 'mobile' ? <br /> : ''}
</>
);
}
......@@ -1869,7 +1870,7 @@ export default class TableCom extends Component {
</MobileItem>
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value,
})(<Input type="hidden"/>)}
})(<Input type='hidden' />)}
</>
);
}
......@@ -1882,7 +1883,7 @@ export default class TableCom extends Component {
{cm}
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value,
})(<Input type="hidden"/>)}
})(<Input type='hidden' />)}
</>
);
}
......@@ -1969,7 +1970,7 @@ export default class TableCom extends Component {
</Form.Item>
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value,
})(<Input type="hidden"/>)}
})(<Input type='hidden' />)}
</>
);
}
......@@ -1982,7 +1983,7 @@ export default class TableCom extends Component {
{cm}
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value,
})(<Input type="hidden"/>)}
})(<Input type='hidden' />)}
</>
);
}
......@@ -2072,7 +2073,7 @@ export default class TableCom extends Component {
case 'WangEditor':
let textV = obj[dataColumn.base52];
if (!textV || textV === 'null') {
return <div/>;
return <div />;
}
cm = (
<div
......@@ -2175,7 +2176,7 @@ ${obj[dataColumn.base52]}
<Table
get={get}
columns={this.state.columns}
size="small"
size='small'
dataSource={ds}
pagination={false}
/>
......@@ -2347,7 +2348,7 @@ ${obj[dataColumn.base52]}
}
return (
<li key={index2}>
<a target="_blank" key={f.path} href={queryApiActionPath() + f.path}>
<a target='_blank' key={f.path} href={queryApiActionPath() + f.path}>
{f.name}
</a>
</li>
......@@ -2384,7 +2385,7 @@ ${obj[dataColumn.base52]}
return (
<li key={index2}>
<a
target="_blank"
target='_blank'
key={f.filePath}
href={queryApiActionPath() + f.filePath}>
{f.fileName}
......@@ -2542,7 +2543,7 @@ ${obj[dataColumn.base52]}
if (json.isLink) {
cm = <a {...ev} />;
} else {
cm = <Button loading={this.props.loading} type="primary" {...ev} />;
cm = <Button loading={this.props.loading} type='primary' {...ev} />;
}
}
......@@ -2624,7 +2625,7 @@ ${obj[dataColumn.base52]}
if (json.isLink) {
cm = <a {...ev} />;
} else {
cm = <Button loading={this.props.loading} type="primary" {...ev} />;
cm = <Button loading={this.props.loading} type='primary' {...ev} />;
}
}
......@@ -2779,11 +2780,11 @@ ${obj[dataColumn.base52]}
let inputStyle = {
width: json.width,
};
if(disabled){
if (disabled) {
inputStyle = {
...inputStyle,
...disabledInputStyle,
}
};
}
cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue,
......@@ -2801,8 +2802,8 @@ ${obj[dataColumn.base52]}
disabled={disabled}
style={inputStyle}
placeholder={json.placeholder}
/>
);
/>,
);
if (get === 'mobile') {
cm = <div>{cm}</div>;
......@@ -2826,7 +2827,7 @@ ${obj[dataColumn.base52]}
case 'InputHidden':
cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue,
})(<Input type="hidden"/>);
})(<Input type='hidden' />);
break;
case 'InputNumber':
cm = getFieldDecorator(dataColumn.base52, {
......@@ -2885,7 +2886,7 @@ ${obj[dataColumn.base52]}
message: '请选择' + dataColumn.title,
},
],
})(<Radio.Group options={options} disabled={disabled}/>);
})(<Radio.Group options={options} disabled={disabled} />);
if (get == 'mobile') {
cm = <div>{cm}</div>;
if (
......@@ -2912,7 +2913,7 @@ ${obj[dataColumn.base52]}
case 'Checkbox':
if (get === 'mobile') {
cm = (
<Flex direction="column" align="start">
<Flex direction='column' align='start'>
{getFieldDecorator(dataColumn.base52, {
initialValue: initValue, // 默认值
rules:
......@@ -2924,7 +2925,7 @@ ${obj[dataColumn.base52]}
message: '请选择' + dataColumn.title,
},
],
})(<Checkbox.Group options={options} disabled={disabled}/>)}
})(<Checkbox.Group options={options} disabled={disabled} />)}
</Flex>
);
......@@ -2994,7 +2995,7 @@ ${obj[dataColumn.base52]}
disabled={selectDis || disabled}
placeholder={json.placeholder}
style={{ width: json.width }}
optionFilterProp="children"
optionFilterProp='children'
getPopupContainer={
this.props.isDynamic && document.querySelector('#dynamic_div')
? () => {
......@@ -3124,7 +3125,7 @@ ${obj[dataColumn.base52]}
message: '请选择' + dataColumn.title,
},
],
})(<MobileCascader options={options} label={title} disabled={disabled} json={json}/>);
})(<MobileCascader options={options} label={title} disabled={disabled} json={json} />);
}
if (
......@@ -3492,7 +3493,7 @@ ${obj[dataColumn.base52]}
message: '请输入',
},
],
})(<DraftEditorCom placeholder={json.placeholder} disabled={json.disabled}/>);
})(<DraftEditorCom placeholder={json.placeholder} disabled={json.disabled} />);
if (
get === 'mobile' &&
((json.isMobileLabel != null && json.isMobileLabel) ||
......@@ -3523,7 +3524,7 @@ ${obj[dataColumn.base52]}
message: '请输入' + title,
},
],
})(<CronEditor style={{ width: 600 }}/>);
})(<CronEditor style={{ width: 600 }} />);
break;
case 'LocationCom':
cm = getFieldDecorator(dataColumn.base52, {
......@@ -3637,7 +3638,7 @@ ${obj[dataColumn.base52]}
message: '请上传图片',
},
],
})(<ImgUploadCom json={json} disabled={disabled}/>);
})(<ImgUploadCom json={json} disabled={disabled} />);
if (
get === 'mobile' &&
((json.isMobileLabel != null && json.isMobileLabel) ||
......@@ -3667,7 +3668,7 @@ ${obj[dataColumn.base52]}
message: '请上传视频',
},
],
})(<VideoUploadCom json={json} disabled={disabled}/>);
})(<VideoUploadCom json={json} disabled={disabled} />);
if (
get === 'mobile' &&
((json.isMobileLabel != null && json.isMobileLabel) ||
......@@ -3915,7 +3916,7 @@ ${obj[dataColumn.base52]}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
data-cell-component-name={json.comName || 'no_com'}>
<ShowComName json={json}/>
<ShowComName json={json} />
{cm}
</Form.Item>
</>
......@@ -4007,12 +4008,12 @@ ${obj[dataColumn.base52]}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
>
<ShowComName json={json}/>
<ShowComName json={json} />
{cm}
</Form.Item>
) : (
<Form.Item>
<ShowComName json={json}/>
<ShowComName json={json} />
{cm}
</Form.Item>
)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论