|
@@ -208,9 +208,18 @@
|
|
<el-button v-if="taskOperationControl.taskRecommend" type="primary" size="mini" @click="recommendTask()">任务推荐
|
|
<el-button v-if="taskOperationControl.taskRecommend" type="primary" size="mini" @click="recommendTask()">任务推荐
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <el-button v-if="taskOperationControl.exportTask && task.exportUrl != null && task.exportUrl != ''" type="primary" size="mini">
|
|
|
|
+ <a :href="task.exportUrl" style="color:white">导出任务</a>
|
|
|
|
+ </el-button>
|
|
|
|
+<!-- <el-button v-if="taskOperationControl.exportTask" type="primary" size="mini" @click="toExportTask()">-->
|
|
|
|
+<!-- 导出任务-->
|
|
|
|
+<!-- </el-button>-->
|
|
|
|
+
|
|
<el-button v-if="taskOperationControl.uploadReport" type="primary" size="mini" @click="toCreateReport()">
|
|
<el-button v-if="taskOperationControl.uploadReport" type="primary" size="mini" @click="toCreateReport()">
|
|
上传报告
|
|
上传报告
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+
|
|
<el-button v-if="taskOperationControl.taskDemonstrate" type="success" size="mini" @click="gotoDataboard()">
|
|
<el-button v-if="taskOperationControl.taskDemonstrate" type="success" size="mini" @click="gotoDataboard()">
|
|
任务面板
|
|
任务面板
|
|
</el-button>
|
|
</el-button>
|
|
@@ -271,6 +280,7 @@ import Apis from '@/js/api.js'
|
|
import {notify} from '@/constants/index'
|
|
import {notify} from '@/constants/index'
|
|
import {
|
|
import {
|
|
ensureEndTask,
|
|
ensureEndTask,
|
|
|
|
+ exportTask,
|
|
getAllAgencies,
|
|
getAllAgencies,
|
|
getAllServiceTypes,
|
|
getAllServiceTypes,
|
|
getFormalTimeFromDate,
|
|
getFormalTimeFromDate,
|
|
@@ -284,6 +294,7 @@ import {
|
|
updateTask,
|
|
updateTask,
|
|
getTaskWordCloud
|
|
getTaskWordCloud
|
|
} from '@/js/index'
|
|
} from '@/js/index'
|
|
|
|
+import {AxiosInstance as axios} from "axios";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'Task',
|
|
name: 'Task',
|
|
@@ -314,9 +325,11 @@ export default {
|
|
uploadReport: false,
|
|
uploadReport: false,
|
|
writeReport: false,
|
|
writeReport: false,
|
|
taskDemonstrate: false,
|
|
taskDemonstrate: false,
|
|
- taskRecommend: false
|
|
|
|
|
|
+ taskRecommend: false,
|
|
|
|
+ exportTask: false
|
|
},
|
|
},
|
|
crowdReportUrl: '',
|
|
crowdReportUrl: '',
|
|
|
|
+ exportTaskUrl: '',
|
|
wordCloud:[],
|
|
wordCloud:[],
|
|
task: {
|
|
task: {
|
|
agencyId: '',
|
|
agencyId: '',
|
|
@@ -333,6 +346,7 @@ export default {
|
|
doc: [],
|
|
doc: [],
|
|
requireDocUrl: '',
|
|
requireDocUrl: '',
|
|
participantCount: 1,
|
|
participantCount: 1,
|
|
|
|
+ exportUrl: '',
|
|
title: '',
|
|
title: '',
|
|
description: '',
|
|
description: '',
|
|
endPoint: {
|
|
endPoint: {
|
|
@@ -586,6 +600,7 @@ export default {
|
|
this.task.doc = []
|
|
this.task.doc = []
|
|
this.task.requireDocUrl = res.crowdTaskVO.requirementFile
|
|
this.task.requireDocUrl = res.crowdTaskVO.requirementFile
|
|
this.task.agencyId = res.crowdTaskVO.agencyId
|
|
this.task.agencyId = res.crowdTaskVO.agencyId
|
|
|
|
+ this.task.exportUrl = res.crowdTaskVO.exportUrl
|
|
this.task.status = res.crowdTaskVO.status
|
|
this.task.status = res.crowdTaskVO.status
|
|
this.task.statusVO = res.crowdTaskVO.statusVO
|
|
this.task.statusVO = res.crowdTaskVO.statusVO
|
|
this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {
|
|
this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {
|
|
@@ -888,6 +903,33 @@ export default {
|
|
this.hideLoading()
|
|
this.hideLoading()
|
|
notify('error', '结束任务失败:' + error.data)
|
|
notify('error', '结束任务失败:' + error.data)
|
|
},
|
|
},
|
|
|
|
+ // 导出任务
|
|
|
|
+ toExportTask(){
|
|
|
|
+ exportTask(this.projectId, this.taskId, this.exportTaskSuccess, this.exportTaskFail);
|
|
|
|
+ },
|
|
|
|
+ // 导出任务成功时的回调函数
|
|
|
|
+ exportTaskSuccess(res){
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ this.exportTaskUrl = res.data;
|
|
|
|
+ // window.open(this.exportTaskUrl);
|
|
|
|
+ axios.get(this.exportTaskUrl, {
|
|
|
|
+ params: {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ headers: {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 重要
|
|
|
|
+ responseType: 'blob'
|
|
|
|
+ });
|
|
|
|
+ notify('success', '任务导出成功!')
|
|
|
|
+ },
|
|
|
|
+ // 导出任务失败时的回调函数
|
|
|
|
+ exportTaskFail(error){
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ notify('error', '导出任务失败:' + error.data)
|
|
|
|
+ },
|
|
//跳转到创建项目报告页面
|
|
//跳转到创建项目报告页面
|
|
toCreateReport() {
|
|
toCreateReport() {
|
|
this.$router.push({
|
|
this.$router.push({
|