+
)
} else {
return
{
- if ( e.keyCode == 13 && e.target.tagName === "INPUT") {
- jobGrade.getTableInfo();
+ if (e.keyCode == 13 && e.target.tagName === "INPUT") {
+ jobGrade.getTableInfo();
jobGrade.setPanelStatus(false)
}
}}>{arr}
@@ -371,14 +373,32 @@ export default class JobGrade extends React.Component {
jobGrade
} = this.props;
const {
- isPanelShow, form2, gradeName, conditionNum, tableStore,nEdialogTitle,visible,condition,
- form,dialogLoading,isEdit,selectedKey,topTab,topTabCount,date,hasRight
+ isPanelShow, form2, gradeName, conditionNum, tableStore, nEdialogTitle, visible, condition,
+ form, dialogLoading, isEdit, selectedKey, topTab, topTabCount, date, hasRight, treeConfig, treeLoading
} = jobGrade;
if (hasRight === false) {
return renderNoright();
}
+ const {
+ data,
+ onSelectedTreeNode,
+ selectedKeys,
+ onExpand,
+ treeExpandKeys
+ } = toJS(treeConfig);
+ const treeCom = (
+
+ )
+
return (
hasRight &&
this.handleMenuClick(e)}
>
- jobGrade.setPanelStatus(bool)}
- hideSearchAd={() => jobGrade.setPanelStatus(false)}
- searchsAd= {isPanelShow ? this.getPanelComponents() : }
- advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
- hasMask={false}
- buttonsAd={this.getTabBtn()}
- onSearch={() => jobGrade.getTableInfo()}
- onSearchChange={val => this.onSearchChange(val)}
- />
- this.reRenderColumns(c)}
- onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}
- />
+
+ jobGrade.setPanelStatus(bool)}
+ hideSearchAd={() => jobGrade.setPanelStatus(false)}
+ searchsAd={isPanelShow ? this.getPanelComponents() : }
+ advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
+ hasMask={false}
+ buttonsAd={this.getTabBtn()}
+ onSearch={() => jobGrade.getTableInfo()}
+ onSearchChange={val => this.onSearchChange(val)}
+ />
+ this.reRenderColumns(c)}
+ onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}
+ />
+
-
+ )
+
return (
hasRight &&
this.handleMenuClick(e)}
>
- jobLevel.setPanelStatus(bool)}
- hideSearchAd={() => jobLevel.setPanelStatus(false)}
- searchsAd={isPanelShow ? this.getPanelComponents() : }
- advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
- hasMask={false}
- buttonsAd={this.getTabBtn()}
- onSearch={() => jobLevel.getTableInfo()}
- onSearchChange={val => this.onSearchChange(val)}
- />
- this.reRenderColumns(c)}
- onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}
- />
+
+
+ jobLevel.setPanelStatus(bool)}
+ hideSearchAd={() => jobLevel.setPanelStatus(false)}
+ searchsAd={isPanelShow ? this.getPanelComponents() : }
+ advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
+ hasMask={false}
+ buttonsAd={this.getTabBtn()}
+ onSearch={() => jobLevel.getTableInfo()}
+ onSearchChange={val => this.onSearchChange(val)}
+ />
+ this.reRenderColumns(c)}
+ onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}
+ />
+
getLabel(386246, '岗位编号设置'),
userNumSetting: () => getLabel(386246, '人员编号设置'),
companyName: () => getLabel(385937, '分部'),
+ newCompany: () => getLabel(385937, '新增分部'),
+ viewCompany: () => getLabel(385937, '分部信息'),
+ updateCompany: () => getLabel(385937, '修改分部信息'),
staffSchemeName: () => getLabel(385936, '编制方案'),
newStaffScheme: () => getLabel(386246, '新建编制方案'),
ediStaffScheme: () => getLabel(386247, '编辑编制方案'),
@@ -141,12 +144,14 @@ export const i18n = {
editStaff: () => getLabel(386247, '编辑编制'),
changeStaff: () => getLabel(386247, '编制变更'),
jobName: () => getLabel(385936, '岗位'),
- newJob: () => getLabel(386246, '新建岗位'),
- editJob: () => getLabel(386247, '编辑岗位'),
+ newJob: () => getLabel(386246, '新增岗位'),
+ editJobInfo: () => getLabel(386247, '修改岗位信息'),
+ jobInfo: () => getLabel(386247, '岗位信息'),
deptManage: () => getLabel(385936, '部门管理'),
- newDept: () => getLabel(386246, '新建部门'),
+ newDept: () => getLabel(386246, '新增部门'),
mergeDept:()=> getLabel(386246, '合并部门'),
transferDept:()=> getLabel(386246, '转移部门'),
+ editDept:()=> getLabel(386246, '修改部门信息'),
typeName: () => getLabel(129927, '类型名称'),
ResourceName: () => getLabel(385936, '人员'),
newPeople: () => getLabel(386246, '新建人员'),
diff --git a/pc4mobx/organization/stores/companyextend.js b/pc4mobx/organization/stores/companyextend.js
index 8079896..2e70f03 100644
--- a/pc4mobx/organization/stores/companyextend.js
+++ b/pc4mobx/organization/stores/companyextend.js
@@ -43,12 +43,10 @@ export class CompanyExtendStore {
this.isEditor = true;
this.getData();
this.getTabInfo();
- //this.tabkey = '0';
this.detailSelectedKey = '0'
}
init = () => {
- //this.tabkey = '0';
this.detailSelectedKey = '0'
this.isEditor = false;
}
diff --git a/pc4mobx/organization/stores/jobgrade.js b/pc4mobx/organization/stores/jobgrade.js
index 5014b82..11a6e8e 100644
--- a/pc4mobx/organization/stores/jobgrade.js
+++ b/pc4mobx/organization/stores/jobgrade.js
@@ -48,38 +48,73 @@ export class JobGradeStore {
@observable topTab = [];
@observable topTabCount = {};
@observable key = '';//
- @observable hasRight = '';
+ @observable hasRight = true;
+ @observable treeLoading = true;
+
+ @observable treeConfig = {
+ data: [],
+ selectedKeys: [],
+ treeExpandKeys: [],
+ onExpand: (keys) => {
+ this.treeConfig.treeExpandKeys = keys;
+ },
+ onSelectedTreeNode: (key, count, countType) => {
+ this.treeConfig.selectedKeys = [key];
+ this.selectedTreeNodeInfo = countType.node.props.data;
+ this.getTableInfo();
+ }
+ }
+ //选中树节点的信息
+ @observable selectedTreeNodeInfo;
+
+ @action initData = () => {
+ this.selectedTreeNodeInfo = null;
+ this.treeConfig.treeExpandKeys.length = 0;
+ Api.getTree().then(res => {
+ if (res.code === 200) {
+ if (res.data.length > 0) {
+ this.treeConfig.data = res.data;
+ this.treeConfig.selectedKeys = [res.data[0].key];
+ this.treeConfig.treeExpandKeys = "-1";
+ this.selectedTreeNodeInfo = res.data[0];
+ this.getTableInfo();
+ this.setTreeLoading(false);
+ }
+ } else {
+ message.error(res.msg);
+ }
+ }, error => { })
+ }
@action
getTableInfo() {
- let params;
+ let params = {
+ schemeId: this.selectedTreeNodeInfo && this.selectedTreeNodeInfo.domid,
+ }
this.tableStore = new TableStore();
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
- ...this.form2.getFormParams(),
+ ...params,
gradeName: this.gradeName,
- viewCondition:this.selectedKey
};
} else {
params = {
+ ...params,
...this.form2.getFormParams(),
- viewCondition:this.selectedKey
};
}
Api.getSearchList(params).then(res => {
if (res.code === 200) {
this.setHasRight(res.data.hasRight);
res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
+
} else {
message.warning(res.msg);
}
}, error => {
message.warning(error.msg);
})
- //获取tab信息(去除)
- //this.getTabInfo();
-
}
@action
@@ -384,4 +419,8 @@ export class JobGradeStore {
this.hasRight = bool;
}
+ setTreeLoading(bool) {
+ this.treeLoading = bool;
+ }
+
}
\ No newline at end of file
diff --git a/pc4mobx/organization/stores/joblevel.js b/pc4mobx/organization/stores/joblevel.js
index 8a2e8e2..350389d 100644
--- a/pc4mobx/organization/stores/joblevel.js
+++ b/pc4mobx/organization/stores/joblevel.js
@@ -48,25 +48,59 @@ export class JobLevelStore {
@observable topTab = [];
@observable topTabCount = {};
@observable hasRight = '';
+ @observable treeLoading = true;
+ @observable treeConfig = {
+ data: [],
+ selectedKeys: [],
+ treeExpandKeys: [],
+ onExpand: (keys) => {
+ this.treeConfig.treeExpandKeys = keys;
+ },
+ onSelectedTreeNode: (key, count, countType) => {
+ this.treeConfig.selectedKeys = [key];
+ this.selectedTreeNodeInfo = countType.node.props.data;
+ this.getTableInfo();
+ }
+ }
+ //选中树节点的信息
+ @observable selectedTreeNodeInfo;
+
+ @action initData = () => {
+ this.selectedTreeNodeInfo = null;
+ this.treeConfig.treeExpandKeys.length = 0;
+ Api.getTree().then(res => {
+ if (res.code === 200) {
+ if (res.data.length > 0) {
+ this.treeConfig.data = res.data;
+ this.treeConfig.selectedKeys = [res.data[0].key];
+ this.treeConfig.treeExpandKeys = "-1";
+ this.selectedTreeNodeInfo = res.data[0];
+ this.getTableInfo();
+ this.setTreeLoading(false);
+ }
+ } else {
+ message.error(res.msg);
+ }
+ }, error => { })
+ }
@action
getTableInfo() {
- let params;
- //获取tab信息
- // this.getTabInfo();
+ let params = {
+ schemeId: this.selectedTreeNodeInfo && this.selectedTreeNodeInfo.domid,
+ }
this.tableStore = new TableStore();
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
- ...this.form2.getFormParams(),
+ ...params,
levelName: this.levelName,
- viewCondition:this.selectedKey
};
} else {
params = {
+ ...params,
...this.form2.getFormParams(),
- viewCondition:this.selectedKey
};
}
Api.getSearchList(params).then(res => {
@@ -79,7 +113,7 @@ export class JobLevelStore {
}, error => {
message.warning(error.msg);
})
-
+
}
//删除
@@ -225,7 +259,7 @@ export class JobLevelStore {
@action
- getHasRight() {
+ getHasRight() {
Api.getHasRight().then(res => {
if (res.code === 200) {
res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
@@ -344,4 +378,8 @@ export class JobLevelStore {
this.hasRight = bool;
}
+ setTreeLoading(bool) {
+ this.treeLoading = bool;
+ }
+
}
\ No newline at end of file