设计完成

This commit is contained in:
2025-08-14 16:40:52 +08:00
parent 6a69798ec6
commit a305c5bc19
25 changed files with 459 additions and 1773 deletions

View File

@ -150,11 +150,9 @@ import { ref, reactive, computed, onMounted, toRefs } from 'vue';
import { getCurrentInstance } from 'vue';
import type { ComponentInternalInstance } from 'vue';
import { useUserStoreHook } from '@/store/modules/user';
import { listUserByDeptId } from '@/api/system/user';
import { ElMessage, ElLoading } from 'element-plus';
import { Delete } from '@element-plus/icons-vue';
import { designUserAdd, designUserList, systemUserList } from '@/api/design/appointment';
import { disable } from 'ol/rotationconstraint';
// 获取当前实例
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@ -194,7 +192,6 @@ const getDeptAllUser = async (deptId: any) => {
userList.value = res.rows;
} catch (error) {
ElMessage.error('获取用户列表失败');
} finally {
}
};
@ -374,10 +371,21 @@ const resetForm = () => {
ElMessage.info('表单已重置');
}
};
//监听项目id刷新数据
const listeningProject = watch(
() => currentProject.value?.id,
(nid, oid) => {
getDeptAllUser(userStore.deptId).then(() => {
designUser();
});
}
);
onUnmounted(() => {
listeningProject();
});
// 页面挂载时初始化数据
onMounted(() => {
console.log(userStore.deptId);
// 先获取用户列表,再加载表单数据
getDeptAllUser(userStore.deptId).then(() => {
designUser();