liuyanpeng 1 год назад
Родитель
Сommit
2804772d5f
4 измененных файлов с 21 добавлено и 8 удалено
  1. 1 1
      package.json
  2. 14 0
      src/locales/locale.js
  3. 4 4
      src/window1/tabGridView/NewTabButton.vue
  4. 2 3
      src/workflow/TaskOpenUtil.js

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "4.1.47",
+  "version": "4.1.48",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "ins": "npm install --registry http://wuzhixin.vip:4873",

+ 14 - 0
src/locales/locale.js

@@ -0,0 +1,14 @@
+import {createI18n} from 'vue-i18n';
+import langZhCn from './zh-CN.json';
+import langEnUs from './en-US.json';
+
+const i18n = createI18n({
+  locale: 'zh-CN',
+  messages: {
+    'zh-CN': langZhCn,
+    'en-US': langEnUs,
+  },
+});
+
+
+export default i18n;

+ 4 - 4
src/window1/tabGridView/NewTabButton.vue

@@ -164,8 +164,8 @@ import ProcessReportResource from '../../api/dic/ProcessReportResource.js';
 import { Spin as ASpin, Empty as AEmpty, message } from 'ant-design-vue';
 import { CssUtil } from 'pc-component-v3';
 
-import { useI18n} from 'vue-i18n';
-const { t } = useI18n();
+// import { useI18n} from 'vue-i18n';
+// const { t } = useI18n();
 
 import {
   PlusSquareTwoTone,
@@ -619,7 +619,7 @@ const execute = async function (tabButton) {
             switchFormRoute(tabButton);
           }
         }else{
-          Notify.error(t('lang.Notify.error'), successData.errorMessage, true);
+          Notify.error(proxy.$t('lang.Notify.error'), successData.errorMessage, true);
         }
 
         
@@ -653,7 +653,7 @@ const execute = async function (tabButton) {
     HtmlWindowResource.uniqueByNo(tabButton.htmlWindowNo).then(
       response => {
         if (response.errorCode != 0) {
-          Notify.error(t('lang.Notify.dataDictionaryError'), response.errorMessage, true);
+          Notify.error(proxy.$t('lang.Notify.dataDictionaryError'), response.errorMessage, true);
           return;
         }
 

+ 2 - 3
src/workflow/TaskOpenUtil.js

@@ -2,9 +2,8 @@
 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();
-
+import i18n  from '../locales/locale.js';
+const  t  = i18n.global.t;
 
 export default {