'/@/utils/http/axios' から { defHttp } をインポートします。
// enum API {
//DepartmentTreeData = '/管轄区域/部門/ツリー',
// addDepartment = '/管轄区域/部門',
// getDepartmentNameById = '/管轄区域/部門/名前ルーター',
// UserDepartmentPageList = '/管轄区域/ユーザー/ページ',
//DepartmentFullName = '/管轄区域/部門/名前-ルーター',
// userDepartmentAddUser = '/管轄区域/ユーザー',
// 部門ユーザーリセットパス = '/管轄区域/ユーザー/パスワード',
// RoleDepartmentPageList = '/管轄区域/役割/ページ',
// 部門UserAssginRole = '/管轄区域/ユーザー/役割',
// roleDepartmentAddRole = '/管轄区域/役割',
// roleDepartmentAssignUser = '/管轄区域/役割/ユーザー',
// roleDepartmentAssignPCMenu = '/menu/role/pc',
// roleDepartmentAssignMobileMenu = '/menu/role/mobile',
// getPcMenuByRoleId = '/menu/role/pc',
// getMobileMenuByRoleId = '/menu/role/mobile',
// userUrl = '/管轄区域/ユーザー',
// }
enum API {
DepartmentTreeData = '/オプション/コーダー/ページ',
addDepartment = '/管轄区域/部門',
getDepartmentNameById = '/管轄区域/部門/ルーター名',
UserDepartmentPageList = '/option/coder/page',
DepartmentFullName = '/管轄区域/部門/名前-ルーター',
userDepartmentAddUser = '/管轄区域/ユーザー',
デパートメントユーザーリセットパス = '/管轄区域/ユーザー/パスワード',
RoleDepartmentPageList = '/管轄区域/役割/ページ',
部門UserAssginRole = '/管轄区域/ユーザー/役割',
roleDepartmentAddRole = '/管轄区域/役割',
roleDepartmentAssignUser = '/管轄区域/役割/ユーザー',
roleDepartmentAssignPCMenu = '/menu/role/pc',
roleDepartmentAssignMobileMenu = '/menu/role/mobile',
getPcMenuByRoleId = '/メニュー/役割/pc',
getMobileMenuByRoleId = '/menu/role/mobile',
userUrl = '/管轄区域/ユーザー',
}
/**
* @description: ユーザー管理・編集ステータス
*/
エクスポート関数 patchUserEnable(id, params) {
return defHttp.patch({
URL: `${Api.userUrl}/enabled/${id}`、
パラメータ、
});
}
/**
* @description: 部門管理 - リストデータの取得
*/
エクスポート関数 getDepartmentTreeData() {
return defHttp.get({
URL: API.DepartmentTreeData、
});
}
/**
* @description: 部門管理 - 部門の追加
*/
エクスポート関数 addDepartment(params) {
return defHttp.post({
URL: API.addDepartment、
パラメータ、
});
}
/**
* @description: 部門管理-編集部
*/
エクスポート関数 editDepartment(id, params) {
return defHttp.put({
URL: `${Api.addDepartment}/${id}`、
パラメータ、
});
}
/**
* @description: 部門管理 - 部門の削除
*/
エクスポート関数removeDepartment(id) {
return defHttp.delete({
URL: `${Api.addDepartment}/${id}`、
});
}
/**
* @description: 部門管理 - 指定した部門名のルーティングコレクションを取得
*/
エクスポート関数 getDepartmentNameById(id) {
return defHttp.get({
URL: `${Api.getDepartmentNameById}/${id}`、
});
}
/**
* @description: ユーザー管理 - リストデータの取得
*/
エクスポート関数 getUserDepartmentPageList(params) {
// params を処理し、params.Department を削除します
params.デパートメント && 削除 params.デパートメント;
return defHttp.get({
URL: API.UserDepartmentPageList、
パラメータ、
});
}
/**
* @description: ユーザー管理 - ID に基づいて部門のフルネームを取得します
*/
エクスポート関数 getDepartmentFullNameByIds(ids) {
return defHttp.get({
URL: `${Api.DepartmentFullName}/${ids}`、
});
}
/**
* @description: ユーザー管理 - ユーザーの追加
*/
エクスポート関数 userDepartmentAddUser(params) {
return defHttp.post({
URL: Api.userDepartmentAddUser、
パラメータ、
});
}
/**
* @description: ユーザー管理 - ユーザーの編集
*/
エクスポート関数 editDepartmentAddUser(id, params) {
return defHttp.put({
URL: `${Api.userDepartmentAddUser}/${id}`、
パラメータ、
});
}
/**
* @description: ユーザー管理 - パスワードのリセット
*/
エクスポート関数部門UserResetPass(id) {
return defHttp.patch({
URL: `${Api.DepartmentUserResetPass}/${id}`、
});
}
/**
* @description: ユーザー管理 - ユーザーの削除
*/
エクスポート関数DepartmentUserRemove(id) {
return defHttp.delete({
URL: `${Api.userDepartmentAddUser}/${id}`、
});
}
/**
* @description: ユーザー管理 - ロールの割り当て
*/
エクスポート関数部門UserAssginRole(id, params) {
return defHttp.post({
URL: `${Api.DepartmentUserAssginRole}/${id}`、
パラメータ、
});
}
/**
* @description: ユーザー管理 - ロールのキャンセル
*/
エクスポート関数DepartmentUserRemoveRole(id, params) {
return defHttp.patch({
URL: `${Api.DepartmentUserAssginRole}/${id}`、
パラメータ、
});
}
/**
* @description: ロール管理 - リストデータの取得
*/
エクスポート関数 getRoleDepartmentPageList(params) {
return defHttp.get({
URL: API.RoleDepartmentPageList、
パラメータ、
});
}
/**
* @description: ロール管理 - ロールの追加
*/
エクスポート関数 roleDepartmentAddRole(params) {
return defHttp.post({
URL: Api.roleDepartmentAddRole、
パラメータ、
});
}
/**
* @description: ロール管理 - ロールの編集
*/
エクスポート関数 roleDepartmentEditRole(id, params) {
return defHttp.put({
URL: `${Api.roleDepartmentAddRole}/${id}`,
パラメータ、
});
}
/**
* @description: ロール管理 - ロールの削除
*/
エクスポート関数 roleDepartmentRemoveRole(id) {
return defHttp.delete({
URL: `${Api.roleDepartmentAddRole}/${id}`,
});
}
/**
* @description: ロール管理 - ユーザーの割り当て
*/
エクスポート関数 roleDepartmentAssignUser(id, params) {
return defHttp.post({
URL: `${Api.roleDepartmentAssignUser}/${id}`、
パラメータ、
});
}
/**
* @description: ロール管理 - ユーザーのキャンセル
*/
エクスポート関数 roleDepartmentRemoveUser(id, params) {
return defHttp.patch({
URL: `${Api.roleDepartmentAssignUser}/${id}`、
パラメータ、
});
}
/**
* @description: 役割管理 - PC の割り当てサイドメニュー
*/
エクスポート関数 roleDepartmentAssignPCMenu(id, params) {
return defHttp.post({
URL: `${Api.roleDepartmentAssignPCMenu}/${id}`、
パラメータ、
});
}
/**
* @description: 役割管理 - PC メニューをキャンセルします
*/
エクスポート関数 roleDepartmentRemovePCMenu(id, params) {
return defHttp.patch({
URL: `${Api.roleDepartmentAssignPCMenu}/${id}`、
パラメータ、
});
}
/**
* @description: ロール管理 - モバイルメニューの割り当て
*/
エクスポート関数 roleDepartmentAssignMobileMenu(id, params) {
return defHttp.post({
URL: `${Api.roleDepartmentAssignMobileMenu}/${id}`、
パラメータ、
});
}
/**
* @description: ロール管理 - モバイル メニューのロック解除
*/
エクスポート関数 roleDepartmentRemoveMobileMenu(id, params) {
return defHttp.patch({
URL: `${Api.roleDepartmentAssignMobileMenu}/${id}`、
パラメータ、
});
}
/**
* @description: ロール管理 - 指定したロールのPCメニューコレクションを取得
*/
エクスポート関数 getPcMenuByRoleId(id) {
return defHttp.get({
URL: `${Api.getPcMenuByRoleId}/${id}`、
});
}
/**
* @description: ロール管理 - 指定されたロールのモバイル メニュー コレクションを取得します
*/
エクスポート関数 getMobileMenuByRoleId(id) {
return defHttp.get({
URL: `${Api.getMobileMenuByRoleId}/${id}`、
});
}