diff --git a/report-ui/src/mixins/queryform.js b/report-ui/src/mixins/queryform.js index 8a27114f..ff8a2c75 100644 --- a/report-ui/src/mixins/queryform.js +++ b/report-ui/src/mixins/queryform.js @@ -108,6 +108,7 @@ export default { // widget-piechart 饼图、widget-hollow-piechart 空心饼图、widget-funnel 漏斗图 // widget-gauge 仪表盘 // widget-text 文本框 + // widge-table 表格(数据不要转) const chartType = params.chartType if ( chartType == "widget-barchart" || @@ -126,7 +127,7 @@ export default { } else if (chartType == "widget-text") { return this.widgettext(params.chartProperties, data) } else { - + return data } }, // 柱状图、折线图、折柱图 diff --git a/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue b/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue index 2cf7479c..951c3266 100644 --- a/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue +++ b/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue @@ -150,6 +150,7 @@ diff --git a/report-ui/src/views/report/bigscreen/designer/tools.js b/report-ui/src/views/report/bigscreen/designer/tools.js index 0ce6ef9b..91bd55bf 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools.js +++ b/report-ui/src/views/report/bigscreen/designer/tools.js @@ -1105,7 +1105,7 @@ const widgetTools = [ placeholder: 'px', relactiveDom: 'dataType', relactiveDomValue: 'dynamicData', - chartType: 'widget-barchart', + chartType: 'widget-table', value: '', }, ], diff --git a/report-ui/src/views/report/bigscreen/designer/widget/widgetTable.vue b/report-ui/src/views/report/bigscreen/designer/widget/widgetTable.vue index 523616aa..e1bc35d9 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/widgetTable.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/widgetTable.vue @@ -129,13 +129,29 @@ export default { console.log(tableData); tableData.dataType == "staticData" ? this.handlerStaticData(tableData.staticData) - : this.handlerDymaicData(); + : this.handlerDymaicData(tableData.dynamicData, tableData.refreshTime); }, handlerStaticData(data) { console.log(data); this.list = data; }, - handlerDymaicData() {}, + handlerDymaicData(data, refreshTime) { + if (!data) return; + if (this.ispreview) { + this.getEchartData(data); + this.flagInter = setInterval(() => { + this.getEchartData(data); + }, refreshTime); + } else { + this.getEchartData(data); + } + }, + getEchartData(val) { + const data = this.queryEchartsData(val); + data.then(res => { + this.list = res; + }); + }, // vue hack 之强制刷新组件 hackResetFun() { this.hackReset = false; @@ -174,6 +190,9 @@ export default { line-height: 50px; width: 100%; } +.txtScroll-top .bd { + width: 100%; +} .txtScroll-top .infoList li { height: 50px; line-height: 50px;