|
|
|
@ -16,10 +16,6 @@ |
|
|
|
<title-box text="需求清单"/> |
|
|
|
<RequirementList :currentLevelData="currentLevelData"/> |
|
|
|
</div> |
|
|
|
<!-- <div class="m-box"> |
|
|
|
<title-box :text="`${currentLevel === 'district' ? '区' : currentLevel === 'street' ? '街道' : currentLevel === 'community' ? '社区' : currentLevel === 'grid' ? '网格' : ''}图谱画像`" /> |
|
|
|
<jdtphx :currentLevelData="currentLevelData" :id="orgId" /> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
<div class="g-center"> |
|
|
|
<div :class="listShow ? 'm-map' : 'g-center-open'" style="overflow: hidden"> |
|
|
|
@ -28,9 +24,15 @@ |
|
|
|
<div v-if="breadList.length > 1" class="go-back" @click="goBackMap"> |
|
|
|
<img src="~@/assets/images/shuju/overview/go-back.png"/> |
|
|
|
</div> |
|
|
|
<grid-map ref="map" :level="currentLevel" :peopleType="peopleType" :srcGridData="orgData" |
|
|
|
@clickAgency="clickAgencyItem" @clickDotBtn="handleClickDotBtn" |
|
|
|
@showMapDialog="showMapDialog" |
|
|
|
<grid-map |
|
|
|
ref="map" |
|
|
|
:level="currentLevel" |
|
|
|
:peopleType="peopleType" |
|
|
|
:srcGridData="orgData" |
|
|
|
@clickAgency="clickAgencyItem" |
|
|
|
@clickDotBtn="handleClickDotBtn" |
|
|
|
@resourcesPointClick="resourcesPointClick" |
|
|
|
@showMapDialog="showMapDialog" |
|
|
|
/> |
|
|
|
<div class="map-legend"> |
|
|
|
<div class="legend-title"> |
|
|
|
@ -52,17 +54,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <div class="m-box m-rybox"> |
|
|
|
<title-box :text="`${customerName}${peopleList[peopleType]}`"> |
|
|
|
<div class="up-style" style="width: 51%"> |
|
|
|
<div> |
|
|
|
<img v-if="listShow" @click="upDownShow" src="~@/assets/images/overview/down-icon.png" /> |
|
|
|
<img v-else @click="upDownShow" src="~@/assets/images/overview/up-icon.png" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</title-box> |
|
|
|
<jdwgy v-show="listShow" :peopleType="peopleType" :currentLevelData="currentLevelData" :level="currentLevel" @setNum="setNum" @setPoint="setPoint" /> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="g-right"> |
|
|
|
@ -72,62 +64,6 @@ |
|
|
|
<wtqd v-if="eventType === 1" :currentLevelData="currentLevelData" :date="sjhfDate"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- <div class="m-box"> |
|
|
|
<title-box text="人房数据统计" /> |
|
|
|
<rfsjtj :currentLevelData="currentLevelData" /> |
|
|
|
</div> --> |
|
|
|
<!-- 街道概览 --> |
|
|
|
<!-- <div v-if="currentLevel === 'street' || currentLevel === 'district'" class="m-box"> |
|
|
|
<title-box text="各社区人房数据更新排行"> |
|
|
|
<span class="date-span"> |
|
|
|
<el-date-picker popper-class="date-current-weiyi" :append-to-body="false" v-model="rfphDate" format="yyyy-MM" value-format="yyyy-MM" @change="changeDate" type="month" :clearable="false" placeholder="选择月"> </el-date-picker> |
|
|
|
</span> |
|
|
|
</title-box> |
|
|
|
<sqrfph :currentLevelData="currentLevelData" :date="rfphDate" /> |
|
|
|
</div> --> |
|
|
|
<!-- <div v-if="currentLevel === 'street' || currentLevel === 'district'" class="m-box"> |
|
|
|
<title-box text="各社区12345投诉事件统计"> |
|
|
|
<span class="date-span"> |
|
|
|
<el-date-picker popper-class="date-current-weiyi" :append-to-body="false" v-model="sq12345Date" format="yyyy-MM" value-format="yyyy-MM" type="month" :clearable="false" placeholder="选择月" /> |
|
|
|
</span> |
|
|
|
</title-box> |
|
|
|
<sq12345 :currentLevelData="currentLevelData" :date="sq12345Date" /> |
|
|
|
</div> --> |
|
|
|
<!-- 社区&网格--> |
|
|
|
<!-- <div v-if="currentLevel === 'community' || currentLevel === 'grid'" class="m-box"> |
|
|
|
<title-box text="人房数据动态更新" /> |
|
|
|
<Tabs v-model="dynamicType" :list="dynamicTypeList" v-if="currentLevel === 'community'" @changeVal="dynamicTypeChange" /> |
|
|
|
<DynamicHumanRoomData :currentLevelData="currentLevelData" :currentLevel="currentLevel" v-if="dynamicType === 1" /> |
|
|
|
<GridUpdateRanking :currentLevelData="currentLevelData" :currentLevel="currentLevel" v-if="dynamicType === 2" /> |
|
|
|
</div> --> |
|
|
|
<!-- 社区概览--> |
|
|
|
<!-- <div v-if="currentLevel === 'community'" class="m-box"> |
|
|
|
<title-box text="社区满意度自查结果"> |
|
|
|
<span class="date-span"> |
|
|
|
<el-date-picker popper-class="date-current-weiyi" :append-to-body="false" v-model="sqzcDate" format="yyyy-MM" value-format="yyyy-MM" type="month" :clearable="false" placeholder="选择月" /> |
|
|
|
</span> |
|
|
|
</title-box> |
|
|
|
<CommunityResult :currentLevelData="currentLevelData" :date="sqzcDate" /> |
|
|
|
</div> --> |
|
|
|
<!-- <div class="m-box"> |
|
|
|
<title-box text="事件&回访"> |
|
|
|
<span class="date-span"> |
|
|
|
<el-date-picker popper-class="date-current-weiyi" :append-to-body="false" v-model="sjhfDate" format="yyyy-MM" value-format="yyyy-MM" @change="changeDate" type="month" :clearable="false" placeholder="选择月" /> |
|
|
|
</span> |
|
|
|
</title-box> |
|
|
|
<Tabs v-model="eventType" :list="eventTypeList" @changeVal="eventTypeChange" /> |
|
|
|
<EventAndFollowUp :currentLevelData="currentLevelData" :date="sjhfDate" v-if="eventType === 1" /> |
|
|
|
<FollowUp :currentLevelData="currentLevelData" :date="sjhfDate" v-if="eventType === 2" /> |
|
|
|
</div> --> |
|
|
|
<!-- 网格 --> |
|
|
|
<!-- <div v-if="currentLevel === 'grid'" class="m-box"> |
|
|
|
<title-box text="社区网格数据更新排行"> |
|
|
|
<span class="date-span"> |
|
|
|
<el-date-picker popper-class="date-current-weiyi" :append-to-body="false" v-model="sqwggxDate" format="yyyy-MM" value-format="yyyy-MM" @change="changeDate" type="month" :clearable="false" placeholder="选择月" /> |
|
|
|
</span> |
|
|
|
</title-box> |
|
|
|
<RankingGridData :currentLevelData="currentLevelData" :date="sqwggxDate" /> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- |
|
|
|
@ -139,6 +75,7 @@ |
|
|
|
--> |
|
|
|
<MapDialog ref="MapDialog" :type="mapType"/> |
|
|
|
<cpt-loading v-show="false"/> |
|
|
|
<MapResourceInfo ref="MapResourceInfo" :currentLevelData="currentLevelData"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -169,6 +106,7 @@ import Tabs from "@/views/dataBoard/satisfactionEval/components/Tabs/index.vue"; |
|
|
|
import {requestPostBi} from "@/js/dai/request-bipass"; |
|
|
|
import {requestPost} from "@/js/dai/request"; |
|
|
|
import {spliceIntoChunks} from "@/utils/index"; |
|
|
|
import MapResourceInfo from "@/views/dataBoard/overview/components/MapResourceInfo.vue"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "renfang", |
|
|
|
@ -194,7 +132,8 @@ export default { |
|
|
|
Tabs, |
|
|
|
wtqd, |
|
|
|
RequirementList, |
|
|
|
MapDialog |
|
|
|
MapDialog, |
|
|
|
MapResourceInfo |
|
|
|
}, |
|
|
|
|
|
|
|
data() { |
|
|
|
@ -463,94 +402,111 @@ export default { |
|
|
|
}; |
|
|
|
console.log(this.currentLevelData, 'this.currentLevelData 33210') |
|
|
|
this.peopleType = this.currentLevel === "grid" ? "unit" : "staffAgency"; |
|
|
|
this.$refs.map.removeResourcesPoint(); |
|
|
|
// console.log(level,'level',orgId ,level === 'agency ' || level === 'community' || level === 'grid') |
|
|
|
if (level === 'agency' || level === 'community' || level === 'grid') { |
|
|
|
this.setResourcesPoint({agencyId: orgId}) |
|
|
|
} |
|
|
|
this.getMapCount() |
|
|
|
}); |
|
|
|
}, |
|
|
|
showMapDialog(data) { |
|
|
|
if (data.type === "resources") { |
|
|
|
this.setResourcesPoint() |
|
|
|
this.clickAgencyItem(data) |
|
|
|
} else { |
|
|
|
// -- njjwtqk = 难解决问题情况 |
|
|
|
// -- bmysxqk = 不满意事项情况 |
|
|
|
// -- xqwwcqk = 需求未完成情况 |
|
|
|
if (data.type === "events") { |
|
|
|
this.mapType = "xqwwcqk"; |
|
|
|
} |
|
|
|
if (data.type === "services") { |
|
|
|
this.mapType = "bmysxqk"; |
|
|
|
} |
|
|
|
if (data.type === 'problems') { |
|
|
|
this.mapType = "njjwtqk"; |
|
|
|
switch (data.type) { |
|
|
|
case 'events': |
|
|
|
this.mapType = "xqwwcqk"; |
|
|
|
break; |
|
|
|
case 'services': |
|
|
|
this.mapType = "bmysxqk"; |
|
|
|
break; |
|
|
|
case 'problems': |
|
|
|
this.mapType = "njjwtqk"; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
this.$refs.MapDialog.open({ |
|
|
|
orgId: data.agencyId, |
|
|
|
level: data.level |
|
|
|
}) |
|
|
|
orgLevel: data.level |
|
|
|
}, this.mapType) |
|
|
|
} |
|
|
|
}, |
|
|
|
setResourcesPoint() { |
|
|
|
resourcesPointClick(data) { |
|
|
|
this.$refs.MapResourceInfo.open(data.id, data.dataClass) |
|
|
|
}, |
|
|
|
|
|
|
|
setResourcesPoint({agencyId}) { |
|
|
|
this.$http.get('/actual/base/dataBoard/resource/search?keyword=&agencyId=' + agencyId).then(res => { |
|
|
|
let data = res.data.data; |
|
|
|
data = data.filter(item => item.latitude && item.longitude) |
|
|
|
data = data.map(item => { |
|
|
|
return { |
|
|
|
...item, |
|
|
|
latitude: item.latitude * 1, |
|
|
|
longitude: item.longitude * 1 |
|
|
|
} |
|
|
|
}) |
|
|
|
this.$refs.map.setResourcesPoint(data) |
|
|
|
}) |
|
|
|
}, |
|
|
|
getMapCount() { |
|
|
|
this.$http.get('/governance/icEvent/statOrgResourceAndEventCount?agencyId=' + this.orgId).then(res => { |
|
|
|
let countData = res.data.data |
|
|
|
countData.forEach(item2 => { |
|
|
|
|
|
|
|
this.orgData.children.forEach(item => { |
|
|
|
if (item2.agencyId === item.id) { |
|
|
|
item2.coordinates = item.coordinates |
|
|
|
item2.level = item.level |
|
|
|
item2.latitude = item.latitude |
|
|
|
item2.longitude = item.longitude |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
let orgDataids = this.orgData.children.map(item => item.id) |
|
|
|
countData.forEach(item => { |
|
|
|
console.log(item.data) |
|
|
|
item.data.forEach(item3 => { |
|
|
|
let coordinates = spliceIntoChunks(item.coordinates.split(",").map((item) => parseFloat(item)), 2) |
|
|
|
let coordinates2 = coordinates.map(item3 => { |
|
|
|
return [{ |
|
|
|
lat: item3[1], |
|
|
|
lng: item3[0] |
|
|
|
}] |
|
|
|
let orgDataIndex = orgDataids.indexOf(item.agencyId) |
|
|
|
if (orgDataIndex > -1) { |
|
|
|
let curOrgData = this.orgData.children[orgDataIndex]; |
|
|
|
item.data = item.data.map(item2 => { |
|
|
|
return { |
|
|
|
...curOrgData, |
|
|
|
...item2, |
|
|
|
agencyId: item.agencyId |
|
|
|
} |
|
|
|
}) |
|
|
|
let centerLngLat = this.getCenterPoint(coordinates2) |
|
|
|
if (item3.hasOwnProperty("services")) { |
|
|
|
item3.type = 'services' |
|
|
|
item3.num = item3.services; |
|
|
|
item3.offsets = [50, 50]; |
|
|
|
item3.latitude = centerLngLat.lat |
|
|
|
item3.longitude = centerLngLat.lng |
|
|
|
} |
|
|
|
if (item3.hasOwnProperty("resources")) { |
|
|
|
item3.type = 'resources' |
|
|
|
item3.num = item3.resources; |
|
|
|
item3.offsets = [-50, 50]; |
|
|
|
item3.latitude = centerLngLat.lat + 0.0012 |
|
|
|
item3.longitude = centerLngLat.lng |
|
|
|
} |
|
|
|
if (item3.hasOwnProperty("problems")) { |
|
|
|
item3.type = 'problems' |
|
|
|
item3.num = item3.problems; |
|
|
|
item3.offsets = [50, -50]; |
|
|
|
item3.latitude = centerLngLat.lat |
|
|
|
item3.longitude = centerLngLat.lng + .0012 |
|
|
|
} |
|
|
|
if (item3.hasOwnProperty("events")) { |
|
|
|
item3.type = 'events' |
|
|
|
item3.num = item3.events; |
|
|
|
item3.offsets = [-50, -50]; |
|
|
|
item3.latitude = centerLngLat.lat + .0012 |
|
|
|
item3.longitude = centerLngLat.lng + .0012 |
|
|
|
} |
|
|
|
// item3.latitude = item3.lat * 1 |
|
|
|
// item3.longitude = item3.lon * 1 |
|
|
|
|
|
|
|
item3.id = item.agencyId + item3.type |
|
|
|
item3.agencyId = item.agencyId |
|
|
|
item3.level = item.level |
|
|
|
}) |
|
|
|
item.data.forEach(item3 => { |
|
|
|
let coordinates = spliceIntoChunks(item3.coordinates.split(",").map((coordinatesItem) => parseFloat(coordinatesItem)), 2) |
|
|
|
let coordinates2 = coordinates.map(item4 => { |
|
|
|
return [{ |
|
|
|
lat: item4[1], |
|
|
|
lng: item4[0] |
|
|
|
}] |
|
|
|
}) |
|
|
|
let centerLngLat = this.getCenterPoint(coordinates2) |
|
|
|
if (item3.hasOwnProperty("services")) { |
|
|
|
item3.type = 'services' |
|
|
|
item3.num = item3.services; |
|
|
|
item3.offsets = [50, 50]; |
|
|
|
item3.latitude = centerLngLat.lat |
|
|
|
item3.longitude = centerLngLat.lng |
|
|
|
} |
|
|
|
if (item3.hasOwnProperty("resources")) { |
|
|
|
item3.type = 'resources' |
|
|
|
item3.num = item3.resources; |
|
|
|
item3.offsets = [-50, 50]; |
|
|
|
item3.latitude = centerLngLat.lat + 0.0012 |
|
|
|
item3.longitude = centerLngLat.lng |
|
|
|
} |
|
|
|
if (item3.hasOwnProperty("problems")) { |
|
|
|
item3.type = 'problems' |
|
|
|
item3.num = item3.problems; |
|
|
|
item3.offsets = [50, -50]; |
|
|
|
item3.latitude = centerLngLat.lat |
|
|
|
item3.longitude = centerLngLat.lng + .0012 |
|
|
|
} |
|
|
|
if (item3.hasOwnProperty("events")) { |
|
|
|
item3.type = 'events' |
|
|
|
item3.num = item3.events; |
|
|
|
item3.offsets = [-50, -50]; |
|
|
|
item3.latitude = centerLngLat.lat + .0012 |
|
|
|
item3.longitude = centerLngLat.lng + .0012 |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(countData, 'countData') |
|
|
|
this.$refs.map.setNumpoint(countData) |
|
|
|
|