Browse Source

ddd

shibei_master
13176889840 4 years ago
parent
commit
16aeecf6c8
  1. 107
      src/views/modules/visual/communityParty/community.vue
  2. 352
      src/views/modules/visual/communityParty/party.vue
  3. 1
      src/views/modules/visual/cpts/analyse.vue

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

@ -38,21 +38,22 @@
</div> </div>
<div class="box-wr box-wr-400"> <div class="box-wr box-wr-400">
<div class="box-left"> <div class="box-left">
<div class="box-left-item"> <div v-for="(item, index) in cateInfo" :key="index" class="box-left-item">
<div class="box-label">组织单位</div> <div class="box-label">{{ item.label }}</div>
<div class="box-num">1233</div> <div class="box-num">{{ item.value }}</div>
</div> </div>
<div class="box-left-item"> <!-- <div class="box-left-item">
<div class="box-label">组织活动</div> <div class="box-label">组织活动</div>
<div class="box-num">1233</div> <div class="box-num">1233</div>
</div> </div> -->
</div> </div>
<div class="box-right"> <div class="box-right">
<div class="warning-box-bottom"> <div class="warning-box-bottom">
<screen-table :headerList="headerList" <screen-table :headerList="headerList"
:tableData="tableData" :tableData="tableData"
:visibleLoading="visibleLoading" :visibleLoading="visibleLoading"
:operate="true"></screen-table> :operate="true"
@look="handleLook"></screen-table>
<div class="pagination"> <div class="pagination">
<el-pagination :current-page="pageNo" <el-pagination :current-page="pageNo"
:page-size="pageSize" :page-size="pageSize"
@ -67,7 +68,7 @@
</div> </div>
</div> </div>
<div class="second-title"> <div class="second-title">
<div class="second-title-label">党建单位分类统计</div> <div class="second-title-label">党建单位分</div>
</div> </div>
<div class="box-wr"> <div class="box-wr">
@ -75,7 +76,7 @@
<div v-for="item in partyItem" <div v-for="item in partyItem"
:key="item.value" :key="item.value"
class="box-left-item"> class="box-left-item">
<div class="box-label">{{ item.name }}</div> <div class="box-label">{{ item.label }}</div>
<div class="box-num" <div class="box-num"
:style="'color:' + item.color">{{ item.value }}</div> :style="'color:' + item.color">{{ item.value }}</div>
</div> </div>
@ -95,7 +96,7 @@
<div class="map-tips-icon"> <div class="map-tips-icon">
<img :src="item.icon" /> <img :src="item.icon" />
</div> </div>
<div class="map-tips-label">{{ item.name }}</div> <div class="map-tips-label">{{ item.label }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -141,6 +142,7 @@ export default {
tableData: [ tableData: [
// [1,'','','2',''], // [1,'','','2',''],
], ],
detailId: '',
agencyId: '', agencyId: '',
value2: '', value2: '',
timeRange: '', timeRange: '',
@ -180,7 +182,7 @@ export default {
icon: require('../../../../assets/img/shuju/measure/qita.png') icon: require('../../../../assets/img/shuju/measure/qita.png')
} }
], ],
cateInfo: [],
// //
isfirstInit: true,// isfirstInit: true,//
agencyInfo: {},//level agencyInfo: {},//level
@ -231,6 +233,8 @@ export default {
await nextTick(100); await nextTick(100);
this.loadUnit() this.loadUnit()
this.getList(); this.getList();
this.getCateCount()
this.getCateType()
await this.getWorkUserInfo() await this.getWorkUserInfo()
await this.getMapUnitList() await this.getMapUnitList()
}, },
@ -261,6 +265,81 @@ export default {
} }
this.visibleLoading = false this.visibleLoading = false
}, },
async getCateCount () {
const url = "/heart/icpartyactivity/statistics"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.cateInfo = data
} else {
this.$message.error(msg)
}
},
async getCateType () {
const url = "/heart/icpartyunit/typestatistics"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/list"
let params = {
agencyId: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.cateInfo = data
const colorItem = {
0: {
color: 'rgba(250, 32, 10, 1)',
icon: require('../../../../assets/img/shuju/measure/ly@2x.png')
},
1: {
color: 'rgba(251, 177, 4, 1)',
icon: require('../../../../assets/img/shuju/measure/lxdj@2x.png')
},
2: {
color: 'rgba(80, 194, 237, 1)',
icon: require('../../../../assets/img/shuju/measure/xq@2x.png')
},
3: {
color: 'rgba(65, 181, 104, 1)',
icon: require('../../../../assets/img/shuju/measure/jgzs@2x.png')
},
4: {
color: 'rgba(192, 21, 195, 1)',
icon: require('../../../../assets/img/shuju/measure/qita.png')
}
}
this.partyItem = data.map((item, index) => {
return {
...item,
...colorItem[index]
}
})
} else {
this.$message.error(msg)
}
},
async getDetail () {
const url = "/heart/icpartyactivity/detail"
let params = {
id: this.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.detailInfo = data
} else {
this.$message.error(msg)
}
},
async loadUnit () { async loadUnit () {
const url = "/heart/icresidemanddict/subcodelist" const url = "/heart/icresidemanddict/subcodelist"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option" // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/option"
@ -328,8 +407,8 @@ export default {
// //
async getMapUnitList () { async getMapUnitList () {
// const url = "/heart/icpartyunit/distribution" const url = "/heart/icpartyunit/distribution"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution" // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
let params = { let params = {
agencyId: this.agencyId agencyId: this.agencyId
@ -393,7 +472,9 @@ export default {
clickProject (feature) { clickProject (feature) {
console.log('标注信息', feature.values_.properties) console.log('标注信息', feature.values_.properties)
}, },
handleLook(val) {
this.detailId = val.id
},
handleSelectChange () { handleSelectChange () {
this.getList(); this.getList();

352
src/views/modules/visual/communityParty/party.vue

@ -4,7 +4,7 @@
<div class="card-title"> <div class="card-title">
<img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" /> <img class="title-icon" src="../../../../assets/img/shuju/title-tip.png" />
<div class="title-label"> <div class="title-label">
<el-dropdown trigger="click"> <!-- <el-dropdown trigger="click">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
全部网格<i class="el-icon-caret-bottom el-icon--right"></i> 全部网格<i class="el-icon-caret-bottom el-icon--right"></i>
</span> </span>
@ -15,18 +15,16 @@
<el-dropdown-item>双皮奶</el-dropdown-item> <el-dropdown-item>双皮奶</el-dropdown-item>
<el-dropdown-item>蚵仔煎</el-dropdown-item> <el-dropdown-item>蚵仔煎</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown> -->
</div> <el-cascader
<!-- <div class="title-time"> v-model="selectAgency"
<div class="title-time-label">选择时间</div> :options="propTree"
<div class=""> :props="{ checkStrictly: true }"
<el-date-picker :show-all-levels="false"
v-model="value2" :getCheckedNodes="getCheckedNodes"
type="month" clearable @change="handleCascader">
placeholder="选择月"> </el-cascader>
</el-date-picker> </div>
</div>
</div> -->
</div> </div>
<div class="card-echart"> <div class="card-echart">
<div class="card-left"> <div class="card-left">
@ -47,7 +45,7 @@
</div> </div>
<div class="tips-items-num"> <div class="tips-items-num">
<div class="tips-item-count">{{item.value}}</div> <div class="tips-item-count">{{item.value}}</div>
<div class="tips-item-has">25%</div> <div class="tips-item-has">{{ item.radio }}</div>
</div> </div>
</div> </div>
@ -58,19 +56,19 @@
<div class="warning-box-bottom"> <div class="warning-box-bottom">
<screen-table <screen-table
:headerList="headerList" :headerList="headerList"
:tableData="tableData" :tableData="ageList"
:visibleLoading="visibleLoading" :visibleLoading="visibleLoading"
:operate="false" :operate="false"
></screen-table> ></screen-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
:current-page="pageNo" :current-page="agePageNo"
:page-size="pageSize" :page-size="agePageSize"
background background
layout="prev, pager, next" layout="prev, pager, next"
@size-change="pageSizeChangeHandleNew" @size-change="pageSizeChangeHandleAge"
@current-change="pageCurrentChangeHandleNew" @current-change="pageCurrentChangeHandleAge"
:total="total" :total="ageTotal"
> >
</el-pagination> </el-pagination>
</div> </div>
@ -98,8 +96,8 @@
</div> </div>
<div class="warning-box-bottom"> <div class="warning-box-bottom">
<screen-table <screen-table
:headerList="headerList" :headerList="headerEduList"
:tableData="tableData" :tableData="eduList"
:visibleLoading="visibleLoading" :visibleLoading="visibleLoading"
:operate="false" :operate="false"
></screen-table> ></screen-table>
@ -142,23 +140,31 @@ export default {
}, },
data() { data() {
return { return {
warningList: [],
headerList: [ headerList: [
{ title: "序号", coulmn: 'index' }, { title: "序号", coulmn: 'index' },
{ title: "姓名", coulmn: 'gridName' }, { title: "姓名", coulmn: 'name' },
{ title: "年龄", coulmn: 'buildingName' }, { title: "年龄", coulmn: 'age' },
{ title: "手机号码", coulmn: 'neighborhoodName' } { title: "手机号码", coulmn: 'mobile' }
],
headerEduList: [
{ title: "序号", coulmn: 'index' },
{ title: "姓名", coulmn: 'name' },
{ title: "学历", coulmn: 'education' },
{ title: "手机号码", coulmn: 'mobile' }
], ],
tableData: [ tableData: [
// [1,'','','2',''], // [1,'','','2',''],
], ],
selectAgency: null,
propTree: [],
value2: '', value2: '',
visibleLoading: true, visibleLoading: true,
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
agePageNo: 1,
agePageSize: 10,
total: 0, total: 0,
activeIndex: 0, ageTotal: 0,
activeLevel: "1",
eduItem: [ eduItem: [
{ {
name: '小学', name: '小学',
@ -221,6 +227,8 @@ export default {
color: 'rgba(255, 186, 0, 1)' color: 'rgba(255, 186, 0, 1)'
} }
], ],
ageList: [],
eduList: [],
pieAgeChartS: null, pieAgeChartS: null,
pieEduChartSs: null, pieEduChartSs: null,
pieAgeOptions: null, pieAgeOptions: null,
@ -228,12 +236,15 @@ export default {
}; };
}, },
async mounted() { async mounted() {
await nextTick(100); await nextTick(100);
this.initAgeCharts() await this.getAgencyList()
this.initEduCharts() this.getAgeCount(this.$store.state.user.agencyId, 'agency')
this.getEduCount(this.$store.state.user.agencyId, 'agency')
// this.initAgeCharts()
// this.initEduCharts()
this.getAgeList(this.$store.state.user.agencyId, 'agency')
this.getEduList(this.$store.state.user.agencyId, 'agency')
// this.initChartType() // this.initChartType()
this.getBuildingwarnlist();
}, },
methods: { methods: {
pieInitOk (dom) { pieInitOk (dom) {
@ -252,105 +263,7 @@ export default {
// const eId = document.getElementById('echartOrg') // const eId = document.getElementById('echartOrg')
// let _charts = echarts.init(eId) // let _charts = echarts.init(eId)
let option = { let option = {
// tooltip: {
// show: false,
// 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',
// type: 'pie',
// // center: ['10%', '50%'],
// radius: ['40%', '60%'],
// avoidLabelOverlap: true,
// // top: top + '%',
// // height: '80%',
// left: 'center',
// width: 400,
// label: {
// 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: {
// label: {
// show: true,
// fontSize: '14',
// fontWeight: 'bold'
// }
// },
// labelLine: {
// show: false,
// length: 20,
// length2: 0,
// maxSurfaceAngle: 80,
// lineStyle: {
// cap: 'round'
// }
// },
// labelLayout: function (params) {
// const isLeft = params.labelRect.x < this.pieChartS.getWidth() / 2;
// 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: this.ageItem
// }
// ]
} }
this.pieAgeOptions = pieOption(this.pieAgeChartS) this.pieAgeOptions = pieOption(this.pieAgeChartS)
this.clickAgePie(0) this.clickAgePie(0)
@ -606,59 +519,163 @@ export default {
this.$refs.eduChart.setOption(this.pieEduOptions) this.$refs.eduChart.setOption(this.pieEduOptions)
}, },
onClickList(index, level) { async getAgeCount(orgId, orgType) {
this.activeIndex = index; const url = "/epmetuser/icresiuser/partymemberagestatistics";
this.activeLevel = level; let params = {
this.pageNo = 1; orgId,
this.getUserwarnlist(); orgType
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.ageItem = data.map(item => {
return {
...item,
name: item.label
}
})
this.initAgeCharts()
} else {
}
}, },
// async getEduCount(orgId, orgType) {
async getUserwarnlist() { const url = "/epmetuser/icresiuser/partymembereducationstatistics";
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
const url = "/epmetuser/statsresiwarn/userwarnlist";
let params = { let params = {
configId: reqItem.configId, orgId,
buildingIdList: reqItem["buildingIdList" + activeLevel], orgType
pageNo: this.pageNo,
pageSize: this.pageSize,
}; };
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
tableData = data.list.map((item, index) => { this.eduItem = data.map(item => {
return { return {
...item, ...item,
index: index + 1, name: item.label
residentNames: item.residentNames || "暂无"
} }
}); })
this.tableData = tableData; this.initEduCharts()
this.total = data.total;
} else { } else {
} }
}, },
// async getAgeList(orgId, orgType, _code) {
async getBuildingwarnlist() { this.visibleLoading = true
const url = "/epmetuser/statsresiwarn/buildingwarnlist"; const url = "/epmetuser/icresiuser/partymemberagelist";
let params = { let params = {
agencyId: this.$store.state.user.agencyId, orgId,
orgType,
code: _code || '',
pageNo: this.agePageNo,
pageSize: this.agePageSize
}; };
const { data, code, msg } = await requestPost(url, params); const { data, code, msg } = await requestPost(url, params);
if (code === 0) { if (code === 0) {
this.warningList = data; this.ageList = data.list.map((item, index) => {
this.visibleLoading = false; return {
this.getUserwarnlist(); ...item,
index: index + 1
}
})
this.ageTotal = data.total
} else { } else {
} }
this.visibleLoading = false
},
async getEduList(orgId, orgType, _code) {
const url = "/epmetuser/icresiuser/partymembereducationlist";
let params = {
orgId,
orgType,
code: _code || '',
pageNo: this.pageNo,
pageSize: this.pageSize
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.eduList = data.list.map((item, index) => {
return {
...item,
index: index + 1
}
})
this.total = data.total
} else {
}
},
async getAgencyList(node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
const url = '/gov/org/customeragency/agencygridtree'
// let params = {
// agencyId: this.$store.state.user.agencyId,
// };
const { data, code, msg } = await requestPost(url);
if (code === 0) {
console.log('data-org----o', data)
this.selectAgency = [`${data.agencyId}-${data.level}`]
let arr = []
arr.push(data)
this.propTree = arr && this.getTreeData(arr)
} else {
}
},
getTreeData(data){
if (!Array.isArray(data)) return []
let arr = data.map(item => {
let _item = {}
if (item.subAgencyList) {
if (item.subAgencyList.length === 0) {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: undefined
}
} else _item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
children: this.getTreeData(item.subAgencyList)}
} else {
_item = {
label: item.agencyName,
value: item.agencyId + '-' + item.level,
level: item.level,
}
}
return _item
})
return arr
},
handleCascader(val) {
console.log('val-vvv', val)
const _arr = val[val.length - 1].split('-')
const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.getAgeList(_arr[0], orgType)
this.getEduList(_arr[0], orgType)
},
getCheckedNodes(val) {
console.log('val-nnn', val)
},
lazyLoad(node, resolve) {
setTimeout(() => {
this.getAgeList(node, resolve)
}, 500)
},
pageSizeChangeHandleAge(val) {
this.agePageNo = 1
this.agePageSize = val
this.getAgeList()
},
pageCurrentChangeHandleAge (val) {
this.agePageSize = val
this.getAgeList()
}, },
pageSizeChangeHandleNew(val) { pageSizeChangeHandleNew(val) {
this.pageNo = 1; this.pageNo = 1;
this.pageSize = val; this.pageSize = val;
this.getEduList()
}, },
pageCurrentChangeHandleNew(val) { pageCurrentChangeHandleNew(val) {
this.pageNo = val; this.pageNo = val;
this.getUserwarnlist(); this.getEduList()
}, },
}, },
}; };
@ -723,6 +740,21 @@ export default {
} }
} }
.title-label {
::v-deep .el-input {
width: 180px;
.el-input__inner {
font-size: 20px;
font-weight: 800;
color: #fff;
background: transparent;
border: 0;
}
.el-icon-arrow-down::before {
content: "\e790";
}
}
}
} }
.card-echart { .card-echart {
display: flex; display: flex;

1
src/views/modules/visual/cpts/analyse.vue

@ -433,6 +433,7 @@ export default {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 8px 0; padding: 8px 0;
color: #fff;
border-bottom: 1px dashed rgba(131, 152, 217, 1); border-bottom: 1px dashed rgba(131, 152, 217, 1);
.item-status { .item-status {
min-width: 50px; min-width: 50px;

Loading…
Cancel
Save