Pārlūkot izejas kodu

项目排序修改

duy 11 stundas atpakaļ
vecāks
revīzija
2668651e53
1 mainītis faili ar 13 papildinājumiem un 12 dzēšanām
  1. 13 12
      src/views/manager/projectinfo/list.vue

+ 13 - 12
src/views/manager/projectinfo/list.vue

@@ -469,7 +469,7 @@ export default {
         break;
     }
   },
-    getProjectList () {
+    getProjectList (callback) {
       getProjectListPage({
         current:1,
         size:999,
@@ -477,6 +477,7 @@ export default {
 
       }).then((res) => {
         this.projectList = res.data.data.records;
+          callback();
       })
     },
     getProjectPageList () {
@@ -736,19 +737,19 @@ export default {
      this. saveSort(ids);
 
     },
-    sortPro(){
-       this.sortContractList = JSON.parse(JSON.stringify(this.projectList));
-      if(this.searchForm.isCollect===1){
-        this.sortTitle = '收藏项目排序';
-      }else{
-        
-          this.sortTitle = '项目排序';
-      }
+   async sortPro(){
 
-       
+       this.getProjectList(() => {
+        if(this.searchForm.isCollect === 1){
+          this.sortTitle = '收藏项目排序';
+        }else{
+          this.sortTitle = '项目排序';
+        }
 
-      this.$nextTick(() => {
-        this.$refs.contractSortRef.show(this.sortContractList);
+        this.$nextTick(() => {
+          this.sortContractList = JSON.parse(JSON.stringify(this.projectList));
+          this.$refs.contractSortRef.show(this.sortContractList);
+        });
       });
     },
     saveSort(ids){