perf(material-center): 优化原料上传逻辑
This commit is contained in:
@ -269,7 +269,9 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { code, data } = await postBatchRawMaterial({ raw_materials: uploadData.value });
|
|
||||||
|
const raw_materials = uploadData.value.filter((item) => item.uploadStatus !== EnumUploadStatus.error);
|
||||||
|
const { code } = await postBatchRawMaterial({ raw_materials });
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success('上传成功');
|
message.success('上传成功');
|
||||||
emit('update');
|
emit('update');
|
||||||
@ -493,7 +495,6 @@ export default defineComponent({
|
|||||||
multiple
|
multiple
|
||||||
customRequest={handleUpload}
|
customRequest={handleUpload}
|
||||||
class="w-full mb-16px"
|
class="w-full mb-16px"
|
||||||
accept={[...imageExtensions, ...videoExtensions, ...documentExtensions].join(',')}
|
|
||||||
showUploadList={false}
|
showUploadList={false}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -94,7 +94,7 @@ import { ref, computed } from 'vue';
|
|||||||
import { Button, Tooltip, Table, Tag } from 'ant-design-vue';
|
import { Button, Tooltip, Table, Tag } from 'ant-design-vue';
|
||||||
const { Column } = Table;
|
const { Column } = Table;
|
||||||
import { formatTableField, exactFormatTime, formatFileSize, downloadByUrl } from '@/utils/tools';
|
import { formatTableField, exactFormatTime, formatFileSize, downloadByUrl } from '@/utils/tools';
|
||||||
import { slsWithCatch } from '@/utils/stroage.ts';
|
// import { slsWithCatch } from '@/utils/stroage.ts';
|
||||||
import { TABS_LIST, ORIGIN_LIST, RawMaterialType } from '../../constants';
|
import { TABS_LIST, ORIGIN_LIST, RawMaterialType } from '../../constants';
|
||||||
|
|
||||||
import TextOverTips from '@/components/text-over-tips';
|
import TextOverTips from '@/components/text-over-tips';
|
||||||
|
|||||||
Reference in New Issue
Block a user