Newer
Older
Nanping_sponge_SJJC / src / api / business / floodControlDepartment.js
@liyingjing liyingjing on 25 Oct 2023 2 KB 数据检测
import request from '@/utils/request'

// 查询防汛部门信息分页
export function pagefloodControlDepartment (query) {
  return request({
    url: '/business/floodControlDepartment/page',
    method: 'get',
    params: query
  })
}

// 查询防汛部门信息列表
export function listfloodControlDepartment (query) {
  return request({
    url: '/business/floodControlDepartment/list',
    method: 'get',
    params: query
  })
}

// 查询防汛部门信息详细
export function getfloodControlDepartment (id) {
  return request({
    url: '/business/floodControlDepartment/' + id,
    method: 'get'
  })
}

// 新增防汛部门信息
export function addfloodControlDepartment (data) {
  return request({
    url: '/business/floodControlDepartment/add',
    method: 'post',
    data: data
  })
}

// 修改防汛部门信息
export function updatefloodControlDepartment (data) {
  return request({
    url: '/business/floodControlDepartment/edit',
    method: 'put',
    data: data
  })
}

// 删除防汛部门信息
export function delfloodControlDepartment (id) {
  return request({
    url: '/business/floodControlDepartment/' + id,
    method: 'delete'
  })
}


// 获得单纯的部门信息树结构
export const gettreeOrgin = (name) => {
  return request({
    url: `/business/floodControlDepartment/treeOrgin?name=${name}`,
    method: "get"
  });
};


// 通过部门id查询已绑定的人员列表 
export const getpersonlist = (departmentId) => {
  return request({
    url: `/business//floodControlDepartmentPersonnel/listByDepId`,
    method: "post",
    params: {
      departmentId
    }
  });
};


// 需要删除的人员id 删除时传id 回显时用userId
export const batchRemove = (params) => {
  return request({
    url: `/business/floodControlDepartmentPersonnel/batchRemove`,
    method: "post",
    data: params

  });
};

//  部门id+用户信息数组
export const batchSave = (params) => {
  return request({
    url: `/business/floodControlDepartmentPersonnel/batchSave`,
    method: "post",
    data: params
  });
};


//查看部门详情带人员信息
export const getDetail = (id) => {
  return request({
    url: `/business/floodControlDepartment/${id}`,
    method: "get",

  });
};