diff --git a/src/api/sensitivePerception/profileDepart.ts b/src/api/sensitivePerception/profileDepart.ts new file mode 100644 index 0000000..719ce94 --- /dev/null +++ b/src/api/sensitivePerception/profileDepart.ts @@ -0,0 +1,14 @@ +import request from "@/api/request"; + +export function listDepartNegative(query) { + return request.get({ + url: `/profile/depart`, + query + }); +} + +export function getDepartProfile(departId) { + return request.get({ + url: `/profile/depart/${departId}` + }); +} \ No newline at end of file diff --git a/src/components/datav/chart-bar.vue b/src/components/datav/chart-bar.vue index 98da7fe..a5e6145 100644 --- a/src/components/datav/chart-bar.vue +++ b/src/components/datav/chart-bar.vue @@ -6,7 +6,7 @@
{{ item.label }} @@ -84,14 +84,21 @@ function getColor(val) { if (props.color instanceof String) { return props.color; } - - if (val > 0.8) { - return "linear-gradient(270deg, #63e700 0%, #19674c 100%)"; - } - if (val >= 0.7) { - return "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)"; + if (props.color instanceof Array) { + const colors = [...props.color] + colors.reduce((a, b) => b.percentage - a.percentage) + console.log(colors) + for (let i = 0; i < colors.length; i++) { + if (val > colors[0].percentage) { + return colors[0].color; + } + } } - return "linear-gradient( 270deg, #FB002D 0%, #822232 100%)"; + return "linear-gradient(270deg, #63e700 0%, #19674c 100%)"; + // if (val >= 0.7) { + // return "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)"; + // } + // return "linear-gradient( 270deg, #FB002D 0%, #822232 100%)"; } \ No newline at end of file diff --git a/src/views/sensitivePerception/PoliceNegative.vue b/src/views/sensitivePerception/PoliceNegative.vue new file mode 100644 index 0000000..cabe848 --- /dev/null +++ b/src/views/sensitivePerception/PoliceNegative.vue @@ -0,0 +1,342 @@ + + + \ No newline at end of file