From 5b0106f735d208bb9ca887b996cceb13ffa27796 Mon Sep 17 00:00:00 2001
From: zhengpz <1838927346@qq.com>
Date: Tue, 24 Aug 2021 21:57:25 +0800
Subject: [PATCH] 对接首页接口
---
src/api/securityUnitOperation/securityUnitOperation.js | 7 +
src/views/statisticalQueryManagement/businessStatistics.vue | 12 ++
public/index.html | 4
src/views/statisticalQueryManagement/securityGuardDetail.vue | 7
src/views/statisticalQueryManagement/securityGuardStatistics.vue | 2
src/views/home/index.scss | 1
src/views/securityUnitOperation/securityEchart.js | 28 ++++-
src/views/home/index.vue | 108 +++++++++++++++++---
src/api/index/index.js | 31 +++++
src/views/statisticalQueryManagement/companyDetails.vue | 4
src/views/statisticalQueryManagement/businessStatisticsDetail.vue | 27 ++--
src/views/securityUnitOperation/economicTable.vue | 9 +
src/views/securityUnitOperation/operationAnalysis.vue | 51 +++++++---
src/views/securityUnitOperation/operationTable.vue | 4
14 files changed, 227 insertions(+), 68 deletions(-)
diff --git a/public/index.html b/public/index.html
index 67cce1f..f77ca95 100644
--- a/public/index.html
+++ b/public/index.html
@@ -81,6 +81,10 @@
color: #ABABAB;
font-size: 12px;
}
+ .el-tooltip__popper.is-dark{
+ z-index: 11111111 !important;
+ background: #031952;
+ }
</style>
</head>
diff --git a/src/api/index/index.js b/src/api/index/index.js
index ae279e0..8f21286 100644
--- a/src/api/index/index.js
+++ b/src/api/index/index.js
@@ -88,7 +88,7 @@
});
};
// 资格审查异常人员清单
-export const qualificationPages = (params) => {
+export const qualificationPages = params => {
return request({
url: "/api/blade-user/pages",
method: "get",
@@ -96,10 +96,11 @@
});
};
// 监管处罚数量
-export const selectCf = () => {
+export const selectCf = params => {
return request({
url: "/api/information/selectCf",
- method: "post"
+ method: "post",
+ params: params
});
};
// 公司材料不全数量
@@ -109,3 +110,27 @@
method: "post"
});
};
+// 有名无实
+export const selectYs = params => {
+ return request({
+ url: "/api/information/selectYs",
+ method: "post",
+ params: params
+ });
+};
+// 经营不善
+export const selectJy = params => {
+ return request({
+ url: "/api/information/selectJy",
+ method: "post",
+ params: params
+ });
+};
+// 违规经营
+export const selectWg = params => {
+ return request({
+ url: "/api/information/selectWg",
+ method: "post",
+ params: params
+ });
+};
diff --git a/src/api/securityUnitOperation/securityUnitOperation.js b/src/api/securityUnitOperation/securityUnitOperation.js
index feb392d..1d62e80 100644
--- a/src/api/securityUnitOperation/securityUnitOperation.js
+++ b/src/api/securityUnitOperation/securityUnitOperation.js
@@ -75,4 +75,11 @@
method: "post",
params: params
});
+};
+export const selectAge = (params) => {
+ return request({
+ url: "/api/information/selectAge",
+ method: "post",
+ params: params
+ });
};
\ No newline at end of file
diff --git a/src/views/home/index.scss b/src/views/home/index.scss
index 13fecb3..01e46ca 100644
--- a/src/views/home/index.scss
+++ b/src/views/home/index.scss
@@ -705,3 +705,4 @@
height: 77%;
}
}
+
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 323cc02..237542a 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -308,7 +308,7 @@
<img src="../../../public/img/bajgxt/u231.png" alt />
<div class="text">
<span>违规经营</span>
- <span>45个</span>
+ <span>{{ rightData.wgNum }}个</span>
</div>
</div>
<div class="rightData rightData2">
@@ -322,7 +322,7 @@
<img src="../../../public/img/bajgxt/u233.png" alt />
<div class="text">
<span>有名无实</span>
- <span>12个</span>
+ <span>{{ rightData.ymwsNum }}个</span>
</div>
</div>
<div class="rightData rightData4">
@@ -373,29 +373,65 @@
>
<el-table :data="gridData.data">
<el-table-column type="index"> </el-table-column>
- <el-table-column prop="realName" label="保安姓名"></el-table-column>
- <el-table-column prop="deptName" label="保安公司"></el-table-column>
+ <el-table-column
+ prop="realName"
+ label="保安姓名"
+ :show-overflow-tooltip="true"
+ width="100"
+ ></el-table-column>
+ <el-table-column
+ prop="deptName"
+ label="保安公司"
+ :show-overflow-tooltip="true"
+ ></el-table-column>
<el-table-column
prop="sex"
label="性别"
:formatter="sexFormatter"
+ :show-overflow-tooltip="true"
+ width="100"
></el-table-column>
- <el-table-column prop="cardid" label="身份证号"></el-table-column>
- <el-table-column prop="age" label="年龄"></el-table-column>
- <el-table-column prop="birthday" label="出生日期"></el-table-column>
+ <el-table-column
+ prop="cardid"
+ label="身份证号"
+ :show-overflow-tooltip="true"
+ width="180"
+ ></el-table-column>
+ <el-table-column
+ prop="age"
+ label="年龄"
+ :show-overflow-tooltip="true"
+ width="100"
+ ></el-table-column>
+ <!-- <el-table-column
+ prop="birthday"
+ label="出生日期"
+ :show-overflow-tooltip="true"
+ ></el-table-column> -->
<el-table-column
prop="securitynumber"
label="保安员证编号"
+ :show-overflow-tooltip="true"
+ width="150"
></el-table-column>
- <el-table-column prop="phone" label="联系方式"></el-table-column>
+ <el-table-column
+ prop="phone"
+ label="联系方式"
+ :show-overflow-tooltip="true"
+ width="150"
+ ></el-table-column>
<el-table-column
prop="examinationType"
label="审查状态"
:formatter="examinationFormatter"
+ :show-overflow-tooltip="true"
+ width="100"
></el-table-column>
<el-table-column
prop="examinationMx"
label="审查明细"
+ :show-overflow-tooltip="true"
+ width="150"
></el-table-column>
</el-table>
<el-pagination
@@ -445,7 +481,10 @@
selectExtypeUser,
qualificationPages,
selectCf,
- selectCl
+ selectCl,
+ selectYs,
+ selectJy,
+ selectWg
} from "../../api/index/index";
import car from "@/assets/img/car.png";
@@ -470,7 +509,9 @@
poorPerformance: 0,
qualification: 0,
materialNum: 0,
- punishNum: 0
+ punishNum: 0,
+ wgNum: 0,
+ ymwsNum: 0
},
carNum: 0,
peoNum: 0,
@@ -519,10 +560,11 @@
},
methods: {
sexFormatter(row, column) {
- row.sex = row.sex === 1 ? "男" : "女";
+ return (row.sex = row.sex === 1 ? "男" : "女");
},
examinationFormatter(row) {
- row.examinationType = row.examinationType === "1" ? "不正常" : "正常";
+ return (row.examinationType =
+ row.examinationType === "1" ? "不正常" : "正常");
},
// 左侧表的接口返回数据
@@ -831,8 +873,7 @@
this.value1 = this.options1[0].value || "";
this.value2 = this.options2[0].value || "";
// 获取完辖区列表之后再获取具体数据
- this.getPunishNum();
- this.getMaterial();
+ this.peoWarning();
// this.getQualification();
this.getPoorPerformance(3);
} else {
@@ -867,7 +908,6 @@
},
// 公司受处罚数量
getPunishNum() {
- this.rightData.punishNum = 0;
selectCf({ jurisdiction: this.value2 }).then(res => {
if (res.data.code === 200) {
this.rightData.punishNum = res.data.data[0].count;
@@ -877,12 +917,33 @@
this.right2loading = false;
});
},
- // 公司材料不全数量
+ // 经营不善
getMaterial() {
- this.rightData.materialNum = 0;
- selectCl({ jurisdiction: this.value2 }).then(res => {
+ selectJy({ jurisdiction: this.value2 }).then(res => {
if (res.data.code === 200) {
- this.rightData.materialNum = res.data.data[0].count;
+ this.rightData.materialNum = res.data.data.Count;
+ } else {
+ this.$message.error(res.msg);
+ }
+ this.right2loading = false;
+ });
+ },
+ // 有名无实
+ getselectYs() {
+ selectYs({ jurisdiction: this.value2 }).then(res => {
+ if (res.data.code === 200) {
+ this.rightData.ymwsNum = res.data.data.Count;
+ } else {
+ this.$message.error(res.msg);
+ }
+ this.right2loading = false;
+ });
+ },
+ // 违规经营
+ getselectWg() {
+ selectWg({ jurisdiction: this.value2 }).then(res => {
+ if (res.data.code === 200) {
+ this.rightData.wgNum = res.data.data.count;
} else {
this.$message.error(res.msg);
}
@@ -939,9 +1000,15 @@
// this.right1loading = false;
},
peoWarning() {
+ this.rightData.materialNum = 0;
+ this.rightData.punishNum = 0;
+ this.rightData.wgNum = 0;
+ this.rightData.ymwsNum = 0;
this.right2loading = true;
this.getPunishNum();
this.getMaterial();
+ this.getselectWg();
+ this.getselectYs();
},
companyWarning() {
@@ -981,4 +1048,7 @@
/deep/ .el-loading-mask {
background-color: transparent !important;
}
+/deep/ .el-table .cell {
+ text-align: center;
+}
</style>
diff --git a/src/views/securityUnitOperation/economicTable.vue b/src/views/securityUnitOperation/economicTable.vue
index 9ca75a8..f548efd 100644
--- a/src/views/securityUnitOperation/economicTable.vue
+++ b/src/views/securityUnitOperation/economicTable.vue
@@ -33,7 +33,7 @@
currentPage: 1,
total: 0
},
- query:{},
+ query: {},
value1: "",
value2: "",
tableData: [
@@ -351,8 +351,11 @@
}
let jurisdiction = object["jurisdiction1"] || "";
let enterpriseName = object["enterpriseName"] || "";
- let obj = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
- this.onLoad(this.page, obj);
+ this.query = {
+ jurisdiction: jurisdiction,
+ enterpriseName: enterpriseName
+ };
+ this.onLoad(this.page, this.query);
}
},
mounted() {
diff --git a/src/views/securityUnitOperation/operationAnalysis.vue b/src/views/securityUnitOperation/operationAnalysis.vue
index 6879482..310bd95 100644
--- a/src/views/securityUnitOperation/operationAnalysis.vue
+++ b/src/views/securityUnitOperation/operationAnalysis.vue
@@ -111,19 +111,19 @@
<div class="leftEchartTitle qing">
<div class="block1"></div>
<span>青年</span>
- <span>11</span>
+ <span>{{ ageData.qing }}</span>
<span>人</span>
</div>
<div class="leftEchartTitle zhong">
<div class="block1"></div>
<span>中年</span>
- <span>321</span>
+ <span>{{ ageData.zhong }}</span>
<span>人</span>
</div>
<div class="leftEchartTitle lao">
<div class="block1"></div>
<span>老年</span>
- <span>123</span>
+ <span>{{ ageData.lao }}</span>
<span>人</span>
</div>
<div id="bottomEchart1"></div>
@@ -141,7 +141,8 @@
queryCounts,
getCompanys,
queryYearKh,
- queryYearG
+ queryYearG,
+ selectAge
} from "../../api/securityUnitOperation/securityUnitOperation";
export default {
data() {
@@ -203,20 +204,35 @@
middleEchart2: null,
bottomEchart: null,
bottomEchart1: null
+ },
+ ageData: {
+ qing: 0,
+ zhong: 0,
+ lao: 0
}
};
},
methods: {
- setEchart() {
- let data = [];
-
- let data1 = [];
- if (!this.echartDom.bottomEchart1) {
- this.echartDom.bottomEchart1 = echarts.init(
- document.getElementById("bottomEchart1")
- );
- this.echartDom.bottomEchart1.setOption(echartJs.bottomOption2(data1));
- }
+ setAgeEchart() {
+ this.loading4 = true;
+ selectAge().then(res => {
+ if (res.data.code === 200) {
+ if (!this.echartDom.bottomEchart1) {
+ this.echartDom.bottomEchart1 = echarts.init(
+ document.getElementById("bottomEchart1")
+ );
+ }
+ this.echartDom.bottomEchart1.setOption(
+ echartJs.bottomOption2(res.data.data)
+ );
+ this.ageData.qing = res.data.data.qcount;
+ this.ageData.zhong = res.data.data.zcount;
+ this.ageData.lao = res.data.data.lcount;
+ } else {
+ this.$message.error(res.data.msg);
+ }
+ this.loading4 = false;
+ });
},
toOperationTable() {
this.$router.push({
@@ -352,6 +368,11 @@
baoanPq: 0,
addbaoanPq: 0
};
+ this.ageData = {
+ qing: 0,
+ zhong: 0,
+ lao: 0
+ };
},
changeCompanys() {
this.options2.forEach(item => {
@@ -363,10 +384,10 @@
this.getQueryCounts();
this.getQueryYearKh();
this.getQueryYearG();
+ this.setAgeEchart();
}
},
mounted() {
- this.setEchart();
this.getFenju();
}
};
diff --git a/src/views/securityUnitOperation/operationTable.vue b/src/views/securityUnitOperation/operationTable.vue
index a78a129..2f33644 100644
--- a/src/views/securityUnitOperation/operationTable.vue
+++ b/src/views/securityUnitOperation/operationTable.vue
@@ -299,8 +299,8 @@
}
let jurisdiction = object["jurisdiction1"] || "";
let enterpriseName = object["enterpriseName"] || "";
- let obj = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
- this.onLoad(this.page, obj);
+ this.query = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
+ this.onLoad(this.page, this.query);
}
},
mounted() {
diff --git a/src/views/securityUnitOperation/securityEchart.js b/src/views/securityUnitOperation/securityEchart.js
index 215f700..bc5d30b 100644
--- a/src/views/securityUnitOperation/securityEchart.js
+++ b/src/views/securityUnitOperation/securityEchart.js
@@ -439,6 +439,28 @@
return option;
}
function bottomOption2(alldata) {
+ let data = [];
+ for (var key in alldata) {
+ let obj = null;
+ if (key === "lcount") {
+ obj = {
+ name: "老年",
+ value: alldata[key]
+ };
+ } else if (key === "zcount") {
+ obj = {
+ name: "中年",
+ value: alldata[key]
+ };
+ }
+ else if (key === "qcount") {
+ obj = {
+ name: "青年",
+ value: alldata[key]
+ };
+ }
+ data.push(obj);
+ }
let option = {
tooltip: {
trigger: "item",
@@ -489,11 +511,7 @@
type: "pie",
center: ["33%", "50%"],
radius: "70%",
- data: [
- { value: 1048, name: "青年" },
- { value: 735, name: "中年" },
- { value: 580, name: "老年" }
- ],
+ data:data,
label: {
color: "#fff"
}
diff --git a/src/views/statisticalQueryManagement/businessStatistics.vue b/src/views/statisticalQueryManagement/businessStatistics.vue
index 2590585..f947ead 100644
--- a/src/views/statisticalQueryManagement/businessStatistics.vue
+++ b/src/views/statisticalQueryManagement/businessStatistics.vue
@@ -158,9 +158,11 @@
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
+ this.onLoad(this.page, this.query);
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
+ this.onLoad(this.page, this.query);
},
refreshChange() {
this.onLoad(this.page, this.query);
@@ -169,7 +171,9 @@
this.loading = true;
let param = {};
param["jurisdiction"] = params["jurname"] ? params["jurname"] : "";
- param["deptid"] = "";
+ param["deptid"] = params["enterpriseName"]
+ ? params["enterpriseName"]
+ : "";
param["current"] = page.currentPage;
param["size"] = page.pageSize;
selectYw(param).then(res => {
@@ -182,7 +186,11 @@
handleRowClick(row, column, cell, event) {
if (column.label == "服务对象数量") {
this.$router.push({
- path: "/statisticalQueryManagement/businessStatisticsDetail"
+ path:
+ "/statisticalQueryManagement/businessStatisticsDetail?&departmentid=" +
+ row.departmentid +
+ "&jurisdiction=" +
+ row.jurisdiction
});
} else if (column.label == "保安员人数") {
this.$router.push({
diff --git a/src/views/statisticalQueryManagement/businessStatisticsDetail.vue b/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
index 69e6013..39257ce 100644
--- a/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
+++ b/src/views/statisticalQueryManagement/businessStatisticsDetail.vue
@@ -213,7 +213,8 @@
],
servicesList: [],
companyName: "",
- loading: true
+ loading: true,
+ deptid: ""
};
},
computed: {
@@ -255,7 +256,7 @@
let param = {};
param["jurisdiction"] = params["jurname"] || "";
param["fid"] = params["fwname"] || "";
- param["deptid"] = params["deptid"] || "1425365559645601794";
+ param["deptid"] = this.deptid || "";
param["current"] = page.currentPage;
param["size"] = page.pageSize;
selectDis(param).then(res => {
@@ -291,17 +292,17 @@
});
},
getLocationParams() {
- // let url = window.location.href;
- // let urlArr = url.split("?")[1].split("&");
- // var object = new Object();
- // for (var i = 0; i < urlArr.length; i++) {
- // let mm = urlArr[i].split("=");
- // object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
- // }
- // let jurisdiction = object["jurisdiction1"] || "";
- // let enterpriseName = object["enterpriseName"] || "";
- // let obj = { jurisdiction: jurisdiction, enterpriseName: enterpriseName };
- // this.onLoad(this.page, obj);
+ let url = window.location.href;
+ let urlArr = url.split("?")[1].split("&");
+ var object = new Object();
+ for (var i = 0; i < urlArr.length; i++) {
+ let mm = urlArr[i].split("=");
+ object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
+ }
+ const deptid = object["departmentid"] || "";
+ let jurisdiction = object["jurisdiction"] || "";
+ let obj = { jurisdiction: jurisdiction, deptid: deptid };
+ this.onLoad(this.page, obj);
this.onLoad(this.page, this.query);
}
},
diff --git a/src/views/statisticalQueryManagement/companyDetails.vue b/src/views/statisticalQueryManagement/companyDetails.vue
index d23026d..478d1cf 100644
--- a/src/views/statisticalQueryManagement/companyDetails.vue
+++ b/src/views/statisticalQueryManagement/companyDetails.vue
@@ -378,8 +378,8 @@
object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
}
let deptid = object["deptid"] || "";
- let obj = { deptid: deptid };
- this.onLoad(this.page, obj);
+ this.query = { deptid: deptid };
+ this.onLoad(this.page, this.query);
}
},
mounted() {
diff --git a/src/views/statisticalQueryManagement/securityGuardDetail.vue b/src/views/statisticalQueryManagement/securityGuardDetail.vue
index 4efc3de..fe63b2e 100644
--- a/src/views/statisticalQueryManagement/securityGuardDetail.vue
+++ b/src/views/statisticalQueryManagement/securityGuardDetail.vue
@@ -204,7 +204,7 @@
dicData: [
{
label: "否",
- value: 0
+ value: 2
},
{
label: "是",
@@ -305,8 +305,8 @@
object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
}
let enterpriseName = object["enterpriseName"] || "";
- let obj = { enterpriseName: enterpriseName };
- this.onLoad(this.page, obj);
+ this.query = { enterpriseName: enterpriseName };
+ this.onLoad(this.page, this.query);
// this.onLoad(this.page, this.query);
}
},
@@ -315,4 +315,3 @@
}
};
</script>
-<style lang="scss" scoped></style>
diff --git a/src/views/statisticalQueryManagement/securityGuardStatistics.vue b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
index 1e36ecf..07c9f6a 100644
--- a/src/views/statisticalQueryManagement/securityGuardStatistics.vue
+++ b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
@@ -228,9 +228,11 @@
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
+ this.onLoad(this.page, this.query)
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
+ this.onLoad(this.page, this.query)
},
refreshChange() {
this.onLoad(this.page, this.query);
--
Gitblit v1.9.3