大屏园区企业

pull/123/head
lukeyan 1 year ago
parent e46ceceecb
commit 42f91f5d8d

28
package-lock.json generated

@ -16,6 +16,7 @@
"echarts": "^5.4.2", "echarts": "^5.4.2",
"echarts-gl": "^2.0.9", "echarts-gl": "^2.0.9",
"element-ui": "^2.15.13", "element-ui": "^2.15.13",
"highcharts-vue": "^1.4.3",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
"less": "3.9.0", "less": "3.9.0",
"less-loader": "7", "less-loader": "7",
@ -8507,6 +8508,21 @@
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/highcharts": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.1.0.tgz",
"integrity": "sha512-vhmqq6/frteWMx0GKYWwEFL25g4OYc7+m+9KQJb/notXbNtIb8KVy+ijOF7XAFqF165cq0pdLIePAmyFY5ph3g==",
"peer": true
},
"node_modules/highcharts-vue": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/highcharts-vue/-/highcharts-vue-1.4.3.tgz",
"integrity": "sha512-qIy9EFuLIgOw+reNkTvu0pvMBcSE0BAPtONAqZoEl0qaAIpGxiyXqhRNPDufWieSC0YlybpCznxE8EK19Kcg+A==",
"peerDependencies": {
"highcharts": ">=5.0.0",
"vue": ">=1.0.0"
}
},
"node_modules/highlight.js": { "node_modules/highlight.js": {
"version": "10.7.3", "version": "10.7.3",
"resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz", "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz",
@ -22464,6 +22480,18 @@
"integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==",
"dev": true "dev": true
}, },
"highcharts": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.1.0.tgz",
"integrity": "sha512-vhmqq6/frteWMx0GKYWwEFL25g4OYc7+m+9KQJb/notXbNtIb8KVy+ijOF7XAFqF165cq0pdLIePAmyFY5ph3g==",
"peer": true
},
"highcharts-vue": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/highcharts-vue/-/highcharts-vue-1.4.3.tgz",
"integrity": "sha512-qIy9EFuLIgOw+reNkTvu0pvMBcSE0BAPtONAqZoEl0qaAIpGxiyXqhRNPDufWieSC0YlybpCznxE8EK19Kcg+A==",
"requires": {}
},
"highlight.js": { "highlight.js": {
"version": "10.7.3", "version": "10.7.3",
"resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz", "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz",

@ -16,6 +16,7 @@
"echarts": "^5.4.2", "echarts": "^5.4.2",
"echarts-gl": "^2.0.9", "echarts-gl": "^2.0.9",
"element-ui": "^2.15.13", "element-ui": "^2.15.13",
"highcharts-vue": "^1.4.3",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
"less": "3.9.0", "less": "3.9.0",
"less-loader": "7", "less-loader": "7",

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

@ -17,6 +17,12 @@ export default {
visible: false, visible: false,
}; };
}, },
methods:{
//
opne_dialog() {
},
},
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

@ -1,6 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import App from './App.vue' import App from './App.vue'
import ElementUI from 'element-ui'; import ElementUI from 'element-ui';
import HighchartsVue from 'highcharts-vue'
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
import router from './router' import router from './router'
import store from './store' import store from './store'
@ -9,7 +10,8 @@ import erupload from "./components/upload";
import lkyTable from "./components/publicModule/lkyTable" // 本组件样式包含普通表格、分页 import lkyTable from "./components/publicModule/lkyTable" // 本组件样式包含普通表格、分页
import lkyPagination from "./components/publicModule/lkyPagination" // 本组件单独抽离分页样式 import lkyPagination from "./components/publicModule/lkyPagination" // 本组件单独抽离分页样式
Vue.use(ElementUI); Vue.use(ElementUI);
Vue.use(Message) Vue.use(Message);
Vue.use(HighchartsVue)
Vue.component('erupload', erupload) Vue.component('erupload', erupload)
Vue.component('lkyTable', lkyTable) Vue.component('lkyTable', lkyTable)
Vue.component('lkyPagination',lkyPagination) Vue.component('lkyPagination',lkyPagination)

