From d547e6ef21c2ca6f4f0db5da86600d06e9504d4d Mon Sep 17 00:00:00 2001 From: loveflow <5269966+loveflow@user.noreply.gitee.com> Date: Sun, 10 Mar 2024 22:30:17 +0800 Subject: [PATCH] update --- src/loveflow/components/data/table.vue | 13 +++++- src/loveflow/components/echart/bar/five.vue | 26 ++++++++--- src/loveflow/components/echart/chart.vue | 4 +- .../components/echart/pie/dpieOne.vue | 44 ++++++++++++++----- src/loveflow/components/echart/pie/six.vue | 22 ++++++---- .../enterpriseTopic/components/dPieOne.vue | 38 +++++++++++----- .../enterpriseTopic/components/dPieTwo.vue | 3 +- .../enterpriseTopic/components/pTotal.vue | 2 +- .../enterpriseTopic/components/pieFive.vue | 3 +- .../enterpriseTopic/components/pieFour.vue | 23 ++++++++-- .../enterpriseTopic/components/pieTwo.vue | 2 +- .../enterpriseTopic/personSafety/index.vue | 20 +++------ .../personSafety/keyPerson.vue | 18 ++++++++ .../enterpriseTopic/personSafety/screen.vue | 7 +-- src/views/enterpriseTopic/screen.vue | 35 +++++++++------ 15 files changed, 184 insertions(+), 76 deletions(-) diff --git a/src/loveflow/components/data/table.vue b/src/loveflow/components/data/table.vue index 9060f7e..4b79df4 100644 --- a/src/loveflow/components/data/table.vue +++ b/src/loveflow/components/data/table.vue @@ -7,6 +7,7 @@ :rowKey="rowKey ? rowKey : ''" @selection-change="selectionChange" v-bind="$attrs" + style="width: 100%" > -
+
@@ -16,6 +16,7 @@ export default { data() { return { option: {}, + fontSize: 10, }; }, mounted() { @@ -23,6 +24,17 @@ export default { }, methods: { setOption() { + let temp = this.getHeight(); + let height = parseInt(temp / 4); + console.log(height); + if (height > 40) { + this.fontSize = 12; + } + + if (this.fontSize > 60) { + this.fontSize = 14; + } + let dataList = this.chartObj.data; let maxArr = []; let maxValue = 0; @@ -71,7 +83,7 @@ export default { textStyle: { verticalAlign: "bottom", color: "#299CD4", - fontSize: 14, + fontSize: this.fontSize + 2, fontFamily: "Microsoft YaHei", align: "left", padding: [0, 0, 5, 7], @@ -93,12 +105,12 @@ export default { value: { padding: [4, 0, 0, 4], color: "#9CE0FF", - fontSize: 16, + fontSize: this.fontSize + 4, }, rate: { align: "right", color: "rgba(255,255,255,0.9)", - fontSize: 12, + fontSize: this.fontSize, }, }, }, @@ -169,7 +181,7 @@ export default { rich: { a: { color: "#9CE0FF", - fontSize: 16, + fontSize: this.fontSize + 4, align: "right", }, }, @@ -201,6 +213,10 @@ export default { ], }; }, + getHeight() { + let div = document.getElementById("dpieWrap"); + return div.clientHeight; + }, }, watch: { chartObj: { diff --git a/src/loveflow/components/echart/chart.vue b/src/loveflow/components/echart/chart.vue index 0fffc45..c6fb52f 100644 --- a/src/loveflow/components/echart/chart.vue +++ b/src/loveflow/components/echart/chart.vue @@ -21,7 +21,9 @@ export default { }, methods: { resize() { - this.dom.resize(); + console.log(11111); + console.log( this.dom); + this.dom && this.dom.resize(); }, }, mounted() { diff --git a/src/loveflow/components/echart/pie/dpieOne.vue b/src/loveflow/components/echart/pie/dpieOne.vue index d80089d..06fd19b 100644 --- a/src/loveflow/components/echart/pie/dpieOne.vue +++ b/src/loveflow/components/echart/pie/dpieOne.vue @@ -1,5 +1,5 @@