兰宝车间质量管理系统-前端
疯狂的狮子Li
2024-07-09 ba24afce52bcdffdbccf6475544c79c4eefcd14e
src/views/system/user/index.vue
@@ -158,6 +158,7 @@
                value-key="id"
                placeholder="请选择归属部门"
                check-strictly
                @change="handleDeptChange"
              />
            </el-form-item>
          </el-col>
@@ -287,10 +288,11 @@
import { UserForm, UserQuery, UserVO } from '@/api/system/user/types';
import { DeptVO } from '@/api/system/dept/types';
import { RoleVO } from '@/api/system/role/types';
import { PostVO } from '@/api/system/post/types';
import { PostQuery, PostVO } from '@/api/system/post/types';
import { treeselect } from '@/api/system/dept';
import { globalHeaders } from '@/utils/request';
import { to } from 'await-to-js';
import { optionselect } from '@/api/system/post';
const router = useRouter();
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -592,6 +594,7 @@
  roleOptions.value = data.roles;
  form.value.password = initPassword.value.toString();
};
/** 修改按钮操作 */
const handleUpdate = async (row?: UserForm) => {
  reset();
@@ -645,6 +648,12 @@
    initPassword.value = response.data;
  });
});
async function handleDeptChange(value: number | string) {
  const response = await optionselect(value);
  postOptions.value = response.data;
  form.value.postIds = [];
}
</script>
<style lang="scss" scoped></style>