| | |
| | | thdMenuList = JSON.parse(thdMenuList) |
| | | |
| | | let thdMenu = null |
| | | let firstId = '' |
| | | |
| | | thdMenuList.forEach(trd => { |
| | | if (MenuId === trd.MenuID) { |
| | |
| | | smenulist = item.children |
| | | } |
| | | }) |
| | | |
| | | firstId = thdMenu.FstId || '' |
| | | } |
| | | |
| | | this.props.updateConfig({...config, fstMenuId: thdMenu ? thdMenu.FstId : ''}) |
| | | if (firstId !== config.fstMenuId) { |
| | | this.props.updateConfig({...config, fstMenuId: firstId}) |
| | | } |
| | | |
| | | this.setState({ |
| | | fstMenuId: thdMenu ? thdMenu.FstId : '', |
| | | fstMenuId: firstId, |
| | | menulist, |
| | | smenulist |
| | | }, () => { |
| | | this.props.form.setFieldsValue({ |
| | | fstMenuId: thdMenu ? thdMenu.FstId : '', |
| | | fstMenuId: firstId, |
| | | parentId: thdMenu ? thdMenu.ParentId : '' |
| | | }) |
| | | }) |
| | |
| | | }) |
| | | |
| | | let smenulist = [] |
| | | let firstId = '' |
| | | if (thdMenu) { |
| | | menulist.forEach(item => { |
| | | if (item.MenuID === thdMenu.FstId) { |
| | | smenulist = item.children |
| | | } |
| | | }) |
| | | firstId = thdMenu.FstId || '' |
| | | } |
| | | sessionStorage.setItem('fstMenuList', JSON.stringify(menulist)) |
| | | sessionStorage.setItem('thdMenuList', JSON.stringify(thdMenuList)) |
| | | this.props.updateConfig({...config, fstMenuId: thdMenu ? thdMenu.FstId : ''}) |
| | | |
| | | if (firstId !== config.fstMenuId) { |
| | | this.props.updateConfig({...config, fstMenuId: firstId}) |
| | | } |
| | | |
| | | this.setState({ |
| | | fstMenuId: thdMenu ? thdMenu.FstId : '', |
| | | fstMenuId: firstId, |
| | | menulist, |
| | | smenulist |
| | | }, () => { |
| | | this.props.form.setFieldsValue({ |
| | | fstMenuId: thdMenu ? thdMenu.FstId : '', |
| | | fstMenuId: firstId, |
| | | parentId: thdMenu ? thdMenu.ParentId : '' |
| | | }) |
| | | }) |