mirror of
https://github.com/fumiama/paper-manager.git
synced 2026-06-11 19:50:24 +08:00
finish upload paper to temp
This commit is contained in:
@@ -61,6 +61,7 @@
|
||||
import { warn } from '/@/utils/log'
|
||||
import FileList from './FileList.vue'
|
||||
import { useI18n } from '/@/hooks/web/useI18n'
|
||||
import { ResultEnum } from '/@/enums/httpEnum'
|
||||
export default defineComponent({
|
||||
components: { BasicModal, Upload, Alert, FileList },
|
||||
props: {
|
||||
@@ -181,10 +182,17 @@
|
||||
)
|
||||
item.status = UploadResultStatus.SUCCESS
|
||||
item.responseData = data
|
||||
return {
|
||||
success: true,
|
||||
error: null,
|
||||
}
|
||||
const { code, result } = data
|
||||
if (code == ResultEnum.SUCCESS)
|
||||
return {
|
||||
success: true,
|
||||
error: null,
|
||||
}
|
||||
else
|
||||
return {
|
||||
success: false,
|
||||
error: result,
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
item.status = UploadResultStatus.ERROR
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<PageWrapper :class="prefixCls" :title="t('routes.filelist.name')">
|
||||
<template #headerContent>
|
||||
<BasicUpload
|
||||
name="paper"
|
||||
v-if="hasPermission([RoleEnum.SUPER, RoleEnum.FILE_MANAGER])"
|
||||
:maxSize="20"
|
||||
:maxNumber="10"
|
||||
|
||||
Reference in New Issue
Block a user