Merge pull request !68 from reset/feature/cl
This commit is contained in:
reset 2022-09-02 03:03:07 +00:00 committed by Gitee
commit 579900a9fc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
12 changed files with 58 additions and 41 deletions

View File

@ -1,7 +1,7 @@
/** /**
* @Author: 程亮 * @Author: 程亮
* @Date: 2022-06-02 09:19:37 * @Date: 2022-06-02 09:19:37
* @LastEditTime: 2022-08-03 15:11:19 * @LastEditTime: 2022-09-01 15:06:53
* @Description: * @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js * @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
*/ */
@ -524,12 +524,21 @@ export default class Department extends React.Component {
inputLeftDom={`<b>${i18n.label.organization()}</b>`} inputLeftDom={`<b>${i18n.label.organization()}</b>`}
treeNodeClick={this.treeNodeClick} treeNodeClick={this.treeNodeClick}
expandAllChildrenOnSearch={true} expandAllChildrenOnSearch={true}
renderNode={item => this.renderNode(item)}
/> />
) )
return tree; return tree;
} }
renderNode(item) {
return <div className='text-elli' title={item.name}>
<i className={item.icon} style={{ marginRight: '5px' }}></i>
{item.name}
{item.canceled && <span style={{ color: 'red' }}>({i18n.label.forbidden()})</span>}
</div>
}
treeNodeClick = (event, ids, nodeids, nodes) => { treeNodeClick = (event, ids, nodeids, nodes) => {
const { const {
department department

View File

@ -1,7 +1,7 @@
/** /**
* @Author: 程亮 * @Author: 程亮
* @Date: 2022-05-26 14:05:59 * @Date: 2022-05-26 14:05:59
* @LastEditTime: 2022-08-03 15:13:55 * @LastEditTime: 2022-09-01 15:08:26
* @Description: * @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js * @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js
*/ */
@ -493,12 +493,21 @@ export default class Job extends React.Component {
inputLeftDom={`<b>${i18n.label.organization()}</b>`} inputLeftDom={`<b>${i18n.label.organization()}</b>`}
treeNodeClick={this.treeNodeClick} treeNodeClick={this.treeNodeClick}
expandAllChildrenOnSearch={true} expandAllChildrenOnSearch={true}
renderNode={item => this.renderNode(item)}
/> />
) )
return tree; return tree;
} }
renderNode(item) {
return <div className='text-elli' title={item.name}>
<i className={item.icon} style={{ marginRight: '5px' }}></i>
{item.name}
{item.canceled && <span style={{ color: 'red' }}>({i18n.label.forbidden()})</span>}
</div>
}
treeNodeClick = (event, ids, nodeids, nodes) => { treeNodeClick = (event, ids, nodeids, nodes) => {
const { const {
job job

View File

@ -278,7 +278,7 @@ export default class OfficeManage extends Component {
updateForbiddenTagById(payload).then(({ code, msg }) => { updateForbiddenTagById(payload).then(({ code, msg }) => {
if (code === 200) { if (code === 200) {
message.success("操作成功"); message.success("操作成功");
officeManageStore.getPostInfoTable(officeManageStore.officeClassifyId); officeManageStore.getPostInfoTable(officeManageStore.officeClassifyId,true);
} else { } else {
message.error(msg || "操作失败"); message.error(msg || "操作失败");
} }

View File

@ -250,7 +250,7 @@ export default class StaffScheme extends React.Component {
} = operate; } = operate;
(index == '0') && this.doEdit(record.randomFieldId); (index == '0') && this.doEdit(record.randomFieldId);
(index == '1') && this.doDel(record.randomFieldId); (index == '1') && this.doDel(record.randomFieldId);
(index == '2') && this.doWorkflow(record.randomFieldId); //(index == '2') && this.doWorkflow(record.randomFieldId);
} }
doEdit(id) { doEdit(id) {
@ -295,9 +295,6 @@ export default class StaffScheme extends React.Component {
this.showConfirm('del'); this.showConfirm('del');
} }
doWorkflow(id) {
alert("逻辑太自由,暂缓")
}
handleSave() { handleSave() {

View File

@ -162,6 +162,7 @@ export const i18n = {
newResourceBasicType: () => getLabel(386246, '新建人员资料类型'), newResourceBasicType: () => getLabel(386246, '新建人员资料类型'),
editResourceBasicInfo: () => getLabel(386246, '编辑人员资料'), editResourceBasicInfo: () => getLabel(386246, '编辑人员资料'),
editResourceBasicType: () => getLabel(386246, '编辑人员资料类型'), editResourceBasicType: () => getLabel(386246, '编辑人员资料类型'),
forbidden: () => getLabel('531114', '已禁用'),
authorizationGroup: () => getLabel(492, '权限组'), authorizationGroup: () => getLabel(492, '权限组'),
allAuthorization: () => getLabel(33363, '全部权限'), allAuthorization: () => getLabel(33363, '全部权限'),

View File

@ -88,11 +88,11 @@ export class JobGradeStore {
@action @action
getTableInfo() { getTableInfo(isOnChange = false) {
let params = { let params = {
schemeId: this.selectedTreeNodeInfo && this.selectedTreeNodeInfo.domid, schemeId: this.selectedTreeNodeInfo && this.selectedTreeNodeInfo.domid,
} }
this.tableStore = new TableStore(); const {current} = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) { if (this.isEmptyObject(this.form2.getFormParams())) {
params = { params = {
...params, ...params,
@ -107,8 +107,7 @@ export class JobGradeStore {
Api.getSearchList(params).then(res => { Api.getSearchList(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.setHasRight(res.data.hasRight); 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 { } else {
message.warning(res.msg); message.warning(res.msg);
} }
@ -185,7 +184,7 @@ export class JobGradeStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
this.setVisible(false); this.setVisible(false);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
@ -210,7 +209,7 @@ export class JobGradeStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
} }

View File

@ -87,11 +87,12 @@ export class JobLevelStore {
@action @action
getTableInfo() { getTableInfo(isOnChange = false) {
let params = { let params = {
schemeId: this.selectedTreeNodeInfo && this.selectedTreeNodeInfo.domid, schemeId: this.selectedTreeNodeInfo && this.selectedTreeNodeInfo.domid,
} }
this.tableStore = new TableStore(); const { current } = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) { if (this.isEmptyObject(this.form2.getFormParams())) {
params = { params = {
...params, ...params,
@ -106,7 +107,7 @@ export class JobLevelStore {
Api.getSearchList(params).then(res => { Api.getSearchList(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.setHasRight(res.data.hasRight); 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 { } else {
message.warning(res.msg); message.warning(res.msg);
} }
@ -170,7 +171,7 @@ export class JobLevelStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
this.setVisible(false); this.setVisible(false);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
@ -200,7 +201,7 @@ export class JobLevelStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
} }

View File

@ -82,9 +82,9 @@ export class OfficeManageStore {
} }
@action("获取表格数据") @action("获取表格数据")
getPostInfoTable(postId) { getPostInfoTable(postId,isOnChange = false) {
let params; let params;
this.tableStore = new TableStore(); const {current} = this.tableStore;
if (_.isEmpty(this.form2.getFormParams())) { if (_.isEmpty(this.form2.getFormParams())) {
params = { params = {
...this.form2.getFormParams(), ...this.form2.getFormParams(),
@ -100,7 +100,7 @@ export class OfficeManageStore {
API.getPostInfoTable(params).then(res => { API.getPostInfoTable(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.setHasRight(res.data.hasRight); 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 { } else {
message.error(res.msg); message.error(res.msg);
} }

View File

@ -50,9 +50,10 @@ export class RankSchemeStore {
@action @action
getTableInfo() { getTableInfo(isOnChange = false) {
let params; let params;
this.tableStore = new TableStore(); //this.tableStore = new TableStore();
const { current } = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) { if (this.isEmptyObject(this.form2.getFormParams())) {
params = { params = {
...this.form2.getFormParams(), ...this.form2.getFormParams(),
@ -66,7 +67,7 @@ export class RankSchemeStore {
Api.getSearchList(params).then(res => { Api.getSearchList(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.setHasRight(res.data.hasRight); 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 { } else {
message.warning(res.msg); message.warning(res.msg);
} }
@ -131,7 +132,7 @@ export class RankSchemeStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
this.setVisible(false); this.setVisible(false);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
@ -156,7 +157,7 @@ export class RankSchemeStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
} }

View File

@ -51,9 +51,9 @@ export class SequenceStore {
@action @action
getTableInfo() { getTableInfo(isOnChange = false) {
let params; let params;
this.tableStore = new TableStore(); const {current} = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) { if (this.isEmptyObject(this.form2.getFormParams())) {
params = { params = {
...this.form2.getFormParams(), ...this.form2.getFormParams(),
@ -69,7 +69,7 @@ export class SequenceStore {
Api.getSearchList(params).then(res => { Api.getSearchList(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.setHasRight(res.data.hasRight); 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 { } else {
message.warning(res.msg); message.warning(res.msg);
} }
@ -135,7 +135,7 @@ export class SequenceStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
this.setVisible(false); this.setVisible(false);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
@ -165,7 +165,7 @@ export class SequenceStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
} }

View File

@ -55,12 +55,12 @@ export class StaffStore {
@action @action
getTableInfo() { getTableInfo(isOnChange = false) {
let params = { let params = {
planId: this.planId, planId: this.planId,
...this.selectTreeNodeInfo, ...this.selectTreeNodeInfo,
} }
this.tableStore = new TableStore(); const {current} = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) { if (this.isEmptyObject(this.form2.getFormParams())) {
params = { params = {
...params, ...params,
@ -75,7 +75,7 @@ export class StaffStore {
Api.getSearchList(params).then(res => { Api.getSearchList(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.setHasRight(res.data.hasRight); 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 { } else {
message.warning(res.msg); message.warning(res.msg);
} }
@ -140,7 +140,7 @@ export class StaffStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
this.setVisible(false); this.setVisible(false);
} else { } else {
message.warning(data.msg); message.warning(data.msg);

View File

@ -53,9 +53,9 @@ export class StaffSchemeStore {
@action @action
getTableInfo() { getTableInfo(isOnChange = false) {
let params; let params;
this.tableStore = new TableStore(); const {current} = this.tableStore;
if (this.isEmptyObject(this.form2.getFormParams())) { if (this.isEmptyObject(this.form2.getFormParams())) {
params = { params = {
...this.form2.getFormParams(), ...this.form2.getFormParams(),
@ -69,7 +69,7 @@ export class StaffSchemeStore {
Api.getSearchList(params).then(res => { Api.getSearchList(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.setHasRight(res.data.hasRight) 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 { } else {
message.warning(res.msg); message.warning(res.msg);
} }
@ -134,7 +134,7 @@ export class StaffSchemeStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
this.setVisible(false); this.setVisible(false);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
@ -159,7 +159,7 @@ export class StaffSchemeStore {
}).then(data => { }).then(data => {
if (data.code === 200) { if (data.code === 200) {
message.success(data.msg); message.success(data.msg);
this.getTableInfo(); this.getTableInfo(true);
} else { } else {
message.warning(data.msg); message.warning(data.msg);
} }