更新
This commit is contained in:
@@ -2,8 +2,8 @@ ENV = 'production'
|
||||
|
||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
||||
VUE_APP_BASE_API = 'http://192.168.200.128:8010'
|
||||
#VUE_APP_BASE_API = 'http://192.168.200.128:8010'
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:8010'
|
||||
#VUE_APP_BASE_API = 'http://127.0.0.1:8010'
|
||||
# 如果接口是 http 形式, wss 需要改为 ws
|
||||
VUE_APP_WS_API = 'ws://192.168.81.122:8010'
|
||||
VUE_APP_WS_API = 'ws://127.0.0.1:8010'
|
||||
#VUE_APP_WS_API = 'ws://127.0.0.1:8010'
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/instruction',
|
||||
@@ -63,4 +62,12 @@ export function reload() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, finish, cancel, queryUnFinish, queryByTaskId,reload }
|
||||
export function forceCancel(instruction_id) {
|
||||
return request({
|
||||
url: 'api/instruction/forceCancel/' + instruction_id,
|
||||
method: 'post',
|
||||
data: instruction_id
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, finish, cancel, forceCancel, queryUnFinish, queryByTaskId, reload }
|
||||
|
||||
@@ -40,6 +40,30 @@ export function cancel(task_id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function errorFinish(task_id) {
|
||||
return request({
|
||||
url: 'api/task/errorFinish/' + task_id,
|
||||
method: 'post',
|
||||
data: task_id
|
||||
})
|
||||
}
|
||||
|
||||
export function exceptions(task_id) {
|
||||
return request({
|
||||
url: 'api/task/exception/' + task_id,
|
||||
method: 'post',
|
||||
data: task_id
|
||||
})
|
||||
}
|
||||
|
||||
export function deprecate(task_id) {
|
||||
return request({
|
||||
url: 'api/task/deprecate/' + task_id,
|
||||
method: 'post',
|
||||
data: task_id
|
||||
})
|
||||
}
|
||||
|
||||
export function createInst(task_id) {
|
||||
return request({
|
||||
url: 'api/task/createInst/' + task_id,
|
||||
@@ -95,5 +119,5 @@ export function specialTaskCreate(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, finish, cancel, createTaskByClick, deviceAskTask, ordinaryTaskCreate, specialTaskCreate, createInst,reload }
|
||||
export default { add, edit, del, finish, cancel, createTaskByClick, deviceAskTask, ordinaryTaskCreate, specialTaskCreate, createInst, reload, errorFinish, exceptions, deprecate }
|
||||
|
||||
|
||||
@@ -268,6 +268,9 @@
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">完成</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">取消</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">创建指令</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'d')">异常完成</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'e')">异常</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'f')">作废</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -440,6 +443,30 @@ export default {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
errorFinish(index, row) {
|
||||
crudTask.errorFinish(row.task_id).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
exception(index, row) {
|
||||
crudTask.exceptions(row.task_id).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
deprecate(index, row) {
|
||||
crudTask.deprecate(row.task_id).then(res => {
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
reload() {
|
||||
crudTask.reload().then(res => {
|
||||
this.crud.toQuery()
|
||||
@@ -466,6 +493,15 @@ export default {
|
||||
case 'c':// 创建指令
|
||||
this.createInst(command.index, command.row)
|
||||
break
|
||||
case 'd':// 异常完成
|
||||
this.errorFinish(command.index, command.row)
|
||||
break
|
||||
case 'e':// 异常
|
||||
this.exception(command.index, command.row)
|
||||
break
|
||||
case 'f':// 作废
|
||||
this.deprecate(command.index, command.row)
|
||||
break
|
||||
}
|
||||
},
|
||||
showStartStorage(val) {
|
||||
|
||||
Reference in New Issue
Block a user