Commit a3ed3db8f669fab485c3d83990e3fd3dcdba1c51

Authored by Min
1 parent 92a0d63a

1.增加全局多语言翻译

src/components/Common/CommonNewBill.js
... ... @@ -1557,6 +1557,7 @@ const BillComponent = Form.create({
1557 1557 } = props;
1558 1558 const masterConfig = props.onMergeMasterConfig();
1559 1559 const masterConfigOld = { ...masterConfig };
  1560 + const sLanguage = app?.userinfo?.sLanguage;
1560 1561 /* 回带表单 */
1561 1562 onReturnForm(form);
1562 1563 const autoHeight = `calc( ${AutoTableHeight} - 96px)`;
... ... @@ -2046,7 +2047,7 @@ const BillComponent = Form.create({
2046 2047 onChange: props.onTitleChange.bind(this, "slave0"),
2047 2048 },
2048 2049 };
2049   -
  2050 +
2050 2051 if (sModelsId === '16411004790004762980820285096000') {
2051 2052 slaveTableProps.tableProps.AutoTableHeight = 344
2052 2053 slaveTableProps.isDragAndDrop = true
... ... @@ -2347,6 +2348,57 @@ const BillComponent = Form.create({
2347 2348 }
2348 2349 }
2349 2350  
  2351 + /* 悬浮Tip */
  2352 + const mainContentChinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "MainContent"))
  2353 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "MainContent")[0].sChinese
  2354 + : commonFunc.showChineseMessage(app.commonConst, "MainContent"); /* 从表信息 */
  2355 + const materialsInfoChinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zMaterials"))
  2356 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zMaterials")[0].sChinese
  2357 + : commonFunc.showChineseMessage(app.commonConst, "zMaterials"); /* 表一 */
  2358 + const checkInfoChinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zCheck"))
  2359 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zCheck")[0].sChinese
  2360 + : commonFunc.showChineseMessage(app.commonConst, "zCheck"); /* 表二 */
  2361 + const slaveInfo0Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo0"))
  2362 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo0")[0].sChinese
  2363 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo0"); /* 表三 */
  2364 + const slaveInfo1Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo1"))
  2365 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo1")[0].sChinese
  2366 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo1"); /* 表四 */
  2367 + const slaveInfo2Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo2"))
  2368 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo2")[0].sChinese
  2369 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo2"); /* 表五 */
  2370 + const slaveInfo3Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo3"))
  2371 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo3")[0].sChinese
  2372 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo3"); /* 表六 */
  2373 + const slaveInfo4Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo4"))
  2374 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo4")[0].sChinese
  2375 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo4"); /* 表七 */
  2376 + const slaveInfo5Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo5"))
  2377 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo5")[0].sChinese
  2378 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo5"); /* 表八 */
  2379 + const slaveInfo6Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo6"))
  2380 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo6")[0].sChinese
  2381 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo6"); /* 表九 */
  2382 + const slaveInfo7Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo7"))
  2383 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo7")[0].sChinese
  2384 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo7"); /* 表十 */
  2385 + const slaveInfo8Chinese = commonUtils.isNotEmptyArr(masterConfig?.gdsconfigformslave?.filter(item => item.sControlName === "zSlaveInfo8"))
  2386 + ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === "zSlaveInfo8")[0].sChinese
  2387 + : commonFunc.showChineseMessage(app.commonConst, "zSlaveInfo8"); /* 表十一 */
  2388 +
  2389 + const mainContentTip = sLanguage === "sEnglish" ? slaveInfo + "-" + mainContentChinese : slaveInfo;
  2390 + const materialsInfoTip = sLanguage === "sEnglish" ? materialsInfo + "-" + materialsInfoChinese : materialsInfo;
  2391 + const checkInfoTip = sLanguage === "sEnglish" ? checkInfo + "-" + checkInfoChinese : checkInfo;
  2392 + const slaveInfo0Tip = sLanguage === "sEnglish" ? slaveInfo0 + "-" + slaveInfo0Chinese : slaveInfo0;
  2393 + const slaveInfo1Tip = sLanguage === "sEnglish" ? slaveInfo1 + "-" + slaveInfo1Chinese : slaveInfo1;
  2394 + const slaveInfo2Tip = sLanguage === "sEnglish" ? slaveInfo2 + "-" + slaveInfo2Chinese : checkInfo;
  2395 + const slaveInfo3Tip = sLanguage === "sEnglish" ? slaveInfo3 + "-" + slaveInfo3Chinese : checkInfo;
  2396 + const slaveInfo4Tip = sLanguage === "sEnglish" ? slaveInfo4 + "-" + slaveInfo4Chinese : checkInfo;
  2397 + const slaveInfo5Tip = sLanguage === "sEnglish" ? slaveInfo5 + "-" + slaveInfo5Chinese : checkInfo;
  2398 + const slaveInfo6Tip = sLanguage === "sEnglish" ? slaveInfo6 + "-" + slaveInfo6Chinese : checkInfo;
  2399 + const slaveInfo7Tip = sLanguage === "sEnglish" ? slaveInfo7 + "-" + slaveInfo7Chinese : checkInfo;
  2400 + const slaveInfo8Tip = sLanguage === "sEnglish" ? slaveInfo8 + "-" + slaveInfo8Chinese : slaveInfo8;
  2401 +
