增加查询loading效果

This commit is contained in:
yunkexin 2024-04-07 14:38:50 +08:00
parent 81978ff082
commit b5e140a50f

View File

@ -54,6 +54,7 @@ class BI006FormRunAnalysis extends React.Component {
detailDataH: [], detailDataH: [],
displayHr: "none", displayHr: "none",
displaydetail: "none", displaydetail: "none",
searchLoading: false,
columns: [ columns: [
{ {
width: "100px", width: "100px",
@ -862,12 +863,18 @@ class BI006FormRunAnalysis extends React.Component {
let endTime = this.state.selectEndTime.format("YYYY-MM-DD 23:59:59"); let endTime = this.state.selectEndTime.format("YYYY-MM-DD 23:59:59");
let json = initFilter(orgId, "", "", "", "", startTime, endTime); let json = initFilter(orgId, "", "", "", "", startTime, endTime);
extendOrder(json, "NUM", 0); extendOrder(json, "NUM", 0);
this.setState({
searchLoading: true,
});
this.props.dispatch({ this.props.dispatch({
type: "app/getDataByPost", type: "app/getDataByPost",
payload: json, payload: json,
url: "BI/BIStatiscialAnalysisController/GetDepartMouldInfos", url: "BI/BIStatiscialAnalysisController/GetDepartMouldInfos",
onComplete: (ret) => { onComplete: (ret) => {
if (ret) { if (ret) {
this.setState({
searchLoading: false,
});
if (ret.mouldData) { if (ret.mouldData) {
let temp = []; let temp = [];
allData.forEach((t) => { allData.forEach((t) => {
@ -1109,7 +1116,11 @@ class BI006FormRunAnalysis extends React.Component {
{/* </Form.Item> */} {/* </Form.Item> */}
</div> </div>
<div> <div>
<Button type="primary" onClick={() => this.loadData()}> <Button
type="primary"
loading={this.state.searchLoading}
onClick={() => this.loadData()}
>
查询 查询
</Button> </Button>
</div> </div>