| | |
| | | activeKey: '', // 选中数据 |
| | | sync: false, // 是否统一请求数据 |
| | | data: {}, // 数据 |
| | | timer: null // 定时器时间间隔 |
| | | timer: null, // 定时器时间间隔 |
| | | BData: null |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | } |
| | | } |
| | | |
| | | resetParentParam = (MenuID, id) => { |
| | | resetParentParam = (MenuID, id, data) => { |
| | | const { config } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static' || !config.setting.supModule || config.setting.supModule !== MenuID) return |
| | | if (id !== this.state.BID) { |
| | | this.setState({ BID: id }, () => { |
| | | this.setState({ BID: id, BData: data }, () => { |
| | | this.loadData() |
| | | }) |
| | | } |
| | |
| | | |
| | | async loadData (hastimer) { |
| | | const { mainSearch, menuType } = this.props |
| | | const { config, arr_field, BID } = this.state |
| | | const { config, arr_field, BID, BData } = this.state |
| | | |
| | | if (config.wrap.datatype === 'static') { |
| | | this.setState({ |
| | | data: {$$BID: BID || ''}, |
| | | data: {$$BID: BID || '', $$BData: BData}, |
| | | }) |
| | | return |
| | | } else if (config.setting.supModule && !BID) { // BID 不存在时,不做查询 |
| | | this.setState({ |
| | | data: {$$BID: BID || ''}, |
| | | data: {$$BID: BID || '', $$BData: BData}, |
| | | }) |
| | | return |
| | | } |
| | |
| | | if (result.status) { |
| | | let _data = result.data && result.data[0] ? result.data[0] : {} |
| | | _data.$$BID = BID || '' |
| | | _data.$$BData = BData |
| | | |
| | | this.setState({ |
| | | activeKey: '', |
| | |
| | | newtab.param.$BID = item.setting.primaryId || '' |
| | | } |
| | | |
| | | if (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) { |
| | | if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) { |
| | | this.props.modifyTabview([newtab]) |
| | | } else { |
| | | let tabs = this.props.tabviews.filter((tab, i) => { |