待办区域数据剥离

This commit is contained in:
yunkexin 2024-05-09 14:59:21 +08:00
parent 83c81c9864
commit 495b1836c9

View File

@ -177,6 +177,7 @@ class Home extends React.Component {
timeNow: "上午好",
workData: [],
workTotal: "",
workTotalData:[],
tableKey: "1",
formVisible: false,
noticeTitle: "",
@ -471,7 +472,7 @@ class Home extends React.Component {
}
};
workClick = (e) => {
this.showEditModal(
this.showTableEditModal(
e.SOURCE_DATA_ID,
e.SOURCE_FORMCODE,
e.ID,
@ -497,6 +498,44 @@ class Home extends React.Component {
return "已办";
}
}
showTableEditModal= (dataId, formCode, TaskID, title, taskCode) => {
// this.props.dispatch({
// type: "app/getDataByPost",
// url: "BI/BIController/getVersion",
// onComplete: (ret) => {
// if (ret > config.version) {
// window.localStorage.clear();
// message.success("清除成功,即将重新加载页面", 2, () => {
// setTimeout(() => window.location.reload(true), 500);
// });
// }
// },
// });
const newtmpData = {
data: {
id: dataId,
TaskID: TaskID,
onCancel: this.handleTableCancel,
taskCode: taskCode,
tableKey: this.state.tableKey,
homeReload: true,
},
formCode: formCode,
};
this.setState(
{
noticeTitle: title,
taskCode: taskCode,
tmpData: newtmpData,
currActivatedMenu: "",
},
() => {
this.setState({
formVisible: true,
});
}
);
};
showEditModal = (dataId, formCode, TaskID, title, taskCode) => {
// this.props.dispatch({
// type: "app/getDataByPost",
@ -550,6 +589,11 @@ class Home extends React.Component {
this.getBaseData(1, this.state.overDataKey);
this.clearData();
};
handleTableCancel= () => {
// 退出弹窗
this.getBaseData(1, this.state.tableKey,5);
this.clearData();
};
closeModal = () => {
this.setState({
formVisible: false,
@ -594,10 +638,22 @@ class Home extends React.Component {
onlyData: false,
onComplete: (ret) => {
if (ret && ret.IsSuccessful && ret.Data.newData) {
if(limit == 5) {
this.setState({
workData: ret.Data.newData,
workTotal: ret.Data,
// workTotal: ret.Data,
});
}else{
this.setState({
// workData: ret.Data.newData,
workTotal: ret.Data,
workTotalData:ret.Data.newData,
});
}
// this.setState({
// workData: ret.Data.newData,
// workTotal: ret.Data,
// });
}
},
});
@ -1480,7 +1536,7 @@ class Home extends React.Component {
</Form>
<Table
// rowSelection={rowSelection}
dataSource={this.state.workData}
dataSource={this.state.workTotalData}
columns={this.state.searchColumns}
onChange={(num) =>
this.getBaseInfoData(num, this.state.currentpageIndex, null)
@ -1558,7 +1614,7 @@ class Home extends React.Component {
</Row>
</Form>
<Table
dataSource={this.state.workData}
dataSource={this.state.workTotalData}
columns={this.state.searchColumns}
onChange={(num) =>
this.getBaseInfoData(num, this.state.currentpageIndex, null)