// src/api/mes/modeStation/modeStation.ts
import request from '@/config/axios'

export interface modeStationVO {
  modeId?: number
  modeName: string
  modeCode: string
  isPreset?: string
  modeTitle?: string
  modeDescription?: string
  isColockSupport?: string
  createTime?: Date
}

export interface PageParam {
  pageNo: number
  pageSize: number
  modeName?: string
  modeTitle?: string
  isPreset?: string
}

// 查询工作流模式列表
export const getWorkflowModePage = async (params: PageParam) => {
  return await request.get({ url: '/iscs/workflow-mode/getWorkflowModePage', params })
}

// 获取工作流模式详细信息
export const selectWorkflowModeById = async (id: number) => {
  return await request.get({ url: '/iscs/workflow-mode/selectWorkflowModeById', params: { id: id } })
}


// 新增工作流模式
export const insertWorkflowMode = async (data: modeStationVO) => {
  return await request.post({ url: '/iscs/workflow-mode/insertWorkflowMode', data })
}

// 修改工作流模式
export const updateWorkflowMode = async (data: modeStationVO) => {
  return await request.put({ url: '/iscs/workflow-mode/updateWorkflowMode', data })
}

// 删除工作流模式
export const deleteWorkflowModeList = async (ids: number) => {
  return await request.delete({
    url: '/iscs/workflow-mode/deleteWorkflowModeList?ids='+ids,
  })
}
