Browse Source

代码提交

feature
张若晨 2 years ago
parent
commit
c450c9245f
  1. BIN
      src/assets/images/shuju/overview/dwzz-icon.png
  2. BIN
      src/assets/images/shuju/overview/gyg-icon.png
  3. BIN
      src/assets/images/shuju/overview/lzz-icon.png
  4. BIN
      src/assets/images/shuju/overview/sqgzz-icon.png
  5. BIN
      src/assets/images/shuju/overview/top-bg.png
  6. BIN
      src/assets/images/shuju/overview/wgy-icon.png
  7. BIN
      src/assets/images/shuju/overview/xztop-bg.png
  8. BIN
      src/assets/images/shuju/overview/zyz-icon.png
  9. 159
      src/assets/scss/dataBoard/overview/index.scss
  10. 83
      src/assets/scss/dataBoard/renfang/index.scss
  11. 1829
      src/views/dataBoard/cpts/map/index.vue
  12. 46
      src/views/dataBoard/overview/components/jdwgy.vue
  13. 38
      src/views/dataBoard/overview/components/map-top.vue
  14. 71
      src/views/dataBoard/overview/components/sq12345.vue
  15. 22
      src/views/dataBoard/overview/index.vue
  16. 6
      src/views/dataBoard/renfang/cpts/bread.vue
  17. 1702
      src/views/dataBoard/renfang/index.vue
  18. 673
      src/views/dataBoard/renfang/resi/class.vue
  19. 256
      src/views/dataBoard/renfang/visualizing/components/dangyuan.vue
  20. 57
      src/views/dataBoard/renfang/visualizing/components/dataTitle.vue
  21. 465
      src/views/dataBoard/renfang/visualizing/components/dibaorenyuan.vue
  22. 266
      src/views/dataBoard/renfang/visualizing/components/laonianren.vue
  23. 573
      src/views/dataBoard/renfang/visualizing/components/shiyerenyuan.vue
  24. 240
      src/views/dataBoard/renfang/visualizing/components/zhiyuanzhe.vue
  25. 94
      src/views/dataBoard/renfang/visualizing/index.vue
  26. 2
      src/views/dataBoardMain/main-navbar.vue

BIN
src/assets/images/shuju/overview/dwzz-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/assets/images/shuju/overview/gyg-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/images/shuju/overview/lzz-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/images/shuju/overview/sqgzz-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/assets/images/shuju/overview/top-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
src/assets/images/shuju/overview/wgy-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/assets/images/shuju/overview/xztop-bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
src/assets/images/shuju/overview/zyz-icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

159
src/assets/scss/dataBoard/overview/index.scss

