网格介绍面板

master
许宏杰 3 weeks ago
parent d60835a100
commit 4fc0b3c970

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

@ -27,5 +27,6 @@ const getters = {
queryParamsIndex: (state) => state.taicang.queryParams, queryParamsIndex: (state) => state.taicang.queryParams,
queryParamsXiaoqu: (state) => state.xiaoqu.queryParmas, queryParamsXiaoqu: (state) => state.xiaoqu.queryParmas,
mapParmas: (state) => state.xiaoqu.mapParmas, mapParmas: (state) => state.xiaoqu.mapParmas,
netWorkintroduce: (state) => state.xiaoqu.netWorkintroduce,
}; };
export default getters; export default getters;

@ -6,6 +6,7 @@ const xiaoqu = {
sd: false, sd: false,
networkName: undefined, networkName: undefined,
}, },
netWorkintroduce: {},
}, },
mutations: { mutations: {
//参数变化 //参数变化
@ -19,13 +20,26 @@ const xiaoqu = {
state.mapParmas[key] = query[key]; state.mapParmas[key] = query[key];
} }
}, },
SET_NETWORK_INTRODUCE: (state, data) => {
state.netWorkintroduce = data;
},
//重置参数 //重置参数
RESET_QUERY: (state, query) => { RESET_QUERY: (state, query) => {
state.netWorkintroduce = {
intro: "",
list: [],
};
state.queryParmas = { state.queryParmas = {
xiaoquId: undefined, //小区 xiaoquId: undefined, //小区
parentid: undefined, //网格 parentid: undefined, //网格
buildingid: undefined, //楼栋 buildingid: undefined, //楼栋
deptId: undefined, //苑id deptId: undefined, //苑id
color: undefined,
type: undefined,
isd: undefined,
isk: undefined,
isx: undefined,
isj: undefined,
}; };
}, },
}, },

