Browse Source

类别分析分页、居民热议

shibei_master
jiangyy 4 years ago
parent
commit
fd5d6333d6
  1. 26
      src/assets/scss/modules/visual/personCategory.scss
  2. 28
      src/views/modules/visual/basicinfo/personCategory/index.vue
  3. 69
      src/views/modules/visual/basicinfo/personCategory/recordList.vue
  4. 23
      src/views/modules/visual/communityGovern/resiPieOption.js
  5. 19
      src/views/modules/visual/communityGovern/resibuzz.vue
  6. 1
      src/views/modules/visual/communityGovern/typeAnalyze.vue

26
src/assets/scss/modules/visual/personCategory.scss

@ -138,31 +138,5 @@
height: calc(100% - 300px);
min-height: 300px;
margin-top: 60px;
.pagination {
box-sizing: border-box;
margin-top: 20px;
width: 100%;
height: 40px;
display: flex;
justify-content: flex-end;
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #0266d1;
color: #000d3f;
}
/deep/ .el-pagination .el-pager li {
background: #002e74;
}
/deep/ .el-pagination .btn-prev {
background: #002e74;
}
/deep/ .el-pagination .btn-next {
background: #002e74;
}
}
}
}

28
src/views/modules/visual/basicinfo/personCategory/index.vue

@ -73,16 +73,7 @@
<div class="warning-box-bottom">
<screen-table ref="ref_recordlist"></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>
</cpt-card>
</div>
@ -131,9 +122,7 @@ export default {
categoryList: [],
pageNo: 1,
pageSize: 10,
total: 0,
activeIndex: 0,
};
@ -195,7 +184,6 @@ export default {
onClickList (item, index) {
this.activeIndex = index;
this.pageNo = 1;
this.categoryKey = item.categoryKey
this.loadRecordList()
@ -203,7 +191,7 @@ export default {
},
loadRecordList () {
this.$refs.ref_recordlist.getRecordlist(this.dateId, this.categoryKey, this.pageNo, this.pageSize, this.agencyId, this.level)
this.$refs.ref_recordlist.getRecordlist(this.dateId, this.categoryKey, this.agencyId, this.level)
},
@ -242,15 +230,7 @@ export default {
this.getApiData()
},
pageSizeChangeHandleNew (val) {
this.pageNo = 1;
this.pageSize = val;
this.loadRecordList()
},
pageCurrentChangeHandleNew (val) {
this.pageNo = val;
this.loadRecordList()
},
},
watch: {
dateIdShow () {

69
src/views/modules/visual/basicinfo/personCategory/recordList.vue

@ -68,6 +68,16 @@
</div>
</div>
</div>
<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>
</template>
@ -90,26 +100,14 @@ export default {
showTypeSelect: false,
widthList: ['5%', '10%', '15%', '10%', '20%', '30%'],
typeList: [
{
value: '1',
label: '迁入'
},
{
value: '2',
label: '迁出'
},
{
value: '3',
label: '新增'
},
],
typeList: [],
typeShow: '全部',
selType: '',
dateId: '',
categoryKey: '',
pageNo: '',
pageSize: '',
pageNo: 1,
pageSize: 10,
total: 0
};
},
watch: {
@ -160,15 +158,14 @@ export default {
},
//
async getRecordlist (dateId, categoryKey, pageNo, pageSize, orgId, orgType) {
async getRecordlist (dateId, categoryKey, orgId, orgType) {
this.visibleLoading = true
if (dateId) {
this.dateId = dateId
this.categoryKey = categoryKey
this.pageNo = pageNo
this.pageSize = pageSize
this.orgId = orgId
this.orgType = orgType
this.pageNo = 1
}
let tableData = [];
const url = "/epmetuser/icuserchangerecord/category-analysis-list";
@ -212,6 +209,15 @@ export default {
this.getRecordlist()
this.showTypeSelect = !this.showTypeSelect
},
pageSizeChangeHandleNew (val) {
this.pageNo = 1;
this.pageSize = val;
this.getRecordlist()
},
pageCurrentChangeHandleNew (val) {
this.pageNo = val;
this.getRecordlist()
},
},
@ -347,6 +353,31 @@ export default {
}
}
}
.pagination {
box-sizing: border-box;
margin-top: 20px;
width: 100%;
height: 40px;
display: flex;
justify-content: flex-end;
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #0266d1;
color: #000d3f;
}
/deep/ .el-pagination .el-pager li {
background: #002e74;
}
/deep/ .el-pagination .btn-prev {
background: #002e74;
}
/deep/ .el-pagination .btn-next {
background: #002e74;
}
}
}
.user_list {

23
src/views/modules/visual/communityGovern/resiPieOption.js

@ -1,5 +1,5 @@
export function pieOption (_charts) {
export function pieOption (_charts,data) {
const center= ['50%', '250px']
return {
title: {
@ -33,6 +33,23 @@ const center= ['50%', '250px']
fontSize: 16,
lineHeight: 20,
},
formatter: function(name) {//这里的name表示图例中的元素名称
let str1='';//定义一个文本变量
for(let i in data) {//对图例数组进行遍历
let item=data[i]
if(item.name===name){
str1 = item.name + '('+item.count+')';
return str1;
}
// break
}
}
},
series: [
@ -83,12 +100,12 @@ const center= ['50%', '250px']
position: 'outside',
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{a|{c}}\n{r|}\n{name|{b}}',
formatter: '{a|{c}%}\n{r|}\n{name|{b}}',
minMargin: 5,
edgeDistance: -20,
lineHeight: 15,
color: '#fff',
fontSize: 12,
fontSize: 10,
// distanceToLabelLine: -60,
rich: {
name: {

19
src/views/modules/visual/communityGovern/resibuzz.vue

@ -57,7 +57,7 @@
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
layout="prev, pager, next,total"
@current-change="handlePageNoChange_demand">
</el-pagination>
</div>
@ -327,6 +327,7 @@ export default {
element.label = {
show: true,
};
element.labelLine = {
show: true,
@ -353,6 +354,7 @@ export default {
}
});
this.pieOption.series[1].data = this.pieData
this.$refs.pieChart.setOption(this.pieOption)
@ -379,14 +381,18 @@ export default {
this.pieData.forEach((item, index) => {
item.name = item.categoryName
debugger
let aa = parseInt(item.count) / parseInt(this.pieTotal)
let percent = new Number(parseInt(item.count) / parseInt(this.pieTotal)).toFixed(4) * 100 + '%'
let percent = (aa * 100).toFixed(1)
// percent = percent + '%'
item.value = percent
this.colorArray.push(item.color)
if (item.value > maxValue) {
maxValue = item.value
if (item.count > maxValue) {
maxValue = item.count
maxIndex = index
item.selected = true
} else if (index !== 0) {
@ -395,7 +401,7 @@ export default {
});
// pieChart
this.pieOption = pieOption(this.pieChartS)
this.pieOption = pieOption(this.pieChartS, this.pieData)
this.pieOption.title.text = this.pieTotal
this.pieOption.series[1].itemStyle = {
color: function (params) {
@ -453,6 +459,7 @@ export default {
this.demand.loading = false;
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
this.demand.list = data.list.map((item) => {

1
src/views/modules/visual/communityGovern/typeAnalyze.vue

@ -414,6 +414,7 @@ export default {
this.demand.loading = false;
if (code === 0) {
this.demand.total = data.total;
this.tableList = data.list
if (data.list && data.list.length > 0) {

Loading…
Cancel
Save