From 9262c47f80997de7d3a08f7ce1c09ce2487d17a1 Mon Sep 17 00:00:00 2001
From: 13176889840 <13176889840@163.com>
Date: Fri, 5 Aug 2022 17:10:49 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E5=9C=B0=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../communityGovern/distributionAnalyze.vue | 62 ++++---
.../duoyuanfuwu/duoyuanfuwufenxi.vue | 108 ++++++++----
.../visual/communityParty/gridParty.vue | 32 ++--
src/views/modules/visual/cpts/map/index2.vue | 155 ++++++++++--------
4 files changed, 218 insertions(+), 139 deletions(-)
diff --git a/src/views/modules/visual/communityGovern/distributionAnalyze.vue b/src/views/modules/visual/communityGovern/distributionAnalyze.vue
index f4b1669fb..4b32481ed 100644
--- a/src/views/modules/visual/communityGovern/distributionAnalyze.vue
+++ b/src/views/modules/visual/communityGovern/distributionAnalyze.vue
@@ -57,9 +57,15 @@
-
+ :showPolygonLayer="true"> -->
+
{
- 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'
- }
+ // 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'
+ // }
//组织级联数据
++this.iscascaderShow
@@ -335,16 +342,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
@@ -415,6 +422,7 @@ export default {
item.longitude = agencyItem.longitude
item.latitude = agencyItem.latitude
item.coordinates = agencyItem.coordinates
+ item.name = agencyItem.name
if (this.under === 0 || this.under) {
if (item.count < this.under || item.count === this.under) {
@@ -434,6 +442,11 @@ export default {
}
break
+ } else {
+ item.longitude = ''
+ item.latitude = ''
+ item.coordinates = ''
+ item.name = ''
}
}
@@ -614,6 +627,7 @@ export default {
cptTb,
screenEchartsFrame,
screenMap,
+ newMap,
ScreenLoading
},
diff --git a/src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue b/src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue
index 293161946..813711594 100644
--- a/src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue
+++ b/src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue
@@ -57,7 +57,7 @@
-->
-
+ :isAddOpenlay="true"> -->
+
@@ -100,6 +109,7 @@ import ScreenNodata from "@/views/modules/visual/components/screen-nodata"
import screenMap from "@/views/modules/visual/components/screen-map"
import duoyuanDialog from './duoyuanDialog.vue'
+import newMap from '../../cpts/map/index2.vue'
import { pieOption } from './pieOption.js'
import nextTick from 'dai-js/tools/nextTick'
@@ -173,6 +183,17 @@ export default {
require('../../../../../assets/img/shuju/volunteer2.png'), // 代办员
require('../../../../../assets/img/shuju/volunteer6.png'), // 调解员
],
+ dotIconList: {
+ whdw: require('../../../../../assets/img/shuju/volunteer4.png'), // 文化队伍
+ lwh: require('../../../../../assets/img/shuju/volunteer5.png'), // 楼委会
+ lyjlb: require('../../../../../assets/img/shuju/volunteer7.png'), // 老友俱乐部
+ zaxld: require('../../../../../assets/img/shuju/volunteer8.png'), // 治安巡逻
+ yjdw: require('../../../../../assets/img/shuju/volunteer3.png'), // 应急队伍
+ other: require('../../../../../assets/img/shuju/volunteer9.png'), // 其他
+ // require('../../../../../assets/img/shuju/volunteer1.png'), // 采集员
+ // require('../../../../../assets/img/shuju/volunteer2.png'), // 代办员
+ // require('../../../../../assets/img/shuju/volunteer6.png'), // 调解员
+ },
polygonList: []
}
},
@@ -186,7 +207,7 @@ export default {
async mounted () {
this.dataLoading = true
- await this.getAgencylist() // 获取当前登录人员信息
+ // await this.getAgencylist() // 获取当前登录人员信息
await this.getData() // 获取饼图数据
await this.getTable() // 获取列表数据
this.dataLoading = false
@@ -367,9 +388,9 @@ export default {
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
- this.agencyInfo.agencyLevel = data.agencyLevel,
- this.agencyInfo.longitude = data.longitude,
- this.agencyInfo.latitude = data.latitude
+ this.agencyInfo = data
+ // this.agencyInfo.longitude = data.longitude,
+ // this.agencyInfo.latitude = data.latitude
let subPolygonList = []
data.children.forEach((item, index) => {
if (item.coordinates && item.coordinates.length > 0) {
@@ -443,6 +464,7 @@ export default {
this.distributionsList = []
data.list.forEach((item, index) => {
item.urlIndex = this.getLegendIconIndex(item.color)
+ item.categoryKey = item.categoryCode
// if (index === 0) {
// item.latitude = "36.07394505338441"
// item.longitude = "120.3868167667315"
@@ -452,7 +474,7 @@ export default {
// this.distributionsList = data.list
await this.loadOrgData()
// 第一次加载完置为false
- this.loadMap()
+ // this.loadMap()
this.isfirstInit = false
} else {
this.$message.error(msg)
@@ -480,11 +502,12 @@ export default {
// await this.loadOrgData(feature.values_.level, feature.values_.id)
// this.loadMap()
// }
- console.log('标注信息', feature.values_.properties)
- if (!feature.values_.properties) {
+ console.log('标注信息', feature)
+ if (!feature) {
return
}
- const data = feature.values_.properties.info
+ // const data = feature.values_.properties.info
+ const data = feature
data.organizationName = data.organizationName ? data.organizationName : '--'
data.categoryName = data.categoryName ? data.categoryName : '--'
data.organizationPersonCount = data.organizationPersonCount ? data.organizationPersonCount : '--'
@@ -503,34 +526,37 @@ export default {
}
const coordinate = [data.longitude, data.latitude]
const showData = `
-
详细信息
-
组织名称:
- `+ data.organizationName + `
-
-
组织类型:
- `+ data.categoryName + `
-
-
组织人数:
- `+ data.organizationPersonCount + `
-
-
组织成员:
- `+ organizationPersonnel + `
-
-
服务事项:
- `+ data.serviceItem + `
-
-
负责人:
- `+ data.principalName + `
-
-
联系电话:
- `+ data.principalPhone + `
-
-
创建时间:
-
`+ data.organizationCreatedTime + `
+
+
详细信息
+
组织名称:
+ `+ data.organizationName + `
+
+
组织类型:
+ `+ data.categoryName + `
+
+
组织人数:
+ `+ data.organizationPersonCount + `
+
+
组织成员:
+ `+ organizationPersonnel + `
+
+
服务事项:
+ `+ data.serviceItem + `
+
+
负责人:
+ `+ data.principalName + `
+
+
联系电话:
+ `+ data.principalPhone + `
+
+
创建时间:
+ `+ data.organizationCreatedTime + `
+
`
// console.log(showData)
- this.$refs.map.handleShowPopup(showData, coordinate)
+ // this.$refs.map.handleShowPopup(showData, coordinate)
+ this.$refs.duoMap.showPopup(showData, coordinate)
},
//点击项目 - 接口获取
// async clickMap (feature) {
@@ -657,6 +683,7 @@ export default {
ScreenNodata,
screenMap,
+ newMap,
duoyuanDialog
},
@@ -720,6 +747,16 @@ export default {
font-weight: 800;
}
}
+.card-map {
+ ::v-deep .l7-popup-content {
+ background: #1257c9;
+ }
+ ::v-deep .l7-popup-close-button {
+ right: 10px;
+ color: #fff;
+ }
+}
+
.card-left-title {
position: relative;
padding-left: 40px;
@@ -790,6 +827,7 @@ export default {
}
}
}
+
diff --git a/src/views/modules/visual/communityParty/gridParty.vue b/src/views/modules/visual/communityParty/gridParty.vue
index c70b00eae..ca77115b2 100644
--- a/src/views/modules/visual/communityParty/gridParty.vue
+++ b/src/views/modules/visual/communityParty/gridParty.vue
@@ -50,7 +50,7 @@
-
+ :areaScale="0.1"> -->
+
@@ -86,7 +94,7 @@ import * as echarts from 'echarts';
import screenMap from "@/views/modules/visual/components/screen-map";
import memberInfo from './memberInfo.vue'
import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more";
-
+import newMap from '../cpts/map/index2.vue'
export default {
name: "gridParty",
components: {
@@ -95,6 +103,7 @@ export default {
screenEchartsFrame,
screenMap,
memberInfo,
+ newMap,
peopleMore
},
data() {
@@ -530,24 +539,24 @@ export default {
const { data, code, internalMsg } = await requestPost(url, params)
if (code === 0) {
this.unitMapList = data
- this.loadMap()
+ // this.loadMap()
this.isfirstInit = false
- this.$refs.map.handleClosePopup()
+ // this.$refs.map.handleClosePopup()
} else {
this.$message.error(internalMsg)
this.unitMapList = []
- this.loadMap()
+ // this.loadMap()
this.isfirstInit = false
- this.$refs.map.handleClosePopup()
+ // this.$refs.map.handleClosePopup()
}
},
//点击项目
async clickProject (feature) {
this.userId = ''
- const featureInfo = feature.values_.properties.info
- this.userId = feature.values_.properties.info.id
+ const featureInfo = feature
+ this.userId = feature.id
let coordinate = [featureInfo.longitude, featureInfo.latitude]
- let {name, gridName, houseName, mobile, idCard, gzdw, rhzk, icResiUser} = feature.values_.properties.info
+ let {name, gridName, houseName, mobile, idCard, gzdw, rhzk, icResiUser} = feature
name = name ? name : '--'
gridName = gridName ? gridName : '--'
houseName = houseName ? houseName : '--'
@@ -580,7 +589,8 @@ export default {
`
const isShowMore = icResiUser ? true : false
- this.$refs.map.handleShowPopup(showData, coordinate, isShowMore)
+ // this.$refs.map.handleShowPopup(showData, coordinate, isShowMore)
+ this.$refs.gridmap.showPopup(showData, coordinate)
},
lookMore(e) {
this.userId = this.userId
diff --git a/src/views/modules/visual/cpts/map/index2.vue b/src/views/modules/visual/cpts/map/index2.vue
index c6a72ed9d..700312806 100644
--- a/src/views/modules/visual/cpts/map/index2.vue
+++ b/src/views/modules/visual/cpts/map/index2.vue
@@ -96,9 +96,12 @@ export default {
type: Number,
default: 60,
},
-
+ isArea: {
+ type: Boolean,
+ default: false
+ },
srcGridData: {
- type: Object,
+ type: Object | Array,
default: null,
},
@@ -147,17 +150,27 @@ export default {
computed: {
polygonData() {
- const { srcGridData } = this;
- if (
- !srcGridData ||
- !srcGridData.children ||
- !Array.isArray(srcGridData.children)
- ) {
- return { type: "FeatureCollection", features: [] };
+ const { srcGridData, isArea } = this;
+ if (isArea) {
+ if (
+ !srcGridData || !Array.isArray(srcGridData)
+ ) {
+ return { type: "FeatureCollection", features: [] };
+ }
+ } else {
+ if (
+ !srcGridData ||
+ !srcGridData.children ||
+ !Array.isArray(srcGridData.children)
+ ) {
+ return { type: "FeatureCollection", features: [] };
+ }
}
+ const _Plo = isArea ? srcGridData : srcGridData.children
+ console.log('_Plo-----', _Plo)
const polygon = [
- ...srcGridData.children
- .filter((item) => item.coordinates.length > 0)
+ ..._Plo
+ .filter((item) => item.coordinates && item.coordinates.length > 0)
.map((item) => ({
type: "Feature",
properties: {
@@ -382,62 +395,64 @@ export default {
});
scene.addLayer(lineLayer);
- circleLayer = new PolygonLayer({
- zIndex: 3,
- })
- .source(polygonDotData)
- .color("name", styleConfig.circleColor)
- .shape("circle")
- .active(true)
- .animate(true)
- .size(50)
- .style({
- offsets: [0, -10], // 文本相对锚点的偏移量 [水平, 垂直]
- opacity: 1,
- });
- scene.addLayer(circleLayer);
-
- scene.addImage("pos-red", require("@/assets/img/shuju/grid/pos-red.png"));
- scene.addImage(
- "pos-green",
- require("@/assets/img/shuju/grid/pos-green.png")
- );
- scene.addImage(
- "pos-yellow",
- require("@/assets/img/shuju/grid/pos-yellow.png")
- );
- posLayer = new PolygonLayer({
- zIndex: 4,
- })
- .source(polygonDotData)
- .shape("name", ["pos-red", "pos-green", "pos-yellow"])
- .size(12)
- .style({
- offsets: [0, 8], // 文本相对锚点的偏移量 [水平, 垂直]
- // rotation: 60,
- layerType: "fillImage",
- });
- scene.addLayer(posLayer);
-
- textLayer = new PolygonLayer({
- zIndex: 20,
- })
- .source(polygonDotData)
- .color("name", styleConfig.textColor)
- .shape("name", "text")
- .size(16)
- .style({
- textAnchor: "center", // 文本相对锚点的位置 center|left|right|top|bottom|top-left
- textOffset: [0, 40], // 文本相对锚点的偏移量 [水平, 垂直]
- spacing: 2, // 字符间距
- padding: [2, 2], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
- stroke: styleConfig.textStrokeColor, // 描边颜色
- strokeWidth: 0.1, // 描边宽度
- strokeOpacity: 0.8,
- textAllowOverlap: true,
+ if (!this.isArea) {
+ circleLayer = new PolygonLayer({
+ zIndex: 3,
+ })
+ .source(polygonDotData)
+ .color("name", styleConfig.circleColor)
+ .shape("circle")
+ .active(true)
+ .animate(true)
+ .size(50)
+ .style({
+ offsets: [0, -10], // 文本相对锚点的偏移量 [水平, 垂直]
+ opacity: 1,
+ });
+ scene.addLayer(circleLayer);
+
+ scene.addImage("pos-red", require("@/assets/img/shuju/grid/pos-red.png"));
+ scene.addImage(
+ "pos-green",
+ require("@/assets/img/shuju/grid/pos-green.png")
+ );
+ scene.addImage(
+ "pos-yellow",
+ require("@/assets/img/shuju/grid/pos-yellow.png")
+ );
+ posLayer = new PolygonLayer({
+ zIndex: 4,
})
- .active(true);
- scene.addLayer(textLayer);
+ .source(polygonDotData)
+ .shape("name", ["pos-red", "pos-green", "pos-yellow"])
+ .size(12)
+ .style({
+ offsets: [0, 8], // 文本相对锚点的偏移量 [水平, 垂直]
+ // rotation: 60,
+ layerType: "fillImage",
+ });
+ scene.addLayer(posLayer);
+
+ textLayer = new PolygonLayer({
+ zIndex: 20,
+ })
+ .source(polygonDotData)
+ .color("name", styleConfig.textColor)
+ .shape("name", "text")
+ .size(16)
+ .style({
+ textAnchor: "center", // 文本相对锚点的位置 center|left|right|top|bottom|top-left
+ textOffset: [0, 40], // 文本相对锚点的偏移量 [水平, 垂直]
+ spacing: 2, // 字符间距
+ padding: [2, 2], // 文本包围盒 padding [水平,垂直],影响碰撞检测结果,避免相邻文本靠的太近
+ stroke: styleConfig.textStrokeColor, // 描边颜色
+ strokeWidth: 0.1, // 描边宽度
+ strokeOpacity: 0.8,
+ textAllowOverlap: true,
+ })
+ .active(true);
+ scene.addLayer(textLayer);
+ }
polygonLayer.on("mousemove", (e) => {
polygonLayer.style({
@@ -580,9 +595,11 @@ export default {
if (polygonLayer) {
polygonLayer.setData(polygonData);
lineLayer.setData(polygonData);
- textLayer.setData(polygonData);
- posLayer.setData(polygonData);
- circleLayer.setData(polygonData);
+ if (!this.isArea) {
+ textLayer.setData(polygonData);
+ posLayer.setData(polygonData);
+ circleLayer.setData(polygonData);
+ }
}
},
From 38c75bc6ea0e938d0ea0d1ae7d204b35cd04ac5a Mon Sep 17 00:00:00 2001
From: dai <851733175@qq.com>
Date: Fri, 5 Aug 2022 18:07:55 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/base/organization/organization.vue | 13 +++++++++++--
src/views/modules/visual/command/index.vue | 5 ++++-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue
index 88be90743..3782d13af 100644
--- a/src/views/modules/base/organization/organization.vue
+++ b/src/views/modules/base/organization/organization.vue
@@ -1376,7 +1376,7 @@ export default {
// 添加人员
async submitPeo () {
const url = "/gov/org/staff/addstaffv2"
-
+ const {peoForm:{orgType}} = this;
let params = {
orgType: this.peoForm.orgType,
name: this.peoForm.name,
@@ -1385,7 +1385,7 @@ export default {
workType: this.peoForm.post,
roles: this.peoForm.duty,
newRoles: this.peoForm.newRoles,
- orgId: this.currentAgencyId,
+ orgId: orgType=='agency' ? this.currentAgencyId : (orgType=='dept' ? this.currentDepartmentId : this.currentGridOrgId),
}
@@ -1401,6 +1401,13 @@ export default {
this.getGridList()
this.getAgencyStaffListData()
this.insertFormRest()
+ if(orgType=='dept'){
+ this.getDepartmentStaffListData()
+ } else if(orgType=='grid'){
+ this.getGridStaffListData()
+ } else {
+ this.getAgencyStaffListData()
+ }
} else {
this.$message.error(msg)
}
@@ -1648,6 +1655,7 @@ export default {
},
// 进入网格,查询网格所属人员
entryGrid (gridId) {
+ console.log(gridId)
this.gridStaffTableListData = []
this.departmentStaffTableListData = []
this.agencyStaffTableListData = []
@@ -1663,6 +1671,7 @@ export default {
},
// 进入部门,查询部门所属人员
entryDepartment (row) {
+ console.log(row)
this.gridStaffTableListData = []
this.departmentStaffTableListData = []
this.agencyStaffTableListData = []
diff --git a/src/views/modules/visual/command/index.vue b/src/views/modules/visual/command/index.vue
index 1b2fa81c7..577754cff 100644
--- a/src/views/modules/visual/command/index.vue
+++ b/src/views/modules/visual/command/index.vue
@@ -442,9 +442,12 @@ export default {
categoryKeys2() {
this.requestMapDot2();
},
- searchName() {
+ searchName(val) {
this.showedSearchResult = false;
this.searchResult = iniSearchResult();
+ if (val == "") {
+ this.$refs.map.removeDotMarker();
+ }
},
},