廖井涛
2025-11-21 6dd74d6739305ba7ab51c43b83d166bdf9e12c52
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
@@ -206,7 +206,7 @@
      circle.value.r=0
      exportToDXF(1)
    }else{
      ElMessage.warning("请输入大于0的有效参数")
      ElMessage.warning(t('basicData.greater0Msg'))
    }
  }
@@ -242,7 +242,7 @@
      rect.value.h=0
      exportToDXF(1)
    }else{
      ElMessage.warning("请输入大于0的有效参数")
      ElMessage.warning(t('basicData.greater0Msg'))
    }
  }
@@ -638,12 +638,12 @@
  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');
  }else{
    ElMessage.warning("该格式不支持导出")
    ElMessage.warning(t('basicData.notExport'))
  }
}
@@ -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('解析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("未参与修改")