You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
import http from 'libs/http'
interface Craft { id?: number name?: string steps?: string oresId?: number }
export const getCraftList = (params: { oresId: string }): Promise<CraftTypes.Craft[]> => http.get(`/crafts/list/${params.oresId}`)
export const createCraft = (params: Craft): Promise<null> => http.post('/crafts', params)
export const updateCraft = (params: Craft): Promise<null> => http.put(`/crafts`, params)
export const delCraft = (ids: string): Promise<null> => http.delete(`/crafts/${ids}`)
// 开始执行工艺
export const startCraft = (params: { heatId: string }): Promise<null> => http.post(`/crafts/start`, params) export const pauseCraft = (params: { heatId: string }): Promise<null> => http.post(`/crafts/pause`, params) export const resumeCraft = (params: { heatId: string }): Promise<null> => http.post(`/crafts/resume`, params)
export const stopCraft = (params: { heatId: string }): Promise<null> => http.post(`/crafts/stop`, params)
// 加热区配置工艺
export const setCraft = (params: { heatId?: string | number, craftId?: string | number }): Promise<null> => http.post(`/crafts/set`, params)
export const craftstatus = (): Promise<CraftTypes.CraftState[]> => http.get(`/monitor/crafts/status`)
export const craftstatusByHeatId = (heatId: string): Promise<CraftTypes.CraftState> => http.get(`/monitor/crafts/status/${heatId}`)
|