<template>
|
<div class="jjPage">
|
<el-row :gutter="20">
|
<el-col :span="12">
|
<div class="rowContent first-menu" style="position: relative;">
|
<div class="rowTitle">
|
<img src="../../../public/img/bajgxt/u1618.png" />
|
<span>数据概览</span>
|
<avue-input-tree
|
class="select1"
|
default-expand-all
|
v-model="value1"
|
placeholder="请选择内容"
|
type="tree"
|
:dic="options1"
|
:props="props"
|
@change="handleNodeClick"
|
></avue-input-tree>
|
<avue-input-tree
|
class="select2"
|
default-expand-all
|
v-model="value2"
|
placeholder="请选择公司"
|
type="tree"
|
:dic="options2"
|
:props="props2"
|
@change="changeCompanys"
|
></avue-input-tree>
|
<el-button @click="toEconomicTable">进入数据统计表</el-button>
|
</div>
|
|
<div class="col-content">
|
<div class="box-card">
|
<span>社保缴纳人数</span>
|
<span>{{ socialSecurity.num }}</span>
|
<span>较上月增加{{ socialSecurity.addNum }}人</span>
|
</div>
|
<div class="box-card">
|
<span>社保缴纳总额(元)</span>
|
<span>{{ socialSecurity.money }}</span>
|
<span>较上月增加{{ socialSecurity.addMoney }}元</span>
|
</div>
|
<div class="box-card">
|
<span>公司派遣人数</span>
|
<span>{{ socialSecurity.paiQ }}</span>
|
<span>较上月增加{{ socialSecurity.addPaiQ }}人</span>
|
</div>
|
<div class="box-card">
|
<span>社保缴纳人数占比</span>
|
<span>{{ socialSecurity.sheBPerson }}</span>
|
<span>较上月上涨{{ socialSecurity.addSheBPerson }}</span>
|
</div>
|
</div>
|
</div>
|
</el-col>
|
<el-col :span="12">
|
<div class="rowContent first-menu">
|
<div class="rowTitle">
|
<img src="../../../public/img/bajgxt/yj.png" />
|
<span>预警分析</span>
|
</div>
|
|
<div class="col-content">
|
<div
|
class="box-card"
|
style="cursor: pointer; "
|
@click="showTable('sb')"
|
>
|
<span>社保缴纳预警(家)</span>
|
<span>{{ socialSecurity.num }}</span>
|
<span>社保缴纳率小于90%</span>
|
</div>
|
<div
|
class="box-card"
|
style="cursor: pointer; "
|
@click="showTable('bx')"
|
>
|
<span>保险缴纳预警(家)</span>
|
<span>{{ socialSecurity.money }}</span>
|
<span>保险缴纳率小于90%</span>
|
</div>
|
<div
|
class="box-card"
|
style="cursor: pointer; "
|
@click="showTable('fw')"
|
>
|
<span>服务合同预警(份)</span>
|
<span>{{ socialSecurity.paiQ }}</span>
|
<span>服务合同小于2份</span>
|
</div>
|
<div
|
class="box-card"
|
style="cursor: pointer; "
|
@click="showTable('pq')"
|
>
|
<span>派遣预警(家)</span>
|
<span>{{ socialSecurity.sheBPerson }}</span>
|
<span>派遣率小于50%</span>
|
</div>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="16">
|
<div class="rowContent" v-loading="loading1">
|
<span class="span-title">社保缴纳</span>
|
<div id="middleEchart1"></div>
|
</div>
|
</el-col>
|
<el-col :span="8">
|
<div class="rowContent" v-loading="loading2">
|
<span class="span-title">派遣人员占比</span>
|
<div id="middleEchart2"></div>
|
</div>
|
</el-col>
|
</el-row>
|
<el-row>
|
<el-col :span="24">
|
<div class="rowContent" v-loading="loading3">
|
<span class="span-title">服务客户数量</span>
|
<div id="bottomEchart"></div>
|
</div>
|
</el-col>
|
</el-row>
|
<el-dialog
|
class="dialog"
|
:title="gridData.title"
|
v-loading="dialogloading"
|
element-loading-text="数据加载中"
|
:visible.sync="dialogTableVisible"
|
:modal-append-to-body="false"
|
>
|
<el-table :data="gridData.data">
|
<template v-if="gridData.type === 'sb'">
|
<el-table-column :key="gridData.type" type="index"> </el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="realName"
|
label="保安公司名称"
|
:show-overflow-tooltip="true"
|
width="180"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="deptName"
|
label="所属辖区"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="sex"
|
label="保安总人数"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="cardid"
|
label="社保缴纳人数"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="age"
|
label="社保缴纳比例"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="age"
|
label="备注"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
</template>
|
<template v-if="gridData.type === 'bx'">
|
<el-table-column :key="gridData.type" type="index"> </el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="enterpriseName"
|
label="保安公司名称"
|
width="180"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="znum"
|
label="所属辖区"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="cznum"
|
label="保安总人数"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="czl"
|
label="保险缴纳人数"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="sbnum"
|
label="保险缴纳比例"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="sbl"
|
label="备注"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
</template>
|
<template v-if="gridData.type === 'fw'">
|
<el-table-column :key="gridData.type" type="index"> </el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="enterpriseName"
|
label="保安公司名称"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="znum"
|
label="所属辖区"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="cznum"
|
label="服务合同数"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="painum"
|
label="服务单位名称"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="pql"
|
label="备注"
|
:show-overflow-tooltip="true"
|
></el-table-column> </template
|
><template v-if="gridData.type === 'pq'">
|
<el-table-column :key="gridData.type" type="index"> </el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="enterpriseName"
|
label="保安公司名称"
|
width="180"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="znum"
|
label="所属辖区"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="cznum"
|
label="保安总人数"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="painum"
|
label="派遣人数"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="fwnum"
|
label="派遣比例"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
<el-table-column
|
:key="gridData.type"
|
prop="pql"
|
label="备注"
|
:show-overflow-tooltip="true"
|
></el-table-column>
|
</template>
|
</el-table>
|
<el-pagination
|
@current-change="changePage"
|
@size-change="changePage"
|
:current-page.sync="gridData.current"
|
:page-size="10"
|
layout="total, prev, pager, next, jumper"
|
:total="gridData.total"
|
>
|
</el-pagination>
|
</el-dialog>
|
</div>
|
</template>
|
|
<script>
|
import * as echarts from "echarts";
|
import echartJs from "./securityEchart.js";
|
import { lazyTreeJu, lazyTrees } from "../../api/index/index";
|
import {
|
getCompanys,
|
selectPCount,
|
selectTo,
|
queryYearSoil,
|
queryYearAn,
|
queryYearPz,
|
queryYearKh
|
} from "../../api/securityUnitOperation/securityUnitOperation";
|
export default {
|
data() {
|
return {
|
value1: "",
|
value2: "",
|
value0: "2012",
|
options0: [
|
{
|
value: "2012",
|
label: "2012年"
|
},
|
{
|
value: "2011",
|
label: "2011年"
|
},
|
{
|
value: "2010",
|
label: "2010年"
|
},
|
{
|
value: "2009",
|
label: "2009年"
|
},
|
{
|
value: "2008",
|
label: "2008年"
|
},
|
{
|
value: "2007",
|
label: "2007年"
|
}
|
],
|
options1: [],
|
options2: [],
|
socialSecurity: {
|
num: 0,
|
addNum: 0,
|
money: 0,
|
addMoney: 0,
|
paiQ: 0,
|
addPaiQ: 0,
|
sheBPerson: 0,
|
addSheBPerson: 0
|
},
|
loading1: true,
|
loading2: true,
|
loading3: true,
|
enterpriseName: "",
|
props: {
|
children: "children",
|
label: "title",
|
value: "id"
|
},
|
props2: {
|
children: "children",
|
label: "enterpriseName",
|
value: "departmentid"
|
},
|
node: {}, //选中的记录
|
gridData: {
|
data: [],
|
total: 0,
|
current: 1,
|
type: "fw",
|
title: ""
|
},
|
dialogloading: false,
|
dialogTableVisible: false
|
};
|
},
|
methods: {
|
showTable(type) {
|
this.gridData.type = type;
|
this.dialogTableVisible = true;
|
if (type === "sb") {
|
this.gridData.title = "社保缴纳预警保安公司";
|
} else if (type === "bx") {
|
this.gridData.title = "保险缴纳预警保安公司";
|
} else if (type === "fw") {
|
this.gridData.title = "服务合同预警保安公司";
|
} else if (type === "pq") {
|
this.gridData.title = "派遣预警保安公司";
|
}
|
},
|
//点击节点
|
handleNodeClick(data) {
|
this.value1 = data;
|
this.getCompanys();
|
},
|
toEconomicTable() {
|
this.$router.push({
|
path:
|
"/securityUnitOperation/economicTable?jurisdiction=" +
|
this.value2 +
|
"&enterpriseName=" +
|
this.enterpriseName +
|
"&jurisdiction1=" +
|
this.value1
|
});
|
},
|
getFenju() {
|
this.options1 = [];
|
this.value1 = "";
|
this.node = {};
|
lazyTrees().then(res => {
|
if (res.data.code === 200) {
|
this.options1 = res.data.data;
|
this.value1 = this.options1[0] ? this.options1[0].id : "";
|
this.node = this.options1[0];
|
this.getCompanys();
|
} else {
|
this.$message.error(res.msg);
|
}
|
});
|
},
|
pieChange() {
|
this.loading2 = true;
|
let params = {
|
jurisdiction: this.value1,
|
deptid: this.value2
|
};
|
selectPCount(params).then(res => {
|
if (res.data.code === 200) {
|
let middleEchart2 = echarts.init(
|
document.getElementById("middleEchart2")
|
);
|
middleEchart2.setOption(echartJs.economicPieOption(res.data.data[0]));
|
} else {
|
this.$message.error(res.msg);
|
}
|
this.loading2 = false;
|
});
|
},
|
getCompanys() {
|
getCompanys({ jurisdiction: this.value1 }).then(res => {
|
if (res.data.code === 200) {
|
this.options2 = res.data.data;
|
this.value2 = this.options2[0] ? this.options2[0].departmentid : "";
|
this.changeCompanys();
|
}
|
});
|
},
|
getSocialSecurity() {
|
let params = {
|
jurisdiction: this.value1,
|
deptid: this.value2
|
};
|
selectTo(params).then(res => {
|
if (res.data.code === 200) {
|
let data = res.data.data[0];
|
this.socialSecurity.num = data.thismouth;
|
this.socialSecurity.addNum = data.thismouth - data.lastmonth;
|
this.socialSecurity.money = data.thisamount;
|
this.socialSecurity.addMoney = data.thisamount - data.lastamount;
|
this.socialSecurity.paiQ = data.userpcthismouth;
|
this.socialSecurity.addPaiQ =
|
data.userpcthismouth - data.userpclastmouth;
|
this.socialSecurity.sheBPerson =
|
data.userthismouth && (data.thismouth / data.userthismouth) * 100
|
? ((data.thismouth / data.userthismouth) * 100).toFixed(2) + "%"
|
: 0;
|
this.socialSecurity.addSheBPerson =
|
data.userthismouth &&
|
data.userlastmouth &&
|
(data.thismouth / data.userthismouth) * 100 &&
|
(data.lastmonth / data.userlastmouth) * 100 &&
|
(data.thismouth / data.userthismouth) * 100 -
|
(data.lastmonth / data.userlastmouth) * 100
|
? (
|
(data.thismouth / data.userthismouth) * 100 -
|
(data.lastmonth / data.userlastmouth) * 100
|
).toFixed(2) + "%"
|
: 0;
|
} else {
|
this.$message.error(res.msg);
|
}
|
});
|
},
|
getQueryYearSoil() {
|
this.loading1 = true;
|
let params = {
|
jurisdiction: this.value1,
|
deptid: this.value2
|
};
|
queryYearSoil(params).then(res => {
|
if (res.data.code === 200) {
|
queryYearPz(params).then(res1 => {
|
if (res1.data.code === 200) {
|
let middleEchart1 = echarts.init(
|
document.getElementById("middleEchart1")
|
);
|
middleEchart1.setOption(
|
echartJs.economicMiddle(res.data.data, res1.data.data)
|
);
|
}
|
this.loading1 = false;
|
});
|
} else {
|
this.$message.error(res.msg);
|
}
|
});
|
},
|
getQueryYearAn() {
|
this.loading3 = true;
|
let params = {
|
jurisdiction: this.value1,
|
deptid: this.value2
|
};
|
queryYearKh(params).then(res => {
|
if (res.data.code === 200) {
|
let bottomEchart = echarts.init(
|
document.getElementById("bottomEchart")
|
);
|
bottomEchart.setOption(echartJs.bottomOption(res.data.data));
|
} else {
|
this.$message.error(res.msg);
|
}
|
this.loading3 = false;
|
});
|
},
|
changeCompanys() {
|
this.options2.forEach(item => {
|
if (item.departmentid === this.value2) {
|
this.enterpriseName = item.enterpriseName;
|
}
|
});
|
this.pieChange();
|
this.getSocialSecurity();
|
this.getQueryYearSoil();
|
this.getQueryYearAn();
|
}
|
},
|
mounted() {
|
this.getFenju();
|
}
|
};
|
</script>
|
<style lang="scss" scoped>
|
@media screen and (max-width: 1280px) {
|
.box-card {
|
font-size: 15px;
|
width: 128px;
|
background: #00aaf1;
|
height: 117px;
|
text-align: center;
|
margin-right: 28px;
|
box-shadow: 5px 5px 5px rgba($color: #000, $alpha: 0.35);
|
line-height: 36px;
|
span:nth-child(2) {
|
color: #06ffff;
|
font-size: 31px;
|
}
|
}
|
.col-content {
|
margin-top: 39px !important;
|
}
|
}
|
// 适配分辨率1600*900
|
@media screen and (min-width: 1281px) and (max-width: 1600px) {
|
.box-card {
|
font-size: 15px;
|
width: 128px;
|
background: #00aaf1;
|
height: 117px;
|
text-align: center;
|
margin-right: 66px;
|
box-shadow: 5px 5px 5px rgba($color: #000, $alpha: 0.35);
|
line-height: 36px;
|
span:nth-child(2) {
|
color: #06ffff;
|
font-size: 31px;
|
}
|
}
|
}
|
@media screen and(min-width:1601px) and (max-width: 1920px) {
|
.box-card {
|
width: 150px;
|
background: #00aaf1;
|
height: 135px;
|
text-align: center;
|
margin-right: 34px;
|
box-shadow: 5px 5px 5px rgba($color: #000, $alpha: 0.35);
|
line-height: 40px;
|
span:nth-child(2) {
|
color: #06ffff;
|
font-size: 34px;
|
}
|
}
|
}
|
.jjPage {
|
height: 100%;
|
width: 100%;
|
}
|
#bottomEchart,
|
#middleEchart1,
|
#middleEchart2 {
|
height: calc(100% - 40px);
|
width: 100%;
|
}
|
.el-row:first-child {
|
height: calc(40% - 80px);
|
margin-bottom: 20px;
|
}
|
.el-row:nth-child(2) {
|
margin-bottom: 20px;
|
}
|
.el-row:nth-child(2),
|
.el-row:nth-child(3) {
|
height: 30%;
|
}
|
.el-col {
|
height: 100%;
|
}
|
.rowContent {
|
padding: 5px 20px 0px 10px;
|
height: calc(100% - 5px);
|
width: calc(100% - 30px);
|
background: rgba(255, 255, 255, 0.1);
|
box-shadow: 0px 0px 1px #fff;
|
.span-title {
|
color: #fff;
|
font-size: 17px;
|
margin-left: 35px;
|
font-weight: 600;
|
}
|
}
|
|
.box-card span {
|
display: block;
|
width: 100%;
|
color: #fff;
|
}
|
.rowTitle {
|
height: 40px;
|
display: flex;
|
line-height: 40px;
|
img {
|
width: 30px;
|
height: 30px;
|
margin-top: 5px;
|
}
|
span {
|
color: #fff;
|
font-size: 17px;
|
font-weight: 600;
|
margin-left: 11px;
|
}
|
.select0 {
|
position: absolute;
|
right: 443px;
|
}
|
.select1 {
|
position: absolute;
|
right: 302px;
|
}
|
.select2 {
|
position: absolute;
|
right: 159px;
|
}
|
.el-button {
|
position: absolute;
|
right: 0px;
|
}
|
/deep/ .el-input__inner {
|
width: 120px;
|
}
|
}
|
.col-content {
|
display: flex;
|
margin-top: 35px;
|
margin-left: 36px;
|
}
|
/deep/ .el-table .cell {
|
text-align: center;
|
}
|
.jjPage {
|
/deep/.dialog {
|
z-index: 10000000 !important;
|
.el-table {
|
top: 0px !important;
|
margin: 0px !important;
|
width: 100% !important;
|
height: calc(100% - 50px) !important;
|
|
.el-table__header {
|
background-color: #2d5cc8 !important;
|
}
|
.el-table__body-wrapper {
|
height: calc(100% - 50px);
|
overflow-x: hidden;
|
overflow-y: auto;
|
}
|
}
|
.el-pagination {
|
color: #a2a5a5;
|
}
|
.btn-prev,
|
.btn-next {
|
background: transparent !important;
|
}
|
.el-dialog__body {
|
padding: 10px 20px;
|
height: calc(100% - 60px);
|
.el-input {
|
width: 50px !important;
|
border-bottom: 1px solid #8a7b7b !important;
|
}
|
}
|
}
|
/deep/ .el-dialog {
|
width: 80% !important;
|
height: 77%;
|
}
|
}
|
</style>
|