fix(仪表板): 回退测试代码

This commit is contained in:
dataeaseShu 2024-04-09 16:32:10 +08:00
parent 44ed81b593
commit 65d1681a7b
2 changed files with 2 additions and 7 deletions

View File

@ -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'])

View File

@ -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'