@@ -41,68 +268,347 @@
diff --git a/src/views/modules/shequ/cpts/people-more.vue b/src/views/modules/shequ/cpts/people-more.vue
index 49d0755d..4ebad94f 100644
--- a/src/views/modules/shequ/cpts/people-more.vue
+++ b/src/views/modules/shequ/cpts/people-more.vue
@@ -484,20 +484,9 @@ export default {
if (Array.isArray(options)) {
let valueArr = value.split(",");
if (type == "cascader") {
- if (valueArr.length > 0) {
- let level1 = options.find((item) => item.value == valueArr[0]);
- if (level1) {
- if (valueArr.length > 1 && level1.children) {
- let level2 = level1.children.find(
- (item) => item.value == valueArr[1]
- );
- if (level2) {
- return level1.label + "-" + level2.label;
- }
- }
- return level1.label;
- }
- }
+ let finalValue = [];
+ this.getNodePath(options, value, finalValue);
+ return finalValue.join("-");
} else {
return valueArr
.map((val) => {
@@ -513,6 +502,24 @@ export default {
return "--";
},
+ getNodePath(node, val, path) { // node:所有数据,val:后台返回的id, path:要渲染的数组id
+ for (let i = 0; i < node.length; i++) {
+ const ele = node[i];
+ if (ele.value === val) {
+ path.push(ele.label);
+ return path
+ } else if (ele.children && ele.children.length > 0) {
+ if (ele.children.some(row => row.value === val)) {
+ path.unshift(ele.label);
+ this.getNodePath(ele.children,val,path);
+ } else {
+ this.getNodePath(ele.children,val,path);
+ }
+ }
+ }
+ return path;
+ },
+
//加载组织数据
async getField() {
const url = "/oper/customize/icform/getcustomerform";
diff --git a/src/views/modules/visual/communityParty/community.vue b/src/views/modules/visual/communityParty/community.vue
index 79f533a5..e8f825ac 100644
--- a/src/views/modules/visual/communityParty/community.vue
+++ b/src/views/modules/visual/communityParty/community.vue
@@ -301,7 +301,7 @@ export default {
this.getCateCount(this.agencyId)
- await this.getWorkUserInfo()
+ // await this.getWorkUserInfo()
// await this.getMapUnitList(this.agencyId)
},
watch: {
@@ -360,7 +360,15 @@ export default {
// this.pieEduOptions.series[1].width = 400
this.clickEduPie(0)
let fun = params => {
- this.clickEduPie(params.dataIndex)
+ console.log('params------c', params)
+ if (params.seriesIndex == 0 || params.seriesIndex == 2) {
+ this.unitType = ''
+ this.getUnitList(this.agencyId)
+ this.$refs.eduChart.clear()
+ this.noInit = false
+ this.clickEduPie(0)
+ // return
+ } else this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
// this.noInit = true
@@ -368,6 +376,7 @@ export default {
},
clickEduPie (seriesIndex) {
+
let _code = ''
let isClick = false
this.partyItem.forEach((element, index) => {
@@ -517,14 +526,45 @@ export default {
if (code === 0) {
this.showMap = false
this.unitTotal = data.total
+ this.unitTableData = []
this.unitTableData = data.list.map((item, index) => {
return {
...item,
- index: index + 1
+ urlIndex: index
}
})
- const url = require('../../../../assets/img/shuju/measure/other.png')
- this.iconUrlArray = [url]
+ this.unitTableData.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
+ } else if (item.type === '民办非企业单位') {
+ item.urlIndex = 5
+ } else if (item.type === '基金会') {
+ item.urlIndex = 6
+ } else if (item.type === '其他') {
+ item.urlIndex = 7
+ }
+ });
+ // const url = require('../../../../assets/img/shuju/measure/other.png')
+ // this.iconUrlArray = [url]
+ this.iconUrlArray = [
+ require('../../../../assets/img/shuju/measure/lxdj.png'),//楼宇党建
+ require('../../../../assets/img/shuju/measure/lxzz.png'),//两新组织
+ require('../../../../assets/img/shuju/measure/qydw.png'),//区域单位党建
+ require('../../../../assets/img/shuju/measure/jgzs.png'),//机关直属部门
+ require('../../../../assets/img/shuju/measure/other.png'),//社会团体
+ require('../../../../assets/img/shuju/measure/minban.png'),//民办
+ require('../../../../assets/img/shuju/measure/jijin.png'),//基金
+ require('../../../../assets/img/shuju/measure/qita.png')//其他
+ ]
this.showMap = true
//第一次加载完置为false
@@ -573,7 +613,7 @@ export default {
if (code === 0) {
- this.orgData = data
+ this.agencyInfo = data
this.orgId = this.orgData.id
this.orgLevel = this.orgData.level
this.parentPolygon = []
@@ -581,7 +621,7 @@ export default {
return {
...item,
color: "#00E5ED",
- fillColor: "rgba(0, 229, 237, 0.16)"
+ fillColor: "rgba(0, 229, 237, 0)"
}
})
@@ -655,24 +695,24 @@ export default {
// this.cateInfo = data
const colorItem = {
0: {
- color: 'rgba(250, 32, 10, 1)',
+ color: '#FA200A',
icon: require('../../../../assets/img/shuju/measure/lxdj.png')
},
1: {
- color: 'rgba(251, 177, 4, 1)',
+ color: '#FBB104',
icon: require('../../../../assets/img/shuju/measure/lxzz.png')
},
2: {
- color: 'rgba(80, 194, 237, 1)',
+ color: '#50C2ED',
icon: require('../../../../assets/img/shuju/measure/qydw.png')
},
3: {
- color: 'rgba(65, 181, 104, 1)',
+ color: '#41B568',
icon: require('../../../../assets/img/shuju/measure/jgzs.png')
},
4: {
- color: 'rgba(192, 21, 195, 1)',
- icon: require('../../../../assets/img/shuju/measure/qita.png')
+ color: '#0189d5',
+ icon: require('../../../../assets/img/shuju/measure/other.png')
},
5: {
color: '#ee7801',
@@ -683,18 +723,22 @@ export default {
icon: require('../../../../assets/img/shuju/measure/jijin.png')
},
7: {
- color: '#0189d5',
- icon: require('../../../../assets/img/shuju/measure/other.png')
+ color: '#C015C3', //
+
+ icon: require('../../../../assets/img/shuju/measure/qita.png')
}
}
this.partyItem = data.map((item, index) => {
return {
...item,
- ...colorItem[index],
+ itemStyle: {
+ ...colorItem[item.code]
+ },
name: item.label,
isClick: false
}
})
+ console.log('this.partyItem----', this.partyItem)
this.totalCount = 0
data.forEach(item => {
this.totalCount += Number(item.value)
@@ -730,9 +774,11 @@ export default {
this.orgId = _arr[0]
this.orgLevel = orgType
this.unitType = ''
+ this.$refs.eduChart.clear()
this.getList(_arr[0])
await this.getCateType(_arr[0])
await this.loadOrgData()
+
this.agencyInfo = { ...this.orgData }
console.log('agencyInfo-----', this.agencyInfo)
this.getUnitList(_arr[0])
@@ -790,7 +836,8 @@ export default {
url,
params,
(data, rspMsg) => {
- this.agencyInfo = data
+ // this.agencyInfo = data
+ this.agencyInfo = { ...data, agencyLevel: data.level}
if (!data.latitude) {
this.agencyInfo.latitude = 36.072227
}
@@ -799,6 +846,7 @@ export default {
}
if (!data.level) {
this.agencyInfo.level = 'street'
+ this.agencyInfo.agencyLevel = 'street'
}
},
@@ -869,18 +917,18 @@ export default {
item.urlIndex = 7
}
});
- const url = require('../../../../assets/img/shuju/measure/other.png')
- // this.iconUrlArray = [
- // require('../../../../assets/img/shuju/measure/lxdj.png'),//楼宇党建
- // require('../../../../assets/img/shuju/measure/lxzz.png'),//两新组织
- // require('../../../../assets/img/shuju/measure/qydw.png'),//区域单位党建
- // require('../../../../assets/img/shuju/measure/jgzs.png'),//机关直属部门
- // require('../../../../assets/img/shuju/measure/qita.png'),//社会团体
- // require('../../../../assets/img/shuju/measure/minban.png'),//民办
- // require('../../../../assets/img/shuju/measure/jijin.png'),//基金
- // require('../../../../assets/img/shuju/measure/other.png')//其他
- // ]
- this.iconUrlArray = [url, url, url, url, url, url, url, url]
+ // const url = require('../../../../assets/img/shuju/measure/other.png')
+ this.iconUrlArray = [
+ require('../../../../assets/img/shuju/measure/lxdj.png'),//楼宇党建
+ require('../../../../assets/img/shuju/measure/lxzz.png'),//两新组织
+ require('../../../../assets/img/shuju/measure/qydw.png'),//区域单位党建
+ require('../../../../assets/img/shuju/measure/jgzs.png'),//机关直属部门
+ require('../../../../assets/img/shuju/measure/qita.png'),//社会团体
+ require('../../../../assets/img/shuju/measure/minban.png'),//民办
+ require('../../../../assets/img/shuju/measure/jijin.png'),//基金
+ require('../../../../assets/img/shuju/measure/other.png')//其他
+ ]
+ // this.iconUrlArray = [url, url, url, url, url, url, url, url]
//第一次加载完置为false
diff --git a/src/views/modules/visual/communityParty/gridParty.vue b/src/views/modules/visual/communityParty/gridParty.vue
index bd73c11c..65d0919c 100644
--- a/src/views/modules/visual/communityParty/gridParty.vue
+++ b/src/views/modules/visual/communityParty/gridParty.vue
@@ -5,14 +5,14 @@
网格党建平面图
-
-
+ -->
@@ -148,7 +148,7 @@ export default {
},
async mounted() {
await nextTick(100);
- await this.getAgencyList()
+ // await this.getAgencyList()
this.agencyId = this.$store.state.user.agencyId
this.getEduCount(this.$store.state.user.agencyId) // 饼状统计图
this.getEduList() // 左下角列表数据
@@ -164,9 +164,9 @@ export default {
require('../../../../assets/img/shuju/measure/other.png')
]
await this.loadOrgData()
- await this.getWorkUserInfo()
// this.loadMap()
this.getMapData()
+ await this.getWorkUserInfo()
// this.isfirstInit = false
// 地图相关end
},
@@ -310,7 +310,10 @@ export default {
this.pieEduOptions.legend = { ...legend }
this.clickEduPie(0)
let fun = params => {
- this.clickEduPie(params.dataIndex)
+ if (params.seriesIndex == 0 || params.seriesIndex == 2) {
+ this.$refs.eduChart.clear()
+ this.clickEduPie('-1')
+ } else this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
},
@@ -362,8 +365,8 @@ export default {
// this.$refs.pieChart.hideLoading()
this.$refs.eduChart.setOption(this.pieEduOptions)
if (this.noEduInit) {
- const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
- const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
+ // const _arr = this.selectAgency[this.selectAgency.length - 1].split('-')
+ // const orgType = _arr[1] !== 'grid' ? 'agency': 'grid'
this.pageNo = 1
this.pageSize = 10;
this.eduList = []
@@ -462,7 +465,7 @@ export default {
return {
...item,
color: "#00E5ED",
- fillColor: "rgba(0, 229, 237, 0.16)"
+ fillColor: "rgba(0, 229, 237, 0)"
}
})
@@ -480,16 +483,26 @@ export default {
params,
(data, rspMsg) => {
this.agencyInfo = data
- if (!data.latitude) {
+ if (this.orgData.longitude) { // 中心点不从当前登录用户里面取,从mapOrg接口里面取
+ this.agencyInfo.longitude = this.orgData.longitude
+ }
+ if (this.orgData.latitude) { // 中心点不从当前登录用户里面取,从mapOrg接口里面取
+ this.agencyInfo.latitude = this.orgData.latitude
+ }
+ if (this.orgData.level) { // 中心点不从当前登录用户里面取,从mapOrg接口里面取
+ this.agencyInfo.agencyLevel = this.orgData.agencyLevel
+ }
+ 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.agencyInfo.agencyLevel = this.agencyInfo.level
+ // console.log(JSON.stringify(this.agencyInfo))
},
(rspMsg, data) => {
this.$message.error(rspMsg)
diff --git a/src/views/modules/visual/communityParty/memberInfo.vue b/src/views/modules/visual/communityParty/memberInfo.vue
index 1b07df9c..dedf9f32 100644
--- a/src/views/modules/visual/communityParty/memberInfo.vue
+++ b/src/views/modules/visual/communityParty/memberInfo.vue
@@ -13,7 +13,7 @@
+ :class="current == index ? 'active-item' : ''" @click="handleTabs(item, index)">
{{ item.content }}
{{ item.reportTime }}
@@ -219,7 +219,7 @@ export default {
}
.list-wr {
display: flex;
- padding: 0 32px;
+ // padding: 0 32px;
}
.list-left {
@@ -230,9 +230,13 @@ export default {
flex-shrink: 0;
border-right: 1px dashed #1257c9;
overflow: auto;
+ .active-item {
+ border: 1px solid #0063FE !important;
+ box-shadow: 0px 0px 10px #0063fe inset;
+ }
.left-item {
- padding: 10px 0;
- border-right: 1px dashed #1257c9;
+ padding: 10px 0px 10px 10px;
+ // border-right: 1px dashed #1257c9;
cursor: pointer;
.item-title {
font-size: 16px;
diff --git a/src/views/modules/visual/communityParty/options.js b/src/views/modules/visual/communityParty/options.js
index ba0ddd33..a969472c 100644
--- a/src/views/modules/visual/communityParty/options.js
+++ b/src/views/modules/visual/communityParty/options.js
@@ -1,11 +1,11 @@
export function pieOption (_charts) {
- const center= ['50%', '50%']
+ const center= ['60%', '50%']
return {
title: {
text: '0',
top: 125,
- left: 196,
+ left: 235,
textAlign: 'center',
textStyle: {
width: '100%',
@@ -87,8 +87,8 @@ export function pieOption (_charts) {
alignTo: 'edge',
// formatter: '{a|{c}}\n\n{name|{b}}',
formatter: '{a|{c}}\n{r|}\n{name|{b}}',
- minMargin: 5,
- edgeDistance: 1,
+ // minMargin: 5,
+ edgeDistance: 20,
lineHeight: 15,
color: '#fff',
fontSize: 12,
@@ -114,13 +114,13 @@ export function pieOption (_charts) {
labelLine: {
show: false,
smooth: 0.2,
- length: 30,
- length2: 0,
+ length: 20,
+ length2: 10,
maxSurfaceAngle: 80
},
labelLayout: function (params) {
- const isLeft = params.labelRect.x < _charts.getWidth() / 2;
+ const isLeft = params.labelRect.x < _charts.getWidth() / 3;
const points = params.labelLinePoints;
// Update the end point.
if (points) {
diff --git a/src/views/modules/visual/communityParty/party.vue b/src/views/modules/visual/communityParty/party.vue
index b5b0e541..016d7e59 100644
--- a/src/views/modules/visual/communityParty/party.vue
+++ b/src/views/modules/visual/communityParty/party.vue
@@ -311,7 +311,21 @@ export default {
this.pieAgeOptions = pieOption(this.pieAgeChartS)
this.clickAgePie(0)
let fun = params => {
- this.clickAgePie(params.dataIndex)
+ // if (params.seriesIndex == 0 || params.seriesIndex == 2) {
+ // this.ageCode = ''
+ // this.getAgeList()
+ // return
+ // }
+ if (params.seriesIndex == 0 || params.seriesIndex == 2) {
+ this.ageCode = ''
+ // this.getUnitList(this.agencyId)
+ this.getAgeList()
+ this.$refs.ageChart.clear()
+ this.noInit = false
+ this.clickAgePie(0)
+ // return
+ } else this.clickAgePie(params.dataIndex)
+ // this.clickAgePie(params.dataIndex)
}
this.$refs.ageChart.handleClick(fun)
// option && this.$refs.pieChart.setOption(option);
@@ -359,138 +373,27 @@ export default {
// this.pieEduOptions.series[1].width = 400
this.clickEduPie(0)
let fun = params => {
+ // if (params.seriesIndex == 0 || params.seriesIndex == 2) {
+ // this.eduCode = ''
+ // this.getEduList()
+ // return
+ // }
this.clickEduPie(params.dataIndex)
+ if (params.seriesIndex == 0 || params.seriesIndex == 2) {
+ this.eduCode = ''
+ this.getEduList()
+ this.$refs.eduChart.clear()
+ this.noEduInit = false
+ this.clickEduPie(0)
+ // return
+ } else this.clickEduPie(params.dataIndex)
}
this.$refs.eduChart.handleClick(fun)
// this.noInit = true
// option && this.$refs.pieChart.setOption(option);
},
- initChartType() {
- const eId = document.getElementById('echartType')
- let _charts = echarts.init(eId)
-
- let option = {
- tooltip: {
- trigger: 'item'
- },
- legend: {
- show: true,
- orient: 'vertical',
- top: '20%',
- right: 0,
- textStyle: {
- width: 90,
- color: '#fff',
- rich: {
- a: {
- width: 90
- }
- }
- },
- formatter: name => {
- for (let a = 0; a < this.eduItem.length; a++) {
- // this.data 这个数据中有名称和次数
- if (this.eduItem[a].name === name) {
- //两个名称进行对比,取出对应的次数
- let params1 = name + "\n"; //然后return你需要的legend格式即可
- console.log(params1);
- let tmp = params1.split("\n");
- let res = "" + params1;
- for (let i in tmp) {
- res = res.replace(tmp[i], "");
- }
- return res + params1;
- }
- }
- }
- },
- title: {
- text: '12000', //图形标题,配置在中间对应效果图的80%
- subtext: '总数',
- left: 196,
- top: "center",
- textAlign: 'center',
- textStyle: {
- color: "#fff",
- fontSize: 28,
- align: "center"
- },
- subtextStyle: {
- fontSize: 16,
- color: '#fff',
- align: 'center'
- }
- },
- series: [
- {
- // name: 'Access From',
- type: 'pie',
- // center: ['50%', '50%'],
- radius: ['40%', '60%'],
- avoidLabelOverlap: true,
- // top: top + '%',
- // height: '80%',
- // left: 0,
- width: 400,
- label: {
- position: 'outside',
- alignTo: 'edge',
- formatter: '{a|{c}}\n{r|}\n{name|{b}}',
- minMargin: 5,
- edgeDistance: 20,
- lineHeight: 15,
- color: '#fff',
- fontSize: 15,
- rich: {
- name: {
- padding: [0, 6, 0, 6]
- },
- a: {
- fontSize: 15,
- color: '#fff',
- padding: [0, 6, 0, 6]
- },
- r: {
- backgroundColor: 'auto',
- borderRadius: 6,
- width: 6,
- height: 6,
- // padding: [3, 3, 0, -12]
- }
- }
- },
- emphasis: {
- label: {
- show: true,
- fontSize: '14',
- fontWeight: 'bold'
- }
- },
- labelLine: {
- show: true,
- length: 20,
- length2: 0,
- maxSurfaceAngle: 80
- },
- labelLayout: function (params) {
- const isLeft = params.labelRect.x < _charts.getWidth() / 2;
- const points = params.labelLinePoints;
- // Update the end point.
- points[2][0] = isLeft
- ? params.labelRect.x
- : params.labelRect.x + params.labelRect.width;
- return {
- labelLinePoints: points
- };
- },
- data: this.eduItem
- }
- ]
- }
- option && _charts.setOption(option);
-
- },
+
clickAgePie (seriesIndex) {
let _code = ''
let isClick = false
@@ -743,7 +646,8 @@ export default {
async getPartyOggList(node, resolve) {
// const url = "/gov/org/customeragency/staffinagencylist";
// const url = '/gov/org/customeragency/agencygridtree'
- const url = '/resi/partymember/icPartyOrg/getTreelist'
+ // const url = '/resi/partymember/icPartyOrg/getTreelist'
+ const url ='/resi/partymember/icPartyOrg/getSearchTreelist'
let params = {
agencyId: this.$store.state.user.agencyId,
};
@@ -830,6 +734,8 @@ export default {
this.orgType = orgType
this.noInit = false
this.noEduInit = false
+ this.$refs.ageChart.clear()
+ this.$refs.eduChart.clear()
this.getAgeCount(_arr[0], orgType)
this.getEduCount(_arr[0], orgType)
this.getAgeList(_arr[0], orgType)
@@ -839,6 +745,8 @@ export default {
console.log('val-vvvpppppp', val)
this.noInit = false
this.noEduInit = false
+ this.$refs.ageChart.clear()
+ this.$refs.eduChart.clear()
if (val.length > 0) {
const i = val.length - 1
this.agencyId = val[i]
diff --git a/src/views/modules/visual/components/screen-map/index.vue b/src/views/modules/visual/components/screen-map/index.vue
index c5bc2561..58206f45 100644
--- a/src/views/modules/visual/components/screen-map/index.vue
+++ b/src/views/modules/visual/components/screen-map/index.vue
@@ -362,7 +362,7 @@ const vueGis = {
loadPolIcon (feature) {
polIconSource.clear()
let polyIconFeatures = [];
- console.log('feature-----', feature)
+ // console.log('feature-----', feature)
feature.forEach(oneIcon => {
var extent = boundingExtent(oneIcon.getGeometry().getCoordinates()[0]); //获取一个坐标数组的边界,格式为[minx,miny,maxx,maxy]
@@ -379,7 +379,7 @@ const vueGis = {
id: oneIcon.id_
}
});
- // console.log('oneIcon----', oneIcon)
+ // console.log('oneIcon----ddd', oneIcon)
let polyIconStyle = new Style({
image: new Icon({
// anchor: [0.5, 0.5],
@@ -415,12 +415,14 @@ const vueGis = {
info: { ...oneIcon }
}
});
+ // console.log('oneIcon----', this.iconUrlArray[oneIcon.urlIndex])
let iconStyle = new Style({
image: new Icon({
// anchor: [0.5, 0.5],
// imgSize: [32, 32],
// scale: 0.5,
- src: oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex] || this.iconUrlArray[0]
+ // src: oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex] || this.iconUrlArray[0] || this.iconUrlArray[0]
+ src: (oneIcon.urlIndex && this.iconUrlArray[oneIcon.urlIndex]) || (oneIcon.index &&this.iconUrlArray[oneIcon.index]) || this.iconUrlArray[0]
}),
// text: createTextStyle(oneIcon)
});
@@ -620,11 +622,11 @@ const vueGis = {
//根据组织层级设置缩放级别
setZoom (level) {
if (level === 'district') {
- this.zoom = 11
- } else if (level === 'street') {
this.zoom = 12
- } else if (level === 'community') {
+ } else if (level === 'street') {
this.zoom = 13
+ } else if (level === 'community') {
+ this.zoom = 14
}
},