From a578e4e3abe19327f299d0bfbc0240f97555c5a9 Mon Sep 17 00:00:00 2001
From: Chengliang <1546584672@qq.com>
Date: Fri, 2 Sep 2022 11:00:27 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B5=E9=9D=A2=E8=B7=B3?=
=?UTF-8?q?=E8=BD=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/department/department.js | 13 +++++++++++--
pc4mobx/organization/components/job/Job.js | 11 ++++++++++-
.../organization/components/office/officeManage.js | 2 +-
.../organization/components/staff/StaffScheme.js | 5 +----
pc4mobx/organization/public/i18n.js | 1 +
pc4mobx/organization/stores/jobgrade.js | 11 +++++------
pc4mobx/organization/stores/joblevel.js | 11 ++++++-----
pc4mobx/organization/stores/officeManage.js | 6 +++---
pc4mobx/organization/stores/rankscheme.js | 11 ++++++-----
pc4mobx/organization/stores/sequence.js | 10 +++++-----
pc4mobx/organization/stores/staff.js | 8 ++++----
pc4mobx/organization/stores/staffscheme.js | 10 +++++-----
12 files changed, 58 insertions(+), 41 deletions(-)
diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js
index 13c7358..0afa088 100644
--- a/pc4mobx/organization/components/department/department.js
+++ b/pc4mobx/organization/components/department/department.js
@@ -1,7 +1,7 @@
/**
* @Author: 程亮
* @Date: 2022-06-02 09:19:37
- * @LastEditTime: 2022-08-03 15:11:19
+ * @LastEditTime: 2022-09-01 15:06:53
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
*/
@@ -184,7 +184,7 @@ export default class Department extends React.Component {
const {
selectedRowKeys
} = department;
-
+
let keys = id == undefined ? toJS(selectedRowKeys).toString() : id;
department.setIds(keys);
confirm({
@@ -524,12 +524,21 @@ export default class Department extends React.Component {
inputLeftDom={`${i18n.label.organization()}`}
treeNodeClick={this.treeNodeClick}
expandAllChildrenOnSearch={true}
+ renderNode={item => this.renderNode(item)}
/>
)
return tree;
}
+ renderNode(item) {
+ return
+
+ {item.name}
+ {item.canceled && ({i18n.label.forbidden()})}
+
+ }
+
treeNodeClick = (event, ids, nodeids, nodes) => {
const {
department
diff --git a/pc4mobx/organization/components/job/Job.js b/pc4mobx/organization/components/job/Job.js
index 960174c..3de6483 100644
--- a/pc4mobx/organization/components/job/Job.js
+++ b/pc4mobx/organization/components/job/Job.js
@@ -1,7 +1,7 @@
/**
* @Author: 程亮
* @Date: 2022-05-26 14:05:59
- * @LastEditTime: 2022-08-03 15:13:55
+ * @LastEditTime: 2022-09-01 15:08:26
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js
*/
@@ -493,12 +493,21 @@ export default class Job extends React.Component {
inputLeftDom={`${i18n.label.organization()}`}
treeNodeClick={this.treeNodeClick}
expandAllChildrenOnSearch={true}
+ renderNode={item => this.renderNode(item)}
/>
)
return tree;
}
+ renderNode(item) {
+ return
+
+ {item.name}
+ {item.canceled && ({i18n.label.forbidden()})}
+
+ }
+
treeNodeClick = (event, ids, nodeids, nodes) => {
const {
job
diff --git a/pc4mobx/organization/components/office/officeManage.js b/pc4mobx/organization/components/office/officeManage.js
index 34b4587..ed5d73b 100644
--- a/pc4mobx/organization/components/office/officeManage.js
+++ b/pc4mobx/organization/components/office/officeManage.js
@@ -278,7 +278,7 @@ export default class OfficeManage extends Component {
updateForbiddenTagById(payload).then(({ code, msg }) => {
if (code === 200) {
message.success("操作成功");
- officeManageStore.getPostInfoTable(officeManageStore.officeClassifyId);
+ officeManageStore.getPostInfoTable(officeManageStore.officeClassifyId,true);
} else {
message.error(msg || "操作失败");
}
diff --git a/pc4mobx/organization/components/staff/StaffScheme.js b/pc4mobx/organization/components/staff/StaffScheme.js
index c6795c6..3f96376 100644
--- a/pc4mobx/organization/components/staff/StaffScheme.js
+++ b/pc4mobx/organization/components/staff/StaffScheme.js
@@ -250,7 +250,7 @@ export default class StaffScheme extends React.Component {
} = operate;
(index == '0') && this.doEdit(record.randomFieldId);
(index == '1') && this.doDel(record.randomFieldId);
- (index == '2') && this.doWorkflow(record.randomFieldId);
+ //(index == '2') && this.doWorkflow(record.randomFieldId);
}
doEdit(id) {
@@ -295,9 +295,6 @@ export default class StaffScheme extends React.Component {
this.showConfirm('del');
}
- doWorkflow(id) {
- alert("逻辑太自由,暂缓")
- }
handleSave() {
diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js
index ff05f20..8adef79 100644
--- a/pc4mobx/organization/public/i18n.js
+++ b/pc4mobx/organization/public/i18n.js
@@ -162,6 +162,7 @@ export const i18n = {
newResourceBasicType: () => getLabel(386246, '新建人员资料类型'),
editResourceBasicInfo: () => getLabel(386246, '编辑人员资料'),
editResourceBasicType: () => getLabel(386246, '编辑人员资料类型'),
+ forbidden: () => getLabel('531114', '已禁用'),
authorizationGroup: () => getLabel(492, '权限组'),
allAuthorization: () => getLabel(33363, '全部权限'),
diff --git a/pc4mobx/organization/stores/jobgrade.js b/pc4mobx/organization/stores/jobgrade.js
index 0a69083..d2f622b 100644
--- a/pc4mobx/organization/stores/jobgrade.js
+++ b/pc4mobx/organization/stores/jobgrade.js
@@ -88,11 +88,11 @@ export class JobGradeStore {
@action
- getTableInfo() {
+ getTableInfo(isOnChange = false) {
let params = {
schemeId: this.selectedTreeNodeInfo && this.selectedTreeNodeInfo.domid,
}
- this.tableStore = new TableStore();
+ const {current} = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
...params,
@@ -107,8 +107,7 @@ export class JobGradeStore {
Api.getSearchList(params).then(res => {
if (res.code === 200) {
this.setHasRight(res.data.hasRight);
- res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
-
+ isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
} else {
message.warning(res.msg);
}
@@ -185,7 +184,7 @@ export class JobGradeStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
this.setVisible(false);
} else {
message.warning(data.msg);
@@ -210,7 +209,7 @@ export class JobGradeStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
} else {
message.warning(data.msg);
}
diff --git a/pc4mobx/organization/stores/joblevel.js b/pc4mobx/organization/stores/joblevel.js
index 350389d..a80543d 100644
--- a/pc4mobx/organization/stores/joblevel.js
+++ b/pc4mobx/organization/stores/joblevel.js
@@ -87,11 +87,12 @@ export class JobLevelStore {
@action
- getTableInfo() {
+ getTableInfo(isOnChange = false) {
let params = {
schemeId: this.selectedTreeNodeInfo && this.selectedTreeNodeInfo.domid,
}
- this.tableStore = new TableStore();
+ const { current } = this.tableStore;
+
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
...params,
@@ -106,7 +107,7 @@ export class JobLevelStore {
Api.getSearchList(params).then(res => {
if (res.code === 200) {
this.setHasRight(res.data.hasRight);
- res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
+ isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
} else {
message.warning(res.msg);
}
@@ -170,7 +171,7 @@ export class JobLevelStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
this.setVisible(false);
} else {
message.warning(data.msg);
@@ -200,7 +201,7 @@ export class JobLevelStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
} else {
message.warning(data.msg);
}
diff --git a/pc4mobx/organization/stores/officeManage.js b/pc4mobx/organization/stores/officeManage.js
index 1966840..ac769d7 100644
--- a/pc4mobx/organization/stores/officeManage.js
+++ b/pc4mobx/organization/stores/officeManage.js
@@ -82,9 +82,9 @@ export class OfficeManageStore {
}
@action("获取表格数据")
- getPostInfoTable(postId) {
+ getPostInfoTable(postId,isOnChange = false) {
let params;
- this.tableStore = new TableStore();
+ const {current} = this.tableStore;
if (_.isEmpty(this.form2.getFormParams())) {
params = {
...this.form2.getFormParams(),
@@ -100,7 +100,7 @@ export class OfficeManageStore {
API.getPostInfoTable(params).then(res => {
if (res.code === 200) {
this.setHasRight(res.data.hasRight);
- res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
+ isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
} else {
message.error(res.msg);
}
diff --git a/pc4mobx/organization/stores/rankscheme.js b/pc4mobx/organization/stores/rankscheme.js
index f8a18b0..a61d18b 100644
--- a/pc4mobx/organization/stores/rankscheme.js
+++ b/pc4mobx/organization/stores/rankscheme.js
@@ -50,9 +50,10 @@ export class RankSchemeStore {
@action
- getTableInfo() {
+ getTableInfo(isOnChange = false) {
let params;
- this.tableStore = new TableStore();
+ //this.tableStore = new TableStore();
+ const { current } = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
...this.form2.getFormParams(),
@@ -66,7 +67,7 @@ export class RankSchemeStore {
Api.getSearchList(params).then(res => {
if (res.code === 200) {
this.setHasRight(res.data.hasRight);
- res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
+ isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
} else {
message.warning(res.msg);
}
@@ -131,7 +132,7 @@ export class RankSchemeStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
this.setVisible(false);
} else {
message.warning(data.msg);
@@ -156,7 +157,7 @@ export class RankSchemeStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
} else {
message.warning(data.msg);
}
diff --git a/pc4mobx/organization/stores/sequence.js b/pc4mobx/organization/stores/sequence.js
index e2ec395..92e0a09 100644
--- a/pc4mobx/organization/stores/sequence.js
+++ b/pc4mobx/organization/stores/sequence.js
@@ -51,9 +51,9 @@ export class SequenceStore {
@action
- getTableInfo() {
+ getTableInfo(isOnChange = false) {
let params;
- this.tableStore = new TableStore();
+ const {current} = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
...this.form2.getFormParams(),
@@ -69,7 +69,7 @@ export class SequenceStore {
Api.getSearchList(params).then(res => {
if (res.code === 200) {
this.setHasRight(res.data.hasRight);
- res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
+ isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
} else {
message.warning(res.msg);
}
@@ -135,7 +135,7 @@ export class SequenceStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
this.setVisible(false);
} else {
message.warning(data.msg);
@@ -165,7 +165,7 @@ export class SequenceStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
} else {
message.warning(data.msg);
}
diff --git a/pc4mobx/organization/stores/staff.js b/pc4mobx/organization/stores/staff.js
index aa06b70..4d826dd 100644
--- a/pc4mobx/organization/stores/staff.js
+++ b/pc4mobx/organization/stores/staff.js
@@ -55,12 +55,12 @@ export class StaffStore {
@action
- getTableInfo() {
+ getTableInfo(isOnChange = false) {
let params = {
planId: this.planId,
...this.selectTreeNodeInfo,
}
- this.tableStore = new TableStore();
+ const {current} = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
...params,
@@ -75,7 +75,7 @@ export class StaffStore {
Api.getSearchList(params).then(res => {
if (res.code === 200) {
this.setHasRight(res.data.hasRight);
- res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
+ isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
} else {
message.warning(res.msg);
}
@@ -140,7 +140,7 @@ export class StaffStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
this.setVisible(false);
} else {
message.warning(data.msg);
diff --git a/pc4mobx/organization/stores/staffscheme.js b/pc4mobx/organization/stores/staffscheme.js
index 84bc659..c27756d 100644
--- a/pc4mobx/organization/stores/staffscheme.js
+++ b/pc4mobx/organization/stores/staffscheme.js
@@ -53,9 +53,9 @@ export class StaffSchemeStore {
@action
- getTableInfo() {
+ getTableInfo(isOnChange = false) {
let params;
- this.tableStore = new TableStore();
+ const {current} = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) {
params = {
...this.form2.getFormParams(),
@@ -69,7 +69,7 @@ export class StaffSchemeStore {
Api.getSearchList(params).then(res => {
if (res.code === 200) {
this.setHasRight(res.data.hasRight)
- res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
+ isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
} else {
message.warning(res.msg);
}
@@ -134,7 +134,7 @@ export class StaffSchemeStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
this.setVisible(false);
} else {
message.warning(data.msg);
@@ -159,7 +159,7 @@ export class StaffSchemeStore {
}).then(data => {
if (data.code === 200) {
message.success(data.msg);
- this.getTableInfo();
+ this.getTableInfo(true);
} else {
message.warning(data.msg);
}