Browse Source

修改bug 调整样式2

v1.1
战立标 2 years ago
parent
commit
720b905f15
  1. 12
      src/assets/scss/dataBoard/renfang/index.scss
  2. 39
      src/views/dataBoard/cpts/map/index.vue
  3. 14
      src/views/dataBoard/overview/components/MapDialog/List12345.vue
  4. 27
      src/views/dataBoard/overview/components/MapDialog/index.vue
  5. 2
      src/views/dataBoard/overview/components/MapResourceInfoMore.vue
  6. 2
      src/views/dataBoard/overview/components/wtqd.vue
  7. 53
      src/views/dataBoard/renfang/cpts/rkfx.vue
  8. 2
      src/views/dataBoard/renfang/cpts/rkfxPieOption.js
  9. 18
      src/views/dataBoard/renfang/index.vue
  10. 305
      src/views/dataBoard/renfang/visualizing/components/dangyuan.vue
  11. 573
      src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue
  12. 310
      src/views/dataBoard/renfang/visualizing/components/laonianren.vue
  13. 113
      src/views/dataBoard/renfang/visualizing/components/pie_config.js
  14. 668
      src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue
  15. 106
      src/views/dataBoard/renfang/visualizing/components/teshurenqun.vue
  16. 308
      src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue
  17. 70
      src/views/dataBoard/satisfactionEval/modules/PersonnelPortrait/index.vue

12
src/assets/scss/dataBoard/renfang/index.scss