@ -261,6 +261,7 @@
.m-jdwgy {
height: 220px;
padding: 20px 16px;
}
.m-rfsjtj {
@ -386,18 +387,24 @@
.item {
display: flex;
width: 120px;
width: 140px;
height: 70px;
background: url(../../../../assets/images/shuju/overview/top-bg.png);
background-size: 140px 70px;
padding: 8px 16px;
background-repeat: no-repeat;
.item-info {
height: 14px;
line-height: 40px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-family: PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.65);
line-height: 40px;
vertical-align: bottom;
color: #FFFFFF;
margin: 0 auto;
div {
margin-bottom: 6px;
margin-bottom: 3px;
&:first-child {
line-height: 20px;
@ -413,16 +420,69 @@
}
b {
font-weight: 500;
font-size: 24px;
color: #ffffff;
padding-left: 28px;
height: 23px;
font-size: 30px;
font-family: DIN Alternate;
font-weight: bold;
font-style: italic;
color: #3CF5FF;
}
}
}
.item:nth-child(1) {
.item-info {
b {
color: #F37346;
}
}
}
.item:nth-child(2) {
.item-info {
b {
color: #3CF5FF;
}
}
}
.item:nth-child(3) {
.item-info {
b {
color: #3CF5FF;
}
}
}
.item:nth-child(4) {
.item-info {
b {
color: #FFB73C;
}
}
}
.item:nth-child(5) {
.item-info {
b {
color: #64C1FF;
}
}
}
.item:nth-child(6) {
.item-info {
b {
color: #FFB73C;
}
}
}
}
.m-sqrfph {
padding: 16px;
padding: 24px 16px;
.table {
.tr {
@ -496,6 +556,85 @@
}
}
.m-sq12345 {
padding: 24px 16px;
.table {
.tr {
display: flex;
height: 40px;
.th {
width: 110px;
height: 40px;
line-height: 40px;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #A3B9DA;
}
.th:nth-child(1) {
width: 65px;
text-align: center;
}
.td {
height: 40px;
line-height: 40px;
width: 110px;
height: 14px;
font-size: 14px;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
.tdbg1 {
height: 40px;
background: url(../../../../assets/images/shuju/overview/no1-bg.png);
background-repeat: no-repeat;
background-size: 30px 12px;
background-position: center center;
}
.tdbg2 {
height: 40px;
background: url(../../../../assets/images/shuju/overview/no2-bg.png);
background-repeat: no-repeat;
background-size: 30px 12px;
background-position: center center;
}
.tdbg3 {
height: 40px;
background: url(../../../../assets/images/shuju/overview/no3-bg.png);
background-repeat: no-repeat;
background-size: 30px 12px;
background-position: center center;
}
.td-or {
color: #FFB73C;
}
.td-gr {
color: #06CD9B;
}
.td:nth-child(1) {
width: 65px;
text-align: center;
}
}
.tr:nth-child(even) {
background: rgba(14, 56, 115, 0.4);
}
}
}
.date-span {
float: right;
width: 90px;

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

@ -10,10 +10,12 @@
.g-left {
width: 480px;
}
.g-center {
position: relative;
width: 820px;
}
.g-right {
width: 480px;
}
@ -33,6 +35,7 @@
left: 0;
width: 100%;
background-color: transparent;
.btn {
position: relative;
width: 213px;
@ -40,7 +43,7 @@
cursor: pointer;
opacity: 0.8;
> span {
>span {
position: absolute;
top: 0;
right: 27px;
@ -52,16 +55,20 @@
font-weight: 400;
color: #6fdeff;
}
> img {
>img {
display: block;
width: 213px;
&.btn-bg-hover {
display: none;
}
}
&:hover {
opacity: 1;
> img {
>img {
.btn-bg {
display: none;
}
@ -110,6 +117,7 @@
line-height: 22px;
background: transparent;
border: none;
&::placeholder {
color: rgba(255, 255, 255, 0.65);
}
@ -118,6 +126,7 @@
.card-btn {
padding: 10px;
cursor: pointer;
img {
display: block;
width: 16px;
@ -138,7 +147,7 @@
display: flex;
align-items: center;
> div {
>div {
padding: 0 17px;
&.z-on,
@ -149,13 +158,14 @@
}
.card-empty {
> img {
>img {
display: block;
width: 120px;
margin: 0 auto;
margin-top: 80px;
}
> span {
>span {
margin-top: 8px;
display: block;
font-size: 14px;
@ -172,6 +182,7 @@
height: 230px;
overflow-y: auto;
@include scrollBar;
.card-item {
display: flex;
align-items: center;
@ -186,20 +197,26 @@
color: #ffffff;
cursor: pointer;
opacity: 0.85;
&:nth-child(2n) {
background: transparent;
}
.i-arrow {
margin-left: auto;
width: 16px;
&.z-on {
display: none;
}
}
&:hover {
opacity: 1;
.i-arrow {
display: none;
&.z-on {
display: block;
}
@ -210,6 +227,7 @@
}
}
}
.m-search2 {
position: absolute;
z-index: 70;
@ -223,6 +241,7 @@
border-radius: 4px;
border: 1px solid #1a95ff;
margin-right: 16px;
::v-deep .el-range-input {
background: transparent;
border: none;
@ -230,11 +249,13 @@
}
}
}
.m-box {
.box-title {
position: relative;
width: 100%;
height: 56px;
&-bg {
position: absolute;
top: 0;
@ -245,6 +266,7 @@
height: 56px;
height: 100%;
}
&-txt {
position: relative;
display: block;
@ -256,6 +278,7 @@
color: #ffffff;
line-height: 48px;
}
&-btn {
position: absolute;
z-index: 1;
@ -269,6 +292,7 @@
font-weight: 500;
color: #6fdeff;
cursor: pointer;
img {
width: 16px;
height: 16px;
@ -278,13 +302,14 @@
}
.empty {
> img {
>img {
display: block;
width: 120px;
margin: 0 auto;
margin-top: 80px;
}
> span {
>span {
margin-top: 8px;
display: block;
font-size: 14px;
@ -302,11 +327,14 @@
height: 423px;
overflow-y: auto;
}
.m-szsq {
height: 115px;
}
.m-rkyj {
height: 423px;
&.z-shrink {
height: 253px;
}
@ -334,12 +362,15 @@
color: rgba(255, 255, 255, 0.65);
line-height: 40px;
vertical-align: bottom;
div {
margin-bottom: 6px;
&:first-child {
line-height: 20px;
}
}
img {
display: inline-block;
margin-right: 5px;
@ -347,6 +378,7 @@
height: 20px;
vertical-align: bottom;
}
b {
font-weight: 500;
font-size: 24px;
@ -402,6 +434,7 @@
margin-left: 20px;
width: 80px;
flex-shrink: 0;
b {
font-size: 20px;
font-weight: bold;
@ -433,6 +466,7 @@
background: rgba(111, 222, 255, 0.15);
border-radius: 1px;
overflow: hidden;
b {
position: relative;
display: block;
@ -455,6 +489,7 @@
}
}
}
.linecharts {
@include scrollBar;
padding-right: 5px;
@ -500,6 +535,7 @@
margin-left: 20px;
width: 80px;
flex-shrink: 0;
b {
font-size: 20px;
font-weight: bold;
@ -531,6 +567,7 @@
background: rgba(111, 222, 255, 0.15);
border-radius: 1px;
overflow: hidden;
b {
position: relative;
display: block;
@ -552,6 +589,7 @@
}
}
}
.tablist {
margin-top: 8px;
display: flex;
@ -579,12 +617,15 @@
background-size: cover;
}
}
.pieMain {
display: flex;
justify-content: space-between;
margin-left: 25px;
.legend {
margin-top: 40px;
.legend-row {
margin-top: 15px;
display: flex;
@ -676,6 +717,7 @@
height: 270px;
}
}
.pieMain2 {
.pie {
margin-top: 32px;
@ -683,6 +725,7 @@
height: 270px;
}
}
.pieMain3 {
.pie {
margin-top: 32px;
@ -690,6 +733,7 @@
height: 480px !important;
}
}
.kuangkuang {
height: 122px;
width: 100%;
@ -707,6 +751,7 @@
text-align: center;
color: #fff;
overflow: hidden;
h3 {
font-size: 14px;
font-weight: 400;
@ -714,6 +759,7 @@
line-height: 20px;
margin-top: 16px;
}
h2 {
font-size: 32px;
@ -723,6 +769,27 @@
letter-spacing: 2px;
}
}
.cur {
cursor: pointer;
}
.visualizing {
display: flex;
justify-content: space-between;
&-left {
width: 50%;
height: 400px;
}
&-right {
width: 50%;
height: 400px;
}
&-item {
width: 450px;
height: 400px;
}
}

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

File diff suppressed because it is too large

46
src/views/dataBoard/overview/components/jdwgy.vue

@ -1,16 +1,32 @@
<template>
<div class="m-subbox m-jdwgy"></div>
</template>
<script>
export default {
name: "jdwgy",
data() {},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/overview/index.scss"
scoped
></style>
<div class="m-subbox m-jdwgy">
<div class="table">
<el-table :data="list">
<el-table-column label="序号" type="index" width="80" />
<el-table-column prop="address" width="120" label="所属社区" />
<el-table-column prop="name" width="120" label="姓名" />
<el-table-column prop="sex" width="120" label="性别" />
<el-table-column prop="old" width="120" label="年龄" />
<el-table-column prop="tel" label="电话" />
<el-table-column prop="operate" width="120" label="操作" />
</el-table>
</div>
</div>
</template>
<script>
export default {
name: "jdwgy",
data() {
return {
list: [{}, {}, {}],
};
},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/overview/index.scss"
scoped
></style>
<style lang="scss" src="@/assets/scss/dataBoard/table.scss" scoped></style>

38
src/views/dataBoard/overview/components/map-top.vue

@ -3,44 +3,44 @@
<div class="item">
<div class="item-info">
<div>
<img src="~@/assets/images/shuju/renfang/index/per/lnr.png" />老年人
<img src="~@/assets/images/shuju/overview/sqgzz-icon.png" />
社区工作者
</div>
<div>
<b></b>
%
<b>5</b>
</div>
</div>
</div>
<div class="item">
<div class="item-info">
<div>
<img src="~@/assets/images/shuju/renfang/index/per/qsn.png" />青少年
<img src="~@/assets/images/shuju/overview/wgy-icon.png" />
网格员
</div>
<div>
<b></b>
%
<b>19</b>
</div>
</div>
</div>
<div class="item">
<div class="item-info">
<div>
<img src="~@/assets/images/shuju/renfang/index/per/zyz.png" />志愿者
<img src="~@/assets/images/shuju/overview/lzz-icon.png" />
楼组/单元长
</div>
<div>
<b></b>
%
<b>52</b>
</div>
</div>
</div>
<div class="item">
<div class="item-info">
<div>
<img src="~@/assets/images/shuju/renfang/index/per/dy.png" />党员
<img src="~@/assets/images/shuju/overview/gyg-icon.png" />
公益岗
</div>
<div>
<b></b>
%
<b>23</b>
</div>
</div>
</div>
@ -48,24 +48,22 @@
<div class="item-info">
<div>
<img
src="~@/assets/images/shuju/renfang/index/per/syry.png"
/>
src="~@/assets/images/shuju/overview/dwzz-icon.png"
/>/
</div>
<div>
<b></b>
%
<b>12</b>
</div>
</div>
</div>
<div class="item">
<div class="item-info">
<div>
<img src="~@/assets/images/shuju/renfang/index/per/ygxl.png" />
月更新率
<img src="~@/assets/images/shuju/overview/zyz-icon.png" />
志愿者
</div>
<div>
<b></b>
%
<b>78</b>
</div>
</div>
</div>

71
src/views/dataBoard/overview/components/sq12345.vue

@ -1,10 +1,77 @@
<template>
<div class="m-subbox"></div>
<div class="m-subbox m-sq12345">
<div class="table">
<div class="tr">
<div class="th">排名</div>
<div class="th">社区</div>
<div class="th">事件数</div>
<div class="th">处理中</div>
<div class="th">已办结</div>
</div>
<div class="tr" v-for="item in pmList" :key="item.num">
<div :class="item.num < 4 ? `td tdbg${item.num}` : 'td'">
{{ item.num }}
</div>
<div class="td">{{ item.shequ }}</div>
<div class="td">{{ item.fwgxs }}</div>
<div class="td td-or">{{ item.rkgxs }}</div>
<div class="td td-gr">{{ item.rfgxzs }}</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "sq12345",
data() {},
data() {
return {
value2: "2023-02",
pmList: [
{
num: "1",
shequ: "XX社区",
fwgxs: "350",
rkgxs: "12",
rfgxzs: "410",
},
{
num: "2",
shequ: "XX社区",
fwgxs: "350",
rkgxs: "12",
rfgxzs: "410",
},
{
num: "3",
shequ: "XX社区",
fwgxs: "350",
rkgxs: "12",
rfgxzs: "410",
},
{
num: "4",
shequ: "XX社区",
fwgxs: "350",
rkgxs: "12",
rfgxzs: "410",
},
{
num: "5",
shequ: "XX社区",
fwgxs: "350",
rkgxs: "12",
rfgxzs: "410",
},
{
num: "6",
shequ: "XX社区",
fwgxs: "350",
rkgxs: "12",
rfgxzs: "410",
},
],
};
},
};
</script>

22
src/views/dataBoard/overview/index.vue

@ -58,7 +58,20 @@
<sqrfph />
</div>
<div class="m-box">
<Title text="各社区12345投诉事件统计" />
<Title text="各社区12345投诉事件统计">
<span class="date-span">
<el-date-picker
v-model="rfphDate"
format="yyyy-MM"
value-format="yyyy-MM"
@change="change"
type="month"
:clearable="false"
placeholder="选择月"
>
</el-date-picker>
</span>
</Title>
<sq12345 />
</div>
</div>
@ -125,7 +138,7 @@ export default {
{
orgId: "",
orgLevel: "",
meta: { title: "人房总览3" },
meta: { title: "人房总览" },
},
],
@ -177,7 +190,7 @@ export default {
},
clickAgencyItem(item) {
console.log(item);
console.log('clickAgencyItem(item)::',item);
this.toBread({
orgId: item.id,
orgLevel: item.level,
@ -186,6 +199,7 @@ export default {
},
toBread(item) {
console.log("toBread::", item);
const { orgId } = item;
const { breadList } = this;
let index = breadList.findIndex((val) => val.orgId === orgId);
@ -229,6 +243,7 @@ export default {
);
if (code === 0) {
console.log("data::", data);
let info = data[0];
this.orgData = {
...info,
@ -294,7 +309,6 @@ export default {
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.orgData = data;
this.orgId = this.orgId;

6
src/views/dataBoard/renfang/cpts/bread.vue

@ -46,7 +46,11 @@
pageNo: 1,
};
},
watch: {},
watch: {
separator(value){
console.log('value::', value)
}
},
computed: {
...mapGetters(["clientHeight", "iframeHeight"]),
},

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

File diff suppressed because it is too large

673
src/views/dataBoard/renfang/resi/class.vue

@ -1,340 +1,351 @@
<template>
<div class="g-pgi">
<!-- 组织路由 -->
<cpt-bread :separator="'/'" @tap="handleClickBreadItem" :breadList="breadList"></cpt-bread>
<div class="m-title">
<img class="title_img" src="@/assets/images/index/list-logo.png" alt />
<div class="tip_title">{{ tableTitle }}</div>
<div class="title_line"></div>
<div class="second-select" v-if="type_id == 'special_popu'">
<el-select v-model="subclassId" :popper-append-to-body="false" placeholder="请选择">
<el-option v-for="item in subclassList" :key="item.value" :label="item.label" :value="item.value" @click.native="handleChangeDate(item.value)"></el-option>
</el-select>
</div>
</div>
<div class="g-listbox">
<cpt-tb
:col-list="colList"
:loading="loading"
:header="header"
:list="list"
:total="total"
@handleSizeChange="handleSizeChange"
@handlePageNoChange="handlePageNoChange"
@operate="showInfo"
></cpt-tb>
</div>
<resi-details @close="displayedResiId = ''" :resi-id="displayedResiId" v-if="displayedResiId" />
</div>
<div class="g-pgi">
<!-- 组织路由 -->
<cpt-bread
:separator="'/'"
@tap="handleClickBreadItem"
:breadList="breadList"
></cpt-bread>
<div class="m-title">
<img class="title_img" src="@/assets/images/index/list-logo.png" alt />
<div class="tip_title">{{ tableTitle }}</div>
<div class="title_line"></div>
<div class="second-select" v-if="type_id == 'special_popu'">
<el-select
v-model="subclassId"
:popper-append-to-body="false"
placeholder="请选择"
>
<el-option
v-for="item in subclassList"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="handleChangeDate(item.value)"
></el-option>
</el-select>
</div>
</div>
<div class="g-listbox">
<cpt-tb
:col-list="colList"
:loading="loading"
:header="header"
:list="list"
:total="total"
@handleSizeChange="handleSizeChange"
@handlePageNoChange="handlePageNoChange"
@operate="showInfo"
></cpt-tb>
</div>
<resi-details
@close="displayedResiId = ''"
:resi-id="displayedResiId"
v-if="displayedResiId"
/>
</div>
</template>
<script>
import cptTb from '@/views/dataBoard/cpts/tb';
import cptBread from '@/views/dataBoard/renfang/cpts/bread';
import resiDetails from '@/views/dataBoard/cpts/resi-details';
import { requestPostBi } from '@/js/dai/request-bipass';
import getQueryPara from 'dai-js/modules/getQueryPara';
import cptTb from "@/views/dataBoard/cpts/tb";
import cptBread from "@/views/dataBoard/renfang/cpts/bread";
import resiDetails from "@/views/dataBoard/cpts/resi-details";
import { requestPostBi } from "@/js/dai/request-bipass";
import getQueryPara from "dai-js/modules/getQueryPara";
export default {
name: 'resi-list',
components: {
cptTb,
cptBread,
resiDetails
},
data() {
return {
breadList: [
{
type: 'back',
meta: {
title: '人房总览'
}
},
{
meta: {
title: '居民类别'
}
}
],
tableTitle: '居民类别',
searchName: '',
pageType: '',
orgLevel: '',
org_id: '',
type_id: '', //
type_name: '',
loading: true,
pageSize: parseInt(localStorage.getItem('dataBoard_PageSize')) || 20,
pageNo: 1,
total: 0,
srcTableData: [],
list: [],
colList: [
{
align: 'left',
width: '5%'
},
{
align: 'left',
width: '10%'
},
{
align: 'left',
width: '20%'
},
{
align: 'left',
width: '20%'
},
{
align: 'left',
width: '15%'
},
{
align: 'left',
width: '10%'
},
{
align: 'left',
width: '5%'
},
{
align: 'left',
width: '10%'
},
{
align: 'left',
width: '10%'
}
],
header: ['序号', '姓名', '所属网格', '所属房屋', '联系电话', '证件号', '性别', '出生日期', '操作'],
displayedResiId: '',
subclassList: [],
subclassId: ''
};
},
activated() {
this.org_id = getQueryPara('org_id');
this.type_id = getQueryPara('type_id');
this.pageType = getQueryPara('pageType');
this.type_name = getQueryPara('type_name');
const type_name = getQueryPara('type_name');
this.breadList[1].meta.title = type_name + '居民列表';
this.tableTitle = type_name + '居民列表';
this.pageNo = 1;
this.getList();
this.getCount();
if (this.type_id == 'special_popu') {
this.getSubclass();
}
},
created() {
this.pageNo = 1;
},
watch: {
$route(to, from) {
this.$router.go(0);
},
subclassId: {
handler(newVal, oldVal) {
this.pageNo = 1;
this.getList();
this.getCount();
}
}
},
methods: {
handleClickBreadItem({ item }) {
if (item.type == 'back') {
this.$router.back();
}
},
handleSearch() {},
showInfo(index) {
let item = this.srcTableData[index];
this.displayedResiId = item.user_id;
},
handlePageNoChange(pageNo) {
this.pageNo = pageNo;
this.getList();
},
handleSizeChange(pageSize) {
localStorage.setItem('dataBoard_PageSize', pageSize);
this.pageSize = pageSize;
this.getList();
},
async getSubclass() {
console.log('=================getSubclass');
const { org_id, type_id } = this;
this.loading = true;
const url = 'special_type_list';
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type_id
}
},
{
// mockId: 62648939,
}
);
this.loading = false;
if (code === 0) {
this.subclassList = data.map((item, index) => {
return {
label: item.type_name,
value: item.type_id
};
});
} else {
this.$message.error(msg);
}
},
async getList() {
const { org_id, type_id, subclassId, pageNo, pageSize } = this;
this.loading = true;
let url = '';
let queryParam = {};
if (this.pageType == 'normal') {
url = 'resident_class_list';
queryParam = {
org_id,
type_id: subclassId || type_id,
pageNo,
pageSize
};
} else {
url = 'resident_class_predict_list';
queryParam = {
org_id,
resi_class_name: this.type_name,
page_num: pageNo,
page_size: pageSize
};
}
const { data, code, msg } = await requestPostBi(
url,
{
queryParam
},
{
// mockId: 60069169,
}
);
this.loading = false;
if (code === 0) {
this.srcTableData = data;
// this.total = data.total;
if (this.pageType == 'normal') {
this.list = data.map((item, index) => {
return [
index + 1,
item.user_name ? item.user_name : '--',
item.grid ? item.grid : '--',
item.house ? item.house : '--',
item.telephone ? item.telephone : '--',
item.idcard ? item.idcard : '--',
item.gender ? item.gender : '--',
item.birthday ? item.birthday : '--',
{ type: 'operate', list: ['查看'] }
];
});
} else {
this.list = data.map((item, index) => {
return [
index + 1,
item.name ? item.name : '--',
item.grid ? item.grid : '--',
item.room ? item.room : '--',
item.telephone ? item.telephone : '--',
item.idcard ? item.idcard : '--',
item.gender ? item.gender : '--',
item.birthday ? item.birthday : '--',
{ type: 'operate', list: ['查看'] }
];
});
}
} else {
this.$message.error(msg);
}
},
async getCount() {
const { org_id, type_id, subclassId, pageNo, pageSize } = this;
let url = '';
let queryParam = {};
if (this.pageType == 'normal') {
url = 'resident_class_list_total';
queryParam = {
org_id,
type_id: subclassId || type_id,
pageNo,
pageSize
};
} else {
url = 'resident_class_predict_total';
queryParam = {
org_id,
resi_class_name: this.type_name,
page_num: pageNo,
page_size: pageSize
};
}
const { data, code, msg } = await requestPostBi(
url,
{
queryParam
},
{
// mockId: 63070913,
}
);
if (code === 0) {
this.total = parseInt(data[0].count);
} else {
this.$message.error(msg);
}
}
},
destroyed() {
console.log('我已经离开了!');
}
name: "resi-list",
components: {
cptTb,
cptBread,
resiDetails,
},
data() {
return {
breadList: [
{
type: "back",
meta: {
title: "人房总览",
},
},
{
meta: {
title: "居民类别",
},
},
],
tableTitle: "居民类别",
searchName: "",
pageType: "",
orgLevel: "",
org_id: "",
type_id: "", //
type_name: "",
loading: true,
pageSize: parseInt(localStorage.getItem("dataBoard_PageSize")) || 20,
pageNo: 1,
total: 0,
srcTableData: [],
list: [],
colList: [
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "20%",
},
{
align: "left",
width: "15%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "5%",
},
{
align: "left",
width: "10%",
},
{
align: "left",
width: "10%",
},
],
header: [
"序号",
"姓名",
"所属网格",
"所属房屋",
"联系电话",
"证件号",
"性别",
"出生日期",
"操作",
],
displayedResiId: "",
subclassList: [],
subclassId: "",
};
},
activated() {
this.org_id = getQueryPara("org_id");
this.type_id = getQueryPara("type_id");
this.pageType = getQueryPara("pageType");
this.type_name = getQueryPara("type_name");
const type_name = getQueryPara("type_name");
this.breadList[1].meta.title = type_name + "居民列表";
this.tableTitle = type_name + "居民列表";
this.pageNo = 1;
this.getList();
this.getCount();
if (this.type_id == "special_popu") {
this.getSubclass();
}
},
created() {
this.pageNo = 1;
},
watch: {
$route(to, from) {
this.$router.go(0);
},
subclassId: {
handler(newVal, oldVal) {
this.pageNo = 1;
this.getList();
this.getCount();
},
},
},
methods: {
handleClickBreadItem({ item }) {
if (item.type == "back") {
this.$router.back();
}
},
handleSearch() {},
showInfo(index) {
let item = this.srcTableData[index];
this.displayedResiId = item.user_id;
},
handlePageNoChange(pageNo) {
this.pageNo = pageNo;
this.getList();
},
handleSizeChange(pageSize) {
localStorage.setItem("dataBoard_PageSize", pageSize);
this.pageSize = pageSize;
this.getList();
},
async getSubclass() {
const { org_id, type_id } = this;
this.loading = true;
const url = "special_type_list";
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id,
type_id,
},
},
{
// mockId: 62648939,
}
);
this.loading = false;
if (code === 0) {
this.subclassList = data.map((item, index) => {
return {
label: item.type_name,
value: item.type_id,
};
});
} else {
this.$message.error(msg);
}
},
async getList() {
const { org_id, type_id, subclassId, pageNo, pageSize } = this;
this.loading = true;
let url = "";
let queryParam = {};
if (this.pageType == "normal") {
url = "resident_class_list";
queryParam = {
org_id,
type_id: subclassId || type_id,
pageNo,
pageSize,
};
} else {
url = "resident_class_predict_list";
queryParam = {
org_id,
resi_class_name: this.type_name,
page_num: pageNo,
page_size: pageSize,
};
}
const { data, code, msg } = await requestPostBi(
url,
{
queryParam,
},
{
// mockId: 60069169,
}
);
this.loading = false;
if (code === 0) {
this.srcTableData = data;
// this.total = data.total;
if (this.pageType == "normal") {
this.list = data.map((item, index) => {
return [
index + 1,
item.user_name ? item.user_name : "--",
item.grid ? item.grid : "--",
item.house ? item.house : "--",
item.telephone ? item.telephone : "--",
item.idcard ? item.idcard : "--",
item.gender ? item.gender : "--",
item.birthday ? item.birthday : "--",
{ type: "operate", list: ["查看"] },
];
});
} else {
this.list = data.map((item, index) => {
return [
index + 1,
item.name ? item.name : "--",
item.grid ? item.grid : "--",
item.room ? item.room : "--",
item.telephone ? item.telephone : "--",
item.idcard ? item.idcard : "--",
item.gender ? item.gender : "--",
item.birthday ? item.birthday : "--",
{ type: "operate", list: ["查看"] },
];
});
}
} else {
this.$message.error(msg);
}
},
async getCount() {
const { org_id, type_id, subclassId, pageNo, pageSize } = this;
let url = "";
let queryParam = {};
if (this.pageType == "normal") {
url = "resident_class_list_total";
queryParam = {
org_id,
type_id: subclassId || type_id,
pageNo,
pageSize,
};
} else {
url = "resident_class_predict_total";
queryParam = {
org_id,
resi_class_name: this.type_name,
page_num: pageNo,
page_size: pageSize,
};
}
const { data, code, msg } = await requestPostBi(
url,
{
queryParam,
},
{
// mockId: 63070913,
}
);
if (code === 0) {
this.total = parseInt(data[0].count);
} else {
this.$message.error(msg);
}
},
},
destroyed() {
console.log("我已经离开了!");
},
};
</script>

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

@ -0,0 +1,256 @@
<template>
<div>
<div class="visualizing laonianren">
<div class="visualizing-left">
<div>
<data-title title="党员年龄统计" />
</div>
<div id="dyLeftChart" style="height: 400px"></div>
</div>
<div class="visualizing-right">
<div>
<data-title title="党员文化程度统计" />
</div>
<div id="dyRightChart" style="height: 400px"></div>
</div>
</div>
</div>
</template>
<script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts";
function dataFormatter(arr) {
return arr.map((item) => {
return {
name: item.classification,
value: Number(item.classificationNum),
};
});
}
export default {
name: "dangyuan",
props: {
title: {
type: String,
default: "详情",
},
},
components: {
dataTitle,
},
data() {
return {
dyLeft: [],
dyRight: [],
};
},
created() {
const query = this.$route.query;
this.getData();
},
activated() {},
methods: {
getData() {
this.$http
.get("/actual/base/peopleRoomOverview/partyPie?type=0")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dyLeft = dataFormatter(res.data);
this.initLeftCharts();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/partyPie?type=1")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dyRight = dataFormatter(res.data);
this.initRightCharts();
})
.catch(() => {});
},
initLeftCharts() {
let div = document.getElementById("dyLeftChart");
this.myChart1 = echarts.init(div);
var option = {
color: ["#60bce1", "#04c78f", "#fdaa00", "#f23800"],
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.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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.on("click", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
org_id: "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
type_id: "aged",
type_name: "党员",
pageType: "normal",
},
});
});
window.addEventListener("resize", () => this.myChart1.resize());
},
initRightCharts() {
let div = document.getElementById("dyRightChart");
this.myChart2 = echarts.init(div);
var option = {
color: ["#1b94fe", "#5a75ff", "#01c690", "#fdaa01"],
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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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.myChart1.on("click", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
org_id: "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
type_id: "aged",
type_name: "党员",
pageType: "normal",
},
});
});
this.myChart2.setOption(option);
window.addEventListener("resize", () => this.myChart2.resize());
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/renfang/index.scss"
scoped
></style>
<style lang="scss" scoped>
.laonianren {
padding: 140px 240px;
}
</style>

57
src/views/dataBoard/renfang/visualizing/components/dataTitle.vue

@ -0,0 +1,57 @@
<template>
<div class="m-title">
<img class="title_img" src="@/assets/images/index/list-logo.png" alt />
<div class="tip_title">{{ title }}</div>
<div class="title_line"></div>
</div>
</template>
<script>
export default {
name: "dataTitle",
props: {
title: {
type: String,
default: "详情",
},
},
components: {
},
data() {
return {};
},
methods: {},
};
</script>
<style lang="scss" scoped>
.m-title {
display: flex;
align-items: center;
margin-top: 15px;
.title_img {
width: 17px;
height: 17px;
}
.tip_title {
margin-left: 8px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 22px;
}
.title_line {
margin-left: 8px;
width: 244px;
height: 1px;
background: linear-gradient(
270deg,
rgba(55, 198, 255, 0.1) 0%,
#1995ff 100%
);
}
}
</style>

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

@ -0,0 +1,465 @@
<template>
<div class="dibaorenyuan">
<div class="visualizing">
<div class="visualizing-left">
<div>
<data-title title="低保类别统计" />
</div>
<div id="dbryChart1" style="height: 380px"></div>
</div>
<div class="visualizing-right">
<div>
<data-title title="低保显示原因统计" />
</div>
<div id="dbryChart2" style="height: 380px"></div>
</div>
</div>
<div class="visualizing">
<div class="visualizing-left">
<div>
<data-title title="温暖找人统计" />
</div>
<div id="dbryChart3" style="height: 380px"></div>
</div>
<div class="visualizing-right">
<div>
<data-title title="服务找人统计" />
</div>
<div id="dbryChart4" style="height: 380px"></div>
</div>
</div>
</div>
</template>
<script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts";
function dataFormatter(arr) {
return arr.map((item) => {
let name = "";
const arr = Array.from(item.classification);
arr.forEach((d, i) => {
if ((i + 1) % 5 == 0&&i!=arr.length-1) {
name = name + d + "\n";
} else {
name = name + d;
}
});
return {
name: name,
value: Number(item.classificationNum),
};
});
}
export default {
name: "dibaorenyuan",
props: {
title: {
type: String,
default: "详情",
},
},
components: {
dataTitle,
},
data() {
return {
dbryData1: [],
dbryData2: [],
dbryData3: [],
dbryData4: [],
};
},
created() {
const query = this.$route.query;
this.getData();
},
methods: {
getData() {
this.$http
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=0")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dbryData1 = dataFormatter(res.data);
this.dbryDataCharts1();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=1")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dbryData2 = dataFormatter(res.data);
this.dbryDataCharts2();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=2")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dbryData3 = dataFormatter(res.data);
this.dbryDataCharts3();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/lowIncomePie?type=3")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.dbryData4 = dataFormatter(res.data);
this.dbryDataCharts4();
})
.catch(() => {});
},
dbryDataCharts1() {
let div = document.getElementById("dbryChart1");
this.myChart1 = echarts.init(div);
var option = {
color: ["#60bce1", "#04c78f", "#fdaa00", "#f23800"],
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,
formatter: (name) => {
if (this.dbryData1.length) {
const item = this.dbryData1.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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.on("click", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
type_id: "mlsp",
type_name: "低保人员",
pageType: "normal",
},
});
});
window.addEventListener("resize", () => this.myChart1.resize());
},
dbryDataCharts2() {
let div = document.getElementById("dbryChart2");
this.myChart2 = echarts.init(div);
var option = {
color: ["#1b94fe", "#5a75ff", "#01c690", "#fdaa01"],
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.dbryData2,
formatter: (name) => {
if (this.dbryData2.length) {
const item = this.dbryData2.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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.on("click", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
type_id: "mlsp",
type_name: "低保人员",
pageType: "normal",
},
});
});
window.addEventListener("resize", () => this.myChart2.resize());
},
dbryDataCharts3() {
let div = document.getElementById("dbryChart3");
this.myChart3 = echarts.init(div);
var option = {
color: ["#60bce1", "#04c78f", "#fdaa00", "#f23800"],
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,
formatter: (name) => {
if (this.dbryData3.length) {
const item = this.dbryData3.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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.on("click", (a, b) => {
console.log(a, b);
});
window.addEventListener("resize", () => this.myChart3.resize());
},
dbryDataCharts4() {
let div = document.getElementById("dbryChart4");
this.myChart4 = echarts.init(div);
var option = {
color: ["#1b94fe", "#5a75ff", "#01c690", "#fdaa01"],
legend: {
type: "scroll",
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.dbryData4,
formatter: (name) => {
if (this.dbryData4.length) {
const item = this.dbryData4.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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);
window.addEventListener("resize", () => this.myChart4.resize());
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/renfang/index.scss"
scoped
></style>
<style lang="scss" scoped>
.dibaorenyuan {
padding: 0px 240px;
}
#dbryChart3 {
.echarts-legend {
white-space: normal;
}
}
:v-deep #dbryChart3 {
.echarts-legend span {
padding: 5px 0;
display: block;
}
}
</style>

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

@ -0,0 +1,266 @@
<template>
<div>
<div class="visualizing laonianren">
<div class="visualizing-left">
<div>
<data-title title="老年人年龄统计" />
</div>
<div id="lnrLeftChart" style="height: 400px"></div>
</div>
<div class="visualizing-right">
<div>
<data-title title="老年人居住情况统计" />
</div>
<div id="lnrRightChart" style="height: 400px"></div>
</div>
</div>
</div>
</template>
<script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts";
function dataFormatter(arr) {
return arr.map((item) => {
return {
name: item.classification,
value: Number(item.classificationNum),
};
});
}
export default {
name: "laonianren",
props: {
title: {
type: String,
default: "详情",
},
},
components: {
dataTitle,
},
data() {
return {
lnrLeft: [
{ value: 108, name: "60-69" },
{ value: 38, name: "70-79" },
{ value: 92, name: "80-89" },
{ value: 22, name: "90岁及以上" },
],
lnrRight: [
{ value: 66, name: "与子女同住" },
{ value: 70, name: "空巢" },
{ value: 71, name: "独居" },
{ value: 53, name: "其他" },
],
};
},
created() {
const query = this.$route.query;
this.getData();
},
activated() {},
methods: {
getData() {
this.$http
.get("/actual/base/peopleRoomOverview/oldPeopleAgePie")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.lnrLeft = dataFormatter(res.data);
this.initLeftCharts();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/oldPeopleResidePie")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.lnrRight = dataFormatter(res.data);
this.initRightCharts();
})
.catch(() => {});
},
initLeftCharts() {
let div = document.getElementById("lnrLeftChart");
this.myChart1 = echarts.init(div);
var option = {
color: ["#60bce1", "#04c78f", "#fdaa00", "#f23800"],
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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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.on("click", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
org_id: "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
type_id: "aged",
type_name: "老年人",
pageType: "normal",
},
});
});
window.addEventListener("resize", () => this.myChart1.resize());
},
initRightCharts() {
let div = document.getElementById("lnrRightChart");
this.myChart2 = echarts.init(div);
var option = {
color: ["#1b94fe", "#5a75ff", "#01c690", "#fdaa01"],
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}}`;
}
},
},
toolbox: {
show: false,
feature: {
mark: { show: true },
dataView: { show: true, readOnly: false },
restore: { show: true },
saveAsImage: { show: true },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
org_id: "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
type_id: "aged",
type_name: "老年人",
pageType: "normal",
},
});
});
this.myChart2.setOption(option);
window.addEventListener("resize", () => this.myChart2.resize());
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/renfang/index.scss"
scoped
></style>
<style lang="scss" scoped>
.laonianren {
padding: 140px 240px;
}
</style>

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

@ -0,0 +1,573 @@
<template>
<div>
<div class="visualizing">
<div class="visualizing-item">
<div>
<data-title title="失业人员失业原因统计" />
</div>
<div id="syryChart1" style="height: 380px"></div>
</div>
<div class="visualizing-item">
<div>
<data-title title="失业人员就业愿望统计" />
</div>
<div id="syryChart2" style="height: 380px"></div>
</div>
<div class="visualizing-item">
<div>
<data-title title="失业人员年龄统计" />
</div>
<div id="syryChart3" style="height: 380px"></div>
</div>
</div>
<div class="visualizing dibaorenyuan">
<div class="visualizing-left">
<div>
<data-title title="技能找人统计" />
</div>
<div id="syryChart4" style="height: 380px"></div>
</div>
<div class="visualizing-right">
<div>
<data-title title="岗位找人统计" />
</div>
<div id="syryChart5" style="height: 380px"></div>
</div>
</div>
</div>
</template>
<script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts";
function dataFormatter(arr) {
return arr.map((item) => {
let name = "";
const arr = Array.from(item.classification);
arr.forEach((d, i) => {
name = name + d;
if ((i + 1) % 5 == 0&&i!=arr.length-1) {
name = name + d + "\n";
}
});
return {
name: name,
value: Number(item.classificationNum),
};
});
}
function dataFormatter1(arr) {
return arr.map((item) => {
return {
name: item.classification,
value: Number(item.classificationNum),
};
});
}
export default {
name: "shiyerenyuan",
props: {
title: {
type: String,
default: "详情",
},
},
components: {
dataTitle,
},
data() {
return {
syryData1: [],
syryData2: [],
syryData3: [],
syryData4: [],
syryData5: [],
};
},
created() {
const query = this.$route.query;
this.getData();
},
methods: {
getData() {
this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=0")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData1 = dataFormatter(res.data);
this.syryDataCharts1();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=1")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData2 = dataFormatter1(res.data);
this.syryDataCharts2();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=2")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData3 = dataFormatter1(res.data);
this.syryDataCharts3();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=3")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData4 = dataFormatter(res.data);
this.syryDataCharts4();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/unemployedPie?type=4")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.syryData5 = dataFormatter(res.data);
this.syryDataCharts5();
})
.catch(() => {});
},
syryDataCharts1() {
let div = document.getElementById("syryChart1");
this.myChart1 = echarts.init(div);
var option = {
color: ["#60bce1", "#04c78f", "#fdaa00", "#f23800"],
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.syryData1,
formatter: (name) => {
if (this.syryData1.length) {
const item = this.syryData1.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData1,
},
],
};
this.myChart1.setOption(option);
this.myChart1.on("click", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
org_id: "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
type_id: "aged",
type_name: "失业人员失业原因",
pageType: "normal",
},
});
});
window.addEventListener("resize", () => this.myChart1.resize());
},
syryDataCharts2() {
let div = document.getElementById("syryChart2");
this.myChart2 = echarts.init(div);
var option = {
color: ["#1b94fe", "#5a75ff", "#01c690", "#fdaa01"],
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.syryData2,
formatter: (name) => {
if (this.syryData2.length) {
const item = this.syryData2.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData2,
},
],
};
this.myChart2.setOption(option);
this.myChart2.on("click", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
org_id: "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
type_id: "aged",
type_name: "失业人员就业愿望",
pageType: "normal",
},
});
});
window.addEventListener("resize", () => this.myChart2.resize());
},
syryDataCharts3() {
let div = document.getElementById("syryChart3");
this.myChart3 = echarts.init(div);
var option = {
color: ["#60bce1", "#04c78f", "#fdaa00", "#f23800"],
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.syryData3,
formatter: (name) => {
if (this.syryData3.length) {
const item = this.syryData3.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData3,
},
],
};
this.myChart3.setOption(option);
this.myChart3.on("click", (a, b) => {
this.$router.push({
path: "/dataBoard/renfang/resi-class",
query: {
org_id: "7b6f9a9f9f38d5f9fa7ce94a93d6eb28",
type_id: "aged",
type_name: "失业人员年龄",
pageType: "normal",
},
});
});
window.addEventListener("resize", () => this.myChart3.resize());
},
syryDataCharts4() {
let div = document.getElementById("syryChart4");
this.myChart4 = echarts.init(div);
var option = {
color: ["#1b94fe", "#5a75ff", "#01c690", "#fdaa01"],
legend: {
type: "scroll",
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.syryData4,
formatter: (name) => {
if (this.syryData4.length) {
const item = this.syryData4.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData4,
},
],
};
this.myChart4.setOption(option);
window.addEventListener("resize", () => this.myChart4.resize());
},
syryDataCharts5() {
let div = document.getElementById("syryChart5");
this.myChart5 = echarts.init(div);
var option = {
color: ["#1b94fe", "#5a75ff", "#01c690", "#fdaa01"],
legend: {
type: "scroll",
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.syryData5,
formatter: (name) => {
if (this.syryData5.length) {
const item = this.syryData5.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
center: ["50%", "50%"],
roseType: "area",
itemStyle: {
borderRadius: 0,
},
top: 20,
left: -40,
label: {
position: "inside",
formatter: "{d}%",
textStyle: {
color: "#ffffff",
fontSize: 12,
},
},
data: this.syryData5,
},
],
};
this.myChart5.setOption(option);
window.addEventListener("resize", () => this.myChart5.resize());
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/renfang/index.scss"
scoped
></style>
<style lang="scss" scoped>
.dibaorenyuan {
padding: 0px 240px;
}
#syryChart3 {
.echarts-legend {
white-space: normal;
}
}
:v-deep #syryChart3 {
.echarts-legend span {
padding: 5px 0;
display: block;
}
}
</style>

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

@ -0,0 +1,240 @@
<template>
<div>
<div class="visualizing laonianren">
<div class="visualizing-left">
<div>
<data-title title="志愿者年龄统计" />
</div>
<div id="zyzLeftChart" style="height: 400px"></div>
</div>
<div class="visualizing-right">
<div>
<data-title title="志愿者类别统计" />
</div>
<div id="zyzRightChart" style="height: 400px"></div>
</div>
</div>
</div>
</template>
<script>
import dataTitle from "@/views/dataBoard/renfang/visualizing/components/dataTitle.vue";
import * as echarts from "echarts";
function dataFormatter(arr) {
return arr.map((item) => {
return {
name: item.classification,
value: Number(item.classificationNum),
};
});
}
export default {
name: "zhiyuanzhe",
props: {
title: {
type: String,
default: "详情",
},
},
components: {
dataTitle,
},
data() {
return {
zyzLeft: [],
zyzRight: [],
};
},
created() {
const query = this.$route.query;
this.getData();
},
activated() {},
methods: {
getData() {
this.$http
.get("/actual/base/peopleRoomOverview/volunteerPie?type=0")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.zyzLeft = dataFormatter(res.data);
this.initLeftCharts();
})
.catch(() => {});
this.$http
.get("/actual/base/peopleRoomOverview/volunteerPie?type=1")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.zyzRight = dataFormatter(res.data);
this.initRightCharts();
})
.catch(() => {});
},
initLeftCharts() {
let div = document.getElementById("zyzLeftChart");
this.myChart1 = echarts.init(div);
var option = {
color: ["#60bce1", "#04c78f", "#fdaa00", "#f23800"],
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.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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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.on("click", (a, b) => {
console.log(a, b);
});
window.addEventListener("resize", () => this.myChart1.resize());
},
initRightCharts() {
let div = document.getElementById("zyzRightChart");
this.myChart2 = echarts.init(div);
var option = {
color: ["#1b94fe", "#5a75ff", "#01c690", "#fdaa01"],
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 },
},
},
series: [
{
name: "Nightingale Chart",
type: "pie",
radius: [30, 130],
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.myChart1.on("click", (a, b) => {
console.log(a, b);
});
this.myChart2.setOption(option);
window.addEventListener("resize", () => this.myChart2.resize());
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/renfang/index.scss"
scoped
></style>
<style lang="scss" scoped>
.laonianren {
padding: 140px 240px;
}
</style>

94
src/views/dataBoard/renfang/visualizing/index.vue

@ -0,0 +1,94 @@
<template>
<div>
<cpt-bread
@tap="clickBreadItem"
v-if="breadList.length > 1"
:bread-list="breadList"
/>
<laonianren v-if="pageName == '老年人'" />
<dibaorenyuan v-if="pageName == '低保人员'" />
<zhiyuanzhe v-if="pageName == '志愿者'" />
<dangyuan v-if="pageName == '党员'" />
<shiyerenyuan v-if="pageName == '失业人员'" />
</div>
</template>
<script>
import cptBread from "@/views/dataBoard/renfang/cpts/bread";
import laonianren from "./components/laonianren.vue";
import dibaorenyuan from "./components/dibaorenyuan.vue";
import zhiyuanzhe from "./components/zhiyuanzhe.vue";
import dangyuan from "./components/dangyuan.vue";
import shiyerenyuan from "./components/shiyerenyuan.vue";
export default {
name: "visualizing",
props: {
title: {
type: String,
default: "详情",
},
},
components: {
cptBread,
laonianren,
dibaorenyuan,
zhiyuanzhe,
dangyuan,
shiyerenyuan,
},
data() {
return {
pageName: "老年人",
breadList: [
{
type: "back",
meta: { title: "人房总览" },
},
],
};
},
created() {},
activated() {
const query = this.$route.query;
this.breadList = [
{
type: "back",
meta: { title: "人房总览" },
},
];
this.pageName = query.type_name;
this.toBread({
orgId: query.org_id,
orgLevel: query.type_id,
meta: { title: query.type_name },
});
},
mounted() {},
methods: {
clickBreadItem({ item }) {
if (item.type == "back") {
this.$router.back();
}
},
toBread(item) {
const { orgId } = item;
const { breadList } = this;
let index = breadList.findIndex((val) => val.orgId === orgId);
if (index >= 0) {
this.breadList = breadList.slice(0, index + 1);
} else {
breadList.push(item);
this.breadList = breadList;
}
console.log("breadList::", breadList);
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/dataBoard/renfang/index.scss"
scoped
></style>

2
src/views/dataBoardMain/main-navbar.vue

@ -27,7 +27,7 @@
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/organizational/index' }" @click="toPage('/dataBoard/organizational/index')">
<span>组织架构</span>
</div>
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/humanData/index' }" @click="toPage('/dataBoard/humanData/index')">
<div class="nav-item" :class="{ 'z-on': $route.path.indexOf('/dataBoard/renfang') != -1 }" @click="toPage('/dataBoard/renfang/index')">
<span>人房数据</span>
</div>
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/satisfactionEval/index' }" @click="toPage('/dataBoard/satisfactionEval/index')">

Loading…
Cancel
Save