Browse Source

修改样式

main
不爱学习的石同学 11 months ago
parent
commit
474e49046d
  1. 2
      src/components/datav/chart-bar.vue
  2. 1098
      src/views/data/Mail12337.vue
  3. 18
      src/views/datav/CaseVerif.vue
  4. 16
      src/views/datav/Gobal.vue
  5. 2
      src/views/datav/Lmgz.vue
  6. 22
      src/views/datav/MailVisits.vue
  7. 23
      src/views/datav/SceneInsp.vue
  8. 19
      src/views/datav/VideoInsp.vue
  9. 16
      src/views/datav/subonedatav/SubOneCaseVerif.vue
  10. 16
      src/views/datav/subonedatav/SubOneGlobal.vue
  11. 20
      src/views/datav/subonedatav/SubOneMailVisits.vue
  12. 20
      src/views/datav/subonedatav/SubOneSceneInsp.vue
  13. 18
      src/views/datav/subonedatav/SubOneVideoInsp.vue

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

@ -105,6 +105,7 @@ function getColor(val) {
if (props.color instanceof String) {
return props.color;
}
console.log(val)
if (props.color instanceof Array) {
const colors = [...props.color];
// percentage
@ -116,7 +117,6 @@ function getColor(val) {
}
}
return "linear-gradient(270deg, #63e700 0%, #19674c 100%)";
}
</script>
<style lang="scss" scoped>

1098
src/views/data/Mail12337.vue

File diff suppressed because it is too large Load Diff

18
src/views/datav/CaseVerif.vue

@ -222,11 +222,7 @@ const colors = [
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
},
}
];
// region
@ -575,15 +571,15 @@ const getCaseVerificationMapData = async (timeValue) => {
value: item.total,
};
});
const maxItem = mappedData.reduce((max, item) => (Number(item.value) > Number(max.value) ? item : max), mappedData[0]);
const range60Percent = maxItem.value * 0.6 //
const range80Percent = maxItem.value * 0.8 //
globalTempMapVoList.value = mappedData
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0);
const avg = total / mappedData.length; //
const range30Percent = avg * 0.3 //
option.value.series[0].data = mappedData;
option.value.visualMap.pieces = [
{gte: 0, lte: avg - range30Percent, label: "低于平均问题30%", color: "#4987F6"},
{gte: avg - range30Percent, lte: avg + range30Percent + 0.1, label: "平均问题上下浮动30%内", color: "#F6A149"},
{gte: avg + range30Percent, label: "高于平均问题30%", color: "#D34343"},
{gte: 0, lte: range60Percent, label: "低于最大问题的60%", color: "#4987F6"},
{gte: range60Percent, lte: range80Percent, label: "介于最大问题的60%~80%", color: "#F6A149"},
{gte: range80Percent, label: "高于最大问题80%", color: "#D34343"},
];
}
const getCaseVerificationTrendData = async (year) => {

16
src/views/datav/Gobal.vue

@ -197,11 +197,7 @@ const colors = [
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
},
}
];
const activeOrgTab = ref("1");
@ -416,6 +412,8 @@ const proTrend = ref({
const getOrganizationRankData = async (timeValue = time.value) => {
const res = await getOrganizationRank(timeValue);
fxsjlist.value = res.fxsjlist;
// 5, 3, 2, 1
// console.log(fxsjlist.value);
jsdwlist.value = res.jsdwlist;
}
const getBusinessRateData = async (timeValue = time.value) => {
@ -474,16 +472,14 @@ const getGlobalMapData = async (timeValue = time.value) => {
});
//
const maxItem = mappedData.reduce((max, item) => (Number(item.value) > Number(max.value) ? item : max), mappedData[0]);
const range40Percent = maxItem.value * 0.4 //
const range60Percent = maxItem.value * 0.6 //
const range80Percent = maxItem.value * 0.8 //
globalTempMapVoList.value = mappedData;
option.value.series[0].data = globalTempMapVoList;
console.log(range40Percent, range60Percent, range80Percent);
option.value.visualMap.pieces = [
{gte: 0, lte: range40Percent, label: "低于最大问题的40%", color: "#4987F6"},
{gte: range40Percent, lte: range60Percent, label: "平均问题上下浮动30%内", color: "#F6A149"},
{gte: range80Percent, label: "高于平均问题30%", color: "#D34343"},
{gte: 0, lte: range60Percent, label: "低于最大问题的60%", color: "#4987F6"},
{gte: range60Percent, lte: range80Percent, label: "介于最大问题的60%~80%", color: "#F6A149"},
{gte: range80Percent, label: "高于最大问题80%", color: "#D34343"},
];
}
const getGlobalTrendData = async (year = selectedYear.value) => {

2
src/views/datav/Lmgz.vue

@ -347,7 +347,7 @@ let orgRateList = ref([])
let orgCarRateList = ref([])
const time = ref([
moment().startOf("year").format("YYYY-MM-DD"),
moment().subtract(1, "year").format("YYYY-MM-DD"),
moment().format("YYYY-MM-DD"),
]);

22
src/views/datav/MailVisits.vue

@ -71,6 +71,7 @@
:data="fxsjLeaderViewMailList"
:max="11"
size="large"
:color="leaderViewColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -104,6 +105,7 @@
:data="bwzdLeaderViewMailList"
:max="11"
size="large"
:color="leaderViewColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -256,7 +258,7 @@
:data="fxsjLeaderReviewMailList"
size="large"
:max="11"
:color="colors"
:color="leaderViewColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -291,6 +293,7 @@
<datav-chart-bar
:data="bwzdLeaderReviewMailList"
size="large"
:color="leaderViewColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -422,6 +425,21 @@ const colors = [
percentage: 40,
},
];
const leaderViewColors = [
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 80,
},
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #FB002D 0%, #822232 100%)",
percentage: 0,
},
];
//endregion
// region
@ -699,7 +717,7 @@ const option = ref({
borderColor: "#FF0000", //
borderWidth: 4 //
},
data:[]
data: []
}
],
})

