Browse Source

fix:编辑token

wangJJ 4 years ago
parent
commit
d57d49ed87
1 changed files with 7 additions and 4 deletions
  1. 7 4
      src/components/task/Task.vue

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

@@ -146,9 +146,9 @@
           </el-input>
         </el-form-item>
 
-        <el-form-item v-if="(!editShortLink) && shortLink" label="任务面板链接" props="shortLink">
+        <el-form-item v-if="shortLink && !editShortLink" label="任务面板链接" props="shortLink">
           {{shortLink}}
-          <i class="el-icon-edit" @click="editShortLink = !editShortLink"/>
+          <i class="el-icon-edit" @click="editShortLink = true"/>
         </el-form-item>
 
         <el-form-item v-if="!isModifyMode">
@@ -399,7 +399,7 @@
         },
         acceptedUserList: [],
         shortLink:'',
-        editShortLink:true,
+        editShortLink:false,
       }
     },
     watch: {
@@ -587,7 +587,10 @@
         this.serviceName = this.getServiceByCode(res.crowdTaskVO.serviceType);
         if(res.crowdTaskVO.endPointVO){
           if(res.crowdTaskVO.endPointVO.token){
-            this.shortLink = res.crowdTaskVO.endPointVO.token
+            this.shortLink = res.crowdTaskVO.endPointVO.token;
+            this.editShortLink = false
+          }else{
+            this.editShortLink = true
           }
         }
         // console.log(res.crowdTaskVO.endPointVO.token)