提交 d8b1bc74 authored 作者: 徐立's avatar 徐立

解决场景设计器使用时崩溃问题

上级 6c26bef9
...@@ -1163,8 +1163,8 @@ export default class tableCom extends Component { ...@@ -1163,8 +1163,8 @@ export default class tableCom extends Component {
formCode: this.props.formCode, formCode: this.props.formCode,
formId: this.props.formId, formId: this.props.formId,
isEdit: this.props.isEdit, isEdit: this.props.isEdit,
taskAssignee:this.props.taskAssignee, taskAssignee: this.props.taskAssignee,
userId:this.props.userId userId: this.props.userId,
}, },
this.props.index, this.props.index,
this.props.fatherCode, this.props.fatherCode,
...@@ -1181,7 +1181,7 @@ export default class tableCom extends Component { ...@@ -1181,7 +1181,7 @@ export default class tableCom extends Component {
closeModal: this.closeModal, closeModal: this.closeModal,
render: this.getRender, render: this.getRender,
base64: getBase64, base64: getBase64,
form:this.props.form form: this.props.form,
}, },
functionObj, functionObj,
this.props.routerState, this.props.routerState,
...@@ -1454,17 +1454,17 @@ export default class tableCom extends Component { ...@@ -1454,17 +1454,17 @@ export default class tableCom extends Component {
isEdit, isEdit,
datas, datas,
taskAssignee, taskAssignee,
userId userId,
} = this.props; } = this.props;
const { options, labels, selectDis, modalCode, modalTitle, modalInit, modalProps } = this.state; const { options, labels, selectDis, modalCode, modalTitle, modalInit, modalProps } = this.state;
const { getFieldDecorator, getFieldError, getFieldProps } = this.props.form; const { getFieldDecorator, getFieldError, getFieldProps } = this.props.form;
const disabled = json != null ? json.disabled : false; const disabled = json != null ? json.disabled : false;
const permRank = json !=null ?(json.permRank!=null?json.permRank:0):0; const permRank = json != null ? (json.permRank != null ? json.permRank : 0) : 0;
if (json == null) { if (json == null) {
return <></>; return <></>;
} }
//私有 //私有
if(!isEdit&&permRank==1&&taskAssignee!=userId){ if (!isEdit && permRank == 1 && taskAssignee != userId) {
return <></>; return <></>;
} }
if (json.comName == 'QRCode') { if (json.comName == 'QRCode') {
...@@ -1641,7 +1641,10 @@ export default class tableCom extends Component { ...@@ -1641,7 +1641,10 @@ export default class tableCom extends Component {
<> <>
<ul> <ul>
{files.map((f, index2) => { {files.map((f, index2) => {
if (!this.props.isPrint&&(f.path.indexOf('.png') != -1 || f.path.indexOf('.jpg') != -1)){ if (
!this.props.isPrint &&
(f.path.indexOf('.png') != -1 || f.path.indexOf('.jpg') != -1)
) {
return ( return (
<img <img
key={index2} key={index2}
...@@ -2056,7 +2059,7 @@ export default class tableCom extends Component { ...@@ -2056,7 +2059,7 @@ export default class tableCom extends Component {
// /> // />
// ); // );
// } // }
if (get === 'web'&&!this.props.isPrint) { if (get === 'web' && !this.props.isPrint) {
return ( return (
<li key={index2}> <li key={index2}>
<FilePreview path={queryApiActionPath() + f.path} pathName={f.name} /> <FilePreview path={queryApiActionPath() + f.path} pathName={f.name} />
...@@ -2088,7 +2091,7 @@ export default class tableCom extends Component { ...@@ -2088,7 +2091,7 @@ export default class tableCom extends Component {
// /> // />
// ); // );
// } // }
if (get === 'web'||!this.props.isPrint) { if (get === 'web' || !this.props.isPrint) {
return ( return (
<li key={index2}> <li key={index2}>
<FilePreview path={queryApiActionPath() + f.path} pathName={f.name} /> <FilePreview path={queryApiActionPath() + f.path} pathName={f.name} />
...@@ -2615,6 +2618,7 @@ export default class tableCom extends Component { ...@@ -2615,6 +2618,7 @@ export default class tableCom extends Component {
break; break;
case 'Select': case 'Select':
console.log();
cm = getFieldDecorator(dataColumn.base52, { cm = getFieldDecorator(dataColumn.base52, {
initialValue: initValue, initialValue: initValue,
rules: rules:
...@@ -2630,7 +2634,7 @@ export default class tableCom extends Component { ...@@ -2630,7 +2634,7 @@ export default class tableCom extends Component {
style={{ width: json.width }} style={{ width: json.width }}
optionFilterProp="children" optionFilterProp="children"
getPopupContainer={ getPopupContainer={
this.props.isDynamic this.props.isDynamic && document.querySelector('#dynamic_div')
? () => { ? () => {
return document.querySelector('#dynamic_div'); return document.querySelector('#dynamic_div');
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论