diff --git a/public/config.js b/public/config.js index 51a62bc..b04c35c 100644 --- a/public/config.js +++ b/public/config.js @@ -1,9 +1,8 @@ window.g = { dev: { - VUE_APP_BASE_API: 'http://192.168.101.38:8011' + VUE_APP_BASE_API: '/' }, prod: { - VUE_APP_BASE_API: 'http://192.168.101.38:8011' + VUE_APP_BASE_API: '/frobot' } - } diff --git a/src/api/frobot/task/task.js b/src/api/frobot/task/task.js index 913d094..5637823 100644 --- a/src/api/frobot/task/task.js +++ b/src/api/frobot/task/task.js @@ -41,6 +41,14 @@ export function cancelTask(taskCode) { }) } +export function forceCancelTask(taskCode) { + return request({ + url: '/managerTask/forceCancelTask?taskCode=' + taskCode, + method: 'post', + data: null + }) +} + export function oneClickOperation(params) { return request({ url: '/managerTask/oneClickOperation', @@ -49,4 +57,4 @@ export function oneClickOperation(params) { }) } -export default { createTask, queryCurrentTaskInfo, queryTask, cancelTask, oneClickOperation } +export default { createTask, queryCurrentTaskInfo, queryTask, cancelTask, oneClickOperation, forceCancelTask } diff --git a/src/i18n/langs/task/zh.js b/src/i18n/langs/task/zh.js index 37b59da..65a4cc8 100644 --- a/src/i18n/langs/task/zh.js +++ b/src/i18n/langs/task/zh.js @@ -17,7 +17,7 @@ export default { 'Routing_scheme': '路由方案', 'agv_action_type': 'agv二次分配类型', 'Priority': '优先级', - 'Vehicle_number': '载具号', + 'Vehicle_number': '车辆号', 'Task_code': '任务号', 'Task': '任务', 'start_or_end': '起点或终点', diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index bc2a53d..a3e9060 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -41,7 +41,7 @@ export default { }, created() { this.getValueByCode(this.title_param).then(res => { - this.title = res.value + this.title = this.$i18n.locale === 'zh' ? res.value : res.en_value }) } } @@ -82,7 +82,7 @@ export default { color: #fff; font-weight: 600; line-height: 50px; - font-size: 14px; + font-size: 10px; font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; vertical-align: middle; } diff --git a/src/utils/request.js b/src/utils/request.js index a7551fc..342ecce 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -7,11 +7,14 @@ import Config from '@/settings' import Cookies from 'js-cookie' import i18n from '@/i18n' -const baseURLStr = window.g.prod.VUE_APP_BASE_API +const env = process.env.NODE_ENV === 'production' ? 'prod' : 'dev' +const baseURLStr = (window.g && window.g[env] && window.g[env].hasOwnProperty('VUE_APP_BASE_API')) + ? window.g[env].VUE_APP_BASE_API + : '/frobot' // 创建axios实例 const service = axios.create({ - baseURL: process.env.NODE_ENV === 'production' ? baseURLStr : '/', // api 的 base_url + baseURL: baseURLStr, // api 的 base_url timeout: Config.timeout, // 请求超时时间 withCredentials: true }) diff --git a/src/views/acs/task/index.vue b/src/views/acs/task/index.vue index 4b8a144..6c468c5 100644 --- a/src/views/acs/task/index.vue +++ b/src/views/acs/task/index.vue @@ -153,7 +153,7 @@ - + @@ -188,6 +197,7 @@ import crudTask from '@/api/acs/task/task' import frobot_task from '@/api/frobot/task/task' import station from '@/api/frobot/map/station/station' import { getDicts } from '@/views/system/dict/dict' +import {forceCancelTask} from "../../../api/frobot/task/task"; export default { name: 'Task', @@ -392,6 +402,14 @@ export default { console.log(err.response.data.message) }) }, + forced_cancel(index, row) { + frobot_task.forceCancelTask(row.task_code).then(res => { + this.fetchData() + this.$message.success(this.$t('task.select.Cancel') + this.$t('auto.common.succeed')) + }).catch(err => { + console.log(err.response.data.message) + }) + }, reload() { this.fetchData() }, diff --git a/src/views/login.vue b/src/views/login.vue index 859bfcc..1a5204a 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -99,7 +99,7 @@ export default { created() { this.setLang(localStorage.getItem('lang')) this.getValueByCode(this.title_param).then(res => { - this.title = res.value + this.title = this.$i18n.locale === 'zh' ? res.value : res.en_value }) // 获取验证码 this.getCode()