|
@@ -3,7 +3,7 @@ import type { AxiosRequestConfig } from "axios";
|
|
|
import { ref } from "vue";
|
|
|
import request, { download, REQUEST } from "~/utils/request";
|
|
|
|
|
|
-const props = defineProps<{ url: string; d: Object; exportKey?: string }>();
|
|
|
+const props = defineProps<{ url: string; d: Object }>();
|
|
|
const emits = defineEmits(["success"]);
|
|
|
const loading = ref(false);
|
|
|
const percentage = ref(0);
|
|
@@ -12,9 +12,7 @@ const handleTableRowBtns_import = ({ file }: { file: File }) => {
|
|
|
loading.value = true;
|
|
|
return REQUEST.import({
|
|
|
$type: "import",
|
|
|
- url: props.importKey
|
|
|
- ? `${props.url}/import?${props.importKey}`
|
|
|
- : `${props.url}/import`,
|
|
|
+ url: `${props.url}/import`,
|
|
|
data: { file, ...props.d },
|
|
|
onUploadProgress(progressEvent: { loaded: number; total: number }) {
|
|
|
percentage.value = ~~(
|