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

23013 学生事务/学生医保管理/学生平安险/保险办理,2001010248 高职界面已购买 导入 报错【接口超时】

上级 60e38016
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
padding: 10px; padding: 10px;
} }
.title{ .title{
display: flex; display: flex;
margin-bottom: 20px; margin-bottom: 20px;
} }
.info{ .info{
...@@ -19,36 +19,36 @@ ...@@ -19,36 +19,36 @@
margin: auto 10px; margin: auto 10px;
} }
.button{ .button{
display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */ display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
display: -moz-box; /* 老版本语法: Firefox (buggy) */ display: -moz-box; /* 老版本语法: Firefox (buggy) */
display: -ms-flexbox; /* 混合版本语法: IE 10 */ display: -ms-flexbox; /* 混合版本语法: IE 10 */
display: -webkit-flex; /* 新版本语法: Chrome 21+ */ display: -webkit-flex; /* 新版本语法: Chrome 21+ */
display: -moz-flex; display: -moz-flex;
display: flex; display: flex;
-moz-box-pack: center; /*Firefox*/ -moz-box-pack: center; /*Firefox*/
-webkit-box-pack: center; /*Safari,Opera,Chrome*/ -webkit-box-pack: center; /*Safari,Opera,Chrome*/
box-pack: center; box-pack: center;
-moz-justify-content: center; -moz-justify-content: center;
-webkit-justify-content: center; -webkit-justify-content: center;
justify-content: center; justify-content: center;
} }
.operation{ .operation{
display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */ display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
display: -moz-box; /* 老版本语法: Firefox (buggy) */ display: -moz-box; /* 老版本语法: Firefox (buggy) */
display: -ms-flexbox; /* 混合版本语法: IE 10 */ display: -ms-flexbox; /* 混合版本语法: IE 10 */
display: -webkit-flex; /* 新版本语法: Chrome 21+ */ display: -webkit-flex; /* 新版本语法: Chrome 21+ */
display: -moz-flex; display: -moz-flex;
display: flex; display: flex;
-moz-box-pack: center; /*Firefox*/ -moz-box-pack: center; /*Firefox*/
-webkit-box-pack: center; /*Safari,Opera,Chrome*/ -webkit-box-pack: center; /*Safari,Opera,Chrome*/
box-pack: center; box-pack: center;
-moz-justify-content: center; -moz-justify-content: center;
-webkit-justify-content: center; -webkit-justify-content: center;
justify-content: center; justify-content: center;
} }
.button Button{ .button Button{
margin: auto 10px; margin: auto 10px;
} }
.titleInfo p span{ .titleInfo p span{
font-weight: bold; font-weight: bold;
...@@ -106,25 +106,25 @@ ...@@ -106,25 +106,25 @@
margin-left: 34px; margin-left: 34px;
} }
.contentTable{ .contentTable{
display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */ display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
display: -moz-box; /* 老版本语法: Firefox (buggy) */ display: -moz-box; /* 老版本语法: Firefox (buggy) */
display: -ms-flexbox; /* 混合版本语法: IE 10 */ display: -ms-flexbox; /* 混合版本语法: IE 10 */
display: -webkit-flex; /* 新版本语法: Chrome 21+ */ display: -webkit-flex; /* 新版本语法: Chrome 21+ */
display: -moz-flex; display: -moz-flex;
display: flex; display: flex;
-moz-box-pack: justify; /*Firefox*/ -moz-box-pack: justify; /*Firefox*/
-webkit-box-pack:justify; /*Safari,Opera,Chrome*/ -webkit-box-pack:justify; /*Safari,Opera,Chrome*/
box-pack: justify; box-pack: justify;
-moz-justify-content: space-between; -moz-justify-content: space-between;
-webkit-justify-content: space-between; -webkit-justify-content: space-between;
justify-content: space-between; justify-content: space-between;
margin-top: 20px; margin-top: 20px;
} }
.left{ .left{
width: 50%; width: 50%;
} }
.right{ .right{
width: 50%; width: 50%;
border-left: 1px solid #317ecc; border-left: 1px solid #317ecc;
} }
.error p{ .error p{
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
} }
.download{ .download{
background: #f5f5f5; background: #f5f5f5;
padding: 5px; padding: 5px;
margin-top: -16px; margin-top: -16px;
} }
.download img{ .download img{
...@@ -154,18 +154,18 @@ ...@@ -154,18 +154,18 @@
border-right: 1px solid #ccc; border-right: 1px solid #ccc;
} }
.buttonDown{ .buttonDown{
display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */ display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
display: -moz-box; /* 老版本语法: Firefox (buggy) */ display: -moz-box; /* 老版本语法: Firefox (buggy) */
display: -ms-flexbox; /* 混合版本语法: IE 10 */ display: -ms-flexbox; /* 混合版本语法: IE 10 */
display: -webkit-flex; /* 新版本语法: Chrome 21+ */ display: -webkit-flex; /* 新版本语法: Chrome 21+ */
display: -moz-flex; display: -moz-flex;
display: flex; display: flex;
-moz-box-pack: start; /*Firefox*/ -moz-box-pack: start; /*Firefox*/
-webkit-box-pack: start; /*Safari,Opera,Chrome*/ -webkit-box-pack: start; /*Safari,Opera,Chrome*/
box-pack: start; box-pack: start;
-moz-justify-content: flex-start; -moz-justify-content: flex-start;
-webkit-justify-content: flex-start; -webkit-justify-content: flex-start;
justify-content: flex-start; justify-content: flex-start;
margin-bottom: 20px; margin-bottom: 20px;
} }
.buttonDown>button{ .buttonDown>button{
...@@ -175,4 +175,18 @@ ...@@ -175,4 +175,18 @@
color: #fff; color: #fff;
padding: 5px 12px; padding: 5px 12px;
border-radius: 5px; border-radius: 5px;
} }
\ No newline at end of file
.juzhongSpin{
min-height: 300px;
width: 100%;
display: grid;
align-items: center;
justify-items: center;
}
.textCenter{
margin-top: 20px;
text-align: center;
}
import React, { useEffect, useState, useRef } from 'react';
import { Progress, message } from 'antd';
import styles from './ImportUtil.less';
import { connect } from 'dva';
function ProgressDiy(props) {
const { fileCacheKey, dispatch, changeOpenProgress = () => {} } = props;
const interv = useRef();
const [speedData, setData] = useState({ ...props });
useEffect(() => {
interv.current = setInterval(() => {
dispatch({
type: 'DataObj/importProcess',
payload: {
cacheKey: fileCacheKey,
},
callback: res => {
setData(res);
if (res.finished) {
clearInterval(interv.current);
message.success('导入完成');
// changeOpenProgress(false); // 导入成功
}
},
});
}, 1000);
}, []);
return (
<div className={styles.juzhongSpin}>
<div style={{ textAlign: 'center' }}>
<Progress
type="circle"
strokeColor={{
'0%': '#108ee9',
'100%': '#87d068',
}}
percent={
speedData.finished ? 100 : (speedData.success + speedData.fail) / speedData.total
}
status={speedData.finished ? 'success ' : 'active'}
format={percent => `${speedData.success + speedData.fail}/${speedData.total}`}
/>
<div className={styles.textCenter}>
正在处理导入数据: 共计 {speedData.total} 已处理{speedData.success + speedData.fail}.
</div>
</div>
</div>
);
}
export default connect(({ DataObj, loading }) => ({
DataObj,
}))(ProgressDiy);
...@@ -42,6 +42,19 @@ export default { ...@@ -42,6 +42,19 @@ export default {
}); });
if (callback) callback(response); if (callback) callback(response);
}, },
*importProcess({ payload, callback }, { call, put }) {
const response = yield call(apiRequest, api + '/importProcess', payload);
if (!response) {
yield put({ type: 'nom' });
return;
}
yield put({
type: 'nom',
payload: response,
});
if (callback) callback(response);
},
*importExecute({ payload, callback }, { call, put }) { *importExecute({ payload, callback }, { call, put }) {
const response = yield call(apiRequest, api + '/importExecute', { const response = yield call(apiRequest, api + '/importExecute', {
...payload, ...payload,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论