浏览代码

管理评估添加loading

zhouna 6 年之前
父节点
当前提交
3291b1f2c1
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 2 0
      src/components/AssessResult/index.jsx
  2. 10 0
      src/components/AssessResult/index.less

+ 2 - 0
src/components/AssessResult/index.jsx

@@ -7,6 +7,7 @@ import Information from '../Information'
 import ChartItem from "./ChartItem";
 import Notify from '@commonComp/Notify';
 import {readyKeepHistory} from '@utils/tools';
+import loadingIcon from '@common/images/loading.gif';
 
 class AssessResult extends Component {
   constructor(props) {
@@ -145,6 +146,7 @@ class AssessResult extends Component {
       <div className={style['printShow']}>
         <Information></Information>
       </div>
+      {!(data&&data.length>0)?<p className={style['loading']}><img src={loadingIcon} alt='loading...'/></p>:''}
       {data && data.map((it, i) => {
         return this.handoutTypes(it, i);
       })}

+ 10 - 0
src/components/AssessResult/index.less

@@ -187,6 +187,16 @@
     margin-right: 3px;
   }
 }
+.loading{
+  text-align: center;
+  position: absolute;
+  top: 49%;
+  left: 49%;
+  img{
+    width: 40px;
+  }
+}
+
 @media print {
   .printShow,.textareaStatic {
     display: block;