2350 2402 let productProcessInfoType = {};
2351 2403 let productProcessInfoConfig = {};
2352 2404 let processCardSearchResult = commonFunc.showMessage(app.commonConst, "processCardSearchResult"); /* 复制从工艺卡查询结果 */
... ... @@ -2820,13 +2872,15 @@ const BillComponent = Form.create({
2820 2872 // eslint-disable-next-line no-unused-vars
2821 2873 let num = item.replace(/[^\d]/g, "").trim();
2822 2874 let tabName = item.replace(/\d+/g, "");
  2875 + let tipName = "";
2823 2876 /* 从主表配置 找到控件名=tabName,否则取他的showName */
2824 2877 const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
2825 2878 if (commonUtils.isNotEmptyArr(tableConfigArr)) {
2826 2879 tabName = tableConfigArr[0].showName;
  2880 + tipName = sLanguage === "sEnglish" ? tabName + "-" + tableConfigArr[0].sChinese : tabName;
2827 2881 }
2828 2882 return (
2829   - <TabPane tab={tabName} key={num} className="xly-bill-list">
  2883 + <TabPane tab={<span data-tip={tipName}> {tabName}</span>} key={num} className="xly-bill-list">
2830 2884 <div>
2831 2885 <CommonView
2832 2886 {...props}
... ... @@ -2842,7 +2896,7 @@ const BillComponent = Form.create({
2842 2896 : ""}
2843 2897 {onlySlave ? (
2844 2898 <>
2845   - <TabPane tab={slaveInfo} className="xly-bill-list" key={10}>
  2899 + <TabPane tab={<span data-tip={mainContentTip}> {slaveInfo}</span>} className="xly-bill-list" key={10}>
2846 2900 <div className="TabPaneStyle">
2847 2901 {app.currentPane.title !== "功能模块界面设置单据" ? (
2848 2902 <Row gutter={[8, 0]}>
... ... @@ -2907,13 +2961,15 @@ const BillComponent = Form.create({
2907 2961 // eslint-disable-next-line no-unused-vars
2908 2962 let num = item.replace(/[^\d]/g, "").trim();
2909 2963 let tabName = item.replace(/\d+/g, "");
  2964 + let tipName = "";
2910 2965 /* 从主表配置 找到控件名=tabName,否则取他的showName */
2911 2966 const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
2912 2967 if (commonUtils.isNotEmptyArr(tableConfigArr)) {
2913 2968 tabName = tableConfigArr[0].showName;
  2969 + tipName = sLanguage === "sEnglish" ? tabName + "-" + tableConfigArr[0].sChinese : tabName;
2914 2970 }
2915 2971 return (
2916   - <TabPane tab={tabName} key={num} className="xly-bill-list">
  2972 + <TabPane tab={<span data-tip={tipName}> {tabName}</span>} key={num} className="xly-bill-list">
2917 2973 <div>
2918 2974 <CommonView
2919 2975 {...props}
... ... @@ -2929,7 +2985,7 @@ const BillComponent = Form.create({
2929 2985 : ""}
2930 2986 {onlySlave0 ? (
2931 2987 <>
2932   - <TabPane tab={materialsInfo} className="xly-bill-list" key={20}>
  2988 + <TabPane tab={<span data-tip={materialsInfoTip}> {materialsInfo}</span>} className="xly-bill-list" key={20}>
2933 2989 <div className="TabPaneStyle">
2934 2990 {app.currentPane.title !== "功能模块界面设置单据" ? (
2935 2991 <Row gutter={[8, 0]}>
... ... @@ -2995,13 +3051,15 @@ const BillComponent = Form.create({
2995 3051 // eslint-disable-next-line no-unused-vars
2996 3052 let num = item.replace(/[^\d]/g, "").trim();
2997 3053 let tabName = item.replace(/\d+/g, "");
  3054 + let tipName = "";
2998 3055 /* 从主表配置 找到控件名=tabName,否则取他的showName */
2999 3056 const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
3000 3057 if (commonUtils.isNotEmptyArr(tableConfigArr)) {
3001 3058 tabName = tableConfigArr[0].showName;
  3059 + tipName = sLanguage === "sEnglish" ? tabName + tableConfigArr[0].sChinese : tabName;
3002 3060 }
3003 3061 return (
3004   - <TabPane tab={tabName} key={num} className="xly-bill-list">
  3062 + <TabPane tab={<span data-tip={tipName}> {tabName}</span>} key={num} className="xly-bill-list">
3005 3063 <div>
3006 3064 <CommonView
3007 3065 {...props}
... ... @@ -3017,7 +3075,7 @@ const BillComponent = Form.create({
3017 3075 : ""}
3018 3076 {onlySlave1 ? (
3019 3077 <>
3020   - <TabPane tab={checkInfo} className="xly-bill-list" key={30}>
  3078 + <TabPane tab={<span data-tip={checkInfoTip}> {checkInfo}</span>} className="xly-bill-list" key={30}>
3021 3079 <div className="TabPaneStyle">
3022 3080 {props.app.currentPane.title !== "功能模块界面设置单据" ? (
3023 3081 <div>
... ... @@ -3088,13 +3146,15 @@ const BillComponent = Form.create({
3088 3146 // eslint-disable-next-line no-unused-vars
3089 3147 let num = item.replace(/[^\d]/g, "").trim();
3090 3148 let tabName = item.replace(/\d+/g, "");
  3149 + let tipName = "";
3091 3150 /* 从主表配置 找到控件名=tabName,否则取他的showName */
3092 3151 const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
3093 3152 if (commonUtils.isNotEmptyArr(tableConfigArr)) {
3094 3153 tabName = tableConfigArr[0].showName;
  3154 + tipName = sLanguage === "sEnglish" ? tabName + tableConfigArr[0].sChinese : tabName;
3095 3155 }
3096 3156 return (
3097   - <TabPane tab={tabName} key={num} className="xly-bill-list">
  3157 + <TabPane tab={<span data-tip={tipName}> {tabName}</span>} key={num} className="xly-bill-list">
3098 3158 <div>
3099 3159 <CommonView
3100 3160 {...props}
... ... @@ -3110,7 +3170,7 @@ const BillComponent = Form.create({
3110 3170 : ""}
3111 3171 {onlyslave2 ? (
3112 3172 <>
3113   - <TabPane tab={slaveInfo0} className="xly-bill-list" key={40}>
  3173 + <TabPane tab={<span data-tip={slaveInfo0Tip}> {slaveInfo0}</span>} className="xly-bill-list" key={40}>
3114 3174 <div className="TabPaneStyle">
3115 3175 <Row gutter={[8, 0]}>
3116 3176 <Col span={showAll2 ? 24 : iColValueTable2} order={iShowOrder2}>
... ... @@ -3136,13 +3196,15 @@ const BillComponent = Form.create({
3136 3196 // eslint-disable-next-line no-unused-vars
3137 3197 let num = item.replace(/[^\d]/g, "").trim();
3138 3198 let tabName = item.replace(/\d+/g, "");
  3199 + let tipName = "";
3139 3200 /* 从主表配置 找到控件名=tabName,否则取他的showName */
3140 3201 const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
3141 3202 if (commonUtils.isNotEmptyArr(tableConfigArr)) {
3142 3203 tabName = tableConfigArr[0].showName;
  3204 + tipName = sLanguage === "sEnglish" ? tabName + tableConfigArr[0].sChinese : tabName;
3143 3205 }
3144 3206 return (
3145   - <TabPane tab={tabName} key={num} className="xly-bill-list">
  3207 + <TabPane tab={<span data-tip={tipName}> {tabName}</span>} key={num} className="xly-bill-list">
3146 3208 <div>
3147 3209 <CommonView
3148 3210 {...props}
... ... @@ -3158,7 +3220,7 @@ const BillComponent = Form.create({
3158 3220 : ""}
3159 3221 {onlyslave3 ? (
3160 3222 <>
3161   - <TabPane tab={slaveInfo1} className="xly-bill-list" key={50}>
  3223 + <TabPane tab={<span data-tip={slaveInfo1Tip}> {slaveInfo1}</span>} className="xly-bill-list" key={50}>
3162 3224 <div className="TabPaneStyle">
3163 3225 <Row gutter={[8, 0]}>
3164 3226 <Col span={showAll3 ? 24 : iColValueTable3} order={iShowOrder3}>
... ... @@ -3184,13 +3246,15 @@ const BillComponent = Form.create({
3184 3246 // eslint-disable-next-line no-unused-vars
3185 3247 let num = item.replace(/[^\d]/g, "").trim();
3186 3248 let tabName = item.replace(/\d+/g, "");
  3249 + let tipName = "";
3187 3250 /* 从主表配置 找到控件名=tabName,否则取他的showName */
3188 3251 const tableConfigArr = masterConfig?.gdsconfigformslave.filter(row => row.sControlName === item.trim());
3189 3252 if (commonUtils.isNotEmptyArr(tableConfigArr)) {
3190 3253 tabName = tableConfigArr[0].showName;
  3254 + tipName = sLanguage === "sEnglish" ? tabName + tableConfigArr[0].sChinese : tabName;
3191 3255 }
3192 3256 return (
3193   - <TabPane tab={tabName} key={num} className="xly-bill-list">
  3257 + <TabPane tab={<span data-tip={tipName}> {tabName}</span>} title={tipName} key={num} className="xly-bill-list">
3194 3258 <div>
3195 3259 <CommonView
3196 3260 {...props}
... ... @@ -3206,7 +3270,7 @@ const BillComponent = Form.create({
3206 3270 : ""}
3207 3271 {onlyslave4 ? (
3208 3272 <>
3209   - <TabPane tab={slaveInfo2} className="xly-bill-list" key={60}>
  3273 + <TabPane tab={<span data-tip={slaveInfo2Tip}> {slaveInfo2}</span>} className="xly-bill-list" key={60}>
3210 3274 <div className="TabPaneStyle">
3211 3275 <Row gutter={[8, 0]}>
3212 3276 <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}>
... ... @@ -3228,7 +3292,7 @@ const BillComponent = Form.create({
3228 3292 )}
3229 3293 {onlyslave5 ? (
3230 3294 <>
3231   - <TabPane tab={slaveInfo3} className="xly-bill-list" key={70}>
  3295 + <TabPane tab={<span data-tip={slaveInfo3Tip}> {slaveInfo3}</span>} className="xly-bill-list" key={70}>
3232 3296 <div className="TabPaneStyle">
3233 3297 <Row gutter={[8, 0]}>
3234 3298 <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}>
... ... @@ -3244,7 +3308,7 @@ const BillComponent = Form.create({
3244 3308 )}
3245 3309 {onlyslave6 ? (
3246 3310 <>
3247   - <TabPane tab={slaveInfo4} className="xly-bill-list" key={80}>
  3311 + <TabPane tab={<span data-tip={slaveInfo4Tip}> {slaveInfo4}</span>} className="xly-bill-list" key={80}>
3248 3312 <div className="TabPaneStyle">
3249 3313 <Row gutter={[8, 0]}>
3250 3314 <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}>
... ... @@ -3260,7 +3324,7 @@ const BillComponent = Form.create({
3260 3324 )}
3261 3325 {onlyslave7 ? (
3262 3326 <>
3263   - <TabPane tab={slaveInfo5} className="xly-bill-list" key={90}>
  3327 + <TabPane tab={<span data-tip={slaveInfo5Tip}> {slaveInfo5}</span>} className="xly-bill-list" key={90}>
3264 3328 <div className="TabPaneStyle">
3265 3329 <Row gutter={[8, 0]}>
3266 3330 <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}>
... ... @@ -3276,7 +3340,7 @@ const BillComponent = Form.create({
3276 3340 )}
3277 3341 {onlyslave8 ? (
3278 3342 <>
3279   - <TabPane tab={slaveInfo6} className="xly-bill-list" key={100}>
  3343 + <TabPane tab={<span data-tip={slaveInfo6Tip}> {slaveInfo6}</span>} className="xly-bill-list" key={100}>
3280 3344 <div className="TabPaneStyle">
3281 3345 <Row gutter={[8, 0]}>
3282 3346 <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}>
... ... @@ -3292,7 +3356,7 @@ const BillComponent = Form.create({
3292 3356 )}
3293 3357 {onlyslave9 ? (
3294 3358 <>
3295   - <TabPane tab={slaveInfo7} className="xly-bill-list" key={110}>
  3359 + <TabPane tab={<span data-tip={slaveInfo7Tip}> {slaveInfo7}</span>} className="xly-bill-list" key={110}>
3296 3360 <div className="TabPaneStyle">
3297 3361 <Row gutter={[8, 0]}>
3298 3362 <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}>
... ... @@ -3308,7 +3372,7 @@ const BillComponent = Form.create({
3308 3372 )}
3309 3373 {onlyslave10 ? (
3310 3374 <>
3311   - <TabPane tab={slaveInfo8} className="xly-bill-list" key={150}>
  3375 + <TabPane tab={<span title={slaveInfo8Tip}>{slaveInfo8} </span>} className="xly-bill-list" key={150}>
3312 3376 <div className="TabPaneStyle">
3313 3377 <Row gutter={[8, 0]}>
3314 3378 <Col span={showAll4 ? 24 : iColValueTable4} order={iShowOrder4}>
... ... @@ -3454,30 +3518,34 @@ const CommonEffectEvent = props =&gt; {
3454 3518 preValue.current = newValue;
3455 3519  
3456 3520 const sBmRuleObj = commonUtils.convertStrToObj(sBmRule);
3457   - const addState = Object.keys(sBmRuleObj).filter(key => key !== "showName").reduce((result, key) => {
3458   - const list = sBmRuleObj[key]?.split("+") || [];
3459   - result[key] = list.map(item => item.trim().replace(/\'/g, '')).map(item => {
3460   - if (item !== '.' && item?.includes('.')) {
3461   - const [tableName, sFieldName] = item.split('.');
3462   - return props[`${tableName}Data`]?.[sFieldName] || "";
3463   - }
3464   - return item;
3465   - }).join('');
3466   - return result;
3467   - }, {});
  3521 + const addState = Object.keys(sBmRuleObj)
  3522 + .filter(key => key !== "showName")
  3523 + .reduce((result, key) => {
  3524 + const list = sBmRuleObj[key]?.split("+") || [];
  3525 + result[key] = list
  3526 + .map(item => item.trim().replace(/\'/g, ""))
  3527 + .map(item => {
  3528 + if (item !== "." && item?.includes(".")) {
  3529 + const [tableName, sFieldName] = item.split(".");
  3530 + return props[`${tableName}Data`]?.[sFieldName] || "";
  3531 + }
  3532 + return item;
  3533 + })
  3534 + .join("");
  3535 + return result;
  3536 + }, {});
3468 3537  
3469 3538 props.onSaveState({
3470 3539 masterData: {
3471 3540 ...masterData,
3472 3541 ...addState,
3473   - handleType: masterData.handleType || 'update',
3474   - }
  3542 + handleType: masterData.handleType || "update",
  3543 + },
3475 3544 });
3476   -
3477 3545 }, [watchFields, masterData]);
3478 3546  
3479 3547 return null;
3480   -}
  3548 +};
3481 3549  
3482 3550 // 工艺参数弹窗
3483 3551 const ModalComponent = props => {
... ...
src/components/Common/CommonTable/index.js
... ... @@ -2843,9 +2843,9 @@ class CommonTableRc extends React.Component {
2843 2843  
2844 2844 let res = column.title;
2845 2845 if (bNotEmpty) {
2846   - res = <div className='th-div' style={styleObj}>{expandedAllIcon}<span className="table-title-required">*</span> {column.title}</div>;
  2846 + res = <div className='th-div' title={`${column.tipTitle }`} style={styleObj}>{expandedAllIcon}<span className="table-title-required">*</span> {column.title}</div>;
2847 2847 } else {
2848   - res = <div className='th-div' style={styleObj}>{expandedAllIcon}{column.title}</div>;
  2848 + res = <div className='th-div' title={`${column.tipTitle}`} style={styleObj}>{expandedAllIcon}{column.title}</div>;
2849 2849 }
2850 2850 if (column.dataIndex === 'bSelfCbx') {
2851 2851 res = <div style={{ marginLeft: '5px' }}><Checkbox disabled={!props.enabled} checked={column.bCheckAll} onChange={(e) => this.onParamChange(e)}></Checkbox></div>;
... ... @@ -6656,9 +6656,9 @@ class CommonTableRc extends React.Component {
6656 6656  
6657 6657 let childTitle = ''
6658 6658 if (bNotEmpty) {
6659   - childTitle = <div style={styleObj}><span className="table-title-required">*</span> {childTitleContent}</div>;
  6659 + childTitle = <div title={`${column.tipTitle }`} style={styleObj}><span className="table-title-required">*</span> {childTitleContent}</div>;
6660 6660 } else {
6661   - childTitle = <div style={styleObj}>{childTitleContent}</div>;
  6661 + childTitle = <div title={`${column.tipTitle }`} style={styleObj}>{childTitleContent}</div>;
6662 6662 }
6663 6663 return childTitle;
6664 6664 }
... ...
src/components/Common/PersonCenter/PersonCenter.js
... ... @@ -74,6 +74,10 @@ class PersonCenter extends Component {
74 74 }
75 75 // 检查是否有公告数据需要显示
76 76 this.checkNoticeData();
  77 + const { userinfo } = this.props.app;
  78 + const { sLanguage } = userinfo;
  79 + document.querySelector('html').setAttribute('lang', sLanguage);
  80 + document.addEventListener('mouseover', this.handleShowTooltip);
77 81 }
78 82  
79 83 componentWillReceiveProps(nextProps) {
... ... @@ -87,6 +91,110 @@ class PersonCenter extends Component {
87 91 // 检查是否有新的公告数据
88 92 this.checkNoticeData(nextProps);
89 93 }
  94 +
  95 + componentWillUnmount() {
  96 + document.removeEventListener('mouseover', this.handleShowTooltip);
  97 + }
  98 +
  99 + handleShowTooltip = (e) => {
  100 + clearTimeout(this.tooltipTimer);
  101 + this.tooltipTimer = setTimeout(() => {
  102 + try {
  103 + let target;
  104 + if (e.target.nodeName === 'DIV' && e.target.classList.contains('ant-tabs-tab-btn')) {
  105 + // eslint-disable-next-line prefer-destructuring
  106 + target = e.target;
  107 + } else if (e.target.nodeName === 'SPAN' && e.target.parentNode.classList.contains('ant-tabs-tab-btn')) {
  108 + target = e.target.parentNode;
  109 + } else if (e.target.nodeName === 'DIV' && e.target.classList.contains('th-div')) {
  110 + // eslint-disable-next-line prefer-destructuring
  111 + target = e.target;
  112 + }
  113 +
  114 + console.log('target', target);
  115 +
  116 + if (!target) return null;
  117 + if (target.title) {
  118 + return;
  119 + }
  120 +
  121 + const content = target.children.length ? target.children[0].innerText : target.innerText;
  122 + const tip = target.children.length ? target.children[0].getAttribute('data-tip') : target.getAttribute('data-tip');
  123 + console.log(2222, tip);
  124 + this.showTooltipAtMouse(e, content, tip);
  125 + } catch (error) {
  126 + // eslint-disable-next-line no-empty
  127 + }
  128 + }, 500);
  129 +
  130 + clearTimeout(this.mouseTimer);
  131 + this.mouseTimer = setTimeout(() => {
  132 + if (e.target.id !== 'global-mouse-tooltip') {
  133 + const tooltip = document.getElementById('global-mouse-tooltip');
  134 + if (tooltip) {
  135 + document.body.removeChild(tooltip);
  136 + }
  137 + }
  138 + }, 200);
  139 + }
  140 +
  141 + showTooltipAtMouse = (e, content, tip) => {
  142 + let tooltip = document.getElementById('global-mouse-tooltip');
  143 + if (!tooltip) {
  144 + tooltip = document.createElement('div');
  145 + tooltip.id = 'global-mouse-tooltip';
  146 + Object.assign(tooltip.style, {
  147 + position: 'fixed', // 必须固定定位,否则left/top失效
  148 + padding: '5px 10px',
  149 + background: '#1f2937',
  150 + color: '#ffffff',
  151 + fontSize: '12px',
  152 + borderRadius: '4px',
  153 + zIndex: '999999', // 超高层级,不会被其他组件盖住
  154 + pointerEvents: 'none', // 不阻挡鼠标事件
  155 + whiteSpace: 'nowrap', // 文字不换行
  156 + opacity: '0',
  157 + transition: 'opacity 0.2s ease',
  158 + boxShadow: '0 4px 16px rgba(0,0,0,0.35)',
  159 + });
  160 + document.body.appendChild(tooltip);
  161 + }
  162 +
  163 + // 设置内容,获取自身宽高
  164 + tooltip.innerText = tip || content;
  165 + const tooltipRect = tooltip.getBoundingClientRect();
  166 +
  167 + // 获取视口尺寸
  168 + const { innerWidth, innerHeight } = window;
  169 +
  170 + // 默认偏移量
  171 + const offsetX = 10;
  172 + const offsetY = 10;
  173 +
  174 + // 默认位置:鼠标右下方
  175 + let left = e.clientX + offsetX;
  176 + let top = e.clientY + offsetY;
  177 +
  178 + // ✅ 智能避让:右侧空间不足 → 改到左侧
  179 + if (left + tooltipRect.width > innerWidth) {
  180 + left = e.clientX - tooltipRect.width - offsetX;
  181 + }
  182 +
  183 + // ✅ 智能避让:下方空间不足 → 改到上方
  184 + if (top + tooltipRect.height > innerHeight) {
  185 + top = e.clientY - tooltipRect.height - offsetY;
  186 + }
  187 +
  188 + // ✅ 极端情况:左上角也不够?那就贴边
  189 + left = Math.max(5, Math.min(left, innerWidth - tooltipRect.width - 5));
  190 + top = Math.max(5, Math.min(top, innerHeight - tooltipRect.height - 5));
  191 +
  192 + // 应用位置
  193 + tooltip.style.left = `${left}px`;
  194 + tooltip.style.top = `${top}px`;
  195 + tooltip.style.opacity = '1';
  196 + };
  197 +
90 198 shouldComponentUpdate(nextProps) {
91 199 const { pwdVisible } = this.state;
92 200 const { app: appNew } = nextProps;
... ...
src/components/Common/commonFunc.js
... ... @@ -93,9 +93,12 @@ export function getHeaderConfig(config) {
93 93 const tableConfig = config.gdsconfigformslave;
94 94 const column = [];
95 95 for (const child of tableConfig) {
96   - if (child.sName !== '' && child.bVisible && child.showName !== '') {
  96 + if (child.sName !== '' && child.bVisible && (child.showName !== '' || child.sChinese !== '')) {
  97 + const tipTitle = commonUtils.isNotEmptyObject(child.showName) ? child.showName !== child.sChinese ?
  98 + `${child.showName}-${child.sChinese}` : child.showName : child.sChinese;
97 99 column.push({
98   - title: child.showName,
  100 + title: commonUtils.isNotEmptyObject(child.showName) ? child.showName : child.sChinese,
  101 + tipTitle,
99 102 dataIndex: child.sName.trim(),
100 103 width: child.iFitWidth,
101 104 bFind: child.bFind,
... ... @@ -274,23 +277,23 @@ export function clearJsonStringFields(obj, excludeFields = []) {
274 277 if (!commonUtils.isNotEmptyObject(obj)) {
275 278 return obj;
276 279 }
277   -
  280 +
278 281 const processedObj = lodash.cloneDeep(obj);
279   -
  282 +
280 283 Object.keys(processedObj).forEach(key => {
281 284 // 跳过排除字段
282 285 if (excludeFields.includes(key)) {
283 286 return;
284 287 }
285   -
  288 +
286 289 const value = processedObj[key];
287   -
  290 +
288 291 // 智能检测JSON字符串
289 292 if (typeof value === 'string' && commonUtils.isJSON(value)) {
290 293 processedObj[key] = '';
291 294 }
292 295 });
293   -
  296 +
294 297 return processedObj;
295 298 }
296 299  
... ... @@ -632,6 +635,15 @@ export function showMessage(gdsformconst, sName) {
632 635 return '';
633 636 }
634 637  
  638 +/* 根据英文名字 返回对应的中文 */
  639 +export function showChineseMessage(gdsformconst, sEnglishName) {
  640 + const iIndex = gdsformconst.findIndex(item => item.sEnglish === sEnglishName);
  641 + if (iIndex > -1) {
  642 + return gdsformconst[iIndex].sChinese;
  643 + }
  644 + return '';
  645 +}
  646 +
635 647 export function getReturnMsg(str) {
636 648 const msgArr = commonUtils.isNotEmptyObject(str) ? str.split('xpm') : '';
637 649 const divStr = [];
... ...
src/components/IndexCenter/IndexCenter.js
... ... @@ -275,7 +275,7 @@ class IndexCenter extends Component {
275 275 title: columnDepartment,
276 276 dataIndex: 'sDepart',
277 277 width: '14%',
278   - render: text => (
  278 + render: (text, record) => (
279 279 <div
280 280 style={{
281 281 display: 'grid',
... ... @@ -287,7 +287,7 @@ class IndexCenter extends Component {
287 287 overflow: 'hidden',
288 288 whiteSpace: 'nowrap',
289 289 }}
290   - title={text}
  290 + title={text + '-'+ record.sChineseK2}
291 291 >{text}</span>
292 292 </div>
293 293 ),
... ... @@ -296,6 +296,7 @@ class IndexCenter extends Component {
296 296 dataIndex: 'sMenuUnMemo',
297 297 width: '30%',
298 298 render: (text, record) => <div><a
  299 + title = {text + '-' + record.sChineseUnMemo || text}
299 300 onClick={() => {
300 301 this.handleDoubleClick(record);
301 302 }}
... ... @@ -416,6 +417,7 @@ class IndexCenter extends Component {
416 417 dataIndex: 'sMenuUnMemo',
417 418 width: '30%',
418 419 render: (text, record) => <div><a
  420 + title = {text + '-' + record.sChineseUnMemo || text}
419 421 onClick={() => {
420 422 this.handleDoubleClick(record);
421 423 }}
... ... @@ -426,9 +428,10 @@ class IndexCenter extends Component {
426 428 dataIndex: 'sMenuWorkFruit',
427 429 width: '30%',
428 430 render: (text, record) => {
429   - const { sResultModelId } = record;
  431 + const { sResultModelId, sChineseWorkFruit } = record;
430 432 if (commonUtils.isNotEmptyArr(sResultModelId)) {
431 433 return <div><a
  434 + title={text + '-' +sChineseWorkFruit}
432 435 onClick={() => {
433 436 this.handleJumpToResultModel(record);
434 437 }}
... ... @@ -480,6 +483,11 @@ class IndexCenter extends Component {
480 483 data: [item],
481 484 count: count === count ? count : 0,
482 485 columns: columnsNew,
  486 + sChineseK1: item.sChineseK1,
  487 + sChineseK2: item.sChineseK2,
  488 + sChineseUnMemo: item.sChineseUnMemo,
  489 + sChineseWorkFruit: item.sChineseWorkFruit,
  490 + sResultModelMenuChineseName: item.sResultModelMenuChineseName
483 491 };
484 492 } else if (!flowJson[sChildFlow].data.some(data => data.sId === item.sId)) {
485 493 flowJson[sChildFlow].data.push(item);
... ... @@ -491,7 +499,7 @@ class IndexCenter extends Component {
491 499 for (const key in flowJson) {
492 500 if (Object.hasOwnProperty.call(flowJson, key)) {
493 501 const item = flowJson[key];
494   - const { data, sId, columns } = item;
  502 + const { data, sId, columns, sSecondIcon, sChineseK1, sChineseK2, sChineseUnMemo, sChineseWorkFruit, sResultModelMenuChineseName } = item;
495 503 const sChildDetailFlowData = data.filter(child => child.sChildDetailFlow);
496 504 if (sChildDetailFlowData.length) {
497 505 const groupArr = sChildDetailFlowData.reduce((result, current) => {
... ... @@ -500,6 +508,7 @@ class IndexCenter extends Component {
500 508 data: [],
501 509 count: 0,
502 510 showName: current.sChildDetailFlow,
  511 + sChineseK2: current.sChineseK2,
503 512 });
504 513 }
505 514  
... ... @@ -527,6 +536,11 @@ class IndexCenter extends Component {
527 536 data,
528 537 count: count === count ? count : 0,
529 538 columns,
  539 + sChineseK1,
  540 + sChineseK2,
  541 + sChineseUnMemo,
  542 + sChineseWorkFruit,
  543 + sResultModelMenuChineseName
530 544 }
531 545 });
532 546 }
... ... @@ -650,25 +664,34 @@ class IndexCenter extends Component {
650 664 }
651 665  
652 666 handleDoubleClick = (record) => {
  667 + const { app } = this.state;
  668 + const sLanguage = app.userinfo?.sLanguage;
653 669 const newsId = record.sId; /* 表格行的sId */
654 670 const newKey = new Date().getTime().toString();
655 671 const route = record.sName;
656 672 const title = record.sMenuName;
  673 + const sChinesesMenuName = record.sMenuChineseName || '';
  674 + const sMenuNameTip = sLanguage !== 'sChinese' && sChinesesMenuName ? `${title}-${sChinesesMenuName}` : title;
657 675 const pane = {
658 676 title, route, formId: newsId, key: newKey, sModelsType: record.sModelType, fromKey: "1", sSrcModelsId: '1',
659   - currentIndex: 0,
  677 + currentIndex: 0, sMenuNameTip,
660 678 };
  679 + console.log('sMenuNameTip', sMenuNameTip);
661 680 this.props.onAddPane(pane);
662 681 };
663 682  
664 683 handleJumpToResultModel = (record) => {
  684 + const { app } = this.state;
  685 + const sLanguage = app.userinfo?.sLanguage;
665 686 const newsId = record.sResultModelId; /* 表格行的sId */
666 687 const newKey = new Date().getTime().toString();
667 688 const route = record.sResultModelName;
668 689 const title = record.sResultModelMenuName;
  690 + const sChinesesMenuName = record.sResultModelMenuChineseName || '';
  691 + const sMenuNameTip = sLanguage !== 'sChinese' && sChinesesMenuName ? `${title}-${sChinesesMenuName}` : title;
669 692 const pane = {
670 693 title, route, formId: newsId, key: newKey, sModelsType: record.sResultModelType, fromKey: "1",
671   - currentIndex: 0,
  694 + currentIndex: 0, sMenuNameTip,
672 695 };
673 696 this.props.onAddPane(pane);
674 697 };
... ... @@ -762,7 +785,10 @@ class IndexCenter extends Component {
762 785 };
763 786  
764 787 handleTabClick = (e) => {
765   - /* 点击有sName的菜单,增加标签页 */
  788 + // if (!e.bHasRole) return;
  789 + const { app } = this.state;
  790 + const { userinfo = {} } = app;
  791 + const { sLanguage } = userinfo;
766 792 const paneKey = new Date().getTime().toString();
767 793 /* Tab标签Id */
768 794 const formId = e.key;
... ... @@ -771,8 +797,18 @@ class IndexCenter extends Component {
771 797 const sModelsType = e.item.props['data-smodelstype'];
772 798 const title = e.item.props['data-sformname'];
773 799 const sProcName = e.item.props['data-sprocname'];
  800 + const sChinesesMenuName = e.sChinese;
  801 + const sMenuNameTip = sLanguage !== 'sChinese' ? `${e.sMenuName}-${e.sChinese}` : e.sMenuName;
  802 + console.log('aaa', sMenuNameTip);
774 803 const pane = {
775   - title, route, formId, key: paneKey, sModelsType, sProcName,
  804 + title,
  805 + route,
  806 + formId,
  807 + key: paneKey,
  808 + sModelsType,
  809 + sProcName,
  810 + sChinesesMenuName,
  811 + sMenuNameTip,
776 812 };
777 813 let routeNew = route;
778 814 if (route && route.includes('http')) {
... ... @@ -853,13 +889,15 @@ class IndexCenter extends Component {
853 889 }
854 890 renderTreeNodes = data => {
855 891 return data.map(item => {
  892 + const sTip = item.sChineseK1 ? item.showName + '-' + item.sChineseK1 : item.sChineseK1;
  893 + const sTip2 = item.sChineseK2 ? item.showName + '-' + item.sChineseK2 : item.showName;
856 894 if (item.children && item.children.length > 0) {
857 895 return (
858 896 <TreeNode
859 897 switcherIcon={<><FolderFilled /><FolderOpenFilled /></>}
860 898 title={
861 899 <>
862   - <span>{item.showName}</span>
  900 + <span title={sTip}>{item.showName}</span>
863 901 {!item.disabled ?
864 902 <span>
865 903 <span>{'('}</span>
... ... @@ -884,7 +922,7 @@ class IndexCenter extends Component {
884 922 switcherIcon={<img src={file_single} width={13} alt="svg" />}
885 923 title={
886 924 <>
887   - <span>{item.showName}</span>
  925 + <span title={sTip2}>{item.showName}</span>
888 926 <span>
889 927 <span>{'('}</span>
890 928 <span style={{ color: '#2f54eb', fontWeight: 'bold' }}>{item.count || 0}</span>
... ... @@ -899,7 +937,7 @@ class IndexCenter extends Component {
899 937 />
900 938 );
901 939 });
902   - };
  940 + }
903 941 render() {
904 942 const {
905 943 comParameterList, comThirdAppList, dToDayNumSum, dTobeDoneSum, tabsPanes, loadings, tableTreeData, columns, tableData, logoImageInfo = [],
... ...
src/components/MenuPanel/MenuPanel.js
... ... @@ -120,13 +120,23 @@ class MenuPanelComponent extends Component {
120 120 const formId = e.sId;
121 121 const route = e.sName;
122 122 const title = e[sLanguage] || e.sMenuName;
  123 + const sChinesesMenuName = e.sChinese;
  124 + const sMenuNameTip = sLanguage === 'sEnglish' ? `${e.sMenuName}-${e.sChinese}` : e.sMenuName;
123 125 const sModelsType = e.sModelType;
124 126 const { sProcName } = e;
125 127 for (const each of this.props.app.panes) { /* 解决导航栏打开页签,Modal不消失问题 */
126 128 each.notCurrentPane = true;
127 129 }
128 130 const pane = {
129   - title, route, formId, key: paneKey, sModelsType, sProcName, notCurrentPane: false,
  131 + title,
  132 + route,
  133 + formId,
  134 + key: paneKey,
  135 + sModelsType,
  136 + sProcName,
  137 + notCurrentPane: false,
  138 + sChinesesMenuName,
  139 + sMenuNameTip,
130 140 };
131 141 let routeNew = route;
132 142 if (route && route.includes('http')) {
... ... @@ -170,9 +180,11 @@ class MenuPanelComponent extends Component {
170 180 </div>
171 181 {
172 182 item.children !== undefined && item.children.length > 0 && item.children.map((item2) => {
  183 + const tipName2 = userinfo?.sLanguage !== 'sChinese' ? `${item2.sMenuName}-${item2.sChinese}` :
  184 + item2.sMenuName; /* 悬浮时 展示中英文提示 */
173 185 return (
174 186 <div className={styles.submenuName} key={item2.sId}>
175   - <span className={item2.bHasRole ? '' : styles.submenuReadonly} onClick={() => this.handleTabClick(item2)}>
  187 + <span title={tipName2} className={item2.bHasRole ? '' : styles.submenuReadonly} onClick={() => this.handleTabClick(item2)}>
176 188 {/* {item2.sMenuName} */}
177 189 {item2[sLanguage]}
178 190 </span>
... ... @@ -207,6 +219,8 @@ class MenuPanelComponent extends Component {
207 219 } else {
208 220 dataUrl = navdefault;
209 221 }
  222 + const tip = userinfo?.sLanguage === 'sEnglish' ? `${item.sMenuName}-${item.sChinese}` :
  223 + item.sMenuName;
210 224 const dom = (
211 225 <div
212 226 className={`${styles.menuMainItem} ${this.state.expendSid === item.sId ? styles.menuMainItem__active : ''}`}
... ... @@ -218,7 +232,7 @@ class MenuPanelComponent extends Component {
218 232 <div className={styles.menuMainLeftIcon}>
219 233 <img src={dataUrl} alt="" />
220 234 </div>
221   - <span>{item[sLanguage]}</span>
  235 + <span title={tip}>{item[sLanguage]}</span>
222 236 {/* <span>{item.sMenuName}</span> */}
223 237 </div>
224 238 {
... ...
src/models/content.js
... ... @@ -64,6 +64,7 @@ export default {
64 64 route: currentData.sName, /* 路由名称 */
65 65 formId: currentData.sId, /* 窗体编号 */
66 66 sModelsType: currentData.sModelType, /* 窗体类型 */
  67 + sMenuNameTip: currentData.sMenuName !== currentData.sChinese ? `${currentData.sMenuName}-${currentData.sChinese}` : currentData.sMenuName, /* 窗体类型 */
67 68 sProcName: currentData.sProcName,
68 69 bFastOrderView: currentData.bFastOrderView,
69 70 key: paneKey, /* 页签标识 */
... ...
src/routes/tab/tab.js
... ... @@ -161,13 +161,13 @@ function Tab({ dispatch, app }) {
161 161  
162 162 if (pane.paneType) {
163 163 paneType = (
164   - <span>
  164 + <span data-tip={pane.sMenuNameTip} >
165 165 <LegacyIcon type={pane.paneType} />
166 166 {pane.title}
167 167 </span>
168 168 );
169 169 } else {
170   - paneType = <span>{pane.title}</span>;
  170 + paneType = <span data-tip={pane.sMenuNameTip}>{pane.title}</span>;
171 171 }
172 172 return (
173 173 <TabPane tab={paneType} closable={pane.paneType !== "home"} disabled={bRecordFlagDisabled} key={pane.key} className={styles.tabPane}>
... ...
src/utils/config.js
... ... @@ -10,11 +10,11 @@ const bHttps = localStorage.ipAddress ? false : location.protocol === &#39;https:&#39;;
10 10 export const webSite = {
11 11 faceAddress: isDev ? '//km5cjx.gnway.cc:36867/xlyFace' : '//' + location.host + '/xlyFace',
12 12 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/',
13   - ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/',
  13 + ipAddress: isDev ? '//8.210.130.8:8888/xlyEntry_wucai/' : '//' + location.host + '/xlyEntry/',
14 14  
15 15 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//118.178.19.35:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
16 16 // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:37845/xlyEntry/' : '//' + location.host + '/xlyEntry/',
17   - // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
  17 + // ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry22/' : '//' + location.host + '/xlyEntry/',
18 18 interfaceAddress: localStorage.apiAddress ? localStorage.apiAddress : isDev ? '//km5cjx.gnway.cc:36867/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
19 19 fileAddress: isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/', // 接口地址
20 20 fileAddressEbc: isDev ? '//km5cjx.gnway.cc:36867/xlyEntry/' : '//' + location.host + '/xlyEntry/',
... ...