liuyg
2021-09-27 8c6cf205affbbc8ada74f00a7ca25ebca867e9ed
src/views/dispatch/dispatch.vue
@@ -225,8 +225,7 @@
            prop: "deptId",
            type: "tree",
            overHidden: true,
            dicUrl:
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
            dicUrl: "",
            props: {
              label: "title",
              value: "id",
@@ -377,9 +376,12 @@
          },
        ],
      },
      useifid: 266,
    };
  },
  created() {
    var that = this;
    if (this.userInfo.role_name == "保安公司管理员") {
      const deptColumn = this.findObject(this.option.column, "deptId");
      deptColumn.search = false;
@@ -387,6 +389,16 @@
      deptColumn.editDisplay = false;
      deptColumn.viewDisplay = false;
      deptColumn.hide = true;
      this.useifid = this.userInfo.dept_id;
    }
    //公安局进入
    if (this.userInfo.role_name == "公安管理员") {
      that.option.column[1].dicUrl =
        "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
        that.userInfo.jurisdiction;
    } else {
      that.option.column[1].dicUrl =
        "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
    }
  },
  computed: {
@@ -405,9 +417,9 @@
      });
      return ids1.join(",");
    },
        ...mapState({
    ...mapState({
      userInfo: (state) => state.user.userInfo,
        })
    }),
  },
  methods: {
    handleChangeTABS(column) {
@@ -436,7 +448,10 @@
      //   this.$message.success("页码" + val);
    },
    rowSave(form, done, loading) {
      form["deptId"] = this.userInfo.dept_id;
      // form["deptId"] = this.userInfo.dept_id;
      if (this.useifid != 266) {
        form["deptId"] = this.useifid;
      }
      adddata(form).then(
        (res) => {
          this.onLoad(this.page);
@@ -464,6 +479,9 @@
      this.onLoad(this.page);
    },
    rowUpdate(row, index, done, loading) {
      if (this.useifid != 266) {
        row["deptId"] = this.useifid;
      }
      update(row).then(
        () => {
          this.onLoad(this.page);
@@ -575,9 +593,13 @@
          ...this.query,
        };
      }
      console.log(values);
      if (this.useifid != 266) {
        values["deptId"] = this.useifid;
      }
      // console.log(values);
      if (this.userInfo.role_name == "公安管理员") {
        params["jurisdiction"] = that.userInfo.jurisdiction;
      }
      getdata(
        page.currentPage,
        page.pageSize,