| | |
| | | targetKeys: [], |
| | | trees: null, |
| | | expandedKeys: [], |
| | | searchkey: '' |
| | | searchkey: '', |
| | | appViewList: [] |
| | | } |
| | | |
| | | oriTrees = null |
| | |
| | | this.setState({app: param}, () => { |
| | | this.getTreeList() |
| | | this.getMenuList() |
| | | this.getAppViewList() |
| | | }) |
| | | } |
| | | |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | } |
| | | |
| | | getAppViewList = () => { |
| | | const { app } = this.state |
| | | |
| | | Api.getSystemConfig({ |
| | | func: 's_get_keyids', |
| | | bid: app.ID |
| | | }).then(result => { |
| | | if (!result.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | this.setState({appViewList: result.data || []}) |
| | | }) |
| | | } |
| | | |
| | | getMenuList = (reset) => { |
| | |
| | | } |
| | | |
| | | deleteMenu = (record) => { |
| | | const { app } = this.state |
| | | const { app, appViewList } = this.state |
| | | const _this = this |
| | | |
| | | let param = { |
| | |
| | | param.MenuID = param.MenuID + ',' + record.nodes.popviews.join(',') |
| | | } |
| | | |
| | | let _param = { |
| | | func: 's_kei_link_keyids_addupt', |
| | | BID: app.ID, |
| | | exec_type: 'y', |
| | | LText: '' |
| | | } |
| | | |
| | | let _appViewList = appViewList.filter(item => item.keys_id !== record.MenuID) |
| | | |
| | | if (appViewList.length !== _appViewList.length) { |
| | | _param.LText = _appViewList.map(item => `select '${item.keys_id}','${item.keys_type}','${item.kei_no}','${item.appkey}','${item.bid}','${sessionStorage.getItem('CloudUserID')}','${item.remark}'`) |
| | | _param.LText = _param.LText.join(' union all ') |
| | | _param.LText = Utils.formatOptions(_param.LText) |
| | | |
| | | _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | _param.secretkey = Utils.encrypt('', _param.timestamp) |
| | | } else { |
| | | _param = null |
| | | } |
| | | |
| | | confirm({ |
| | | content: '确定删除该菜单吗?', |
| | | onOk() { |
| | |
| | | duration: 3 |
| | | }) |
| | | _this.getMenuList(true) |
| | | |
| | | if (_param) { |
| | | Api.getCloudConfig(_param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | _this.setState({appViewList: _appViewList}) |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |