forked from github/dataease
fix(仪表板): 回退测试代码
This commit is contained in:
parent
44ed81b593
commit
65d1681a7b
@ -152,11 +152,8 @@ onMounted(async () => {
|
||||
// 从模板新建
|
||||
if (createType === 'template') {
|
||||
const deTemplateDataStr = wsCache.get(`de-template-data`)
|
||||
let deTemplateData = JSON.parse(deTemplateDataStr)
|
||||
// wsCache.delete('de-template-data')
|
||||
if (!deTemplateData) {
|
||||
deTemplateData = JSON.parse(localStorage.getItem('de-template-data-1'))
|
||||
}
|
||||
const deTemplateData = JSON.parse(deTemplateDataStr)
|
||||
wsCache.delete('de-template-data')
|
||||
dvMainStore.setComponentData(JSON.parse(deTemplateData['componentData']))
|
||||
dvMainStore.setCanvasStyle(JSON.parse(deTemplateData['canvasStyleData']))
|
||||
dvMainStore.setCanvasViewInfo(deTemplateData['canvasViewInfo'])
|
||||
|
@ -424,8 +424,6 @@ const apply = () => {
|
||||
const templateData = response.data
|
||||
// do create
|
||||
wsCache.set(`de-template-data`, JSON.stringify(templateData))
|
||||
wsCache.set(`de-template-data-2`, templateData)
|
||||
localStorage.setItem('de-template-data-1', JSON.stringify(templateData))
|
||||
const baseUrl =
|
||||
templateData.type === 'dataV'
|
||||
? '#/dvCanvas?opt=create&createType=template'
|
||||
|
Loading…
Reference in New Issue
Block a user