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

组件修改

上级 d5bb11f0
...@@ -50,7 +50,7 @@ export default class List extends Component { ...@@ -50,7 +50,7 @@ export default class List extends Component {
}; };
giveGetPageFields = () => { giveGetPageFields = () => {
const { listConfig, pageSearch, beforeGetPage } = this.props; const { listConfig, pageSearch } = this.props;
const { pagination, formValues } = this.state; const { pagination, formValues } = this.state;
const search = pageSearch.search; const search = pageSearch.search;
let data = deepCopy(formValues); let data = deepCopy(formValues);
...@@ -76,7 +76,7 @@ export default class List extends Component { ...@@ -76,7 +76,7 @@ export default class List extends Component {
}; };
getPage = () => { getPage = () => {
const { listConfig, pageSearch, dataBaseId, workId, addFields } = this.props; const { listConfig, pageSearch, workId } = this.props;
const { pagination, sortGetPageFields } = this.state; const { pagination, sortGetPageFields } = this.state;
const { search } = pageSearch; const { search } = pageSearch;
let data = this.giveGetPageFields(); let data = this.giveGetPageFields();
......
...@@ -79,6 +79,8 @@ class AffairPage extends React.Component { ...@@ -79,6 +79,8 @@ class AffairPage extends React.Component {
return record.statusName || record[process_status.dataIndex]; return record.statusName || record[process_status.dataIndex];
}; };
} }
let findCz = columns.find((g) => g.dataIndex === 'operation');
if(!findCz){
columns.push({ columns.push({
dataIndex: 'operation', dataIndex: 'operation',
title: '操作', title: '操作',
...@@ -100,6 +102,11 @@ class AffairPage extends React.Component { ...@@ -100,6 +102,11 @@ class AffairPage extends React.Component {
); );
}, },
}); });
}
this.setState({ this.setState({
columns, columns,
}); });
...@@ -126,7 +133,6 @@ class AffairPage extends React.Component { ...@@ -126,7 +133,6 @@ class AffairPage extends React.Component {
return [...otherButtons]; return [...otherButtons];
} }
return [ return [
{ {
type: 'add', type: 'add',
...@@ -137,8 +143,7 @@ class AffairPage extends React.Component { ...@@ -137,8 +143,7 @@ class AffairPage extends React.Component {
{ {
showIframe: true, showIframe: true,
}, },
() => { () => {},
},
); );
}, },
}, },
...@@ -263,7 +268,14 @@ class AffairPage extends React.Component { ...@@ -263,7 +268,14 @@ class AffairPage extends React.Component {
}; };
render() { render() {
const { workId, dataBaseId, addFields, showIframe, renderIframe, allConfigSetInfo } = this.state; const {
workId,
dataBaseId,
addFields,
showIframe,
renderIframe,
allConfigSetInfo,
} = this.state;
if (!workId || !allConfigSetInfo) { if (!workId || !allConfigSetInfo) {
return null; return null;
} }
...@@ -279,7 +291,7 @@ class AffairPage extends React.Component { ...@@ -279,7 +291,7 @@ class AffairPage extends React.Component {
listConfig.buttonArea = false; listConfig.buttonArea = false;
} }
return ( return (
<PageHeaderWrapper title=''> <PageHeaderWrapper title="">
<div <div
style={{ style={{
display: showIframe ? 'none' : 'block', display: showIframe ? 'none' : 'block',
...@@ -309,10 +321,10 @@ class AffairPage extends React.Component { ...@@ -309,10 +321,10 @@ class AffairPage extends React.Component {
display: showIframe ? 'block' : 'none', display: showIframe ? 'block' : 'none',
}}> }}>
<ButtonDiy <ButtonDiy
name='返回' name="返回"
className='defaultBlue' className="defaultBlue"
handleClick={this.returnList} handleClick={this.returnList}
icon='arrow-left' icon="arrow-left"
/> />
</div> </div>
</Shell> </Shell>
...@@ -320,11 +332,11 @@ class AffairPage extends React.Component { ...@@ -320,11 +332,11 @@ class AffairPage extends React.Component {
<iframe <iframe
src={iframeUrl} src={iframeUrl}
frameBorder={0} frameBorder={0}
id='applyIframeId' id="applyIframeId"
name='applyIframe' name="applyIframe"
marginWidth='0' marginWidth="0"
marginHeight='0' marginHeight="0"
allowtransparency='yes' allowtransparency="yes"
seamless seamless
scrolling={'auto'} scrolling={'auto'}
style={{ style={{
......
...@@ -343,7 +343,7 @@ export default class DraftEditorCom extends React.Component { ...@@ -343,7 +343,7 @@ export default class DraftEditorCom extends React.Component {
const { modalVisible } = this.state; const { modalVisible } = this.state;
return ( return (
<div> <div style={{border: '1px solid gray'}}>
<StyleControls <StyleControls
btns={btns} btns={btns}
editorState={this.state.editorState} editorState={this.state.editorState}
...@@ -361,6 +361,7 @@ export default class DraftEditorCom extends React.Component { ...@@ -361,6 +361,7 @@ export default class DraftEditorCom extends React.Component {
<Editor <Editor
ref={this.setEditor} ref={this.setEditor}
blockStyleFn={getBlockStyle} blockStyleFn={getBlockStyle}
readOnly={this.props.disabled}
customStyleMap={this.state.styleMap} customStyleMap={this.state.styleMap}
blockRendererFn={MyBlockRender.bind( blockRendererFn={MyBlockRender.bind(
this, this,
......
...@@ -1853,7 +1853,6 @@ export default class tableCom extends Component { ...@@ -1853,7 +1853,6 @@ export default class tableCom extends Component {
// cm = <img src={queryApiActionPath()+obj[dataColumn.base52]} /> // cm = <img src={queryApiActionPath()+obj[dataColumn.base52]} />
// break; // break;
case 'RichText': case 'RichText':
// console.log(obj[dataColumn.base52]);
cm = ( cm = (
<Editor <Editor
key={dataColumn.base52} key={dataColumn.base52}
...@@ -3066,13 +3065,14 @@ export default class tableCom extends Component { ...@@ -3066,13 +3065,14 @@ export default class tableCom extends Component {
} }
break; break;
case 'RichText': case 'RichText':
console.log(initValue, '22222222222222', dataColumn.base52, json);
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue, initialValue: initValue,
rules: rules:
json.vlds && json.vlds.length > 0 json.vlds && json.vlds.length > 0
? json.vlds ? json.vlds
: [{ required: required, message: '请输入' }], : [{ required: required, message: '请输入' }],
})(<DraftEditorCom placeholder={json.placeholder} />); })(<DraftEditorCom placeholder={json.placeholder} disabled={json.disabled}/>);
if ( if (
get === 'mobile' && get === 'mobile' &&
((json.isMobileLabel != null && json.isMobileLabel) || ((json.isMobileLabel != null && json.isMobileLabel) ||
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论