Commit e795a65d9ae05b8499136ba2f95dba69864d7df8

Authored by sqy
1 parent ad6bb0b4

fix:修复租户删除问题

@@ -20,7 +20,7 @@ export const getMenuList = () => { @@ -20,7 +20,7 @@ export const getMenuList = () => {
20 if (userStore.getRoleList.find((v) => v == RoleEnum.ROLE_SYS_ADMIN)) { 20 if (userStore.getRoleList.find((v) => v == RoleEnum.ROLE_SYS_ADMIN)) {
21 url = Api.SysAdminMenuList; 21 url = Api.SysAdminMenuList;
22 } 22 }
23 - return defHttp.get<getMenuListResultModel>({ url: url }); 23 + return defHttp.get<getMenuListResultModel>({ url });
24 }; 24 };
25 25
26 export const delMenu = (menuIds: string[]) => { 26 export const delMenu = (menuIds: string[]) => {
@@ -29,5 +29,5 @@ export const delMenu = (menuIds: string[]) => { @@ -29,5 +29,5 @@ export const delMenu = (menuIds: string[]) => {
29 }; 29 };
30 export const getMenusIdsByRoleId = (roleId: string) => { 30 export const getMenusIdsByRoleId = (roleId: string) => {
31 const url = Api.GetMenuIdsByRoleId + roleId; 31 const url = Api.GetMenuIdsByRoleId + roleId;
32 - return defHttp.get<Array<string>>({ url: url }); 32 + return defHttp.get<Array<string>>({ url });
33 }; 33 };
@@ -68,7 +68,9 @@ export async function updateOrCreateTenant(params: TenantRequestDTO) { @@ -68,7 +68,9 @@ export async function updateOrCreateTenant(params: TenantRequestDTO) {
68 68
69 export async function deleteTenant(tenantIds: Array<string>) { 69 export async function deleteTenant(tenantIds: Array<string>) {
70 await defHttp.delete({ 70 await defHttp.delete({
71 - data: tenantIds, 71 + data: {
  72 + ids: tenantIds,
  73 + },
72 url: Api.deleteTenant, 74 url: Api.deleteTenant,
73 }); 75 });
74 } 76 }
@@ -94,7 +94,8 @@ @@ -94,7 +94,8 @@
94 await updateSchema({ field: 'title', componentProps: { disabled: false } }); 94 await updateSchema({ field: 'title', componentProps: { disabled: false } });
95 //如果是编辑操作,设置页面数据 95 //如果是编辑操作,设置页面数据
96 if (unref(isUpdate)) { 96 if (unref(isUpdate)) {
97 - getTenantRoles(data.record.tenantCode).then((result) => { 97 + console.log(data.record);
  98 + getTenantRoles(data.record.tenantId).then((result) => {
98 Reflect.set(data.record, 'roleIds', result); 99 Reflect.set(data.record, 'roleIds', result);
99 //为表单赋值 100 //为表单赋值
100 setFieldsValue({ 101 setFieldsValue({
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
77 export default defineComponent({ 77 export default defineComponent({
78 components: { BasicTable, TableImg, Tag, TableAction, TenantDrawer, TenantAdminDrawer }, 78 components: { BasicTable, TableImg, Tag, TableAction, TenantDrawer, TenantAdminDrawer },
79 setup() { 79 setup() {
80 - const [tenantDrawer, { openDrawer: openDrawer }] = useDrawer(); 80 + const [tenantDrawer, { openDrawer }] = useDrawer();
81 const [tenantAdminDrawer, { openDrawer: openTenantAdminDrawer }] = useDrawer(); 81 const [tenantAdminDrawer, { openDrawer: openTenantAdminDrawer }] = useDrawer();
82 82
83 function handleDelete(record: Recordable) { 83 function handleDelete(record: Recordable) {