| | |
| | | import {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { notification } from 'antd' |
| | | import { notification, Modal } from 'antd' |
| | | |
| | | import Api from '@/api' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | |
| | | let result = await Api.genericInterface(param) |
| | | if (result.status) { |
| | | this.loading = false |
| | | let _data = { $$empty: true } |
| | | let _data = { $$empty: true, $$uuid: '' } |
| | | |
| | | if (result.data && result.data[0]) { |
| | | _data = result.data[0] |
| | | _data.$$uuid = _data[config.setting.primaryKey] || '' |
| | | } |
| | | |
| | | _data.$$loaded = true |
| | |
| | | window.GLOB.CacheData.set(config.uuid, _data) |
| | | |
| | | MKEmitter.emit('mkPublicData', config.uuid, _data) |
| | | MKEmitter.emit('resetSelectLine', config.uuid, _data.$$uuid, _data) |
| | | } else { |
| | | this.loading = false |
| | | this.timer && this.timer.stop() |
| | | |
| | | if (result.ErrCode === 'N') { |
| | | Modal.error({ |
| | | title: result.message, |
| | | }) |
| | | } else { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | render() {return null} |
| | | } |