zhengpz
2021-08-15 2abc33c4172e5a0e127fb43cac6167787f5170a1
src/views/statisticalQueryManagement/businessStatistics.vue
@@ -7,7 +7,9 @@
      :permission="permissionList"
      :before-open="beforeOpen"
      @date-change="dateChange"
      @row-click="handleRowClick"
      @cell-click="handleRowClick"
      :cell-style="cellStyle"
      class="businessStatisticsStyle"
    >
    </avue-crud>
  </basic-container>
@@ -27,25 +29,25 @@
          company: "江西省永安保安服务有限公司",
          subOffice: "南昌市公安局",
          customer: "76",
          num: "1124",
          num: "1124"
        },
        {
          company: "南昌市赣水保安服务有限公司",
          subOffice: "东湖分局",
          customer: "85",
          num: "1428",
          num: "1428"
        },
        {
          company: "江西中业兴达保安服务有限公司",
          subOffice: "西湖分局",
          customer: "46",
          num: "974",
        },
          num: "974"
        }
      ],
      tablePage: {
        pageSize: 10,
        currentPage: 1,
        total: 0,
        total: 0
      },
      tableOption: {
        excelBtn: true,
@@ -71,7 +73,7 @@
            prop: "company",
            search: true,
            searchSpan: 4,
            display: false,
            display: false
          },
          {
@@ -81,53 +83,53 @@
            type: "select",
            props: {
              label: "label",
              value: "value",
              value: "value"
            },
            // cascaderItem: ["city", "area"],
            // dicUrl:subofficeOptions,
            dicData: [
              {
                value: "0",
                label: "南昌市公安局",
                label: "南昌市公安局"
              },
              {
                value: "2",
                label: "东湖分局",
                label: "东湖分局"
              },
              {
                value: "3",
                label: "西湖分局",
                label: "西湖分局"
              },
              {
                value: "4",
                label: "青云谱分局",
                label: "青云谱分局"
              },
              {
                value: "5",
                label: "青山湖分局",
              },
                label: "青山湖分局"
              }
            ],
            search: true,
            rules: [
              {
                required: true,
                message: "请选择所属辖区",
                trigger: "blur",
              },
            ],
                trigger: "blur"
              }
            ]
          },
          {
            label: "服务对象数量",
            prop: "customer",
            display: false,
            display: false
          },
          {
            label: "保安员人数",
            prop: "num",
            display: false,
          },
        ],
      },
            display: false
          }
        ]
      }
    };
  },
  computed: {
@@ -137,15 +139,23 @@
        addBtn: this.vaildData(this.permission.post_add, false),
        viewBtn: this.vaildData(this.permission.post_view, false),
        delBtn: this.vaildData(this.permission.post_delete, false),
        editBtn: this.vaildData(this.permission.post_edit, false),
        editBtn: this.vaildData(this.permission.post_edit, false)
      };
    },
    }
  },
  methods: {
    handleRowClick(row, event, column) {
      this.$router.push({ path: "/statisticalQueryManagement/businessStatisticsDetail" });
    handleRowClick(row, column, cell, event) {
      if (column.label == "服务对象数量" || column.label == "保安员人数") {
        this.$router.push({
          path: "/statisticalQueryManagement/businessStatisticsDetail"
        });
      }
    },
    dateChange() {},
    cellStyle(row, column, rowIndex, columnIndex) {
      // if (columnIndex == 4 || columnIndex == 5) {
      // }
    },
    dateChange() {}
    // downExcel() {
    //   let et = XLSX.utils.table_to_book(document.getElementById("table"));
    //   let etout = XLSX.write(et, {
@@ -166,8 +176,12 @@
    //   return etout;
    // }
  },
  mounted() {},
  mounted() {}
};
</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) {
  cursor: pointer;
}
</style>