shikeying
2023-03-10 31b647535e49f0a7b85d87a8c1e34c5ab92ca9d0
src/views/system/user/index.vue
@@ -425,7 +425,7 @@
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        pageSize: 15,
        userName: undefined,
        phonenumber: undefined,
        status: undefined,
@@ -498,10 +498,18 @@
      );
    },
    /** 查询部门下拉树结构 */
    getTreeselect() {
      treeselect(this.queryParams.deptId).then(response => {
    getTreeselect(deptId) {
      // treeselect(this.queryParams.deptId).then(response => {
      //   this.deptOptions = response.data;
      // });
      if(deptId == undefined || deptId == ""){
        this.$modal.alert("请选择一个部门");
        return false;
      }
      treeselect(deptId).then(response => {
        this.deptOptions = response.data;
      });
      return true;
    },
    // 2022-12-08,加载顶级机构树列表
@@ -594,7 +602,9 @@
      //   this.$modal.msgSuccess("请先选择一个顶级机构");
      //   return;
      // }
      this.getTreeselect();
      if(!this.getTreeselect(this.queryParams.deptId)){
        return;
      }
      // getUser().then(response => {
      getNewUserRoles(this.queryParams.deptId).then(response => {
        // this.postOptions = response.posts;
@@ -603,11 +613,12 @@
        this.title = "添加用户";
        this.form.password = this.initPassword;
      });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      this.getTreeselect();
      // this.getTreeselect();
      // const userId = row.id || this.ids;
      const userId = row.id;
      getUser(userId).then(response => {
@@ -619,6 +630,7 @@
        this.open = true;
        this.title = "修改用户";
        this.form.password = "";
        this.getTreeselect(this.form.dept_id);
      });
    },
    /** 重置密码按钮操作 */