Browse Source

首页大屏前端数据对齐

main
parent
commit
abd7688abe
  1. 9
      src/components/datav/chart-bar.vue
  2. 15
      src/views/datav/Gobal.vue
  3. 13
      src/views/datav/SceneInsp.vue

9
src/components/datav/chart-bar.vue

@ -100,16 +100,13 @@ function getColor(val) {
const colors = [...props.color];
colors.sort((a, b) => b.percentage - a.percentage);
for (let i = 0; i < colors.length; i++) {
if (val > colors[0].percentage) {
return colors[0].color;
if (val > colors[i].percentage) {
return colors[i].color;
}
}
}
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%)";
}
</script>
<style lang="scss" scoped>

15
src/views/datav/Gobal.vue

@ -60,17 +60,17 @@
style="width: 16.66%"
/>
<datav-statistic
:value="overview.mailComplaintPro"
:value="overview.complaintPro"
title="信访投诉问题"
style="width: 16.66%;"
/>
<datav-statistic
:value="overview.policeValuationPro"
:value="overview.talkPro"
title="警务评议问题"
style="width: 16.66%"
/>
<datav-statistic
:value="overview.reviewPro"
:value="overview.auditPro"
title="审计监督问题"
style="width: 16.66%"
/>
@ -391,9 +391,9 @@ const overview = ref({
totalPro: 0,
supervisionPro: 0,
caseVerificationPro: 0,
mailComplaintPro: 0,
policeValuationPro: 0,
reviewPro: 0,
complaintPro: 0,
talkPro: 0,
auditPro: 0,
});
const time = ref([
moment().startOf("year").format("YYYY-MM-DD"),
@ -437,6 +437,9 @@ const colors = [
percentage: 40,
},
];
// endregion

13
src/views/datav/SceneInsp.vue

@ -53,6 +53,7 @@
<datav-tabs
type="bottom-button"
v-model="activeTabLeft"
>
<datav-tab-item label="分县市局" name="3">
<el-scrollbar height="350px">
@ -485,14 +486,14 @@ const option1 = ref({
const data1 = ref([
{
label: "开福分局",
value: 80,
value: 90,
unit: "%",
numerator: 16,
denominator: 17,
},
{
label: "芙蓉分局",
value: 80,
value: 90,
unit: "%",
numerator: 11,
denominator: 11,
@ -506,28 +507,28 @@ const data1 = ref([
},
{
label: "雨花分局",
value: 80,
value: 70,
unit: "%",
numerator: 9,
denominator: 9,
},
{
label: "望城分局",
value: 80,
value: 60,
unit: "%",
numerator: 4,
denominator: 4,
},
{
label: "浏阳市局",
value: 80,
value: 50,
unit: "%",
numerator: 3,
denominator: 3,
},
{
label: "长沙县局",
value: 80,
value: 40,
unit: "%",
numerator: 3,
denominator: 3,

Loading…
Cancel
Save