{
onEdit({
type: "CUSTOM",
record: {
...record,
},
index : record.key,
key: "attach",
value: list
});
}
}
/>)
}
}
],
}
]
field = (
{
onDataChange(datas)
}}
/>
)
}
if (type === "plan") { //计划内容弹框
const {modeInfo, item, key} = source;
const hbid = item['hbid_' + key.split("_")[1]];
let editType = 2;
if (item[key]['viewAttr'] && item[key]['viewAttr'] == '1') {
editType = 0;
}
field = ()
clearInterval(timer);
timer = setInterval(() => {
if ($('#iframe_plan')) {
clearInterval(timer);
$('#iframe_plan').load(() => {
props.onIframeReady(true);
});
if (timer > 3000) {
props.onIframeReady(true);
}
} else if (timer > 3000) {
localStorage.setItem("error-2", 'cannot-get-iframe');
props.onIframeReady(true);
}
}, 300)
}
return field
}
@observer
export default class DialogPanel extends React.Component {
constructor(props) {
super(props);
this.state = {
iframeIsOk: false
}
}
onIframeReady = (bool) => {
this.setState({iframeIsOk: bool})
}
onPlanDialogRenderCallback = (datas) => {
const {source, onDataChange} = this.props;
const {index, parentIndex, item} = source
let {key} = source;
if (_.startsWith(key, 'planCtx_')) {
const tempArr = key.split("_");
key = tempArr[0] + 'Total_' + tempArr[1];
}
onDataChange(datas, index, key, parentIndex, item);
}
render() {
const {visible, onToggleDialog, data, source, onDataChange, saveMxDatas} = this.props;
const {type, key, item} = source;
window['onPlanDialogRenderCallback'] = this.onPlanDialogRenderCallback;
const {iframeIsOk} = this.state;
const buttons = [
// ,
];
const style = source.type === 'plan' ? {width: 953, height: 600} : {width: 800, height: 600};
const title = source.type === 'plan' ? getLabel('22134', '计划内容') : getLabel('22069', '完成情况');
return (
{
onToggleDialog(false)
this.onIframeReady(false);
}}
visible={visible}
showTitle={true}
style={style}
title={title}
buttons={buttons}
hasScroll
>
{source.type === 'plan' ?
//
// :
:
}
);
}
}