zhengpz
2021-08-22 8eccc9770ab63dc608c4d0bdc520f69e2f0ba065
src/views/statisticalQueryManagement/companyDetails.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"
@@ -94,7 +92,7 @@
        dialogClickModal: false,
        column: [
          {
            label: "保安员姓名",
            label: "保安姓名",
            searchLabelWidth: 110,
            prop: "real_name",
            search: true,
@@ -103,7 +101,7 @@
          },
          {
            label: "保安员编号",
            label: "保安证编号",
            prop: "securitynumber",
            display: false
          },
@@ -113,7 +111,7 @@
            display: false
          },
          {
            label: "联系电话",
            label: "联系方式",
            prop: "phone",
            display: false
          },
@@ -130,12 +128,16 @@
            // dicUrl:subofficeOptions,
            dicData: [
              {
                value: "0",
                value: "1",
                label: "是"
              },
              {
                value: "2",
                label: "否"
              },
              {
                value: "3",
                label: "吊销"
              }
            ],
            search: true,
@@ -164,7 +166,7 @@
                label: "是"
              },
              {
                value: "2",
                value: "1",
                label: "否"
              }
            ],
@@ -194,7 +196,7 @@
                label: "是"
              },
              {
                value: "2",
                value: "1",
                label: "否"
              }
            ],
@@ -220,10 +222,10 @@
            dicData: [
              {
                value: "0",
                label: "通过"
                label: "正常"
              },
              {
                value: "2",
                value: "1",
                label: "异常"
              }
            ],
@@ -280,7 +282,7 @@
                label: "是"
              },
              {
                value: "2",
                value: "1",
                label: "否"
              }
            ],
@@ -311,38 +313,6 @@
    }
  },
  methods: {
    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;
@@ -369,7 +339,13 @@
      //   params = { current: page.currentPage, size: page.pageSize };
      // }
      let param = {};
      param["deptid"] = "1412222709480509442";
      param["deptid"] = params["deptid"] || "";
      param["name"] = params["real_name"] || "";
      param["hold"] = params["hold"] || "";
      param["photo"] = params["photo"] || "";
      param["examinationtype"] = params["examination_type"] || "";
      param["dispatch"] = params["dispatch"] || "";
      param["soil"] = params["soil"] || "";
      param["current"] = page.currentPage;
      param["size"] = page.pageSize;
      selectUIn(param).then(res => {
@@ -380,7 +356,7 @@
        this.loading = false;
        // this.selectionClear();
      });
    }
    },
    // getTableData() {
    //   selectUIn(param).then(res => {
    //     if (res.data.code === 200) {
@@ -408,9 +384,22 @@
    //   }
    //   return etout;
    // }
    getLocationParams() {
      let url = window.location.href;
      let urlArr = url.split("?")[1].split("&");
      var object = new Object();
      for (var i = 0; i < urlArr.length; i++) {
        let mm = urlArr[i].split("=");
        object[decodeURIComponent(mm[0])] = decodeURIComponent(mm[1]);
      }
      let deptid = object["deptid"] || "";
      let obj = { deptid: deptid };
      this.onLoad(this.page, obj);
    }
  },
  mounted() {
    // this.getTableData();
    this.getLocationParams();
  }
};
</script>