23
src/views/datav/SceneInsp.vue

@ -62,6 +62,7 @@
title="整改率排名"
sub-title="已整改/问题数"
unit="%"
:color="dayTimeColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -115,6 +116,7 @@
title="整改率排名"
sub-title="已整改/问题数"
unit="%"
:color="dayTimeColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -938,9 +940,28 @@ const colors = [
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
percentage: 0,
},
];
const dayTimeColors = [
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 80,
},
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 75,
},
{
color: "linear-gradient( 270deg, #FB002D 0%, #822232 100%)",
percentage: 0,
},
];
// endregion
// region

19
src/views/datav/VideoInsp.vue

@ -243,11 +243,7 @@ const colors = [
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
},
}
];
const videoUrl = 'webrtc://47.121.143.167/live/livestream';
// endregion
@ -478,15 +474,16 @@ const getVideoSuperviseMapData = async (timeValue) => {
value: item.discoverProblem,
};
});
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0);
const avg = total / mappedData.length; //
const range30Percent = avg * 0.3 //
//
const maxItem = mappedData.reduce((max, item) => (Number(item.value) > Number(max.value) ? item : max), mappedData[0]);
const range60Percent = maxItem.value * 0.6 //
const range80Percent = maxItem.value * 0.8 //
mapIconList.value = mappedData
option.value.series[0].data = mapIconList
option.value.visualMap.pieces = [
{gte: 0, lte: avg - range30Percent, label: "低于平均问题30%", color: "#4987F6"},
{gte: avg - range30Percent, lte: avg + range30Percent + 0.1, label: "平均问题上下浮动30%内", color: "#F6A149"},
{gte: avg + range30Percent, label: "高于平均问题30%", color: "#D34343"},
{gte: 0, lte: range60Percent, label: "低于最大问题的60%", color: "#4987F6"},
{gte: range60Percent, lte: range80Percent, label: "介于最大问题的60%~80%", color: "#F6A149"},
{gte: range80Percent, label: "高于最大问题80%", color: "#D34343"},
];
}
const getVideoSuperviseTrendData = async (year) => {

16
src/views/datav/subonedatav/SubOneCaseVerif.vue

@ -213,10 +213,6 @@ const colors = [
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
},
];
// endregion
@ -518,14 +514,14 @@ const getMapIcon = async(departId, timeValue)=> {
};
});
gobalTempMapVoList.value = mappedData
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0);
const avg = total / mappedData.length; //
const range30Percent = avg*0.3 //
const maxItem = mappedData.reduce((max, item) => (Number(item.value) > Number(max.value) ? item : max), mappedData[0]);
const range60Percent = maxItem.value * 0.6 //
const range80Percent = maxItem.value * 0.8 //
option.value.series[0].data = mappedData;
option.value.visualMap.pieces = [
{gte: 0, lte: avg - range30Percent, label: "低于平均问题30%", color: "#4987F6"},
{gte: avg - range30Percent, lte: avg + range30Percent+0.1, label: "平均问题上下浮动30%内", color: "#F6A149"},
{gte: avg + range30Percent, label: "高于平均问题30%", color: "#D34343"},
{gte: 0, lte: range60Percent, label: "低于最大问题的60%", color: "#4987F6"},
{gte: range60Percent, lte: range80Percent, label: "介于最大问题的60%~80%", color: "#F6A149"},
{gte: range80Percent, label: "高于最大问题80%", color: "#D34343"},
];
}
const getProTrendList= async(departId, year) => {

16
src/views/datav/subonedatav/SubOneGlobal.vue

@ -10,7 +10,7 @@
v-model="activeOrgTab"
type="bottom-button"
>
<datav-tab-item label="分县市局" name="1">
<datav-tab-item label="派出所" name="1">
<el-scrollbar height="340px">
<datav-chart-bar
:data="fxsjlist"
@ -20,7 +20,7 @@
/>
</el-scrollbar>
</datav-tab-item>
<datav-tab-item label="局属单位" name="2">
<datav-tab-item label="大队" name="2">
<el-scrollbar height="340px">
<datav-chart-bar
:data="jsdwlist"
@ -428,15 +428,15 @@ const getSubOneGlobalMapIcon = async (departId = currentDepartId, timeValue = ti
value: item.totalPro,
};
});
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0);
const avg = total / mappedData.length; //
const range30Percent = avg * 0.3 //
const maxItem = mappedData.reduce((max, item) => (Number(item.value) > Number(max.value) ? item : max), mappedData[0]);
const range60Percent = maxItem.value * 0.6 //
const range80Percent = maxItem.value * 0.8 //
globalTempMapVoList.value = mappedData;
option.value.series[0].data = globalTempMapVoList;
option.value.visualMap.pieces = [
{gte: 0, lte: avg - range30Percent, label: "低于平均问题30%", color: "#4987F6"},
{gte: avg - range30Percent, lte: avg + range30Percent + 0.1, label: "平均问题上下浮动30%内", color: "#F6A149"},
{gte: avg + range30Percent, label: "高于平均问题30%", color: "#D34343"},
{gte: 0, lte: range60Percent, label: "低于最大问题的60%", color: "#4987F6"},
{gte: range60Percent, lte: range80Percent, label: "介于最大问题的60%~80%", color: "#F6A149"},
{gte: range80Percent, label: "高于最大问题80%", color: "#D34343"},
];
}
const getSubOneGlobalTrendData = async (departId = currentDepartId, year) => {

20
src/views/datav/subonedatav/SubOneMailVisits.vue

@ -74,6 +74,7 @@
:max="11"
size="large"
label-width="110"
:color="leaderViewColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -110,6 +111,7 @@
:max="11"
size="large"
label-width="110"
:color="leaderViewColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -262,7 +264,7 @@
:data="fxsjLeaderReviewMailList"
size="large"
:max="11"
:color="colors"
:color="leaderViewColors"
label-width="110"
/>
</el-scrollbar>
@ -301,6 +303,7 @@
:data="bwzdLeaderReviewMailList"
size="large"
label-width="110"
:color="leaderViewColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -442,6 +445,21 @@ const colors = [
},
];
const leaderViewColors = [
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 80,
},
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #FB002D 0%, #822232 100%)",
percentage: 0,
},
];
//endregion
// region

