|
@@ -138,17 +138,17 @@
|
|
|
<div class="btn btn-small" @click="cancelMode()">取消</div>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item v-if="editShortLink && task.endPoint.serverCode && taskOperationControl.confirmFinish" label="报告短链接" props="shortLink">
|
|
|
- <el-input v-model="shortLink" placeholder="请输入短链接生成任务报告" style="width: 400px">
|
|
|
+ <el-form-item v-if="editShortLink && task.endPoint.serverCode && taskOperationControl.confirmFinish" label="任务面板链接" props="shortLink">
|
|
|
+ <el-input v-model="shortLink" placeholder="请输入短链接生成任务报告" style="width: 800px">
|
|
|
<template slot="append">
|
|
|
- <el-button onClick="getTaskDataBoard()">点击生成</el-button>
|
|
|
+ <el-button @click="getTaskDataBoard()">确定</el-button>
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item v-if="!editShortLink && task.endPoint.serverCode && taskOperationControl.confirmFinish">
|
|
|
- {{task.endPointVO&&task.endPointVO.token}}
|
|
|
- <i class="el-icon-edit" @click="this.editShortLink = !this.editShortLink"/>
|
|
|
+ <el-form-item v-if="(!editShortLink) && shortLink" label="任务面板链接" props="shortLink">
|
|
|
+ {{shortLink}}
|
|
|
+ <i class="el-icon-edit" @click="editShortLink = !editShortLink"/>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item v-if="!isModifyMode">
|
|
@@ -205,6 +205,9 @@
|
|
|
<el-button v-if="taskOperationControl.uploadReport" type="primary" size="mini" @click="toCreateReport()">
|
|
|
上传报告
|
|
|
</el-button>
|
|
|
+ <el-button v-if="taskOperationControl.taskDemonstrate" type="success" size="mini" @click="gotoDataboard()">
|
|
|
+ 任务面板
|
|
|
+ </el-button>
|
|
|
<!--<div class="btn btn-small btn-info"-->
|
|
|
<!--v-if="taskOperationControl.confirmFinish"-->
|
|
|
<!--@click="endTask()">确认结束-->
|
|
@@ -317,6 +320,7 @@
|
|
|
description: '',
|
|
|
endPoint: {
|
|
|
serverCode: '',
|
|
|
+ token: ''
|
|
|
}
|
|
|
},
|
|
|
reportList: [],
|
|
@@ -395,7 +399,7 @@
|
|
|
},
|
|
|
acceptedUserList: [],
|
|
|
shortLink:'',
|
|
|
- editShortLink:true
|
|
|
+ editShortLink:true,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -431,11 +435,21 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ //跳转到任务对应的数据面板
|
|
|
+ gotoDataboard(){
|
|
|
+ window.open(this.task.endPoint.token)
|
|
|
+ },
|
|
|
//根据短链接获取生成databoard
|
|
|
getTaskDataBoard(){
|
|
|
- Http.get(`/api/project/${this.projectId}/task/${this.taskId}/addToken/${this.shortLink}`).then((res)=>{
|
|
|
- console.log(res);
|
|
|
-
|
|
|
+ this.showLoading()
|
|
|
+ Http.put(`/api/project/${this.projectId}/task/${this.taskId}/addToken`,{"token":this.shortLink}).then((res)=>{
|
|
|
+ this.taskOperationControl = res.taskOperationControl;
|
|
|
+ this.task.endPoint = res.crowdTaskVO.endPointVO;
|
|
|
+ this.shortLink = res.crowdTaskVO.endPointVO.token;
|
|
|
+ if(this.shortLink != ''){
|
|
|
+ this.editShortLink = false;
|
|
|
+ }
|
|
|
+ this.hideLoading()
|
|
|
})
|
|
|
},
|
|
|
getServiceByCode(code){
|
|
@@ -543,6 +557,7 @@
|
|
|
//获取任务详情成功时回调函数
|
|
|
getTaskDetailSuccess(res) {
|
|
|
this.hideLoading()
|
|
|
+ // console.log(res)
|
|
|
this.taskId = res.crowdTaskVO.id
|
|
|
this.projectId = res.crowdTaskVO.projectId
|
|
|
this.task.title = res.crowdTaskVO.title
|
|
@@ -564,13 +579,20 @@
|
|
|
this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {
|
|
|
serverCode: '',
|
|
|
}
|
|
|
- this.taskOperationControl = res.taskOperationControl
|
|
|
+ this.taskOperationControl = res.taskOperationControl;
|
|
|
this.acceptedUserList = res.acceptedUserList;
|
|
|
this.crowdReportUrl = res.crowdTaskVO.writeReportUrl;
|
|
|
this.handleFormatReport(this.acceptedUserList);
|
|
|
this.handleTestTypeChange(res.crowdTaskVO.serviceType);
|
|
|
this.serviceName = this.getServiceByCode(res.crowdTaskVO.serviceType);
|
|
|
- this.shortLink = res.crowdTaskVO.endPointVO && res.crowdTaskVO.endPointVO.token
|
|
|
+ if(res.crowdTaskVO.endPointVO){
|
|
|
+ if(res.crowdTaskVO.endPointVO.token){
|
|
|
+ this.shortLink = res.crowdTaskVO.endPointVO.token
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // console.log(res.crowdTaskVO.endPointVO.token)
|
|
|
+ // console.log(this.editShortLink)
|
|
|
+ // console.log(this.isModifyMode)
|
|
|
},
|
|
|
//获取任务详情失败时回调函数
|
|
|
getTaskDetailFail(error) {
|