提交 598901dd authored 作者: leon's avatar leon

医生管理 如果是经销商,只能看到自己的数据

上级 629edaeb
......@@ -63,7 +63,6 @@ export const useUserStore = defineStore({
},
/**
* @description 经销商id 华润是0 其他不是
* @return true是 , false不是 ,null用户信息为空
*/
getDistributorId(): number | null {
return this.userInfo?.distributorId || getAuthCache<User>(USER_INFO_KEY)?.distributorId || null;
......
......@@ -134,6 +134,8 @@
checkedKeys.value = selectedRowKeys;
};
const userStore = useUserStore();
const [registerDrawer, { openDrawer }] = useDrawer();
const [registerTable, { reload }] = useTable({
title: '医生管理',
......@@ -185,6 +187,12 @@
}
}
});
// 如果是经销商,只能看到自己的数据
if (userStore.getDistributorId !== 0) {
handledParams.distributorId = userStore.getDistributorId;
} else if (userStore.getDistributorId == null) {
handledParams.distributorId = -1;
}
return handledParams;
};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论