import request from '@/utils/request'; export function list(params) { return request({ url: '/api/dictionary/list', method: 'get', params: params }); } export function checkDicCodeExist(code) { return request({ url: '/api/dictionary/checkExistByCode', method: 'get', params: { code: code } }); } export function getData(id) { return request({ url: `/api/dictionary/${id}`, method: 'get' }); } export function create(data) { return request({ url: '/api/dictionary/create', method: 'post', data: data }); } export function del(id) { return request({ url: `/api/dictionary/delete/${id}`, method: 'delete' }); } export function update(data) { return request({ url: `/api/dictionary/update/${data.id}`, method: 'put', data: data }); } /** * 根据字典code获取明细列表 * @param {*} code */ export function getDetailList(code) { return request({ url: '/api/dictionary/getDetailListByCode', method: 'get', params: { code: code } }); } // 根据线路code分页查询指令 export function getCommandList(parmas) { return request({ url: '/api/cmd', method: 'get', params: parmas }); } // 删除指令对象 export function delCommand(id) { return request({ url: `/api/cmd/${id}`, method: 'delete' }); } // 创建指令 export function createCommand(data) { return request({ url: `/api/cmd`, method: 'post', data: data }); } // 修改指令 export function editCommand(data) { return request({ url: `/api/cmd`, method: 'put', data: data }); } // 获取指令详情 export function getCommandDetail(id) { return request({ url: `/api/cmd/${id}`, method: 'get' }); } // 获取指令列表 export function getCmdList(lineCode, params) { return request({ url: `/api/cmd/line/${lineCode}`, method: 'get', params: params }); } // 获取指令列表 export function postCopyCmd(data) { return request({ url: `/api/cmd/copy`, method: 'post', data }); }