From 36c9b3f581fc6ebb19117c402d99c05a39a39652 Mon Sep 17 00:00:00 2001 From: jyt <1592211625@qq.com> Date: Mon, 13 Jun 2022 18:37:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/util/theme.color.js | 22 ++ src/views/Equipment/equipmentDetailList.vue | 109 +----- src/views/Statistics/BuildingContrast.vue | 290 +++++++++------ src/views/Statistics/ConsultantBrand.vue | 106 ++++-- src/views/Statistics/MentoringAbility.vue | 92 ++--- src/views/Statistics/ReceptionOverview.vue | 380 ++++++++++++++------ src/views/Statistics/TheTeamCompared.vue | 104 ++++-- src/views/Statistics/TrendAnalysis.vue | 112 +----- src/views/Statistics/dataScreeAge.vue | 21 ++ src/views/Statistics/dataScreeOrg.vue | 47 ++- src/views/Statistics/dataScreeSys.vue | 23 +- src/views/Statistics/houseDataSys.vue | 13 +- src/views/Statistics/index.vue | 30 +- src/views/Statistics/trend.vue | 13 +- src/views/houseData/analyse.vue | 60 +++- vue.config.js | 4 +- 16 files changed, 857 insertions(+), 569 deletions(-) create mode 100644 src/util/theme.color.js diff --git a/src/util/theme.color.js b/src/util/theme.color.js new file mode 100644 index 0000000..0f1cf81 --- /dev/null +++ b/src/util/theme.color.js @@ -0,0 +1,22 @@ +let colorArr = [ + "#5B8FF9", + "#E6625B", + "#FF981E", + "#F6BD16", + "#07B79D", + "#9B6BDF", + "#FF99C3", + "#1E9493", + "#BA3FB7", + "#54BEF3", + "#3C21F7", + "#F87148", + "#3EB171" +] +let colorTemp = Math.floor(Math.random() * colorArr.length + 1) - 1 + +let a = { + randomColor:colorArr[colorTemp], + colorArr +} +export default a; \ No newline at end of file diff --git a/src/views/Equipment/equipmentDetailList.vue b/src/views/Equipment/equipmentDetailList.vue index ea7d530..4b6dd52 100644 --- a/src/views/Equipment/equipmentDetailList.vue +++ b/src/views/Equipment/equipmentDetailList.vue @@ -548,6 +548,7 @@ import * as echarts from "echarts"; import { mapGetters } from "vuex"; import { exportMethodPost } from "@/util/util"; +import colorTheme from "@/util/theme.color" export default { data() { return { @@ -1187,29 +1188,7 @@ export default { var option; option = { - color: [ - "#66AFF5", - "#FABD2B", - "#6F8EDC", - "#FFCF8F", - "#F98120", - "#1CC99E", - "#9474FB", - "#657292", - "#7A6A99", - "#BF5D52", - "#EE6666", - "#77B7E4", - "#E6A065", - "#9D5139", - "#C1AA88", - "#F87F7A", - "#F6CF74", - "#7F5506", - "#88BB9B", - "#6E99AA", - "#5789D0", - ], + color: colorTheme.colorArr, tooltip: { trigger: "axis", }, @@ -1298,35 +1277,13 @@ export default { var myChart = echarts.init(chartDom); var option; option = { - color: [ - "#66AFF5", - "#FABD2B", - "#6F8EDC", - "#FFCF8F", - "#F98120", - "#1CC99E", - "#9474FB", - "#657292", - "#7A6A99", - "#BF5D52", - "#EE6666", - "#77B7E4", - "#E6A065", - "#9D5139", - "#C1AA88", - "#F87F7A", - "#F6CF74", - "#7F5506", - "#88BB9B", - "#6E99AA", - "#5789D0", - ], + color: colorTheme.colorArr[0], tooltip: { trigger: "axis", }, legend: { data: [str1], - bottom: "10", + top: "10", }, grid: { left: 10, @@ -1382,6 +1339,16 @@ export default { data: arr1, type: "line", smooth: true, + areaStyle: { + color: new echarts.graphic.LinearGradient( + 0, 0, 0, 1, + [ + { offset: 0, color: colorTheme.colorArr[0] }, + { offset: 1, color: "#fff" } + ] + ), + opacity: 0.1 + } }, ], }; @@ -1479,29 +1446,7 @@ export default { var myChart = echarts.init(document.getElementById("mane")); var myChart1 = echarts.init(document.getElementById("mane2")); var option = { - color: [ - "#66AFF5", - "#FABD2B", - "#6F8EDC", - "#FFCF8F", - "#F98120", - "#1CC99E", - "#9474FB", - "#657292", - "#7A6A99", - "#BF5D52", - "#EE6666", - "#77B7E4", - "#E6A065", - "#9D5139", - "#C1AA88", - "#F87F7A", - "#F6CF74", - "#7F5506", - "#88BB9B", - "#6E99AA", - "#5789D0", - ], + color: colorTheme.colorArr, tooltip: { trigger: "item", }, @@ -1520,29 +1465,7 @@ export default { ], }; var option1 = { - color: [ - "#66AFF5", - "#FABD2B", - "#6F8EDC", - "#FFCF8F", - "#F98120", - "#1CC99E", - "#9474FB", - "#657292", - "#7A6A99", - "#BF5D52", - "#EE6666", - "#77B7E4", - "#E6A065", - "#9D5139", - "#C1AA88", - "#F87F7A", - "#F6CF74", - "#7F5506", - "#88BB9B", - "#6E99AA", - "#5789D0", - ], + color: colorTheme.colorArr, tooltip: { trigger: "item", }, diff --git a/src/views/Statistics/BuildingContrast.vue b/src/views/Statistics/BuildingContrast.vue index 18a23e3..cd1a0f1 100644 --- a/src/views/Statistics/BuildingContrast.vue +++ b/src/views/Statistics/BuildingContrast.vue @@ -15,17 +15,9 @@