zhengpz
2021-08-22 8eccc9770ab63dc608c4d0bdc520f69e2f0ba065
src/views/statisticalQueryManagement/securityGuardStatistics.vue
@@ -7,8 +7,6 @@
      :page.sync="page"
      :permission="permissionList"
      ref="crud"
      @row-update="rowUpdates"
      @row-save="rowSave"
      @search-change="searchChange"
      @search-reset="searchReset"
      @current-change="currentChange"
@@ -217,38 +215,6 @@
        }
      });
    },
    rowSave(row, done, loading) {
      adddata(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        },
        error => {
          window.console.log(error);
          loading();
        }
      );
    },
    rowUpdates(row, index, done, loading) {
      update(row).then(
        () => {
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
        },
        error => {
          window.console.log(error);
          loading();
        }
      );
    },
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
@@ -271,57 +237,23 @@
    },
    onLoad(page, params = {}) {
      this.loading = true;
      // if (!params) {
      //   params = { current: page.currentPage, size: page.pageSize };
      // }
      let param = {};
      param["jurisdiction"] = params["jurname"] ? params["jurname"] : "";
      param["deptid"] =  "";
      param["deptid"] = "";
      param["current"] = page.currentPage;
      param["size"] = page.pageSize;
      selectLi(param).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.tableData = res.data.data;
        // this.data = data.records;
        console.log(this.data);
        this.loading = false;
        // this.selectionClear();
      });
    },
    // toCompanyDetails() {
    //   this.$router.push({ path: "/statisticalQueryManagement/companyDetails" });
    // },
    handleRowClick(row, event, column) {
      this.$router.push({ path: "/statisticalQueryManagement/companyDetails" });
    },
    // getTableData() {
    //   selectLi({ 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, {
    //     bookType: "xlsx",
    //     bookSST: true,
    //     type: "array"
    //   });
    //   try {
    //     FileSaver.saveAs(
    //       new Blob([etout], {
    //         type: "application/octet-stream"
    //       }),
    //       `表.xlsx`
    //     ); //导出的文件名
    //   } catch (e) {
    //     console.log(e, etout);
    //   }
    //   return etout;
    // }
      this.$router.push({
        path: "/statisticalQueryManagement/companyDetails?deptid=" + row.dept_id
      });
    }
  },
  mounted() {
    this.getSubOfficeData();