Browse Source

柱状图-需求清单

shibei_master
13176889840 4 years ago
parent
commit
b850e41c9f
  1. BIN
      src/assets/img/shuju/measure/jgzs@2x.png
  2. BIN
      src/assets/img/shuju/measure/lxdj@2x.png
  3. BIN
      src/assets/img/shuju/measure/ly@2x.png
  4. BIN
      src/assets/img/shuju/measure/qita.png
  5. BIN
      src/assets/img/shuju/measure/xq@2x.png
  6. 401
      src/views/modules/visual/communityParty/community.vue
  7. 271
      src/views/modules/visual/measure/service.vue

BIN
src/assets/img/shuju/measure/jgzs@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/img/shuju/measure/lxdj@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/assets/img/shuju/measure/ly@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/img/shuju/measure/qita.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/assets/img/shuju/measure/xq@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

401
src/views/modules/visual/communityParty/community.vue

@ -0,0 +1,401 @@
<template>
<div class="warning-box">
<cpt-card class="card-wr">
<div class="card-title">
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label">
区域化党建
</div>
</div>
<div class="second-title">
<div class="second-title-label">党建单位分类统计</div>
<div class="second-select">
<el-select v-model="value2" clearable placeholder="请选择">
<el-option
v-for="item in headerList"
:key="item.coulmn"
:label="item.title"
:value="item.coulmn">
</el-option>
</el-select>
</div>
<div class="second-select">
<el-date-picker
v-model="value2"
type="date"
prefix-icon="el-icon-caret-bottom"
placeholder="选择日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
</div>
<div class="box-wr box-wr-400">
<div class="box-left">
<div class="box-left-item">
<div class="box-label">组织单位</div>
<div class="box-num">1233</div>
</div>
<div class="box-left-item">
<div class="box-label">组织活动</div>
<div class="box-num">1233</div>
</div>
</div>
<div class="box-right">
<div class="warning-box-bottom">
<screen-table
:headerList="headerList"
:tableData="tableData"
:visibleLoading="visibleLoading"
:operate="false"
></screen-table>
<div class="pagination">
<el-pagination
:current-page="pageNo"
:page-size="pageSize"
background
layout="prev, pager, next"
@size-change="pageSizeChangeHandleNew"
@current-change="pageCurrentChangeHandleNew"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
</div>
<div class="second-title">
<div class="second-title-label">党建单位分类统计</div>
</div>
<div class="box-wr">
<div class="box-left box-left-w400">
<div v-for="item in partyItem" :key="item.value" class="box-left-item">
<div class="box-label">{{ item.name }}</div>
<div class="box-num" :style="'color:' + item.color">{{ item.value }}</div>
</div>
</div>
<div class="box-right">
<div class="box-map">这是地图容器</div>
<div class="map-tips">
<div v-for="item in partyItem" :key="item.value" class="map-tips-item">
<div class="map-tips-icon">
<img :src="item.icon" />
</div>
<div class="map-tips-label">{{ item.name }}</div>
</div>
</div>
</div>
</div>
</cpt-card>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import screenTable from "../components/screen-table/index";
import cptCard from "@/views/modules/visual/cpts/card";
import nextTick from "dai-js/tools/nextTick";
export default {
name: "warning-box",
components: {
cptCard,
screenTable,
},
data() {
return {
warningList: [],
headerList: [
{ title: "序号", coulmn: 'index' },
{ title: "需求类型", coulmn: 'gridName' },
{ title: "具体内容", coulmn: 'buildingName' },
{ title: "上报情况", coulmn: 'neighborhoodName' },
{ title: "上报人", coulmn: 'residentNames' },
{ title: "上报时间", coulmn: 'residentNames' },
{ title: "是否认领", coulmn: 'residentNames' },
{ title: "认领方", coulmn: 'residentNames' },
{ title: "认领时间", coulmn: 'residentNames' }
],
tableData: [
// [1,'','','2',''],
],
value2: '',
visibleLoading: true,
pageNo: 1,
pageSize: 10,
total: 0,
activeIndex: 0,
activeLevel: "1",
partyItem: [
{
name: '楼宇党建',
value: 1,
color: 'rgba(250, 32, 10, 1)',
icon: require('../../../../assets/img/shuju/measure/ly@2x.png')
}, {
name: '机关直属部门',
value: 2,
color: 'rgba(65, 181, 104, 1)',
icon: require('../../../../assets/img/shuju/measure/jgzs@2x.png')
}, {
name: '两新党建',
value: 3,
color: 'rgba(251, 177, 4, 1)',
icon: require('../../../../assets/img/shuju/measure/lxdj@2x.png')
}, {
name: '辖区单位',
value: 4,
color: 'rgba(80, 194, 237, 1)',
icon: require('../../../../assets/img/shuju/measure/xq@2x.png')
}, {
name: '其他',
value: 5,
color: 'rgba(192, 21, 195, 1)',
icon: require('../../../../assets/img/shuju/measure/qita.png')
}
],
};
},
async mounted() {
await nextTick(100);
this.getBuildingwarnlist();
},
methods: {
onClickList(index, level) {
this.activeIndex = index;
this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
},
//
async getUserwarnlist() {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
let params = {
configId: reqItem.configId,
buildingIdList: reqItem["buildingIdList" + activeLevel],
pageNo: this.pageNo,
pageSize: this.pageSize,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
tableData = data.list.map((item, index) => {
return {
...item,
index: index + 1,
residentNames: item.residentNames || "暂无"
}
});
this.tableData = tableData;
this.total = data.total;
} else {
}
},
//
async getBuildingwarnlist() {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
let params = {
agencyId: this.$store.state.user.agencyId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.warningList = data;
this.visibleLoading = false;
this.getUserwarnlist();
} else {
}
},
pageSizeChangeHandleNew(val) {
this.pageNo = 1;
this.pageSize = val;
},
pageCurrentChangeHandleNew(val) {
this.pageNo = val;
this.getUserwarnlist();
},
},
};
</script>
<style
lang="scss"
src="@/assets/scss/modules/visual/warning.scss"
scoped
></style>
<style lang="scss" scoped>
.warning-box {
display: flex;
.card-wr {
flex: 1;
}
.card-wr:last-child {
margin-left: 20px;
}
}
.card-title {
display: flex;
align-items: center;
cursor: pointer;
.title-icon {
display: block;
width: 46px;
height: 34px;
box-sizing: border-box;
margin-right: 6px;
}
.title-label {
font-size: 16px;
font-weight: 800;
}
::v-deep .el-dropdown {
font-size: 16px;
color: #fff;
font-weight: 800;
}
}
.second-title {
display: flex;
align-items: center;
margin-top: 20px;
.second-title-label {
position: relative;
padding-left: 40px;
font-size: 16px;
font-weight: 500;
color: #fff;
}
.second-title-label::after {
content: '';
position: absolute;
top: 50%;
left: 20px;
width: 12px;
height: 12px;
box-sizing: border-box;
margin-top: -6px;
background: #2865FA;
border-radius: 50%;
}
.second-select {
margin: 0 10px 0 40px;
::v-deep .el-input {
width: 120px;
height: 36px;
.el-input__inner {
height: 100%;
padding: 0 10px;
color: #fff;
line-height: 36px;
background: #06186D;
border: 1px solid #1A64CC;
}
.el-icon-arrow-up:before {
content: "\e78f"
}
// .el-select__caret:before {
// content: '\E790'
// }
}
::v-deep .el-date-editor {
.el-input__prefix {
left: unset;
right: 5px;
}
}
}
.second-select:last-child {
margin-left: 0;
}
}
.box-wr {
display: flex;
box-sizing: border-box;
.box-left {
flex-shrink: 0;
display: flex;
.box-left-item {
.box-label {
font-size: 16px;
color: rgba(255, 255, 255, .72);
}
.box-num {
font-size: 32px;
font-weight: bold;
color: #fff;
}
}
}
.box-right {
flex: 1;
.box-map {
height: 400px;
border: 1px solid #2865FA;
}
}
.box-left-w400 {
flex-wrap: wrap;
width: 400px;
box-sizing: border-box;
padding-top: 60px;
padding-left: 100px;
.box-left-item {
width: 50%;
}
}
}
.box-wr-400 {
height: 400px;
.box-left {
width: 300px;
flex-direction: column;
justify-content: center;
align-items: center;
.box-left-item:last-child {
margin-top: 100px;
}
}
}
.map-tips {
width: 100%;
display: flex;
justify-content: center;
flex-wrap: wrap;
padding-top: 10px;
padding-bottom: 20px;
.map-tips-item {
display: flex;
align-items: center;
margin-top: 20px;
margin-right: 40px;
.map-tips-icon {
width: 32px;
height: 32px;
box-sizing: border-box;
margin-right: 10px;
// background: #DD2719;
// border-radius: 2px;
img {
display: block;
width: 100%;
height: 100%;
}
}
.map-tips-label {
font-size: 16px;
color: #fff;
}
}
}
</style>

