要素资源

pull/139/head
lukeyan 1 year ago
parent 0c7938dda8
commit 863a692c58

@ -8,7 +8,7 @@
@close="close" @close="close"
> >
<div class="text"> <div class="text">
<div style="color: #fff" v-html="this.text"></div> <div v-html="this.text"></div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -65,6 +65,7 @@ export default {
overflow-y: scroll; overflow-y: scroll;
// border: 0.1px solid #28847e; // border: 0.1px solid #28847e;
height: 600px; height: 600px;
background: #fff;
} }
.text::-webkit-scrollbar { .text::-webkit-scrollbar {
width: 6px; width: 6px;

@ -41,7 +41,7 @@
<div class="icon_green"></div> <div class="icon_green"></div>
</div> </div>
<div class="counterfraud_glossary_text">警情简要:</div> <div class="counterfraud_glossary_text">警情简要:</div>
<div class="counterfraud_glossary_value"> <div :title="item.title" class="counterfraud_glossary_value">
{{ item.title }} {{ item.title }}
</div> </div>
</div> </div>
@ -167,9 +167,9 @@ export default {
this.total = res.total; this.total = res.total;
}); });
}, },
// //
check_item(val) { check_item(val) {
this.$refs.counterDialog.open(val) this.$refs.counterDialog.open(val);
}, },
// -- // --
size_change(val) { size_change(val) {
@ -367,11 +367,14 @@ export default {
text-align: center; text-align: center;
} }
.counterfraud_glossary_value { .counterfraud_glossary_value {
width: 15.7vw; width: 15.5vw;
height: 5vh; height: 5vh;
line-height: 5vh; line-height: 5vh;
color: #fff; color: #fff;
text-align: left; text-align: left;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
} }
} }
.counterfraud_time { .counterfraud_time {

@ -8,7 +8,7 @@
@close="close" @close="close"
> >
<div class="text"> <div class="text">
<div style="color: #fff" v-html="this.text"></div> <div v-html="this.text"></div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -65,6 +65,7 @@ export default {
overflow-y: scroll; overflow-y: scroll;
// border: 0.1px solid #28847e; // border: 0.1px solid #28847e;
height: 600px; height: 600px;
background: #fff;
} }
.text::-webkit-scrollbar { .text::-webkit-scrollbar {
width: 6px; width: 6px;

@ -1,15 +1,179 @@
<!-- 要素资源地图 --> <!-- 要素资源地图 -->
<template> <template>
<div></div> <div class="map" id="container"></div>
</template> </template>
<script> <script>
import styleJson from "../../../../public/custom_map_config.json";
import MapLine from "../../../../public/zhenhaiLine.json";
import MapPoint from "../../../../public/zhenhaiPoint.json";
export default { export default {
name:'FactorMap', name: "FactorMap",
data() { props: {
return {} company_list: {
} type: Array,
} default: () => [],
},
video_list: {
type: Array,
default: () => [],
},
},
data() {
return {
center_point: [121.604192, 29.977299],
};
},
mounted() {
this.init_map();
},
methods: {
//
init_map() {
let BMap = window.BMap;
let map = new BMap.Map("container", {
style: {
styleJson,
},
});
let that = this; //
let label = new BMap.Label();
setTimeout(() => {
//
that.company_list.forEach((item) => {
var point = new BMap.Point(item.longitude, item.latitude);
// ;
var myIcon = {};
myIcon = new BMap.Icon(
require("@/assets/factor/factor02.png"),
new BMap.Size(20, 40),
{
imageOffset: new BMap.Size(0, 0, 5), //
}
);
var marker = new BMap.Marker(point, { icon: myIcon }); //
map.addOverlay(marker);
marker.addEventListener("click",function() {
that.$emit('get_company_text',item)
})
});
//
that.video_list.forEach((item) => {
var video_ponit = new BMap.Point(item.longitude, item.latitude);
// ;
var video_icon = {};
video_icon = new BMap.Icon(
require("@/assets/factor/factor01.png"),
new BMap.Size(20, 40),
{
imageOffset: new BMap.Size(0, 0, 5), //
}
);
var video_marker = new BMap.Marker(video_ponit, { icon: video_icon }); //
map.addOverlay(video_marker);
});
}, 500);
map.centerAndZoom(
new BMap.Point(this.center_point[0], this.center_point[1]),
13
); //
map.setMinZoom(12); //
map.setMaxZoom(19);
map.enableScrollWheelZoom(true);
showPoint();
for (var i = 0, n = MapLine.features.length; i < n; i++) {
showBoundaryEx(MapLine.features[i]);
}
//////////////// -- /////////////////
function showBoundaryEx(city) {
var paths = [];
var list = city.geometry.coordinates;
var polygon = {};
if (list.length > 1) {
for (let a = 0; a < list.length; a++) {
paths = [];
for (let i = 0; i < list[a][0].length; i++) {
let lat = list[a][0][i][1],
lng = list[a][0][i][0];
paths.push(new BMap.Point(lng, lat));
}
polygon = new BMap.Polygon(paths, {
fillColor: "#3b4c44",
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1,
}); //
polygon.disableMassClear();
map.addOverlay(polygon); //
}
} else {
for (let i = 0; i < list[0].length; i++) {
let lat = list[0][i][1],
lng = list[0][i][0];
paths.push(new BMap.Point(lng, lat));
}
polygon = new BMap.Polygon(paths, {
fillColor: "#3b4c44",
strokeColor: "#0f1423",
fillOpacity: 0.6,
strokeWeight: 1,
}); //
polygon.disableMassClear();
map.addOverlay(polygon); //
}
polygon.infowindow = new BMap.InfoWindow();
polygon.infowindow.name = city.properties.name;
polygon.addEventListener("mouseover", function () {
polygon.setFillColor("#ffa500");
});
polygon.addEventListener("mouseout", function () {
map.removeOverlay(label);
polygon.setFillColor("#3b4c44");
});
}
//////////////// /////////////////
function showPoint() {
for (let i = 0; i < MapPoint.features.length; i++) {
var opts = {
position: new BMap.Point(
MapPoint.features[i].geometry.coordinates[0],
MapPoint.features[i].geometry.coordinates[1]
), //
offset: new BMap.Size(-30, -30), //
};
//
var unit_name = new BMap.Label(
MapPoint.features[i].properties.name,
opts
);
//
unit_name.setStyle({
color: "orange",
borderRadius: "5px",
borderColor: "#ccc",
padding: "10px",
fontSize: "16px",
height: "20px",
lineHeight: "20px",
backgroundColor: "rgba(0,0,0,0)",
border: "0",
fontFamily: "微软雅黑",
});
unit_name.disableMassClear();
map.addOverlay(unit_name);
}
}
},
},
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* 去除百度地图logo */
.anchorBL {
display: none;
}
.map {
width: 100%;
height: 100%;
}
</style> </style>

@ -3,22 +3,258 @@
<div class="factor_body"> <div class="factor_body">
<div class="factor_title">要素资源</div> <div class="factor_title">要素资源</div>
<div class="factor_map"> <div class="factor_map">
<!-- 要素资源地图 -->
<div class="map_body"> <div class="map_body">
<FactorMap ref="factorMap"></FactorMap> <FactorMap
ref="factorMap"
:company_list="company_list"
:video_list="video_list"
@get_company_text="get_company_text"
></FactorMap>
<!-- 右上方查询部分 -->
<div class="right_search">
<el-form :model="search" class="search_form">
<el-form-item>
<el-select v-model="search.select">
<el-option
v-for="item in select_list"
:key="item.value"
:label="item.label"
:value="item.label"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input
v-model="search.word"
placeholder="请选择关键词"
></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @click="search_map"
>搜索</el-button
>
<el-button icon="el-icon-refresh-right" @click="reset_map"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<!-- 左上方查询部分 -->
<div class="left_check">
<div class="check_title">图层</div>
<div class="check_body">
<el-button size="small" @click="get_all()"></el-button>
<el-button size="small" @click="get_video()">{{
this.btn_video
}}</el-button>
<el-button size="small" @click="get_item()">{{
this.btn_item
}}</el-button>
</div>
</div>
<!-- 公司信息文本展示 -->
<div v-if="company_flag" class="company_text">
<!-- 伪弹窗头部 -->
<div class="text_head">
<div class="title" :title="text_company">{{ text_company }}</div>
<div class="text_icon" @click="close_company">
<i class="el-icon-close"></i>
</div>
</div>
<div class="text_content">
<div class="text_content_types">
<div class="types_text">企业类型:</div>
<div class="types_value"></div>
</div>
<div class="text_content_item">
<div class="item_text">企业地址:</div>
<div class="item_value">{{ company_address }}</div>
</div>
<div class="text_content_item">
<div class="item_text">企业性质:</div>
<div class="item_value">{{ company_nature }}</div>
</div>
<div class="text_content_item">
<div class="item_text">成立日期:</div>
<div class="item_value">{{ start_date }}</div>
</div>
<div class="text_content_item">
<div class="item_text">营业期限:</div>
<div class="item_value">{{ time_limit }}</div>
</div>
<div class="text_content_item">
<div class="item_text">登记机关:</div>
<div class="item_value">{{ sign_organ }}</div>
</div>
<div class="text_content_item">
<div class="item_text">企业法人:</div>
<div class="item_value">{{ legal_person }}</div>
</div>
<div class="text_content_item">
<div class="item_text">安全责任人:</div>
<div class="item_value">{{ safe_person }}</div>
</div>
<div class="text_content_item">
<div class="item_text">责任人电话:</div>
<div class="item_value">{{ person_phone }}</div>
</div>
<div class="text_content_item">
<div class="item_text">经营范围:</div>
<div class="item_value">{{ company_scope }}</div>
</div>
</div>
<!-- 跳转 -->
<div class="text_footer" @click="turn()">
{{ footer_text }}
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import FactorMap from "./components/factorMap" import FactorMap from "./components/factorMap";
import { statistic, queryCompany, queryVideo } from "@/api/factorResources";
export default { export default {
name: "factor", name: "factor",
components:{ components: {
FactorMap FactorMap,
}, },
data() { data() {
return {}; return {
company_list: [], //
video_list: [], //
search: {
word: "",
select: "企业",
},
select_list: [
{ label: "企业", value: "1" },
{ label: "监控", value: "2" },
],
btn_video: "", //
btn_item: "", //
company_flag: false, //
///////////
text_company: "",
company_address: "",
company_nature: "",
start_date: "",
time_limit: "",
sign_organ: "",
legal_person: "",
safe_person: "",
company_scope: "",
footer_text: "查看企业档案>>",
id: "",
///////////
};
},
created() {
this.get_list();
},
methods: {
//
get_list() {
statistic().then((res) => {
this.company_list = res.data.companyInfoList;
this.btn_item = `园区企业(${res.data.companyInfoList.length})`;
this.video_list = res.data.deviceVideoInfoList;
this.btn_video = `视频监控(${res.data.deviceVideoInfoList.length})`;
});
},
//
get_all() {
statistic().then((res) => {
this.company_list = res.data.companyInfoList;
this.video_list = res.data.deviceVideoInfoList;
//
this.$refs.factorMap.init_map();
});
},
//
get_item() {
let param = {
name: "",
};
queryCompany(param).then((res) => {
this.company_list = res.data;
this.video_list = [];
//
this.$refs.factorMap.init_map();
});
},
//
get_video() {
let param = {
name: "",
};
queryVideo(param).then((res) => {
this.video_list = res.data;
this.company_list = [];
//
this.$refs.factorMap.init_map();
});
},
//
search_map() {
let param = {
name: this.search.word,
};
//
if (this.search.select == "企业") {
queryCompany(param).then((res) => {
this.company_list = res.data;
this.video_list = [];
//
this.$refs.factorMap.init_map();
});
} else {
queryVideo(param).then((res) => {
this.video_list = res.data;
this.company_list = [];
//
this.$refs.factorMap.init_map();
});
}
},
//
get_company_text(item) {
this.company_flag = true;
console.log("item111", item);
this.text_company = item.companyName;
this.company_address = item.companyAddress;
this.company_nature = item.companyNature;
this.start_date = item.establishDate;
this.time_limit = item.businessTermDate;
this.sign_organ = item.registerAuthority;
this.legal_person = item.legalPerson;
this.safe_person = item.emergencyContact;
this.person_phone = item.emergencyContactPhone;
this.company_scope = item.businessScope;
this.id = item.id;
},
//
turn() {
sessionStorage.setItem("companyID", this.id);
sessionStorage.setItem("companyName", this.text_company);
this.$router.push({
name: "archives",
});
},
//
close_company() {
this.company_flag = false;
},
//
reset_map() {
this.search.select = "企业";
this.search.word = "";
this.get_all();
},
}, },
}; };
</script> </script>
@ -57,6 +293,202 @@ export default {
width: 98%; width: 98%;
height: 82vh; height: 82vh;
border: 0.1px solid #28847e; border: 0.1px solid #28847e;
position: relative;
.right_search {
top: 20px;
right: 20px;
position: absolute;
width: 50%;
display: flex;
flex-direction: row-reverse;
z-index: 10;
/deep/.el-form {
display: flex;
.el-form-item {
display: flex;
margin-left: 0.5vw;
}
.el-form-item__label {
text-align: center;
color: #fff;
}
.el-form-item__content {
.el-input__inner {
background: #1c2528;
border: 0.1px solid #28847e;
color: #fff;
}
.el-select {
width: 100px;
}
// .el-scrollbar__view .el-select-dropdown__list {
// background: #1c2528;
// }
/* 查询框点击颜色变化 */
.el-input__inner:focus,
.el-input__inner:hover {
border-color: #2a968f;
}
.el-range-input {
color: #fff;
background: #283436;
}
}
.el-button {
border: 0.1px solid #28847e;
color: #fff;
background: #1c2528;
position: relative;
overflow: hidden;
&:before {
content: "";
position: absolute;
top: -100%;
left: -50%;
width: 150%;
height: 2px;
background-color: #fff;
box-shadow: 0 0 4px 1px #fff;
transform: rotateZ(-45deg);
}
&:hover::before {
transition: 0.7s;
top: 200%;
left: 50%;
}
}
.el-button:hover {
color: #34e1b3;
background: #4d8f89;
border: 0.1px solid #137868;
}
}
}
.left_check {
width: 13vw;
height: 18vh;
border: 0.1px solid #28847e;
background: #1c2528;
border-radius: 4px;
position: absolute;
z-index: 20;
top: 20px;
left: 20px;
.check_title {
width: 13vw;
height: 4vh;
text-align: center;
line-height: 4vh;
color: aliceblue;
}
.check_body {
margin-top: 1vh;
margin-left: 1vw;
width: 11vw;
height: 13vh;
display: flex;
flex-direction: column;
.el-button {
width: 7vw;
margin-left: 20px;
margin-bottom: 5px;
color: #fff;
background: rgba(0, 0, 0, 0);
border: 0.1px solid rgba(0, 0, 0, 0);
border-radius: 4px;
text-align: left;
}
.el-button:focus,
.el-button:hover {
background: #4d8f89;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
}
}
.company_text {
width: 18vw;
height: 60vh;
position: absolute;
top: 90px;
right: 20px;
border: 0.1px solid #28847e;
border-radius: 4px;
background: #283436;
.text_head {
width: 18vw;
height: 4vh;
display: flex;
justify-content: space-around;
.title {
margin-left: 8px;
width: 15vw;
height: 4vh;
line-height: 4vh;
text-align: left;
color: aliceblue;
text-shadow: 0 0 9px #86d49d;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
letter-spacing: 2px;
cursor: pointer;
}
.text_icon {
width: 2vw;
height: 4vh;
text-align: center;
line-height: 4vh;
color: #e55b5b;
cursor: pointer;
}
.text_icon:hover {
text-shadow: 0 0 9px #86d49d;
}
}
.text_content {
margin-left: 1vw;
width: 16vw;
height: 50vh;
margin-top: 1vh;
overflow-y: scroll;
.text_content_types {
margin-bottom: 5px;
.types_text {
color: antiquewhite;
}
}
.text_content_item {
margin-bottom: 5px;
display: flex;
.item_text {
width: 5vw;
color: antiquewhite;
}
.item_value {
width: 11vw;
color: #fff;
}
}
}
.text_content::-webkit-scrollbar {
width: 6px;
background-color: rgba(0, 0, 0, 0);
border-radius: 4px;
}
.text_content::-webkit-scrollbar-thumb {
width: 5px;
background-color: #28847e;
border-radius: 4px;
}
.text_footer {
width: 18vw;
height: 4vh;
line-height: 4vh;
text-align: center;
color: #34e1b3;
cursor: pointer;
}
}
} }
} }
} }

@ -209,7 +209,6 @@ export default {
}, },
// tab // tab
blue_warn_search() { blue_warn_search() {
console.log("222222");
this.$refs.blueWarn.search(); this.$refs.blueWarn.search();
}, },
// //
@ -221,7 +220,6 @@ export default {
this.yellow_warn_search(); this.yellow_warn_search();
this.green_warn_search(); this.green_warn_search();
this.blue_warn_search(); this.blue_warn_search();
console.log('1231231231231');
}, },
dealWithData(data) { dealWithData(data) {
let c = []; let c = [];

@ -46,8 +46,10 @@ export default {
setTimeout(() => { setTimeout(() => {
let list_item = []; let list_item = [];
if (!this.is_flag) { if (!this.is_flag) {
//
list_item = this.company_list; list_item = this.company_list;
} else { } else {
//
list_item = this.trans_list; list_item = this.trans_list;
} }
list_item.forEach((item) => { list_item.forEach((item) => {

Loading…
Cancel
Save