diff --git a/pc4mobx/organization/apis/snapshot.js b/pc4mobx/organization/apis/snapshot.js index 6ce2aba..6e7f30a 100644 --- a/pc4mobx/organization/apis/snapshot.js +++ b/pc4mobx/organization/apis/snapshot.js @@ -4,4 +4,8 @@ import { export const getSearchList = (date) => { return WeaTools.callApi(`/api/bs/hrmorganization/danikorresource/listPage?syncDate=${date}`, 'GET'); +} + +export const getDatas = (date) => { + return WeaTools.callApi(`/api/bs/hrmorganization/danikorresource/getSummaryData?syncDate=${date}`, 'GET'); } \ No newline at end of file diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js index 2525c81..c73f8b2 100644 --- a/pc4mobx/organization/components/resource/resource.js +++ b/pc4mobx/organization/components/resource/resource.js @@ -62,6 +62,7 @@ export default class Resource extends React.Component { } componentDidMount() { + this.init(); } @@ -289,6 +290,7 @@ export default class Resource extends React.Component { } = this.props; resource.customization(); + } //存为模板 diff --git a/pc4mobx/organization/stores/snapshot.js b/pc4mobx/organization/stores/snapshot.js index 2ddfbd1..265c4be 100644 --- a/pc4mobx/organization/stores/snapshot.js +++ b/pc4mobx/organization/stores/snapshot.js @@ -73,6 +73,18 @@ export class SnapshotStore { @action("数据统计") getDatas() { + Api.getDatas(this.date).then(res => { + if (res.code === 200) { + this.datas = { + ...res.data + } + } else { + message.warning(res.msg); + } + }, error => { + message.warning(error.msg); + }) + }