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

驳回的页面一直报错的bug

上级 5b206448
...@@ -471,8 +471,6 @@ class DetailSplit extends Component { ...@@ -471,8 +471,6 @@ class DetailSplit extends Component {
route: this.props?.route, route: this.props?.route,
}; };
// console.log("🚀 ~ file:DetailSplit method:render line:467 -----", "data", data);
return ( return (
<Fragment> <Fragment>
<div <div
......
...@@ -296,14 +296,17 @@ class FormList extends React.Component { ...@@ -296,14 +296,17 @@ class FormList extends React.Component {
} else { } else {
// DataObj models层中的数据 // DataObj models层中的数据
getServicesNomal(findByCodeApi, { objCode: this.props.objCode }).then(dataObj => { getServicesNomal(findByCodeApi, { objCode: this.props.objCode }).then(dataObj => {
this.setState( if(dataObj && dataObj.id){
{ this.setState(
objId: dataObj.id, {
isTable: dataObj.isTable, objId: dataObj.id,
}, isTable: dataObj.isTable,
() => { },
this.initColumn(); () => {
}) this.initColumn();
})
}
}); });
} }
} else { } else {
...@@ -511,8 +514,8 @@ class FormList extends React.Component { ...@@ -511,8 +514,8 @@ class FormList extends React.Component {
{files.map((f, index2) => { {files.map((f, index2) => {
return ( return (
<li key={index2}> <li key={index2}>
<FilePreview <FilePreview
path={queryFileUrl(f.path)} path={queryFileUrl(f.path)}
pathName={f.name} pathName={f.name}
images={files?.map((item) => { images={files?.map((item) => {
return { return {
...@@ -642,6 +645,9 @@ class FormList extends React.Component { ...@@ -642,6 +645,9 @@ class FormList extends React.Component {
this.setState({ this.setState({
loading: false, loading: false,
}); });
if(!data){
return null;
}
if (!this.state.isReady) { if (!this.state.isReady) {
this.setState({ this.setState({
data, data,
......
...@@ -161,6 +161,7 @@ export default class TableCom extends Component { ...@@ -161,6 +161,7 @@ export default class TableCom extends Component {
} }
} }
this.serviceJSONParams = {};
} }
closeModal = (fk, callback) => { closeModal = (fk, callback) => {
...@@ -1352,9 +1353,11 @@ export default class TableCom extends Component { ...@@ -1352,9 +1353,11 @@ export default class TableCom extends Component {
// 当上次的请求参数和这次的相同时 不再发起请求 // 当上次的请求参数和这次的相同时 不再发起请求
return false; return false;
} }
if(this.serviceJSONParams !== JSON.stringify(params)){
this.serviceJSONParams = JSON.stringify(params);
}else{
return false;
}
getServicesNomal(getSqlOptionsApi, params).then(options => { getServicesNomal(getSqlOptionsApi, params).then(options => {
const optionsx = []; const optionsx = [];
let base52 = dataColumn.base52; let base52 = dataColumn.base52;
...@@ -1401,7 +1404,11 @@ export default class TableCom extends Component { ...@@ -1401,7 +1404,11 @@ export default class TableCom extends Component {
// 当上次的请求参数和这次的相同时 不再发起请求 // 当上次的请求参数和这次的相同时 不再发起请求
return false; return false;
} }
if(this.serviceJSONParams !== JSON.stringify(params)){
this.serviceJSONParams = JSON.stringify(params);
}else{
return false;
}
if (obj[base52]) { if (obj[base52]) {
getServicesNomal(getSqlLabelsApi, params).then(labels => { getServicesNomal(getSqlLabelsApi, params).then(labels => {
this.setState({ this.setState({
...@@ -1425,9 +1432,11 @@ export default class TableCom extends Component { ...@@ -1425,9 +1432,11 @@ export default class TableCom extends Component {
return false; return false;
} }
// if(params.sqlKey === 'KFRvOyGdyvU'){ if(this.serviceJSONParams !== JSON.stringify(params)){
// console.log(params); this.serviceJSONParams = JSON.stringify(params);
// } }else{
return false;
}
getServicesNomal(getSqlOptionsApi, params).then(options => { getServicesNomal(getSqlOptionsApi, params).then(options => {
let base52 = dataColumn.base52; let base52 = dataColumn.base52;
let vl = this.props.form.getFieldsValue()[base52]; let vl = this.props.form.getFieldsValue()[base52];
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论