zhengpz
2021-08-18 e8f9a6ab3d258c028da4fdc4a51c3985a9eba67c
src/views/statisticalQueryManagement/businessStatistics.vue
@@ -4,6 +4,7 @@
      :option="tableOption"
      :data="tableData"
      :page.sync="tablePage"
      :table-loading="loading"
      :permission="permissionList"
      :before-open="beforeOpen"
      @date-change="dateChange"
@@ -18,6 +19,7 @@
import FileSaver from "file-saver";
import XLSX from "xlsx";
import { mapGetters } from "vuex";
import { selectYw } from "../../api/statisticalQueryManagement/statisticalQueryManagement";
export default {
  name: "业务情况统计",
  data() {
@@ -25,24 +27,24 @@
      value1: "",
      value2: "",
      tableData: [
        {
          company: "江西省永安保安服务有限公司",
          subOffice: "南昌市公安局",
          customer: "76",
          num: "1124"
        },
        {
          company: "南昌市赣水保安服务有限公司",
          subOffice: "东湖分局",
          customer: "85",
          num: "1428"
        },
        {
          company: "江西中业兴达保安服务有限公司",
          subOffice: "西湖分局",
          customer: "46",
          num: "974"
        }
        // {
        //   company: "江西省永安保安服务有限公司",
        //   subOffice: "南昌市公安局",
        //   customer: "76",
        //   num: "1124"
        // },
        // {
        //   company: "南昌市赣水保安服务有限公司",
        //   subOffice: "东湖分局",
        //   customer: "85",
        //   num: "1428"
        // },
        // {
        //   company: "江西中业兴达保安服务有限公司",
        //   subOffice: "西湖分局",
        //   customer: "46",
        //   num: "974"
        // }
      ],
      tablePage: {
        pageSize: 10,
@@ -70,7 +72,7 @@
        column: [
          {
            label: "公司名称",
            prop: "company",
            prop: "enterpriseName",
            search: true,
            searchSpan: 4,
            display: false
@@ -78,7 +80,7 @@
          {
            label: "所属辖区",
            prop: "subOffice",
            prop: "jurname",
            searchSpan: 4,
            type: "select",
            props: {
@@ -120,16 +122,17 @@
          },
          {
            label: "服务对象数量",
            prop: "customer",
            prop: "fwnum",
            display: false
          },
          {
            label: "保安员人数",
            prop: "num",
            prop: "znum",
            display: false
          }
        ]
      }
      },
       loading:true,
    };
  },
  computed: {
@@ -155,7 +158,15 @@
      // if (columnIndex == 4 || columnIndex == 5) {
      // }
    },
    dateChange() {}
    dateChange() {},
    getTableData() {
      selectYw({current: 1, size: 10 }).then(res => {
        if (res.data.code === 200) {
          this.tableData = res.data.data;
          this.loading = false;
        }
      });
    }
    // downExcel() {
    //   let et = XLSX.utils.table_to_book(document.getElementById("table"));
    //   let etout = XLSX.write(et, {
@@ -176,7 +187,9 @@
    //   return etout;
    // }
  },
  mounted() {}
  mounted() {
    this.getTableData();
  }
};
</script>
<style lang="scss" scoped>