多文件上传
This commit is contained in:
@@ -731,6 +731,7 @@ export function updateMeet(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 上传接口
|
||||||
export function upFile(data) {
|
export function upFile(data) {
|
||||||
return axios({
|
return axios({
|
||||||
url: '/api/att/attFile/upload',
|
url: '/api/att/attFile/upload',
|
||||||
|
|||||||
@@ -375,6 +375,7 @@
|
|||||||
drag
|
drag
|
||||||
:file-list="rh_pageData.infoSources"
|
:file-list="rh_pageData.infoSources"
|
||||||
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
||||||
|
:http-request="httpRequest"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
:before-remove="handleBeforeRemove"
|
:before-remove="handleBeforeRemove"
|
||||||
:on-success="handleOnsuccess"
|
:on-success="handleOnsuccess"
|
||||||
@@ -426,7 +427,7 @@ import {
|
|||||||
startProcess, saveTaskFirst,
|
startProcess, saveTaskFirst,
|
||||||
completeTask, queryTaskFirst,
|
completeTask, queryTaskFirst,
|
||||||
taskDel, workGroup, processBack,
|
taskDel, workGroup, processBack,
|
||||||
getBusStandFileByAttId
|
getBusStandFileByAttId,upFile
|
||||||
} from '@/api/process.js'
|
} from '@/api/process.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -620,6 +621,20 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
httpRequest(params) {
|
||||||
|
const file = params.file
|
||||||
|
// 根据后台需求数据格式
|
||||||
|
const form = new FormData()
|
||||||
|
// 文件对象
|
||||||
|
form.append("file", file)
|
||||||
|
upFile(form).then(res=>{
|
||||||
|
if (res.ok) {
|
||||||
|
this.handleOnsuccess(res)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('上传失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 文件上传成功
|
// 文件上传成功
|
||||||
handleOnsuccess(res, file, fileList) {
|
handleOnsuccess(res, file, fileList) {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
|
|||||||
@@ -128,6 +128,7 @@
|
|||||||
name="file"
|
name="file"
|
||||||
:file-list="upOtherData"
|
:file-list="upOtherData"
|
||||||
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
||||||
|
:http-request="httpRequestOther"
|
||||||
:before-upload="beforeUploadOther"
|
:before-upload="beforeUploadOther"
|
||||||
:before-remove="beforeRemoveOther"
|
:before-remove="beforeRemoveOther"
|
||||||
:on-success="onsuccessOther"
|
:on-success="onsuccessOther"
|
||||||
@@ -203,6 +204,7 @@
|
|||||||
name="file"
|
name="file"
|
||||||
:file-list="reData"
|
:file-list="reData"
|
||||||
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
||||||
|
:http-request="httpRequest"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
:before-remove="handleBeforeRemove"
|
:before-remove="handleBeforeRemove"
|
||||||
:on-success="handleOnsuccess"
|
:on-success="handleOnsuccess"
|
||||||
@@ -224,6 +226,7 @@
|
|||||||
name="file"
|
name="file"
|
||||||
:file-list="themeData"
|
:file-list="themeData"
|
||||||
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
||||||
|
:http-request="httpRequestTheme"
|
||||||
:before-upload="beforeUploadTheme"
|
:before-upload="beforeUploadTheme"
|
||||||
:before-remove="beforeRemoveTheme"
|
:before-remove="beforeRemoveTheme"
|
||||||
:on-success="onsuccessTheme"
|
:on-success="onsuccessTheme"
|
||||||
@@ -239,7 +242,7 @@
|
|||||||
import ProcessHeader from '../../components/ProcessHeader'
|
import ProcessHeader from '../../components/ProcessHeader'
|
||||||
import ProcessFooter from '../../components/ProcessFooter'
|
import ProcessFooter from '../../components/ProcessFooter'
|
||||||
import ProcessTitle from '../../components/ProcessTitle'
|
import ProcessTitle from '../../components/ProcessTitle'
|
||||||
import { saveTaskFirst, completeTask, inboundLiaisonDetail} from '@/api/process.js'
|
import { saveTaskFirst, completeTask, inboundLiaisonDetail,upFile} from '@/api/process.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -386,6 +389,20 @@ export default {
|
|||||||
this.reData = this.fileListData.material
|
this.reData = this.fileListData.material
|
||||||
this.upDialog = true
|
this.upDialog = true
|
||||||
},
|
},
|
||||||
|
httpRequest(params) {
|
||||||
|
const file = params.file
|
||||||
|
// 根据后台需求数据格式
|
||||||
|
const form = new FormData()
|
||||||
|
// 文件对象
|
||||||
|
form.append("file", file)
|
||||||
|
upFile(form).then(res=>{
|
||||||
|
if (res.ok) {
|
||||||
|
this.handleOnsuccess(res)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('上传失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 文件上传成功
|
// 文件上传成功
|
||||||
handleOnsuccess(res, file, fileList) {
|
handleOnsuccess(res, file, fileList) {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
@@ -460,6 +477,20 @@ export default {
|
|||||||
this.upThemeDialog = true
|
this.upThemeDialog = true
|
||||||
|
|
||||||
},
|
},
|
||||||
|
httpRequestTheme(params) {
|
||||||
|
const file = params.file
|
||||||
|
// 根据后台需求数据格式
|
||||||
|
const form = new FormData()
|
||||||
|
// 文件对象
|
||||||
|
form.append("file", file)
|
||||||
|
upFile(form).then(res=>{
|
||||||
|
if (res.ok) {
|
||||||
|
this.onsuccessTheme(res)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('上传失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 文件上传成功
|
// 文件上传成功
|
||||||
onsuccessTheme(res, file, fileList) {
|
onsuccessTheme(res, file, fileList) {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
@@ -521,6 +552,21 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/** 其他资料上传 */
|
/** 其他资料上传 */
|
||||||
|
|
||||||
|
httpRequestOther(params) {
|
||||||
|
const file = params.file
|
||||||
|
// 根据后台需求数据格式
|
||||||
|
const form = new FormData()
|
||||||
|
// 文件对象
|
||||||
|
form.append("file", file)
|
||||||
|
upFile(form).then(res=>{
|
||||||
|
if (res.ok) {
|
||||||
|
this.onsuccessOther(res)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('上传失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 文件上传成功
|
// 文件上传成功
|
||||||
onsuccessOther(res, file, fileList) {
|
onsuccessOther(res, file, fileList) {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
name="file"
|
name="file"
|
||||||
:file-list="fileTextList"
|
:file-list="fileTextList"
|
||||||
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
|
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx"
|
||||||
|
:http-request="httpRequest"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
:before-remove="handleBeforeRemove"
|
:before-remove="handleBeforeRemove"
|
||||||
:on-remove="handleONRemove"
|
:on-remove="handleONRemove"
|
||||||
@@ -178,7 +179,7 @@
|
|||||||
import ProcessHeader from '../../components/ProcessHeader'
|
import ProcessHeader from '../../components/ProcessHeader'
|
||||||
import ProcessFooter from '../../components/ProcessFooter'
|
import ProcessFooter from '../../components/ProcessFooter'
|
||||||
import ProcessTitle from '../../components/ProcessTitle'
|
import ProcessTitle from '../../components/ProcessTitle'
|
||||||
import {inboundLiaisonDetail, completeTask, saveTaskForPub, changeAssigneeNew,execTask} from "@/api/process"
|
import {inboundLiaisonDetail, completeTask, saveTaskForPub, changeAssigneeNew,execTask,upFile} from "@/api/process"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "wfhxzgStep4",
|
name: "wfhxzgStep4",
|
||||||
@@ -298,6 +299,20 @@ export default {
|
|||||||
uploadFile (val) {
|
uploadFile (val) {
|
||||||
this.fileListData = val
|
this.fileListData = val
|
||||||
},
|
},
|
||||||
|
httpRequest(params) {
|
||||||
|
const file = params.file
|
||||||
|
// 根据后台需求数据格式
|
||||||
|
const form = new FormData()
|
||||||
|
// 文件对象
|
||||||
|
form.append("file", file)
|
||||||
|
upFile(form).then(res=>{
|
||||||
|
if (res.ok) {
|
||||||
|
this.handleOnsuccess(res)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('上传失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 文件上传成功
|
// 文件上传成功
|
||||||
handleOnsuccess(res, file, fileList) {
|
handleOnsuccess(res, file, fileList) {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user