Browse Source

修改对任务面板链接显示的判断

guo00guo 4 years ago
parent
commit
63a5e39be7
2 changed files with 19 additions and 6 deletions
  1. 6 4
      src/components/task/Task.vue
  2. 13 2
      src/pages/Technology/Technology2.0.vue

+ 6 - 4
src/components/task/Task.vue

@@ -399,7 +399,7 @@
         },
         acceptedUserList: [],
         shortLink:'',
-        editShortLink:false,
+        editShortLink:true,
       }
     },
     watch: {
@@ -446,9 +446,11 @@
           this.taskOperationControl = res.taskOperationControl;
           this.task.endPoint = res.crowdTaskVO.endPointVO;
           this.shortLink = res.crowdTaskVO.endPointVO.token;
-          this.editShortLink = false;
+          if(this.shortLink != ''){
+            this.editShortLink = false;
+          }
+          this.hideLoading()
         })
-        this.hideLoading()
       },
       getServiceByCode(code){
         let serviceName = this.serviceType.filter((item) => {
@@ -555,7 +557,7 @@
       //获取任务详情成功时回调函数
       getTaskDetailSuccess(res) {
         this.hideLoading()
-        console.log(res)
+        // console.log(res)
         this.taskId = res.crowdTaskVO.id
         this.projectId = res.crowdTaskVO.projectId
         this.task.title = res.crowdTaskVO.title

+ 13 - 2
src/pages/Technology/Technology2.0.vue

@@ -34,7 +34,7 @@
       <div>
       </div>
     </div>
-    <div class="container" style="margin: 15px auto">
+    <div class="container" style="margin: 15px auto" v-loading="loading">
       <el-row>
         <el-col :span="18" class="project-task">
           <CrowdTool
@@ -144,6 +144,15 @@
           })
         }
       },
+
+      //显示页面加载画面
+      showLoading() {
+        this.loading = true
+      },
+      //隐藏页面加载画面
+      hideLoading() {
+        this.loading = false
+      },
       gotoHome(){
         this.$router.push('/home');
       },
@@ -162,6 +171,7 @@
         })
       },
       loadTechnologyArticles(index){
+        this.showLoading()
         let url = '/api/technical/articles';
         this.activePage = index;
         let params = {
@@ -181,7 +191,8 @@
           .then(res=>{
             let { technicalArticlesPage , publicationsPage ,toolVOPage,taskVOS} = res.data;
             this.techArticleList = technicalArticlesPage || publicationsPage || toolVOPage || taskVOS;
-            console.log(res.data)
+            // console.log(res.data)
+            this.hideLoading()
           //   if(res.data.technicalArticlesPage){
           //     this.techArticleList = res.data.technicalArticlesPage;
           //   }else if(res.data.publicationsPage){