浏览代码

提交代码

zhangli 1 年之前
父节点
当前提交
052aff0fee
共有 2 个文件被更改,包括 62 次插入0 次删除
  1. 31 0
      src/views/modules/knowledge/home.vue
  2. 31 0
      src/views/modules/knowledge/warehouse/searchData.vue

+ 31 - 0
src/views/modules/knowledge/home.vue

@@ -39,6 +39,12 @@
       </div>
       <pageBar v-show="showTap" ref="pageBarref" @pageChange="pageChange" :total="total" :pageSize="pageSize"></pageBar>
     </div>
+    <div class="loadingPage" v-show="showLoading">
+      <div class="loadingPageShow">
+        <a-icon type="loading" style="margin-right:10px"/>
+        加载中
+      </div>
+    </div>
   </div>
 </template>
 
@@ -57,6 +63,7 @@ export default {
   },
   data() {
     return {
+      showLoading:false,
       orderArr:['匹配度排序','点击量排序','创建时间排序'],
       orderSort:0,
       orderFiled:0,
@@ -150,7 +157,9 @@ export default {
           item.show=false
         })
       }
+      this.showLoading=true
       home.searchApi(postData).then((res) => {
+        this.showLoading=false
         if(res.code==200){
           this.pageNumArr[num] = 1
           this.listArr[num] = res.data.records
@@ -188,7 +197,9 @@ export default {
         orderSort:this.orderSort,
         orderFiled:this.orderFiled
       }
+      this.showLoading=true
       home.searchApi(postData).then((res) => {
+        this.showLoading=false
         if(res.code==200){
           this.listArr[this.tapAction] = res.data.records
           this.dataList = res.data.records
@@ -391,4 +402,24 @@ export default {
 .listItemClass{
   background: #fff;
 }
+.loadingPage{
+  width: 100%;
+  height: 100%;
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  /*background: #0000007a;*/
+  background: none;
+  z-index: 8;
+  display: block;
+  position: absolute;
+}
+.loadingPage div{
+  font-size: 1.04vw;
+  color: #202124;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 </style>

+ 31 - 0
src/views/modules/knowledge/warehouse/searchData.vue

@@ -29,6 +29,12 @@
       </div>
     </div>
     <pageBar v-show="showTap" ref="pageBarref" @pageChange="pageChange" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
+    <div class="loadingPage" v-show="showLoading">
+      <div class="loadingPageShow">
+        <a-icon type="loading" style="margin-right:10px"/>
+        加载中
+      </div>
+    </div>
   </div>
 </template>
 
@@ -47,6 +53,7 @@ export default {
   },
   data() {
     return {
+      showLoading:false,
       orderArr:['匹配度排序','点击量排序','创建时间排序'],
       orderSort:0,
       orderFiled:0,
@@ -140,7 +147,9 @@ export default {
         })
         this.dataList=[]
       }
+      this.showLoading=true
       home.searchApi(postData).then((res) => {
+        this.showLoading=false
         if(res.code==200){
           this.pageNumArr[num] = 1
           this.listArr[num] = res.data.records
@@ -178,7 +187,9 @@ export default {
       orderSort:this.orderSort,
       orderFiled:this.orderFiled
     }
+    this.showLoading=true
     home.searchApi(postData).then((res) => {
+      this.showLoading=false
       if(res.code==200){
         this.listArr[this.tapAction] = res.data.records
         this.dataList = res.data.records
@@ -302,4 +313,24 @@ export default {
   color: #406cc4 !important;
   font-weight: 550;
 }
+.loadingPage{
+  width: 100%;
+  height: 100%;
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  /*background: #0000007a;*/
+  background: none;
+  z-index: 8;
+  display: block;
+  position: absolute;
+}
+.loadingPage div{
+  font-size: 1.04vw;
+  color: #202124;
+  height: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 </style>