WXL
2024-08-30 c73a2c380aca7ac4ef16e76388b1a52356df8634
src/views/system/user/index.vue
@@ -307,8 +307,9 @@
          <el-col :span="12">
            <el-form-item label="归属部门" prop="deptId">
              <treeselect
                v-model="form.deptId"
                v-model="deptIds"
                :options="deptOptions"
                :multiple="true"
                :show-count="true"
                placeholder="请选择归属部门"
              />
@@ -536,6 +537,7 @@
      initPassword: undefined,
      // 日期范围
      dateRange: [],
      deptIds: [],
      // 岗位选项
      postOptions: [],
      // 角色选项
@@ -746,9 +748,11 @@
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      this.deptIds = [];
      const userId = row.userId || this.ids;
      getUser(userId).then((response) => {
        this.form = response.data;
        this.postOptions = response.posts;
        this.roleOptions = response.roles;
        this.$set(this.form, "postIds", response.postIds);