@ -13,7 +13,7 @@
.g-center { .g-center {
position: relative; position: relative;
width: 820px; width: 920px;
} }
.g-right { .g-right {
@ -795,19 +795,21 @@
.visualizing { .visualizing {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
&-left { &-left {
width: 50%; width: calc(50% - 80px);
height: 400px; height: 400px;
margin: 0 40px;
} }
&-right { &-right {
width: 50%; width: calc(50% - 80px);
height: 400px; height: 400px;
margin: 0 40px;
} }
&-item { &-item {
width: 33.3%; width: calc(33.3% - 80px);
height: 400px; height: 400px;
margin: 0 40px;
} }
} }

39
src/views/dataBoard/cpts/map/index.vue

@ -1,6 +1,7 @@
<template> <template>
<div class="m-map" :class="{ 'z-td': mapType == 'td' }"> <div class="m-map" :class="{ 'z-td': mapType == 'td' }">
<div id="map" :style="{ transform: `scale(${zoom})` }"></div> <div id="map"></div>
<!-- :style="{ transform: `scale(${zoom})` }"-->
<div class="btn" v-if="mapStyleType == 'light'" v-show="false" @click="shiftMapStyle('dark')">切换深色模式</div> <div class="btn" v-if="mapStyleType == 'light'" v-show="false" @click="shiftMapStyle('dark')">切换深色模式</div>
<div class="btn" v-show="false" v-else @click="shiftMapStyle('light')">切换浅色模式</div> <div class="btn" v-show="false" v-else @click="shiftMapStyle('light')">切换浅色模式</div>
<!-- :style="{ transform: `scale(${zoom})` }" --> <!-- :style="{ transform: `scale(${zoom})` }" -->
@ -978,48 +979,50 @@ export default {
} }
} }
/deep/ .l7-popup { /deep/ .l7-popup {
z-index: 100; z-index: 100;
} }
/deep/ .l7-popup-content { /deep/ .l7-popup-content {
//background: rgba(#fff, 1); //background: rgba(#fff, 1);
background: rgba(3, 31, 73, 0.72); width: 416px;
border: 1px solid #74c9ff; padding: 0 20px !important;
opacity: 0.9; opacity: 0.9;
border-radius: 5px;
color: #fff; color: #fff;
border: 1px solid #74c9ff;
//box-shadow: 0 0 20px 3px inset rgba(#22f, 0.1); //box-shadow: 0 0 20px 3px inset rgba(#22f, 0.1);
width: 416px; border-radius: 5px;
padding: 0 20px !important; background: rgba(3, 31, 73, 0.72);
background: url("@/assets/images/overview/dia_con.png"); background: url("@/assets/images/overview/dia_con.png");
border: none;
&:before { &:before {
content: "";
display: block;
background: url("@/assets/images/overview/dia_head.png");
height: 29px;
width: 100%;
position: absolute; position: absolute;
top: -27.5px; top: -27.5px;
left: 0; left: 0;
display: block;
width: 100%;
height: 29px;
content: "";
background: url("@/assets/images/overview/dia_head.png");
} }
&:after { &:after {
content: "";
display: block;
background: url("@/assets/images/overview/dia_foot.png");
height: 26px;
width: 100%;
left: 0;
position: absolute; position: absolute;
bottom: -24px; bottom: -24px;
left: 0;
display: block;
width: 100%;
height: 26px;
content: "";
background: url("@/assets/images/overview/dia_foot.png");
} }
} }
/deep/ .l7-popup-close-button { /deep/ .l7-popup-close-button {
padding: 4px;
font-size: 36px; font-size: 36px;
padding: 4px;
color: rgba(#fff, 0.8); color: rgba(#fff, 0.8);
} }

14
src/views/dataBoard/overview/components/MapDialog/List12345.vue

@ -5,17 +5,17 @@
element-loading-background="rgba(0, 0, 0, 0.3)"> element-loading-background="rgba(0, 0, 0, 0.3)">
<el-table-column label="序号" type="index" width="80"/> <el-table-column label="序号" type="index" width="80"/>
<el-table-column label="所属网格" show-overflow-tooltip prop="gridName" width="120"/> <el-table-column label="所属网格" show-overflow-tooltip prop="gridName" width="120"/>
<el-table-column label="接收时间" prop="happenTime" width="180"/> <el-table-column label="接收时间" prop="happenTime" width="160"/>
<el-table-column label="问题描述" show-overflow-tooltip prop="eventContent" width="120"/> <el-table-column label="问题描述" show-overflow-tooltip prop="eventContent" min-width="120"/>
<el-table-column label="办结时限" prop="timeLimit" width="180"/> <el-table-column label="办结时限" prop="timeLimit" width="160"/>
<el-table-column label="联系人" prop="name" width="120"/> <el-table-column label="联系人" prop="name" width="80"/>
<el-table-column label="联系电话" prop="mobile" width="120"> <el-table-column label="联系电话" prop="mobile" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ $sensitive(scope.row.mobile, 3, 7) }} {{ $sensitive(scope.row.mobile, 3, 7) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="statusName" width="120"/> <el-table-column label="状态" prop="statusName" width="80"/>
<el-table-column label="操作" prop="op" width="250"> <el-table-column label="操作" prop="op" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<CallPhone text="拨打电话"/> <CallPhone text="拨打电话"/>
<span class="handle" @click="handleDispatch(scope.row)">处理</span> <span class="handle" @click="handleDispatch(scope.row)">处理</span>

27
src/views/dataBoard/overview/components/MapDialog/index.vue

@ -56,7 +56,7 @@
<DifficultyCharts v-if="catVal === 1" :currentLevelData="currentLevelData" <DifficultyCharts v-if="catVal === 1" :currentLevelData="currentLevelData"
style="margin-bottom: 56px;"/> style="margin-bottom: 56px;"/>
<DisputeDispatch v-if="catVal === 2" :currentLevelData="currentLevelData" style="margin-bottom: 56px;"/> <DisputeDispatch v-if="catVal === 2" :currentLevelData="currentLevelData" style="margin-bottom: 56px;"/>
<Njjwtqk :currentLevelData="currentLevelData" :catVal="catVal"/> <Njjwtqk :catVal="catVal" :currentLevelData="currentLevelData"/>
</template> </template>
<template v-if="type === 'bmysxqk'"> <template v-if="type === 'bmysxqk'">
@ -118,9 +118,7 @@ export default {
DemandList, DemandList,
ResourceDispatch ResourceDispatch
}, },
props: { props: {},
},
data() { data() {
return { return {
total: 10, total: 10,
@ -181,8 +179,10 @@ export default {
item.label = item.label + '(' + data.filter(item2 => item2.markType === item.value)[0].total + ')' item.label = item.label + '(' + data.filter(item2 => item2.markType === item.value)[0].total + ')'
}) })
this.njjwtqkTree = njjwtqkTree this.njjwtqkTree = njjwtqkTree
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.catVal) this.$refs.tree.setCurrentKey(this.catVal)
}) })
})
} }
if (this.type === 'xqwwcqk') { if (this.type === 'xqwwcqk') {
this.getDemandOptions(orgId) this.getDemandOptions(orgId)
@ -204,7 +204,9 @@ export default {
}) })
} }
}) })
this.$refs.tree.setCurrentKey(this.catVal) this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.catValSub)
})
}) })
} }
}, },
@ -222,8 +224,11 @@ export default {
} }
}); });
this.xqwwcqkTree = this.xqwwcqkTree.filter(item => item.value) this.xqwwcqkTree = this.xqwwcqkTree.filter(item => item.value)
this.$refs.tree.setCurrentKey(this.catVal) this.catVal = this.xqwwcqkTree[0].value
this.catLabel = this.xqwwcqkTree[0].label; this.catLabel = this.xqwwcqkTree[0].label;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.catVal)
})
}) })
.catch(() => { .catch(() => {
return this.$message.error("网络错误"); return this.$message.error("网络错误");
@ -266,15 +271,15 @@ export default {
.handle { .handle {
font-size: 14px; font-size: 14px;
margin-left: 10px; margin-left: 10px;
color: #9A69EC;
cursor: pointer; cursor: pointer;
color: #9A69EC;
} }
.view { .view {
font-size: 14px; font-size: 14px;
margin-left: 10px; margin-left: 10px;
color: #007FF1;
cursor: pointer; cursor: pointer;
color: #007FF1;
} }
.eventDetails { .eventDetails {
@ -291,17 +296,21 @@ export default {
.tree { .tree {
height: 855px; height: 855px;
} }
.map-dialog-con { .map-dialog-con {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.tree { .tree {
flex: 0 0 180px; flex: 0 0 180px;
} }
.right-con { .right-con {
width: calc(100% - 200px);
flex: 0 0 calc(100% - 200px); flex: 0 0 calc(100% - 200px);
width: calc(100% - 200px);
} }
.pagination-container { .pagination-container {
padding-bottom: 0 !important; padding-bottom: 0 !important;
} }

2
src/views/dataBoard/overview/components/MapResourceInfoMore.vue

@ -355,7 +355,7 @@ export default {
@import "~@/assets/scss/dataBoard/dialog.scss"; @import "~@/assets/scss/dataBoard/dialog.scss";
.contents { .contents {
padding: 40px 50px; padding: 40px 50px 0;
.items { .items {
font-size: 14px; font-size: 14px;

2
src/views/dataBoard/overview/components/wtqd.vue

@ -369,7 +369,7 @@ export default {
background: #0a2a5c; background: #0a2a5c;
span { span {
text-align: center; //text-align: center;
} }
> :nth-child(1) { > :nth-child(1) {

53
src/views/dataBoard/renfang/cpts/rkfx.vue

@ -16,6 +16,7 @@
/> />
</div> </div>
<div class="legend cur"> <div class="legend cur">
<div>
<div v-for="item in pieData" :key="'pie' + item.name" class="legend-row" @click="handleClickItem(item)"> <div v-for="item in pieData" :key="'pie' + item.name" class="legend-row" @click="handleClickItem(item)">
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="content"> <div class="content">
@ -26,6 +27,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import screenEchartsFrame from "@/views/dataBoard/cpts/screen-echarts-frame/index"; import screenEchartsFrame from "@/views/dataBoard/cpts/screen-echarts-frame/index";
@ -377,31 +379,37 @@ export default {
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
color: #ffffff; color: #ffffff;
background-image: url(../../../../assets/images/shuju/renfang/rkfx-bg.png); background-image: url(@/assets/images/shuju/renfang/rkfx-bg.png);
background-size: cover; background-size: cover;
} }
.item-sel { .item-sel {
background-image: url(../../../../assets/images/shuju/renfang/rkfx-bg-sel.png); background-image: url(@/assets/images/shuju/renfang/rkfx-bg-sel.png);
background-size: cover; background-size: cover;
} }
} }
.pie-main { .pie-main {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
justify-content: space-between;
margin-left: 25px; margin-left: 25px;
.legend { .legend {
// flex: 0 0 140px; // flex: 0 0 140px;
margin-top: 40px; //margin-top: 40px;
display: flex;
overflow-y: auto;
overflow-x: hidden;
align-items: center;
height: 178px;
padding: 0 20px 0 0px;
.legend-row { .legend-row {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-top: 15px; margin-bottom: 15px;
&:nth-child(1) .name::before { &:nth-child(1) .name::before {
background: #1a95ff; background: #1a95ff;
@ -444,35 +452,38 @@ export default {
} }
.name { .name {
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFang SC;
font-size: 12px; font-size: 14px;
font-weight: 400; font-weight: 400;
line-height: 17px; color: #A3B9DA;
position: relative; display: flex;
margin-left: 5px; align-items: center;
color: rgba(255, 255, 255, 0.65); white-space: nowrap;
margin-right: 24px;
&::before { &::before {
position: absolute; //position: absolute;
top: 4px; //top: 4px;
left: -15px; //left: -15px;
display: block;
margin-right: 5px;
width: 8px; width: 8px;
flex: 0 0 8px;
height: 8px; height: 8px;
content: ""; content: "";
} }
} }
.content { .content {
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
display: flex; display: flex;
align-items: flex-end; align-items: center;
margin-left: 24px; color: #FFFFFF;
color: #ffffff;
} }
.num { .num {
font-size: 20px; font-size: 18px;
} }
.unit { .unit {
@ -484,9 +495,9 @@ export default {
.pie { .pie {
flex: 0 0 280px; flex: 0 0 280px;
height: 180px;
min-height: 146px; min-height: 146px;
height: 100%; //margin-top: 32px;
margin-top: 32px;
} }
} }
} }

2
src/views/dataBoard/renfang/cpts/rkfxPieOption.js

@ -21,7 +21,7 @@ export function pieOption() {
{ {
name: "", name: "",
type: "pie", type: "pie",
radius: ["50%", "100%"], radius: ["50%", "80%"],
center: ["50%", "50%"], center: ["50%", "50%"],
roseType: "area", roseType: "area",
itemStyle: { itemStyle: {

18
src/views/dataBoard/renfang/index.vue

@ -220,17 +220,8 @@
</div> </div>
</div> </div>
<div class="bgImg m-box m-cate"> <div class="bgImg m-box m-cate map-bottom">
<div class="box-title"> <div class="box-title">
<!-- <img
class="box-title-bg"
src="~@/assets/images/shuju/main/card-title-bg-800.png"
/>
<div v-if="!displayedForecast" class="box-title-txt">
居民分类统计
</div>
<div v-else class="box-title-txt">居民分类统计-智能预测</div>
-->
<Title v-if="!displayedForecast" text="居民概览"> <Title v-if="!displayedForecast" text="居民概览">
<template> <template>
<div <div
@ -818,12 +809,15 @@ export default {
@import "@/assets/scss/dataBoard/renfang/index.scss"; @import "@/assets/scss/dataBoard/renfang/index.scss";
.bgImg { .bgImg {
margin-top: 5px; margin-bottom: 7px;
background: url('@/assets/images/shuju/overview/box-bg.png') no-repeat; background: url('@/assets/images/shuju/overview/box-bg.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.m-box { .m-box {
height: 320px; height: 323px;
}
.map-bottom {
margin: 0 17px;
} }
</style> </style>

305
src/views/dataBoard/renfang/visualizing/components/dangyuan.vue

@ -26,6 +26,7 @@
<script> <script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue"; import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import {color, legend, series, title} from "@/views/dataBoard/renfang/visualizing/components/pie_config";
function dataFormatter(arr) { function dataFormatter(arr) {
return arr.map((item) => { return arr.map((item) => {
@ -100,101 +101,13 @@ export default {
let div = document.getElementById("dyLeftChart"); let div = document.getElementById("dyLeftChart");
this.myChart1 = echarts.init(div); this.myChart1 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
}, },
value: { color,
width: 30, legend: legend(this.dyLeft),
align: "right", title: title(this.dyLeft),
fontSize: 18, series: series(this.dyLeft)
},
},
},
data: this.dyLeft,
formatter: (name) => {
if (this.dyLeft.length) {
const item = this.dyLeft.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.dyLeft || this.dyLeft.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius: this.dyLeft && this.dyLeft.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.dyLeft,
},
],
}; };
this.myChart1.setOption(option); this.myChart1.setOption(option);
this.myChart1.on("click", (e) => { this.myChart1.on("click", (e) => {
@ -216,102 +129,13 @@ export default {
let div = document.getElementById("dyRightChart"); let div = document.getElementById("dyRightChart");
this.myChart2 = echarts.init(div); this.myChart2 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 80,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.dyRight,
formatter: (name) => {
if (this.dyRight.length) {
const item = this.dyRight.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.dyRight || this.dyRight.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
}, },
}, color,
}, legend: legend(this.dyRight),
}, title: title(this.dyRight),
subtextStyle: { series: series(this.dyRight)
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.dyRight && this.dyRight.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.dyRight,
},
],
}; };
this.myChart2.on("click", (e) => { this.myChart2.on("click", (e) => {
this.$router.push({ this.$router.push({
@ -334,102 +158,13 @@ export default {
let div = document.getElementById("resiServiceChart"); let div = document.getElementById("resiServiceChart");
this.myChart3 = echarts.init(div); this.myChart3 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.resiService,
formatter: (name) => {
if (this.resiService.length) {
const item = this.resiService.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.resiService || this.resiService.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.resiService && this.resiService.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.resiService,
}, },
], color,
legend: legend(this.resiService),
title: title(this.resiService),
series: series(this.resiService)
}; };
this.myChart3.setOption(option); this.myChart3.setOption(option);
this.myChart3.on("click", (e) => { this.myChart3.on("click", (e) => {
@ -458,6 +193,6 @@ export default {
></style> ></style>
<style lang="scss" scoped> <style lang="scss" scoped>
.laonianren { .laonianren {
padding: 140px 240px; padding: 140px 130px;
} }
</style> </style>

573
src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue

@ -40,6 +40,7 @@
<script> <script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue"; import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import {color, legend, series, title} from "@/views/dataBoard/renfang/visualizing/components/pie_config";
function dataFormatter(arr) { function dataFormatter(arr) {
return arr.map((item) => { return arr.map((item) => {
@ -49,6 +50,7 @@ function dataFormatter(arr) {
}; };
}); });
} }
export default { export default {
name: "dibaorenyuan", name: "dibaorenyuan",
props: { props: {
@ -87,7 +89,8 @@ export default {
this.dbryData1 = dataFormatter(res.data); this.dbryData1 = dataFormatter(res.data);
this.dbryDataCharts1(); this.dbryDataCharts1();
}) })
.catch(() => {}); .catch(() => {
});
this.$http this.$http
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=1") .get("/actual/base/peopleRoomOverview/lowIncomePie?type=1")
.then(({data: res}) => { .then(({data: res}) => {
@ -97,7 +100,8 @@ export default {
this.dbryData2 = dataFormatter(res.data); this.dbryData2 = dataFormatter(res.data);
this.dbryDataCharts2(); this.dbryDataCharts2();
}) })
.catch(() => {}); .catch(() => {
});
this.$http this.$http
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=2") .get("/actual/base/peopleRoomOverview/lowIncomePie?type=2")
.then(({data: res}) => { .then(({data: res}) => {
@ -107,7 +111,8 @@ export default {
this.dbryData3 = dataFormatter(res.data); this.dbryData3 = dataFormatter(res.data);
this.dbryDataCharts3(); this.dbryDataCharts3();
}) })
.catch(() => {}); .catch(() => {
});
this.$http this.$http
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=3") .get("/actual/base/peopleRoomOverview/lowIncomePie?type=3")
.then(({data: res}) => { .then(({data: res}) => {
@ -117,7 +122,8 @@ export default {
this.dbryData4 = dataFormatter(res.data); this.dbryData4 = dataFormatter(res.data);
this.dbryDataCharts4(); this.dbryDataCharts4();
}) })
.catch(() => {}); .catch(() => {
});
this.$http this.$http
.get("/actual/base/peopleRoomOverview/findPeoplePie/SUBSISTENCE_ALLOWANCE_FLAG") .get("/actual/base/peopleRoomOverview/findPeoplePie/SUBSISTENCE_ALLOWANCE_FLAG")
.then(({data: res}) => { .then(({data: res}) => {
@ -127,120 +133,21 @@ export default {
this.resiService = dataFormatter(res.data); this.resiService = dataFormatter(res.data);
this.initResiServiceCharts(); this.initResiServiceCharts();
}) })
.catch(() => {}); .catch(() => {
});
}, },
dbryDataCharts1() { dbryDataCharts1() {
let div = document.getElementById("dbryChart1"); let div = document.getElementById("dbryChart1");
this.myChart1 = echarts.init(div); this.myChart1 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: {
show: true,
},
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.dbryData1,
tooltip: { tooltip: {
show: true, trigger: "item",
},
formatter: (name) => {
if (this.dbryData1.length) {
const item = this.dbryData1.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
}, },
}, color,
toolbox: { legend: legend(this.dbryData1),
show: false, title: title(this.dbryData1),
feature: { series: series(this.dbryData1)
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.dbryData1 || this.dbryData1.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 126, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius: this.dbryData1 && this.dbryData1.length > 0?[30, 130]:[0,0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.dbryData1,
},
],
}; };
this.myChart1.setOption(option); this.myChart1.setOption(option);
this.myChart1.on("click", (e) => { this.myChart1.on("click", (e) => {
@ -262,114 +169,13 @@ export default {
let div = document.getElementById("dbryChart2"); let div = document.getElementById("dbryChart2");
this.myChart2 = echarts.init(div); this.myChart2 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: {
show: true,
},
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.dbryData2,
tooltip: { tooltip: {
show: true, trigger: "item",
},
formatter: (name) => {
if (this.dbryData2.length) {
const item = this.dbryData2.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.dbryData2 || this.dbryData2.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 126, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
}, },
subtextStyle: { color,
// legend: legend(this.dbryData2),
fontSize: 12, title: title(this.dbryData2),
color: "#ffffff", series: series(this.dbryData2)
},
},
series: [
{
type: "pie",
radius: this.dbryData2 && this.dbryData2.length > 0?[30, 130]:[0,0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.dbryData2,
},
],
}; };
this.myChart2.setOption(option); this.myChart2.setOption(option);
this.myChart2.on("click", (a, b) => { this.myChart2.on("click", (a, b) => {
@ -391,116 +197,13 @@ export default {
let div = document.getElementById("dbryChart3"); let div = document.getElementById("dbryChart3");
this.myChart3 = echarts.init(div); this.myChart3 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: { tooltip: {
show: true, trigger: "item",
},
legend: {
type: "scroll",
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
width: 120,
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.dbryData3,
tooltip: {
show: true,
},
formatter: (name) => {
if (this.dbryData3.length) {
const item = this.dbryData3.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
},
}, },
toolbox: { color,
show: false, legend: legend(this.dbryData3),
feature: { title: title(this.dbryData3),
mark: { show: true }, series: series(this.dbryData3)
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.dbryData3 || this.dbryData3.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 126, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius: this.dbryData3 && this.dbryData3.length > 0?[30, 130]:[0,0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.dbryData3,
},
],
}; };
this.myChart3.setOption(option); this.myChart3.setOption(option);
this.myChart3.on("click", (a, b) => { this.myChart3.on("click", (a, b) => {
@ -521,115 +224,13 @@ export default {
let div = document.getElementById("dbryChart4"); let div = document.getElementById("dbryChart4");
this.myChart4 = echarts.init(div); this.myChart4 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: {
show: true,
},
legend: {
type: "scroll",
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.dbryData4,
tooltip: { tooltip: {
show: true, trigger: "item",
},
formatter: (name) => {
if (this.dbryData4.length) {
const item = this.dbryData4.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.dbryData4 || this.dbryData4.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 126, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
}, },
}, color,
series: [ legend: legend(this.dbryData4),
{ title: title(this.dbryData4),
type: "pie", series: series(this.dbryData4)
radius: this.dbryData4 && this.dbryData4.length > 0?[30, 130]:[0,0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.dbryData4,
},
],
}; };
this.myChart4.setOption(option); this.myChart4.setOption(option);
this.myChart4.on("click", (a, b) => { this.myChart4.on("click", (a, b) => {
@ -651,102 +252,13 @@ export default {
let div = document.getElementById("resiServiceChart"); let div = document.getElementById("resiServiceChart");
this.resiChart = echarts.init(div); this.resiChart = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.resiService,
formatter: (name) => {
if (this.resiService.length) {
const item = this.resiService.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.resiService || this.resiService.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.resiService && this.resiService.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.resiService,
}, },
], color,
legend: legend(this.resiService),
title: title(this.resiService),
series: series(this.resiService)
}; };
this.resiChart.setOption(option); this.resiChart.setOption(option);
this.resiChart.on("click", (e) => { this.resiChart.on("click", (e) => {
@ -770,14 +282,15 @@ export default {
<style <style
lang="scss" lang="scss"
src="@/assets/scss/dataBoard/renfang/index.scss"
scoped scoped
src="@/assets/scss/dataBoard/renfang/index.scss"
></style> ></style>
<style lang="scss" scoped> <style lang="scss" scoped>
.dibaorenyuan { .dibaorenyuan {
padding: 0px 240px; padding: 0px 130px;
} }
#dbryChart3 { #dbryChart3 {
.echarts-legend { .echarts-legend {
white-space: normal; white-space: normal;
@ -786,8 +299,8 @@ export default {
:v-deep #dbryChart3 { :v-deep #dbryChart3 {
.echarts-legend span { .echarts-legend span {
padding: 5px 0;
display: block; display: block;
padding: 5px 0;
} }
} }
</style> </style>

310
src/views/dataBoard/renfang/visualizing/components/laonianren.vue

@ -26,7 +26,7 @@
<script> <script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue"; import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import {color, legend,title,series} from './pie_config.js'
function dataFormatter(arr) { function dataFormatter(arr) {
return arr.map((item) => { return arr.map((item) => {
return { return {
@ -99,104 +99,16 @@ export default {
let div = document.getElementById("lnrLeftChart"); let div = document.getElementById("lnrLeftChart");
this.myChart1 = echarts.init(div); this.myChart1 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.lnrLeft,
formatter: (name) => {
if (this.lnrLeft.length) {
const item = this.lnrLeft.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.lnrLeft || this.lnrLeft.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
}, },
}, color,
series: [ legend: legend(this.lnrLeft),
{ title: title(this.lnrLeft),
type: "pie", series: series(this.lnrLeft)
radius:
this.lnrLeft && this.lnrLeft.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.lnrLeft,
},
],
}; };
this.myChart1.setOption(option); this.myChart1.setOption(option);
this.myChart1.on("click", (e) => { this.myChart1.on("click", (e) => {
this.$router.push({ this.$router.push({
path: "/dataBoard/renfang/resi-class-new", path: "/dataBoard/renfang/resi-class-new",
@ -216,104 +128,13 @@ export default {
let div = document.getElementById("lnrRightChart"); let div = document.getElementById("lnrRightChart");
this.myChart2 = echarts.init(div); this.myChart2 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 80,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.lnrRight,
formatter: (name) => {
if (this.lnrRight.length) {
const item = this.lnrRight.filter(
(item) => item.name === name
)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
title: {
show: !this.lnrRight || this.lnrRight.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
}, },
}, color,
}, legend: legend(this.lnrRight),
subtextStyle: { title: title(this.lnrRight),
// series: series(this.lnrRight)
fontSize: 12,
color: "#ffffff",
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
series: [
{
type: "pie",
radius:
this.lnrRight && this.lnrRight.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.lnrRight,
},
],
}; };
this.myChart2.on("click", (e) => { this.myChart2.on("click", (e) => {
console.log('a, b::', e); console.log('a, b::', e);
@ -336,102 +157,13 @@ export default {
let div = document.getElementById("lnrServiceChart"); let div = document.getElementById("lnrServiceChart");
this.myChart3 = echarts.init(div); this.myChart3 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.lnrService,
formatter: (name) => {
if (this.lnrService.length) {
const item = this.lnrService.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.lnrService || this.lnrService.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.lnrService && this.lnrService.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.lnrService,
}, },
], color,
legend: legend(this.lnrService),
title: title(this.lnrService),
series: series(this.lnrService)
}; };
this.myChart3.setOption(option); this.myChart3.setOption(option);
this.myChart3.on("click", (e) => { this.myChart3.on("click", (e) => {
@ -460,6 +192,6 @@ export default {
></style> ></style>
<style lang="scss" scoped> <style lang="scss" scoped>
.laonianren { .laonianren {
padding: 140px 240px; padding: 140px 130px;
} }
</style> </style>

113
src/views/dataBoard/renfang/visualizing/components/pie_config.js

@ -0,0 +1,113 @@
import * as echarts from "echarts";
export function legend(data) {
return {
orient: "vertical",
top: 20,
left: 0,
icon: "rect",
itemHeight: 8,
itemWidth: 8,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#9393AB",
},
value: {
fontSize: 16,
},
},
},
data: data,
formatter: (name) => {
/* if (data.length) {
const item = data.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}*/
if (data.length) {
const item = data.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
}
}
}
export const color = [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
]
export function title(data) {
return {
show: !data || data.length == 0,
text: " {a|}", // 写入占位符a,以便后续填充内容
x: "center",
y: "center",
subtext: "暂无数据", // 子标题
itemGap: -10, // 设置主副标题间隔
textStyle: {
rich: {
a: {
height: 128, // 设置图片高度
width: 268, // 设置图片宽度
backgroundColor: {
// 引入图片,作为背景图,填写相对路径
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
// 配置副标题的文字样式
fontSize: 12,
color: "#ffffff",
},
}
}
export function series(data) {
var total = data.map(item => item.value).join('+')
return [
{
type: "pie",
radius: data.length > 0?["40%", "60%"]:[0,0],
center: ["70%", "50%"],
label: {
show: true,
position: "center",
color: "rgba(13, 17, 29,0)",
formatter: `{primary|${eval(total)}}\n{point|总数}}`,
rich: {
primary: {
fontSize: 30,
color: '#ffffff',
align: 'center'
},
point: {
fontSize: 14,
fontWeight: 400,
color: "#A3B9DA",
align: 'center'
}
}
},
data
},
]
}

668
src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue

@ -46,6 +46,7 @@
<script> <script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue"; import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import {color, legend, series, title} from "@/views/dataBoard/renfang/visualizing/components/pie_config";
function dataFormatter(arr) { function dataFormatter(arr) {
return arr.map((item) => { return arr.map((item) => {
@ -152,115 +153,13 @@ export default {
let div = document.getElementById("syryChart1"); let div = document.getElementById("syryChart1");
this.myChart1 = echarts.init(div); this.myChart1 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: { tooltip: {
show: true, trigger: "item",
}, },
legend: { color,
orient: "vertical", legend: legend(this.syryData1),
top: 20, title: title(this.syryData1),
left: 10, series: series(this.syryData1)
icon: "rect",
itemHeight: 14,
itemWidth: 14,
tooltip: {
show: true,
},
formatter: (name) => {
if (this.syryData1.length) {
const item = this.syryData1.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
},
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 60,
align: "right",
fontSize: 18,
},
},
},
data: this.syryData1,
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.syryData1 || this.syryData1.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.syryData1 && this.syryData1.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: -20,
left: 10,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData1,
},
],
}; };
this.myChart1.setOption(option); this.myChart1.setOption(option);
this.myChart1.on("click", (e) => { this.myChart1.on("click", (e) => {
@ -282,115 +181,13 @@ export default {
let div = document.getElementById("syryChart2"); let div = document.getElementById("syryChart2");
this.myChart2 = echarts.init(div); this.myChart2 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: {
show: true,
},
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 60,
align: "right",
fontSize: 18,
},
},
},
data: this.syryData2,
tooltip: { tooltip: {
show: true, trigger: "item",
},
formatter: (name) => {
if (this.syryData2.length) {
const item = this.syryData2.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
}, },
title: { color,
show: !this.syryData2 || this.syryData2.length == 0, // legend: legend(this.syryData2),
text: " {a|}", // a便 title: title(this.syryData2),
x: "center", series: series(this.syryData2)
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.syryData2 && this.syryData2.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: -20,
left: 10,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData2,
},
],
}; };
this.myChart2.setOption(option); this.myChart2.setOption(option);
this.myChart2.on("click", (e) => { this.myChart2.on("click", (e) => {
@ -412,117 +209,13 @@ export default {
let div = document.getElementById("syryChart3"); let div = document.getElementById("syryChart3");
this.myChart3 = echarts.init(div); this.myChart3 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: {
show: true,
},
legend: {
type: "scroll",
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
tooltip: { tooltip: {
show: true, trigger: "item",
},
formatter: (name) => {
if (this.syryData3.length) {
const item = this.syryData3.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
},
textStyle: {
width: 120,
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 60,
align: "right",
fontSize: 18,
},
},
},
data: this.syryData3,
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.syryData3 || this.syryData3.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.syryData3 && this.syryData3.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: -20,
left: 10,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
}, },
data: this.syryData3, color,
}, legend: legend(this.syryData3),
], title: title(this.syryData3),
series: series(this.syryData3)
}; };
this.myChart3.setOption(option); this.myChart3.setOption(option);
this.myChart3.on("click", (e) => { this.myChart3.on("click", (e) => {
@ -544,116 +237,13 @@ export default {
let div = document.getElementById("syryChart4"); let div = document.getElementById("syryChart4");
this.myChart4 = echarts.init(div); this.myChart4 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: { tooltip: {
show: true, trigger: "item",
},
legend: {
type: "scroll",
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 60,
align: "right",
fontSize: 18,
},
},
},
data: this.syryData4,
tooltip: {
show: true,
},
formatter: (name) => {
if (this.syryData4.length) {
const item = this.syryData4.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.syryData4 || this.syryData4.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
}, },
subtextStyle: { color,
// legend: legend(this.syryData4),
fontSize: 12, title: title(this.syryData4),
color: "#ffffff", series: series(this.syryData4)
},
},
series: [
{
type: "pie",
radius:
this.syryData4 && this.syryData4.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: -20,
left: 10,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData4,
},
],
}; };
this.myChart4.setOption(option); this.myChart4.setOption(option);
this.myChart4.on("click", (e) => { this.myChart4.on("click", (e) => {
@ -674,116 +264,13 @@ export default {
let div = document.getElementById("syryChart5"); let div = document.getElementById("syryChart5");
this.myChart5 = echarts.init(div); this.myChart5 = echarts.init(div);
const option = { const option = {
color: [
"#15a7ed",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
tooltip: {
show: true,
},
legend: {
type: "scroll",
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
tooltip: { tooltip: {
show: true, trigger: "item",
},
formatter: (name) => {
if (this.syryData5.length) {
const item = this.syryData5.filter(
(item) => item.name === name
)[0];
return `{name|${echarts.format.truncateText(
name,
100,
"14px Microsoft Yahei",
"…"
)}}{value| ${item.value}}`;
}
},
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 60,
align: "right",
fontSize: 18,
},
},
},
data: this.syryData5,
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
}, },
}, color,
title: { legend: legend(this.syryData5),
show: !this.syryData5 || this.syryData5.length == 0, // title: title(this.syryData5),
text: " {a|}", // a便 series: series(this.syryData5)
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.syryData5 && this.syryData5.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: -20,
left: 10,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData5,
},
],
}; };
this.myChart5.setOption(option); this.myChart5.setOption(option);
this.myChart5.on("click", (e) => { this.myChart5.on("click", (e) => {
@ -804,102 +291,13 @@ export default {
let div = document.getElementById("resiServiceChart"); let div = document.getElementById("resiServiceChart");
this.resiChart = echarts.init(div); this.resiChart = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.resiService,
formatter: (name) => {
if (this.resiService.length) {
const item = this.resiService.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.resiService || this.resiService.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.resiService && this.resiService.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.resiService,
}, },
], color,
legend: legend(this.resiService),
title: title(this.resiService),
series: series(this.resiService)
}; };
this.resiChart.setOption(option); this.resiChart.setOption(option);
this.resiChart.on("click", (e) => { this.resiChart.on("click", (e) => {
@ -929,7 +327,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.dibaorenyuan { .dibaorenyuan {
padding: 0px 240px; padding: 0px 130px;
} }
#syryChart3 { #syryChart3 {
.echarts-legend { .echarts-legend {

106
src/views/dataBoard/renfang/visualizing/components/teshurenqun.vue

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div class="visualizing laonianren"> <div class="visualizing laonianren">
<div class="visualizing-item"> <div class="visualizing-left">
<div> <div>
<data-title title="特殊人群享受服务情况统计" /> <data-title title="特殊人群享受服务情况统计" />
</div> </div>
@ -14,6 +14,7 @@
<script> <script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue"; import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import {color, legend, series, title} from "@/views/dataBoard/renfang/visualizing/components/pie_config";
function dataFormatter(arr) { function dataFormatter(arr) {
return arr.map((item) => { return arr.map((item) => {
@ -66,102 +67,13 @@ export default {
let div = document.getElementById("resiServiceChart"); let div = document.getElementById("resiServiceChart");
this.myChart3 = echarts.init(div); this.myChart3 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
}, },
value: { color,
width: 30, legend: legend(this.lnrService),
align: "right", title: title(this.lnrService),
fontSize: 18, series: series(this.lnrService)
},
},
},
data: this.lnrService,
formatter: (name) => {
if (this.lnrService.length) {
const item = this.lnrService.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.lnrService || this.lnrService.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.lnrService && this.lnrService.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.lnrService,
},
],
}; };
this.myChart3.setOption(option); this.myChart3.setOption(option);
this.myChart3.on("click", (e) => { this.myChart3.on("click", (e) => {
@ -190,6 +102,6 @@ export default {
></style> ></style>
<style lang="scss" scoped> <style lang="scss" scoped>
.laonianren { .laonianren {
padding: 140px 240px; padding: 140px 130px;
} }
</style> </style>

308
src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue

@ -26,6 +26,7 @@
<script> <script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue"; import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import {color, legend, series, title} from "@/views/dataBoard/renfang/visualizing/components/pie_config";
function dataFormatter(arr) { function dataFormatter(arr) {
return arr.map((item) => { return arr.map((item) => {
@ -100,102 +101,13 @@ export default {
let div = document.getElementById("zyzLeftChart"); let div = document.getElementById("zyzLeftChart");
this.myChart1 = echarts.init(div); this.myChart1 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
}, },
value: { color,
width: 30, legend: legend(this.zyzLeft),
align: "right", title: title(this.zyzLeft),
fontSize: 18, series: series(this.zyzLeft)
},
},
},
data: this.zyzLeft,
formatter: (name) => {
if (this.zyzLeft.length) {
const item = this.zyzLeft.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.zyzLeft || this.zyzLeft.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.zyzLeft && this.zyzLeft.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.zyzLeft,
},
],
}; };
this.myChart1.setOption(option); this.myChart1.setOption(option);
this.myChart1.on("click", (e) => { this.myChart1.on("click", (e) => {
@ -217,104 +129,13 @@ export default {
let div = document.getElementById("zyzRightChart"); let div = document.getElementById("zyzRightChart");
this.myChart2 = echarts.init(div); this.myChart2 = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 80,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.zyzRight,
formatter: (name) => {
if (this.zyzRight.length) {
const item = this.zyzRight.filter(
(item) => item.name === name
)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.zyzRight || this.zyzRight.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
}, },
}, color,
}, legend: legend(this.zyzRight),
}, title: title(this.zyzRight),
subtextStyle: { series: series(this.zyzRight)
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.zyzRight && this.zyzRight.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.zyzRight,
},
],
}; };
this.myChart2.on("click", (e) => { this.myChart2.on("click", (e) => {
this.$router.push({ this.$router.push({
@ -337,102 +158,13 @@ export default {
let div = document.getElementById("resiServiceChart"); let div = document.getElementById("resiServiceChart");
this.resiChart = echarts.init(div); this.resiChart = echarts.init(div);
const option = { const option = {
color: [ tooltip: {
"#15a7ed", trigger: "item",
"#22b998",
"#5f6ff4",
"#a66eeb",
"#faa834",
"#fd6200",
"#fb3905",
],
legend: {
orient: "vertical",
top: 20,
left: 10,
icon: "rect",
itemHeight: 14,
itemWidth: 14,
textStyle: {
color: "#ffffff",
rich: {
name: {
width: 90,
fontSize: 12,
color: "#dddee7",
},
value: {
width: 30,
align: "right",
fontSize: 18,
},
},
},
data: this.resiService,
formatter: (name) => {
if (this.resiService.length) {
const item = this.resiService.filter((item) => item.name === name)[0];
return `{name|${name}}{value| ${item.value}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
title: {
show: !this.resiService || this.resiService.length == 0, //
text: " {a|}", // a便
x: "center",
y: "center",
subtext: "暂无数据", //
itemGap: -10, //
textStyle: {
rich: {
a: {
height: 128, //
width: 268, //
backgroundColor: {
//
image: require("@/assets/images/overview/zanwu.png"),
},
},
},
},
subtextStyle: {
//
fontSize: 12,
color: "#ffffff",
},
},
series: [
{
type: "pie",
radius:
this.resiService && this.resiService.length > 0 ? [30, 130] : [0, 0],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.resiService,
}, },
], color,
legend: legend(this.resiService),
title: title(this.resiService),
series: series(this.resiService)
}; };
this.resiChart.setOption(option); this.resiChart.setOption(option);
this.resiChart.on("click", (e) => { this.resiChart.on("click", (e) => {
@ -461,6 +193,6 @@ export default {
></style> ></style>
<style lang="scss" scoped> <style lang="scss" scoped>
.laonianren { .laonianren {
padding: 140px 240px; padding: 140px 130px;
} }
</style> </style>

70
src/views/dataBoard/satisfactionEval/modules/PersonnelPortrait/index.vue

@ -19,7 +19,9 @@
{{ ageClassification }} {{ ageClassification }}
</div> </div>
</div> </div>
<div class="tag" :class="index === 0?'red':index === 1? 'purple2':index === 2? 'green2':'purple2'" :key="index" v-for="(residentTag,index) in residentTagArray" > <div class="tag red" :key="index"
v-for="(residentTag,index) in residentTagArray"
>
<div :class="[residentTag.length > 5 ? 'smallSize' : '', 'text']"> <div :class="[residentTag.length > 5 ? 'smallSize' : '', 'text']">
{{ residentTag }} {{ residentTag }}
</div> </div>
@ -339,40 +341,100 @@ $green2: #58cc32;
&:nth-of-type(3) { &:nth-of-type(3) {
left: 162px; left: 162px;
top: 0; top: 0;
.text {
background: $yellow;
}
&:after {
background: $yellow;
}
} }
&:nth-of-type(5) { &:nth-of-type(5) {
left: 297px; left: 323px;
top: 73px; top: 107px;
.text {
background: $blue;
}
&:after {
background: $blue;
}
} }
&:nth-of-type(2) { &:nth-of-type(2) {
left: 316px; left: 316px;
top: 203px; top: 203px;
.text {
background: $red;
}
&:after {
background: $red;
}
} }
&:nth-of-type(6) { &:nth-of-type(6) {
left: 228px; left: 228px;
top: 246px; top: 246px;
.text {
background: $light;
}
&:after {
background: $light;
}
} }
&:nth-of-type(4) { &:nth-of-type(4) {
left: 77px; left: 77px;
top: 246px; top: 246px;
.text {
background: $green;
}
&:after {
background: $green;
}
} }
&:nth-of-type(7) { &:nth-of-type(7) {
left: 0px; left: 0px;
top: 158px; top: 158px;
.text {
background: $orange;
}
&:after {
background: $orange;
}
} }
&:nth-of-type(1) { &:nth-of-type(1) {
left: 48px; left: 48px;
top: 57px; top: 57px;
.text {
background: $purple;
}
&:after {
background: $purple;
} }
} }
&:nth-of-type(8) {
left: 260px;
top: 29px;
.text {
background: $green2;
}
&:after {
background: $green2;
}
}
}
/*
.yellow { .yellow {
.text { .text {
background: $yellow; background: $yellow;
@ -459,7 +521,7 @@ $green2: #58cc32;
&:after { &:after {
background: $green2; background: $green2;
} }
} }*/
} }
.btn { .btn {

Loading…
Cancel
Save