diff --git a/.env.development b/.env.development index 37ef3e2..aafe398 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ ENV = 'development' # 接口地址 -VUE_APP_BASE_API = 'http://localhost:8010' -VUE_APP_WS_API = 'ws://localhost:8010' +VUE_APP_BASE_API = 'http://localhost:8000' +VUE_APP_WS_API = 'ws://localhost:8000' #VUE_APP_BASE_API = 'http://115.159.67.99:8000' #VUE_APP_WS_API = 'ws://115.159.67.99:8000' diff --git a/src/api/agvTask.js b/src/api/agvTask.js index 8fd6f66..ba84cec 100644 --- a/src/api/agvTask.js +++ b/src/api/agvTask.js @@ -47,5 +47,11 @@ export function agvTaskCallback(data) { data }) } - -export default { add, edit, del,missionStateCallback,agvTaskCallback,queryAgvTaskInfo } +export function sendReAgvTask(ids) { + return request({ + url: 'api/agvTask/sendReAgvTask', + method: 'post', + data: ids + }) +} +export default { add, edit, del,missionStateCallback,agvTaskCallback,queryAgvTaskInfo,sendReAgvTask } diff --git a/src/components/Crud/crud.js b/src/components/Crud/crud.js index 3a237f5..f628533 100644 --- a/src/components/Crud/crud.js +++ b/src/components/Crud/crud.js @@ -498,6 +498,18 @@ function CRUD(options) { return crud.vms.find(vm => vm && vm.type === type).vm }, notify(title, type = CRUD.NOTIFICATION_TYPE.INFO) { + if (type === 200) { + type = CRUD.NOTIFICATION_TYPE.SUCCESS + } + if (type === 201) { + type = CRUD.NOTIFICATION_TYPE.WARNING + } + if (type === 500) { + type = CRUD.NOTIFICATION_TYPE.ERROR + } + if (type === 400) { + type = CRUD.NOTIFICATION_TYPE.INFO + } crud.vms[0].vm.$notify({ title, type, diff --git a/src/views/business-data/businessTask/agvTask.vue b/src/views/business-data/businessTask/agvTask.vue index a50a738..c4a0d58 100644 --- a/src/views/business-data/businessTask/agvTask.vue +++ b/src/views/business-data/businessTask/agvTask.vue @@ -59,7 +59,18 @@ - + + + @@ -297,6 +308,14 @@ export default { formatter(row, column) { return row.endSlotCode; }, + sendReAgvTask(datas) { + const ids = datas.map(v => v.id); + + crudAgvTask.sendReAgvTask(ids).then(res => { + this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.SUCCESS) + this.crud.toQuery() + }) + }, toAgvTaskFinish(data) { this.MissionStateCallback.containerCode = data.stockCode