271
src/views/modules/visual/measure/service.vue

@ -29,7 +29,7 @@
</div> </div>
</div> </div>
<div class="card-echart"> <!-- <div class="card-echart">
<div class="card-left"> <div class="card-left">
<div class="echart-wr"> <div class="echart-wr">
<div class="echart-cicle"></div> <div class="echart-cicle"></div>
@ -106,6 +106,10 @@
</div> </div>
</div> </div>
</div> </div>
</div> -->
<div class="echarts-container">
<div id="echartsBox" class="echarts-boxs"></div>
</div> </div>
<div class="warning-box-bottom"> <div class="warning-box-bottom">
@ -173,218 +177,125 @@ export default {
async mounted() { async mounted() {
await nextTick(100); await nextTick(100);
this.initCharts() this.initCharts()
this.initChartType() // this.initChartType()
this.getBuildingwarnlist(); this.getBuildingwarnlist();
}, },
methods: { methods: {
initCharts() { initCharts() {
const eId = document.getElementById('echartOrg') const eId = document.getElementById('echartsBox')
let _charts = echarts.init(eId) let _charts = echarts.init(eId)
let option = { let option = {
tooltip: { tooltip: {
show: false, trigger: 'axis',
trigger: 'item' axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
}
}, },
legend: { legend: {
show: false, top: 'bottom',
orient: 'vertical', bottom: 'bottom',
top: '40%',
left: 'right',
textStyle: { textStyle: {
color: '#fff' color: '#fff'
} }
}, },
title: { grid: {
text: '12000', //80% left: '3%',
subtext: '总数', right: '4%',
left: "center", bottom: '10%',
top: "center", containLabel: true
textStyle: { },
color: "#fff", xAxis: {
fontSize: 28, type: 'category',
align: "center" axisLabel: {
color: '#fff'
},
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value',
splitLine: {
show: false
}, },
subtextStyle: { axisLabel: {
fontSize: 16,
color: '#fff' color: '#fff'
} },
// axisLine: false
}, },
series: [ series: [
{ {
// name: 'Access From', name: '区域化党建单位',
type: 'pie', type: 'bar',
// center: ['10%', '50%'], stack: 'total',
radius: ['40%', '60%'], // barWidth: 20,
avoidLabelOverlap: false,
// top: top + '%',
// height: '80%',
left: 'center',
width: 400,
label: { label: {
show: true, show: true
position: 'outer',
alignTo: 'edge',
formatter: '{a|{c}}\n{r|}\n{name|{b}}',
minMargin: 5,
edgeDistance: 20,
lineHeight: 15,
color: '#fff',
fontSize: 12,
// padding: [5],
distanceToLabelLine: 10,
rich: {
name: {
padding: [0, 6, 0, 6]
},
a: {
fontSize: 15,
color: '#fff',
padding: [0, 6, 0, 6]
},
r: {
backgroundColor: 'auto',
borderRadius: 6,
width: 6,
height: 6,
// padding: [3, 3, 0, -12]
}
}
}, },
emphasis: { emphasis: {
label: { focus: 'series'
show: true,
fontSize: '14',
fontWeight: 'bold'
}
}, },
labelLine: { data: [320, 302, 301, 334, 390, 330, 320]
show: true, },
length: 20, {
length2: 0, name: '社会组织',
maxSurfaceAngle: 80, type: 'bar',
lineStyle: { stack: 'total',
cap: 'round' // barWidth: 20,
} label: {
show: true
}, },
labelLayout: function (params) { emphasis: {
const isLeft = params.labelRect.x < _charts.getWidth() / 2; focus: 'series'
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
}, },
data: [ data: [120, 132, 101, 134, 90, 230, 210]
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
]
}
]
}
option && _charts.setOption(option);
},
initChartType() {
const eId = document.getElementById('echartType')
let _charts = echarts.init(eId)
let option = {
tooltip: {
trigger: 'item'
},
legend: {
show: false,
orient: 'vertical',
top: '40%',
left: 'right',
textStyle: {
color: '#fff'
}
},
title: {
text: '12000', //80%
subtext: '总数',
left: "center",
top: "center",
textStyle: {
color: "#fff",
fontSize: 28,
align: "center"
}, },
subtextStyle: {
fontSize: 16,
color: '#fff'
}
},
series: [
{ {
// name: 'Access From', name: '社区自组织',
type: 'pie', type: 'bar',
// center: ['10%', '50%'], stack: 'total',
radius: ['40%', '60%'], // barWidth: 20,
avoidLabelOverlap: false,
// top: top + '%',
// height: '80%',
left: 'center',
width: 400,
label: { label: {
position: 'outer', show: true
alignTo: 'labelLine',
formatter: '{name|{b}}\n{time|{c} 小时}',
minMargin: 5,
edgeDistance: 20,
lineHeight: 15,
color: '#fff',
fontSize: 15,
rich: {
time: {
fontSize: 10,
color: '#fff'
}
}
}, },
emphasis: { emphasis: {
label: { focus: 'series'
show: true,
fontSize: '14',
fontWeight: 'bold'
}
}, },
labelLine: { data: [220, 182, 191, 234, 290, 330, 310]
show: true, },
length: 20, {
length2: 0, name: '志愿者',
maxSurfaceAngle: 80 type: 'bar',
stack: 'total',
// barWidth: 20,
label: {
show: true
}, },
labelLayout: function (params) { emphasis: {
const isLeft = params.labelRect.x < _charts.getWidth() / 2; focus: 'series'
const points = params.labelLinePoints;
// Update the end point.
points[2][0] = isLeft
? params.labelRect.x
: params.labelRect.x + params.labelRect.width;
return {
labelLinePoints: points
};
}, },
data: [ data: [150, 212, 201, 154, 190, 330, 410]
{ value: 1048, name: 'Search Engine' }, },
{ value: 735, name: 'Direct' }, {
{ value: 580, name: 'Email' }, name: '未完成',
{ value: 484, name: 'Union Ads' }, type: 'bar',
{ value: 300, name: 'Video Ads' } stack: 'total',
] // barWidth: 20,
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: [820, 832, 901, 934, 1290, 1330, 1320]
} }
] ]
} };
option && _charts.setOption(option); option && _charts.setOption(option);
}, },
onClickList(index, level) { onClickList(index, level) {
this.activeIndex = index; this.activeIndex = index;
this.activeLevel = level; this.activeLevel = level;
@ -597,4 +508,12 @@ export default {
} }
} }
} }
.echarts-boxs {
width: 100%;
height: 400px;
}
</style> </style>

Loading…
Cancel
Save