职务分类新增和编辑成功列表查询失败的bug,以及新增时表单接口的调整
This commit is contained in:
parent
6e152af3a2
commit
b5334c6830
|
|
@ -67,16 +67,13 @@ class LeftTree extends Component {
|
||||||
this.setState({ rightClickNodeTreeItem: null });
|
this.setState({ rightClickNodeTreeItem: null });
|
||||||
};
|
};
|
||||||
onSelect = node => {
|
onSelect = node => {
|
||||||
const [postId] = node;
|
|
||||||
const { officeManageStore } = this.props;
|
const { officeManageStore } = this.props;
|
||||||
officeManageStore.setOfficeClassifyId(
|
const [postId] = node;
|
||||||
!postId
|
const officeId = !postId
|
||||||
? officeManageStore.officeClassifyId
|
|
||||||
: postId !== "-1" ? postId : ""
|
|
||||||
);
|
|
||||||
officeManageStore.getPostInfoTable(!postId
|
|
||||||
? officeManageStore.officeClassifyId
|
? officeManageStore.officeClassifyId
|
||||||
: postId !== "-1" ? postId : "");
|
: postId !== "-1" ? postId : "";
|
||||||
|
officeManageStore.setOfficeClassifyId(officeId);
|
||||||
|
officeManageStore.getPostInfoTable(officeId);
|
||||||
this.setState({
|
this.setState({
|
||||||
rightClickNodeTreeItem: null
|
rightClickNodeTreeItem: null
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,11 @@ export default class OfficeManage extends Component {
|
||||||
|
|
||||||
handleMenuClick = key => {
|
handleMenuClick = key => {
|
||||||
const { officeManageStore } = this.props;
|
const { officeManageStore } = this.props;
|
||||||
const { isPanelShow, tableStore } = officeManageStore;
|
const { isPanelShow, tableStore, officeClassifyId } = officeManageStore;
|
||||||
isPanelShow && officeManageStore.setPanelStatus(false);
|
isPanelShow && officeManageStore.setPanelStatus(false);
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case "new":
|
case "new":
|
||||||
officeManageStore.getPostInfoForm();
|
officeManageStore.getPostInfoForm({ planId: officeClassifyId });
|
||||||
officeManageStore.setVisible(true);
|
officeManageStore.setVisible(true);
|
||||||
officeManageStore.setNeDialogTitle(i18n.label.newOfficeName());
|
officeManageStore.setNeDialogTitle(i18n.label.newOfficeName());
|
||||||
break;
|
break;
|
||||||
|
|
@ -137,7 +137,7 @@ export default class OfficeManage extends Component {
|
||||||
if (item.menuFun == "new") {
|
if (item.menuFun == "new") {
|
||||||
officeManageStore.isPanelShow &&
|
officeManageStore.isPanelShow &&
|
||||||
officeManageStore.setPanelStatus(false);
|
officeManageStore.setPanelStatus(false);
|
||||||
officeManageStore.getPostInfoForm();
|
officeManageStore.getPostInfoForm({ planId: officeClassifyId });
|
||||||
officeManageStore.setVisible(true);
|
officeManageStore.setVisible(true);
|
||||||
officeManageStore.setNeDialogTitle(i18n.label.newOfficeName());
|
officeManageStore.setNeDialogTitle(i18n.label.newOfficeName());
|
||||||
} else if (
|
} else if (
|
||||||
|
|
@ -223,7 +223,7 @@ export default class OfficeManage extends Component {
|
||||||
deletePostinfoByIds({ ids }).then(({ code, msg }) => {
|
deletePostinfoByIds({ ids }).then(({ code, msg }) => {
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
officeManageStore.getPostInfoTable();
|
officeManageStore.getPostInfoTable(officeManageStore.officeClassifyId);
|
||||||
} else {
|
} else {
|
||||||
message.error(msg || "删除失败");
|
message.error(msg || "删除失败");
|
||||||
}
|
}
|
||||||
|
|
@ -268,7 +268,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.getPostInfoTable(officeManageStore.officeClassifyId);
|
||||||
} else {
|
} else {
|
||||||
message.error(msg || "操作失败");
|
message.error(msg || "操作失败");
|
||||||
}
|
}
|
||||||
|
|
@ -283,7 +283,7 @@ export default class OfficeManage extends Component {
|
||||||
this.setState({ editId });
|
this.setState({ editId });
|
||||||
const { officeManageStore } = this.props;
|
const { officeManageStore } = this.props;
|
||||||
officeManageStore.isPanelShow && officeManageStore.setPanelStatus(false);
|
officeManageStore.isPanelShow && officeManageStore.setPanelStatus(false);
|
||||||
officeManageStore.getPostInfoForm(editId);
|
officeManageStore.getPostInfoForm({ id: editId });
|
||||||
officeManageStore.setVisible(true);
|
officeManageStore.setVisible(true);
|
||||||
officeManageStore.setNeDialogTitle(i18n.label.editOfficeName());
|
officeManageStore.setNeDialogTitle(i18n.label.editOfficeName());
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import { observable, action, toJS } from "mobx";
|
import { action, observable } from "mobx";
|
||||||
import { WeaForm } from "comsMobx";
|
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||||
import { WeaTableNew } from "comsMobx";
|
import { message } from "antd";
|
||||||
import { Modal, message } from "antd";
|
|
||||||
import { i18n } from "../public/i18n";
|
|
||||||
import * as API from "../apis/officeManage";
|
import * as API from "../apis/officeManage";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
|
||||||
|
|
@ -69,13 +67,12 @@ export class OfficeManageStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("获取新增/编辑表单")
|
@action("获取新增/编辑表单")
|
||||||
getPostInfoForm(id) {
|
getPostInfoForm(params) {
|
||||||
this.setDialogLoadingStatus(true);
|
this.setDialogLoadingStatus(true);
|
||||||
API.getPostInfoForm({ id }).then(res => {
|
API.getPostInfoForm(params).then(res => {
|
||||||
this.setDialogLoadingStatus(false);
|
this.setDialogLoadingStatus(false);
|
||||||
const { code, data, msg } = res;
|
const { code, data, msg } = res;
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
console.log();
|
|
||||||
data.condition && this.setCondition(data.condition);
|
data.condition && this.setCondition(data.condition);
|
||||||
data.condition && this.form.initFormFields(data.condition);
|
data.condition && this.form.initFormFields(data.condition);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -83,6 +80,7 @@ export class OfficeManageStore {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@action("获取表格数据")
|
@action("获取表格数据")
|
||||||
getPostInfoTable(postId) {
|
getPostInfoTable(postId) {
|
||||||
let params;
|
let params;
|
||||||
|
|
@ -95,8 +93,8 @@ export class OfficeManageStore {
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
params = {
|
params = {
|
||||||
postId,
|
...this.form2.getFormParams(),
|
||||||
...this.form2.getFormParams()
|
postId
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
API.getPostInfoTable(params).then(res => {
|
API.getPostInfoTable(params).then(res => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue