| | |
| | | import PropTypes from 'prop-types' |
| | | import { is, fromJS } from 'immutable' |
| | | import { Button, Modal, notification } from 'antd' |
| | | // import moment from 'moment' |
| | | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | // import Utils from '@/utils/utils.js' |
| | | import SettingForm from './settingform' |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | |
| | | } |
| | | |
| | | verifySubmit = () => { |
| | | const { MenuID } = this.props |
| | | |
| | | this.verifyRef.handleConfirm().then(res => { |
| | | let param = { |
| | | func: 's_sVersionDetail_CloudAdd', |
| | | kei_no: sessionStorage.getItem('kei_no'), |
| | | kei_no_detail: sessionStorage.getItem('typename'), |
| | | lang: sessionStorage.getItem('lang'), |
| | | BID: res.VersionName, |
| | | VType: 'mob_menu', |
| | | TrdMenuID: MenuID |
| | | } |
| | | |
| | | this.setState({ |
| | | // loading: true, |
| | | visible: false |
| | | loading: true |
| | | }) |
| | | |
| | | Api.getCloudConfig(param).then(result => { |
| | | if (result.status) { |
| | | notification.success({ |
| | | top: 92, |
| | | message: '操作成功!', |
| | | duration: 3 |
| | | }) |
| | | this.setState({ |
| | | loading: false, |
| | | visible: false |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 5 |
| | | }) |
| | | } |
| | | }, () => { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | }) |
| | | }) |
| | | } |