@ -1,6 +1,7 @@
<template> <template>
<div class="introduce-title"> <div class="introduce-title">
<span class="main-title">{{ title }}</span> <span class="main-title" v-if="!isSlot">{{ title }}</span>
<slot></slot>
</div> </div>
</template> </template>
@ -11,6 +12,10 @@ export default {
type: String, type: String,
default: "标题", default: "标题",
}, },
isSlot: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return {}; return {};
@ -26,8 +31,9 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
box-sizing: border-box;
padding: 0 20px 0 40px;
.main-title { .main-title {
margin-left: 40px;
font-size: 19px; font-size: 19px;
color: #ffffff; color: #ffffff;
font-family: "xiniu"; font-family: "xiniu";

@ -1,9 +1,226 @@
<template> <template>
<div class="info-container">网格信息</div> <div class="info-container">
<div class="network-intro">
<div>
{{ netWorkintroduce.intro }}
</div>
</div>
<div class="network-list">
<introduceTitle :isSlot="true">
<div class="network-title">
<div class="main-title">
网格
<span class="network-num">{{
mapParmas.networkName | filterName
}}</span>
人员列表
</div>
<div class="main-title">
<span class="network-num">{{ netWorkintroduce.list.length }}</span>
</div>
</div>
</introduceTitle>
<div class="person-list">
<div v-for="(item, index) in netWorkintroduce.list" :key="index">
<div class="person-image">
<el-image
fit="cover"
:src="uploadFileUrl + item.avatar"
:preview-src-list="[uploadFileUrl + item.avatar]"
>
</el-image>
<div class="serial-number">{{ index + 1 }}</div>
</div>
<div class="person-data">
<div class="data-item">
<div class="lable-value">
<div class="data-lable">姓名</div>
<div class="data-value">{{ item.user_name }}</div>
</div>
<div class="lable-value">
<div class="data-lable">联系电话</div>
<div class="data-value">{{ item.phonenumber }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template> </template>
<script> <script>
export default {}; import { mapGetters } from "vuex";
import introduceTitle from "@/views/components/introduceTitle/subTtile.vue";
export default {
data() {
return {
uploadFileUrl: process.env.VUE_APP_BASE_API,
};
},
components: {
introduceTitle,
},
filters: {
filterName(target) {
// -
const regex = /(?:\d+-?)+/g;
//
const matches = target.match(regex);
//
return matches ? matches.join("") : "";
},
},
computed: {
...mapGetters(["netWorkintroduce", "mapParmas"]),
},
};
</script> </script>
<style></style> <style lang="scss" scoped>
.info-container {
height: 100%;
box-sizing: border-box;
padding: 15px 0;
overflow: hidden;
.network-intro {
height: 55%;
padding: 20px 0 20px 20px;
background: url("~@/assets/images/ui/introduce-text.png");
background-size: 100% 100%;
font-size: 14px;
color: #d3e9ff;
font-weight: 400;
line-height: 25px;
div {
height: 100%;
overflow-y: auto;
padding-right: 20px;
}
}
.network-list {
height: 45%;
.network-title {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.main-title {
display: flex;
align-items: center;
}
.network-num {
display: inline-block;
width: 36px;
height: 34px;
line-height: 28px;
background: url("~@/assets/images/ui/img_block@2x.png");
background-size: 100% 100%;
font-size: 18px;
text-align: center;
color: #ffffff;
text-shadow: 0px 0px 10px #11c2ff;
font-family: "din-bold-2.ttf";
}
.person-list {
height: calc(100% - 40px);
overflow-y: auto;
padding: 0 10px;
& > div {
height: 50%;
display: flex;
align-items: center;
.person-image {
position: relative;
width: 32%;
height: 80%;
border-radius: 6px;
background: #01031f;
border: 1px solid rgba(0, 180, 255, 0.6);
overflow: hidden;
padding: 5px;
.serial-number {
position: absolute;
left: 0;
top: 0;
height: 28px;
width: 28px;
background: url("~@/assets/images/ui/serial-number.png");
background-size: 100% 100%;
font-size: 14px;
padding-left: 5px;
color: #ffffff;
font-family: "din-bold-2.ttf";
}
.el-image {
display: block;
height: 100%;
width: 100%;
border-radius: 3px;
}
}
.person-data {
flex: 1;
padding-left: 15px;
.lable-value {
margin-bottom: 20px;
}
.data-item > div:last-child {
margin: 0;
}
.data-lable {
font-size: 14px;
color: #ffc333;
font-style: italic;
font-weight: 400;
margin-bottom: 10px;
}
.data-value {
position: relative;
font-size: 17px;
color: #ffffff;
font-style: italic;
font-weight: 400;
}
.data-value::after {
position: absolute;
bottom: 0;
z-index: -1;
content: "";
display: block;
width: 94px;
height: 10px;
background: url("~@/assets/images/ui/cell-bg.png");
background-size: 100% 100%;
}
}
}
}
}
}
/*全局滚动条样式*/
::-webkit-scrollbar {
width: 3px;
height: 3px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
height: 10px;
width: 1px;
background: rgba(255, 255, 255, 0.5);
}
::-webkit-scrollbar-track {
background: transparent;
}
</style>

@ -60,7 +60,7 @@ export default {
handler(newValue, oldValue) { handler(newValue, oldValue) {
this.add3DXiaoqu(newValue.sd); this.add3DXiaoqu(newValue.sd);
this.addNetworkLayer(newValue.networkName); this.addNetworkLayer(newValue.networkName);
// console.log("Object changed:", newValue); if (this.map.getLayerById("dth")) this.map.getLayerById("dth").clear(); //
}, },
deep: true, // Deeply watch all nested properties deep: true, // Deeply watch all nested properties
}, },
@ -81,10 +81,7 @@ export default {
}); });
map.on(mars3d.EventType.click, function (e) { map.on(mars3d.EventType.click, function (e) {
if (!e.id) { if (!e.id) {
// map.getLayerById("dth").clear(); // map.getLayerById("dth").clear(); //
// _this.mapLayer.network.eachGraphic((graphic) => {
// graphic.closeHighlight();
// });
_this.$store.commit("CHANGE_QUERY", { _this.$store.commit("CHANGE_QUERY", {
buildingid: undefined, buildingid: undefined,
deptId: undefined, deptId: undefined,
@ -422,14 +419,8 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (show && this.mapLayer.network.length > 0) { if (show && this.mapLayer.network.length > 0) {
this.mapLayer.network.show = true; this.mapLayer.network.show = true;
// this.mapLayer.network.eachGraphic((graphic) => {
// graphic.closeHighlight();
// });
let networkItem = this.mapLayer.network.getGraphicById(show); let networkItem = this.mapLayer.network.getGraphicById(show);
networkItem.openHighlight({ networkItem.openHighlight({
type: "click",
color: "#FF3992", color: "#FF3992",
opacity: 0.5, opacity: 0.5,
outline: true, outline: true,
@ -444,7 +435,7 @@ export default {
//3D //3D
add3DXiaoqu(show) { add3DXiaoqu(show) {
if (show && this.mapLayer.tiles3dLayer != "undefined") { if (show && this.mapLayer.tiles3dLayer == undefined) {
//2D - //2D -
let maximumMemoryUsage = let maximumMemoryUsage =
process.env.NODE_ENV === "production" ? (1024 * 2) / 2 : 1024 / 2; process.env.NODE_ENV === "production" ? (1024 * 2) / 2 : 1024 / 2;
@ -476,14 +467,12 @@ export default {
}, },
//2D - 3D //2D - 3D
handle3dPoint(type) { handle3dPoint(type) {
//
this.mapLayer.planePoint.eachGraphic((graphic) => { this.mapLayer.planePoint.eachGraphic((graphic) => {
var centerPoint = graphic.centerPoint; var centerPoint = graphic.centerPoint;
if (type == "3d") { if (type == "3d") {
let attr = graphic.attr; let attr = graphic.attr;
centerPoint.alt = Number(attr.floorNum) * 3 + 10; centerPoint.alt = Number(attr.floorNum) * 3 + 10;
} }
graphic.setOptions({ graphic.setOptions({
position: centerPoint, position: centerPoint,
style: { style: {

@ -45,7 +45,7 @@
</template> </template>
<script> <script>
import { getNetWorkId } from "@/api/home/index.js"; import { getNetWorkId, getNectWorkOffice } from "@/api/home/index.js";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
export default { export default {
dicts: ["b_color_type"], dicts: ["b_color_type"],
@ -86,18 +86,30 @@ export default {
this.networkOption = res.data["网格list"]; this.networkOption = res.data["网格list"];
}, },
handleNetwork(e) { async handleNetwork(e) {
let networkName = ""; let networkName = "";
if (e) { if (e) {
networkName = this.networkOption.filter((item) => item.dept_id == e)[0] let item = this.networkOption.filter((item) => item.dept_id == e)[0];
.dept_name; networkName = item.dept_name;
console.log(networkName); console.log(networkName, item);
this.$store.commit("SET_NETWORK_INTRODUCE", {
intro: JSON.parse(item.intro).kaiguo.text,
list: await this.getNetworkIntro(e),
});
} }
this.$store.commit("CHANGE_QUERY", { parentid: e }); this.$store.commit("CHANGE_QUERY", { parentid: e });
this.$store.commit("CHANGE_QUERY_MAP", { networkName: networkName }); this.$store.commit("CHANGE_QUERY_MAP", { networkName: networkName });
}, },
async getNetworkIntro(deptid) {
let res = await getNectWorkOffice({ deptid: deptid });
return res.data;
},
handleMapLayer(e) { handleMapLayer(e) {
this.$store.commit("CHANGE_QUERY_MAP", { sd: e }); this.$store.commit("CHANGE_QUERY_MAP", { sd: e });
}, },

Loading…
Cancel
Save