职务分类左侧树搜索折叠的问题
This commit is contained in:
parent
59a0564a67
commit
8db2ed84c6
|
|
@ -152,15 +152,15 @@ class LeftTree extends Component {
|
|||
return arr;
|
||||
};
|
||||
onChange = value => {
|
||||
if (value == "") {
|
||||
let { copyTree, copyExpandedKeys } = this.state;
|
||||
if (_.isEmpty(value)) {
|
||||
let { copyTree, copyExpandedKeys, expandedKeys } = this.state;
|
||||
this.setState({
|
||||
treeData: JSON.parse(copyTree),
|
||||
expandedKeys: copyExpandedKeys,
|
||||
expandedKeys,
|
||||
searchValue: value
|
||||
});
|
||||
} else {
|
||||
let { copyTree, copyExpandedKeys } = this.state;
|
||||
let { copyTree } = this.state;
|
||||
let res = this.arrayTreeFilter(
|
||||
JSON.parse(copyTree),
|
||||
this.filterFn,
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ export default class OfficeManage extends Component {
|
|||
showlog = () => {
|
||||
window.setLogViewProp({
|
||||
logMoudleType: 6,
|
||||
keys: new Date().getTime(),
|
||||
keys: new Date().getTime()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleMenuClick = key => {
|
||||
const { officeManageStore } = this.props;
|
||||
|
|
@ -278,7 +278,7 @@ export default class OfficeManage extends Component {
|
|||
updateForbiddenTagById(payload).then(({ code, msg }) => {
|
||||
if (code === 200) {
|
||||
message.success("操作成功");
|
||||
officeManageStore.getPostInfoTable(officeManageStore.officeClassifyId,true);
|
||||
officeManageStore.getPostInfoTable(officeManageStore.officeClassifyId, true);
|
||||
} else {
|
||||
message.error(msg || "操作失败");
|
||||
}
|
||||
|
|
@ -423,67 +423,66 @@ export default class OfficeManage extends Component {
|
|||
|
||||
return (
|
||||
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
|
||||
isNew={true}
|
||||
leftWidth={260}
|
||||
leftCom={
|
||||
<LeftTree deleteOfficeClassifyFlag={deleteOfficeClassifyFlag}/>
|
||||
}
|
||||
onCollapse={showLeft => console.log("showLeft:", showLeft)}>
|
||||
}>
|
||||
<WeaRightMenu
|
||||
ecId={`${(this && this.props && this.props.ecId) ||
|
||||
""}_WeaRightMenu@cea97d`}
|
||||
datas={this.getDropMenuDatas()}
|
||||
onClick={key => this.handleMenuClick(key)}>
|
||||
<WeaTop
|
||||
<WeaTab
|
||||
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)}>
|
||||
<WeaTab
|
||||
ecId={`${(this && this.props && this.props.ecId) ||
|
||||
""}_WeaTab@39c727`}
|
||||
searchType={["base", "advanced"]}
|
||||
showSearchAd={isPanelShow}
|
||||
searchsBaseValue={
|
||||
_.isEmpty(form2.getFormParams())
|
||||
? postInfoName
|
||||
: form2.getFormParams().postInfoName
|
||||
""}_WeaTab@39c727`}
|
||||
searchType={["base", "advanced"]}
|
||||
showSearchAd={isPanelShow}
|
||||
searchsBaseValue={
|
||||
_.isEmpty(form2.getFormParams())
|
||||
? postInfoName
|
||||
: form2.getFormParams().postInfoName
|
||||
}
|
||||
setShowSearchAd={bool => officeManageStore.setPanelStatus(bool)}
|
||||
hideSearchAd={() => officeManageStore.setPanelStatus(false)}
|
||||
searchsAd={isPanelShow ? this.getPanelComponents() : <div/>}
|
||||
advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
|
||||
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 // 配置无法勾选的列
|
||||
};
|
||||
}
|
||||
setShowSearchAd={bool => officeManageStore.setPanelStatus(bool)}
|
||||
hideSearchAd={() => officeManageStore.setPanelStatus(false)}
|
||||
searchsAd={isPanelShow ? this.getPanelComponents() : <div/>}
|
||||
advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20}
|
||||
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>
|
||||
}}
|
||||
getColumns={c => this.reRenderColumns(c)}
|
||||
onOperatesClick={(record, index, operate) =>
|
||||
this.onOperatesClick(record, index, operate)}
|
||||
/>
|
||||
<NewAndEditDialog
|
||||
ecId={`${(this && this.props && this.props.ecId) ||
|
||||
""}_NewAndEditDialog@q4rrwm`}
|
||||
|
|
|
|||
Loading…
Reference in New Issue