dictionary.js 3.65 KB
import request from "@/utils/request";
//数据字典名称
/**
 * @param
 */
export function getDictNameList() {
  return request({
    url: "/dictionary/queryMain",
    method: "get",
  });
}

//字典表查询
/**
 * @param dictCode 字典名 *
 * @param chineseName 数据名称
 * @param page 页数 null
 * @param size 每页长度 null
 */
export function getDictionaryList(data) {
  return request({
    url: "/dictionary/query",
    method: "post",
    data: data,
  });
}

//serviceCode字典表查询
/**
 * @param
 */
export function getServiceCodeList() {
  return request({
    url: "/dictionary/queryServiceCode",
    method: "get",
  });
}

//新增字典(单条)
/**
 * @param chineseName 字典名称 *
 * @param description 描述
 * @param dictCode 字典表名称 *
 */
export function addDict(data) {
  return request({
    url: "/dictionary/addDict",
    method: "POST",
    data: data,
  });
}

//新增字典(批量)
/**
 * @param nameList 字典名称 * list
 * @param dictCode 字典表名称 *
 */
export function addDictBatch(data) {
  return request({
    url: "/dictionary/addDictBatch",
    method: "POST",
    data: data,
  });
}

//serviceCode子字典添加
/**
 * @param array [{}]
 * @param serviceCodeKey serviceCode父级key *
 * @param serviceCodeValue 字典名称 *
 */
export function addServiceCodeBatch(data) {
  return request({
    url: "/dictionary/addServiceCodeBatch",
    method: "POST",
    data: data,
  });
}

//serviceCode子字典删除
/**
 * @param array []
 * @param serviceCodeValue 字典名称 *
 */
export function delServiceCodeCihild(data) {
  return request({
    url: "/dictionary/delServiceCodeCihild",
    method: "POST",
    data: data,
  });
}

//字典删除
/**
 * @param array []
 * @param id 字典ID *
 */
export function delDict(data) {
  return request({
    url: "/dictionary/delDict",
    method: "POST",
    data: data,
  });
}

//虚拟航班查询
/**
 * @param flightNo 航班名称
 * @param page 页数 null *
 * @param size 每页长度 null *
 */
export function flightType(data) {
  return request({
    url: "/dictionary/flightType",
    method: "post",
    data: data,
  });
}

//虚拟航班新增
/**
 * @param flightNo 航班名称 list *
 */
export function addFlight(data) {
  return request({
    url: "/dictionary/addFlight",
    method: "post",
    data: data,
  });
}

//虚拟航班删除
/**
 * @param flightNo 航班名称 list *
 */
export function delFlight(data) {
  return request({
    url: "/dictionary/delFlight",
    method: "post",
    data: data,
  });
}

//查询航线
/**
 * @param fltNo 航班号
 * @param page 页数
 * @param size 页长
 */
export function queryRoute(data) {
  return request({
    url: "/dictionary/queryRoute",
    method: "post",
    data: data,
  });
}

//新增航线
/**
 * @param fltNo 航班号 *
 * @param route 航线 *
 */
export function addRoute(data) {
  return request({
    url: "/dictionary/addRoute",
    method: "post",
    data: data,
  });
}

//删除航线
/**
 * @param id *
 */
export function delRoute(data) {
  return request({
    url: "/dictionary/delRoute",
    method: "post",
    data: data,
  });
}

//航线排序
/**
 * @param id *
 */
export function orderRoute(data) {
  return request({
    url: "/dictionary/orderRoute",
    method: "post",
    data: data,
  });
}

//航线删除确认
/**
 * @param fltNo 航班号
 * @param route 航线
 */
export function checkFlightRoute(data) {
  return request({
    url: "/FlightPreserveController/checkFlightRoute",
    method: "post",
    data: data,
  });
}

//更新航线
export function updateRoute(data) {
  return request({
    url: `/dictionary/updateRoute`,
    method: "post",
    data: data,
  });
}