From 324b4b3876cbc2e76a18c3dadbd10c5686b0cb32 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Thu, 19 Jun 2025 13:09:31 +0800 Subject: [PATCH] 1.完善取消作废的英文翻译 --- src/components/Common/SlaveMemo.js | 3 ++- src/components/Common/ToolBar/ToolBarNew.js | 15 ++++++++++----- src/components/Common/commonFunc.js | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/Common/SlaveMemo.js b/src/components/Common/SlaveMemo.js index 8c7dce6..c047963 100644 --- a/src/components/Common/SlaveMemo.js +++ b/src/components/Common/SlaveMemo.js @@ -10,6 +10,7 @@ import * as commonUtils from '../../utils/utils'; import ShowType from './CommonComponent';/* 通用方法 */ import AntdDraggableModal from '../Common/AntdDraggableModal'; import moment from 'moment'; +import * as commonFunc from "@/components/Common/commonFunc"; const { TextArea } = Input; const FormItem = Form.Item; @@ -153,7 +154,7 @@ export default class SlaveMemo extends Component { let bVisibleMemo; let sMemoField; let btnName = ''; - const title = '详细'; + const title = commonFunc.showLocalMessage(this.props, 'sDetailTitle', '详细'); let bEnabledTextArea = false; /* 多行文本默认可输入 非编辑状态多行文本禁止输入 */ let bNoMemo = false; if (commonUtils.isNotEmptyObject(sCurrMemoProps)) { diff --git a/src/components/Common/ToolBar/ToolBarNew.js b/src/components/Common/ToolBar/ToolBarNew.js index bcdfbd8..c97234a 100644 --- a/src/components/Common/ToolBar/ToolBarNew.js +++ b/src/components/Common/ToolBar/ToolBarNew.js @@ -1521,6 +1521,11 @@ class ToolBarComponent extends Component { message.error(sErrorInfo); return; } + const bCancel = commonFunc.showLocalMessage(this.props, 'bCancel', '确定要取消'); + + const bInvalid = commonFunc.showLocalMessage(this.props, 'bInvalid', '确定要作废'); + + const bInvalidCancel = commonFunc.showLocalMessage(this.props, 'bInvalidCancel', '确定要作废'); /* 新增 */ if (key === "BtnAdd") { @@ -2028,13 +2033,13 @@ class ToolBarComponent extends Component { /* 作废、取消作废 */ if (key === "BtnBsOperation.BtnInvalid") { obj = { - title: "确定要作废", + title: bInvalid, handleType: "toVoid", }; this.props.onChangeInvalid(obj); } else if (key === "BtnBsOperation.BtnCancelInvalid") { obj = { - title: "确定取消作废", + title: bInvalidCancel, handleType: "cancel", }; this.props.onChangeInvalid(obj); @@ -2044,13 +2049,13 @@ class ToolBarComponent extends Component { } } else if (key === "BtnInvalid") { obj = { - title: "确定要作废", + title: bInvalid, handleType: "toVoid", }; this.props.onChangeInvalid(obj); } else if (key === "BtnCancelInvalid") { obj = { - title: "确定取消作废", + title: bInvalidCancel, handleType: "cancel", }; this.props.onChangeInvalid(obj); @@ -2129,7 +2134,7 @@ class ToolBarComponent extends Component { } else if (key === "BtnCancel") { /* 取消 */ obj = { - title: "确定要取消", + title: bCancel, }; this.props.onCancel(obj); } else if (key.indexOf("BtnPrint") > -1 && commonUtils.isNotEmptyStr(e.item.props["data-sactiveid"])) { diff --git a/src/components/Common/commonFunc.js b/src/components/Common/commonFunc.js index 77cdc66..40ca12f 100644 --- a/src/components/Common/commonFunc.js +++ b/src/components/Common/commonFunc.js @@ -566,8 +566,8 @@ export function getFilterConditon(sAssignField, allTableData) { } export function showLocalMessage(props, sName, sChineseName) { let sTitle = ''; - if(commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) && commonUtils.isNotEmptyArr(props.app.gdsformconst)) { - const gdsformconst = props.app.gdsformconst; + if(commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) && commonUtils.isNotEmptyArr(props.app.commonConst)) { + const gdsformconst = props.app.commonConst; sTitle = this.showMessage(gdsformconst, sName) } else { sTitle = sChineseName; -- libgit2 0.22.2