@ -18,11 +18,16 @@ const routes = [
name: 'home', name: 'home',
component: () => import('@/views/head'), component: () => import('@/views/head'),
children: [ children: [
// 待用首页
{
path: 'compositeIndex',
name: 'compositeIndex',
component: () => import('@/views/compositeIndex'),
},
{ {
path: 'enterpriseArchives', path: 'enterpriseArchives',
name: 'enterpriseArchives', name: 'enterpriseArchives',
component: () => import('@/views/enterpriseArchives'), component: () => import('@/views/enterpriseArchives'),
}, },
{ {
path: 'archives', path: 'archives',

@ -3,7 +3,7 @@
<div class="topZS"></div> <div class="topZS"></div>
<div class="title"> <div class="title">
企业员工<span>{{ total }}</span 企业员工<span>{{ total }}</span
> >)
</div> </div>
<el-form :model="formInline" class="search"> <el-form :model="formInline" class="search">
<el-form-item label="员工姓名:" class="formItem"> <el-form-item label="员工姓名:" class="formItem">

@ -0,0 +1,309 @@
<!-- 园区企业 -->
<template>
<div class="company_num_box">
<!-- 模块标题 -->
<div class="title">
<div class="img_box">
<img src="@/assets/safetyIndex/装饰009991.png" alt="" />
</div>
<div class="title_text">园区企业</div>
</div>
<!-- 企业数量 -->
<div class="company_num_box_body">
<div class="company_num_box_body_item">
<div class="num_green">
{{ statisticsAlarmData.safeSum }}
</div>
<div class="type">平安企业</div>
</div>
<div class="company_num_box_body_item">
<div class="num_orange">
{{ statisticsAlarmData.companySum }}
</div>
<div class="type">石化企业</div>
</div>
<div class="company_num_box_body_item">
<div class="num_red">
{{ statisticsAlarmData.alarmSum }}
</div>
<div class="type">预警企业</div>
</div>
</div>
<!-- 剧毒易制爆等四种企业展示 -->
<div class="company_danger">
<!-- 横向柱状图 -->
<div class="company_danger_charts" id="company_danger_charts"></div>
<!-- 占比 -->
<div class="company_proportion">
<div class="proportion_text">
<div class="proportion_text_item">占比</div>
<div class="proportion_text_item">占比</div>
<div class="proportion_text_item">占比</div>
<div class="proportion_text_item">占比</div>
</div>
<div class="proportion_value">
<div class="proportion_value_item">{{ this.proportion_list[0] }}</div>
<div class="proportion_value_item">{{ this.proportion_list[1] }}</div>
<div class="proportion_value_item">{{ this.proportion_list[2] }}</div>
<div class="proportion_value_item">{{ this.proportion_list[3] }}</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { statisticsAlarm, statisticsDanger } from "@/api/safetyIndex";
import * as echarts from "echarts";
export default {
name: "CompanyNum",
data() {
return {
statisticsAlarmData: {},
statisticsDangerData: [],
y_data: [], // y
chart_data: [], // chart
proportion_list: [], //
};
},
created() {
this.getStatisticsAlarm();
this.getstatisticsDanger();
},
// mounted() {
// this.init_charts();
// },
methods: {
//
getStatisticsAlarm() {
statisticsAlarm().then((res) => {
this.statisticsAlarmData = res.data;
});
},
//
getstatisticsDanger() {
statisticsDanger().then((res) => {
this.statisticsDangerData = res.data;
let all_company_num = this.statisticsDangerData
.map((item) => item.companyTypeSum)
.slice(0, 4);
let sum = 0;
for (let i = 0; i < all_company_num.length; i++) {
sum += all_company_num[i];
}
console.log(sum);
for (let i = 0; i < all_company_num.length; i++) {
this.proportion_list.push(
Math.round((Number(all_company_num[i]) / Number(sum)) * 10000) /
100 +
"%"
);
}
this.init_charts();
});
},
init_charts() {
// y
this.y_data = this.statisticsDangerData
.map((item) => item.companyTypeName)
.slice(0, 4);
// chart
this.chart_data = this.statisticsDangerData
.map((item) => item.companyTypeSum)
.slice(0, 4);
let danger_charts = document.getElementById("company_danger_charts");
let myChart = echarts.init(danger_charts);
let option = {
grid: {
top: "15%",
left: "3%",
right: "10%",
bottom: "3%",
containLabel: true, //
},
xAxis: {
type: "value",
splitLine: {
//线线
show: false,
},
axisLabel: {
color: "#fff",
},
},
yAxis: {
type: "category",
data: this.y_data,
inverse: true, //
axisLabel: {
color: "#fff",
},
axisLine: {
show: false, // 线
},
axisTick: {
show: false, // 线
},
},
series: [
{
data: this.chart_data,
type: "bar",
showBackground: true,
itemStyle: {
color: {
colorStops: [
{
offset: 0,
color: "#203e3a", // 0%
},
{
offset: 1,
color: "#326e57", // 100%
},
],
},
},
backgroundStyle: {
color: "rgba(180, 180, 180, 0.2)",
},
label: {
show: true,
position: "right",
color: "white",
},
},
],
};
option && myChart.setOption(option);
},
},
};
</script>
<style lang="less" scoped>
.company_num_box {
margin-top: 10px;
margin-left: 20px;
width: 24vw;
height: 28vh;
// border: 0.1px solid #495e70;
background: url("~@/assets/safetyIndex/homescreen03.png") no-repeat;
background-size: 100% 100%;
/* 盒子标题 */
.title {
width: 24vw;
height: 2.7vh;
display: flex;
font-size: 16px;
color: #d9e7ff;
font-weight: 500;
/* 图片盒子 */
.img_box {
width: 1.5vw;
height: 2.7vh;
display: flex;
justify-content: center;
align-items: center;
img {
width: 16px;
height: 16px;
}
}
.title_text {
width: 4vw;
height: 2.7vh;
line-height: 2.7vh;
}
}
.company_num_box_body {
margin-top: 1vh;
width: 24vw;
height: 8vh;
display: flex;
justify-content: space-around;
.company_num_box_body_item {
width: 6vw;
height: 8vh;
background: url("~@/assets/safetyIndex/back002.png") no-repeat;
background-size: 100% 100%;
.num_green {
width: 6vw;
height: 5vh;
line-height: 5vh;
color: #32d9ae;
font-size: 46px;
font-weight: 700;
text-align: center;
}
.num_orange {
width: 6vw;
height: 5vh;
line-height: 5vh;
color: #ff6600;
font-size: 46px;
font-weight: 700;
text-align: center;
}
.num_red {
width: 6vw;
height: 5vh;
line-height: 5vh;
color: #e11e1e;
font-size: 46px;
font-weight: 700;
text-align: center;
}
.type {
font-size: 14px;
width: 6vw;
height: 3vh;
line-height: 3vh;
color: #d9e7ff;
text-align: center;
}
}
}
.company_danger {
margin-top: 1vh;
width: 24vw;
height: 15vh;
display: flex;
.company_danger_charts {
width: 18vw;
height: 15vh;
}
.company_proportion {
width: 6vw;
margin-top: 2.5vh;
height: 10vh;
display: flex;
.proportion_text {
width: 2vw;
height: 10vh;
// border: 0.1px solid #495e70;
.proportion_text_item {
width: 2vw;
height: 2.5vh;
line-height: 2.5vh;
color: #d9e7ff;
font-size: 14px;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
}
.proportion_value {
width: 4vw;
height: 10vh;
// border: 0.1px solid #495e70;
.proportion_value_item {
width: 4vw;
height: 2.5vh;
line-height: 2.5vh;
color: #d9e7ff;
font-size: 14px;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
}
}
}
}
}
</style>

@ -0,0 +1,32 @@
<!-- 综合指数 -->
<template>
<div>
<!-- 最底层地图框 -->
<div class="map_box">
<!-- 企业总量 -->
<CompanyNum ref="companyNum"></CompanyNum>
</div>
</div>
</template>
<script>
import CompanyNum from "./components/companyNum";
export default {
name: "CompositeIndex",
components: {
CompanyNum,
},
data() {
return {};
},
methods: {
},
};
</script>
<style lang="less" scoped>
.map_box {
width: 100%;
height: calc(100% - 80px);
box-sizing: border-box;
// border: 0.1px solid #495e70;
}
</style>

@ -14,6 +14,7 @@ export default {
props: ["companyInfoList", "deviceVideoInfoList"], props: ["companyInfoList", "deviceVideoInfoList"],
data() { data() {
return { return {
mapType:['BMAP_NORMAL_MAP', 'BMAP_SATELLITE_MAP'],
dongtaiPoint: [121.604192, 29.977299], dongtaiPoint: [121.604192, 29.977299],
WaringList: this.companyInfoList, WaringList: this.companyInfoList,
VideoInfoList: this.deviceVideoInfoList, VideoInfoList: this.deviceVideoInfoList,
@ -61,7 +62,7 @@ export default {
styleJson, styleJson,
}, },
}); });
console.log('mapppp',map);
// console.log(this.WaringList, 'waringList'); // console.log(this.WaringList, 'waringList');
let that = this; let that = this;
map.centerAndZoom( map.centerAndZoom(
@ -71,6 +72,7 @@ export default {
map.setMinZoom(12); map.setMinZoom(12);
map.setMaxZoom(19); map.setMaxZoom(19);
map.enableScrollWheelZoom(true); map.enableScrollWheelZoom(true);
// map.setMapType(this.mapType[1]);
// hjrequest({ // hjrequest({
// url: '/yc/dt/statistical/village', // url: '/yc/dt/statistical/village',
// method: 'get', // method: 'get',

@ -2,7 +2,7 @@
<div class="mainHD"> <div class="mainHD">
<div class="topHeader"> <div class="topHeader">
<div class="iconbg"> <div class="iconbg">
<img src="../assets/companyFile/police.png" style="width: 42px;height: 42px" /> <img src="../assets/companyFile/police.png" style="width: 60px;height: 60px" />
</div> </div>
<div class="headText">镇海平安企业园区</div> <div class="headText">镇海平安企业园区</div>
<el-menu <el-menu

@ -0,0 +1,317 @@
<template>
<div class="mainHD">
<div class="topHeader">
<!-- 首页标题 -->
<div class="safe_title" @mouseenter="handle_mouse_enter">
<div class="iconbg">
<img
src="../assets/companyFile/police.png"
style="width: 60px; height: 60px"
/>
</div>
<div class="headText">镇海平安企业园区</div>
</div>
<div class="jingGuan">
<div class="jgtx" @click="check_user">
<img src="../assets/companyFile/12110.png" />
</div>
&nbsp;&nbsp; 王警官
</div>
<div class="user_box" v-show="user_show">
<div class="user_box_body">
<!-- 用户个人中心 -->
<div class="user_center">修改密码</div>
<!-- 用户退出登录 -->
<div class="user_check_login" @click="logout">退</div>
</div>
</div>
</div>
<div class="menu_box" v-show="menu_show">
<div class="menu_item">
<el-menu
:default-active="activeIndex"
class="el-menu-demo topMenu"
mode="horizontal"
@select="handleSelect"
:router="true"
>
<div class="shu"></div>
<el-menu-item index="1" route="/home/safetyIndex"
>综合指数</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="6" route="/home/applySupermarket"
>安商惠企</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="2" route="/home/realtimeWarning"
>实时预警</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="3" route="/home/closeLoopDispose"
>闭环处置</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="4" route="/home/factorResources"
>要素资源</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="5" route="/home/enterpriseArchives"
>企业档案</el-menu-item
>
<div class="shu"></div>
<el-menu-item index="7" route="/home/systemManagement/safeIndex"
>系统管理</el-menu-item
>
<div class="shu"></div>
</el-menu>
</div>
</div>
<router-view />
</div>
</template>
<script>
export default {
name: "Head",
data() {
return {
activeIndex: "1",
activeIndex2: "1",
user_show: false,
menu_show: false,
};
},
created() {
// 3201000563646357
this.activeIndex = sessionStorage.getItem("activeIndex")
? sessionStorage.getItem("activeIndex")
: "1";
},
methods: {
handleSelect(key) {
sessionStorage.setItem("activeIndex", key);
},
// 退
check_user() {
if (this.user_show) {
this.user_show = false;
} else {
this.user_show = true;
}
},
//
handle_mouse_enter() {
this.menu_show = true;
},
// 退
logout() {
// token
window.sessionStorage.clear();
//
this.$router.push("/login");
},
},
};
</script>
<style lang="less" scoped>
.mainHD {
width: 100%;
height: 100%;
position: relative;
}
.topHeader {
width: 100%;
height: 80px;
background: url("~@/assets/companyFile/导航栏上.png") no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
.iconbg {
height: 35px;
width: 50px;
margin: 0 25px;
// background: url("~@/assets/companyFile/2111.png") no-repeat;
// background-size: 100% 100%;
display: flex;
justify-content: center;
align-items: center;
.img {
height: 35px;
width: 50px;
}
}
.safe_title {
display: flex;
margin: 0 auto;
cursor: pointer;
}
.headText {
font-family: YouSheBiaoTiHei;
font-size: 38px;
color: #edf6ff;
letter-spacing: 4px;
text-shadow: 0 8px 8px rgba(0, 0, 0, 0.3);
font-weight: 400;
margin-right: 30px;
}
.jingGuan {
position: absolute;
right: 30px;
display: flex;
color: #edf6ff;
align-items: center;
.jgtx {
width: 40px;
height: 40px;
background: url("~@/assets/companyFile/矩形21112222.png") no-repeat;
background-size: 100% 100%;
cursor: pointer;
img {
width: 40px;
height: 40px;
}
}
}
.user_box {
position: absolute;
top: 70px;
right: 10px;
width: 180px;
height: 100px;
// border: 0.1px solid #33cccc;
padding: 10px;
background: url("~@/assets/archives/023.png") no-repeat;
background-size: 100% 100%;
z-index: 2;
.user_box_body {
width: 160px;
height: 80px;
// border: 0.1px solid #33cccc;
}
.user_center {
width: 160px;
height: 40px;
color: #d9e7ff;
text-align: center;
line-height: 40px;
cursor: pointer;
}
.user_check_login {
width: 160px;
height: 40px;
color: #d9e7ff;
text-align: center;
line-height: 40px;
cursor: pointer;
}
.user_center:hover,
.user_center:focus {
text-shadow: 0 0 20px rgba(21, 255, 198, 0.64);
}
.user_check_login:hover,
.user_check_login:focus {
text-shadow: 0 0 20px rgba(21, 255, 198, 0.64);
}
}
}
/* 导航盒子 */
.menu_box {
width: 100%;
height: 60px;
border: 0.1px solid #d9e7ff;
position: absolute;
top: 80px;
z-index: 10;
.menu_item {
/deep/.el-menu {
border: 0;
background-color: rgba(0, 0, 0, 0);
display: flex;
align-items: center;
width: 1102px;
margin: 0 auto;
.el-menu-item {
width: 130px;
height: 35px;
display: flex;
justify-content: center;
align-items: center;
padding: 10px 20px;
background: url("~@/assets/companyFile/Rectangle Copy 4.png") no-repeat;
background-size: 100% 100%;
font-size: 16px;
color: #d9e7ff;
letter-spacing: 3px;
text-align: center;
font-weight: 400;
}
.shu {
border-left: 1px solid rgba(217, 231, 255, 0.4);
width: 0;
height: 24px;
margin: 0 10px;
}
.is-active {
background: url("~@/assets/companyFile/891772.png") no-repeat;
background-size: 100% 100%;
}
/deep/.el-menu {
border: 0;
background-color: rgba(0, 0, 0, 0);
display: flex;
align-items: center;
.el-menu-item {
width: 100px;
height: 35px;
display: flex;
justify-content: center;
align-items: center;
padding: 10px 20px;
background: url("~@/assets/companyFile/Rectangle Copy 4.png") no-repeat;
background-size: 100% 100%;
font-size: 16px;
color: #d9e7ff;
letter-spacing: 3px;
text-align: center;
font-weight: 400;
}
.shu {
border-left: 1px solid rgba(217, 231, 255, 0.4);
width: 0;
height: 24px;
margin: 0 10px;
}
.is-active {
background: url("~@/assets/companyFile/891771.png") no-repeat;
background-size: 100% 100%;
}
.el-menu-item.is-active {
border: 0 !important;
}
}
}
}
}
</style>

@ -7,6 +7,8 @@
:pageNum="pageNum" :pageNum="pageNum"
:total="total" :total="total"
:pagination_width="pagination_width" :pagination_width="pagination_width"
@size_change="size_change"
@num_change="num_change"
></lkyPagination> ></lkyPagination>
</div> </div>
</template> </template>

@ -243,6 +243,7 @@ export default {
}, },
getstatisticsDanger() { getstatisticsDanger() {
statisticsDanger().then((res) => { statisticsDanger().then((res) => {
console.log('ressss',res.data);
this.statisticsDangerData = res.data; this.statisticsDangerData = res.data;
}); });
}, },

16474
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save