提交 16681aee authored 作者: 钟是志's avatar 钟是志

导入组件格式化代码

上级 c0c7eb1b
......@@ -52,8 +52,9 @@ export default class ImportUtil extends React.PureComponent {
importFileUrl = x + `/importApi/execute?token=${getToken()}&cacheKey=`;
queryFileUrl = x + `/importApi/findData?token=${getToken()}&cacheKey=`;
analyseFileUrl = x + `/importApi/analyse?token=${getToken()}&filePath=`;
exportTemplateUrl = diyExportTemplateUrl ? x + diyExportTemplateUrl+ `?serviceBean=${serviceBean}&serviceKey=${serviceKey}` :
x + `/importApi/downLoadTemplate?serviceBean=${serviceBean}&serviceKey=${serviceKey}`;
exportTemplateUrl = diyExportTemplateUrl
? x + diyExportTemplateUrl + `?serviceBean=${serviceBean}&serviceKey=${serviceKey}`
: x + `/importApi/downLoadTemplate?serviceBean=${serviceBean}&serviceKey=${serviceKey}`;
} else {
importFileUrl = props.importFileUrl;
queryFileUrl = props.queryFileUrl;
......@@ -85,8 +86,9 @@ export default class ImportUtil extends React.PureComponent {
state.importFileUrl = x + `/importApi/execute?token=${getToken()}&cacheKey=`;
state.queryFileUrl = x + `/importApi/findData?token=${getToken()}&cacheKey=`;
state.analyseFileUrl = x + `/importApi/analyse?token=${getToken()}&filePath=`;
state.exportTemplateUrl = diyExportTemplateUrl ? x + diyExportTemplateUrl+ `?serviceBean=${serviceBean}&serviceKey=${serviceKey}` :
x + `/importApi/downLoadTemplate?serviceBean=${serviceBean}&serviceKey=${serviceKey}`;
state.exportTemplateUrl = diyExportTemplateUrl
? x + diyExportTemplateUrl + `?serviceBean=${serviceBean}&serviceKey=${serviceKey}`
: x + `/importApi/downLoadTemplate?serviceBean=${serviceBean}&serviceKey=${serviceKey}`;
} else {
state.importFileUrl = props.importFileUrl;
state.queryFileUrl = props.queryFileUrl;
......@@ -347,16 +349,19 @@ export default class ImportUtil extends React.PureComponent {
const { api, serviceBean, serviceKey, exportTemplateUrl } = this.props;
const { filekey } = this.state;
let downLoadUrl;
if(api !== null){
downLoadUrl = api + `/importApi/downLoadTemplate?serviceBean=${serviceBean}&serviceKey=${serviceKey}`;
}else {
if (api !== null) {
downLoadUrl =
api + `/importApi/downLoadTemplate?serviceBean=${serviceBean}&serviceKey=${serviceKey}`;
} else {
downLoadUrl = exportTemplateUrl;
};
}
let splitCode = '?';
if(downLoadUrl && downLoadUrl.indexOf('?') > -1){
if (downLoadUrl && downLoadUrl.indexOf('?') > -1) {
splitCode = '&';
}
window.open(`${downLoadUrl}${splitCode}cacheKey=${filekey}&dataType=${type}&token=${getToken()}`);
window.open(
`${downLoadUrl}${splitCode}cacheKey=${filekey}&dataType=${type}&token=${getToken()}`,
);
};
continueImport = () => {
......@@ -433,7 +438,11 @@ export default class ImportUtil extends React.PureComponent {
<Spin spinning={loading}>
<div className={styles.nomal}>
<p className={styles.import}>EXCEL导入向导</p>
<div style={{ margin: 'auto 12px', fontSize: '12px' }}>
<div
style={{
margin: 'auto 12px',
fontSize: '12px',
}}>
<Steps current={current}>
{steps.map((item) => (
<Step key={item.title} title={item.title} />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论