Browse Source

社区治理

feature
jiangyy 4 years ago
parent
commit
f25ebb1a6f
  1. 4
      .env.development
  2. 4
      .env.production.sit
  3. 4
      public/index.html
  4. BIN
      src/assets/img/shuju/volunteer1.png
  5. BIN
      src/assets/img/shuju/volunteer2.png
  6. BIN
      src/assets/img/shuju/volunteer3.png
  7. BIN
      src/assets/img/shuju/volunteer4.png
  8. BIN
      src/assets/img/shuju/volunteer5.png
  9. BIN
      src/assets/img/shuju/volunteer6.png
  10. BIN
      src/assets/img/shuju/volunteer7.png
  11. BIN
      src/assets/img/shuju/volunteer8.png
  12. BIN
      src/assets/img/shuju/volunteer9.png
  13. 18
      src/assets/scss/modules/visual/distributionAnalyze.scss
  14. 27
      src/assets/scss/modules/visual/resibuzz.scss
  15. 24
      src/assets/scss/modules/visual/typeAnalyze.scss
  16. 239
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  17. 119
      src/views/modules/visual/communityGovern/processAnalyze.vue
  18. 135
      src/views/modules/visual/communityGovern/resibuzz.vue
  19. 136
      src/views/modules/visual/communityGovern/typeAnalyze.vue
  20. 35
      src/views/modules/visual/components/screen-map/index.vue
  21. 147
      src/views/modules/visual/measure/volunteer.vue

4
.env.development

@ -1,6 +1,6 @@
NODE_ENV=development
VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
# VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = http://192.168.51.36:8080/api
# VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn/api
VUE_APP_NODE_ENV=dev

4
.env.production.sit

@ -1,5 +1,5 @@
NODE_ENV=production
VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
# VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api
VUE_APP_API_SERVER = http://192.168.1.140/api
VUE_APP_NODE_ENV=prod:sit
VUE_APP_PUBLIC_PATH=epmet-oper

4
public/index.html

@ -36,8 +36,8 @@
<!-- 开发环境 -->
<% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
<script>
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.140/api'
window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api'
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.140/api'
// window.SITE_CONFIG['apiURL'] = 'https://epmet-test.elinkservice.cn/api'
// window.SITE_CONFIG['apiURL'] = 'http://118.190.150.119:41080/api'
// window.SITE_CONFIG['apiURL'] = 'https://epmet-dev.elinkservice.cn/api'
</script>

BIN
src/assets/img/shuju/volunteer1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/img/shuju/volunteer2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/img/shuju/volunteer3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/assets/img/shuju/volunteer4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/img/shuju/volunteer5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/img/shuju/volunteer6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/img/shuju/volunteer7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/img/shuju/volunteer8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
src/assets/img/shuju/volunteer9.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

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

@ -77,6 +77,7 @@
.el-range-input {
color: #fff;
background: #06186d;
margin-left: 10px;
}
.el-range-separator {
color: #fff;
@ -191,3 +192,20 @@
}
}
}
.table-status {
position: relative;
height: 300px;
// 暂无数据
.no-data {
&-img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
}
}
}

27
src/assets/scss/modules/visual/resibuzz.scss

