|
|
@@ -60,21 +60,13 @@
|
|
|
v-model="task.resource"
|
|
|
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 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>
|
|
|
@@ -125,7 +117,7 @@
|
|
|
</span>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="三级菜单" prop="threePageUrl" class="three-page-upload" v-if="currType.type==1">
|
|
|
+ <el-form-item label="测试大纲" prop="threePageUrl" class="three-page-upload" v-if="currType.type==1">
|
|
|
<el-upload
|
|
|
style="width: 400px"
|
|
|
v-if="isModifyMode"
|
|
|
@@ -136,7 +128,7 @@
|
|
|
:before-remove="beforeRemove"
|
|
|
:limit="1"
|
|
|
:on-exceed="handleExceed"
|
|
|
- :http-request="uploadRequireDoc"
|
|
|
+ :http-request="uploadThreePage"
|
|
|
:file-list="task.threePageList"
|
|
|
>
|
|
|
<i class="el-icon-upload"></i>
|
|
|
@@ -204,11 +196,11 @@
|
|
|
</el-button>
|
|
|
</el-popover>
|
|
|
|
|
|
- <el-button v-if="taskOperationControl.writeReport" type="primary" size="mini" @click="gotoWriteReport()">
|
|
|
- 填写报告
|
|
|
+ <el-button v-if="taskOperationControl.update" type="primary" size="mini" @click="modifyForm()">修改任务
|
|
|
</el-button>
|
|
|
|
|
|
- <el-button v-if="taskOperationControl.update" type="primary" size="mini" @click="modifyForm()">修改任务
|
|
|
+ <el-button v-if="taskOperationControl.writeReport" type="primary" size="mini" @click="gotoWriteReport()">
|
|
|
+ 填写报告
|
|
|
</el-button>
|
|
|
|
|
|
<el-button v-if="featureTaskRecommend && taskOperationControl.taskRecommend" type="primary" size="mini"
|
|
|
@@ -221,17 +213,17 @@
|
|
|
上传报告
|
|
|
</el-button>
|
|
|
|
|
|
- <el-button v-if="taskOperationControl.taskDemonstrate" type="success" size="mini"
|
|
|
- @click="gotoDataboard()">
|
|
|
- 任务面板
|
|
|
- </el-button>
|
|
|
-
|
|
|
<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>
|
|
|
+
|
|
|
<el-popover
|
|
|
placement="top-start"
|
|
|
title="确认提交?"
|
|
|
@@ -550,7 +542,7 @@ export default {
|
|
|
let type = this.serviceType.filter((item) => {
|
|
|
return item.name === val;
|
|
|
});
|
|
|
- console.log(type,val)
|
|
|
+ // console.log(type,val)
|
|
|
this.currType = type[0] ? type[0] : {};
|
|
|
if (this.currType.type === 0) {
|
|
|
this.$refs.task.clearValidate('endPoint');
|
|
|
@@ -840,23 +832,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.uploadRequirecSuccess(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)
|
|
|
},
|
|
|
//文档上传前响应函数
|
|
|
|