| | |
| | | } |
| | | |
| | | state = {} |
| | | delButtons = [] |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.state), fromJS(nextState)) |
| | |
| | | |
| | | execUpdate = (_resolve) => { |
| | | const { config } = this.props |
| | | |
| | | let uuid = config.uuid |
| | | let trail = md5(uuid).slice(-10) + 'mk' |
| | | uuid = uuid.replace(/.{12}$/, trail) |
| | | this.delButtons = [] |
| | | |
| | | let _config = { |
| | | version: 1.0, |
| | | uuid: uuid, |
| | | MenuID: uuid, |
| | | uuid: config.uuid, |
| | | MenuID: config.uuid, |
| | | fstMenuId: config.fstMenuId, |
| | | parentId: config.ParentId, |
| | | Template: 'BaseTable', |
| | | easyCode: config.easyCode, |
| | | enabled: false, |
| | | MenuName: config.MenuName + '_new', |
| | | MenuNo: config.MenuNo + '_new', |
| | | MenuName: config.MenuName, |
| | | MenuNo: config.MenuNo, |
| | | OpenType: 'newtab', |
| | | tables: config.tables || [], |
| | | urlFields: config.urlFields || [], |
| | |
| | | equalTab: n.equalTab && n.equalTab.length > 0 ? n.equalTab[0] : '' |
| | | } |
| | | ]} |
| | | |
| | | this.delButtons.push(n.linkTab) |
| | | oldtabs[n.uuid] = tab.components[0].uuid |
| | | |
| | | _tbs.push(tab.components[0]) |
| | |
| | | Api.getSystemConfig(param).then(res => { |
| | | resolve(res) |
| | | }) |
| | | // }).then(res => { // 删除原菜单 |
| | | // if (!res || !res.status) return res |
| | | }).then(res => { // 删除原菜单 |
| | | if (!res || !res.status) return res |
| | | |
| | | // return Api.getSystemConfig({ |
| | | // func: 'sPC_MainMenu_Del', |
| | | // MenuID: this.props.config.uuid |
| | | // }) |
| | | if (this.delButtons.length === 0) return res |
| | | |
| | | return Api.getSystemConfig({ |
| | | func: 'sPC_MainMenu_Del', |
| | | MenuID: this.delButtons.join(',') |
| | | }) |
| | | }).then(res => { |
| | | if (!res) return |
| | | |
| | |
| | | |
| | | let _param = window.btoa(window.encodeURIComponent(JSON.stringify(urlparam))) |
| | | |
| | | // window.history.replaceState(null, null, window.location.href.split('#')[0] + `#/tabledesign/${_param}`) |
| | | // window.location.reload() |
| | | window.open(`#/tabledesign/${_param}`) |
| | | setTimeout(() => { |
| | | window.history.replaceState(null, null, window.location.href.split('#')[0] + `#/tabledesign/${_param}`) |
| | | window.location.reload() |
| | | }, 2000) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | delete _btn.position |
| | | delete _btn.linkTab |
| | | |
| | | this.delButtons.push(btn.uuid) |
| | | |
| | | _btn.show = 'button' |
| | | |
| | | if (_btn.execSuccess === 'equaltab') { |