liuyg
2021-09-28 1bd38da39fe35fc20905ee82fa5de4ba8a2862d5
src/views/statisticalQueryManagement/securityGuardStatistics.vue
@@ -1,23 +1,44 @@
<template>
  <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"
      @row-click="handleRowClick"
      class="rowClick"
  <div>
    <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"
      >
      </avue-crud>
    </basic-container>
    <el-dialog
      class="tongji-class"
      :title="dialogTitle"
      append-to-body
      :visible.sync="dialogShow"
      v-if="dialogShow"
    >
    </avue-crud>
  </basic-container>
      <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";
@@ -27,9 +48,13 @@
  selectLi,
  dictionaryList
} from "../../api/statisticalQueryManagement/statisticalQueryManagement";
import { lazyTreeJu } from "../../api/index/index";
import { lazyTreeJu, lazyTrees } from "../../api/index/index";
import companyDetails from "./companyDetails";
export default {
  name: "业务情况统计",
  components: {
    companyDetails
  },
  data() {
    return {
      page: {
@@ -103,7 +128,7 @@
            prop: "deptname",
            search: true,
            searchSpan: 4,
            width: 300,
            width: 280,
            display: false
          },
          {
@@ -182,12 +207,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
          },
@@ -204,7 +240,9 @@
        ]
      },
      companyName: "",
      loading: true
      loading: true,
      dialogShow: false,
      dialogTitle: ""
    };
  },
  computed: {
@@ -220,7 +258,7 @@
  },
  methods: {
    getSubOfficeData() {
      lazyTreeJu().then(res => {
      lazyTrees().then(res => {
        if (res.data.code === 200) {
          this.tableOption.column.forEach(item => {
            if (item.label == "所属辖区") {
@@ -291,10 +329,17 @@
        this.loading = false;
      });
    },
    handleRowClick(row, event, column) {
      this.$router.push({
        path: "/statisticalQueryManagement/companyDetails?deptid=" + row.dept_id
      });
    handleRowClick(row, column, cell, event) {
      if (column.label == "保安员总数") {
        this.dialogTitle = "保安员明细";
        this.fwdeptId = row.dept_id;
        this.dialogShow = true;
      } else {
        this.dialogShow = false;
      }
      // this.$router.push({
      //   path: "/statisticalQueryManagement/companyDetails?deptid=" + row.dept_id
      // });
    }
  },
  mounted() {
@@ -304,7 +349,7 @@
};
</script>
<style lang="scss" scoped>
/deep/ .rowClick .el-table__row:hover td {
/deep/ .rowClick .el-table__row:hover td:nth-child(6) {
  cursor: pointer;
}
</style>