master
e 7 months ago
parent dd6c3f234c
commit 27b7e3baa4

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

@ -0,0 +1,155 @@
<template>
<div style="height: 100%; width: 100%" id="pieWrap">
<g-chart :echartdata="option"></g-chart>
</div>
</template>
<script>
export default {
props: {
chartObj: {
type: Object,
default: () => {
return {};
},
},
},
data() {
return {
option: {},
};
},
mounted() {
this.setOption();
},
methods: {
setOption() {
let point = this.chartObj.point; //
let total = this.chartObj.total;
this.option = {
tooltip: {
show: false,
},
title: {
//
show: true, //
subtext: point + "",
text: this.chartObj.name,
textStyle: { fontSize: 12, lineHeight: 12, color: "#D0DEEE" },
subtextStyle: {
fontSize: 18,
fontWeight: 500,
lineHeight: 10,
color: "#E3FEFF",
},
textAlign: "center",
left: "45%",
bottom: "10",
},
color: this.chartObj.color,
graphic: {
elements: [
{
type: "image",
style: {
image: this.chartObj.icon,
width: 160,
height: 160,
zIndex: 1,
},
left: "center",
top: 0,
},
],
},
series: [
{
// name: '访1',
type: "pie",
radius: [30, 40],
center: ["50%", "40%"],
data: [
{
value: 100, //100%
itemStyle: {
normal: {
borderRadius: 15,
color: "#1B2221",
},
},
},
],
label: {
show: true,
},
labelLine: {
show: false,
},
},
{
// name: '访2',
type: "pie",
showEmptyCircle: true, //
radius: [30, 40],
avoidLabelOverlap: true, //
center: ["50%", "40%"],
data: [
{
value: (point / total) * 100,
itemStyle: {
normal: {
borderRadius: 15, //
color: {
//
type: "linear",
colorStops: [
{
offset: 0,
color: this.chartObj.color[1], // 0%
},
{
offset: 1,
color: this.chartObj.color[2], // 100%
},
],
},
},
},
},
{
value: 120, //
itemStyle: {
normal: {
color: "rgba(255,255,255,0)", //
},
},
},
],
label: {
show: true,
position: "center",
},
labelLine: {
show: false,
},
},
],
};
},
getHeight() {
let div = document.getElementById("pieWrap");
return div.clientHeight;
},
},
watch: {
chartObj: {
handler(newval) {
this.setOption();
},
deep: true,
// immediate: true,
},
},
};
</script>

@ -0,0 +1,75 @@
<template>
<div class="digitWrap">
<div class="num" v-for="(item, index) in numArr" :key="index">
{{ item }}
</div>
</div>
</template>
<script>
export default {
props: {
num: {
type: [Number, String],
},
},
data() {
return {
numArr: [],
};
},
mounted() {
this.setNum();
},
methods: {
setNum() {
this.num = this.num + "";
this.numArr = [];
let length = this.num.length;
console.log(length);
console.log(this.num);
for (let i = 0; i < length; i++) {
this.numArr.push(this.num.charAt(i));
}
},
},
watch: {
num: {
handler(newval) {
this.setNum();
},
deep: true,
// immediate: true,
},
},
};
</script>
<style lang="scss" scoped>
@import "@/loveflow/assets/index.scss";
.digitWrap {
display: flex;
justify-content: space-evenly;
padding-top: vw(16);
padding-left: vw(20);
padding-right: vw(20);
width: vw(377);
height: vw(105);
background: url("~@/assets/images/topic/numb.png") no-repeat center center;
background-size: 100% 100%;
.num {
display: flex;
justify-content: center;
align-items: center;
width: vw(38);
height: vw(44);
background: url("~@/assets/images/topic/num.png") no-repeat center center;
background-size: 100% 100%;
font-family: AlimamaShuHeiTi, AlimamaShuHeiTi;
font-weight: bold;
font-size: vw(28);
color: #f3fff9;
letter-spacing: 1px;
text-shadow: 0px 0px 9px rgba(87, 238, 255, 0.88);
}
}
</style>

