From 8f67a4e4eb4de2244824331b1634c3bd0abc79a3 Mon Sep 17 00:00:00 2001 From: qianming Date: Fri, 12 May 2023 14:25:10 +0800 Subject: [PATCH] =?UTF-8?q?update--=E6=97=B6=E9=97=B4=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/docs/guide/chartsLinkage.md | 5 ++--- .../designer/widget/form/widgetFormTime.vue | 15 +++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/docs/guide/chartsLinkage.md b/doc/docs/guide/chartsLinkage.md index b50df9e9..bbc6305c 100644 --- a/doc/docs/guide/chartsLinkage.md +++ b/doc/docs/guide/chartsLinkage.md @@ -1,9 +1,8 @@ ## 简要说明 - -现有系统的联动有俩种。
+现有系统联动的本质是数据集查询参数“示例值”的替换, 现在联动有两种。
- 表单联动
- 目前支持的有下拉框、时间筛选器俩种。
+ 目前支持的有下拉框、时间筛选器。
- 图表联动:
目前联动主要集中在柱状图、折线图、饼图等这种二维图表,二维图表是指图表只支持2个字段的数据集,当然并不是说需要3个字段的堆叠图(柱状/折线)不支持联动,而是这种三维图表去联动二维图表会带来一些问题,反之二维的去联动三维的同样存在问题,因此目前源代码中只添加了部分二维图表的联动。
diff --git a/report-ui/src/views/bigscreenDesigner/designer/widget/form/widgetFormTime.vue b/report-ui/src/views/bigscreenDesigner/designer/widget/form/widgetFormTime.vue index 6a8e838c..837480a1 100644 --- a/report-ui/src/views/bigscreenDesigner/designer/widget/form/widgetFormTime.vue +++ b/report-ui/src/views/bigscreenDesigner/designer/widget/form/widgetFormTime.vue @@ -42,7 +42,7 @@ export default { text: '今天', onClick(picker) { const start = new Date(new Date(new Date().getTime()).setHours(0, 0, 0, 0)); - const end = new Date(new Date(new Date().getTime()).setHours(23, 59, 59, 999));; + const end = new Date(new Date(new Date().getTime()).setHours(23, 59, 59, 999)); picker.$emit('pick', [start, end]); } },{ @@ -55,25 +55,28 @@ export default { },{ text: '最近一周', onClick(picker) { - const end = new Date(); - const start = new Date(); - start.setTime(miment().add(-1, 'ww').stamp()); + const end = new Date(new Date(new Date().getTime()).setHours(23, 59, 59, 999)); + const start = new Date(new Date(new Date().getTime()+24*60*60*1000)); + start.setTime(miment().add(-6, 'DD').stamp()); + new Date(start.setHours(0,0,0,0)); picker.$emit('pick', [start, end]); } }, { text: '最近一个月', onClick(picker) { - const end = new Date(); + const end = new Date(new Date(new Date().getTime()).setHours(23, 59, 59, 999)); const start = new Date(); start.setTime(miment().add(-1, 'MM').stamp()); + new Date(start.setHours(0,0,0,0)); picker.$emit('pick', [start, end]); } }, { text: '最近三个月', onClick(picker) { - const end = new Date(); + const end = new Date(new Date(new Date().getTime()).setHours(23, 59, 59, 999)); const start = new Date(); start.setTime(miment().add(-3, 'MM').stamp()); + new Date(start.setHours(0,0,0,0)); picker.$emit('pick', [start, end]); } }],