绘制 普测计划页面
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
accept=".doc,.docx"
|
||||
:file-list="fileList"
|
||||
:on-remove="handleRemove"
|
||||
:on-change="chooseBatch"
|
||||
:on-change="chooseBatch"
|
||||
ref="upload"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-Upload">选择文件</el-button>
|
||||
@@ -251,7 +251,7 @@ const add = () => {
|
||||
|
||||
// 下载模版
|
||||
const Export = () => {
|
||||
DownloadExport().then(res => {
|
||||
DownloadExport().then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
@@ -269,7 +269,7 @@ const download = (row: any, type: number) => {
|
||||
reportDownload({
|
||||
id: row.id,
|
||||
type: type
|
||||
}).then(res => {
|
||||
}).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
@@ -327,12 +327,12 @@ const UploadOriginal = () => {
|
||||
// 上传
|
||||
const BatchUpload = () => {
|
||||
let form = new FormData()
|
||||
form.append('type', 0)
|
||||
fileList.value.forEach(item => {
|
||||
form.append('type', '0')
|
||||
fileList.value.forEach((item: any) => {
|
||||
form.append('files', item.raw)
|
||||
})
|
||||
importReport(form)
|
||||
.then(res => {
|
||||
.then((res: any) => {
|
||||
if (res.type == 'application/json') {
|
||||
ElMessage.success('上传成功!')
|
||||
handleClose()
|
||||
@@ -350,7 +350,7 @@ const chooseBatch = (e: any) => {
|
||||
fileList.value.push(e)
|
||||
}
|
||||
const handleRemove = (e: any) => {
|
||||
fileList.value = fileList.value.filter(item => item.uid !== e.uid)
|
||||
fileList.value = fileList.value.filter((item: any) => item.uid !== e.uid)
|
||||
}
|
||||
const handleClose = () => {
|
||||
fileList.value = []
|
||||
|
||||
Reference in New Issue
Block a user