Browse Source

Merge branch 'dev-fivelayer0725'

feature/dev_worklog2
dai 3 years ago
parent
commit
5fd1e18fc9
  1. 13
      src/views/modules/base/organization/organization.vue
  2. 5
      src/views/modules/visual/command/index.vue
  3. 62
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  4. 108
      src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue
  5. 32
      src/views/modules/visual/communityParty/gridParty.vue
  6. 155
      src/views/modules/visual/cpts/map/index2.vue

13
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 = []

5
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();
}
},
},

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

@ -57,9 +57,15 @@
</div>
<div class="g-r">
<div class="r-map">
<screen-map class="map"
<!-- <screen-map class="map"
ref="map"
:showPolygonLayer="true"></screen-map>
:showPolygonLayer="true"></screen-map> -->
<new-map
ref="fenbumap"
:pitch="0"
:is-area="true"
:srcGridData="mapList"
/>
<div class="r-legend">
<div class="legend_item"
@ -89,6 +95,7 @@ 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";
import newMap from '../cpts/map/index2.vue'
export default {
name: "HomeMap",
@ -274,7 +281,7 @@ export default {
this.getLine()
}
this.loadMap()
// this.loadMap()
this.isfirstInit = false
},
@ -286,17 +293,17 @@ export default {
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'
}
// 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
},

108
src/views/modules/visual/communityGovern/duoyuanfuwu/duoyuanfuwufenxi.vue

@ -57,7 +57,7 @@
</div> -->
<div class="card-map">
<screen-map class="map"
<!-- <screen-map class="map"
ref="map"
@clickFeature="clickMap"
:showIconLayer="true"
@ -65,7 +65,16 @@
:showPolIconLayer="true"
:clickType="'popup'"
:areaScale="0.1"
:isAddOpenlay="true"></screen-map>
:isAddOpenlay="true"></screen-map> -->
<new-map
ref="duoMap"
:pitch="0"
:srcGridData="agencyInfo"
:dotList2="distributionsList"
:dotIcoList2="dotIconList"
:icon-size="20"
@clickDot="clickMap"
/>
</div>
<div class="map-tips">
@ -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 = `
<div style='font-size:16px; color:#FFFFFF;'>详细信息</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>组织名称
<span>`+ data.organizationName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织类型
<span>`+ data.categoryName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织人数
<span>`+ data.organizationPersonCount + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织成员
<span>`+ organizationPersonnel + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>服务事项
<span>`+ data.serviceItem + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>负责人
<span>`+ data.principalName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系电话
<span>`+ data.principalPhone + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>创建时间
<span>`+ data.organizationCreatedTime + `</span>
<div style='width: 100%;text-align:left;word-break: break-all; white-space: normal;'>
<div style='font-size:16px; color:#FFFFFF;'>详细信息</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:10px'>组织名称
<span>`+ data.organizationName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织类型
<span>`+ data.categoryName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>组织人数
<span>`+ data.organizationPersonCount + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px;word-break: break-all;'>组织成员
<span>`+ organizationPersonnel + `</span>
</div>
<div style='width: 100%;font-size:12px; color:#FFFFFF;margin-top:5px;word-break: break-all;'>服务事项
<span style='word-break: break-all;'>`+ data.serviceItem + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>负责人
<span>`+ data.principalName + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>联系电话
<span>`+ data.principalPhone + `</span>
</div>
<div style='font-size:12px; color:#FFFFFF;margin-top:5px'>创建时间
<span>`+ data.organizationCreatedTime + `</span>
</div>
</div>
`
// 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 {
}
}
}
</style>

32
src/views/modules/visual/communityParty/gridParty.vue

@ -50,7 +50,7 @@
</div>
</div>
<div class="card-right">
<screen-map class="map"
<!-- <screen-map class="map"
ref="map"
@clickFeature="clickProject"
@lookMore="lookMore"
@ -59,7 +59,15 @@
:clickType="'popup'"
:showIconLayer="true"
:showPolIconLayer="true"
:areaScale="0.1"></screen-map>
:areaScale="0.1"></screen-map> -->
<new-map
ref="gridmap"
:pitch="0"
:srcGridData="agencyInfo"
:dotList2="unitMapList"
:icon-size="16"
@clickDot="clickProject"
/>
</div>
</div>
</cpt-card>
@ -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 {
</div>
`
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

155
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);
}
}
},

Loading…
Cancel
Save