diff --git a/.env.development b/.env.development
index 2ad1156bb..b3e49ab5f 100644
--- a/.env.development
+++ b/.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
diff --git a/.env.production.sit b/.env.production.sit
index de86de77c..b0c600ea6 100644
--- a/.env.production.sit
+++ b/.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
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index ef957a4cf..3d3861c78 100644
--- a/public/index.html
+++ b/public/index.html
@@ -36,8 +36,8 @@
<% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
diff --git a/src/assets/img/shuju/volunteer1.png b/src/assets/img/shuju/volunteer1.png
new file mode 100644
index 000000000..2937ab236
Binary files /dev/null and b/src/assets/img/shuju/volunteer1.png differ
diff --git a/src/assets/img/shuju/volunteer2.png b/src/assets/img/shuju/volunteer2.png
new file mode 100644
index 000000000..0128eed82
Binary files /dev/null and b/src/assets/img/shuju/volunteer2.png differ
diff --git a/src/assets/img/shuju/volunteer3.png b/src/assets/img/shuju/volunteer3.png
new file mode 100644
index 000000000..a070fa692
Binary files /dev/null and b/src/assets/img/shuju/volunteer3.png differ
diff --git a/src/assets/img/shuju/volunteer4.png b/src/assets/img/shuju/volunteer4.png
new file mode 100644
index 000000000..e2fe9f32b
Binary files /dev/null and b/src/assets/img/shuju/volunteer4.png differ
diff --git a/src/assets/img/shuju/volunteer5.png b/src/assets/img/shuju/volunteer5.png
new file mode 100644
index 000000000..4cc60c134
Binary files /dev/null and b/src/assets/img/shuju/volunteer5.png differ
diff --git a/src/assets/img/shuju/volunteer6.png b/src/assets/img/shuju/volunteer6.png
new file mode 100644
index 000000000..361d6f510
Binary files /dev/null and b/src/assets/img/shuju/volunteer6.png differ
diff --git a/src/assets/img/shuju/volunteer7.png b/src/assets/img/shuju/volunteer7.png
new file mode 100644
index 000000000..7906c624c
Binary files /dev/null and b/src/assets/img/shuju/volunteer7.png differ
diff --git a/src/assets/img/shuju/volunteer8.png b/src/assets/img/shuju/volunteer8.png
new file mode 100644
index 000000000..fc1f354a6
Binary files /dev/null and b/src/assets/img/shuju/volunteer8.png differ
diff --git a/src/assets/img/shuju/volunteer9.png b/src/assets/img/shuju/volunteer9.png
new file mode 100644
index 000000000..6e2f64027
Binary files /dev/null and b/src/assets/img/shuju/volunteer9.png differ
diff --git a/src/assets/scss/modules/visual/distributionAnalyze.scss b/src/assets/scss/modules/visual/distributionAnalyze.scss
index 777315536..874dfbed6 100644
--- a/src/assets/scss/modules/visual/distributionAnalyze.scss
+++ b/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;
+ }
+ }
+}
diff --git a/src/assets/scss/modules/visual/resibuzz.scss b/src/assets/scss/modules/visual/resibuzz.scss
index a5c3918e1..138c09e20 100644
--- a/src/assets/scss/modules/visual/resibuzz.scss
+++ b/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;
diff --git a/src/assets/scss/modules/visual/typeAnalyze.scss b/src/assets/scss/modules/visual/typeAnalyze.scss
index a5c3918e1..252122c71 100644
--- a/src/assets/scss/modules/visual/typeAnalyze.scss
+++ b/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;
diff --git a/src/views/modules/visual/communityGovern/distributionAnalyze.vue b/src/views/modules/visual/communityGovern/distributionAnalyze.vue
index 965bd177b..097df0a05 100644
--- a/src/views/modules/visual/communityGovern/distributionAnalyze.vue
+++ b/src/views/modules/visual/communityGovern/distributionAnalyze.vue
@@ -15,8 +15,8 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
- @change="handleChangeAgency"
- clearable>
+ :show-all-levels="false"
+ @change="handleChangeAgency">
+
@@ -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: {
diff --git a/src/views/modules/visual/communityGovern/processAnalyze.vue b/src/views/modules/visual/communityGovern/processAnalyze.vue
index a151cf589..4e2e852d2 100644
--- a/src/views/modules/visual/communityGovern/processAnalyze.vue
+++ b/src/views/modules/visual/communityGovern/processAnalyze.vue
@@ -12,17 +12,17 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
- @change="handleChangeAgency"
- clearable>
+ :show-all-levels="false"
+ @change="handleChangeAgency">
-
+ value-format="yyyy-MM-dd">
@@ -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',//状态:待处理 pending,结案closed
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;
},
diff --git a/src/views/modules/visual/communityGovern/resibuzz.vue b/src/views/modules/visual/communityGovern/resibuzz.vue
index f042af0b4..8d79875bd 100644
--- a/src/views/modules/visual/communityGovern/resibuzz.vue
+++ b/src/views/modules/visual/communityGovern/resibuzz.vue
@@ -12,8 +12,8 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
- @change="handleChangeAgency"
- clearable>
+ :show-all-levels="false"
+ @change="handleChangeAgency">
-
-
+
@@ -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: ["查看"] },
];
});
diff --git a/src/views/modules/visual/communityGovern/typeAnalyze.vue b/src/views/modules/visual/communityGovern/typeAnalyze.vue
index 8e77ebdb0..61e1bfd6a 100644
--- a/src/views/modules/visual/communityGovern/typeAnalyze.vue
+++ b/src/views/modules/visual/communityGovern/typeAnalyze.vue
@@ -12,18 +12,18 @@
:key="iscascaderShow"
:options="casOptions"
:props="optionProps"
- @change="handleChangeAgency"
- clearable>
+ :show-all-levels="false"
+ @change="handleChangeAgency">
-
+ value-format="yyyy-MM-dd">
@@ -45,15 +45,16 @@
:header="demand.header"
:list="demand.list">
-
+
+
+
@@ -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);
},
},
diff --git a/src/views/modules/visual/components/screen-map/index.vue b/src/views/modules/visual/components/screen-map/index.vue
index c2648b0ad..107a66222 100644
--- a/src/views/modules/visual/components/screen-map/index.vue
+++ b/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()
diff --git a/src/views/modules/visual/measure/volunteer.vue b/src/views/modules/visual/measure/volunteer.vue
index 8850c5402..a39f7e784 100644
--- a/src/views/modules/visual/measure/volunteer.vue
+++ b/src/views/modules/visual/measure/volunteer.vue
@@ -72,26 +72,16 @@
-
-
-
-
-
-
-
代办员
+
+
+
+
![]()
+
{{item.optionLabel}}
+
@@ -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)