@ -66,35 +66,36 @@
flex-direction: row;
// flex-wrap: wrap;
// justify-content: center;
height: calc(100vh - 130px);
height: calc(100vh - 180px);
.g-l {
flex-shrink: 0;
width: 600px;
height: calc(100vh - 190px);
height: calc(100vh - 180px);
}
.g-r {
text-align: center;
margin: 40px 19px 20px;
margin: 40px 0 0 19px;
width: calc(100vw - 60px - 600px);
height: calc(100vh - 140px - 20px);
// height: calc(100vh - 170px - 20px);
}
}
.g-r {
.tb {
.m-tb {
position: relative;
height: calc(100vh - 220px);
overflow-y: auto;
@include scrollBar;
height: 100%;
.tb {
height: calc(100vh - 170px - 50px - 50px);
overflow-y: auto;
@include scrollBar;
}
.m-pagination {
position: absolute;
box-sizing: border-box;
right: 0;
bottom: 0;
position: absolute;
right: 5px;
bottom: 5px;
width: 100%;
height: 40px;
display: flex;

24
src/assets/scss/modules/visual/typeAnalyze.scss

@ -66,35 +66,37 @@
flex-direction: row;
// flex-wrap: wrap;
// justify-content: center;
height: calc(100vh - 130px);
height: calc(100vh - 180px);
.g-l {
flex-shrink: 0;
width: 600px;
height: calc(100vh - 190px);
height: calc(100vh - 180px);
}
.g-r {
text-align: center;
margin: 40px 19px 20px;
margin: 40px 0 0 19px;
width: calc(100vw - 60px - 600px);
height: calc(100vh - 140px - 20px);
// height: calc(100vh - 140px - 20px);
}
}
.g-r {
.tb {
.m-tb {
position: relative;
height: calc(100vh - 220px);
overflow-y: auto;
@include scrollBar;
height: 100%;
.tb {
height: calc(100vh - 170px - 50px - 50px);
overflow-y: auto;
@include scrollBar;
}
.m-pagination {
position: absolute;
box-sizing: border-box;
right: 0;
bottom: 0;
right: 5px;
bottom: 5px;
width: 100%;
height: 40px;
display: flex;

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

@ -15,8 +15,8 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select">
<el-date-picker v-model="timeRange"
@ -39,6 +39,17 @@
<screen-echarts-frame class="echart-line"
@myChartMethod="lineInitOk"
ref="lineChart"></screen-echarts-frame>
<!-- <div class="table-status"
v-if="loading">
<screen-loading>加载中</screen-loading>
</div>
<div class="table-status"
v-if="lineList.length == 0 && !loading">
<div class="no-data">
<img src="../../../../assets/img/modules/visual/noData.png"
class="no-data-img" />
</div>
</div> -->
</div>
<div class="g-r">
@ -73,7 +84,8 @@ import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts
import screenMap from "@/views/modules/visual/components/screen-map";
import { lineOption } from './distributionLineOption.js'
import * as echarts from 'echarts'
import nextTick from 'dai-js/tools/nextTick'
import ScreenLoading from "@/views/modules/visual/components/screen-loading";
export default {
name: "HomeMap",
@ -104,57 +116,57 @@ export default {
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'
}
]
}
// {
// 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: [],
@ -194,8 +206,10 @@ export default {
this.userId = this.uid;
this.initData()
await this.getAgencylist()//
await nextTick(500)
await this.loadOrgData()
this.getApiData();
await this.getApiData();
},
methods: {
@ -241,31 +255,46 @@ export default {
await this.loadMapData();
},
async getAgencylist () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
//
getAgencylist () {
const url = '/gov/org/customeragency/staffinagencylist'
let params = {}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.agencyInfo = data.agencyList
this.orgId = this.agencyInfo.agencyId
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
const params = {
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc'
customerId: '0c41b272ee9ee95ac6f184ad548a30eb'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
if (data.subAgencyList) {
data.agencyList.subAgencyList = data.subAgencyList
this.casOptions.push(data.agencyList)
this.agencyIdArray.push(this.orgId)
}
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
} else {
this.$message.error(msg)
}
},
handleChangeDate (value) {
this.dateId = value
this.getApiData()
},
@ -283,16 +312,16 @@ export default {
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.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
@ -307,12 +336,10 @@ export default {
},
async loadMapData () {
this.$refs.lineChart.clear()
const _that = this
// this.$refs.lineChart.showLoading()
// const url ="/gov/project/project/projectdistributionanalysisright";
const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisright";
const url = "/gov/project/project/projectdistributionanalysisright";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisright";
let params = {
orgId: this.orgId,
startDate: this.timeRange.length > 0 && this.timeRange[0] || '',
@ -349,7 +376,7 @@ export default {
)
}
if (data.list && data.list.length > 0) {
// this.mapList = data.list
this.mapList = data.list
} else {
@ -357,7 +384,7 @@ export default {
}
this.mapList.forEach(item => {
// debugger
for (let i = 0; i < this.subAgencyArray.length; i++) {
let agencyItem = this.subAgencyArray[i]
if (item.orgId === agencyItem.id) {
@ -409,10 +436,7 @@ export default {
}
},
lineInitOk (dom) {
this.lineInitState = true
},
@ -428,11 +452,10 @@ export default {
// 线
async getLineChart () {
this.$refs.lineChart.clear()
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";
this.$refs.lineChart.showLoading()
const url = "/gov/project/project/projectdistributionanalysisleft";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/project/projectdistributionanalysisleft";
let params = {
orgId: this.orgId,
startDate: this.timeRange.length > 0 && this.timeRange[0] || '',
@ -440,24 +463,27 @@ export default {
};
const { data, code, msg } = await requestPost(url, params);
this.$refs.lineChart.hideLoading()
if (code === 0) {
// pieChart
this.lineOption = lineOption()
if (data && data.length > 0) {
this.lineList = data
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.lineList = []
}
this.$refs.lineChart.setOption(this.lineOption, true)
this.$refs.lineChart.setOption({
xAxis: { data: this.xaxis },
legend: { data: this.legend },
series: this.series
}, true)
} else {
@ -548,7 +574,8 @@ export default {
cptCard,
cptTb,
screenEchartsFrame,
screenMap
screenMap,
ScreenLoading
},
watch: {

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

@ -12,17 +12,17 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select">
<el-date-picker v-model="dateId"
<el-date-picker v-model="dateIdShow"
type="date"
:clearable="false"
@change="handleChangeDate"
prefix-icon="el-icon-caret-bottom"
placeholder="选择日期"
value-format="yyyyMMdd">
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
</div>
@ -108,6 +108,7 @@ import screenMap from "@/views/modules/visual/components/screen-map";
import { pieOption } from './processPieOption.js'
import { lineOption } from './processLineOption.js'
import nextTick from 'dai-js/tools/nextTick'
export default {
@ -156,6 +157,7 @@ export default {
],
dateId: '',
dateIdShow: '',
agencyId: '',
status: 'pending',//: pendingclosed
agencyInfo: {},
@ -225,16 +227,26 @@ export default {
async mounted () {
this.userId = this.uid;
this.initData()
await this.getWorkUserInfo()
// this.agencyInfo = this.$store.state.user
// this.agencyId = this.agencyInfo.agencyId
// await this.getWorkUserInfo()
await this.getAgencylist()//
this.getApiData();
await nextTick(500)
await this.getApiData();
},
methods: {
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
this.dateId = new Date(time); //
var nowdate = new Date(time); //
var y = nowdate.getFullYear();
var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1;
var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate();
this.dateIdShow = y + '-' + m + '-' + d;
},
async getApiData () {
@ -245,29 +257,41 @@ export default {
},
handleChangeDate (value) {
this.dateId = value
this.dateIdShow = value
this.getApiData()
},
//
getWorkUserInfo () {
const url = '/epmetuser/customerstaff/staffbasicinfo'
//
getAgencylist () {
const url = '/gov/org/customeragency/agencygridtree'
let params = {}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.agencyInfo = data
if (!data.latitude) {
this.agencyId = this.agencyInfo.agencyId
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!data.longitude) {
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!data.level) {
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.agencyId)
}
},
(rspMsg, data) => {
this.$message.error(rspMsg)
@ -276,41 +300,19 @@ export default {
},
async getAgencylist () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
const params = {
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc'
customerId: '0c41b272ee9ee95ac6f184ad548a30eb'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
}
} else {
this.$message.error(msg)
}
},
//
async getProjectTotal () {
// const url = "/data/aggregator/project/projecttotal";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal";
this.$refs.pieChart.showLoading()
const url = "/data/aggregator/project/projecttotal";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projecttotal";
let params = {
agencyId: '',
agencyId: this.agencyId,
dateId: this.dateId,
};
const { data, code, msg } = await requestPost(url, params);
this.$refs.pieChart.hideLoading()
if (code === 0) {
this.projectTotal = data.projectTotal
this.dateIncr = data.dateIncr
@ -339,10 +341,10 @@ export default {
//
async loadProjectlist () {
// const url = "/data/aggregator/project/projectstatuslist";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectstatuslist";
const url = "/data/aggregator/project/projectstatuslist";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectstatuslist";
let params = {
agencyId: '',
agencyId: this.agencyId,
dateId: this.dateId,
status: this.status
};
@ -352,13 +354,13 @@ export default {
if (code === 0) {
// this.projectList = [...data]
if (this.status === 'closed') {
this.projectList = this.projectList1
} else {
this.projectList = this.projectList2
this.projectList = [...data]
// if (this.status === 'closed') {
// this.projectList = this.projectList1
// } else {
// this.projectList = this.projectList2
}
// }
this.projectList.forEach(item => {
item.values_ = {
name: item.title
@ -410,7 +412,7 @@ export default {
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle)
this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000)
} else {
this.$refs.map.refreshMap(null, this.projectList)
@ -446,18 +448,18 @@ export default {
// 线
async getLineChart () {
this.$refs.lineChart.clear()
this.$refs.lineChart.showLoading()
const _that = this
// this.$refs.pieChart.showLoading()
// const url ="/data/aggregator/project/projectmonthincr";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectmonthincr";
const url = "/data/aggregator/project/projectmonthincr";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectmonthincr";
let params = {
agencyId: this.agencyId,
dateId: this.dateId,
};
const { data, code, msg } = await requestPost(url, params);
this.$refs.lineChart.hideLoading()
if (code === 0) {
// pieChart
this.lineOption = lineOption()
@ -504,7 +506,7 @@ export default {
this.$refs.pieChart.clear()
this.pieTotal = 0
const _that = this
// this.$refs.pieChart.showLoading()
// pieChart
this.pieOption = pieOption(this.pieChartS)
@ -597,6 +599,11 @@ export default {
},
watch: {
dateIdShow () {
let dataArray = this.dateIdShow.split('-')
this.dateId = dataArray.join('')
},
uid (id) {
this.userId = id;
},

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

@ -12,8 +12,8 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select status-select">
<el-select v-model="status"
@ -45,17 +45,16 @@
: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>
</div>
<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>
</div>
</div>
@ -71,6 +70,7 @@ import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import { pieOption } from './resiPieOption.js'
import nextTick from 'dai-js/tools/nextTick'
export default {
@ -121,6 +121,7 @@ export default {
status: 'all',
orgId: '',
orgTypeSel: '',
demand: {
loading: true,
colList: [
@ -184,7 +185,7 @@ export default {
optionProps: {
multiple: false,
value: 'agencyId',
value: 'orgLevel',
label: 'agencyName',
children: 'subAgencyList',
checkStrictly: true
@ -199,41 +200,60 @@ export default {
async mounted () {
this.userId = this.uid;
await this.getAgencylist()//
await nextTick(500)
this.getApiData();
},
methods: {
async getApiData () {
await this.getAgencylist()//
await this.getPie()
await this.getTable();
},
async getAgencylist () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
//
getAgencylist () {
const url = '/gov/org/customeragency/agencygridtree'
let params = {}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.agencyInfo = data
this.orgId = this.agencyInfo.agencyId
this.orgType = this.agencyInfo.level === 'grid' ? 'grid' : 'agency'
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
const params = {
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc'
customerId: '0c41b272ee9ee95ac6f184ad548a30eb'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.agencyInfo.orgLevel)
}
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
} else {
this.$message.error(msg)
}
},
pieInitOk (dom) {
console.log('pie准备好了', dom)
this.pieChartS = dom
@ -255,22 +275,21 @@ export default {
this.pieTotal = 0
const _that = this
// this.$refs.pieChart.showLoading()
// const url ="/gov/issue/issue/resibuzz-leftpiechart";
const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz-leftpiechart";
const url = "/gov/issue/issue/resibuzz-leftpiechart";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz-leftpiechart";
let params = {
orgId: this.orgId,
orgType: this.orgType,
};
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
this.pieData = data
} else {
this.pieData = [{ count: 0, categoryName: '无分类', color: '#00E5ED' }]
@ -359,19 +378,29 @@ export default {
},
handleChangeAgency (value) {
console.log(value)
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.orgId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
console.log(this.agencyIdArray)
let orgArray = []
let key = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
if (key) {
orgArray = key.split('-')
this.orgId = orgArray[0]
this.orgType = orgArray[1]
} else {
this.orgId = ''
this.orgType = ''
}
this.getApiData()
},
//
async getTable () {
// const url = "/gov/issue/issue/resibuzz";
const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz";
const url = "/gov/issue/issue/resibuzz";
// const url = "http://yapi.elinkservice.cn/mock/245/gov/issue/issue/resibuzz";
let params = {
status: this.status,
orgId: this.orgId,
orgType: this.orgType,
pageNo: this.demand.pageNo,
pageSize: this.demand.pageSize,
};
@ -384,15 +413,15 @@ export default {
this.demand.list = data.list.map((item) => {
return [
{ type: "index" },
item.issueTitle,
item.suggestion,
item.categoryName,
item.status,
item.createdTime,
item.issueOriginator,
item.voteAccount,
item.supportCount,
item.oppositionCount,
item.issueTitle ? item.issueTitle : '',
item.suggestion ? item.suggestion : '',
item.categoryName.join(','),
item.status ? item.status : '',
item.createdTime ? item.createdTime : '',
item.issueOriginator ? item.issueOriginator : '',
item.voteAccount ? item.voteAccount : '',
item.supportCount ? item.supportCount : '',
item.oppositionCount ? item.oppositionCount : '',
{ type: "operate", list: ["查看"] },
];
});

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

@ -12,18 +12,18 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
@change="handleChangeAgency"
clearable></el-cascader>
:show-all-levels="false"
@change="handleChangeAgency"></el-cascader>
</div>
<div class="second-select ">
<el-date-picker v-model="dateId"
<el-date-picker v-model="dateIdShow"
type="date"
:clearable="false"
@change="handleChangeDate"
prefix-icon="el-icon-caret-bottom"
placeholder="选择日期"
value-format="yyyyMMdd">
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
@ -45,15 +45,16 @@
: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>
</div>
<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>
</div>
@ -71,7 +72,7 @@ import cptTb from "@/views/modules/visual/cpts/tb";
import screenEchartsFrame from "@/views/modules/visual/components/screen-echarts-frame";
import { pieOption } from './typePieOption.js'
import nextTick from 'dai-js/tools/nextTick'
export default {
name: "HomeMap",
@ -100,6 +101,7 @@ export default {
{ total: 300, categoryName: '街道安全', color: '#FAC126' }
],
dateIdShow: '',
agencyId: '',
dateId: '',
categoryCode: '',
@ -160,6 +162,7 @@ export default {
multiple: false,
value: 'agencyId',
label: 'agencyName',
orgType: 'orgType',
children: 'subAgencyList',
checkStrictly: true
},
@ -175,48 +178,62 @@ export default {
this.userId = this.uid;
this.initData()
await this.getAgencylist()//
this.getApiData();
await nextTick(500)
await this.getPie()
},
methods: {
initData () {
var time = (new Date).getTime() - 24 * 60 * 60 * 1000;
this.dateId = new Date(time); //
var nowdate = new Date(time); //
var y = nowdate.getFullYear();
var m = nowdate.getMonth() + 1 < 10 ? "0" + (nowdate.getMonth() + 1) : nowdate.getMonth() + 1;
var d = nowdate.getDate() < 10 ? "0" + nowdate.getDate() : nowdate.getDate();
this.dateIdShow = y + '-' + m + '-' + d;
},
async getApiData () {
await this.getPie()
await this.getTable();
},
//
getAgencylist () {
const url = '/gov/org/customeragency/agencygridtree'
let params = {}
window.app.ajax.post(
url,
params,
(data, rspMsg) => {
this.agencyInfo = data
this.agencyId = this.agencyInfo.agencyId
if (!this.agencyInfo.latitude) {
this.agencyInfo.latitude = 36.072227
}
if (!this.agencyInfo.longitude) {
this.agencyInfo.longitude = 120.389455
}
if (!this.agencyInfo.level) {
this.agencyInfo.level = 'street'
}
async getAgencylist () {
const url = '/gov/org/customeragency/agencylist'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
//
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
const params = {
// customerId: '613cc61a6b8ce4c70d21bd413dac72cc'
customerId: '0c41b272ee9ee95ac6f184ad548a30eb'
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
++this.iscascaderShow
this.casOptions = []
this.agencyIdArray.length = []
if (data) {
this.casOptions.push(data)
this.agencyIdArray.push(this.agencyId)
}
if (data) {
this.casOptions.push(data)
},
(rspMsg, data) => {
this.$message.error(rspMsg)
}
)
} else {
this.$message.error(msg)
}
},
handleChangeDate (value) {
this.dateId = value
this.getApiData()
this.dateIdShow = value
this.getPie()
},
@ -241,8 +258,8 @@ export default {
this.pieTotal = 0
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";
const url = "/data/aggregator/project/projectcategorylist";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/projectcategorylist";
let params = {
agencyId: this.agencyId,
dateId: this.dateId,
@ -255,7 +272,7 @@ export default {
// pieChart
this.pieOption = pieOption(this.pieChartS)
if (data && data.length > 0) {
// this.pieData = data
this.pieData = data
} else {
this.pieData = [{ total: 0, categoryName: '无分类', color: '#00E5ED' }]
@ -274,14 +291,13 @@ export default {
maxValue = item.value
maxIndex = index
item.selected = true
this.categoryCode = item.categoryCode
} else if (index !== 0) {
item.selected = false
}
});
this.pieOption.title.text = this.pieTotal
this.pieOption.series[1].itemStyle = {
color: function (params) {
@ -293,8 +309,6 @@ export default {
let fun = function (params) {
_that.clickPie(params.dataIndex)
_that.categoryCode = _that.pieData[params.dataIndex].categoryCode
_that.getTable()
}
this.$refs.pieChart.handleClick(fun)
this.clickPie(maxIndex)
@ -304,7 +318,7 @@ export default {
},
clickPie (seriesIndex) {
async clickPie (seriesIndex) {
this.pieData.forEach((element, index) => {
if (index === seriesIndex) {
element.label = {
@ -340,20 +354,22 @@ export default {
// this.$refs.pieChart.hideLoading()
this.$refs.pieChart.setOption(this.pieOption)
this.categoryCode = this.pieData[seriesIndex].categoryCode
this.getTable()
},
handleChangeAgency (value) {
this.agencyName = this.$refs["myCascader"].getCheckedNodes()[0].label
this.agencyId = this.agencyIdArray.length > 0 ? this.agencyIdArray[this.agencyIdArray.length - 1] : ''
this.getApiData()
this.getPie()
console.log(this.agencyIdArray)
},
//
async getTable () {
// const url = "/data/aggregator/project/categoryprojectlist";
const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/categoryprojectlist";
const url = "/data/aggregator/project/categoryprojectlist";
// const url = "http://yapi.elinkservice.cn/mock/245/data/aggregator/project/categoryprojectlist";
let params = {
dateId: this.dateId,
agencyId: this.agencyId,
@ -375,13 +391,13 @@ export default {
item.statusShow = item.status === 'pending' ? '待处理' : '已结案'
return [
{ type: "index" },
item.projectCode,
item.projectCode ? item.projectCode : '',
item.categoryNames.join(','),
item.originShow,
item.gridName,
item.statusShow,
item.title,
item.time,
item.originShow ? item.originShow : '',
item.gridName ? item.gridName : '',
item.statusShow ? item.statusShow : '',
item.title ? item.title : '',
item.time ? item.time : '',
{ type: "operate", list: ["查看"] },
];
});
@ -415,11 +431,15 @@ export default {
},
watch: {
dateIdShow () {
let dataArray = this.dateIdShow.split('-')
this.dateId = dataArray.join('')
},
uid (id) {
this.userId = id;
},
userId () {
this.getApiData();
this.getPie()
window.scrollTo(0, 0);
},
},

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

@ -24,6 +24,7 @@ import { defaults as defaultInteractions, Select, DoubleClickZoom } from 'ol/int
import { getCenter, boundingExtent } from 'ol/extent.js';
import { Circle as CircleStyle, Icon, Fill, Stroke, Style, Text } from 'ol/style.js';
import { altKeyOnly, click, pointerMove } from 'ol/events/condition';
import { getDistance } from 'ol/sphere';
import { mapGetters } from "vuex";
import { Loading } from 'element-ui'; //Loading
@ -134,6 +135,7 @@ const vueGis = {
//icon
iconUrlArray: [],
iconTextColor: '#ffffff',
distanceMax: null,//
}
},
@ -143,13 +145,14 @@ const vueGis = {
},
methods: {
//:icon
loadMap (mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray, iconTextStyle) {
loadMap (mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray, iconTextStyle, distanceMax) {
this.mapInfo = mapInfo
this.polygonArray = polygonArray
this.polIconUrlArray = polIconUrlArray
this.iconArrays = iconArrays
this.iconUrlArray = iconUrlArray
this.iconTextStyle = iconTextStyle
this.distanceMax = distanceMax
//
this.initMap()
@ -302,11 +305,12 @@ const vueGis = {
//icon
loadIcon () {
iconSource.clear()//
if (this.iconArrays && this.iconArrays.length > 0) {
let iconFeatures = [];
let iconArraysNew = []
this.iconArrays.forEach((oneIcon, index) => {
let urlNum = this.getRndBetween(1, 3)
//
let iconItem = new Feature({
geometry: new Point([oneIcon.longitude, oneIcon.latitude]),
@ -328,7 +332,16 @@ const vueGis = {
});
iconItem.setStyle(iconStyle);
iconFeatures.push(iconItem);
if (this.distanceMax) {
if (this.computedDistance(oneIcon.longitude, oneIcon.latitude, this.distanceMax)) {
iconFeatures.push(iconItem);
}
} else {
iconFeatures.push(iconItem);
}
});
@ -349,6 +362,22 @@ const vueGis = {
},
//
computedDistance (lon, lat, max) {
let c1 = [2]; c1[0] = lon; c1[1] = lat;
let distance = getDistance(this.centerPoint, c1);
console.log(distance)
return (distance < max || distance === max)
// debugger
// return
// var wgs84Sphere = new ol.Sphere(6378137);
// wgs84Sphere.haversineDistance([120.21592590991689, 30.210793016606],[120.21670777384473, 30.211168525868086]);
},
//
initMap () {
this.setMapLocation()

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

@ -72,26 +72,16 @@
</div>
<div class="map-tips">
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">调解员</div>
</div>
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">调解员</div>
</div>
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">能人达人</div>
</div>
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">治安巡逻</div>
</div>
<div class="map-tips-item">
<div class="map-tips-icon"></div>
<div class="map-tips-label">代办员</div>
<div class="map-tips-item"
v-for="item in legendArray"
:key="item.optionValue">
<img class="title-icon"
:src="item.url" />
<div class="map-tips-label">{{item.optionLabel}}</div>
</div>
</div>
<div class="card-map">
@ -148,44 +138,20 @@ export default {
//
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,
}
distributionsList: [],
legendArray: [],
iconUrlArray: [
require('../../../../assets/img/shuju/volunteer1.png'),//
require('../../../../assets/img/shuju/volunteer2.png'),//
require('../../../../assets/img/shuju/volunteer3.png'),//
require('../../../../assets/img/shuju/volunteer4.png'),//
require('../../../../assets/img/shuju/volunteer5.png'),//
require('../../../../assets/img/shuju/volunteer6.png'),//
require('../../../../assets/img/shuju/volunteer7.png'),//
require('../../../../assets/img/shuju/volunteer8.png'),//
require('../../../../assets/img/shuju/volunteer9.png'),//
],
};
},
@ -427,49 +393,58 @@ export default {
},
//
async getMapUnitList () {
// const url = "/heart/icpartyunit/distribution"
const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
const url = "/epmetuser/volunteer/distribution"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyunit/distribution"
let params = {
agencyId: this.$store.state.user.agencyId
customerId: this.$store.state.user.customerId
}
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.legendArray = data.legends
this.legendArray.forEach((legendTtem, index) => {
if (index < this.iconUrlArray.length) {
legendTtem.url = this.iconUrlArray[index]
} else {//
legendTtem.url = this.iconUrlArray[0]
}
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')//
]
});
this.legendArray.push({
optionValue: 'other',
optionLabel: '其他',
url: this.iconUrlArray[8]
})
this.distributionsList = data.distributions
this.distributionsList.forEach(item => {
let typeShow = ''
if (item.volunteerCategories.length > 0) {
typeShow = item.volunteerCategories[0]
} else {
typeShow = 'other'
}
item.urlIndex = 0
for (let i = 0; i < this.legendArray.length; i++) {
if (typeShow === this.legendArray[i].optionValue) {
item.urlIndex = i
break;
}
}
});
console.log(this.distributionsList)
//false
this.loadMap()
this.isfirstInit = false
} else {
@ -483,7 +458,7 @@ export default {
loadMap () {
if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
this.$refs.map.loadMap(this.agencyInfo, null, null, this.unitMapList, this.iconUrlArray, null)
this.$refs.map.loadMap(this.agencyInfo, null, null, this.distributionsList, this.iconUrlArray, null)
} else {
this.$refs.map.refreshMap(null, this.unitMapList)

Loading…
Cancel
Save