epmet pc工作端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

459 lines
13 KiB

<template>
<div>
2 years ago
<!-- <cpt-bread
@tap="clickBreadItem"
v-if="breadList.length > 1"
:bread-list="breadList"
/> -->
2 years ago
<div class="g-row">
<div class="g-left">
<div class="m-box">
2 years ago
<title-box
:text="`${
currentLevel === 'district'
? '区'
: currentLevel === 'street'
? '街道'
: currentLevel === 'community'
? '社区'
: currentLevel === 'grid'
? '网格'
: ''
}介绍`"
/>
<jdjs />
2 years ago
</div>
2 years ago
<div class="m-box">
2 years ago
<title-box
:text="`${
currentLevel === 'district'
? '区'
: currentLevel === 'street'
? '街道'
: currentLevel === 'community'
? '社区'
: currentLevel === 'grid'
? '网格'
: ''
}图谱画像`"
/>
<jdtphx :id="orgId" />
2 years ago
</div>
</div>
<div class="g-center">
<div class="m-map" style="overflow: hidden">
2 years ago
<map-top />
<div v-if="breadList.length > 1" class="go-back" @click="goBackMap">
<img src="~@/assets/images/shuju/overview/go-back.png" />
</div>
2 years ago
<grid-map
2 years ago
ref="map"
@clickAgency="clickAgencyItem"
:srcGridData="orgData"
@clickDotBtn="handleClickDotBtn"
2 years ago
/>
</div>
<div class="m-box m-rybox">
2 years ago
<title-box text="XX街道网格员" />
<jdwgy />
2 years ago
</div>
</div>
<div class="g-right">
<div class="m-box">
2 years ago
<title-box text="人房数据统计" />
<rfsjtj />
2 years ago
</div>
2 years ago
<!-- 街道概览 -->
2 years ago
<div
v-if="currentLevel === 'street' || currentLevel === 'district'"
class="m-box"
>
2 years ago
<title-box text="各社区人房数据更新排行">
2 years ago
<span class="date-span">
<el-date-picker
2 years ago
v-model="rfphDate"
format="yyyy-MM"
value-format="yyyy-MM"
@change="changeDate"
type="month"
:clearable="false"
placeholder="选择月"
2 years ago
>
</el-date-picker>
</span>
2 years ago
</title-box>
2 years ago
<sqrfph :date="rfphDate" />
2 years ago
</div>
2 years ago
<div
v-if="currentLevel === 'street' || currentLevel === 'district'"
class="m-box"
>
2 years ago
<title-box text="各社区12345投诉事件统计">
2 years ago
<span class="date-span">
<el-date-picker
2 years ago
v-model="sq12345Date"
format="yyyy-MM"
value-format="yyyy-MM"
type="month"
:clearable="false"
placeholder="选择月"
2 years ago
/>
2 years ago
</span>
2 years ago
</title-box>
2 years ago
<sq12345 :date="sq12345Date" />
2 years ago
</div>
2 years ago
<!-- 社区&网格-->
<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 v-if="dynamicType === 1"/>
<GridUpdateRanking v-if="dynamicType === 2"/>
2 years ago
</div>
<!-- 社区概览-->
<div v-if="currentLevel === 'community'" class="m-box">
<title-box text="社区满意度自查结果">
<span class="date-span">
<el-date-picker
2 years ago
v-model="sqzcDate"
format="yyyy-MM"
value-format="yyyy-MM"
type="month"
:clearable="false"
placeholder="选择月"
2 years ago
/>
</span>
</title-box>
2 years ago
<CommunityResult :date="sqzcDate" />
2 years ago
</div>
<div v-if="currentLevel === 'community'" class="m-box">
<title-box text="事件&回访">
<span class="date-span">
<el-date-picker
2 years ago
v-model="sjhfDate"
format="yyyy-MM"
value-format="yyyy-MM"
@change="changeDate"
type="month"
:clearable="false"
placeholder="选择月"
2 years ago
/>
</span>
</title-box>
<Tabs v-model="eventType" :list="eventTypeList" @changeVal="eventTypeChange"/>
<EventAndFollowUp :date="sjhfDate" v-if="eventType === 1"/>
<FollowUp :date="sjhfDate" v-if="eventType === 2"/>
2 years ago
</div>
<!-- 网格 -->
<div v-if="currentLevel === 'grid'" class="m-box">
<title-box text="社区网格数据更新情况排行">
<span class="date-span">
<el-date-picker
2 years ago
v-model="sqwggxDate"
format="yyyy-MM"
value-format="yyyy-MM"
@change="changeDate"
type="month"
:clearable="false"
placeholder="选择月"
2 years ago
/>
</span>
</title-box>
2 years ago
<RankingGridData :date="sqwggxDate" />
2 years ago
</div>
</div>
2 years ago
</div>
2 years ago
2 years ago
<cpt-loading v-show="false" />
</div>
</template>
<script>
2 years ago
import gridMap from "@/views/dataBoard/cpts/map/index";
import cptBread from "@/views/dataBoard/renfang/cpts/bread";
2 years ago
import cptLoading from "@/views/dataBoard/cpts/loading";
2 years ago
import titleBox from "@/views/dataBoard/satisfactionEval/components/Title";
import jdjs from "@/views/dataBoard/overview/components/jdjs.vue";
import jdtphx from "@/views/dataBoard/overview/components/jdtphx.vue";
2 years ago
import mapTop from "@/views/dataBoard/overview/components/map-top.vue";
import jdwgy from "@/views/dataBoard/overview/components/jdwgy.vue";
import rfsjtj from "@/views/dataBoard/overview/components/rfsjtj.vue";
import sqrfph from "@/views/dataBoard/overview/components/sqrfph.vue";
import sq12345 from "@/views/dataBoard/overview/components/sq12345.vue";
2 years ago
import DynamicHumanRoomData from "@/views/dataBoard/overview/components/DynamicHumanRoomData.vue";
import GridUpdateRanking from "@/views/dataBoard/overview/components/GridUpdateRanking.vue";
2 years ago
import CommunityResult from "@/views/dataBoard/overview/components/CommunityResult.vue";
import EventAndFollowUp from "@/views/dataBoard/overview/components/EventAndFollowUp.vue";
import RankingGridData from "@/views/dataBoard/overview/components/RankingGridData.vue";
import FollowUp from "@/views/dataBoard/overview/components/FollowUp.vue";
import Tabs from "@/views/dataBoard/satisfactionEval/components/Tabs/index.vue";
2 years ago
2 years ago
import { requestPostBi } from "@/js/dai/request-bipass";
import { requestPost } from "@/js/dai/request";
2 years ago
export default {
2 years ago
name: "renfang",
components: {
gridMap,
cptLoading,
cptBread,
2 years ago
titleBox,
jdjs,
jdtphx,
2 years ago
mapTop,
jdwgy,
rfsjtj,
sqrfph,
sq12345,
2 years ago
DynamicHumanRoomData,
CommunityResult,
EventAndFollowUp,
2 years ago
RankingGridData,
GridUpdateRanking,
FollowUp,
Tabs
2 years ago
},
data() {
return {
2 years ago
loading: false,
2 years ago
rfphDate: this.$moment().format("YYYY-MM"),
sq12345Date: this.$moment().format("YYYY-MM"),
sqzcDate: this.$moment().format("YYYY-MM"),
sjhfDate: this.$moment().format("YYYY-MM"),
sqwggxDate: this.$moment().format("YYYY-MM"),
2 years ago
orgData: {
children: [],
}, //当前组织对象
orgId: "",
orgLevel: "",
2 years ago
currentLevel: "",
2 years ago
breadList: [
{
orgId: "",
orgLevel: "",
2 years ago
id: "",
level: "",
meta: { title: "人房总览" },
2 years ago
},
],
displayedResiId: "",
displayedHouseId: "",
dynamicType: 1,
dynamicTypeList: [{
value: 1,
label: '更新动态'
}, {
value: 2,
label: '网格更新排行'
}],
eventType: 1,
eventTypeList: [{
value: 1,
label: '12345事件'
}, {
value: 2,
label: '事件回访'
}]
};
},
2 years ago
mounted() {
2 years ago
// const queryOrgId = getQueryPara("orgId");
// const queryOrgLevel = getQueryPara("orgLevel");
// this.init(queryOrgId, queryOrgLevel);
2 years ago
if (this.$store.state.chooseArea.chooseName.orgId) {
this.getMapData();
2 years ago
}
},
2 years ago
2 years ago
watch: {
2 years ago
"$store.state.chooseArea.chooseName"(val) {
if (val.orgId) {
this.getMapData();
}
2 years ago
},
2 years ago
},
2 years ago
methods: {
dynamicTypeChange(val) {
this.dynamicType = val
},
eventTypeChange(val) {
this.eventType = val
},
2 years ago
async init(queryOrgId, queryOrgLevel) {
if (queryOrgId) {
this.orgId = queryOrgId;
this.orgLevel = queryOrgLevel || "agency";
} else {
this.orgId = this.$store.state.user.agencyId;
this.orgLevel = "agency";
}
//加载组织数据
this.loading = false;
await this.getMapData();
2 years ago
// await this.getSubMapData();
2 years ago
this.loading = true;
},
2 years ago
changeDate(e) {
this.rfphDate = e;
2 years ago
},
2 years ago
handleClickDotBtn(type, info) {
if (type == "watch-resi") {
this.displayedResiId = info.user_id;
} else if (type == "watch-house") {
this.displayedHouseId = info.house_id;
}
},
2 years ago
clickBreadItem({ item }) {
2 years ago
this.toBread(item);
},
clickAgencyItem(item) {
this.toBread({
orgId: item.id,
orgLevel: item.level,
2 years ago
meta: { title: item.name },
2 years ago
});
},
2 years ago
goBackMap() {
this.clickAgencyItem(this.breadList[this.breadList.length - 2]);
},
2 years ago
toBread(item) {
2 years ago
const { orgId } = item;
const { breadList } = this;
2 years ago
let index = breadList.findIndex((val) => val.orgId === orgId);
// return console.log(item, breadList, index);
if (index >= 0) {
this.breadList = breadList.slice(0, index + 1);
} else {
2 years ago
breadList.push({ ...item, id: item.orgId, level: item.orgLevel });
2 years ago
this.breadList = breadList;
}
this.getMapData(item.orgId, item.orgLevel)
2 years ago
},
// 点击搜索结果条目,在地图上显示点和详情弹窗
handleClickSearchItem(item) {
if (!item.longitude) {
return this.$message.error("请先设置坐标");
}
this.$refs.map.setDotMarker(item, [
parseFloat(item.longitude),
parseFloat(item.latitude),
]);
},
//获取地图上显示的组织数据
async getMapData(orgId = this.$store.state.chooseArea.chooseName.orgId, level = this.$store.state.chooseArea.chooseName.level) {
2 years ago
const url = "org_map";
2 years ago
this.$http
.post(`/gov/org/agency/maporg`, { orgId, level })
.then(({ data: { data } }) => {
this.orgData = data;
this.orgId = this.orgData.org_id;
this.orgLevel = this.orgData.level;
this.currentLevel = this.orgData.agencyLevel;
});
2 years ago
},
//获取地图上显示的组织数据
async getSubMapData() {
const url = "sub_org_map";
2 years ago
const { data, code, msg } = await requestPostBi(
url,
{
queryParam: {
org_id: this.orgId,
2 years ago
},
2 years ago
},
{
// mockId: 61831860,
}
2 years ago
);
if (code === 0) {
2 years ago
const { orgData } = this;
2 years ago
orgData.children = data.map((item) => {
return {
...item,
id: item.org_id,
name: item.org_name,
latitude: parseFloat(item.latitude),
longitude: parseFloat(item.longitude),
coordinates: item.coordinates || "",
};
});
2 years ago
this.orgData = { ...orgData };
2 years ago
} else {
this.$message.error(msg);
}
},
//加载组织数据
async loadOrgData() {
const url = "/gov/org/agency/maporg";
let params = {
orgId: this.orgId,
level: this.orgLevel,
};
2 years ago
const { data, code, msg } = await requestPost(url, params);
2 years ago
if (code === 0) {
this.orgData = data;
this.orgId = this.orgId;
this.orgLevel = this.orgData.level;
} else {
this.$message.error(msg);
}
},
handelClickRkfxPei(val) {
console.log(val);
},
},
};
</script>
2 years ago
<style lang="scss" scoped>
.go-back {
position: absolute;
z-index: 100;
top: 100px;
left: 16px;
right: 0;
img {
height: 36px;
width: 36px;
}
img:hover {
cursor: pointer;
}
}
</style>
2 years ago
<style
2 years ago
lang="scss"
src="@/assets/scss/dataBoard/overview/index.scss"
scoped
2 years ago
></style>
<style lang="scss" scoped>
.tabs {
padding: 16px;
}
</style>