From 75b2b77a40a4d4fb03bf1af8ea3da2594d3aa21d Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 2 Mar 2022 14:58:19 +0800 Subject: [PATCH 1/5] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BE=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=97=AD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/view/ChartEdit.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 5b59684eff..84f8c778c6 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -13,6 +13,9 @@ + + {{ $t('chart.close') }} + {{ $t('chart.recover') }} @@ -1246,7 +1249,8 @@ export default { this.table = response.data this.initTableField(id) }).catch(err => { - this.resetView() + this.table = null + this.resetDatasetField() this.httpRequest.status = err.response.data.success this.httpRequest.msg = err.response.data.message return true @@ -1525,6 +1529,14 @@ export default { this.$success(this.$t('commons.save_success')) }) }, + close() { + this.closeChangeChart() + // 从仪表板入口关闭 + if (this.$route.path.indexOf('panel') > -1) { + this.$store.commit('recordSnapshot') + bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' }) + } + }, getData(id) { this.hasEdit = false if (id) { From 7d69d3da92c7c189c0044e816318f733c5b48d3c Mon Sep 17 00:00:00 2001 From: junjun Date: Wed, 2 Mar 2022 15:40:57 +0800 Subject: [PATCH 2/5] =?UTF-8?q?refactor:=20=E6=8A=98=E7=BA=BF=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/common/common_antv.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/chart/common/common_antv.js b/frontend/src/views/chart/chart/common/common_antv.js index 4175a70bf1..331a3e45dc 100644 --- a/frontend/src/views/chart/chart/common/common_antv.js +++ b/frontend/src/views/chart/chart/common/common_antv.js @@ -112,7 +112,13 @@ export function getLabel(chart) { if (l.show) { if (chart.type === 'pie') { label = { - type: l.position + type: l.position, + autoRotate: false + } + } else if (chart.type.includes('line')) { + label = { + position: l.position, + offsetY: -8 } } else { label = { From 2239a2031ce8cbd87a38886d30fd7d6f759155e2 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 2 Mar 2022 16:04:31 +0800 Subject: [PATCH 3/5] =?UTF-8?q?refactor:=20=E6=B8=85=E7=90=86=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V32__1.8.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/main/resources/db/migration/V32__1.8.sql b/backend/src/main/resources/db/migration/V32__1.8.sql index 47226bade3..16f86ca68b 100644 --- a/backend/src/main/resources/db/migration/V32__1.8.sql +++ b/backend/src/main/resources/db/migration/V32__1.8.sql @@ -448,3 +448,9 @@ RETURN oTemp; END ;; delimiter ; + +delete from chart_view where id in ( +'ce33ad2c-3915-41cc-8d86-55405456ed05', +'d73eda10-68c9-40e2-b03a-a7cbe3e5b365', +'de923e69-df6b-4f61-9391-da2987f77b51' +); From 0df2cbf432f3e183adf7be1781defcca34b78eab Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 2 Mar 2022 17:07:16 +0800 Subject: [PATCH 4/5] =?UTF-8?q?refactor:=20=E6=B8=85=E7=90=86=E5=AE=98?= =?UTF-8?q?=E6=96=B9=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=9C=AA=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V32__1.8.sql | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/src/main/resources/db/migration/V32__1.8.sql b/backend/src/main/resources/db/migration/V32__1.8.sql index 16f86ca68b..01201ca456 100644 --- a/backend/src/main/resources/db/migration/V32__1.8.sql +++ b/backend/src/main/resources/db/migration/V32__1.8.sql @@ -244,7 +244,15 @@ delete from panel_view where id in ( '805b0bdb-8e0a-11ec-8e4b-0242ac130002', '805b0cc1-8e0a-11ec-8e4b-0242ac130002', '805b0cf8-8e0a-11ec-8e4b-0242ac130002', -'805b0d31-8e0a-11ec-8e4b-0242ac130002' +'805b0d31-8e0a-11ec-8e4b-0242ac130002', +'7583dc0d-058d-11ec-a2b0-0242ac130003', +'7583deb5-058d-11ec-a2b0-0242ac130003', +'7583df2c-058d-11ec-a2b0-0242ac130003', +'7583df74-058d-11ec-a2b0-0242ac130003', +'7583dfbe-058d-11ec-a2b0-0242ac130003', +'7583e00f-058d-11ec-a2b0-0242ac130003', +'7583e053-058d-11ec-a2b0-0242ac130003', +'7583e091-058d-11ec-a2b0-0242ac130003' ); INSERT INTO `panel_view` VALUES ('5dafcf9b-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', '84b444e1-0088-44f9-acdc-cc39018413bc', NULL, NULL, NULL, NULL, NULL), ('5dafd1d1-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'c68db172-2df2-4aa2-aad6-077cf1684e14', NULL, NULL, NULL, NULL, NULL), ('5dafd224-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'f8d62b2b-b99a-4b6c-8378-d7c2ec4ea766', NULL, NULL, NULL, NULL, NULL), ('5dafd26e-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'c4943403-4960-4ad8-a9c5-12c46c538c34', NULL, NULL, NULL, NULL, NULL), ('5dafd2ac-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'f257452d-6fc1-4499-bdce-bd10b3e1c520', NULL, NULL, NULL, NULL, NULL), ('5dafd2f1-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', '8271c4e4-43ab-48c6-b7b4-67ccaba3f80b', NULL, NULL, NULL, NULL, NULL), ('5dafd32e-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'a0058881-b29f-4b5c-911f-7f1480b07eb0', NULL, NULL, NULL, NULL, NULL), ('5dafd363-8e0a-11ec-8e4b-0242ac130002', '117f679e-8355-4645-a692-47e2009cbc0d', 'c36cd358-0501-4f83-a323-f754485d00b1', NULL, NULL, NULL, NULL, NULL), ('6c200051-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '95f8e3a2-62a5-48a7-a719-fcf53746da8d', NULL, NULL, NULL, NULL, NULL), ('6c2002c2-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '8a26a936-89bf-45a8-b1ce-d5ef1719465d', NULL, NULL, NULL, NULL, NULL), ('6c20030f-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '8d1c3f30-0639-452e-9883-164f37353324', NULL, NULL, NULL, NULL, NULL), ('6c2003ca-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '175b25df-1939-4582-a9c5-d9e8ed3ea2b1', NULL, NULL, NULL, NULL, NULL), ('6c20040d-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', 'c3da496f-073c-413a-bebd-e7f1a4a00ba7', NULL, NULL, NULL, NULL, NULL), ('6c200442-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', 'da18eecd-feff-4140-a291-cce4abf1afaa', NULL, NULL, NULL, NULL, NULL), ('6c200478-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '3f201733-bbb3-485e-a1d6-0fe4f00b5304', NULL, NULL, NULL, NULL, NULL), ('6c2004a9-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '692d5bdc-aa70-4fce-b830-b8d6620539c6', NULL, NULL, NULL, NULL, NULL), ('6c2004e4-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', 'aff5be0c-f195-4fce-bd2b-b8d0e63764de', NULL, NULL, NULL, NULL, NULL), ('6c200530-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', 'cb66836d-a34c-40c6-87e7-0db0375ec19e', NULL, NULL, NULL, NULL, NULL), ('6c200568-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '1d06e2a0-d936-4192-b523-2eb1e8cebd51', NULL, NULL, NULL, NULL, NULL), ('6c200598-8e0a-11ec-8e4b-0242ac130002', 'c8d4c4b4-2293-417f-b76d-3632cc217bb1', '0de1d446-8300-4ab3-a4ef-4e8f8579cb2e', NULL, NULL, NULL, NULL, NULL), ('7611e439-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', 'ebac2821-d1a0-4f26-b5d9-cd5c60ac75ab', NULL, NULL, NULL, NULL, NULL), ('7611e678-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '5ad64afc-132c-40ea-8f69-2f8bfe6b31d4', NULL, NULL, NULL, NULL, NULL), ('7611e6c4-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '4242cbb0-fca4-4b27-b2a7-ca576a18815e', NULL, NULL, NULL, NULL, NULL), ('7611e700-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', 'c52b6d95-b404-4130-8635-5903cb8d0e84', NULL, NULL, NULL, NULL, NULL), ('7611e7d0-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '2e6f8b45-116d-46c4-a287-f3054e798556', NULL, NULL, NULL, NULL, NULL), ('7611e80a-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '504c0abd-7d31-4771-8ef9-a3494c7bb33c', NULL, NULL, NULL, NULL, NULL), ('7611e844-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '02136575-effb-4a0c-b5be-9886d20259b3', NULL, NULL, NULL, NULL, NULL), ('7611e87d-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '8412d80d-1830-4128-bc6a-019cf32afc7f', NULL, NULL, NULL, NULL, NULL), ('7611e8b5-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '0f9cd623-f319-4bb5-9751-7478abee3bd2', NULL, NULL, NULL, NULL, NULL), ('7611e8ed-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', 'a1d7bfef-f20c-4739-bfe4-cc55ed0b3fc8', NULL, NULL, NULL, NULL, NULL), ('7611e923-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '68fc74f2-1790-427a-ac22-49fb20edbe9a', NULL, NULL, NULL, NULL, NULL), ('7611e957-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '97400660-27a5-4502-a7cd-274190953a6c', NULL, NULL, NULL, NULL, NULL), ('7611e98f-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '07ece816-f983-493e-b25d-7bfb467d787d', NULL, NULL, NULL, NULL, NULL), ('7611e9c9-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', 'c124c0f3-3f1f-4635-bac7-f3e1f5503099', NULL, NULL, NULL, NULL, NULL), ('7611ea05-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '984059ca-3f9d-4ee4-9616-e409dd11991e', NULL, NULL, NULL, NULL, NULL), ('7611ea46-8e0a-11ec-8e4b-0242ac130002', 'd2bda4c3-3c25-40c6-bed3-994ffe2949df', '2de7c3d3-e642-4509-aff1-b2520ebfe85e', NULL, NULL, NULL, NULL, NULL), ('805b082d-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '3a5e4081-4cd5-427f-bd3a-ff7815efaf25', NULL, NULL, NULL, NULL, NULL), ('805b0a85-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '57760693-15db-4de9-9170-55ee7d1eb0eb', NULL, NULL, NULL, NULL, NULL), ('805b0abb-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '0d8bc9d7-b76b-4ec5-96e7-0df1c3426205', NULL, NULL, NULL, NULL, NULL), ('805b0ae0-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '03410ec1-1bd0-4afd-ac37-9306e00e328c', NULL, NULL, NULL, NULL, NULL), ('805b0b0f-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', 'eaa8947b-d9e7-4ca4-ba65-08965dfa620c', NULL, NULL, NULL, NULL, NULL), ('805b0b2d-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '93a58625-3730-4a07-99bd-75f174ff428d', NULL, NULL, NULL, NULL, NULL), ('805b0bdb-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '2f9bf4d5-b1d3-4cac-9df2-2c8827d65bbf', NULL, NULL, NULL, NULL, NULL), ('805b0cc1-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '1aad98e5-3f99-4c0a-aa75-ca9236de0f09', NULL, NULL, NULL, NULL, NULL), ('805b0cf8-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '5f694f25-b0fd-45f6-acbd-9dd338e196ce', NULL, NULL, NULL, NULL, NULL), ('805b0d31-8e0a-11ec-8e4b-0242ac130002', 'ceb6cd6c-531e-4a23-a467-caa5ef7218cc', '9ecb6827-f47f-4b19-b788-81a6b55940af', NULL, NULL, NULL, NULL, NULL); From 0aea242d957765f257b98eb01b8856eaff3e159d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Mar 2022 17:15:17 +0800 Subject: [PATCH 5/5] =?UTF-8?q?style:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E8=87=AA=E9=80=82=E5=BA=94=E5=B1=8F?= =?UTF-8?q?=E5=B9=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/src/pages/tabBar/home/detail.nvue | 145 ++++++++++------------- 1 file changed, 64 insertions(+), 81 deletions(-) diff --git a/mobile/src/pages/tabBar/home/detail.nvue b/mobile/src/pages/tabBar/home/detail.nvue index 0f15cac181..63dcb2813e 100644 --- a/mobile/src/pages/tabBar/home/detail.nvue +++ b/mobile/src/pages/tabBar/home/detail.nvue @@ -21,13 +21,21 @@ - - - - + + + + + + + + @@ -73,16 +81,15 @@ title: '', banner: {}, htmlNodes: [], - webViewStyles: { - - progress: { - color: '#FF3333' - }, - height: '700px' - }, + url: '', hasStar: false, - refreshCount: 0 + refreshCount: 0, + scrollTop: 0, + old: { + scrollTop: 0 + }, + viewHeight: null } }, onLoad(event) { @@ -101,12 +108,12 @@ uni.setNavigationBarTitle({ title: this.banner.title }); - // this.getDetail(); this.addRecent() uni.$emit('loadHomeIndex', { index: 1 }) this.loadStarStatus() + this.caclViewHeight() }, @@ -118,68 +125,10 @@ uni.navigateBack() }, - onShareAppMessage() { - return { - title: this.banner.title, - path: DETAIL_PAGE_PATH + '?detailDate=' + JSON.stringify(this.banner) - } - }, - onNavigationBarButtonTap(event) { - const buttonIndex = event.index; - if (buttonIndex === 0) { - // 分享 H5 的页面 - const shareProviders = []; - uni.getProvider({ - service: 'share', - success: (result) => { - // 目前仅考虑分享到微信 - if (result.provider && result.provider.length && ~result.provider.indexOf('weixin')) { - const channels = _handleShareChannels(result.provider); - uni.showActionSheet({ - itemList: channels.map(channel => { - return channel.text; - }), - success: (result) => { - const tapIndex = result.tapIndex; - uni.share({ - provider: 'weixin', - type: 0, - title: this.banner.title, - scene: tapIndex === 0 ? 'WXSceneSession' : 'WXSenceTimeline', - href: 'https://uniapp.dcloud.io/h5' + DETAIL_PAGE_PATH + '?detailDate=' + JSON.stringify(this.banner), - imageUrl: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b6304f00-5168-11eb-bd01-97bc1429a9ff.png' - }); - } - }); - } else { - uni.showToast({ - title: '未检测到可用的微信分享服务' - }); - } - }, - fail: (error) => { - uni.showToast({ - title: '获取分享服务失败' - }); - } - }); - } - }, + + methods: { - getDetail() { - uni.request({ - url: 'https://unidemo.dcloud.net.cn/api/news/36kr/' + this.banner.post_id, - success: (data) => { - if (data.statusCode == 200) { - var htmlString = data.data.content.replace(/\\/g, "").replace(/ { - console.log('fail'); - } - }); - }, + addRecent() { const item = {id: this.banner.id, title: this.banner.title, index: this.banner.index} addRecent(item) @@ -215,18 +164,32 @@ }) }, loadLinkUrl() { + + this.url = process.env.VUE_APP_BASE_API + 'tempMobileLink/' + this.banner.id + "/" + getToken() const url = this.url + /* uni.hideLoading() */ setTimeout(() => { const iframe = document.getElementsByTagName("iframe")[0] - + // iframe.style.height = (ktxScreentHeight - ktxStatusHeight) + 'px' iframe.src = url - iframe.onload = e => { - uni.hideLoading() + iframe.onload = e => { + uni.hideLoading() } }, 1000); }, + caclViewHeight() { + let systemInfo = uni.getSystemInfoSync() + let pxToRpxScale = 750 / systemInfo.windowWidth; + // 屏幕的高度 + let ktxScreentHeight = systemInfo.screenHeight * pxToRpxScale + // 状态栏的高度 + let ktxStatusHeight = systemInfo.statusBarHeight * pxToRpxScale + // 导航栏的高度 + let navigationHeight = 44 * pxToRpxScale + this.viewHeight = (ktxScreentHeight - ktxStatusHeight) + 'px' + }, back() { // #ifdef H5 let canBack = true @@ -245,7 +208,27 @@ return // #endif uni.navigateBack(1) - } + }, + upper: function(e) { + console.log(e) + }, + lower: function(e) { + console.log(e) + }, + scroll: function(e) { + console.log(e) + this.old.scrollTop = e.detail.scrollTop + }, + goTop: function(e) { + this.scrollTop = this.old.scrollTop + this.$nextTick(() => { + this.scrollTop = 0 + }); + uni.showToast({ + icon:"none", + title:"纵向滚动 scrollTop 值已被修改为 0" + }) + } } }