修改部门获取项目列表
This commit is contained in:
@ -28,7 +28,6 @@ const getSelectedProjectFromStorage = () => {
|
||||
const getProjectTeamListFromStorage = () => {
|
||||
const stored = $cache.local.getJSON('ProjectTeamList');
|
||||
console.log('获取缓存的项目班组列表:', stored);
|
||||
|
||||
return stored ? stored : null;
|
||||
};
|
||||
|
||||
|
@ -324,6 +324,7 @@ import { globalHeaders } from '@/utils/request';
|
||||
import { to } from 'await-to-js';
|
||||
import { getProjectByDeptId, getRoleList, optionselect } from '@/api/system/post';
|
||||
import ShuttleFrame from '../../project/projectRelevancy/component/ShuttleFrame.vue';
|
||||
import { listProject } from '@/api/project/project';
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
@ -484,6 +485,8 @@ const getDeptTree = async () => {
|
||||
const res = await api.deptTreeSelect({ isShow: '1' });
|
||||
deptOptions.value = res.data;
|
||||
enabledDeptOptions.value = filterDisabledDept(res.data);
|
||||
const projectList = await listProject();
|
||||
projectOptions.value = projectList.rows;
|
||||
};
|
||||
|
||||
/** 过滤禁用的部门 */
|
||||
@ -672,8 +675,6 @@ const handleUpdate = async (row?: UserForm) => {
|
||||
form.value.projectRoles = data.projectRoles;
|
||||
form.value.password = '';
|
||||
const roleList = await getRoleList(form.value.deptId);
|
||||
const projectList = await getProjectByDeptId(form.value.deptId);
|
||||
projectOptions.value = projectList.data;
|
||||
|
||||
roleOptions.value = roleList.data;
|
||||
};
|
||||
@ -736,8 +737,6 @@ onMounted(() => {
|
||||
async function handleDeptChange(value: number | string) {
|
||||
const response = await optionselect(value);
|
||||
const roleList = await getRoleList(value);
|
||||
const projectList = await getProjectByDeptId(value);
|
||||
projectOptions.value = projectList.data;
|
||||
|
||||
roleOptions.value = roleList.data;
|
||||
postOptions.value = response.data;
|
||||
|
Reference in New Issue
Block a user