Jelajahi Sumber

管理评估添加loading

zhouna 6 tahun lalu
induk
melakukan
3291b1f2c1

+ 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;