Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新建仪表板引入图表创建无法加载问题 #2329

Open
Bozhu12 opened this issue Jun 19, 2024 · 0 comments
Open

新建仪表板引入图表创建无法加载问题 #2329

Bozhu12 opened this issue Jun 19, 2024 · 0 comments

Comments

@Bozhu12
Copy link

Bozhu12 commented Jun 19, 2024

Datart版本号
datart-1.0.0-rc.3 发行版本

错误描述

创建仪表板引入已有图表异常 , 查看仪表板时无法加载 , 报出以下错误

TypeError: Cannot create property 'computedFields' on string '{"aggregation":true,"chartConfig":{"datas":[{"actions":{"NUMERIC":["aggregate","alias","format","sortable"],"STRING":["alias","sortable"],"DATE":["alias","sortable","dateLevel"]},"label":"mixed","key":"mixed","required":true,"type":"mixed","rows":[{"uid":"857df5d3-5cf6-4845-95e6-99c44a383be8","colName":"active","type":"STRING","subType":"UNCATEGORIZED","category":"field","children":[]},{"uid":"0968d6a4-3a6c-4903-aae8-5c7192351abc","colName":"email","type":"STRING","subType":"UNCATEGORIZED","category":"field","children":[]},{"uid":"2e13ab53-ebd7-499b-8a36-330071731a6a","colName":"name","type":"STRING","subType":"UNCATEGORIZED","category":"field","children":[]}]},{"label":"filter","key":"filter","type":"filter","disableAggregate":true}],"styles":[{"label":"header.title","key":"header","comType":"group","rows":[{"label":"header.open","key":"modal","comType":"group","options":{"type":"modal","modalSize":"middle"},"rows":[{"label":"header.styleAndGroup","key":"tableHeaders","comType":"tableHeader"}]}]},{"label":"column.conditionalStyle","key":"column","comType":"group","rows":[{"label":"column.open","key":"modal","comType":"group","options":{"type":"modal","modalSize":"middle"},"rows":[{"label":"column.list","key":"list","comType":"listTemplate","rows":[],"options":{},"template":{"label":"column.listItem","key":"listItem","comType":"group","rows":[{"label":"column.columnStyle","key":"columnStyle","comType":"group","options":{"expand":true},"rows":[{"label":"column.useColumnWidth","key":"useColumnWidth","default":false,"comType":"checkbox"},{"label":"column.columnWidth","key":"columnWidth","default":100,"options":{"min":0},"watcher":{"deps":["useColumnWidth"]},"comType":"inputNumber"},{"label":"style.align","key":"align","default":"default","comType":"fontAlignment","options":{"translateItemLabel":true,"items":[{"label":"@[email protected]","value":"default"},{"label":"viz.common.enum.fontAlignment.left","value":"left"},{"label":"viz.common.enum.fontAlignment.center","value":"center"},{"label":"viz.common.enum.fontAlignment.right","value":"right"}]}}]},{"label":"column.conditionalStyle","key":"conditionalStyle","comType":"group","options":{"expand":true},"rows":[{"label":"column.conditionalStylePanel","key":"conditionalStylePanel","comType":"conditionalStylePanel"}]}]}}]}]},{"label":"style.title","key":"style","comType":"group","rows":[{"label":"style.enableFixedHeader","key":"enableFixedHeader","default":true,"comType":"checkbox","value":true},{"label":"style.enableBorder","key":"enableBorder","default":true,"comType":"checkbox","value":true},{"label":"style.enableRowNumber","key":"enableRowNumber","default":false,"comType":"checkbox","value":false},{"label":"style.leftFixedColumns","key":"leftFixedColumns","default":0,"options":{"min":0},"comType":"inputNumber","value":0},{"label":"style.rightFixedColumns","key":"rightFixedColumns","default":0,"options":{"min":0},"comType":"inputNumber","value":0},{"label":"style.autoMergeFields","key":"autoMergeFields","comType":"select","options":{"mode":"multiple"}},{"label":"style.tableSize","key":"tableSize","default":"small","comType":"select","options":{"translateItemLabel":true,"items":[{"label":"@[email protected]","value":"default"},{"label":"@[email protected]","value":"middle"},{"label":"@[email protected]","value":"small"}]},"value":"small"}]},{"label":"style.tableHeaderStyle","key":"tableHeaderStyle","comType":"group","rows":[{"label":"common.backgroundColor","key":"bgColor","default":"#f8f9fa","comType":"fontColor","value":"#f8f9fa"},{"label":"style.font","key":"font","comType":"font","default":{"fontFamily":"-apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"","fontSize":12,"fontWeight":"bold","fontStyle":"normal","color":"#495057"},"value":{"fontFamily":"-apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"","fontSize":12,"fontWeight":"bold","fontStyle":"normal","color":"#495057"}},{"label":"style.align","key":"align","default":"left","comType":"fontAlignment","value":"left"}]},{"label":"style.tableBodyStyle","key":"tableBodyStyle","comType":"group","rows":[{"label":"style.oddFontColor","key":"oddFontColor","default":"#000","comType":"fontColor","value":"#000"},{"label":"style.oddBgColor","key":"oddBgColor","default":"rgba(0,0,0,0)","comType":"fontColor","value":"rgba(0,0,0,0)"},{"label":"style.evenFontColor","key":"evenFontColor","default":"#000","comType":"fontColor","value":"#000"},{"label":"style.evenBgColor","key":"evenBgColor","default":"rgba(0,0,0,0)","comType":"fontColor","value":"rgba(0,0,0,0)"},{"label":"style.fontSize","key":"fontSize","comType":"fontSize","default":12,"value":12},{"label":"style.fontFamily","key":"fontFamily","comType":"fontFamily","default":"-apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"","value":"-apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji""},{"label":"style.fontWeight","key":"fontWeight","comType":"fontWeight","default":"normal","value":"normal"},{"label":"style.fontStyle","key":"fontStyle","comType":"fontStyle","default":"normal","value":"normal"},{"label":"style.align","key":"align","default":"default","comType":"fontAlignment","options":{"translateItemLabel":true,"items":[{"label":"@[email protected]","value":"default"},{"label":"viz.common.enum.fontAlignment.left","value":"left"},{"label":"viz.common.enum.fontAlignment.center","value":"center"},{"label":"viz.common.enum.fontAlignment.right","value":"right"}]},"value":"default"}]}],"settings":[{"label":"paging.title","key":"paging","comType":"group","rows":[{"label":"paging.enablePaging","key":"enablePaging","default":true,"comType":"checkbox","options":{"needRefresh":true},"value":true},{"label":"paging.pageSize","key":"pageSize","default":100,"comType":"inputNumber","options":{"needRefresh":true,"step":1,"min":0},"value":100}]},{"label":"summary.title","key":"summary","comType":"group","rows":[{"label":"summary.aggregateFields","key":"aggregateFields","comType":"select","options":{"mode":"multiple"}},{"label":"common.backgroundColor","key":"summaryBcColor","default":"rgba(0, 0, 0, 0)","comType":"fontColor","value":"rgba(0, 0, 0, 0)"},{"label":"viz.palette.style.font","key":"summaryFont","comType":"font","default":{"fontFamily":"-apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"","fontSize":"14","fontWeight":"normal","fontStyle":"normal","color":"black"},"value":{"fontFamily":"-apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"","fontSize":"14","fontWeight":"normal","fontStyle":"normal","color":"black"}}]}],"interactions":[{"label":"drillThrough.title","key":"drillThrough","comType":"checkboxModal","default":false,"options":{"modalSize":"middle"},"rows":[{"label":"drillThrough.title","key":"setting","comType":"interaction.drillThrough"}],"value":false},{"label":"viewDetail.title","key":"viewDetail","comType":"checkboxModal","default":false,"options":{"modalSize":"middle"},"rows":[{"label":"viewDetail.title","key":"setting","comType":"interaction.viewDetail"}],"value":false}],"i18ns":[{"lang":"zh-CN","translation":{"common":{"backgroundColor":"背景颜色"},"header":{"title":"表头分组","open":"打开","styleAndGroup":"表头分组"},"column":{"open":"打开样式设置","list":"字段列表","sortAndFilter":"排序与过滤","enableSort":"开启列排序","basicStyle":"基础样式","useColumnWidth":"启用固定列宽","columnWidth":"列宽","columnStyle":"列样式","columnStylePanel":"列样式配置器","conditionalStyle":"条件样式","conditionalStylePanel":"条件样式配置器","align":"对齐方式","enableFixedCol":"开启固定列宽","fixedColWidth":"固定列宽度设置","font":"字体与样式"},"style":{"title":"表格样式","enableFixedHeader":"固定表头","enableBorder":"显示边框","enableRowNumber":"启用行号","leftFixedColumns":"左侧固定列","rightFixedColumns":"右侧固定列","autoMergeFields":"自动合并列内容","tableSize":"表格大小","tableHeaderStyle":"表头样式","tableBodyStyle":"表体样式","bgColor":"背景颜色","font":"字体","align":"对齐方式","alignDefault":"默认","fontWeight":"字体粗细","fontFamily":"字体","oddBgColor":"奇行背景色","oddFontColor":"奇行字体色","evenBgColor":"偶行背景色","evenFontColor":"偶行字体色","fontSize":"字体大小","fontStyle":"字体样式"},"tableSize":{"default":"默认","middle":"中","small":"小"},"summary":{"title":"数据汇总","aggregateFields":"汇总列"},"paging":{"title":"常规","enablePaging":"启用分页","pageSize":"每页行数"}}},{"lang":"en-US","translation":{"common":{"backgroundColor":"Background Color"},"header":{"title":"Table Header Group","open":"Open","styleAndGroup":"Header Group"},"column":{"open":"Open Style Setting","list":"Field List","sortAndFilter":"Sort and Filter","enableSort":"Enable Sort","basicStyle":"Baisc Style","useColumnWidth":"Use Column Width","columnWidth":"Column Width","columnStyle":"Column Style","columnStylePanel":"Column Style Panel","conditionalStyle":"Conditional Style","conditionalStylePanel":"Conditional Style Panel","align":"Align","enableFixedCol":"Enable Fixed Column","fixedColWidth":"Fixed Column Width","font":"Font and Style"},"style":{"title":"Table Style","enableFixedHeader":"Enable Fixed Header","enableBorder":"Show Border","enableRowNumber":"Enable Row Number","leftFixedColumns":"Left Fixed Columns","rightFixedColumns":"Right Fixed Columns","autoMergeFields":"Auto Merge Column Content","tableSize":"Table Size","tableHeaderStyle":"Table Header Style","tableBodyStyle":"Table Body Style","font":"Font","align":"Align","alignDefault":"Default","fontWeight":"Font Weight","fontFamily":"Font Family","oddBgColor":"Odd Row Background Color","evenBgColor":"Even Row Background Color","oddFontColor":"Odd Row Font Color","evenFontColor":"Even Row Font Color","fontSize":"Font Size","fontStyle":"Font Style"},"tableSize":{"default":"Default","middle":"Middle","small":"Small"},"summary":{"title":"Summary","aggregateFields":"Summary Fields"},"paging":{"title":"Paging","enablePaging":"Enable Paging","pageSize":"Page Size"}}}]},"chartGraphId":"mingxi-table","computedFields":[],"version":"1.0.0-RC.2"}'

如何重现
重现错误的步骤,例如:

  1. 拉取 datart-1.0.0-rc.3 发行版本 代码
  2. 配置数据库连接 , 采用mysql数据源
  3. 本地启动服务
  4. 创建数据源 、数据集、数据图表
  5. 新建仪表板 , 引入已有图表
  6. 保存图表 , 并查看

期望结果
清晰简洁地描述你期望的结果是什么

截图
image

运行环境详情:(可选,取决于错误发生的具体位置)

  • 系统: Windows 10
  • 数据源: MySQL 8.0.26
  • 浏览器: chrome 94

其他内容
有关这个问题的任意其他内容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant