Browse Source

Merge branch 'dev-shuju' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-shuju

shibei_prod
13176889840 4 years ago
parent
commit
fe41c7f4d7
  1. 220
      src/assets/scss/modules/visual/distributionAnalyze.scss
  2. 58
      src/assets/scss/modules/visual/processAnalyze.scss
  3. 2
      src/router/index.js
  4. 13
      src/views/modules/communityParty/regionalParty/activitys.vue
  5. 6
      src/views/modules/communityParty/regionalParty/units.vue
  6. 18
      src/views/modules/communityService/ninePlaces/places/placesForm.vue
  7. 631
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  8. 44
      src/views/modules/visual/communityGovern/distributionLineOption.js
  9. 29
      src/views/modules/visual/communityGovern/processAnalyze.vue
  10. 22
      src/views/modules/visual/communityGovern/processPieOption.js
  11. 32
      src/views/modules/visual/components/screen-map/index.vue
  12. 255
      src/views/modules/visual/measure/volunteer.vue

220
src/assets/scss/modules/visual/distributionAnalyze.scss

@ -8,44 +8,94 @@
font-family: PingFang SC;
font-weight: 800;
color: #ffffff;
display: flex;
align-items: center;
position: relative;
img {
display: block;
margin-right: 5px;
}
span {
display: block;
}
.card-title {
display: flex;
align-items: center;
.second-select {
margin: 0 10px 0 40px;
img {
display: block;
margin-right: 5px;
}
span {
display: block;
}
}
::v-deep .el-input {
width: 140px;
height: 36px;
.el-input__inner {
height: 100%;
padding: 0 10px;
color: #fff;
line-height: 36px;
.second-title {
display: block;
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: 180px;
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 {
width: 360px;
position: relative;
background: #06186d;
border: 1px solid #1a64cc;
}
.el-icon-arrow-up:before {
content: '\e78f';
.el-range-input {
color: #fff;
background: #06186d;
}
.el-range-separator {
color: #fff;
}
.el-range__icon {
position: absolute;
right: 5px;
// float: right;
}
.el-input__prefix {
left: unset;
right: 5px;
}
}
}
::v-deep .el-date-editor {
.el-input__prefix {
left: unset;
right: 5px;
}
.second-select:last-child {
margin-left: 0;
}
}
.cascader {
::v-deep .el-input {
width: 220px;
@ -66,70 +116,78 @@
flex-direction: row;
// flex-wrap: wrap;
// justify-content: center;
height: calc(100vh - 130px);
height: calc(100vh - 230px);
.g-l {
flex-shrink: 0;
width: 600px;
height: calc(100vh - 190px);
width: 40%;
height: calc(100vh - 290px);
.echart-line {
margin-left: 30px;
// margin-top: 100px;
text-align: center;
position: relative;
width: 100%;
height: 100%;
box-sizing: border-box;
.echart-org {
width: 100%;
height: 90%;
}
}
}
.g-r {
text-align: center;
margin: 40px 19px 20px;
width: calc(100vw - 60px - 600px);
height: calc(100vh - 140px - 20px);
}
}
.g-r {
.tb {
position: relative;
height: calc(100vh - 220px);
overflow-y: auto;
@include scrollBar;
.m-pagination {
position: absolute;
box-sizing: border-box;
right: 0;
bottom: 0;
width: 60%;
height: calc(100vh - 250px);
.r-map {
position: relative;
height: calc(100vh - 250px - 50px);
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;
.map {
height: 100%;
width: 100%;
}
}
/deep/ .el-pagination .btn-next {
background: #002e74;
.r-legend {
display: flex;
justify-content: center;
margin-top: 24px;
align-items: center;
.legend_item {
margin-left: 40px;
display: flex;
align-items: center;
> span {
margin-left: 11px;
font-size: 16px;
font-family: PingFang SC;
font-weight: 400;
color: #d2e7ff;
}
.color {
width: 20px;
height: 10px;
border-radius: 4px;
}
.color0 {
background: #dd2719;
}
.color1 {
background: #edbe00;
}
.color2 {
background: #00e5ed;
}
}
}
}
}
.echart-wr {
margin-left: 30px;
// margin-top: 100px;
text-align: center;
position: relative;
width: 500px;
height: 100%;
box-sizing: border-box;
.echart-org {
width: 100%;
height: 90%;
}
}

58
src/assets/scss/modules/visual/processAnalyze.scss

@ -77,6 +77,7 @@
width: 100px;
}
.g-pie {
position: relative;
}
}
.l_bottom {
@ -209,6 +210,10 @@
background-color: #082586;
}
}
.r-status:hover {
cursor: pointer;
}
}
.r-legend {
@ -231,9 +236,6 @@
color: #d2e7ff;
}
}
.r-legend:hover {
cursor: pointer;
}
}
.echart-wr {
@ -242,10 +244,52 @@
text-align: center;
position: relative;
width: 500px;
height: 100%;
// height: 100%;
box-sizing: border-box;
.echart-org {
width: 100%;
height: 90%;
}
.g-pie {
position: relative;
.pie-legend {
margin-left: 30px;
margin-top: -40px;
display: flex;
justify-content: center;
.legend_item {
.item_name {
margin-left: 5px;
font-size: 10px;
font-family: PingFang SC;
font-weight: 500;
color: #eff0f1;
}
> img {
margin-top: -10px;
width: 80px;
height: 10px;
}
.item_num {
.item_count {
font-size: 17px;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
.item_percent {
margin-left: 12px;
font-size: 8px;
font-family: PingFang SC;
font-weight: 300;
color: #ffffff;
line-height: 18px;
}
}
}
.item_last {
margin-left: 50px;
}
}
}

2
src/router/index.js

@ -274,7 +274,7 @@ router.beforeEach((to, from, next) => {
},
{
url: "/visual/communityGovern/distributionAnalyze",
name: "事件分类分析",
name: "项目分布分析",
id: "distributionAnalyze",
},
],

13
src/views/modules/communityParty/regionalParty/activitys.vue

@ -78,10 +78,14 @@
</div>
<div class="div_table">
<div class="div_btn">
<el-button style="float:left"
<el-button style=""
type="green"
size="small"
@click="handleAdd">新增</el-button>
<!-- <el-button style="float:left"
type="yellow"
size="small"
@click="handleExport">导出</el-button>
<el-upload ref="upload"
:multiple='false'
:show-file-list='false'
@ -95,12 +99,7 @@
size="small"
type="red">导入</el-button>
<el-button style="float:left"
type="yellow"
size="small"
@click="handleExport">导出</el-button>
</el-upload>
</el-upload> -->
</div>

6
src/views/modules/communityParty/regionalParty/units.vue

@ -84,11 +84,11 @@
</div>
<div class="div_table">
<div class="div_btn">
<el-button style="float:left"
<el-button style=""
type="green"
size="small"
@click="handleAdd">新增</el-button>
<el-button style="float:left"
<!-- <el-button style="float:left"
type="yellow"
size="small"
@click="handleExport">导出</el-button>
@ -103,7 +103,7 @@
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small"
type="red">导入</el-button>
type="red">导入</el-button> -->
</el-upload>

18
src/views/modules/communityService/ninePlaces/places/placesForm.vue

@ -196,15 +196,15 @@ export default {
},
async addPlace () {
// const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
// if (regPhone.test(this.formData.mobile) === false) {
// this.btnDisable = false
// this.$message({
// type: 'warning',
// message: ''
// })
// return false;
// }
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //
if (regPhone.test(this.formData.mobile) === false) {
this.btnDisable = false
this.$message({
type: 'warning',
message: '请输入正确的手机号码'
})
return false;
}
let url = ''

631
src/views/modules/visual/communityGovern/distributionAnalyze.vue

@ -1,59 +1,60 @@
<template>
<cpt-card>
<div class="title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>事件分类分析</span>
<div class="second-select cascader">
<el-cascader class="customer_cascader"
ref="myCascader"
v-model="agencyIdArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
<div class="card-title">
<img src="@/assets/img/shuju/title-tip.png" />
<span>项目分布分析</span>
</div>
<div class="second-select ">
<el-date-picker v-model="dateId"
type="date"
:clearable="false"
@change="handleChangeDate"
prefix-icon="el-icon-caret-bottom"
placeholder="选择日期"
value-format="yyyyMMdd">
</el-date-picker>
<div class="second-title">
<div class="second-title-label">不同事件类别在不同时间段的变化和分布</div>
<div class="second-select cascader">
<el-cascader class="customer_cascader"
ref="myCascader"
v-model="agencyIdArray"
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
</div>
<div class="second-select">
<el-date-picker v-model="timeRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
prefix-icon="el-icon-caret-bottom"
value-format="yyyy-MM-dd"
@change="handleSelectChange">
</el-date-picker>
</div>
</div>
</div>
<div class="g-cpt-resi">
<div class="g-l">
<screen-echarts-frame class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<screen-echarts-frame class="echart-line"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
</div>
<div class="g-r">
<div class="m-tb">
<div class="tb">
<cpt-tb :col-list="demand.colList"
:loading="demand.loading"
:header="demand.header"
:list="demand.list"></cpt-tb>
<div class="m-pagination">
<el-pagination :current-page="demand.pageNo"
:page-size="demand.pageSize"
:total="demand.total"
background
layout="prev, pager, next"
@current-change="handlePageNoChange_demand">
</el-pagination>
<div class="r-map">
<screen-map class="map"
ref="map"
:showPolygonLayer="true"></screen-map>
<div class="r-legend">
<div class="legend_item"
v-for="(item,index) in legendArray"
:key="index">
<div :class="['color','color'+index]"></div>
<span>{{item.name}}</span>
</div>
</div>
</div>
@ -69,8 +70,9 @@ import { requestPost } from "@/js/dai/request";
import cptCard from "@/views/modules/visual/cpts/card";
import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import { pieOption } from './typePieOption.js'
import screenMap from "@/views/modules/visual/components/screen-map";
import { lineOption } from './distributionLineOption.js'
import * as echarts from 'echarts'
export default {
@ -79,77 +81,6 @@ export default {
return {
showNoData: false,
timer: null,
pieChartS: null,
pieChart: '',
pieOption: {},
pieInitState: false,
pieTotal: 0,
colorArray: [],
pieData: [
{ total: 1048, categoryName: '城市管理', color: '#1B51FF', selected: true },
{ total: 735, categoryName: '为民服务', color: '#00E5ED' },
{ total: 580, categoryName: '安全监管', color: '#7800FF' },
{ total: 484, categoryName: '民政', color: '#16D783' },
{ total: 300, categoryName: '环境保护', color: '#FF7800' },
{ total: 1049, categoryName: '建设管理', color: '#FFBA00' },
{ total: 735, categoryName: '街道吹哨部门报到', color: '#FFD685' },
{ total: 580, categoryName: '社会治安综合', color: '#2A00FF' },
{ total: 484, categoryName: '公安交通管理', color: '#C600FF' },
{ total: 300, categoryName: '卫生计生监管执法', color: '#FF2A00' },
{ total: 484, categoryName: '民生', color: '#3DDA83' },
{ total: 300, categoryName: '街道安全', color: '#FAC126' }
],
agencyId: '',
dateId: '',
categoryCode: '',
demand: {
loading: true,
colList: [
{
align: "center",
width: "5%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "5%",
},
{
align: "center",
width: "20%",
},
{
align: "center",
width: "10%",
},
{
align: "center",
width: "10%",
},
],
header: ["序号", "项目编号", "类别", "反映渠道", "所属网格", "状态", "项目标题", "转成项目时间", "操作"],
list: [],
pageSize: 10,
pageNo: 1,
total: 0,
},
casOptions: [],
agencyIdArray: [],
@ -164,6 +95,94 @@ export default {
checkStrictly: true
},
lineChart: '',
lineOption: {},
lineInitState: false,
lineColorArray: [],
xaxis: [],
series: [],
legend: [],
lineData: [820, 932, 901, 934, 1290, 1330, 1320],
lineList: [
{
time: '4:00',
categoryList: [
{
categoryCode: '001',
count: 100,
color: '#1B51FF',
name: '分类1'
},
{
categoryCode: '002',
count: 200,
color: '#00E5ED',
name: '分类2'
}
]
},
{
time: '5:00',
categoryList: [
{
categoryCode: '001',
count: 20,
color: '#1B51FF',
name: '分类1'
},
{
categoryCode: '002',
count: 400,
color: '#00E5ED',
name: '分类2'
}
]
},
{
time: '6:00',
categoryList: [
{
categoryCode: '001',
count: 50,
color: '#1B51FF',
name: '分类1'
},
{
categoryCode: '002',
count: 10,
color: '#00E5ED',
name: '分类2'
}
]
}
],
timeRange: [],
orgId: '',
isfirstInit: true,
mapList: [
{
orgId: '3115fc83f1db431008a73c553eef1eb5',
count: 169
},
{
orgId: '7e57419e6afcdc910d08124c0a1b4eb9',
count: 149
},
{
orgId: 'e56ac695b01d9eed8723bde718071df5',
count: 219
}
],
agencyInfo: {},
subAgencyArray: [],
colorArray: ['#DD2719', '#EDBE00', '#00E5ED'],
colorFillArray: ['rgba(221, 39, 25, 0.24)', 'rgba(237, 190, 0, 0.25)', 'rgba(0, 229, 237, 0.16)'],
legendArray: [],
under: null,
above: null
};
},
// mixins: [animate]
@ -175,19 +194,51 @@ export default {
this.userId = this.uid;
this.initData()
await this.getAgencylist()//
await this.loadOrgData()
this.getApiData();
},
methods: {
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
this.dateId = new Date(time); //
let yesterday = new Date((new Date).getTime() - 24 * 60 * 60 * 1000)
let year = yesterday.getFullYear()
let month = yesterday.getMonth() + 1 //
let day = yesterday.getDate() //
var days = new Date(year, month, 0);
days = days.getDate(); //
var year2 = year;
var month2 = parseInt(month) - 1;
if (month2 == 0) {
year2 = parseInt(year2) - 1;
month2 = 12;
}
var day2 = day;
var days2 = new Date(year2, month2, 0);
days2 = days2.getDate();
if (day2 > days2) {
day2 = days2;
}
if (month2 < 10) {
month2 = '0' + month2;
}
var t2 = year2 + '-' + month2 + '-' + day2;
var t1 = year + '-' + month + '-' + day;
// let t3 = formate(t2, style);
this.timeRange = [t2, t1]
},
handleSelectChange () {
this.getApiData();
},
async getApiData () {
await this.getPie()
await this.getTable();
await this.getLine()
await this.loadMapData();
},
async getAgencylist () {
@ -219,181 +270,264 @@ export default {
this.getApiData()
},
//
async loadOrgData () {
const url = "/gov/org/agency/maporg"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg"
let params = {
orgId: this.orgId,
level: 'agency'
}
pieInitOk (dom) {
console.log('pie准备好了', dom)
this.pieChartS = dom
this.pieInitState = true
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.agencyInfo = data
if (!data.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!data.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!data.level) {
this.agencyInfo.level = 'street'
}
this.subAgencyArray = []
if (data.children && data.children.length > 0) {
this.subAgencyArray = data.children
} else {
this.subAgencyArray = []
}
},
getPie () {
if (this.pieInitState) {
this.getPieChart()
} else {
setTimeout(() => {
this.getPie()
}, 500)
this.$message.error(msg)
}
},
//
async getPieChart () {
this.$refs.pieChart.clear()
this.pieTotal = 0
async loadMapData () {
this.$refs.lineChart.clear()
const _that = this
// this.$refs.pieChart.showLoading()
// const url ="/data/aggregator/project/projectcategorylist";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectcategorylist";
// this.$refs.lineChart.showLoading()
// const url ="/gov/project/project/projectdistributionanalysisright";
const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisright";
let params = {
agencyId: this.agencyId,
dateId: this.dateId,
orgId: this.orgId,
startDate: this.timeRange.length > 0 && this.timeRange[0] || '',
endDate: this.timeRange.length > 0 && this.timeRange[1] || ''
};
const { data, code, msg } = await requestPost(url, params);
// pieChart
if (code === 0) {
// pieChart
this.pieOption = pieOption(this.pieChartS)
if (data && data.length > 0) {
// this.pieData = data
} else {
this.pieData = [{ total: 0, categoryName: '无分类', color: '#00E5ED' }]
this.legendArray = []
if (data.above) {
this.under = data.under
this.legendArray.push(
{
color: this.colorArray[0],
name: data.under + '以下'
}
)
}
let maxValue = this.pieData[0].total
let maxIndex = 0
this.pieData[0].selected = true
this.pieData.forEach((item, index) => {
item.name = item.categoryName
item.value = item.total
this.colorArray.push(item.color)
this.pieTotal = this.pieTotal + item.value
if (item.value > maxValue) {
maxValue = item.value
maxIndex = index
item.selected = true
} else if (index !== 0) {
item.selected = false
}
if (data.above) {
this.above = data.above
this.legendArray.push(
{
color: this.colorArray[1],
name: data.under + '-' + data.above
}
)
this.legendArray.push(
{
color: this.colorArray[2],
name: data.above + '以上'
}
)
}
if (data.list && data.list.length > 0) {
// this.mapList = data.list
});
} else {
this.mapList = []
}
this.mapList.forEach(item => {
// debugger
for (let i = 0; i < this.subAgencyArray.length; i++) {
let agencyItem = this.subAgencyArray[i]
if (item.orgId === agencyItem.id) {
item.longitude = agencyItem.longitude
item.latitude = agencyItem.latitude
item.coordinates = agencyItem.coordinates
if (this.under) {
if (item.count < this.under || item.count === this.under) {
item.color = this.colorArray[0]
item.fillColor = this.colorFillArray[0]
}
if (this.above) {
if (item.count > this.under && item.count < this.above) {
item.color = this.colorArray[1]
item.fillColor = this.colorFillArray[1]
} else {
item.color = this.colorArray[2]
item.fillColor = this.colorFillArray[2]
}
}
}
break
}
this.pieOption.title.text = this.pieTotal
this.pieOption.series[1].itemStyle = {
color: function (params) {
return _that.colorArray[params.dataIndex]
}
}
});
let fun = function (params) {
_that.clickPie(params.dataIndex)
console.log(this.mapList)
this.loadMap()
this.isfirstInit = false
_that.categoryCode = _that.pieData[params.dataIndex].categoryCode
_that.getTable()
}
this.$refs.pieChart.handleClick(fun)
this.clickPie(maxIndex)
} else {
this.$message.error(msg);
}
},
clickPie (seriesIndex) {
this.pieData.forEach((element, index) => {
if (index === seriesIndex) {
element.label = {
show: true,
};
element.labelLine = {
show: true,
lineStyle: {
opacity: 1,
}
loadMap () {
};
console.log('zhilma')
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, this.mapList, null, null, null, null,)
} else {
this.$refs.map.refreshMap(this.mapList, null)
} else {
element.label = {
show: false,
};
element.labelLine = {
show: false,
lineStyle: {
opacity: 0,
color: 'rgba(255,255,255,0)'
}
};
}
},
}
});
this.pieOption.series[1].data = this.pieData
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
},
lineInitOk (dom) {
handleChangeAgency (value) {
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
this.getApiData()
console.log(this.agencyIdArray)
this.lineInitState = true
},
getLine () {
if (this.lineInitState) {
this.getLineChart()
} else {
setTimeout(() => {
this.getLine()
}, 500)
}
},
// 线
async getLineChart () {
this.$refs.lineChart.clear()
//
async getTable () {
// const url = "/data/aggregator/project/categoryprojectlist";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/categoryprojectlist";
const _that = this
// this.$refs.lineChart.showLoading()
// const url ="/gov/project/project/projectdistributionanalysisleft";
const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisleft";
let params = {
dateId: this.dateId,
agencyId: this.agencyId,
categoryCode: this.categoryCode,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
isPage: true
orgId: this.orgId,
startDate: this.timeRange.length > 0 && this.timeRange[0] || '',
endDate: this.timeRange.length > 0 && this.timeRange[1] || ''
};
const { data, code, msg } = await requestPost(url, params);
this.demand.loading = false;
if (code === 0) {
this.demand.total = data.total;
this.demand.list = data.list.map((item) => {
//:issue :agency :resi_event
item.originShow = item.origin === 'issue' ? '楼院小组' : item.origin === 'agency' ? '项目立项' : '事件上报'
//: pendingclosed
item.statusShow = item.status === 'pending' ? '待处理' : '已结案'
return [
{ type: "index" },
item.projectCode,
item.categoryNames.join(','),
item.originShow,
item.gridName,
item.statusShow,
item.title,
item.time,
{ type: "operate", list: ["查看"] },
];
});
// pieChart
this.lineOption = lineOption()
if (data && data.length > 0) {
this.loadCategoryData()
} else {
}
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: this.xaxis },
legend: { data: this.legend },
series: this.series
}, true)
} else {
this.$message.error(msg);
}
},
//线
loadCategoryData () {
this.xaxis = []
this.series = []
this.legend = []
let num = this.lineList[0].categoryList.length
let dataArray = new Array(num)
//
this.lineList[0].categoryList.forEach((categoryItem, index) => {
this.legend.push(categoryItem.name)
dataArray[index] = []
});
//
this.lineList.forEach(item => {
this.xaxis.push(item.time)
//
item.categoryList.forEach((categoryItem, index) => {
dataArray[index].push(categoryItem.count)
});
});
//
this.lineList[0].categoryList.forEach((categoryItem, index) => {
let object = {
name: categoryItem.name,
type: 'line',
barWidth: 15,
areaStyle: {},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0, 1, 0, 0,
[
{ offset: 0, color: 'rgba(121, 55, 255, 0)' },
{ offset: 1, color: categoryItem.color }
]
)
},
data: dataArray[index]
}
this.series.push(object)
});
},
handlePageNoChange_demand (val) {
this.demand.pageNo = val;
this.getTable();
handleChangeAgency (value) {
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
this.getApiData()
},
toUserInfo (uid) {
this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` });
},
@ -406,12 +540,15 @@ export default {
},
},
computed: {},
computed: {
},
components: {
cptCard,
cptTb,
screenEchartsFrame,
screenMap
},
watch: {

44
src/views/modules/visual/communityGovern/distributionLineOption.js

@ -2,7 +2,18 @@ import * as echarts from 'echarts'
export function lineOption () {
return {
legend: {
textStyle: {
color: '#D2E7FF',
fontSize: 16,
},
itemWidth: 20,
itemHeight: 10,
// top: 350,
bottom: 0,
data: []
},
xAxis: {
type: 'category',
// boundaryGap: false,
@ -51,21 +62,22 @@ export function lineOption () {
}
},
series: [
{
name: '项目数',
type: 'line',
barWidth: 15,
areaStyle: {},
itemStyle: {
color: new echarts.graphic.LinearGradient(
0, 1, 0, 0,
[
{ offset: 0, color: 'rgba(121, 55, 255, 0)' },
{ offset: 1, color: '#6339FF' }
]
)
}
},
// {
// name: '项目数',
// type: 'line',
// barWidth: 15,
// areaStyle: {},
// itemStyle: {
// color: new echarts.graphic.LinearGradient(
// 0, 1, 0, 0,
// [
// { offset: 0, color: 'rgba(121, 55, 255, 0)' },
// { offset: 1, color: '#6339FF' }
// ]
// )
// },
// data: [120, 132, 101, 134, 90, 230, 210]
// },
// {
// data: [820, 932, 901, 934, 1290, 1330, 1320],
// type: 'line',

29
src/views/modules/visual/communityGovern/processAnalyze.vue

@ -45,6 +45,20 @@
<screen-echarts-frame class="echart-wr"
@myChartMethod="pieInitOk"
ref="pieChart"></screen-echarts-frame>
<div class="pie-legend">
<div :class="['legend_item',{'item_last':index===legendArray.length-1}]"
v-for="(item,index) in legendArray"
:key="index">
<div class="item_name">{{item.name}}</div>
<img :src="item.url" />
<div class="item_num">
<span class="item_count">{{item.count}}</span>
<span class="item_percent">{{item.percent}}</span>
</div>
</div>
</div>
</div>
</div>
<div class="l_bottom">
@ -126,6 +140,21 @@ export default {
],
legendArray: [
{
name: '未结案',
count: 120,
percent: '25.0%',
url: require('../../../../assets/img/shuju/measure/huang@2x.png')
},
{
name: '已结案',
count: 351,
percent: '50.0%',
url: require('../../../../assets/img/shuju/measure/lv@2x.png')
}
],
dateId: '',
agencyId: '',
status: 'pending',//: pendingclosed

22
src/views/modules/visual/communityGovern/processPieOption.js

@ -23,18 +23,18 @@ const center= ['50%', '200px']
tooltip: {
show: false
},
legend: {
top: 350,
bottom: 0,
itemWidth: 20,
itemHeight: 10,
textStyle: {
color: '#D2E7FF',
fontSize: 16,
lineHeight: 20,
},
// legend: {
// top: 350,
// bottom: 0,
// itemWidth: 20,
// itemHeight: 10,
// textStyle: {
// color: '#D2E7FF',
// fontSize: 16,
// lineHeight: 20,
// },
},
// },
series: [
// 外侧圆环
{

32
src/views/modules/visual/components/screen-map/index.vue

@ -66,14 +66,14 @@ var polygonStyleFunction = (function () {
return new Style({
fill: new Fill({
// color: [255, 255, 255, 0.3]
color: polygonColorArray[feature.values_.index - 1]
color: feature.values_.fillColor
}),
stroke: new Stroke({
color: polygonColorArray[feature.values_.index - 1],
width: 3
color: feature.values_.color,
width: 2
}),
text: createTextStyle(feature)
// text: createTextStyle(feature)
});;
};
})()
@ -142,7 +142,7 @@ const vueGis = {
},
methods: {
//
//:icon
loadMap (mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray, iconTextStyle) {
this.mapInfo = mapInfo
this.polygonArray = polygonArray
@ -203,26 +203,22 @@ const vueGis = {
//
loadPolygon () {
polygonSource.clear()//
let featureData = []//
if (polygonArray && polygonArray.length > 0) {//
if (this.polygonArray && this.polygonArray.length > 0) {//
let oneData = {}
polygonArray.forEach(polygonItem => {
this.polygonArray.forEach(polygonItem => {
if (polygonItem.coordinates && polygonItem.coordinates !== '') {//
let urlNum = this.getRndBetween(1, 3)
oneData = {
type: 'Feature',
id: polygonItem.id,
properties: {
id: polygonItem.id,
level: polygonItem.level,
name: polygonItem.name,
index: urlNum//
},
properties: { ...polygonItem },
geometry: {
type: 'Polygon',
coordinates: [],
@ -231,19 +227,19 @@ const vueGis = {
let coorArray = polygonItem.coordinates.split(',')//
let itemArray = []//[lon,lat]
let polygonArray = []//[[lon,lat],[lon,lat],[lon,lat]]
let tempPolygonArray = []//[[lon,lat],[lon,lat],[lon,lat]]
coorArray.forEach((item, index) => {
itemArray.push(item)
if (index % 2 == 0) {//
} else {//
polygonArray.push(itemArray)
tempPolygonArray.push(itemArray)
itemArray = []
}
});
oneData.geometry.coordinates.push(polygonArray)
oneData.geometry.coordinates.push(tempPolygonArray)
featureData.push(oneData)
}
});

255
src/views/modules/visual/measure/volunteer.vue

@ -2,7 +2,8 @@
<div class="warning-box">
<cpt-card class="card-wr">
<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>
@ -26,11 +27,12 @@
</div>
<div class="echart-wr">
<!-- <div class="echart-cicle"></div> -->
<div id="echartService" class="echart-org"></div>
<div id="echartService"
class="echart-org"></div>
</div>
</div>
</div>
<div class="card-echart">
@ -51,17 +53,19 @@
</div>
<div class="echart-wr">
<!-- <div class="echart-cicle"></div> -->
<div id="echartCount" class="echart-org"></div>
<div id="echartCount"
class="echart-org"></div>
</div>
</div>
</div>
</cpt-card>
<cpt-card class="card-wr">
<cpt-card class="card-wr card-wr-map">
<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>
@ -91,7 +95,10 @@
</div>
<div class="card-map">
这里是地图容器
<screen-map class="map"
ref="map"
@clickFeature="clickProject"
:showIconLayer="true"></screen-map>
</div>
</cpt-card>
@ -103,6 +110,7 @@ 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";
import screenMap from "@/views/modules/visual/components/screen-map";
import * as echarts from 'echarts';
export default {
@ -110,8 +118,9 @@ export default {
components: {
cptCard,
screenTable,
screenMap
},
data() {
data () {
return {
warningList: [],
headerList: [
@ -135,16 +144,62 @@ export default {
total: 0,
activeIndex: 0,
activeLevel: "1",
//
isfirstInit: true,//
agencyInfo: {},//level
unitMapList: [],
unitMapList1: [
{
type: '党建楼宇',
name: '建联单位1',
latitude: 36.062227,
longitude: 120.389455,
},
{
type: '党建楼宇',
name: '建联单位2',
latitude: 36.082227,
longitude: 120.389455,
},
{
type: '机关直属部门',
name: '建联单位3',
latitude: 36.062227,
longitude: 120.379455,
},
{
type: '两新党建',
name: '建联单位4',
latitude: 36.082227,
longitude: 120.379455,
},
{
type: '辖区单位',
name: '建联单位5',
latitude: 36.092227,
longitude: 120.379455,
},
{
type: '其他',
name: '建联单位6',
latitude: 36.102227,
longitude: 120.379455,
}
],
};
},
async mounted() {
async mounted () {
await nextTick(100);
this.initCharts()
this.initCount()
this.getBuildingwarnlist();
await this.getWorkUserInfo()
await this.getMapUnitList()
},
methods: {
initCharts() {
initCharts () {
const eId = document.getElementById('echartService')
let _charts = echarts.init(eId)
let option = {
@ -192,21 +247,21 @@ export default {
fontWeight: 'bold'
}
},
data: [
{
value: 104,
name: '党员',
{
value: 104,
name: '党员',
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
}
},
{
value: 735,
name: '居民',
{
value: 735,
name: '居民',
itemStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}
}
]
}
@ -215,7 +270,7 @@ export default {
option && _charts.setOption(option);
},
initCount() {
initCount () {
const eId = document.getElementById('echartCount')
let _charts = echarts.init(eId)
let option = {
@ -266,21 +321,21 @@ export default {
fontWeight: 'bold'
}
},
data: [
{
value: 1048,
name: '党员',
{
value: 1048,
name: '党员',
itemStyle: {
color: 'rgba(26, 178, 255, 1)'
}
}
},
{
value: 735,
name: '居民',
{
value: 735,
name: '居民',
itemStyle: {
color: 'rgba(250, 193, 38, 1)'
}
}
}
]
}
@ -289,15 +344,15 @@ export default {
option && _charts.setOption(option);
},
onClickList(index, level) {
onClickList (index, level) {
this.activeIndex = index;
this.activeLevel = level;
this.pageNo = 1;
this.getUserwarnlist();
},
//
async getUserwarnlist() {
async getUserwarnlist () {
const { activeIndex, activeLevel, warningList } = this;
const reqItem = warningList[activeIndex];
let tableData = [];
@ -323,7 +378,7 @@ export default {
}
},
//
async getBuildingwarnlist() {
async getBuildingwarnlist () {
const url = "/epmetuser/statsresiwarn/buildingwarnlist";
let params = {
agencyId: this.$store.state.user.agencyId,
@ -336,14 +391,109 @@ export default {
} else {
}
},
pageSizeChangeHandleNew(val) {
pageSizeChangeHandleNew (val) {
this.pageNo = 1;
this.pageSize = val;
},
pageCurrentChangeHandleNew(val) {
pageCurrentChangeHandleNew (val) {
this.pageNo = val;
this.getUserwarnlist();
},
//
getWorkUserInfo () {
const url = '/epmetuser/customerstaff/staffbasicinfo'
let params = {}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.agencyInfo = data
if (!data.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!data.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!data.level) {
this.agencyInfo.level = 'street'
}
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
},
//
async getMapUnitList () {
// const url = "/heart/icpartyunit/distribution"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
let params = {
agencyId: this.$store.state.user.agencyId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// this.unitMapList = data
this.unitMapList = this.unitMapList1
this.unitMapList.forEach(item => {
if (item.type === '党建楼宇') {
item.urlIndex = 0
} else if (item.type === '两新党建') {
item.urlIndex = 1
} else if (item.type === '辖区单位') {
item.urlIndex = 2
} else if (item.type === '机关直属部门') {
item.urlIndex = 3
} else if (item.type === '其他') {
item.urlIndex = 4
}
});
this.iconUrlArray = [
require('../../../../assets/img/shuju/measure/ly@2x.png'),//
require('../../../../assets/img/shuju/measure/jgzs@2x.png'),//
require('../../../../assets/img/shuju/measure/lxdj@2x.png'),//
require('../../../../assets/img/shuju/measure/xq@2x.png'),//
require('../../../../assets/img/shuju/measure/qita.png')//
]
//false
this.loadMap()
this.isfirstInit = false
} else {
this.$message.error(msg)
}
},
//
loadMap () {
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, null, null, this.unitMapList, this.iconUrlArray, null)
} else {
this.$refs.map.refreshMap(null, this.unitMapList)
}
},
//
clickProject (feature) {
console.log('标注信息', feature.values_.properties)
},
},
};
</script>
@ -383,12 +533,11 @@ export default {
color: #fff;
font-weight: 800;
}
}
.card-echart {
display: flex;
margin-top: 40px;
.card-left {
position: relative;
flex: 1;
@ -432,7 +581,8 @@ export default {
box-sizing: border-box;
margin-top: 20px;
// padding-left: 192px;
background: url('../../../../assets/img/shuju/measure/dangyuan.png') center no-repeat;
background: url("../../../../assets/img/shuju/measure/dangyuan.png") center
no-repeat;
background-size: cover;
.card-count-content {
position: relative;
@ -447,14 +597,14 @@ export default {
.card-count-label {
margin-top: 6px;
font-size: 16px;
color: rgba(255, 255, 255, .72);
color: rgba(255, 255, 255, 0.72);
}
}
.card-count-content::after {
position: absolute;
top: 50%;
left: 0;
content: '';
content: "";
width: 1px;
height: 50px;
margin-top: -25px;
@ -462,7 +612,8 @@ export default {
}
}
.card-count-item:last-child {
background: url('../../../../assets/img/shuju/measure/jumin.png') center no-repeat;
background: url("../../../../assets/img/shuju/measure/jumin.png") center
no-repeat;
}
}
@ -472,6 +623,7 @@ export default {
flex-wrap: wrap;
padding-top: 10px;
padding-bottom: 20px;
.map-tips-item {
display: flex;
align-items: center;
@ -482,7 +634,7 @@ export default {
height: 10px;
box-sizing: border-box;
margin-right: 10px;
background: #DD2719;
background: #dd2719;
border-radius: 2px;
}
.map-tips-label {
@ -492,4 +644,17 @@ export default {
}
}
.card-wr-map {
height: calc(100vh - 110px);
.card-map {
width: 100%;
height: calc(100vh - 255px);
.map {
width: 100%;
height: 100%;
}
}
}
</style>

Loading…
Cancel
Save