diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js
index fd68a08..279c8e5 100644
--- a/pc4mobx/organization/components/company/company.js
+++ b/pc4mobx/organization/components/company/company.js
@@ -1,7 +1,7 @@
/**
* @Author: 程亮
* @Date: 2022-05-18 16:23:32
- * @LastEditTime: 2022-05-24 14:29:44
+ * @LastEditTime: 2022-05-25 11:00:00
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
*/
@@ -286,7 +286,7 @@ export default class Company extends React.Component {
} = company;
const btn = [
- (),
+ (),
(),
(),
];
@@ -362,7 +362,7 @@ export default class Company extends React.Component {
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
form1, isEdit, newVisible, deptDataSource, deptColumns, selectedRowKeys, total,current,pageSize,init
} = company;
-
+ console.log("init",total)
const rowSelection = {
onChange(selectedRowKeys, selectedRows) {
@@ -370,7 +370,7 @@ export default class Company extends React.Component {
},
};
- const pagination = {
+ let pagination = {
current:current,
pageSize:pageSize,
total: total,
@@ -412,14 +412,18 @@ export default class Company extends React.Component {
advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
hasMask={false}
buttonsAd={this.getTabBtn()}
- onSearch={() => company.getTableInfo()}
+ onSearch={() => {
+ company.setCurrent(1);
+ company.setPageSize(10);
+ company.getTableInfo()
+ }}
onSearchChange={val => this.onSearchChange(val)}
/>
{
init ?
:
- record.id}
+ record.id} ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
loading={loading}
dataSource={dataSource} childrenColumnName="children"
columns={this.reRenderColumns(columns)}
diff --git a/pc4mobx/organization/stores/company.js b/pc4mobx/organization/stores/company.js
index 4baecc8..a365ad3 100644
--- a/pc4mobx/organization/stores/company.js
+++ b/pc4mobx/organization/stores/company.js
@@ -52,7 +52,7 @@ export class CompanyStore {
@observable selectedRowKeys = '';
@observable date = '';
@observable init = true; //是否首次加载
- @observable total = 0;
+ @observable total = '';
@observable current = 1;
@observable pageSize = 10;
@@ -70,7 +70,7 @@ export class CompanyStore {
params = {
...params,
...this.form.getFormParams(),
- compName: this.companyName,
+ compName: this.companyName
};
} else {
params = {
@@ -82,11 +82,11 @@ export class CompanyStore {
return response.json()
}).then(res => {
if (res.code === 200) {
- res.data.pageInfo.list && this.setDataSource(res.data.pageInfo.list);
res.data.pageInfo.columns && this.setColumns(res.data.pageInfo.columns);
- res.data.pageInfo.total && this.setTotal(res.data.pageInfo.total);
+ this.setTotal(res.data.pageInfo.total);
+ res.data.pageInfo.list && this.setDataSource(res.data.pageInfo.list);
this.setLoading(false);
- this.init = false
+ this.setInit(false);
} else {
message.warning(res.msg);
}
@@ -362,4 +362,8 @@ save() {
this.pageSize = pageSize;
}
+ setInit(bool) {
+ this.init = bool;
+ }
+
}
\ No newline at end of file
diff --git a/pc4mobx/organization/stores/companyextend.js b/pc4mobx/organization/stores/companyextend.js
index 8b317a2..95ba257 100644
--- a/pc4mobx/organization/stores/companyextend.js
+++ b/pc4mobx/organization/stores/companyextend.js
@@ -123,7 +123,8 @@ export class CompanyExtendStore {
this.setLoading(true);
let params = {
viewAttr: this.isEditor ? 2 : 1,
- id: this.id
+ id: this.id,
+ viewCondition:this.selectedKey
}
Api.getCompanyExtendForm(params).then((res) => {
if (res.code === 200) {
@@ -215,6 +216,7 @@ export class CompanyExtendStore {
changeData(key) {
this.setSelectedKey(key);
+ this.getData();
}
setId(id) {