|
@@ -353,15 +353,18 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('creationtime')" prop="indate" min-width="140" align="center">
|
|
|
+ <el-table-column :label="$t('creationtime')" prop="indate" min-width="150" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{scope.row.indate}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('operation')" min-width="90" fixed="right">
|
|
|
+ <el-table-column :label="$t('operation')" min-width="150" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-link :href="scope.row.url" :download="scope.row.documentName" type="primary" style="margin-right:7px">{{ $t('other.download') }}</el-link>
|
|
|
<el-link @click="taskFileDelete(scope.row.id)">{{ $t('btn.delete') }}</el-link>
|
|
|
+ <el-upload style="display: inline-block;" action="#" :http-request="(row) => uploadFileClickTwo(row, scope.row)" :show-file-list="false" :multiple="false" v-if="scope.row.fileChargeStatus == 2">
|
|
|
+ <el-link type="primary">重新上传</el-link>
|
|
|
+ </el-upload>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态" min-width="140" v-if="user.timeType.taskFileCharge == 1" fixed="right">
|
|
@@ -2189,10 +2192,8 @@ export default {
|
|
|
let files = new FormData()
|
|
|
files.append("projectId",this.curProjectId);
|
|
|
files.append("taskId", this.addForm.id);
|
|
|
- files.append("taskFileId", this.addForm.id);
|
|
|
files.append("file", item.file);
|
|
|
- // this.http.uploadFile('/task-files/uploadFile',files,
|
|
|
- this.http.uploadFile('/task-files/reUploadFile',files,
|
|
|
+ this.http.uploadFile('/task-files/uploadFile', files,
|
|
|
res => {
|
|
|
if(res.code == 'ok'){
|
|
|
console.log(res);
|
|
@@ -2215,6 +2216,35 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ uploadFileClickTwo(item, row) {
|
|
|
+ let files = new FormData()
|
|
|
+ files.append("projectId",this.curProjectId);
|
|
|
+ files.append("taskId", this.addForm.id);
|
|
|
+ files.append("taskFileId", row.id);
|
|
|
+ files.append("file", item.file);
|
|
|
+ this.http.uploadFile('/task-files/reUploadFile', files,
|
|
|
+ res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ console.log(res);
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('yi-shang-chuan'),
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.gain({ taskId: this.taskId }, 1)
|
|
|
+ this.getTaskFileList()
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|