update 删除无用代码

This commit is contained in:
疯狂的狮子Li 2024-12-17 09:41:11 +08:00
parent 1f93137b80
commit f5410dfff4

View File

@ -579,15 +579,6 @@ function submitFileForm() {
uploadRef.value?.submit();
}
/** 初始化部门数据 */
const initTreeData = async () => {
//
if (deptOptions.value === undefined) {
const { data } = await treeselect();
deptOptions.value = data;
}
};
/** 重置操作表单 */
const reset = () => {
form.value = { ...initFormData };
@ -605,7 +596,6 @@ const handleAdd = async () => {
const { data } = await api.getUser();
dialog.visible = true;
dialog.title = '新增用户';
await initTreeData();
postOptions.value = data.posts;
roleOptions.value = data.roles;
form.value.password = initPassword.value.toString();
@ -618,7 +608,6 @@ const handleUpdate = async (row?: UserForm) => {
const { data } = await api.getUser(userId);
dialog.visible = true;
dialog.title = '修改用户';
await initTreeData();
Object.assign(form.value, data.user);
postOptions.value = data.posts;
roleOptions.value = data.roles;