| | |
| | | /* |
| | | * @Date: 2024-01-10 20:37:45 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-10 22:47:45 |
| | | * @LastEditTime: 2024-01-13 10:48:47 |
| | | * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/api/Api.js |
| | | */ |
| | | import ajax from '@/utils/ajax' |
| | |
| | | useDepartments: '/account/useDepartments', |
| | | // 台账保存 |
| | | accountCreate: '/account/create', |
| | | accountUpdate: '/account/update', |
| | | //设备类型 |
| | | deviceTypeCreate: '/devicetype/create', |
| | | deviceTypeUpdate: '/devicetype/update', |
| | | // 车间 工段下啦数据 |
| | | getWsl: '/machine/workshopList', |
| | | getPcl: '/machine/protocolList' |
| | | } |
| | | const getFnObj = { |
| | | accountQuery: { |
| | | url: '/account/pageQuery', |
| | | url: '/account/remainings', |
| | | method: 'GET' |
| | | }, |
| | | componentQuery: { |
| | | url: '/component/pageQuery', |
| | | method: 'POST' |
| | | }, |
| | | deviceTypeQuery: { |
| | | url: '/devicetype/pageQuery', |
| | | method: 'POST' |
| | | } |
| | | |
| | | } |
| | | // 正式环境配置地址 |
| | | export const URL_CFG = { |
| | |
| | | export function accountCreate(params) { |
| | | return sendRequest(HttpConstants.accountCreate, params) |
| | | } |
| | | export function accountUpdate(params) { |
| | | return sendRequest(HttpConstants.accountUpdate, params) |
| | | } |
| | | |
| | | // 设备类型保存 |
| | | export function deviceTypeCreate(params) { |
| | | return sendRequest(HttpConstants.deviceTypeCreate, params) |
| | | } |
| | | export function deviceTypeUpdate(params) { |
| | | return sendRequest(HttpConstants.deviceTypeUpdate, params) |
| | | } |
| | | |
| | | // |
| | | export function getWsl(params) { |
| | | return sendRequest(HttpConstants.getWsl, params) |
| | | return getData(HttpConstants.getWsl, params) |
| | | } |
| | | |
| | | export function getPcl(params) { |
| | | return sendRequest(HttpConstants.getPcl, params) |
| | | return getData(HttpConstants.getPcl, params) |
| | | } |
| | | |
| | | export function getRequest (key,params) { |