|
@@ -475,6 +475,11 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
|
|
|
page: numberToChinese(page),
|
|
|
borrowDate: dayjs(temp.createTime).format('YYYY年MM月DD日')
|
|
|
}
|
|
|
+ temp.goods.forEach((i: any) => {
|
|
|
+ if (i.numName !== '藏品总登记号') {
|
|
|
+ i.num = ''
|
|
|
+ }
|
|
|
+ })
|
|
|
break
|
|
|
case EXPORT_WORD_ENUM.HALL_PUT_BACK:
|
|
|
temp = {
|
|
@@ -569,8 +574,12 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
|
|
|
case EXPORT_WORD_ENUM.COLLECTION_CARD:
|
|
|
const rtf2 = temp.rtf ? JSON.parse(temp.rtf).txtArr[0].txt : ''
|
|
|
const stack2 = []
|
|
|
- for (const url of getImageUrlsFromHtml(rtf2)) {
|
|
|
- stack2.push(await getBase64Sync(url))
|
|
|
+ try {
|
|
|
+ for (const url of getImageUrlsFromHtml(rtf2)) {
|
|
|
+ stack2.push(await getBase64Sync(url))
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ console.log(`rtf img transfer base64 error: `, err)
|
|
|
}
|
|
|
temp = {
|
|
|
...temp,
|
|
@@ -607,10 +616,15 @@ export const exportWordHandler = async (type: EXPORT_WORD_ENUM, data: Record<any
|
|
|
temp.num = ''
|
|
|
}
|
|
|
|
|
|
- if (type === EXPORT_WORD_ENUM.COLLECTION_ARCHIVES) {
|
|
|
- temp.imagePages = await arrangeImages(temp.imagePages)
|
|
|
- } else if (temp.thumb) {
|
|
|
- temp.thumb = await getBase64Sync(temp.thumb)
|
|
|
+ try {
|
|
|
+ if (type === EXPORT_WORD_ENUM.COLLECTION_ARCHIVES) {
|
|
|
+ temp.imagePages = await arrangeImages(temp.imagePages)
|
|
|
+ } else if (temp.thumb) {
|
|
|
+ temp.thumb = await getBase64Sync(temp.thumb)
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ console.log(err)
|
|
|
+ temp.imagePages = []
|
|
|
}
|
|
|
break
|
|
|
case EXPORT_WORD_ENUM.OUTSIDER_FORM:
|