liuyg
2021-09-28 1bd38da39fe35fc20905ee82fa5de4ba8a2862d5
src/views/securityCompany/computents/service.vue
@@ -23,7 +23,7 @@
import { getdatas } from "@/api/securityCompany/securityCompany";
import { mapGetters } from "vuex";
export default {
  props: ["form"],
  props: ["form", "refresh"],
  data() {
    return {
      serviceOption: {
@@ -53,10 +53,10 @@
          {
            label: "派遣单位名称",
            prop: "name",
            // search: true,
            search: true,
            searchLabelWidth: 110,
            overHidden: true,
            searchSpan: 4,
            searchSpan: 5,
            width: 210,
            // span: 12,
            labelWidth: 138,
@@ -93,7 +93,7 @@
            labelWidth: 138,
            width: 230,
            searchLabelWidth: 80,
            search: true,
            // search: true,
            searchSpan: 4,
            // editDisplay: false,
            // addDisplay: false,
@@ -138,7 +138,7 @@
            prop: "jurisdiction",
            // hide: true,
            searchLabelWidth: 80,
            search: true,
            // search: true,
            searchSpan: 4,
            overHidden: true,
            labelWidth: 138,
@@ -290,10 +290,21 @@
      },
      serviceQuery: {},
      serviceSelectionList: [],
      departmentids: "",
    };
  },
  watch: {
    refresh() {
      this.$refs.serviceCrud.refreshTable();
      this.$refs.serviceCrud.doLayout();
    },
  },
  created() {
    var that = this;
    // console.log(this.form);
    this.departmentids = {
      deptId: this.form.departmentid,
    };
    if (this.userInfo.role_name == "保安公司管理员") {
      const deptColumn = this.findObject(this.serviceOption.column, "deptId");
      deptColumn.search = false;
@@ -301,16 +312,22 @@
      deptColumn.editDisplay = false;
      deptColumn.viewDisplay = false;
      deptColumn.hide = true;
      this.useifid = this.userInfo.dept_id;
      this.departmentids = {
        deptId: this.userInfo.dept_id,
      };
    }
    //公安局进入
    if (this.userInfo.role_name == "公安管理员") {
      that.serviceOption.column[1].dicUrl =
        "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
        that.userInfo.jurisdiction;
      this.departmentids = {
        jurisdiction: this.userInfo.jurisdiction,
      };
    } else {
      that.serviceOption.column[1].dicUrl =
        "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
      that.serviceOption.column[1].value = this.form.departmentid;
    }
  },
  mounted() {
@@ -326,11 +343,15 @@
    serviceOnLoad(page, params = {}) {
      // console.log(this.form.departmentid, "serviceData");
      this.serviceLoading = true;
      params = {
        ...params,
        ...this.departmentids,
      };
      // console.log(params);
      getdatas(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.serviceQuery),
        this.form.departmentid
        Object.assign(params, this.serviceQuery)
      ).then((res) => {
        const data = res.data.data;