From 1bd38da39fe35fc20905ee82fa5de4ba8a2862d5 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 28 Sep 2021 16:57:20 +0800
Subject: [PATCH] 服务对象调整接口和参数
---
src/views/statisticalQueryManagement/businessStatistics.vue | 231 ++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 186 insertions(+), 45 deletions(-)
diff --git a/src/views/statisticalQueryManagement/businessStatistics.vue b/src/views/statisticalQueryManagement/businessStatistics.vue
index 2590585..221bbe3 100644
--- a/src/views/statisticalQueryManagement/businessStatistics.vue
+++ b/src/views/statisticalQueryManagement/businessStatistics.vue
@@ -1,35 +1,84 @@
<template>
- <basic-container>
- <avue-crud
- :option="tableOption"
- :table-loading="loading"
- :data="tableData"
- :page.sync="page"
- :permission="permissionList"
- ref="crud"
- @row-update="rowUpdates"
- @row-save="rowSave"
- @search-change="searchChange"
- @search-reset="searchReset"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad"
- @cell-click="handleRowClick"
- :cell-style="cellStyle"
- class="businessStatisticsStyle"
+ <div>
+ <basic-container>
+ <avue-crud
+ :option="tableOption"
+ :table-loading="loading"
+ :data="tableData"
+ :page.sync="page"
+ :permission="permissionList"
+ ref="crud"
+ @row-update="rowUpdates"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ @cell-click="handleRowClick"
+ class="businessStatisticsStyle"
+ >
+ </avue-crud>
+ </basic-container>
+ <el-dialog
+ class="tongji-class"
+ :title="dialogTitle"
+ append-to-body
+ :visible.sync="dialogShow"
+ v-if="dialogShow"
>
- </avue-crud>
- </basic-container>
+ <businessStatisticsDetail
+ v-if="searchitem === 'fw'"
+ :fwdeptId="fwdeptId"
+ ></businessStatisticsDetail>
+ <businessStatisticsPq
+ v-if="searchitem === 'pq'"
+ :fwdeptId="fwdeptId"
+ ></businessStatisticsPq>
+ <businessStatisticsFwdq
+ v-if="searchitem === 'dq'"
+ :fwdeptId="fwdeptId"
+ ></businessStatisticsFwdq>
+ <securityGuardDetail
+ v-if="searchitem === 'zong'"
+ :fwdeptId="fwdeptId"
+ :paramCz="paramCz"
+ ></securityGuardDetail>
+ <!-- <avue-crud
+ :option="option2"
+ :data="data2"
+ :page.sync="page2"
+ @row-save="rowSave2"
+ @row-update="rowUpdate2"
+ @row-del="rowDel2"
+ :table-loading="loading2"
+ >
+ </avue-crud> -->
+ </el-dialog>
+ </div>
</template>
<script>
import FileSaver from "file-saver";
import XLSX from "xlsx";
import { mapGetters } from "vuex";
-import { selectYw } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
-import { lazyTreeJu } from "../../api/index/index";
+import {
+ selectYw,
+ dictionaryList
+} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
+import { lazyTreeJu, lazyTrees } from "../../api/index/index";
+import businessStatisticsDetail from "./businessStatisticsDetail";
+import businessStatisticsPq from "./businessStatisticsPq";
+import businessStatisticsFwdq from "./businessStatisticsFwdq";
+import securityGuardDetail from "./securityGuardDetail";
export default {
name: "业务情况统计",
+ components: {
+ businessStatisticsDetail,
+ businessStatisticsPq,
+ businessStatisticsFwdq,
+ securityGuardDetail
+ },
data() {
return {
page: {
@@ -83,14 +132,27 @@
prop: "enterpriseName",
search: true,
searchSpan: 4,
+ width: 300,
display: false
},
-
+ {
+ label: "单位类型",
+ prop: "stats",
+ search: true,
+ searchSpan: 4,
+ display: false,
+ type: "select",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dicData: []
+ },
{
label: "所属辖区",
prop: "jurname",
searchSpan: 4,
- type: "select",
+ type: "tree",
props: {
label: "title",
value: "id"
@@ -106,18 +168,39 @@
]
},
{
+ label: "保安员人数",
+ prop: "znum",
+ display: false
+ },
+ {
+ label: "持证人数",
+ prop: "cznum",
+ display: false
+ },
+ {
+ label: "派遣人数",
+ prop: "pqnum",
+ display: false
+ },
+ {
label: "服务对象数量",
prop: "fwnum",
display: false
},
{
- label: "保安员人数",
- prop: "znum",
+ label: "服务到期数量",
+ prop: "dqnum",
display: false
}
]
},
- loading: true
+ loading: true,
+ dialogTitle: "",
+ dialogShow: false,
+ pqdialogShow: false,
+ fwdeptId: "",
+ searchitem: "",
+ paramCz: false
};
},
computed: {
@@ -133,7 +216,7 @@
},
methods: {
getSubOfficeData() {
- lazyTreeJu().then(res => {
+ lazyTrees().then(res => {
if (res.data.code === 200) {
this.tableOption.column.forEach(item => {
if (item.label == "所属辖区") {
@@ -142,6 +225,17 @@
});
} else {
this.$message.error(res.msg);
+ }
+ });
+ },
+ getDictionaryList() {
+ dictionaryList().then(res => {
+ if (res.data.code === 200) {
+ this.tableOption.column.forEach(item => {
+ if (item.label == "单位类型") {
+ item.dicData = res.data.data;
+ }
+ });
}
});
},
@@ -158,9 +252,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);
@@ -168,8 +264,9 @@
onLoad(page, params = {}) {
this.loading = true;
let param = {};
- param["jurisdiction"] = params["jurname"] ? params["jurname"] : "";
- param["deptid"] = "";
+ param["jurisdiction"] = params["jurname"] || "";
+ param["deptid"] = params["enterpriseName"] || "";
+ param["stats"] = params["stats"] || "";
param["current"] = page.currentPage;
param["size"] = page.pageSize;
selectYw(param).then(res => {
@@ -180,31 +277,75 @@
});
},
handleRowClick(row, column, cell, event) {
+ this.paramCz = false;
+
if (column.label == "服务对象数量") {
- this.$router.push({
- path: "/statisticalQueryManagement/businessStatisticsDetail"
- });
+ this.dialogTitle = "业务统计明细---服务对象清单";
+ this.searchitem = "fw";
+ this.fwdeptId = row.departmentid;
+ this.dialogShow = true;
+
+ // dispatcherUnit({
+ // deptId: row.departmentid
+ // }).then(res => {
+ // if (res.data.code === 200) {
+ // this.page = {
+ // pageSize: 10,
+ // currentPage: 1,
+ // total: res.data.data.total
+ // };
+ // this.tableData = res.data.data.records;
+ // }
+ // });
+ // this.$router.push({
+ // path:
+ // "/statisticalQueryManagement/businessStatisticsDetail?&departmentid=" +
+ // row.departmentid
+ // });
} else if (column.label == "保安员人数") {
- this.$router.push({
- path:
- "/statisticalQueryManagement/securityGuardDetail?enterpriseName=" +
- row.enterpriseName
- });
+ this.dialogTitle = "业务统计明细---保安员清单";
+ this.searchitem = "zong";
+ this.fwdeptId = row.departmentid;
+ this.dialogShow = true;
+
+ // this.$router.push({
+ // path:
+ // "/statisticalQueryManagement/securityGuardDetail?departmentid=" +
+ // row.departmentid
+ // });
+ } else if (column.label == "派遣人数") {
+ this.dialogTitle = "业务统计明细---派遣人员清单";
+ this.searchitem = "pq";
+ this.fwdeptId = row.departmentid;
+ this.dialogShow = true;
+ } else if (column.label == "服务到期数量") {
+ this.dialogTitle = "业务统计明细---服务到期公司清单";
+ this.searchitem = "dq";
+ this.fwdeptId = row.departmentid;
+ this.dialogShow = true;
+ } else if (column.label == "持证人数") {
+ this.dialogTitle = "业务统计明细---持证保安人员清单";
+ this.searchitem = "dq";
+ this.paramCz = true;
+ this.fwdeptId = row.departmentid;
+ this.dialogShow = true;
+ } else {
+ this.dialogShow = false;
}
- },
- cellStyle(row, column, rowIndex, columnIndex) {
- // if (columnIndex == 4 || columnIndex == 5) {
- // }
}
},
mounted() {
this.getSubOfficeData();
+ this.getDictionaryList();
}
};
</script>
<style lang="scss" scoped>
-/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(5),
-/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(6) {
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(7),
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(6),
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(8),
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(9),
+/deep/ .businessStatisticsStyle .el-table__row:hover td:nth-child(10) {
cursor: pointer !important;
}
</style>
--
Gitblit v1.9.3