From 001c974e9fdf5c70b49ecfe2b6a740bd734a07fd Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Fri, 29 Oct 2021 17:46:04 +0800
Subject: [PATCH 1/7] =?UTF-8?q?refactor:=E4=BB=AA=E8=A1=A8=E6=9D=BF?=
=?UTF-8?q?=E5=88=B7=E6=96=B0=E5=88=B0=E7=A7=92=E7=BA=A7=E5=88=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/canvas/components/Editor/Preview.vue | 2 +-
frontend/src/components/canvas/custom-component/UserView.vue | 2 +-
frontend/src/lang/en.js | 1 +
frontend/src/lang/tw.js | 1 +
frontend/src/lang/zh.js | 1 +
.../panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue | 4 ++--
frontend/src/views/panel/edit/index.vue | 4 ++--
frontend/src/views/panel/list/PanelList.vue | 2 +-
frontend/src/views/panel/panel.js | 2 +-
9 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue
index c256d970ff..f3c481b03f 100644
--- a/frontend/src/components/canvas/components/Editor/Preview.vue
+++ b/frontend/src/components/canvas/components/Editor/Preview.vue
@@ -175,7 +175,7 @@ export default {
this.timer && clearInterval(this.timer)
let refreshTime = 300000
if (this.canvasStyleData.refreshTime && this.canvasStyleData.refreshTime > 0) {
- refreshTime = this.canvasStyleData.refreshTime * 60000
+ refreshTime = this.canvasStyleData.refreshTime * 1000
}
this.timer = setInterval(() => {
this.searchCount++
diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue
index c4d7aff9d8..fbd7ea666d 100644
--- a/frontend/src/components/canvas/custom-component/UserView.vue
+++ b/frontend/src/components/canvas/custom-component/UserView.vue
@@ -211,7 +211,7 @@ export default {
},
// 监听外部计时器变化
searchCount: function(val1) {
- if (val1 > 0) {
+ if (val1 > 0 && this.requestStatus !== 'waiting') {
this.getData(this.element.propValue.viewId)
}
},
diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js
index 9ef01755b2..567494051b 100644
--- a/frontend/src/lang/en.js
+++ b/frontend/src/lang/en.js
@@ -1229,6 +1229,7 @@ export default {
component_gap: 'Component Gap',
refresh_time: 'Refresh Time',
minute: 'minute',
+ second: 'second',
photo: 'Photo',
default_panel: 'Default Dashboard',
create_public_links: 'Create public links',
diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js
index af2479d535..997b6d82e5 100644
--- a/frontend/src/lang/tw.js
+++ b/frontend/src/lang/tw.js
@@ -1232,6 +1232,7 @@ export default {
component_gap: '組件間隙',
refresh_time: '刷新时间',
minute: '分钟',
+ second: '秒',
photo: '圖片',
default_panel: '默認儀表板',
create_public_links: '創建公共鏈接',
diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js
index 20d710e29b..51f2c50712 100644
--- a/frontend/src/lang/zh.js
+++ b/frontend/src/lang/zh.js
@@ -1239,6 +1239,7 @@ export default {
component_gap: '组件间隙',
refresh_time: '刷新时间',
minute: '分钟',
+ second: '秒',
photo: '图片',
default_panel: '默认仪表板',
create_public_links: '创建公共链接',
diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue
index 24d883cce4..67344bb1f0 100644
--- a/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue
+++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelRefreshTime.vue
@@ -8,8 +8,8 @@
>
-
-
+
+
diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue
index 02c569f7f7..3af2b80000 100644
--- a/frontend/src/views/panel/edit/index.vue
+++ b/frontend/src/views/panel/edit/index.vue
@@ -422,7 +422,7 @@ export default {
this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp)))
const temp = JSON.parse(canvasStyleDataTemp)
- temp.refreshTime = (temp.refreshTime || 5)
+ temp.refreshTime = (temp.refreshTime || 300)
this.$store.commit('setCanvasStyle', temp)
// 清空临时画布数据
@@ -443,7 +443,7 @@ export default {
this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
const panelStyle = JSON.parse(response.data.panelStyle)
- panelStyle.refreshTime = (panelStyle.refreshTime || 5)
+ panelStyle.refreshTime = (panelStyle.refreshTime || 300)
this.$store.commit('setCanvasStyle', panelStyle)
this.$store.commit('recordSnapshot', 'init')// 记录快照
diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue
index c19ab8cd75..2748b32e50 100644
--- a/frontend/src/views/panel/list/PanelList.vue
+++ b/frontend/src/views/panel/list/PanelList.vue
@@ -631,7 +631,7 @@ export default {
this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo))
const temp = JSON.parse(response.data.panelStyle)
- temp.refreshTime = (temp.refreshTime || 5)
+ temp.refreshTime = (temp.refreshTime || 300)
this.$store.commit('setCanvasStyle', temp)
this.$store.dispatch('panel/setPanelInfo', data)
diff --git a/frontend/src/views/panel/panel.js b/frontend/src/views/panel/panel.js
index f238d33acd..4760c847af 100644
--- a/frontend/src/views/panel/panel.js
+++ b/frontend/src/views/panel/panel.js
@@ -20,7 +20,7 @@ export const CANVAS_STYLE = {
auxiliaryMatrix: true,
openCommonStyle: true,
panel: DEFAULT_PANEL_STYLE,
- refreshTime: 5 // 仪表板刷新时间 默认五分钟
+ refreshTime: 300 // 仪表板刷新时间 默认300秒
}
export const DEFAULT_COMMON_CANVAS_STYLE_STRING = {
From 21a8dce89ab5796fc6d1908b8bb7d3f660b0c30b Mon Sep 17 00:00:00 2001
From: junjie
Date: Wed, 3 Nov 2021 14:08:31 +0800
Subject: [PATCH 2/7] =?UTF-8?q?refactor:=20cron=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/cron/cron.vue | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/src/components/cron/cron.vue b/frontend/src/components/cron/cron.vue
index d694fc9715..56e9df57cc 100644
--- a/frontend/src/components/cron/cron.vue
+++ b/frontend/src/components/cron/cron.vue
@@ -126,9 +126,9 @@ export default {
})
}
const v = `${this.sVal} ${this.mVal} ${this.hVal} ${this.dVal} ${this.monthVal} ${this.weekVal} ${this.yearVal}`
- if (v !== this.value) {
- this.$emit('input', v)
- }
+ // if (v !== this.value) {
+ this.$emit('input', v)
+ // }
return v
}
},
From 14eaab1f5b21c54a838e4a8967a836e6b992431f Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 3 Nov 2021 14:21:21 +0800
Subject: [PATCH 3/7] =?UTF-8?q?fix:=E7=BC=96=E8=BE=91=E4=BB=AA=E8=A1=A8?=
=?UTF-8?q?=E6=9D=BF=E6=97=B6,=E5=88=87=E6=8D=A2=E5=85=A8=E5=B1=8F?=
=?UTF-8?q?=E9=A2=84=E8=A7=88,=E8=BE=B9=E7=95=8C=E4=B8=8A=E7=9A=84?=
=?UTF-8?q?=E8=A7=86=E5=9B=BE=E5=8F=AF=E8=83=BD=E9=94=99=E4=BD=8D=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/components/canvas/components/Editor/index.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue
index ad47254977..ff815a25af 100644
--- a/frontend/src/components/canvas/components/Editor/index.vue
+++ b/frontend/src/components/canvas/components/Editor/index.vue
@@ -1059,6 +1059,7 @@ export default {
},
mounted() {
+ this.changeScale()
// 获取编辑器元素
this.$store.commit('getEditor')
const _this = this
From d739f203d92828ab71826768733cbee704288f3b Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 3 Nov 2021 15:07:32 +0800
Subject: [PATCH 4/7] =?UTF-8?q?fix:=E8=B7=B3=E8=BD=AC=E8=AE=BE=E7=BD=AE?=
=?UTF-8?q?=E5=88=A0=E9=99=A4=E9=85=8D=E7=BD=AE=E5=90=8E=E5=86=8D=E6=89=93?=
=?UTF-8?q?=E5=BC=80=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5id?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/panel/LinkJumpSet/index.vue | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/frontend/src/views/panel/LinkJumpSet/index.vue b/frontend/src/views/panel/LinkJumpSet/index.vue
index 9c1ec9fbf0..ff12c25556 100644
--- a/frontend/src/views/panel/LinkJumpSet/index.vue
+++ b/frontend/src/views/panel/LinkJumpSet/index.vue
@@ -65,6 +65,7 @@
:placeholder="$t('panel.select_jump_panel')"
style="margin-right: 10px"
@select="panelNodeClick"
+ @input="inputVal"
/>
@@ -309,6 +310,13 @@ export default {
this.linkJumpInfo.targetViewInfoList = []
this.getPanelViewList(data.id)
},
+ inputVal(value) {
+ if (!value) {
+ this.linkJumpInfo.targetViewInfoList = []
+ this.viewIdFieldArrayMap = {}
+ this.currentLinkPanelViewArray = []
+ }
+ },
addLinkJumpField() {
this.linkJumpInfo.targetViewInfoList.push({
targetViewId: '',
From f31eb4efbc2b44e7eb811f621cd26398a8abcf82 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 3 Nov 2021 17:44:20 +0800
Subject: [PATCH 5/7] =?UTF-8?q?feat:=E5=88=B7=E6=96=B0=E6=97=B6=E9=97=B4?=
=?UTF-8?q?=E5=8F=AF=E4=BB=A5=E9=80=89=E6=8B=A9=E5=8D=95=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/canvas/components/Editor/Preview.vue | 6 +++++-
.../components/canvas/custom-component/UserView.vue | 2 +-
frontend/src/components/canvas/utils/style.js | 3 ++-
.../SubjectSetting/PanelStyle/PanelRefreshTime.vue | 13 +++++++++++--
frontend/src/views/panel/edit/index.vue | 8 ++++++--
frontend/src/views/panel/list/PanelList.vue | 4 +++-
frontend/src/views/panel/panel.js | 4 +++-
7 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue
index f3c481b03f..4bb6f4d3fd 100644
--- a/frontend/src/components/canvas/components/Editor/Preview.vue
+++ b/frontend/src/components/canvas/components/Editor/Preview.vue
@@ -175,7 +175,11 @@ export default {
this.timer && clearInterval(this.timer)
let refreshTime = 300000
if (this.canvasStyleData.refreshTime && this.canvasStyleData.refreshTime > 0) {
- refreshTime = this.canvasStyleData.refreshTime * 1000
+ if (this.canvasStyleData.refreshUnit === 'second') {
+ refreshTime = this.canvasStyleData.refreshTime * 1000
+ } else {
+ refreshTime = this.canvasStyleData.refreshTime * 60000
+ }
}
this.timer = setInterval(() => {
this.searchCount++
diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue
index 15d84015e8..554ab6ec1e 100644
--- a/frontend/src/components/canvas/custom-component/UserView.vue
+++ b/frontend/src/components/canvas/custom-component/UserView.vue
@@ -1,6 +1,6 @@
-
-
+
+
+
+
+
+
+ 秒
+ 分
+
+
+
diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue
index 12f3477610..1a66c84aa1 100644
--- a/frontend/src/views/panel/edit/index.vue
+++ b/frontend/src/views/panel/edit/index.vue
@@ -422,7 +422,9 @@ export default {
this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(componentDataTemp)))
const temp = JSON.parse(canvasStyleDataTemp)
- temp.refreshTime = (temp.refreshTime || 300)
+ temp.refreshTime = (temp.refreshTime || 5)
+ temp.refreshViewLoading = (temp.refreshViewLoading || false)
+ temp.refreshUnit = (temp.refreshUnit || 'minute')
this.$store.commit('setCanvasStyle', temp)
// 清空临时画布数据
@@ -443,7 +445,9 @@ export default {
this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', this.resetID(JSON.parse(response.data.panelData)))
const panelStyle = JSON.parse(response.data.panelStyle)
- panelStyle.refreshTime = (panelStyle.refreshTime || 300)
+ panelStyle.refreshTime = (panelStyle.refreshTime || 5)
+ panelStyle.refreshViewLoading = (panelStyle.refreshViewLoading || false)
+ panelStyle.refreshUnit = (panelStyle.refreshUnit || 'minute')
this.$store.commit('setCanvasStyle', panelStyle)
this.$store.commit('recordSnapshot', 'init')// 记录快照
diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue
index 2748b32e50..2b075a26b6 100644
--- a/frontend/src/views/panel/list/PanelList.vue
+++ b/frontend/src/views/panel/list/PanelList.vue
@@ -631,7 +631,9 @@ export default {
this.$store.commit('setComponentData', this.resetID(componentDatas))
// this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo))
const temp = JSON.parse(response.data.panelStyle)
- temp.refreshTime = (temp.refreshTime || 300)
+ temp.refreshTime = (temp.refreshTime || 5)
+ temp.refreshViewLoading = (temp.refreshViewLoading || false)
+ temp.refreshUnit = (temp.refreshUnit || 'minute')
this.$store.commit('setCanvasStyle', temp)
this.$store.dispatch('panel/setPanelInfo', data)
diff --git a/frontend/src/views/panel/panel.js b/frontend/src/views/panel/panel.js
index 4760c847af..1b1cb4b213 100644
--- a/frontend/src/views/panel/panel.js
+++ b/frontend/src/views/panel/panel.js
@@ -20,7 +20,9 @@ export const CANVAS_STYLE = {
auxiliaryMatrix: true,
openCommonStyle: true,
panel: DEFAULT_PANEL_STYLE,
- refreshTime: 300 // 仪表板刷新时间 默认300秒
+ refreshViewLoading: true, // 仪表板视图loading提示
+ refreshUnit: 'minute', // 仪表板刷新时间带外 默认 分钟
+ refreshTime: 5 // 仪表板刷新时间 默认5分钟
}
export const DEFAULT_COMMON_CANVAS_STYLE_STRING = {
From c7ad0a5b3909ba32a5338b7eed6f32d34238f23e Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 3 Nov 2021 22:25:40 +0800
Subject: [PATCH 6/7] =?UTF-8?q?fix:=E8=BE=B9=E7=95=8C=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
frontend/src/views/panel/index.vue | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/frontend/src/views/panel/index.vue b/frontend/src/views/panel/index.vue
index 25165d0b8b..dfbceec004 100644
--- a/frontend/src/views/panel/index.vue
+++ b/frontend/src/views/panel/index.vue
@@ -3,7 +3,7 @@
-
+
@@ -24,7 +24,8 @@ export default {
return {
component: PanelMain,
componentName: 'PanelMain',
- param: {}
+ param: {},
+ editShow: true
}
},
watch: {
@@ -42,6 +43,17 @@ export default {
this.param = c.param
this.componentName = c.name
this.$store.dispatch('panel/setMainActiveName', c.name)
+ if (this.componentName === 'PanelEdit') {
+ setTimeout(() => {
+ this.editShow = false
+ this.$nextTick(() => {
+ this.editShow = true
+ })
+ }, 500)
+ } else {
+ this.editShow = true
+ }
+
// switch (c.name) {
// case 'PanelEdit':
// this.component = PanelEdit
From 846e90e6f5b2fc954e4f8585005882eb563f34cb Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 3 Nov 2021 22:56:46 +0800
Subject: [PATCH 7/7] =?UTF-8?q?fix:=E8=BE=B9=E7=95=8C=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../canvas/components/Editor/index.vue | 10 ++++++++--
frontend/src/views/panel/index.vue | 16 ++--------------
2 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue
index ff815a25af..0fe18e756c 100644
--- a/frontend/src/components/canvas/components/Editor/index.vue
+++ b/frontend/src/components/canvas/components/Editor/index.vue
@@ -1,5 +1,6 @@
-
+
@@ -24,8 +24,7 @@ export default {
return {
component: PanelMain,
componentName: 'PanelMain',
- param: {},
- editShow: true
+ param: {}
}
},
watch: {
@@ -43,17 +42,6 @@ export default {
this.param = c.param
this.componentName = c.name
this.$store.dispatch('panel/setMainActiveName', c.name)
- if (this.componentName === 'PanelEdit') {
- setTimeout(() => {
- this.editShow = false
- this.$nextTick(() => {
- this.editShow = true
- })
- }, 500)
- } else {
- this.editShow = true
- }
-
// switch (c.name) {
// case 'PanelEdit':
// this.component = PanelEdit