소스 검색

UPS 迁移:英文模式下,在pc端执行盘点任务报错没有国际化

YangZhiJie 1 년 전
부모
커밋
45ce7e1519
3개의 변경된 파일34개의 추가작업 그리고 19개의 파일을 삭제
  1. 7 1
      src/locales/en-US.json
  2. 6 0
      src/locales/zh-CN.json
  3. 21 18
      src/workflow/TaskOpenUtil.js

+ 7 - 1
src/locales/en-US.json

@@ -1652,6 +1652,12 @@
         "withdraw": "Withdraw",
         "overall": "Overall",
         "randomInventory": "Random Inventory"
-      }
+    },
+
+    "taskOpenUtil": {
+        "error": "Error",
+        "operateOnPhone": "The current task needs to be performed on the mobile device. Please open the program on the mobile device and perform this operation.",
+        "taskDefineError": "The current task define error, please concat system admin."
+    }
   }
 }

+ 6 - 0
src/locales/zh-CN.json

@@ -1647,6 +1647,12 @@
       "withdraw": "单据已撤回",
       "overall": "全盘",
       "randomInventory": "抽盘"
+    },
+
+    "taskOpenUtil": {
+        "error": "操作失败",
+        "operateOnPhone": "当前待办任务,需要在移动端进行,请打开移动端的程序,然后执行本操作。",
+        "taskDefineError": "当前待办任务,定义失败,请联系管理员。"
     }
   }
 }

+ 21 - 18
src/workflow/TaskOpenUtil.js

@@ -2,6 +2,9 @@
 import WorkflowResource from '../api/workflow/WorkflowResource.js';
 import Common from '../common/Common.js';
 import { Uuid} from 'pc-component-v3';
+import { useI18n} from 'vue-i18n';
+const { t } = useI18n();
+
 
 export default {
 
@@ -77,13 +80,13 @@ export default {
         if(taskInfo.formKey === null || taskInfo.formKey === ''){
           if(taskInfo.formKeyApp !== null && taskInfo.formKeyApp !== ''){
             reject({
-              title: '操作失败',
-              message: '当前待办任务,需要在移动端进行,请打开移动端的程序,然后执行本操作。',
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.operateOnPhone'),
             });
           }else{
             reject({
-              title: '操作失败',
-              message: '当前待办任务,定义失败,请联系管理员。',
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.taskDefineError'),
             });
           }
         } else {
@@ -94,8 +97,8 @@ export default {
             }
             if(taskInfo.formKey.indexOf('/static-eam-app/') > -1){
               reject({
-                title: '操作失败',
-                message: '当前待办任务,需要在移动端进行,请打开移动端的程序,然后执行本操作。',
+                title: t('lang.taskOpenUtil.error'),
+                message: t('lang.taskOpenUtil.operateOnPhone'),
               });
             }
             let newUrl = null;
@@ -170,13 +173,13 @@ export default {
         if(historyTaskInfo.formKey === null || historyTaskInfo.formKey === ''){
           if(historyTaskInfo.formKeyApp !== null && historyTaskInfo.formKeyApp !== ''){
             reject({
-              title: '操作失败',
-              message: '当前待办任务,需要在移动端进行,请打开移动端的程序,然后执行本操作。',
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.operateOnPhone'),
             });
           }else{
             reject({
-              title: '操作失败',
-              message: '当前待办任务,定义失败,请联系管理员。',
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.taskDefineError'),
             });
           }
         } else {
@@ -187,8 +190,8 @@ export default {
             }
             if(historyTaskInfo.formKey.indexOf('/static-eam-app/') > -1){
               reject({
-                title: '操作失败',
-                message: '当前待办任务,需要在移动端进行,请打开移动端的程序,然后执行本操作。',
+                title: t('lang.taskOpenUtil.error'),
+                message: t('lang.taskOpenUtil.operateOnPhone'),
               });
             }
             let newUrl = null;
@@ -267,13 +270,13 @@ export default {
         if(copyTask.formKey === null || copyTask.formKey === ''){
           if(copyTask.formKeyApp !== null && copyTask.formKeyApp !== ''){
             reject({
-              title: '操作失败',
-              message: '当前待办任务,需要在移动端进行,请打开移动端的程序,然后执行本操作。',
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.operateOnPhone'),
             });
           }else{
             reject({
-              title: '操作失败',
-              message: '当前待办任务,定义失败,请联系管理员。',
+              title: t('lang.taskOpenUtil.error'),
+              message: t('lang.taskOpenUtil.taskDefineError'),
             });
           }
         } else {
@@ -284,8 +287,8 @@ export default {
             }
             if(copyTask.formKey.indexOf('/static-eam-app/') > -1){
               reject({
-                title: '操作失败',
-                message: '当前待办任务,需要在移动端进行,请打开移动端的程序,然后执行本操作。',
+                title: t('lang.taskOpenUtil.error'),
+                message: t('lang.taskOpenUtil.operateOnPhone'),
               });
             }
             let newUrl = null;