20
src/views/datav/subonedatav/SubOneSceneInsp.vue

@ -63,6 +63,7 @@
sub-title="已整改/问题数"
unit="%"
:label-width="110"
:color="dayTimeColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -117,6 +118,7 @@
sub-title="已整改/问题数"
unit="%"
:label-width="110"
:color="dayTimeColors"
/>
</el-scrollbar>
</datav-tab-item>
@ -938,7 +940,23 @@ const colors = [
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
percentage: 0,
},
];
const dayTimeColors = [
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 80,
},
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 75,
},
{
color: "linear-gradient( 270deg, #FB002D 0%, #822232 100%)",
percentage: 0,
},
];

18
src/views/datav/subonedatav/SubOneVideoInsp.vue

@ -242,10 +242,6 @@ const colors = [
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
},
];
// endregion
@ -433,23 +429,21 @@ const getSubOneAllVideoSuperviseCountData = async (departId, timeValue) => {
const getSubOneVideoSuperviseMapData = async (departId, timeValue) => {
const res = await getSubOneVideoSuperviseMap(departId, timeValue);
console.log(res.videoSuperviseMapIconVoList)
console.log("地图数据来了");
const mappedData = res.videoSuperviseMapIconVoList.map(item => {
return {
...item,
value: item.discoverProblem,
};
});
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0);
const avg = total / mappedData.length; //
const range30Percent = avg * 0.3 //
const maxItem = mappedData.reduce((max, item) => (Number(item.value) > Number(max.value) ? item : max), mappedData[0]);
const range60Percent = maxItem.value * 0.6 //
const range80Percent = maxItem.value * 0.8 //
mapIconList.value = mappedData
option.value.series[0].data = mapIconList
option.value.visualMap.pieces = [
{gte: 0, lte: avg - range30Percent, label: "低于平均问题30%", color: "#4987F6"},
{gte: avg - range30Percent, lte: avg + range30Percent + 0.1, label: "平均问题上下浮动30%内", color: "#F6A149"},
{gte: avg + range30Percent, label: "高于平均问题30%", color: "#D34343"},
{gte: 0, lte: range60Percent, label: "低于最大问题的60%", color: "#4987F6"},
{gte: range60Percent, lte: range80Percent, label: "介于最大问题的60%~80%", color: "#F6A149"},
{gte: range80Percent, label: "高于最大问题80%", color: "#D34343"},
];
}

Loading…
Cancel
Save