1.3
This commit is contained in:
61
src/api/app.js
Normal file
61
src/api/app.js
Normal file
@@ -0,0 +1,61 @@
|
||||
import request from './request'
|
||||
|
||||
export function getPublicList() {
|
||||
return request({
|
||||
url: '/common/getList',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function getTreeData() {
|
||||
return request({
|
||||
url: '/common/getTreeData',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function updateTreeData(data) {
|
||||
return request({
|
||||
url: '/common/updateEqSeq',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function downLoadFile(params) {
|
||||
return request({
|
||||
url: '/common/attachment/downloadFile',
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
params,
|
||||
timeout: 60000
|
||||
})
|
||||
}
|
||||
|
||||
export function getAlarmData(data) {
|
||||
return request({
|
||||
url: '/common/getAlarmData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProductData(data) {
|
||||
return request({
|
||||
url: '/common/getProductData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getMaterialData(data) {
|
||||
return request({
|
||||
url: '/common/getMaterialData',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const commonUploadPath = '/api/common/attachment/uploadFileFormData'
|
||||
export const commonUploadPathTwo = '/api/common/attachment/uploadFile'
|
||||
export const commonDownLoadPath = '/api/common/attachment/downloadFile'
|
||||
223
src/api/basicConfig.js
Normal file
223
src/api/basicConfig.js
Normal file
@@ -0,0 +1,223 @@
|
||||
import request from './request'
|
||||
|
||||
// 账号配置
|
||||
export function getAccountPage(data) {
|
||||
return request({
|
||||
url: '/basic/account/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addAccount(data) {
|
||||
return request({
|
||||
url: '/basic/account/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getAccount(data) {
|
||||
return request({
|
||||
url: '/basic/account/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function accountUpdate(data) {
|
||||
return request({
|
||||
url: '/basic/account/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 备件配置
|
||||
export function getSparePartsPage(data) {
|
||||
return request({
|
||||
url: '/basic/sparePartsConfiguration/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addSpareParts(data) {
|
||||
return request({
|
||||
url: '/basic/sparePartsConfiguration/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSpareParts(data) {
|
||||
return request({
|
||||
url: '/basic/sparePartsConfiguration/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartsUpdate(data) {
|
||||
return request({
|
||||
url: '/basic/sparePartsConfiguration/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getNameList(data) {
|
||||
return request({
|
||||
url: '/basic/sparePartsConfiguration/getNameList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getModelList(data) {
|
||||
return request({
|
||||
url: '/basic/sparePartsConfiguration/getModelList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 耗材配置
|
||||
export function getConsumablePage(data) {
|
||||
return request({
|
||||
url: '/basic/consumableConfiguration/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addConsumable(data) {
|
||||
return request({
|
||||
url: '/basic/consumableConfiguration/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getConsumable(data) {
|
||||
return request({
|
||||
url: '/basic/consumableConfiguration/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function consumableUpdate(data) {
|
||||
return request({
|
||||
url: '/basic/consumableConfiguration/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialList(data) {
|
||||
return request({
|
||||
url: '/basic/consumableConfiguration/materialAndUnit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSpecList(data) {
|
||||
return request({
|
||||
url: '/basic/consumableConfiguration/specList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 线边库配置
|
||||
export function getSideLibraryPage(data) {
|
||||
return request({
|
||||
url: '/basic/sideLibraryConfiguration/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addSideLibrary(data) {
|
||||
return request({
|
||||
url: '/basic/sideLibraryConfiguration/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSideLibrary(data) {
|
||||
return request({
|
||||
url: '/basic/sideLibraryConfiguration/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sideLibraryUpdate(data) {
|
||||
return request({
|
||||
url: '/basic/sideLibraryConfiguration/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sideLibraryList(data) {
|
||||
return request({
|
||||
url: '/basic/sideLibraryConfiguration/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 设备配置
|
||||
export function getEquipmentPage(data) {
|
||||
return request({
|
||||
url: '/basic/equipmentConfiguration/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function addEquipment(data) {
|
||||
return request({
|
||||
url: '/basic/equipmentConfiguration/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getEquipment(data) {
|
||||
return request({
|
||||
url: '/basic/equipmentConfiguration/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function equipmentUpdate(data) {
|
||||
return request({
|
||||
url: '/basic/equipmentConfiguration/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getUnitList(val) {
|
||||
return request({
|
||||
url: '/basic/equipmentConfiguration/getUnitList',
|
||||
method: 'post',
|
||||
formState: true,
|
||||
data: val
|
||||
})
|
||||
}
|
||||
|
||||
export function getEqCode(data) {
|
||||
return request({
|
||||
url: '/basic/equipmentConfiguration/getEqCode',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
95
src/api/consumablesManagement.js
Normal file
95
src/api/consumablesManagement.js
Normal file
@@ -0,0 +1,95 @@
|
||||
import request from './request'
|
||||
|
||||
// 出入库管理
|
||||
export function getMaterialManagePage(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/selectAll',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getMaterialDetail(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/detail',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getOutInRecordRecord(data) {
|
||||
return request({
|
||||
url: '/material/OutInRecord/record',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function outInRecordRecordExport(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/export',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data,
|
||||
timeout: 60000
|
||||
})
|
||||
}
|
||||
|
||||
export function getMaterialManageByid(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/updateGet',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialManageUpdate(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialManageInsert(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/insert',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function materialManageDelete(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function setAlarmValueGet(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/SetAlarmValueGet',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function setAlarmValue(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/SetAlarmValue',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 出入库记录
|
||||
|
||||
// 在线耗材跟踪
|
||||
|
||||
export function onlineMaterialTrackSelect(data) {
|
||||
return request({
|
||||
url: '/material/MaterialManage/onlineMaterialTrackSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
255
src/api/deviceManagement.js
Normal file
255
src/api/deviceManagement.js
Normal file
@@ -0,0 +1,255 @@
|
||||
import request from './request'
|
||||
|
||||
// 绩效分析
|
||||
// 设备OEE
|
||||
export function performanceAnalysisGet(data) {
|
||||
return request({
|
||||
url: '/equipment/PerformanceAnalysis/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function performanceAnalysisPlan(data) {
|
||||
return request({
|
||||
url: '/equipment/PerformanceAnalysis/getPlan',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 托盘指标分析
|
||||
export function palletIndicatorAnalysisPage(data) {
|
||||
return request({
|
||||
url: '/equipment/PalletIndicatorAnalysis/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 托盘指标分析
|
||||
export function palletIndicatorAnalysisType(data) {
|
||||
return request({
|
||||
url: '/equipment/PalletIndicatorAnalysis/getType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 备品备件
|
||||
export function getSparePartStockPage(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartStockInStock(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/inStock',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSparePartStock(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartStockUpdate(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartStockOutStock(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/outStock',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSparePartStockDetail(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/stockDetail',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getBatchList(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/getBatchList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sparePartStockExport(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/export',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data,
|
||||
timeout: 60000
|
||||
})
|
||||
}
|
||||
|
||||
export function getRecordPage(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/PageHis',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function exportHis(data) {
|
||||
return request({
|
||||
url: '/equipment/SparePartStock/exportHis',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data,
|
||||
timeout: 60000
|
||||
})
|
||||
}
|
||||
|
||||
// 维护管理(计划维护)
|
||||
export function getMaintainManagePage(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/pageSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getMaintainManage(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/unDistributeGet',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintainManageAdd(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/create',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintainManageUUnDistribute(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/unDistribute',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintainManageUCompleted(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/completedDistribute',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintainManageDispatch(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/dispatch',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintainManageConfirm(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintainManageDelete(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/PlainMaintainDelete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function maintainManageExport(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/PlanMaintainExport',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data,
|
||||
timeout: 60000
|
||||
})
|
||||
}
|
||||
|
||||
// 维护管理(自主维护)
|
||||
export function getAutoMaintainPage(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/AutoMaintainPageSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function autoMaintainAdd(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/AutoMaintainAdd',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function autoMaintainUpdate(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/AutoMaintainModify',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function autoMaintainDelete(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/AUtoMaintainDelete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function autoMaintainExport(data) {
|
||||
return request({
|
||||
url: '/equipment/MaintainManage/AutoMaintainExport',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data,
|
||||
timeout: 60000
|
||||
})
|
||||
}
|
||||
|
||||
// 实时报警查询
|
||||
export function nowAlarmMessage(data) {
|
||||
return request({
|
||||
url: '/equipment/AlarmMessage/nowAlertSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 历史报警查询
|
||||
export function historyAlarmMessage(data) {
|
||||
return request({
|
||||
url: '/equipment/AlarmMessage/historyAlertSelect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
68
src/api/processManagement.js
Normal file
68
src/api/processManagement.js
Normal file
@@ -0,0 +1,68 @@
|
||||
import request from './request'
|
||||
|
||||
// 工艺监测
|
||||
export function getParamList(data) {
|
||||
return request({
|
||||
url: '/process/processMonitor/paramList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getPageReal(data) {
|
||||
return request({
|
||||
url: '/process/processMonitor/pageReal',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getPageHistory(data) {
|
||||
return request({
|
||||
url: '/process/processMonitor/history',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 异常警示
|
||||
export function getAlarmReal(data) {
|
||||
return request({
|
||||
url: '/process/alram/pageReal',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getAlarmHis(data) {
|
||||
return request({
|
||||
url: '/process/alram/pageHis',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 工艺配置
|
||||
export function getParamSet(data) {
|
||||
return request({
|
||||
url: '/process/paramSet/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getParamSetByid(data) {
|
||||
return request({
|
||||
url: '/process/paramSet/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateParam(data) {
|
||||
return request({
|
||||
url: '/process/paramSet/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
212
src/api/productionScheduling.js
Normal file
212
src/api/productionScheduling.js
Normal file
@@ -0,0 +1,212 @@
|
||||
import request from './request'
|
||||
// 工单进度
|
||||
export function getProcessInfo(data) {
|
||||
return request({
|
||||
url: '/order/workOrderProcess/getProcessInfo',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function lineGlassCount(data) {
|
||||
return request({
|
||||
url: '/order/workOrderProcess/lineGlassCount',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function grindGlassCount(data) {
|
||||
return request({
|
||||
url: '/order/workOrderProcess/grindGlassCount',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function finalClassCount(data) {
|
||||
return request({
|
||||
url: '/order/workOrderProcess/FinalClassCount',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 工单管理
|
||||
export function getWorkOrderPage(data) {
|
||||
return request({
|
||||
url: '/order/workOrder/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function workOrderAdd(data) {
|
||||
return request({
|
||||
url: '/order/workOrder/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function workOrderDelete(data) {
|
||||
return request({
|
||||
url: '/order/workOrder/delete',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function workOrderUpdate(data) {
|
||||
return request({
|
||||
url: '/order/workOrder/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getWorkOrder(data) {
|
||||
return request({
|
||||
url: '/order/workOrder/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function workOrderRelease(data) {
|
||||
return request({
|
||||
url: '/order/workOrder/release',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function workOrderFinish(data) {
|
||||
return request({
|
||||
url: '/order/workOrder/finish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function workOrderImportTemplate(data) {
|
||||
return request({
|
||||
url: '/order/workOrder/importTemplate',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export const uploadPath = '/api/order/workOrder/import'
|
||||
|
||||
// 生产报表
|
||||
export function pageThickness(data) {
|
||||
return request({
|
||||
url: '/order/proReport/pageThickness',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function proReport(data) {
|
||||
return request({
|
||||
url: '/order/proReport/genTable',
|
||||
method: 'post',
|
||||
formState: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 下架包装
|
||||
export function unloadPalletPage(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unloadPalletAdd(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unloadPalletGet(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unloadPalletUpdate(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/update',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 验证玻璃架id
|
||||
export function unloadPalletVerify(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/verify',
|
||||
method: 'post',
|
||||
formState: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unloadPalletFinish(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/finish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unloadPalletContinuePack(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/continuePack',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDetail(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/getDetail',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 玻璃ID追溯
|
||||
export function glassIdTrace(data) {
|
||||
return request({
|
||||
url: '/order/unloadPallet/glassIdTrace',
|
||||
method: 'post',
|
||||
formState: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 复投上架
|
||||
export function reloadRack(data) {
|
||||
return request({
|
||||
url: '/order/reloadRack/reload',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reloadRackEnd(data) {
|
||||
return request({
|
||||
url: '/order/reloadRack/end',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
54
src/api/qualityManagement.js
Normal file
54
src/api/qualityManagement.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import request from './request'
|
||||
// 过程抽检
|
||||
export function getProcessDetectPage(data) {
|
||||
return request({
|
||||
url: '/quality/processDetect/page',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProcessDetectList(data) {
|
||||
return request({
|
||||
url: '/quality/processDetect/list',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getProcessDetectAdd(data) {
|
||||
return request({
|
||||
url: '/quality/processDetect/add',
|
||||
method: 'post',
|
||||
formState: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function detectInput(data) {
|
||||
return request({
|
||||
url: '/quality/processDetect/detectInput',
|
||||
method: 'post',
|
||||
formState: true,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function processDetectExport(data) {
|
||||
return request({
|
||||
url: '/quality/processDetect/export',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data,
|
||||
timeout: 60000
|
||||
})
|
||||
}
|
||||
|
||||
// 颗粒折线图
|
||||
export function getProcessFull(data) {
|
||||
return request({
|
||||
url: '/quality/ProcessFull/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
121
src/api/request.js
Normal file
121
src/api/request.js
Normal file
@@ -0,0 +1,121 @@
|
||||
import axios from 'axios'
|
||||
import { MessageBox, Message, Loading } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import router from '@/router'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
const service = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
timeout: 15000 // request timeout
|
||||
})
|
||||
/*
|
||||
当页面有两个接口时,第一个接口loading的close事件会直接将第二个接口的loading实例也close
|
||||
每次创建Loading实例的时候判断当前是否存在,如果当前还没有Loading实例就创建一个,
|
||||
如果有就不会再创建而是计数;每次关闭的时候判断当前的计数,
|
||||
如果是0了就关闭,否则也计数减一,直到为0的时候表示当前所有页面所有接口都返回结束了,
|
||||
此时执行关闭Loading.close()操作
|
||||
*/
|
||||
|
||||
let loadingInstance = null
|
||||
function startLoading() {
|
||||
loadingInstance = Loading.service({
|
||||
fullscreen: false,
|
||||
text: '拼命加载中......',
|
||||
background: 'rgba(0, 0, 0, 0.1)'
|
||||
})
|
||||
}
|
||||
function endLoading() {
|
||||
loadingInstance.close()
|
||||
}
|
||||
let needLoadingRequestCount = 0
|
||||
function showFullScreenLoading() {
|
||||
if (needLoadingRequestCount === 0) {
|
||||
startLoading()
|
||||
}
|
||||
needLoadingRequestCount++
|
||||
}
|
||||
function tryHideFullScreenLoading() {
|
||||
if (needLoadingRequestCount <= 0) return
|
||||
needLoadingRequestCount--
|
||||
if (needLoadingRequestCount === 0) {
|
||||
endLoading()
|
||||
}
|
||||
}
|
||||
|
||||
// request interceptor
|
||||
service.interceptors.request.use(
|
||||
(config) => {
|
||||
// do something before request is sent
|
||||
showFullScreenLoading()
|
||||
if (store.getters.token) {
|
||||
config.headers['token'] = getToken()
|
||||
}
|
||||
if (config.formState) {
|
||||
config.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||
}
|
||||
return config
|
||||
},
|
||||
(error) => {
|
||||
// do something with request error
|
||||
tryHideFullScreenLoading()
|
||||
console.log(error) // for debug
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
// response interceptor
|
||||
service.interceptors.response.use(
|
||||
(response) => {
|
||||
// console.log(response)
|
||||
tryHideFullScreenLoading()
|
||||
const res = response.data
|
||||
// if the custom code is not 20000, it is judged as an error.
|
||||
if (response.config.responseType === 'blob') {
|
||||
return response
|
||||
}
|
||||
// 具体看框架对响应码的定义
|
||||
if (res.code === 401) {
|
||||
console.log('111')
|
||||
// to re-login
|
||||
MessageBox.confirm('登录信息失效,请重新登录', '提示', {
|
||||
confirmButtonText: '去登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
store.dispatch('user/logout').then(() => {
|
||||
router.push({ path: '/login' })
|
||||
})
|
||||
})
|
||||
}
|
||||
if (res.code !== 0 && res.code !== 401) {
|
||||
Message({
|
||||
message: res.msg || 'Error',
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
return Promise.reject(new Error(res.message || 'Error'))
|
||||
} else {
|
||||
return res
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
tryHideFullScreenLoading()
|
||||
console.log('err' + error) // for debug
|
||||
if ('err' + error === 'errError: timeout of 15000ms exceeded') {
|
||||
Message({
|
||||
message: '网络连接超时',
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
} else {
|
||||
Message({
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
}
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
export default service
|
||||
10
src/api/siteMonitoring.js
Normal file
10
src/api/siteMonitoring.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from './request'
|
||||
|
||||
// 设备状态
|
||||
export function eqMonitorGet(data) {
|
||||
return request({
|
||||
url: '/monitor/eqMonitor/get',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
20
src/api/user.js
Normal file
20
src/api/user.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import request from './request'
|
||||
|
||||
export function login(data) {
|
||||
const dto = Object.assign(data, {
|
||||
appType: 1,
|
||||
userType: 1
|
||||
})
|
||||
return request({
|
||||
url: '/passport/login',
|
||||
method: 'post',
|
||||
data: dto
|
||||
})
|
||||
}
|
||||
|
||||
export function getUserInfo() {
|
||||
return request({
|
||||
url: '/passport/getLoginUser',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user