From dc252ad2bd275f697c266e3c8b10cb7d540fdcaa Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Wed, 16 Feb 2022 17:08:11 +0800
Subject: [PATCH] 44个表格在1366*768下的适配,保安员管理-》保安员查询中操作栏更改,在用户表左侧控制栏同步高
---
src/views/statisticalQueryManagement/securityGuardStatistics.vue | 318 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 241 insertions(+), 77 deletions(-)
diff --git a/src/views/statisticalQueryManagement/securityGuardStatistics.vue b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
index 5a9e63c..f73e8ea 100644
--- a/src/views/statisticalQueryManagement/securityGuardStatistics.vue
+++ b/src/views/statisticalQueryManagement/securityGuardStatistics.vue
@@ -1,28 +1,75 @@
<template>
- <basic-container>
- <avue-crud
- :option="tableOption"
- :data="tableData"
- :page.sync="tablePage"
- :table-loading="loading"
- :permission="permissionList"
- :before-open="beforeOpen"
- @date-change="dateChange"
- @row-click="handleRowClick"
- class="rowClick"
+ <div>
+ <basic-container
+ :class="[
+ 'witerFontColorInput',
+ $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '',
+ ]"
>
- </avue-crud>
- </basic-container>
+ <avue-crud
+ :option="tableOption"
+ :table-loading="loading"
+ :data="tableData"
+ :page.sync="page"
+ :permission="permissionList"
+ ref="crud"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ @cell-click="handleRowClick"
+ class="rowClick tablesss"
+ >
+ </avue-crud>
+ </basic-container>
+ <el-dialog
+ class="tongji-class"
+ :title="dialogTitle"
+ append-to-body
+ :visible.sync="dialogShow"
+ v-if="dialogShow"
+ >
+ <companyDetails :fwdeptId="fwdeptId"></companyDetails>
+ <!-- <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 { selectLi } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
+import {
+ selectLi,
+ dictionaryList,
+} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
+import { lazyTreeJu, lazyTrees } from "../../api/index/index";
+import companyDetails from "./companyDetails";
export default {
name: "业务情况统计",
+ components: {
+ companyDetails,
+ },
data() {
return {
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ query: {},
value1: "",
value2: "",
tableData: [
@@ -63,11 +110,6 @@
// socialSecurity: "21535",
// },
],
- tablePage: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
tableOption: {
align: "center",
viewBtn: true,
@@ -86,53 +128,96 @@
searchShow: true,
searchMenuSpan: 6,
index: true,
+ indexLabel: "序号",
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "公司名称",
prop: "deptname",
search: true,
searchSpan: 4,
+ minWidth: 210,
+ overHidden: true,
display: false,
+ },
+ {
+ label: "单位类型",
+ prop: "stats",
+ search: true,
+ searchSpan: 4,
+ display: false,
+ width: 110,
+ type: "select",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dicData: [],
},
{
label: "所属辖区",
prop: "jurname",
+ width: 110,
searchSpan: 4,
- type: "select",
+ overHidden: true,
+ type: "tree",
props: {
- label: "label",
+ label: "title",
value: "value",
},
- // cascaderItem: ["city", "area"],
- // dicUrl:subofficeOptions,
+ // dicUrl: "/api/information/lazyTreeJu",
+ // dicMethod:'post',
dicData: [
- {
- value: "0",
- label: "南昌市公安局",
- },
- {
- value: "2",
- label: "东湖分局",
- },
- {
- value: "3",
- label: "西湖分局",
- },
- {
- value: "4",
- label: "青云谱分局",
- },
- {
- value: "5",
- label: "青山湖分局",
- },
+ // {
+ // value: "0",
+ // label: "南昌市公安局"
+ // },
+ // {
+ // value: "2",
+ // label: "东湖分局"
+ // },
+ // {
+ // value: "3",
+ // label: "西湖分局"
+ // },
+ // {
+ // value: "4",
+ // label: "青云谱分局"
+ // },
+ // {
+ // value: "5",
+ // label: "青山湖分局"
+ // }
],
search: true,
rules: [
{
required: true,
message: "请选择所属辖区",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "单位注册时间",
+ prop: "releaseTimeRange",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ searchRange: true,
+ searchSpan: 6,
+ searchLabelWidth: 120,
+ labelWidth: 160,
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择单位注册时间",
trigger: "blur",
},
],
@@ -158,12 +243,23 @@
display: false,
},
{
+ label: "已采集照片人数",
+ prop: "ycaijzpnum",
+ display: false,
+ },
+ {
label: "未采集照片人数",
prop: "wcaijnum",
display: false,
},
{
+ label: "已采集指纹人数",
+ prop: "ycaijzwnum",
+ display: false,
+ },
+ {
label: "资格审查异常人数",
+ width: 150,
prop: "yicnum",
display: false,
},
@@ -180,7 +276,9 @@
],
},
companyName: "",
- loading:true,
+ loading: true,
+ dialogShow: false,
+ dialogTitle: "",
};
},
computed: {
@@ -195,48 +293,114 @@
},
},
methods: {
- // toCompanyDetails() {
- // this.$router.push({ path: "/statisticalQueryManagement/companyDetails" });
- // },
- handleRowClick(row, event, column) {
- this.$router.push({ path: "/statisticalQueryManagement/companyDetails" });
- },
- dateChange() {},
- getTableData() {
- selectLi({current: 1, size: 10 }).then(res => {
+ getSubOfficeData() {
+ lazyTrees().then((res) => {
if (res.data.code === 200) {
- this.tableData = res.data.data;
- this.loading = false;
+ this.tableOption.column.forEach((item) => {
+ if (item.label == "所属辖区") {
+ // let data = res.data.data;
+ item.dicData = res.data.data;
+ }
+ });
+ } else {
+ this.$message.error(res.msg);
}
});
- }
- // downExcel() {
- // let et = XLSX.utils.table_to_book(document.getElementById("table"));
- // let etout = XLSX.write(et, {
- // bookType: "xlsx",
- // bookSST: true,
- // type: "array"
+ },
+ // searchChildren(data) {
+ // data.forEach(item => {
+ // if(item.hasChildren)(
+
+ // )
+ // else {
+ // this.searchChildren()
+ // }
// });
- // try {
- // FileSaver.saveAs(
- // new Blob([etout], {
- // type: "application/octet-stream"
- // }),
- // `表.xlsx`
- // ); //导出的文件名
- // } catch (e) {
- // console.log(e, etout);
- // }
- // return etout;
- // }
+ // },
+ getDictionaryList() {
+ dictionaryList().then((res) => {
+ if (res.data.code === 200) {
+ this.tableOption.column.forEach((item) => {
+ if (item.label == "单位类型") {
+ item.dicData = res.data.data;
+ }
+ });
+ }
+ });
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ 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);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ let param = {};
+ param["jurisdiction"] = params["jurname"] || "";
+ param["deptid"] = params["deptname"] || "";
+ param["stats"] = params["stats"] || "";
+ param["current"] = page.currentPage;
+ param["size"] = page.pageSize;
+ const { releaseTimeRange } = this.query;
+ let values = {
+ ...param,
+ };
+ if (releaseTimeRange) {
+ values = {
+ ...param,
+ startTime: releaseTimeRange[0],
+ endTime: releaseTimeRange[1],
+ ...this.query,
+ };
+ values.releaseTimeRange = null;
+ }
+ selectLi(values).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.tableData = data.records;
+ this.$store.commit("setWindowSizeHeightAdd");
+ this.loading = false;
+ });
+ },
+ handleRowClick(row, column, cell, event) {
+ if (column.label == "保安员总数") {
+ this.dialogTitle = "保安员明细";
+ this.fwdeptId = row.departmentid;
+ this.dialogShow = true;
+ } else {
+ this.dialogShow = false;
+ }
+ // this.$router.push({
+ // path: "/statisticalQueryManagement/companyDetails?deptid=" + row.dept_id
+ // });
+ },
},
mounted() {
- this.getTableData();
+ this.getSubOfficeData();
+ this.getDictionaryList();
+ this.$store.commit("setWindowSizeHeightAdd");
},
};
</script>
-<style lang="scss" scoped>
-/deep/ .rowClick .el-table__row:hover td{
+<style lang="scss" scoped>
+/deep/ .rowClick .el-table__row:hover td:nth-child(6) {
cursor: pointer;
}
</style>
--
Gitblit v1.9.3