| | |
| | | } |
| | | |
| | | submitScript = () => { |
| | | // const { selectTran } = this.state |
| | | const { selectTran } = this.state |
| | | |
| | | this.scriptRef.handleConfirm().then(res => { |
| | | this.setState({ |
| | | confirmloading: true |
| | | }) |
| | | // let param = {} |
| | | // s_sVersionDetail_Add |
| | | // s_sVersionDetail_CloudAdd |
| | | |
| | | // Api.getCloudConfig(param).then(result => { |
| | | // if (result.status) { |
| | | // notification.success({ |
| | | // top: 92, |
| | | // message: '操作成功!', |
| | | // duration: 3 |
| | | // }) |
| | | // this.setState({ |
| | | // scriptIndex: 1, |
| | | // confirmloading: false, |
| | | // scriptVisible: false |
| | | // }, () => { |
| | | // this.getScriptList() |
| | | // }) |
| | | // } else { |
| | | // this.setState({ |
| | | // confirmloading: false |
| | | // }) |
| | | // notification.warning({ |
| | | // top: 92, |
| | | // message: result.message, |
| | | // duration: 5 |
| | | // }) |
| | | // } |
| | | // }, () => { |
| | | // this.setState({ |
| | | // confirmloading: false |
| | | // }) |
| | | // }) |
| | | let kei_no = res.appId.split(',')[1] |
| | | let lang = res.subAppId.split(',')[1] |
| | | let kei_no_detail = res.subAppId.split(',')[2] |
| | | |
| | | let param = { |
| | | func: 's_sVersionDetail_CloudAdd', |
| | | kei_no: kei_no, |
| | | kei_no_detail: kei_no_detail, |
| | | lang: lang, |
| | | BID: selectTran.ID |
| | | } |
| | | |
| | | if (res.VType === 'subapp') { |
| | | param.VType = 'mob_menu' |
| | | param.TrdMenuID = '' |
| | | param.upid = md5(window.GLOB.appkey + kei_no + kei_no_detail + lang) |
| | | } else if (res.VType === 'view') { |
| | | param.VType = 'mob_menu' |
| | | param.TrdMenuID = res.viewId |
| | | } else if (res.VType === 'role') { |
| | | param.VType = 'mob_roletree' |
| | | param.upid = md5(window.GLOB.appkey + kei_no + kei_no_detail + lang) |
| | | } |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | notification.success({ |
| | | top: 92, |
| | | message: '操作成功!', |
| | | duration: 3 |
| | | }) |
| | | this.setState({ |
| | | scriptIndex: 1, |
| | | confirmloading: false, |
| | | scriptVisible: false |
| | | }, () => { |
| | | this.getScriptList() |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | confirmloading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }, () => { |
| | | this.setState({ |
| | | confirmloading: false |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | |