pull/28/head
xuhaoyun 1 year ago
parent 5df3be065f
commit 854d23fce5

@ -13,6 +13,8 @@
"cookie": "^0.5.0",
"copy-webpack-plugin": "4.6.0",
"core-js": "^3.6.5",
"echarts": "^5.4.2",
"echarts-gl": "^2.0.9",
"element-ui": "^2.15.13",
"js-cookie": "^3.0.1",
"less": "3.9.0",

@ -7,3 +7,35 @@ export function staffStatistics(params) {
params
})
}
//企业员工详情
export function staffDetail(params) {
return request({
url: '/safety/index/staff/detail',
method: 'post',
params
})
}
//企业访客统计
export function visitStatistics(params) {
return request({
url: '/safety/index/visit/statistics',
method: 'post',
params
})
}
//企业访客详情
export function visitDetail(params) {
return request({
url: '/safety/index/visit/detail',
method: 'post',
params
})
}
//企业访客详情
export function flowDetail(params) {
return request({
url: '/safety/index/flow/detail',
method: 'post',
params
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1007 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

@ -184,8 +184,8 @@
<kakou :companyID="companyID" ref="child2-2" v-if="companyID"></kakou>
<yujing :companyID="companyID" ref="child2-3" v-if="companyID"></yujing>
<qiyeyuangong :companyID="companyID" ref="child3-1" v-if="companyID"></qiyeyuangong>
<!-- <liudongrenyuan :companyID="companyID" ref="child3-2" v-if="companyID"></liudongrenyuan>
<fangke :companyID="companyID" ref="child3-3" v-if="companyID"></fangke> -->
<liudongrenyuan :companyID="companyID" ref="child3-2" v-if="companyID"></liudongrenyuan>
<fangke :companyID="companyID" ref="child3-3" v-if="companyID"></fangke>
<car :companyID="companyID" ref="child4" v-if="companyID"></car>
<wupin :companyID="companyID" ref="child5" v-if="companyID"></wupin>
<anjian :companyID="companyID" ref="child6" v-if="companyID"></anjian>
@ -205,8 +205,8 @@ import car from './car.vue'
import wupin from './wupin.vue'
import anjian from './anjian.vue'
import qiyeyuangong from './qiyeyuangong.vue'
// import liudongrenyuan from './liudongrenyuan.vue'
// import fangke from './fangke.vue'
import liudongrenyuan from './liudongrenyuan.vue'
import fangke from './fangke.vue'
export default {
components: {
monitor,
@ -216,8 +216,8 @@ export default {
wupin,
anjian,
qiyeyuangong,
// liudongrenyuan,
// fangke
liudongrenyuan,
fangke
},
data() {
return {

@ -12,7 +12,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="身份证号:" class="formItem" v-if="activeName == 'first'">
<el-input v-model.trim="formInline.deviceName" class="formIpt"></el-input>
<el-input v-model.trim="formInline.idcard" class="formIpt"></el-input>
</el-form-item>
<el-form-item label="姓名:" class="formItem" v-if="activeName == 'first'">
<el-input v-model.trim="formInline.userName" class="formIpt"></el-input>

@ -1,16 +1,7 @@
<template>
<div class="main">
<div class="leftBox">
<div class="qyyg">
<div class="title"><img src="../../assets/safetyIndex/装饰009991.png" alt="">企业员工</div>
<div class="zongshu">
<div class="text4">员工总数</div>
<div class="numberTotal"><span>12345</span></div>
</div>
<div class="ygtb" id="ygtb">
</div>
</div>
<yuangong></yuangong>
<div class="qycl">
</div>
@ -22,23 +13,17 @@
</template>
<script>
import { staffStatistics } from '@/api/safetyIndex'
import yuangong from './yuangong.vue'
export default {
components: {
yuangong
},
data() {
return {
staffStatisticsList: [],
}
},
created() {
this.getstaffStatistics()
},
methods: {
getstaffStatistics() {
staffStatistics().then(res => {
this.staffStatisticsList = res.data
})
}
},
}
</script>
@ -56,74 +41,6 @@ export default {
height: 100%;
.qyyg {
height: 32.14%;
width: 100%;
margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat;
background-size: 100% 100%;
.title {
width: 100%;
height: 33px;
background: url('~@/assets/safetyIndex/标题样式.png') no-repeat;
background-size: 100% 100%;
font-size: 16px;
color: #D9E7FF;
letter-spacing: 1px;
text-align: center;
font-weight: 500;
display: flex;
align-items: center;
img {
width: 16px;
height: 16px;
margin: 0 12px;
}
}
.zongshu {
width: 400px;
height: 33px;
margin: 12px 20px;
background: url('~@/assets/safetyIndex/7691.png') no-repeat;
background-size: 100% 100%;
display: flex;
justify-content: space-around;
align-items: center;
.text4 {
font-size: 16px;
color: #D0DEEE;
letter-spacing: 0;
text-align: center;
line-height: 16px;
font-weight: 400;
}
.numberTotal {
font-size: 12px;
color: #EBF9FF;
letter-spacing: 1.5px;
font-weight: 400;
span {
font-size: 20px;
color: #EBFFF8;
letter-spacing: 2.5px;
line-height: 37px;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
font-weight: 700;
}
}
}
.ygtb {
height: calc(100% - 90px);
width: 100%;
}
}
.qycl {
height: 22.9%;
@ -134,7 +51,7 @@ export default {
}
.qywp {
height: 40.56%;
height: 37.56%;
width: 100%;
margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat;

@ -0,0 +1,540 @@
<template>
<div class="qyyg">
<div class="title"><img src="../../assets/safetyIndex/装饰009991.png" alt="">企业员工</div>
<div class="zongshu" @click="showVisible()">
<div class="text4">员工总数</div>
<div class="numberTotal"><span>{{ listTotal.number }}</span></div>
</div>
<div class="ygtb" id="ygtb">
</div>
<div class="bottomBtns">
<div class="fangke" @click="showfangkeVisible()">
<div class="iconBox"><img src="../../assets/safetyIndex/访客icon.png" alt=""></div>
<div class="iconNum">
<div class="iconName">访客</div>
<div class="number1">1200</div>
</div>
</div>
<div class="fangke" @click="showliudongVisible()">
<div class="iconBox"><img src="../../assets/safetyIndex/流动人员icon.png" alt=""></div>
<div class="iconNum">
<div class="iconName">流动人员</div>
<div class="number1">700</div>
</div>
</div>
</div>
<el-dialog title="详情" :visible.sync="diaVisible" class="picForm">
<el-table :cell-style="{ background: 'revert' }" :data="staffDetailList" class="table"
style="width: calc(100% - 40px); margin:0 20px;" :row-style="tableRowStyle"
:header-row-style="tableHeaderColor" :header-cell-style="tableHeaderCellColor">
<el-table-column show-overflow-tooltip label="照片" width="50">
<template slot-scope="scope">
<img :src="scope.row.picUrl" alt="" class="staffPic">
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="staffName" label="姓名" width="90">
</el-table-column>
<el-table-column show-overflow-tooltip prop="identityId" label="身份证号" width="160">
</el-table-column>
<el-table-column show-overflow-tooltip prop="homeAddress" label="家庭住址">
</el-table-column>
<el-table-column show-overflow-tooltip prop="companyName" label="所属企业">
</el-table-column>
</el-table>
<div class="block">
<el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true"
@size-change="SizeChange" @current-change="CurrentChange" :current-page="detailpageNum"
:page-sizes="[8]" layout="total, sizes, prev, pager, next, jumper" :total="detailtotal">
</el-pagination>
</div>
</el-dialog>
<el-dialog title="访客详情" :visible.sync="fangkeVisible" class="fangkeForm">
<el-table :cell-style="{ background: 'revert' }" :data="fangkeList" class="table"
style="width: calc(100% - 40px); margin:0 20px;" :row-style="tableRowStyle"
:header-row-style="tableHeaderColor" :header-cell-style="tableHeaderCellColor">
<el-table-column show-overflow-tooltip label="照片" width="50">
<template slot-scope="scope">
<img :src="scope.row.picUrl" alt="" class="staffPic">
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="visitName" label="访客姓名" width="90">
</el-table-column>
<el-table-column show-overflow-tooltip prop="identityId" label="身份证号">
</el-table-column>
<el-table-column show-overflow-tooltip prop="visitContactInfo" label="联系方式">
</el-table-column>
<el-table-column show-overflow-tooltip prop="visitTime" label="访问时间">
</el-table-column>
<el-table-column show-overflow-tooltip prop="contactPerson" label="对接人" width="90">
</el-table-column>
<el-table-column show-overflow-tooltip prop="contactInfo" label="对接人联系方式">
</el-table-column>
</el-table>
<div class="block">
<el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true"
@size-change="fangkeSizeChange" @current-change="fangkeCurrentChange" :current-page="fangkepageNum"
:page-sizes="[8]" layout="total, sizes, prev, pager, next, jumper" :total="fangketotal">
</el-pagination>
</div>
</el-dialog>
<el-dialog title="流动人员详情" :visible.sync="liudongVisible" class="picForm">
<el-table :cell-style="{ background: 'revert' }" :data="liudongList" class="table"
style="width: calc(100% - 40px); margin:0 20px;" :row-style="tableRowStyle"
:header-row-style="tableHeaderColor" :header-cell-style="tableHeaderCellColor">
<el-table-column show-overflow-tooltip label="照片" width="50">
<template slot-scope="scope">
<img :src="scope.row.picUrl" alt="" class="staffPic">
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="flowName" label="姓名" width="90">
</el-table-column>
<el-table-column show-overflow-tooltip prop="identityId" label="身份证号" width="160">
</el-table-column>
<el-table-column show-overflow-tooltip prop="contactInfo" label="联系方式">
</el-table-column>
<el-table-column show-overflow-tooltip prop="companyName" label="所属企业">
</el-table-column>
</el-table>
<div class="block">
<el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true"
@size-change="liudongSizeChange" @current-change="liudongCurrentChange" :current-page="liudongpageNum"
:page-sizes="[8]" layout="total, sizes, prev, pager, next, jumper" :total="liudongtotal">
</el-pagination>
</div>
</el-dialog>
</div>
</template>
<script>
import * as echarts from 'echarts';
import "echarts-gl";
import { staffStatistics, staffDetail, visitDetail, flowDetail } from '@/api/safetyIndex'
export default {
data() {
return {
staffStatisticsList: [],
staffDetailList: [],
listTotal: {},
diaVisible: false,
DetailpageSize: 8,
detailpageNum: 1,
detailtotal: 0,
fangkeVisible: false,
fangkepageSize: 8,
fangkepageNum: 1,
fangketotal: 0,
fangkeList: [],
liudongList: [],
liudongVisible: false,
liudongpageSize: 8,
liudongpageNum: 1,
liudongtotal: 0,
}
},
created() {
this.getstaffStatistics()
},
methods: {
getstaffStatistics() {
staffStatistics().then(res => {
this.staffStatisticsList = res.data.filter(item => {
return item.type != '全部'
})
this.listTotal = res.data.filter(item => {
return item.type == '全部'
})[0]
this.initygtb()
})
},
initygtb() {
let myChart = echarts.init(document.getElementById("ygtb"));
const colors = ['#66C3FF', '#FEF699', '#19F7C3', '#E4FEF0', '#ADF1FF']
let data = []
this.staffStatisticsList.forEach((item, index) => {
data.push({
value: item.number, name: item.type, itemStyle: { color: colors[index], }
})
})
let option = {
tooltip: {
trigger: 'item'
},
legend: {
top: '20%',
right: '5%',
padding: [5, 10],
itemWidth: 6,
itemHeight: 6,
backgroundColor: 'rgba(108,128,151,0.2)',
textStyle: {
rich: {
a: {
color: "#D0DEEE",
lineHeight: 10,
padding: [3, 0, 3, 0],
width: 120,
height: 20,
},
b: {
color: "#FFFFF",
fontSize: 18,
fontWeight: 700,
padding: [3, 0, 3, 0],
width: 120,
height: 20,
},
},
},
formatter: function (name) {
var percent = 0;
for (var i = 0; i < data.length; i++) {
if (data[i].name == name) {
percent = data[i].value
}
}
return "{a|" + name + "}" + "{b|" + percent + "}";
},
},
graphic: [{
type: 'image', //
style: {
image: require('../../assets/safetyIndex/89771.png'), // require
width: 90, //
height: 90
},
//
top: "22.8%",
left: "9.3%",
},],
backgroundColor: 'rgba(255,255,255,0)',
series: [
{
type: 'pie',
radius: ['55%', '70%'],
top: "middle",
left: "left",
width: 190,
height: 190,
center: ['45%', '50%'],
itemStyle: {
borderRadius: 0,
borderColor: 'rgba(255,255,255,0)',
borderWidth: 5
},
label: {
show: false,
position: 'center'
},
data
}
]
};
option && myChart.setOption(option);
},
tableRowStyle({ rowIndex }) {
if ((rowIndex + 1) % 2 == 1) {
return { 'background': 'rgba(0,0,0,0)', 'color': '#fff', 'border': '0' }
} else {
return { 'background': 'rgba(61, 85, 102, 0.16)', 'border': '0', 'color': '#fff' }
}
},
tableHeaderColor() {
return { 'background': 'linear-gradient( rgba(38, 88, 76, 0.6) 100%, rgba(55, 131, 128, 0.6) 100%, rgba(34, 74, 53, 0.46) 46%)' }
// return { 'background': 'url("~@/assets/archives/9910.png") no-repeat;', 'background-size': '100% 100%;', 'color': '#fff' }
},
tableHeaderCellColor() {
return { 'background': 'rgba(0,0,0,0)', 'border': '0', 'color': '#fff' }
},
SizeChange(val) {
this.detailpageNum = 1;
this.DetailpageSize = val;
this.showVisible()
},
CurrentChange(val) {
this.detailpageNum = val;
this.showVisible()
},
fangkeSizeChange(val) {
this.fangkepageNum = 1;
this.fangkepageSize = val;
this.showfangkeVisible()
},
fangkeCurrentChange(val) {
this.fangkepageNum = val;
this.showfangkeVisible()
},
liudongSizeChange(val) {
this.liudongpageNum = 1;
this.liudongpageSize = val;
this.showliudongVisible()
},
liudongCurrentChange(val) {
this.liudongpageNum = val;
this.showliudongVisible()
},
showVisible() {
staffDetail({ pageSize: this.DetailpageSize, pageNum: this.detailpageNum }).then(res => {
this.staffDetailList = res.data
this.detailtotal = res.total
this.diaVisible = true
})
},
showliudongVisible() {
flowDetail({ pageSize: this.liudongpageSize, pageNum: this.liudongpageNum }).then(res => {
this.liudongList = res.data
this.liudongtotal = res.total
this.liudongVisible = true
})
},
showfangkeVisible() {
visitDetail({ pageSize: this.fangkepageSize, pageNum: this.fangkepageNum }).then(res => {
this.fangkeList = res.data
this.fangketotal = res.total
this.fangkeVisible = true
})
}
},
}
</script>
<style lang="less" scoped>
.qyyg {
height: 290px;
width: 100%;
margin-bottom: 20px;
background: url('~@/assets/safetyIndex/主屏板块1.png') no-repeat;
background-size: 100% 100%;
.title {
width: 100%;
height: 33px;
background: url('~@/assets/safetyIndex/标题样式.png') no-repeat;
background-size: 100% 100%;
font-size: 16px;
color: #D9E7FF;
letter-spacing: 1px;
text-align: center;
font-weight: 500;
display: flex;
align-items: center;
img {
width: 16px;
height: 16px;
margin: 0 12px;
}
}
.zongshu {
width: 400px;
height: 33px;
margin: 12px 20px;
background: url('~@/assets/safetyIndex/7691.png') no-repeat;
background-size: 100% 100%;
display: flex;
justify-content: space-around;
align-items: center;
cursor: pointer;
.text4 {
font-size: 16px;
color: #D0DEEE;
letter-spacing: 0;
text-align: center;
line-height: 16px;
font-weight: 400;
}
.numberTotal {
font-size: 12px;
color: #EBF9FF;
letter-spacing: 1.5px;
font-weight: 400;
span {
font-size: 20px;
color: #EBFFF8;
letter-spacing: 2.5px;
line-height: 37px;
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
font-weight: 700;
}
}
}
.ygtb {
height: calc(100% - 130px);
width: 100%;
}
.bottomBtns {
height: 37px;
width: 70%;
margin: 0 auto;
display: flex;
justify-content: space-around;
background: url('~@/assets/safetyIndex/7691备份.png') no-repeat;
background-size: 100% 100%;
padding: 4px;
box-sizing: border-box;
.fangke {
width: 50%;
height: 100%;
display: flex;
justify-content: center;
cursor: pointer;
.iconBox {
background: url('~@/assets/safetyIndex/Target 03_00000.png') no-repeat;
background-size: 100% 100%;
height: 33px;
width: 33px;
display: flex;
justify-content: center;
align-items: center;
}
.iconNum {
margin-left: 10px;
width: 40%;
height: 33px;
.iconName {
width: 100%;
height: 50%;
font-size: 13px;
color: rgba(255, 255, 255, 0.8);
letter-spacing: 0;
vertical-align: middle;
font-weight: 500;
}
.number1 {
width: 100%;
height: 50%;
font-size: 15px;
color: #FFFFFF;
letter-spacing: 1px;
line-height: 22px;
vertical-align: middle;
font-weight: 700;
}
}
}
.fangke:last-child {
border-left: 1px solid #6C8097;
}
}
}
.picForm {
/deep/ .el-dialog {
background-color: rgba(0, 0, 0, 0);
background: url('~@/assets/head/编组 3021112.png') no-repeat;
background-size: 100% 100%;
width: 841px;
height: 640px;
position: relative;
.el-dialog__title {
font-size: 16px;
color: #EBFFF4;
letter-spacing: 2px;
text-shadow: 0 0 9px rgba(21, 255, 195, 0.77);
font-weight: 400;
}
.el-dialog__body {
box-sizing: border-box;
height: 360px;
.scopeQuantity {
letter-spacing: 2px;
}
}
}
}
.fangkeForm {
/deep/ .el-dialog {
background-color: rgba(0, 0, 0, 0);
background: url('~@/assets/head/编组 3021112.png') no-repeat;
background-size: 100% 100%;
width: 1241px;
height: 640px;
position: relative;
.el-dialog__title {
font-size: 16px;
color: #EBFFF4;
letter-spacing: 2px;
text-shadow: 0 0 9px rgba(21, 255, 195, 0.77);
font-weight: 400;
}
.el-dialog__body {
box-sizing: border-box;
height: 360px;
.scopeQuantity {
letter-spacing: 2px;
}
}
}
}
/deep/.el-table {
background: rgba(0, 0, 0, 0);
td.el-table__cell {
border: 0;
}
.xiangqing {
background: rgba(0, 0, 0, 0);
border: 0;
color: rgba(48, 196, 255, 0.7);
cursor: pointer;
}
.staffPic {
width: 19px;
height: 25px;
}
}
/deep/.el-input__inner {
// background: url('~@/assets/companyFile/2121.png') no-repeat;
background: url('~@/assets/companyFile/矩形备份 18.png') no-repeat;
background-size: 100% 100%;
border: 1px solid rgba(40, 132, 126, 1);
color: rgba(234, 246, 255, 0.7);
;
.el-range-separator {
color: #ccc;
}
.el-range-input {
background: rgba(0, 0, 0, 0);
color: #ccc;
}
}
</style>

@ -2575,6 +2575,11 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
claygl@^1.2.1:
version "1.3.0"
resolved "https://registry.npmmirror.com/claygl/-/claygl-1.3.0.tgz#7a6e2903210519ac358848f5d78070ed211685f3"
integrity sha512-+gGtJjT6SSHD2l2yC3MCubW/sCV40tZuSs5opdtn79vFSGUgp/lH139RNEQ6Jy078/L0aV8odCw8RSrUcMfLaQ==
clean-css@4.2.x:
version "4.2.4"
resolved "https://registry.npmmirror.com/clean-css/-/clean-css-4.2.4.tgz"
@ -3488,6 +3493,22 @@ ecc-jsbn@~0.1.1:
jsbn "~0.1.0"
safer-buffer "^2.1.0"
echarts-gl@^2.0.9:
version "2.0.9"
resolved "https://registry.npmmirror.com/echarts-gl/-/echarts-gl-2.0.9.tgz#ee228a6c7520a6fb7bbb71ea94394f3637ade033"
integrity sha512-oKeMdkkkpJGWOzjgZUsF41DOh6cMsyrGGXimbjK2l6Xeq/dBQu4ShG2w2Dzrs/1bD27b2pLTGSaUzouY191gzA==
dependencies:
claygl "^1.2.1"
zrender "^5.1.1"
echarts@^5.4.2:
version "5.4.2"
resolved "https://registry.npmmirror.com/echarts/-/echarts-5.4.2.tgz#9f38781c9c6ae323e896956178f6956952c77a48"
integrity sha512-2W3vw3oI2tWJdyAz+b8DuWS0nfXtSDqlDmqgin/lfzbkB01cuMEN66KWBlmur3YMp5nEDEEt5s23pllnAzB4EA==
dependencies:
tslib "2.3.0"
zrender "5.4.3"
ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz"
@ -8332,6 +8353,11 @@ ts-pnp@^1.1.6:
resolved "https://registry.npmmirror.com/ts-pnp/-/ts-pnp-1.2.0.tgz"
integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==
tslib@2.3.0:
version "2.3.0"
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==
tslib@^1.9.0:
version "1.14.1"
resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz"
@ -9083,3 +9109,10 @@ yorkie@^2.0.0:
is-ci "^1.0.10"
normalize-path "^1.0.0"
strip-indent "^2.0.0"
zrender@5.4.3, zrender@^5.1.1:
version "5.4.3"
resolved "https://registry.npmmirror.com/zrender/-/zrender-5.4.3.tgz#41ffaf835f3a3210224abd9d6964b48ff01e79f5"
integrity sha512-DRUM4ZLnoaT0PBVvGBDO9oWIDBKFdAVieNWxWwK0niYzJCMwGchRk21/hsE+RKkIveH3XHCyvXcJDkgLVvfizQ==
dependencies:
tslib "2.3.0"

Loading…
Cancel
Save