liuhj 5 nap óta
szülő
commit
3998d338c3
1 módosított fájl, 9 hozzáadás és 29 törlés
  1. 9 29
      src/components/system/TaskList.vue

+ 9 - 29
src/components/system/TaskList.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-    <div>
+    <div v-loading.fullscreen.lock="cacheobgLoading">
         <div class="tasklist-all">
         <div class="tasklist-all">
             <el-dialog width="500px" title="完成情况" :visible.sync="dialogTasklist">
             <el-dialog width="500px" title="完成情况" :visible.sync="dialogTasklist">
                 <el-form>
                 <el-form>
@@ -370,6 +370,7 @@ export default {
     },
     },
     data () {
     data () {
         return {
         return {
+            cacheobgLoading:false,
             token:'',
             token:'',
             pageId:'',
             pageId:'',
             userId:'',
             userId:'',
@@ -445,31 +446,6 @@ export default {
         }
         }
     },
     },
     methods: {
     methods: {
-        //基础数据原
-        PostTaskAllocationInit(){
-            var url = "/api/PersonnelModule/PostTaskAllocationInit"
-            var that = this
-            this.$axios({
-                method: 'post',
-                url: url,
-                headers: {
-                    Authorization: 'Bearer ' + that.userId
-                },
-                data:{
-                    portType:1,
-                    userId: that.userId
-                }
-            }).then(function (res) {
-                if(res.data.code==200){
-                    that.tasknamelist=res.data.data.taskNameInfos;
-                    that.PostTaskAllocationPage()
-                }else{
-                    that.$message.error(res.data.msg);
-                }
-            }).catch(function (error) {
-                that.$message.error("获取数据源失败!");
-            });
-        },
         //获取列表
         //获取列表
         PostTaskAllocationPage(){
         PostTaskAllocationPage(){
             if(this.jobName.indexOf('经理')!=-1||this.jobName.indexOf('主管')!=-1){
             if(this.jobName.indexOf('经理')!=-1||this.jobName.indexOf('主管')!=-1){
@@ -503,14 +479,15 @@ export default {
                     taskUserId: that.taskUserId,
                     taskUserId: that.taskUserId,
                 }
                 }
             }).then(function (res) {
             }).then(function (res) {
-                console.log(res)
                 if(res.data.code==200){
                 if(res.data.code==200){
                     that.count=res.data.count;
                     that.count=res.data.count;
                     that.tableData=res.data.data;
                     that.tableData=res.data.data;
+                    that.cacheobgLoading=false;
                 }else{
                 }else{
-                    
+                    that.cacheobgLoading=false;
                 }
                 }
             }).catch(function (error) {
             }).catch(function (error) {
+                that.cacheobgLoading=false;
                 that.$message.error("获取数据源失败!");
                 that.$message.error("获取数据源失败!");
             });
             });
         },
         },
@@ -620,6 +597,7 @@ export default {
         },
         },
         //基础数据原
         //基础数据原
         PostTaskAllocationInit(){
         PostTaskAllocationInit(){
+            this.cacheobgLoading=true;
             var url = "/api/PersonnelModule/PostTaskAllocationInit"
             var url = "/api/PersonnelModule/PostTaskAllocationInit"
             var that = this
             var that = this
             this.$axios({
             this.$axios({
@@ -633,17 +611,19 @@ export default {
                     userId: that.userId
                     userId: that.userId
                 }
                 }
             }).then(function (res) {
             }).then(function (res) {
-                console.log(res)
                 if(res.data.code==200){
                 if(res.data.code==200){
                     that.tasknamelist=res.data.data.taskNameInfos;
                     that.tasknamelist=res.data.data.taskNameInfos;
                     that.taskUserIdArr=res.data.data.executeTaskUserInfos;
                     that.taskUserIdArr=res.data.data.executeTaskUserInfos;
                     that.isAddPerm=res.data.data.operationPerm.isAddPerm;
                     that.isAddPerm=res.data.data.operationPerm.isAddPerm;
                     that.taskUserIdArr.unshift({id:-1,name:'全部'});
                     that.taskUserIdArr.unshift({id:-1,name:'全部'});
                     that.PostTaskAllocationPage();
                     that.PostTaskAllocationPage();
+                    that.cacheobgLoading=false;
                 }else{
                 }else{
+                    that.cacheobgLoading=false;
                     that.$message.error(res.data.msg);
                     that.$message.error(res.data.msg);
                 }
                 }
             }).catch(function (error) {
             }).catch(function (error) {
+                that.cacheobgLoading=false;
                 that.$message.error("获取数据源失败!");
                 that.$message.error("获取数据源失败!");
             });
             });
         },
         },