|
@@ -858,12 +858,14 @@ const onSubmit = async () => {
|
|
|
|
|
|
return {
|
|
|
title: item[formData.value.content],
|
|
|
- content: content
|
|
|
+ content: content,
|
|
|
+ specimenNumber: item.specimenNumber
|
|
|
}
|
|
|
})
|
|
|
const zip = new JSZip();
|
|
|
// 生成标签图片的逻辑
|
|
|
for (const label of labels) {
|
|
|
+ console.log('label',label)
|
|
|
const canvas = document.createElement('canvas')
|
|
|
const ctx = canvas.getContext('2d')
|
|
|
if (ctx) {
|
|
@@ -901,7 +903,7 @@ const onSubmit = async () => {
|
|
|
const blob = await response.blob()
|
|
|
|
|
|
// 将Blob添加到压缩文件中
|
|
|
- zip.file(`${label.title}.png`, blob)
|
|
|
+ zip.file(`${label.specimenNumber}.png`, blob)
|
|
|
}
|
|
|
}
|
|
|
// 生成压缩文件
|