From 95ac1cf6c227c9f6398e284798fd36946cb303e1 Mon Sep 17 00:00:00 2001 From: lexmarn <337555769@qq.com> Date: Wed, 3 Nov 2021 14:28:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=A2=9E=E5=8A=A0=E5=AE=BD?= =?UTF-8?q?=E9=AB=98=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designerComponents/dynamicAddTable.vue | 21 +++++++--- .../tools/echartsConfigJson/widget-table.js | 16 ++++++-- .../bigscreen/designer/widget/widgetTable.vue | 38 ++++++++++++++----- 3 files changed, 55 insertions(+), 20 deletions(-) diff --git a/report-ui/src/views/report/bigscreen/designer/designerComponents/dynamicAddTable.vue b/report-ui/src/views/report/bigscreen/designer/designerComponents/dynamicAddTable.vue index e63116c3..b7353627 100644 --- a/report-ui/src/views/report/bigscreen/designer/designerComponents/dynamicAddTable.vue +++ b/report-ui/src/views/report/bigscreen/designer/designerComponents/dynamicAddTable.vue @@ -6,11 +6,12 @@ icon="el-icon-plus" plain @click="handleAddClick" - >新增新增 - - + + + @@ -54,11 +55,19 @@ > + + + + 取 消 确 定确 定 diff --git a/report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-table.js b/report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-table.js index a63c6c5f..7a3db007 100644 --- a/report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-table.js +++ b/report-ui/src/views/report/bigscreen/designer/tools/echartsConfigJson/widget-table.js @@ -50,6 +50,14 @@ export const widgetTable = { placeholder: '', value: '5' }, + { + type: 'el-input-number', + label: '行高', + name: 'rowHeight', + required: false, + placeholder: '', + value: '50' + }, { type: 'el-switch', label: '开启滚动', @@ -172,10 +180,10 @@ export const widgetTable = { name: 'dynamicAddTable', required: false, placeholder: '', - value: [{name: '日期', key: 'date', width: 200}, {name: '姓名', key: 'name', width: 200}, { - name: '地址', - key: 'address', - width: '200' + value: [ + {name: '日期', key: 'date', width: '50%'}, + {name: '姓名', key: 'name', width: '50%'}, + {name: '地址', key: 'address', width: '200%', }] } ], 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 d5760790..f61607e1 100644 --- a/report-ui/src/views/report/bigscreen/designer/widget/widgetTable.vue +++ b/report-ui/src/views/report/bigscreen/designer/widget/widgetTable.vue @@ -5,7 +5,7 @@
{{ item.name }} @@ -14,11 +14,11 @@
    -
  • +
  • {{ item[itemChild.key] }}
    @@ -48,7 +48,8 @@ export default { autoPage: true, //effect: "top", autoPlay: true, - vis: 5 + vis: 5, + rowHeight:'50px' }, header: [], list: [], @@ -172,15 +173,32 @@ export default { }, // 计算 奇偶背景色 bodyTable(index) { + var styleJson = {}; if (index % 2) { - return { - "background-color": this.optionsSetUp.eventColor - }; + styleJson["background-color"] = this.optionsSetUp.eventColor } else { - return { - "background-color": this.optionsSetUp.oldColor - }; + styleJson["background-color"] = this.optionsSetUp.oldColor } + return styleJson; + }, + tableRowHeight(){ + var styleJson = {}; + if(this.optionsSetUp.rowHeight){ + styleJson['height'] = this.optionsSetUp.rowHeight+'px'; + styleJson['line-height'] = this.optionsSetUp.rowHeight+'px'; + }else{ + styleJson['height'] =this.options.rowHeight + styleJson['line-height'] = this.optionsSetUp.rowHeight+'px'; + } + return styleJson; + }, + tableFiledWidth(index){ + var styleJson = {}; + debugger + if(this.optionsSetUp.dynamicAddTable[index].width ){ + styleJson["width"] = this.optionsSetUp.dynamicAddTable[index].width + } + return styleJson } } };