职务分类左侧树搜索折叠的问题
This commit is contained in:
parent
59a0564a67
commit
8db2ed84c6
|
|
@ -152,15 +152,15 @@ class LeftTree extends Component {
|
||||||
return arr;
|
return arr;
|
||||||
};
|
};
|
||||||
onChange = value => {
|
onChange = value => {
|
||||||
if (value == "") {
|
if (_.isEmpty(value)) {
|
||||||
let { copyTree, copyExpandedKeys } = this.state;
|
let { copyTree, copyExpandedKeys, expandedKeys } = this.state;
|
||||||
this.setState({
|
this.setState({
|
||||||
treeData: JSON.parse(copyTree),
|
treeData: JSON.parse(copyTree),
|
||||||
expandedKeys: copyExpandedKeys,
|
expandedKeys,
|
||||||
searchValue: value
|
searchValue: value
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let { copyTree, copyExpandedKeys } = this.state;
|
let { copyTree } = this.state;
|
||||||
let res = this.arrayTreeFilter(
|
let res = this.arrayTreeFilter(
|
||||||
JSON.parse(copyTree),
|
JSON.parse(copyTree),
|
||||||
this.filterFn,
|
this.filterFn,
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,9 @@ export default class OfficeManage extends Component {
|
||||||
showlog = () => {
|
showlog = () => {
|
||||||
window.setLogViewProp({
|
window.setLogViewProp({
|
||||||
logMoudleType: 6,
|
logMoudleType: 6,
|
||||||
keys: new Date().getTime(),
|
keys: new Date().getTime()
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
handleMenuClick = key => {
|
handleMenuClick = key => {
|
||||||
const { officeManageStore } = this.props;
|
const { officeManageStore } = this.props;
|
||||||
|
|
@ -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,true);
|
officeManageStore.getPostInfoTable(officeManageStore.officeClassifyId, true);
|
||||||
} else {
|
} else {
|
||||||
message.error(msg || "操作失败");
|
message.error(msg || "操作失败");
|
||||||
}
|
}
|
||||||
|
|
@ -423,67 +423,66 @@ export default class OfficeManage extends Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
hasRight && <div className="office-wapper">
|
hasRight && <div className="office-wapper">
|
||||||
|
<WeaTop
|
||||||
|
ecId={`${(this && this.props && this.props.ecId) ||
|
||||||
|
""}_WeaTop@446d12`}
|
||||||
|
title={i18n.label.officeName()}
|
||||||
|
icon={<i className="icon-coms-hrm"/>}
|
||||||
|
iconBgcolor="#217346"
|
||||||
|
loading={true}
|
||||||
|
buttons={this.getTopMenuBtns()}
|
||||||
|
showDropIcon={true}
|
||||||
|
dropMenuDatas={this.getDropMenuDatas()}
|
||||||
|
onDropMenuClick={e => this.handleMenuClick(e)}>
|
||||||
|
</WeaTop>
|
||||||
<WeaLeftRightLayout
|
<WeaLeftRightLayout
|
||||||
isNew={true}
|
isNew={true}
|
||||||
leftWidth={260}
|
leftWidth={260}
|
||||||
leftCom={
|
leftCom={
|
||||||
<LeftTree deleteOfficeClassifyFlag={deleteOfficeClassifyFlag}/>
|
<LeftTree deleteOfficeClassifyFlag={deleteOfficeClassifyFlag}/>
|
||||||
}
|
}>
|
||||||
onCollapse={showLeft => console.log("showLeft:", showLeft)}>
|
|
||||||
<WeaRightMenu
|
<WeaRightMenu
|
||||||
ecId={`${(this && this.props && this.props.ecId) ||
|
ecId={`${(this && this.props && this.props.ecId) ||
|
||||||
""}_WeaRightMenu@cea97d`}
|
""}_WeaRightMenu@cea97d`}
|
||||||
datas={this.getDropMenuDatas()}
|
datas={this.getDropMenuDatas()}
|
||||||
onClick={key => this.handleMenuClick(key)}>
|
onClick={key => this.handleMenuClick(key)}>
|
||||||
<WeaTop
|
<WeaTab
|
||||||
ecId={`${(this && this.props && this.props.ecId) ||
|
ecId={`${(this && this.props && this.props.ecId) ||
|
||||||
""}_WeaTop@446d12`}
|
""}_WeaTab@39c727`}
|
||||||
title={i18n.label.officeName()}
|
searchType={["base", "advanced"]}
|
||||||
icon={<i className="icon-coms-hrm"/>}
|
showSearchAd={isPanelShow}
|
||||||
iconBgcolor="#217346"
|
searchsBaseValue={
|
||||||
loading={true}
|
_.isEmpty(form2.getFormParams())
|
||||||
buttons={this.getTopMenuBtns()}
|
? postInfoName
|
||||||
showDropIcon={true}
|
: form2.getFormParams().postInfoName
|
||||||
dropMenuDatas={this.getDropMenuDatas()}
|
}
|
||||||
onDropMenuClick={e => this.handleMenuClick(e)}>
|
setShowSearchAd={bool => officeManageStore.setPanelStatus(bool)}
|
||||||
<WeaTab
|
hideSearchAd={() => officeManageStore.setPanelStatus(false)}
|
||||||
ecId={`${(this && this.props && this.props.ecId) ||
|
searchsAd={isPanelShow ? this.getPanelComponents() : <div/>}
|
||||||
""}_WeaTab@39c727`}
|
advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
|
||||||
searchType={["base", "advanced"]}
|
hasMask={false}
|
||||||
showSearchAd={isPanelShow}
|
buttonsAd={this.getTabBtn()}
|
||||||
searchsBaseValue={
|
onSearch={() => officeManageStore.getPostInfoTable()}
|
||||||
_.isEmpty(form2.getFormParams())
|
onSearchChange={val => this.onSearchChange(val)}
|
||||||
? postInfoName
|
/>
|
||||||
: form2.getFormParams().postInfoName
|
<WeaTable
|
||||||
|
ecId={`${(this && this.props && this.props.ecId) ||
|
||||||
|
""}_WeaTable@b43a4c`}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
rowSelection={{
|
||||||
|
getCheckboxProps: record => {
|
||||||
|
console.log(record);
|
||||||
|
return {
|
||||||
|
disabled: true // 配置无法勾选的列
|
||||||
|
};
|
||||||
}
|
}
|
||||||
setShowSearchAd={bool => officeManageStore.setPanelStatus(bool)}
|
}}
|
||||||
hideSearchAd={() => officeManageStore.setPanelStatus(false)}
|
getColumns={c => this.reRenderColumns(c)}
|
||||||
searchsAd={isPanelShow ? this.getPanelComponents() : <div/>}
|
onOperatesClick={(record, index, operate) =>
|
||||||
advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
|
this.onOperatesClick(record, index, operate)}
|
||||||
hasMask={false}
|
/>
|
||||||
buttonsAd={this.getTabBtn()}
|
|
||||||
onSearch={() => officeManageStore.getPostInfoTable()}
|
|
||||||
onSearchChange={val => this.onSearchChange(val)}
|
|
||||||
/>
|
|
||||||
<WeaTable
|
|
||||||
ecId={`${(this && this.props && this.props.ecId) ||
|
|
||||||
""}_WeaTable@b43a4c`}
|
|
||||||
comsWeaTableStore={tableStore}
|
|
||||||
hasOrder={true}
|
|
||||||
needScroll={true}
|
|
||||||
rowSelection={{
|
|
||||||
getCheckboxProps: record => {
|
|
||||||
console.log(record);
|
|
||||||
return {
|
|
||||||
disabled: true // 配置无法勾选的列
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
getColumns={c => this.reRenderColumns(c)}
|
|
||||||
onOperatesClick={(record, index, operate) =>
|
|
||||||
this.onOperatesClick(record, index, operate)}
|
|
||||||
/>
|
|
||||||
</WeaTop>
|
|
||||||
<NewAndEditDialog
|
<NewAndEditDialog
|
||||||
ecId={`${(this && this.props && this.props.ecId) ||
|
ecId={`${(this && this.props && this.props.ecId) ||
|
||||||
""}_NewAndEditDialog@q4rrwm`}
|
""}_NewAndEditDialog@q4rrwm`}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue