| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- import { http } from '@/utils/http/axios';
- import type { tenantFormType } from '@/types/tenant/type';
- /**
- * @description: 租户列表
- */
- export function tenantList(params) {
- return http.request({
- url: '/tenant/list',
- method: 'get',
- params,
- });
- }
- /**
- * @description: 添加租户
- */
- export function addTenant(data) {
- return http.request({
- url: '/tenant/add',
- method: 'post',
- data,
- });
- }
- /**
- * @description: 删除租户
- */
- export function deleteTenant(data) {
- return http.request({
- url: '/tenant/delete',
- method: 'post',
- data,
- });
- }
- /**
- * @description: 编辑租户
- */
- export function editTenant(data) {
- return http.request({
- url: '/tenant/update',
- method: 'post',
- data,
- });
- }
- /**
- * @description: 租户详情
- */
- export function tenantInfo(params) {
- return http.request({
- url: '/tenant/view',
- method: 'get',
- params,
- });
- }
- /** 获取有总部权限时的所有租户 */
- export function getListUseZongbu() {
- return http.request(
- {
- url: '/tenant/listUseZongbu',
- method: 'get',
- },
- { isShowErrorMessage: false, isShowMessage: false },
- );
- }
- /**
- * @description: 查询租户树
- */
- export function queryTenantTreeApi(params: { tenantName: string; tenantCode: string }) {
- return http.request({
- url: '/admin/tenant/queryTenantTree',
- method: 'post',
- params,
- });
- }
- /**
- * @description: 添加租户(新)
- */
- export function saveTenantApi(params: tenantFormType) {
- return http.request({
- url: '/admin/tenant/saveTenant',
- method: 'post',
- params,
- });
- }
- /**
- * @description: 删除租户(新)
- */
- export function deleteTenantApi(tenantId: number) {
- return http.request({
- url: `/admin/tenant/deleteTenant?tenantId=${tenantId}`,
- method: 'post',
- });
- }
- /**
- * @description: 修改租户(新)
- */
- export function updateTenantApi(params: tenantFormType) {
- return http.request({
- url: '/admin/tenant/updateTenant',
- method: 'post',
- params,
- });
- }
- /* V4: 获取租户列表 */
- export function queryListTenant() {
- return http.request(
- {
- url: '/admin/tenant/listTenantForTargetTenant',
- method: 'post',
- },
- { isShowErrorMessage: false, isShowMessage: false },
- );
- }
|