修改稳态报表展示处理

This commit is contained in:
zhujiyan
2024-08-12 11:35:56 +08:00
parent 8d69b36290
commit 390252bf16
4 changed files with 62 additions and 31 deletions

View File

@@ -85,6 +85,15 @@ const beforeUpload = (file: any) => {
}
luckysheet.destroy()
options.value.title = exportJson.info.name
console.log('🚀 ~ exportJson.sheets:', exportJson.sheets)
exportJson.sheets.forEach((item: any) => {
// item.celldata = []
// item.data = []
item.celldata.forEach((k: any) => {
k.v.ct.s ? (k.v.v = k.v.ct.s[0].v) : ''
k.v.ct.s ? (k.v.m = k.v.ct.s[0].v) : ''
})
})
options.value.data = exportJson.sheets
luckysheet.create(options.value)
})
@@ -95,9 +104,14 @@ const preservation = () => {
}
// 新增
const submitForm = (formdata: any, text: string) => {
console.log('🚀 ~ submitForm ~ text:', text)
let userStr = JSON.stringify(luckysheet.getAllSheets())
let blob = new Blob([userStr], {
// let userStr = JSON.stringify(luckysheet.getAllSheets())
let userStr = luckysheet.getAllSheets()
console.log('🚀 ~ submitForm ~ userStr:', userStr)
userStr.forEach((item: any) => {
item.data1 = JSON.stringify(item.data)
})
let blob = new Blob([JSON.stringify(userStr)], {
type: 'application/json;charset=UTF-8'
})
let files = new window.File([blob], 'content.json', {