Explorar o código

fix:上传表单

lupeng hai 2 meses
pai
achega
3f051caa24
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      src/views/base/apply/excelDataBbox.vue

+ 13 - 0
src/views/base/apply/excelDataBbox.vue

@@ -14,6 +14,7 @@
 import { ref } from "vue";
 import { updateProExcel } from "@/api/excel/index.ts";
 import ExcelView from "@/components/ExcelView/index.vue";
+import { uploadExcelBlob } from "@/api/apply/index";
 const setting = ref([]);
 const props = defineProps({
   data: {
@@ -309,6 +310,18 @@ watch(
   },
   { immediate: true }
 );
+onMounted(() => {
+  if(props.data.state === '3'){
+
+    setTimeout(() => {
+      let blobPromese = excelViewRef.value.toGetExcelBlob();
+      blobPromese.then((res) => {
+        console.log("=========", res);
+        uploadExcelBlob(res, props.data.id);
+      });
+    }, 1000);
+  }
+});
 </script>
 <style lang="scss" scoped>
 .exView {