From 37bb2aac6fe2d856f06ff447d26163422c56024a Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期一, 10 十一月 2025 11:22:19 +0800
Subject: [PATCH] 提交 文件上传代码
---
north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue b/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue
index f68c05c..e7849b4 100644
--- a/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue
+++ b/north-glass-erp/northglass-erp/src/components/sd/order/UpdateAlienEditor.vue
@@ -40,7 +40,7 @@
const emits = defineEmits(['getUploadPicture'])
let fileName=ref(null)
-let fileDate=ref(null)
+let fileData=ref(null)
let fileJson=ref({
quadrilateral:null,
polygon:null
@@ -638,7 +638,7 @@
const base64 = await fileToBase64(blob);
if(value===1){
fileName.value="map.dxf"
- fileDate.value=base64.replace(/^data:.+;base64,/, "")
+ fileData.value=base64.replace(/^data:.+;base64,/, "")
}
else if(value===2&&state.value){
saveAs(blob, 'map.dxf');
@@ -689,7 +689,7 @@
handleFileUpload()
fileName.value=file.name
- fileDate.value=base64.replace(/^data:.+;base64,/, "")
+ fileData.value=base64.replace(/^data:.+;base64,/, "")
} catch (error) {
console.error('瑙f瀽DXF鏂囦欢鏃跺嚭閿�:', error);
}
@@ -1025,13 +1025,13 @@
//淇濆瓨鏂规硶
const save = () => {
- if(fileName.value!=null&&fileDate.value!=null){
+ if(fileName.value!=null&&fileData.value!=null){
fileJson.value.quadrilateral=[parseInt(data5.value),parseInt(data6.value),parseInt(data1.value),parseInt(data2.value),
parseInt(data3.value),parseInt(data4.value),parseInt(data7.value),parseInt(data8.value)]
if(fileJson.value.quadrilateral==null&&fileJson.value.polygon==null){
fileJson.value=null
}
- emits('getUploadPicture', fileName.value,fileDate.value,fileJson.value)
+ emits('getUploadPicture', fileName.value,fileData.value,fileJson.value)
}else{
ElMessage.warning("鏈弬涓庝慨鏀�")
--
Gitblit v1.8.0