新增tenant接口
This commit is contained in:
@@ -37,6 +37,18 @@ export function getDept(deptId: string | number) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询部门详细
|
||||||
|
* @param deptId 部门ID
|
||||||
|
* @returns object
|
||||||
|
*/
|
||||||
|
export function getTenant(deptId: string | number) {
|
||||||
|
return request({
|
||||||
|
url: `/system/tenant/${deptId}`,
|
||||||
|
method: 'get',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增部门
|
* 新增部门
|
||||||
* @param data 部门对象
|
* @param data 部门对象
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { ColumnsType } from 'ant-design-vue/lib/table';
|
|||||||
import {
|
import {
|
||||||
listDept,
|
listDept,
|
||||||
getDept,
|
getDept,
|
||||||
|
getTenant,
|
||||||
delDept,
|
delDept,
|
||||||
addDept,
|
addDept,
|
||||||
updateDept,
|
updateDept,
|
||||||
@@ -225,7 +226,7 @@ function fnModalVisibleByVive(deptId: string | number) {
|
|||||||
if (modalState.confirmLoading) return;
|
if (modalState.confirmLoading) return;
|
||||||
const hide = message.loading(t('common.loading'), 0);
|
const hide = message.loading(t('common.loading'), 0);
|
||||||
modalState.confirmLoading = true;
|
modalState.confirmLoading = true;
|
||||||
getDept(deptId).then(res => {
|
getTenant(deptId).then(res => {
|
||||||
modalState.confirmLoading = false;
|
modalState.confirmLoading = false;
|
||||||
hide();
|
hide();
|
||||||
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
if (res.code === RESULT_CODE_SUCCESS && res.data) {
|
||||||
@@ -267,7 +268,7 @@ function fnModalVisibleByEdit(
|
|||||||
const hide = message.loading(t('common.loading'), 0);
|
const hide = message.loading(t('common.loading'), 0);
|
||||||
modalState.confirmLoading = true;
|
modalState.confirmLoading = true;
|
||||||
// 获取部门信息同时查询部门列表(排除节点)
|
// 获取部门信息同时查询部门列表(排除节点)
|
||||||
Promise.all([getDept(deptId), listDeptExcludeChild(deptId)])
|
Promise.all([getTenant(deptId), listDeptExcludeChild(deptId)])
|
||||||
.then(resArr => {
|
.then(resArr => {
|
||||||
if (resArr[0].code === RESULT_CODE_SUCCESS && resArr[0].data) {
|
if (resArr[0].code === RESULT_CODE_SUCCESS && resArr[0].data) {
|
||||||
modalState.from = Object.assign(modalState.from, resArr[0].data);
|
modalState.from = Object.assign(modalState.from, resArr[0].data);
|
||||||
|
|||||||
Reference in New Issue
Block a user