|
|
@@ -57,7 +57,9 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="taskDemand">任务要求</div> |
|
|
|
<div class="taskDemand">任务要求:</div> |
|
|
|
<div class="taskDemand">{{detail}}</div> |
|
|
|
|
|
|
|
|
|
|
|
<input |
|
|
|
ref="votefile" |
|
|
@@ -102,7 +104,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import development from '@/api/development'; |
|
|
|
import develeopMent from '@/api/development'; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: {}, |
|
|
@@ -111,6 +113,7 @@ export default { |
|
|
|
id: 1, |
|
|
|
rankId: 1, |
|
|
|
textarea: '', |
|
|
|
detail:'', |
|
|
|
subFiles: [], |
|
|
|
only: true, // 文件是否唯一 |
|
|
|
maxFile: 3, // 最大文件数量 仅only=false时有效 |
|
|
@@ -143,7 +146,19 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async initData() {}, |
|
|
|
async initData() { |
|
|
|
let re = await develeopMent.TaskDetail({ |
|
|
|
id: this.id, |
|
|
|
rankId: this.rankId |
|
|
|
}); |
|
|
|
if (re) { |
|
|
|
if (re.succeed) { |
|
|
|
this.detail = re.data.require; |
|
|
|
} else { |
|
|
|
this.$message.error(re.message); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
async submit() { |
|
|
|
if (!this.subFiles.length) { |
|
|
|
this.$toast('请选择文件'); |
|
|
@@ -151,7 +166,7 @@ export default { |
|
|
|
} |
|
|
|
this.$toast.loading({ |
|
|
|
forbidClick: true, |
|
|
|
duration: 0, |
|
|
|
duration: 0 |
|
|
|
}); |
|
|
|
if (this.subFiles.length) { |
|
|
|
let re = await this.subFile(); |
|
|
@@ -166,7 +181,7 @@ export default { |
|
|
|
}) |
|
|
|
); |
|
|
|
// 提交任务 |
|
|
|
let re = await development.SubmitTask({ |
|
|
|
let re = await develeopMent.SubmitTask({ |
|
|
|
id: this.id, |
|
|
|
uploadData: { |
|
|
|
content: this.textarea, |
|
|
@@ -200,7 +215,7 @@ export default { |
|
|
|
let formData = new FormData(); |
|
|
|
formData.set('fileName', item.file.name); |
|
|
|
formData.set('file', item.file); |
|
|
|
let re = await development.UploadFile({ formData }); |
|
|
|
let re = await develeopMent.UploadFile({ formData }); |
|
|
|
if (!re || !re.succeed) { |
|
|
|
resolve(false); |
|
|
|
return; |
|
|
|