fix: 上传接口变更
This commit is contained in:
@@ -211,8 +211,7 @@ function fnUploadFile(up: UploadRequestOption) {
|
||||
file.percent = 100;
|
||||
file.status = 'done';
|
||||
// 预置到表单
|
||||
const { fileName } = res.data;
|
||||
modalState.from.path = fileName;
|
||||
modalState.from.path = res.data.filePath;
|
||||
} else {
|
||||
message.error(res.msg, 3);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import { FileType } from 'ant-design-vue/es/upload/interface';
|
||||
import { uploadFile } from '@/api/tool/file';
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
import saveAs from 'file-saver';
|
||||
import { number } from 'echarts';
|
||||
const { copy } = useClipboard({ legacy: true });
|
||||
const { t } = useI18n();
|
||||
const emit = defineEmits(['ok', 'cancel', 'update:open']);
|
||||
@@ -51,7 +52,7 @@ type ModalStateType = {
|
||||
title: string;
|
||||
/**表单数据 */
|
||||
from: {
|
||||
id: string;
|
||||
id: number | undefined;
|
||||
neType: string;
|
||||
neId: string;
|
||||
activationRequestCode: string;
|
||||
@@ -70,7 +71,7 @@ let modalState: ModalStateType = reactive({
|
||||
openByEdit: false,
|
||||
title: '授权文件',
|
||||
from: {
|
||||
id: '',
|
||||
id: undefined,
|
||||
neType: '',
|
||||
neId: '',
|
||||
activationRequestCode: '',
|
||||
@@ -178,8 +179,7 @@ function fnUploadFile(up: UploadRequestOption) {
|
||||
file.percent = 100;
|
||||
file.status = 'done';
|
||||
// 预置到表单
|
||||
const { fileName } = res.data;
|
||||
modalState.from.licensePath = fileName;
|
||||
modalState.from.licensePath = res.data.filePath;
|
||||
} else {
|
||||
message.error(res.msg, 3);
|
||||
}
|
||||
|
||||
@@ -159,8 +159,7 @@ function fnUploadFile(up: UploadRequestOption) {
|
||||
file.percent = 100;
|
||||
file.status = 'done';
|
||||
// 预置到表单
|
||||
const { fileName } = res.data;
|
||||
modalState.licensePath = fileName;
|
||||
modalState.licensePath = res.data.filePath;
|
||||
} else {
|
||||
message.error(res.msg, 3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user