| | |
| | | import moment from 'moment' |
| | | import JsPDF from 'jspdf' |
| | | |
| | | import Api from '@/api' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MkIcon from '@/components/mk-icon' |
| | | |
| | |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | getInnerData = (params) => { |
| | | let param = params.shift() |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (res.status) { |
| | | this.downloadZipImage(res.data, this.props.btn.urlkey).then((res) => { |
| | | if (params.length === 0) { |
| | | if (res) { |
| | | this.execError({ErrCode: res}) |
| | | } else { |
| | | this.execSuccess() |
| | | } |
| | | } else { |
| | | this.getInnerData(params) |
| | | } |
| | | }, (err) => { |
| | | if (params.length === 0) { |
| | | this.execError({ErrCode: err}) |
| | | } else { |
| | | this.getInnerData(params) |
| | | } |
| | | }) |
| | | } else { |
| | | this.execError(res) |
| | | } |
| | | }) |
| | | } |
| | | |