@ -8,12 +8,31 @@
<div class="screenIcon"></div> <div class="screenIcon"></div>
<div class="screenNameText">重点岗位异常数</div> <div class="screenNameText">重点岗位异常数</div>
</div> </div>
<div class="screenChart"></div> <div class="screenChart">
<div class="line">
<div class="item">
<pieSix :chartObj="tl1Obj"></pieSix>
</div>
<div class="item">
<pieSix :chartObj="tl2Obj"></pieSix>
</div>
</div>
<div class="line">
<div class="item">
<pieSix :chartObj="tl3Obj"></pieSix>
</div>
<div class="item">
<pieSix :chartObj="tl4Obj"></pieSix>
</div>
</div>
</div>
</div> </div>
<div class="screenCol screenMCol mr18"> <div class="screenCol screenMCol mr18">
<div class="totalWrap"> <div class="totalWrap">
<div class="totalTitle">流动人口总数</div> <div class="totalTitle">流动人口总数</div>
<div class="totalValue"></div> <div class="totalValue">
<pNum :num="total"></pNum>
</div>
</div> </div>
<div class="totalTypeWrap"> <div class="totalTypeWrap">
<div class="item"> <div class="item">
@ -75,10 +94,44 @@
import headWrap from "@/views/home/head.vue"; import headWrap from "@/views/home/head.vue";
import pCard from "../components/pCard.vue"; import pCard from "../components/pCard.vue";
import pTotal from "../components/pTotal.vue"; import pTotal from "../components/pTotal.vue";
import pNum from "../components/num.vue";
import pieSix from "@/loveflow/components/echart/pie/six.vue";
export default { export default {
components: { headWrap, pCard, pTotal }, components: { headWrap, pCard, pTotal, pNum, pieSix },
data() { data() {
return { return {
total: 53981 + "",
tl1Obj: {
name: "危险品领用人员",
total: 3400,
point: 1000,
icon: require("@/assets/images/topic/pie1b.png"),
color: ["#57F0FF", "#37A1CC", "#08FAC4"],
},
tl2Obj: {
name: "危险品领用人员",
total: 3400,
point: 1200,
icon: require("@/assets/images/topic/pie2b.png"),
color: ["#FFF7E3;", "#EB9104", "#FAC608"],
},
tl3Obj: {
name: "危险品领用人员",
total: 3400,
point: 1300,
icon: require("@/assets/images/topic/pie1b.png"),
color: ["#57F0FF", "#37A1CC", "#08FAC4"],
},
tl4Obj: {
name: "危险品领用人员",
total: 3400,
point: 900,
icon: require("@/assets/images/topic/pie4b.png"),
color: ["#FFE3E3", "#FF2C2C", "#FF6D6D"],
},
tmObj: { tmObj: {
l1: { l1: {
icon: require("@/assets/images/topic/l1.png"), icon: require("@/assets/images/topic/l1.png"),
@ -230,13 +283,24 @@ export default {
.safeManageWrap { .safeManageWrap {
flex: 1; flex: 1;
} }
.line {
display: flex;
flex: 1;
.item {
flex: 1;
}
}
} }
} }
.screenMCol { .screenMCol {
align-items: center; align-items: center;
.totalWrap { .totalWrap {
margin-top: vw(40);
display: flex;
flex-direction: column;
align-items: center;
.totalTitle { .totalTitle {
font-weight: 600; font-weight: 500;
font-size: vw(18); font-size: vw(18);
color: #ffffff; color: #ffffff;
} }
@ -244,7 +308,6 @@ export default {
} }
} }
.totalTypeWrap { .totalTypeWrap {
margin-top: vw(88);
width: vw(612); width: vw(612);
height: vw(54); height: vw(54);
display: flex; display: flex;

Loading…
Cancel
Save