diff --git a/src/components/drawer/index.jsx b/src/components/drawer/index.jsx index 762e4a0..5908be5 100644 --- a/src/components/drawer/index.jsx +++ b/src/components/drawer/index.jsx @@ -80,7 +80,7 @@ export default class DrawerComponents extends React.Component { //获取数据 getDeatilDatas(params, type = 'chart', showJob = '1') { const { language } = this.props; - this.setState({ spinning: true, data: [] }); + this.setState({ spinning: true, data: [], dataSource: [] }); d3.json( '/api/bs/hrmorganization/orgchart/getDepartmentDetail?' + qs.stringify({ detauleType: type, ...params, showJob }), @@ -131,7 +131,11 @@ export default class DrawerComponents extends React.Component { title: `${i18n.table.mobile[language]}`, }, ]; - this.setState({ dataSource: data.dataSource, columns: columns }); + this.setState({ + dataSource: data.dataSource, + columns: columns, + spinning: false, + }); } }); } @@ -500,6 +504,7 @@ export default class DrawerComponents extends React.Component { dataSource={dataSource} columns={columns} scroll={{ y: 500 }} + loading={spinning} pagination={{ locale: { // 翻页文本替换 @@ -539,7 +544,7 @@ export default class DrawerComponents extends React.Component { , ]} > -
{jobResponsibility}
+