|
@@ -9,20 +9,22 @@
|
|
|
style="margin:0 0 0 80px;">
|
|
|
<el-form-item label="任务名称" prop="title" style="width: 700px;">
|
|
|
<el-input size="small" v-if="isModifyMode" v-model="task.title"></el-input>
|
|
|
- <span v-if="!isModifyMode">{{task.title}}</span>
|
|
|
- <el-tag v-if="!isModifyMode" :type="task.statusVO&&task.statusVO.style">{{task.statusVO ?
|
|
|
- task.statusVO.text:''}}
|
|
|
+ <span v-if="!isModifyMode">{{ task.title }}</span>
|
|
|
+ <el-tag v-if="!isModifyMode" :type="task.statusVO&&task.statusVO.style">{{
|
|
|
+ task.statusVO ?
|
|
|
+ task.statusVO.text : ''
|
|
|
+ }}
|
|
|
</el-tag>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="任务描述" prop="description" style="width: 700px;">
|
|
|
<el-input autosize v-if="isModifyMode" type="textarea" v-model="task.description"></el-input>
|
|
|
- <span v-if="!isModifyMode">{{task.description ? task.description : '暂无'}}</span>
|
|
|
+ <span v-if="!isModifyMode">{{ task.description ? task.description : '暂无' }}</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="任务报价" prop="quotePrice" style="width: 700px;">
|
|
|
<el-input size="small" type="number" v-if="isModifyMode" v-model="task.quotePrice">
|
|
|
<template slot="append">¥</template>
|
|
|
</el-input>
|
|
|
- <span v-if="!isModifyMode">¥{{task.quotePrice}}</span>
|
|
|
+ <span v-if="!isModifyMode">¥{{ task.quotePrice }}</span>
|
|
|
</el-form-item>
|
|
|
<!--<el-form-item type="number" label="任务定价" prop="fixedPrice">-->
|
|
|
<!--<el-input v-if="isModifyMode" v-model="task.fixedPrice">-->
|
|
@@ -33,61 +35,55 @@
|
|
|
<el-form-item label="测试类型" prop="serviceType">
|
|
|
<el-radio-group v-if="isModifyMode" v-model="task.serviceType" @change="handleTestTypeChange">
|
|
|
<span v-for="(item,index) in serviceType" :key="index">
|
|
|
- <el-radio :label="item.code" name="serviceType">{{item.name}}</el-radio>
|
|
|
+ <el-radio :label="item.name" name="serviceType">{{ item.name }}</el-radio>
|
|
|
</span>
|
|
|
</el-radio-group>
|
|
|
- <span class="badge" v-if="!isModifyMode">{{serviceName}}</span>
|
|
|
+ <span class="badge" v-if="!isModifyMode">{{ task.serviceType }}</span>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="服务序列号" prop="endPoint" style="width: 700px;"
|
|
|
- v-if="showBD&&task.endPoint&&currType.type===1"
|
|
|
- >
|
|
|
- <el-input v-if="isModifyMode" v-model="task.endPoint.serverCode" label="examId"></el-input>
|
|
|
- <span v-if="!isModifyMode&&showBD">{{task.endPoint.serverCode}}</span>
|
|
|
+ <el-form-item label="协同模式" prop="collaborativeType" style="width:700px;" v-if="currType.type==1">
|
|
|
+ <el-radio-group v-model="task.endPoint.collaborativeType" v-if="isModifyMode">
|
|
|
+ <el-radio :label="0">协同</el-radio>
|
|
|
+ <el-radio :label="1">非协同</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <span v-if="!isModifyMode">{{ task.endPoint.collaborativeType ? '非协同' : '协同' }}</span>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="任务可见性" prop="resource" style="width: 700px;">
|
|
|
+ <el-form-item label="任务可见性" prop="resource">
|
|
|
<div v-if="!isModifyMode">
|
|
|
<!--<div v-if="task.resource=='1'">{{updateLocation(task.location)}}</div>-->
|
|
|
<div v-if="task.resource==0">定向</div>
|
|
|
- <div v-if="task.resource==2">{{resourceType[task.resource]}}</div>
|
|
|
+ <div v-if="task.resource==2">{{ resourceType[task.resource] }}</div>
|
|
|
</div>
|
|
|
<el-tabs
|
|
|
:tab-position="tabPosition"
|
|
|
v-model="task.resource"
|
|
|
- style="max-height: 200px;"
|
|
|
v-if="isModifyMode"
|
|
|
>
|
|
|
- <el-tab-pane :label="resourceType[0]" name="0">
|
|
|
+ <el-tab-pane v-if="currType.type==0" :label="resourceType[0]" name="0">
|
|
|
<el-radio-group v-model="task.institution" @change="handleTestTypeChange">
|
|
|
- <el-radio
|
|
|
- :label="item"
|
|
|
- name="type"
|
|
|
- v-for="(item,index) in institutionArray"
|
|
|
- :key="index"
|
|
|
- >{{item.name}}
|
|
|
+ <el-radio v-for="(item,index) in institutionArray" :label="item.userId" name="type" :key="index">
|
|
|
+ {{item.name}}
|
|
|
</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-tab-pane>
|
|
|
- <!--<el-tab-pane :label="resourceType[1]" name="1">-->
|
|
|
- <!--<provincecity-->
|
|
|
- <!--ref="addFormProvince"-->
|
|
|
- <!--@selectChange="locationChange"-->
|
|
|
- <!--:provinceCode="task.location == null ||task.location.provinceCode==null?'3200':task.location.provinceCode"-->
|
|
|
- <!--:cityCode="task.location == null ||task.location.cityCode==null?'3201':task.location.cityCode"-->
|
|
|
- <!--></provincecity>-->
|
|
|
- <!--</el-tab-pane>-->
|
|
|
<el-tab-pane :label="resourceType[2]" name="2"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item v-if="!isModifyMode && task.resource==0 && showBD" label="接包人员/机构" prop="agencyName" style="width: 700px;">
|
|
|
+ <span>{{task.agencyName}}</span>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="领取人数" prop="contactPhone" v-if="isModifyMode&&task.resource !== '0' && currType.type===0">
|
|
|
<el-input-number v-model="task.participantCount" :min="1" :max="1000" label="领取人数"></el-input-number>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="领取人数" prop="contactPhone" v-if="isModifyMode&&task.resource !== '0' && currType.type===1">
|
|
|
+ <el-form-item label="领取人数" prop="contactPhone"
|
|
|
+ v-if="isModifyMode&&task.resource !== '0' && currType.type===1">
|
|
|
<el-input-number v-model="task.participantCount" :min="2" :max="1000" label="领取人数"></el-input-number>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="领取人数" prop="quotePrice" v-if="!isModifyMode">
|
|
|
- {{task.acceptedCount }}/{{ task.participantCount}}
|
|
|
+ {{ task.acceptedCount }}/{{ task.participantCount }}
|
|
|
</el-form-item>
|
|
|
<el-form-item label="需求文档" prop="doc">
|
|
|
<el-upload
|
|
@@ -121,6 +117,43 @@
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
|
|
|
+ <el-form-item label="测试大纲" prop="threePageUrl" class="three-page-upload" v-if="currType.type==1">
|
|
|
+ <el-upload
|
|
|
+ style="width: 400px"
|
|
|
+ v-if="isModifyMode"
|
|
|
+ drag
|
|
|
+ class="upload-demo"
|
|
|
+ action=""
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ :http-request="uploadThreePage"
|
|
|
+ :file-list="task.threePageList"
|
|
|
+ >
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">
|
|
|
+ 将文件拖到此处,或
|
|
|
+ <em>点击上传</em>
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ <span>
|
|
|
+<!-- <span v-if="task.endPoint.threePageUrl == null || task.endPoint.threePageUrl == ''">-->
|
|
|
+<!-- <i class="el-icon-document"></i>暂无文件-->
|
|
|
+<!-- </span>-->
|
|
|
+ <span v-if="task.endPoint.threePageUrl != null && task.endPoint.threePageUrl != ''">
|
|
|
+ <a :href="task.endPoint.threePageUrl"><el-link :underline="false" type="primary"><i
|
|
|
+ class="el-icon-document"></i>下载文档</el-link></a>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ </span>
|
|
|
+ <span> <a href="http://mooctest-site.oss-cn-shanghai.aliyuncs.com/excel-template.xlsx"><i class="el-icon-document"></i>示例下载</a></span>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item v-if="!isModifyMode && task.resource==2 && needAcceptedPWD && showBD" label="任务接收码" prop="agencyName" style="width: 700px;">
|
|
|
+ <span>{{task.acceptedPassword}}</span>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<el-form-item label="任务截止时间" prop="datetime">
|
|
|
<div class="block" v-if="isModifyMode">
|
|
|
<el-date-picker
|
|
@@ -132,7 +165,7 @@
|
|
|
:picker-options="pickerOptions"
|
|
|
></el-date-picker>
|
|
|
</div>
|
|
|
- <span v-if="!isModifyMode">{{dateFormat(new Date(task.datetime),'yyyy-MM-dd HH:mm:ss')}}</span>
|
|
|
+ <span v-if="!isModifyMode">{{ dateFormat(new Date(task.datetime), 'yyyy-MM-dd HH:mm:ss') }}</span>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="isModifyMode">
|
|
|
<div class="btn btn-small btn-info" @click="updateTask()">确认修改</div>
|
|
@@ -140,46 +173,12 @@
|
|
|
<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: 800px">
|
|
|
- <template slot="append">
|
|
|
- <el-button @click="getTaskDataBoard()">确定</el-button>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- <el-form-item v-if="shortLink && !editShortLink" label="任务面板链接" props="shortLink">
|
|
|
- {{shortLink}}
|
|
|
- <i class="el-icon-edit" @click="editShortLink = true" v-if="taskOperationControl.confirmFinish"/>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
<el-form-item v-if="!isModifyMode">
|
|
|
<el-button size="mini" @click="toProject()">项目详情</el-button>
|
|
|
- <el-popover
|
|
|
- placement="top-start"
|
|
|
- title="确认结束?"
|
|
|
- width="200"
|
|
|
- trigger="hover"
|
|
|
- content="测评机构已提交结束申请,请确认是否结束该任务">
|
|
|
- <el-button v-if="taskOperationControl.confirmFinish" type="success" size="mini" slot="reference"
|
|
|
- @click="endTask()">确认结束
|
|
|
- </el-button>
|
|
|
- </el-popover>
|
|
|
|
|
|
<el-popover
|
|
|
- placement="top-start"
|
|
|
- title="确认提交?"
|
|
|
- width="200"
|
|
|
- trigger="hover"
|
|
|
- content="提交任务后不可更改,等待区域管理员验收">
|
|
|
- <el-button v-if="taskOperationControl.finish" type="primary" size="mini" slot="reference"
|
|
|
- @click="submitTaskRequest()">提交任务
|
|
|
- </el-button>
|
|
|
- </el-popover>
|
|
|
-
|
|
|
- <el-popover
|
|
|
- placement="top-start"
|
|
|
- title="确认拒绝?"
|
|
|
+ placement="top-start"r
|
|
|
+ title="确认拒绝?"
|
|
|
width="200"
|
|
|
trigger="hover"
|
|
|
content="拒绝后不可再接收此任务,且该任务对您不可见">
|
|
@@ -195,45 +194,60 @@
|
|
|
trigger="hover"
|
|
|
content="接收任务后请认真完成!">
|
|
|
<el-button v-if="taskOperationControl.receive" type="primary" size="mini" slot="reference"
|
|
|
- @click="receiveTask()">接收任务
|
|
|
+ @click="showTaskCodeModal = !showTaskCodeModal">接收任务
|
|
|
</el-button>
|
|
|
</el-popover>
|
|
|
|
|
|
- <el-button v-if="taskOperationControl.writeReport" type="primary" size="mini" @click="gotoWriteReport()">填写报告
|
|
|
- </el-button>
|
|
|
-
|
|
|
<el-button v-if="taskOperationControl.update" type="primary" size="mini" @click="modifyForm()">修改任务
|
|
|
</el-button>
|
|
|
|
|
|
- <el-button v-if="featureTaskRecommend && taskOperationControl.taskRecommend" type="primary" size="mini" @click="recommendTask()">任务推荐
|
|
|
+ <el-button v-if="taskOperationControl.writeReport" type="primary" size="mini" @click="gotoWriteReport()">
|
|
|
+ 填写报告
|
|
|
</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 v-if="featureTaskRecommend && taskOperationControl.taskRecommend" type="primary" size="mini"
|
|
|
+ @click="recommendTask()">任务推荐
|
|
|
</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>
|
|
|
|
|
|
- <el-button v-if="taskOperationControl.taskDemonstrate" type="success" size="mini" @click="gotoDataboard()">
|
|
|
+ <el-button v-if="taskOperationControl.forkTask" type="primary" size="mini"
|
|
|
+ @click="showTaskForkModal = !showTaskForkModal">
|
|
|
+ fork任务
|
|
|
+ </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()">确认结束-->
|
|
|
- <!--</div>-->
|
|
|
- <!--<div class="btn btn-small btn-info" v-if="!taskOperationControl.finish" @click="submitTaskRequest()">提交任务-->
|
|
|
- <!--</div>-->
|
|
|
- <!--<div class="btn btn-small btn-info" v-if="!taskOperationControl.receive" @click="receiveTask()">接收任务</div>-->
|
|
|
- <!--<div class="btn btn-small btn-danger" v-if="!taskOperationControl.reject" @click="rejectTask()">拒绝任务</div>-->
|
|
|
- <!--<div class="btn btn-small btn-info" v-if="taskOperationControl.update" @click="modifyForm()">修改任务</div>-->
|
|
|
- <!--<div class="btn btn-small btn-info" v-if="!taskOperationControl.uploadReport" @click="toCreateReport()">上传报告-->
|
|
|
- <!--</div>-->
|
|
|
+
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ title="确认提交?"
|
|
|
+ width="200"
|
|
|
+ trigger="hover"
|
|
|
+ content="提交任务后不可更改,等待区域管理员验收">
|
|
|
+ <el-button v-if="taskOperationControl.finish" type="primary" size="mini" slot="reference"
|
|
|
+ @click="submitTaskRequest()">提交任务
|
|
|
+ </el-button>
|
|
|
+ </el-popover>
|
|
|
+
|
|
|
+ <el-popover
|
|
|
+ placement="top-start"
|
|
|
+ title="确认结束?"
|
|
|
+ width="200"
|
|
|
+ trigger="hover"
|
|
|
+ content="测评机构已提交结束申请,请确认是否结束该任务">
|
|
|
+ <el-button v-if="taskOperationControl.confirmFinish" type="success" size="mini" slot="reference"
|
|
|
+ @click="endTask()">确认结束
|
|
|
+ </el-button>
|
|
|
+ </el-popover>
|
|
|
+
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
@@ -249,8 +263,8 @@
|
|
|
<el-collapse-item v-for="(item,index) in acceptedUserList" :key="item.id">
|
|
|
<template slot="title">
|
|
|
<el-row style="width: 100%;font-size: 16px">
|
|
|
- <el-col :span="6">{{item.userVO.userName}}</el-col>
|
|
|
- <el-col :span="6">{{item.userVO.email}}</el-col>
|
|
|
+ <el-col :span="6">{{ item.userVO.userName }}</el-col>
|
|
|
+ <el-col :span="6">{{ item.userVO.email }}</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-tag type="success" v-if="item.crowdReportVOS">已提交报告</el-tag>
|
|
|
<el-tag type="info" v-if="!item.crowdReportVOS">未提交报告</el-tag>
|
|
@@ -267,6 +281,22 @@
|
|
|
<!-- <report-list v-if="isAgency" v-bind:reports="reportList" v-bind:taskId="taskId" v-bind:projectId="projectId"/>-->
|
|
|
<!-- <report-list v-bind:reports="reportList" v-bind:taskId="taskId" v-bind:projectId="projectId"/>-->
|
|
|
</div>
|
|
|
+
|
|
|
+ <el-dialog title="请输入任务接收码" :visible.sync="showTaskCodeModal">
|
|
|
+ <el-input v-model="taskValidCode" autocomplete="off" placeholder="请输入任务接收码"></el-input>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showTaskCodeModal = false;taskValidCode = ''">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="handleTaskCodeValid()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="Fork任务?" :visible.sync="showTaskForkModal">
|
|
|
+ <div>确定基于该任务Fork新任务?</div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="showTaskForkModal = false;">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="handleForkTask()">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -294,7 +324,9 @@ import {
|
|
|
storageGet,
|
|
|
submitTaskRequest,
|
|
|
updateTask,
|
|
|
- getTaskWordCloud
|
|
|
+ getTaskWordCloud,
|
|
|
+ getTaskWordCloudByDescription,
|
|
|
+ refreshToken
|
|
|
} from '@/js/index'
|
|
|
import {AxiosInstance as axios} from "axios";
|
|
|
|
|
@@ -307,15 +339,20 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- featureTaskRecommend:CONFIG.feature_task_recommend,
|
|
|
+ showTaskCodeModal: false,
|
|
|
+ showTaskForkModal: false,
|
|
|
+ taskValidCode:'',
|
|
|
+ featureTaskRecommend: CONFIG.feature_task_recommend,
|
|
|
taskRecommendUrl: CONFIG.task_recommend_url,
|
|
|
+ needAcceptedPWD: CONFIG.feature_task_acceptedPWD,
|
|
|
currType: {},
|
|
|
user: {},
|
|
|
- serviceName:'',
|
|
|
+ serviceName: '',
|
|
|
showBD: true,
|
|
|
rolesPermissions: {},
|
|
|
loading: false,
|
|
|
- isModifyMode: false, institutionArray: [],
|
|
|
+ isModifyMode: false,
|
|
|
+ institutionArray: [],
|
|
|
tabPosition: 'top',
|
|
|
resourceType: ResourceType,
|
|
|
serviceType: [],
|
|
@@ -330,20 +367,23 @@ export default {
|
|
|
writeReport: false,
|
|
|
taskDemonstrate: false,
|
|
|
taskRecommend: false,
|
|
|
- exportTask: false
|
|
|
+ exportTask: false,
|
|
|
+ forkTask: false,
|
|
|
},
|
|
|
crowdReportUrl: '',
|
|
|
exportTaskUrl: '',
|
|
|
- wordCloud:[],
|
|
|
+ wordCloud: [],
|
|
|
task: {
|
|
|
agencyId: '',
|
|
|
+ agencyName: '',
|
|
|
+ acceptedPassword: '',
|
|
|
status: '',
|
|
|
name: '',
|
|
|
desc: '',
|
|
|
serviceType: '',
|
|
|
resource: '',
|
|
|
location: {},
|
|
|
- institution: {},
|
|
|
+ institution: 0,
|
|
|
datetime: '',
|
|
|
quotePrice: '',
|
|
|
fixedPrice: '',
|
|
@@ -354,9 +394,12 @@ export default {
|
|
|
title: '',
|
|
|
description: '',
|
|
|
endPoint: {
|
|
|
- serverCode: '',
|
|
|
- token: ''
|
|
|
- }
|
|
|
+ collaborativeType:0,
|
|
|
+ token: '',
|
|
|
+ threePageUrl:''
|
|
|
+ },
|
|
|
+ writeReportUrl:'',
|
|
|
+ threePageList: []
|
|
|
},
|
|
|
reportList: [],
|
|
|
pickerOptions: {
|
|
@@ -411,7 +454,7 @@ export default {
|
|
|
{required: true},
|
|
|
{
|
|
|
validator: (rule, value, callback) => {
|
|
|
- if (value == 0 && this.task.institution.id == null) {
|
|
|
+ if (value == 0 && this.task.institution == 0) {
|
|
|
callback(new Error('定向发布至少要选择一个测评机构'))
|
|
|
} else {
|
|
|
callback()
|
|
@@ -427,14 +470,14 @@ export default {
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
- }, trigger: ['change','blur']
|
|
|
+ }, trigger: ['change', 'blur']
|
|
|
},
|
|
|
],
|
|
|
datetime: [{required: true, message: '截止时间不可为空', trigger: 'blur'}],
|
|
|
},
|
|
|
acceptedUserList: [],
|
|
|
- shortLink:'',
|
|
|
- editShortLink:false,
|
|
|
+ shortLink: '',
|
|
|
+ editShortLink: false,
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -452,42 +495,65 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleTaskCodeValid(){
|
|
|
+ let str1 = this.projectId;
|
|
|
+ let str2 = this.task.code;
|
|
|
+ let str = str1.substring(str1.length-2) + str2.substring(str2.length-2);
|
|
|
+ if(str === this.taskValidCode){
|
|
|
+ //接收码正确,可以正确接收任务
|
|
|
+ this.receiveTask();
|
|
|
+ this.showTaskCodeModal = false;
|
|
|
+ }else{
|
|
|
+ // 提示接收码错误
|
|
|
+ notify('error', '接收码错误')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleForkTask(){
|
|
|
+ //跳转到taskFork
|
|
|
+ this.$router.push({
|
|
|
+ name: 'TaskCreate',
|
|
|
+ params: this.task
|
|
|
+ })
|
|
|
+ this.showTaskForkModal = false;
|
|
|
+ },
|
|
|
//跳转到任务对应的数据面板
|
|
|
- gotoDataboard(){
|
|
|
+ gotoDataboard() {
|
|
|
window.open(this.task.endPoint.token)
|
|
|
},
|
|
|
//根据短链接获取生成databoard
|
|
|
- getTaskDataBoard(){
|
|
|
+ getTaskDataBoard() {
|
|
|
this.showLoading()
|
|
|
- Http.put(`/api/project/${this.projectId}/task/${this.taskId}/addToken`,{"token":this.shortLink}).then((res)=>{
|
|
|
+ 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 != ''){
|
|
|
+ if (this.shortLink != '') {
|
|
|
this.editShortLink = false;
|
|
|
}
|
|
|
this.hideLoading()
|
|
|
})
|
|
|
},
|
|
|
- getServiceByCode(code){
|
|
|
+ getServiceByCode(code) {
|
|
|
let serviceName = this.serviceType.filter((item) => {
|
|
|
return item.code === code;
|
|
|
});
|
|
|
- return serviceName&&serviceName[0]&&serviceName[0]['name']
|
|
|
+ return serviceName && serviceName[0] && serviceName[0]['name']
|
|
|
},
|
|
|
|
|
|
handleTestTypeChange(val) {
|
|
|
let type = this.serviceType.filter((item) => {
|
|
|
- return item.code === val;
|
|
|
+ return item.name === val;
|
|
|
});
|
|
|
+ // console.log(type,val)
|
|
|
this.currType = type[0] ? type[0] : {};
|
|
|
if (this.currType.type === 0) {
|
|
|
this.$refs.task.clearValidate('endPoint');
|
|
|
+ } else {
|
|
|
+ this.task.resource = '2'
|
|
|
}
|
|
|
},
|
|
|
init() {
|
|
|
- console.log("this.featureTaskRecommend " + this.featureTaskRecommend);
|
|
|
- console.log("this.taskRecommendUrl " + this.taskRecommendUrl);
|
|
|
+ console.log(CONFIG)
|
|
|
this.taskId = this.$route.params.taskId
|
|
|
this.projectId = this.$route.params.projectId
|
|
|
this.setUserInfo()
|
|
@@ -495,12 +561,19 @@ export default {
|
|
|
//this.loadData(this.projectId, this.taskId)
|
|
|
this.getTaskDetail()
|
|
|
this.getWordCloud()
|
|
|
- this.setInstitutions()
|
|
|
+ // this.setInstitutions()
|
|
|
},
|
|
|
|
|
|
//北斗测试报告填写跳转
|
|
|
gotoWriteReport() {
|
|
|
- window.open(this.crowdReportUrl, '_blank');
|
|
|
+ //重开一个界面去进行报告填写
|
|
|
+ window.open(this.task.writeReportUrl, '_blank');
|
|
|
+ //更换token
|
|
|
+ refreshToken(this.projectId,this.taskId,this.refreshSuccess);
|
|
|
+ },
|
|
|
+
|
|
|
+ refreshSuccess(res) {
|
|
|
+ this.task.writeReportUrl = res.data;
|
|
|
},
|
|
|
|
|
|
//跳转至项目详情页面
|
|
@@ -513,7 +586,9 @@ export default {
|
|
|
|
|
|
//切换至可编辑页面
|
|
|
modifyForm() {
|
|
|
- // this.task.serviceType = ''
|
|
|
+ // this.task.serviceType = '
|
|
|
+ this.setServiceType()
|
|
|
+ this.setInstitutions();
|
|
|
this.isModifyMode = true
|
|
|
},
|
|
|
//切换至不可编辑页面
|
|
@@ -529,7 +604,7 @@ export default {
|
|
|
this.task.type = ''
|
|
|
this.task.resource = '2' //如果是广场不用管Location和institution ,定向看institution,区域看location
|
|
|
this.task.location = {provinceCode: '', cityCode: ''}
|
|
|
- this.task.institution = ''
|
|
|
+ this.task.institution = 0
|
|
|
this.task.datetime = ''
|
|
|
this.task.participantCount = 1
|
|
|
// this.task.endPointVO.caseId = ''
|
|
@@ -576,22 +651,30 @@ export default {
|
|
|
},
|
|
|
|
|
|
//获取词云
|
|
|
- getWordCloud(){
|
|
|
+ getWordCloud() {
|
|
|
getTaskWordCloud(this.projectId, this.taskId, this.getTaskCloudSuccess, this.getTaskCloudFail)
|
|
|
},
|
|
|
- getTaskCloudSuccess(words){
|
|
|
+
|
|
|
+ //获取词云
|
|
|
+ getWordCloudByDescription() {
|
|
|
+ getTaskWordCloudByDescription(this.projectId, this.taskId, this.task.description, this.getTaskCloudSuccess, this.getTaskCloudFail)
|
|
|
+ },
|
|
|
+
|
|
|
+ getTaskCloudSuccess(words) {
|
|
|
this.wordCloud = words.data;
|
|
|
},
|
|
|
- getTaskCloudFail(err){
|
|
|
- notify('error',err)
|
|
|
+ getTaskCloudFail(err) {
|
|
|
+ notify('error', err)
|
|
|
},
|
|
|
|
|
|
//获取任务详情成功时回调函数
|
|
|
getTaskDetailSuccess(res) {
|
|
|
this.hideLoading()
|
|
|
// console.log(res)
|
|
|
+ this.task = res.crowdTaskVO
|
|
|
this.taskId = res.crowdTaskVO.id
|
|
|
this.projectId = res.crowdTaskVO.projectId
|
|
|
+ this.task.code = res.crowdTaskVO.code
|
|
|
this.task.title = res.crowdTaskVO.title
|
|
|
this.task.description = res.crowdTaskVO.description
|
|
|
this.task.serviceType = res.crowdTaskVO.serviceType
|
|
@@ -600,6 +683,8 @@ export default {
|
|
|
this.task.institution = res.crowdTaskVO.institution
|
|
|
this.task.datetime = new Date(res.crowdTaskVO.datetime)
|
|
|
this.task.quotePrice = res.crowdTaskVO.quotePrice
|
|
|
+ this.task.agencyName = res.crowdTaskVO.agencyName
|
|
|
+ this.task.acceptedPassword = res.crowdTaskVO.acceptedPassword
|
|
|
this.task.acceptedCount = res.crowdTaskVO.acceptedCount
|
|
|
this.task.participantCount = res.crowdTaskVO.participantCount
|
|
|
this.task.fixedPrice = res.crowdTaskVO.fixedPrice
|
|
@@ -609,23 +694,24 @@ export default {
|
|
|
this.task.exportUrl = res.crowdTaskVO.exportUrl
|
|
|
this.task.status = res.crowdTaskVO.status
|
|
|
this.task.statusVO = res.crowdTaskVO.statusVO
|
|
|
- this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {
|
|
|
- serverCode: '',
|
|
|
- }
|
|
|
+ this.task.writeReportUrl = res.crowdTaskVO.writeReportUrl
|
|
|
+ this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {}
|
|
|
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);
|
|
|
- if(res.crowdTaskVO.endPointVO){
|
|
|
- if(res.crowdTaskVO.endPointVO.token){
|
|
|
+ this.handleTestTypeChange(res.crowdTaskVO.serviceType);
|
|
|
+ // this.serviceName = this.getServiceByCode(res.crowdTaskVO.serviceType);
|
|
|
+ if (res.crowdTaskVO.endPointVO) {
|
|
|
+ if (res.crowdTaskVO.endPointVO.token) {
|
|
|
this.shortLink = res.crowdTaskVO.endPointVO.token;
|
|
|
this.editShortLink = false
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.editShortLink = true
|
|
|
}
|
|
|
}
|
|
|
+ // this.wordCloud = res.wordCloudList;
|
|
|
// console.log(res.crowdTaskVO.endPointVO.token)
|
|
|
// console.log(this.editShortLink)
|
|
|
// console.log(this.isModifyMode)
|
|
@@ -676,10 +762,10 @@ export default {
|
|
|
const newTask = {
|
|
|
name: this.task.title,
|
|
|
desc: this.task.description,
|
|
|
- type: this.task.serviceType,
|
|
|
+ type: this.serviceType.filter(type => type.name === this.task.serviceType)[0].code,
|
|
|
resource: this.task.resource,
|
|
|
location: this.task.location == null ? {} : getProvinceNameByProvinceCode(this.task.location.provinceCode, this.task.location.cityCode),
|
|
|
- institution: this.task.institution ? this.task.institution.id : null,
|
|
|
+ institution: this.task.institution ? this.task.institution : null,
|
|
|
datetime: this.task.datetime,
|
|
|
quotePrice: this.task.quotePrice,
|
|
|
fixedPrice: this.task.fixedPrice,
|
|
@@ -698,8 +784,11 @@ export default {
|
|
|
//更新任务信息成功时回调函数
|
|
|
updateTaskSuccess(res) {
|
|
|
this.cancelMode()
|
|
|
+ this.task = res.crowdTaskVO
|
|
|
+ this.taskOperationControl = res.taskOperationControl
|
|
|
this.taskId = res.crowdTaskVO.id
|
|
|
this.projectId = res.crowdTaskVO.projectId
|
|
|
+ this.task.projectId = res.crowdTaskVO.projectId
|
|
|
this.task.title = res.crowdTaskVO.title
|
|
|
this.task.description = res.crowdTaskVO.description
|
|
|
this.task.serviceType = res.crowdTaskVO.serviceType
|
|
@@ -714,8 +803,8 @@ export default {
|
|
|
this.task.fixedPrice = res.crowdTaskVO.fixedPrice
|
|
|
// this.task.endPointVO = res.crowdTaskVO.endPointVO
|
|
|
this.task.doc = []
|
|
|
- this.task.requireDocUrl = res.crowdTaskVO.requirementFile,
|
|
|
- this.task.participantCount = res.crowdTaskVO.participantCount
|
|
|
+ this.task.requireDocUrl = res.crowdTaskVO.requirementFile
|
|
|
+ this.task.participantCount = res.crowdTaskVO.participantCount
|
|
|
this.task.endPoint = res.crowdTaskVO.endPointVO ? res.crowdTaskVO.endPointVO : {
|
|
|
serverCode: '',
|
|
|
}
|
|
@@ -725,8 +814,9 @@ export default {
|
|
|
this.acceptedUserList = res.acceptedUserList
|
|
|
this.handleTestTypeChange(res.crowdTaskVO.serviceType);
|
|
|
this.serviceName = this.getServiceByCode(res.crowdTaskVO.serviceType)
|
|
|
- this.getWordCloud()
|
|
|
+ this.getWordCloudByDescription()
|
|
|
this.hideLoading()
|
|
|
+
|
|
|
notify('success', '修改成功')
|
|
|
},
|
|
|
//更新任务信息失败时回调函数
|
|
@@ -744,23 +834,34 @@ export default {
|
|
|
formData.append('file', param.file)
|
|
|
Http.upload(Apis.FILE.REQUIREMENT_FILE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
notify('success', '上传成功')
|
|
|
- this.uploadRequireDocSuccess(res)
|
|
|
+ // console.log(res)
|
|
|
+ this.task.requireDocUrl = res.data
|
|
|
}).catch((error) => {
|
|
|
- notify('error', '上传失败:' + error.data)
|
|
|
+ // notify('error', '上传失败:' + error.data)
|
|
|
this.uploadRequireDocFail(error)
|
|
|
})
|
|
|
},
|
|
|
- //上传任务需求文档成功时回调函数
|
|
|
- uploadRequireDocSuccess(res) {
|
|
|
- this.hideLoading()
|
|
|
- console.log('上传成功')
|
|
|
- this.task.requireDocUrl = res.data
|
|
|
- console.log(res.data)
|
|
|
+ //上传测试大纲
|
|
|
+ uploadThreePage(param) {
|
|
|
+ const formData = new FormData()
|
|
|
+ let config = {
|
|
|
+ //添加请求头
|
|
|
+ headers: {'Content-Type': 'multipart/form-data'},
|
|
|
+ }
|
|
|
+ formData.append('file', param.file)
|
|
|
+ Http.upload(Apis.FILE.REQUIREMENT_FILE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
+ notify('success', '上传成功')
|
|
|
+ this.task.endPoint.threePageUrl = res.data
|
|
|
+ console.log("this.task.endPoint.threePageUrl " + this.task.endPoint.threePageUrl)
|
|
|
+ }).catch((error) => {
|
|
|
+ // notify('error', '上传失败:' + error.data)
|
|
|
+ this.uploadRequireDocFail(error)
|
|
|
+ })
|
|
|
},
|
|
|
//上传任务需求文档失败时回调函数
|
|
|
uploadRequireDocFail(error) {
|
|
|
this.hideLoading()
|
|
|
- notify('error', '任务需求文档上传失败:' + error.data)
|
|
|
+ // notify('error', '任务需求文档上传失败:' + error.data)
|
|
|
},
|
|
|
//文档上传前响应函数
|
|
|
|
|
@@ -795,12 +896,14 @@ export default {
|
|
|
//接收任务成功时的回调函数
|
|
|
receiveTaskSuccess(res) {
|
|
|
this.hideLoading()
|
|
|
- this.getTaskDetail();
|
|
|
+ // this.getTaskDetail();
|
|
|
notify('success', '接收任务成功')
|
|
|
+ this.getTaskDetailSuccess(res);
|
|
|
// console.log(res)
|
|
|
- this.taskOperationControl = res.taskOperationControl
|
|
|
- this.task.status = res.crowdTaskVO.status
|
|
|
- this.task.institution = res.crowdTaskVO.institution
|
|
|
+ // this.taskOperationControl = res.taskOperationControl
|
|
|
+ // this.task.status = res.crowdTaskVO.status
|
|
|
+ // this.task.institution = res.crowdTaskVO.institution
|
|
|
+ // this.task = res.crowdTaskVO
|
|
|
},
|
|
|
//接收任务失败时的回调函数
|
|
|
receiveTaskFail(error) {
|
|
@@ -809,7 +912,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 任务推荐
|
|
|
- recommendTask(){
|
|
|
+ recommendTask() {
|
|
|
let task = {
|
|
|
"title": this.task.title,
|
|
|
"description": this.task.description,
|
|
@@ -820,7 +923,7 @@ export default {
|
|
|
"createTime": this.task.createTime,
|
|
|
"datetime": this.task.datetime
|
|
|
};
|
|
|
- Http.post('/recommendationtest/query',task).then((res)=>{
|
|
|
+ Http.post('/recommendationtest/query', task).then((res) => {
|
|
|
window.open(this.taskRecommendUrl, "_blank");
|
|
|
})
|
|
|
},
|
|
@@ -868,12 +971,13 @@ export default {
|
|
|
//提交结束任务申请成功时的回调函数
|
|
|
submitTaskRequestSuccess(res) {
|
|
|
this.hideLoading()
|
|
|
- console.log(res)
|
|
|
- this.taskOperationControl = res.taskOperationControl
|
|
|
- this.task.status = res.crowdTaskVO.status
|
|
|
- this.task.institution = res.crowdTaskVO.institution
|
|
|
+ // this.task = res.crowdTaskVO
|
|
|
+ // this.taskOperationControl = res.taskOperationControl
|
|
|
+ // this.task.status = res.crowdTaskVO.status
|
|
|
+ // this.task.institution = res.crowdTaskVO.institution
|
|
|
notify('success', '提交任务成功,等待区域管理员审核')
|
|
|
- this.getTaskDetail();
|
|
|
+ this.getTaskDetailSuccess(res);
|
|
|
+ // this.getTaskDetail();
|
|
|
},
|
|
|
//提交结束任务申请失败时的回调函数
|
|
|
submitTaskRequestFail(error) {
|
|
@@ -887,7 +991,7 @@ export default {
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'success'
|
|
|
}).then(() => {
|
|
|
- this.getTaskDetail()
|
|
|
+ // this.getTaskDetail()
|
|
|
this.showLoading()
|
|
|
ensureEndTask(this.projectId, this.taskId, this.endTaskSuccess, this.endTaskFail)
|
|
|
}).catch(() => {
|
|
@@ -896,12 +1000,13 @@ export default {
|
|
|
},
|
|
|
//结束任务成功时的回调函数
|
|
|
endTaskSuccess(res) {
|
|
|
- this.hideLoading()
|
|
|
- this.taskOperationControl = res.taskOperationControl
|
|
|
- this.task.status = res.crowdTaskVO.status
|
|
|
- this.task.institution = res.crowdTaskVO.institution
|
|
|
+ // this.taskOperationControl = res.taskOperationControl
|
|
|
+ // this.task.status = res.crowdTaskVO.status
|
|
|
+ // this.task.institution = res.crowdTaskVO.institution
|
|
|
notify('success', '结束任务成功!')
|
|
|
- this.getTaskDetail();
|
|
|
+ this.getTaskDetailSuccess(res);
|
|
|
+ this.hideLoading()
|
|
|
+ // this.getTaskDetail();
|
|
|
},
|
|
|
//结束任务失败时的回调函数
|
|
|
endTaskFail(error) {
|
|
@@ -909,11 +1014,11 @@ export default {
|
|
|
notify('error', '结束任务失败:' + error.data)
|
|
|
},
|
|
|
// 导出任务
|
|
|
- toExportTask(){
|
|
|
+ toExportTask() {
|
|
|
exportTask(this.projectId, this.taskId, this.exportTaskSuccess, this.exportTaskFail);
|
|
|
},
|
|
|
// 导出任务成功时的回调函数
|
|
|
- exportTaskSuccess(res){
|
|
|
+ exportTaskSuccess(res) {
|
|
|
this.hideLoading()
|
|
|
console.log(res.data)
|
|
|
this.exportTaskUrl = res.data;
|
|
@@ -921,7 +1026,7 @@ export default {
|
|
|
notify('success', '任务导出成功!')
|
|
|
},
|
|
|
// 导出任务失败时的回调函数
|
|
|
- exportTaskFail(error){
|
|
|
+ exportTaskFail(error) {
|
|
|
this.hideLoading()
|
|
|
notify('error', '导出任务失败:' + error.data)
|
|
|
},
|
|
@@ -995,3 +1100,13 @@ export default {
|
|
|
padding-bottom: 0 !important;
|
|
|
}
|
|
|
</style>
|
|
|
+<style lang="scss">
|
|
|
+.three-page-upload {
|
|
|
+ label {
|
|
|
+ &:before{
|
|
|
+ content:'* ';
|
|
|
+ color:red
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|