|
@@ -24,6 +24,7 @@ import type {
|
|
|
ChangeState,
|
|
|
CharacterPageItem,
|
|
|
CharacterPageItemData,
|
|
|
+ CharacterParams,
|
|
|
CoolingHistoryDataQuery,
|
|
|
CoolingHistoryDataResult,
|
|
|
CoolingRealTimeDataQuery,
|
|
@@ -114,6 +115,7 @@ import type {
|
|
|
TempHumidityControlSettings,
|
|
|
TreeStructure,
|
|
|
UploadLogo,
|
|
|
+ UserPageItemData,
|
|
|
UserPageParams,
|
|
|
VerificationAgreement,
|
|
|
VerificationEquipment,
|
|
@@ -195,6 +197,21 @@ export const getFindRolesByOrgIds = async (params: number[]) => {
|
|
|
};
|
|
|
|
|
|
// 角色信息表
|
|
|
+
|
|
|
+export const addCharacter = async (params: CharacterParams) => {
|
|
|
+ await request(apiSys('/sysRole/add'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+export const updateCharacter = async (params: CharacterParams) => {
|
|
|
+ await request(apiSys('/sysRole/update'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
export const getCharacterPageList = async (params: PageParams) => {
|
|
|
const data = await request<CharacterPageItemData>(apiSys('/sysRole/getPageList'), {
|
|
|
method: 'POST',
|
|
@@ -203,6 +220,12 @@ export const getCharacterPageList = async (params: PageParams) => {
|
|
|
return data;
|
|
|
};
|
|
|
|
|
|
+export const deleteCharacter = async (id: number) => {
|
|
|
+ await request(apiSys(`/sysRole/delete/${id}`), {
|
|
|
+ method: 'POST',
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
// 组织表
|
|
|
export const addOrganization = async (params: OrganizationItem) => {
|
|
|
const data = await request<number>(apiSys('/sysOrg/add'), {
|
|
@@ -213,7 +236,7 @@ export const addOrganization = async (params: OrganizationItem) => {
|
|
|
};
|
|
|
|
|
|
export const updateOrganization = async (params: OrganizationItem) => {
|
|
|
- request<number>(apiSys('/sysOrg/update'), {
|
|
|
+ await request<number>(apiSys('/sysOrg/update'), {
|
|
|
method: 'POST',
|
|
|
body: JSON.stringify(params),
|
|
|
});
|
|
@@ -236,14 +259,28 @@ export const getSubOrgsByToken = async () => {
|
|
|
|
|
|
// 用户信息表
|
|
|
export const addAccount = async (params: AccountParams) => {
|
|
|
- request(apiSys('/sysUser/add'), {
|
|
|
+ await request(apiSys('/sysUser/add'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+export const updateAccount = async (params: AccountParams) => {
|
|
|
+ await request(apiSys('/sysUser/update'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+export const batchDeleteAccount = async (params: number[]) => {
|
|
|
+ await request(apiSys('/sysUser/batchDelete/'), {
|
|
|
method: 'POST',
|
|
|
body: JSON.stringify(params),
|
|
|
});
|
|
|
};
|
|
|
|
|
|
export const getUserPageList = async (params: UserPageParams) => {
|
|
|
- const data = await request<number>(apiSys('/sysUser/getPageList'), {
|
|
|
+ const data = await request<UserPageItemData>(apiSys('/sysUser/getPageList'), {
|
|
|
method: 'POST',
|
|
|
body: JSON.stringify(params),
|
|
|
});
|