| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- import request from '@/utils/request';
- // ==================== 部门管理 ====================
- /**
- * 查询部门树
- */
- export function getDeptTree() {
- return request({
- url: '/customer/organization/dept/tree',
- method: 'get'
- });
- }
- /**
- * 查询部门列表
- */
- export function getDeptList(params?: any) {
- return request({
- url: '/customer/organization/dept/list',
- method: 'get',
- params: params
- });
- }
- /**
- * 查询部门详情
- */
- export function getDeptInfo(id: number) {
- return request({
- url: `/customer/organization/dept/${id}`,
- method: 'get'
- });
- }
- /**
- * 新增部门
- */
- export function addDept(data: any) {
- return request({
- url: '/customer/organization/dept',
- method: 'post',
- data: data
- });
- }
- /**
- * 修改部门
- */
- export function updateDept(data: any) {
- return request({
- url: '/customer/organization/dept',
- method: 'put',
- data: data
- });
- }
- /**
- * 删除部门
- */
- export function deleteDept(ids: number[]) {
- return request({
- url: `/customer/organization/dept/${ids.join(',')}`,
- method: 'delete'
- });
- }
- // ==================== 人员管理 ====================
- /**
- * 获取当前登录用户的个人信息
- */
- export function getCurrentUserInfo() {
- return request({
- url: '/customer/organization/contact/current',
- method: 'get'
- });
- }
- /**
- * 查询联系人列表
- */
- export function getContactList(params?: any) {
- return request({
- url: '/customer/organization/contact/list',
- method: 'get',
- params: params
- });
- }
- /**
- * 查询联系人详情
- */
- export function getContactInfo(id: number | string) {
- return request({
- url: `/customer/organization/contact/${id}`,
- method: 'get'
- });
- }
- /**
- * 新增联系人
- */
- export function addContact(data: any) {
- return request({
- url: '/customer/organization/contact',
- method: 'post',
- data: data
- });
- }
- /**
- * 修改联系人
- */
- export function updateContact(data: any) {
- return request({
- url: '/customer/organization/contact',
- method: 'put',
- data: data
- });
- }
- /**
- * 删除联系人
- */
- export function deleteContact(ids: number[]) {
- return request({
- url: `/customer/organization/contact/${ids.join(',')}`,
- method: 'delete'
- });
- }
- /**
- * 修改主联系人
- * @param id
- */
- export function changeIsPrimary(id: string | number, isPrimary: string) {
- const data = {
- id,
- isPrimary
- };
- return request({
- url: '/customer/organization/contact/changeIsPrimary',
- method: 'put',
- data: data
- });
- }
- // ==================== 角色管理 ====================
- /**
- * 查询角色列表
- */
- export function getRoleList(params?: any) {
- return request({
- url: '/system/organization/role/list',
- method: 'get',
- params: params
- });
- }
- /**
- * 查询角色详情
- */
- export function getRoleInfo(id: number) {
- return request({
- url: `/system/organization/role/${id}`,
- method: 'get'
- });
- }
- /**
- * 新增角色
- */
- export function addRole(data: any) {
- return request({
- url: '/system/organization/role',
- method: 'post',
- data: data
- });
- }
- /**
- * 修改角色
- */
- export function updateRole(data: any) {
- return request({
- url: '/system/organization/role',
- method: 'put',
- data: data
- });
- }
- /**
- * 删除角色
- */
- export function deleteRole(ids: number[]) {
- return request({
- url: `/system/organization/role/${ids.join(',')}`,
- method: 'delete'
- });
- }
- // ==================== 人员管理 ====================
- /**
- * 查询人员列表
- */
- export function getComStaffList(params?: any) {
- return request({
- url: '/system/organization/comStaff/list',
- method: 'get',
- params: params
- });
- }
- /**
- * 查询人员详情
- */
- export function getComStaffInfo(id: number) {
- return request({
- url: `/system/organization/comStaff/${id}`,
- method: 'get'
- });
- }
- /**
- * 新增人员
- */
- export function addComStaff(data: any) {
- return request({
- url: '/system/organization/comStaff',
- method: 'post',
- data: data
- });
- }
- /**
- * 修改人员
- */
- export function updateComStaff(data: any) {
- return request({
- url: '/system/organization/comStaff',
- method: 'put',
- data: data
- });
- }
- /**
- * 删除人员
- */
- export function deleteComStaff(ids: number[]) {
- return request({
- url: `/system/organization/comStaff/${ids.join(',')}`,
- method: 'delete'
- });
- }
|