diff --git a/src/components/Common/CommonComponent/index.js b/src/components/Common/CommonComponent/index.js index acdb1f1..40266da 100644 --- a/src/components/Common/CommonComponent/index.js +++ b/src/components/Common/CommonComponent/index.js @@ -754,6 +754,7 @@ export default class CommonComponent extends Component { const { userinfo } = app; let { sTableTitleSql } = showConfig; /* 根据用户配置语言 设置表格标题 */ + console.log('2122', showConfig); if (commonUtils.isJSON(sTableTitleSql) && sTableTitleSql.includes('Chinese')) { sTableTitleSql = this.getLocalizedString(sTableTitleSql, userinfo.sLanguage); } diff --git a/src/mes/common/commonOperationBarComponent/index.js b/src/mes/common/commonOperationBarComponent/index.js index 87d835a..b4a0052 100644 --- a/src/mes/common/commonOperationBarComponent/index.js +++ b/src/mes/common/commonOperationBarComponent/index.js @@ -10,7 +10,7 @@ import costomPageFun from "@/mes/costomPageFun"; import * as commonConfig from "@/utils/config"; import styles from "./index.less"; -import { Button, Space, Input, Modal, Dropdown } from "antd"; +import {Button, Space, Input, Modal, Dropdown, Tooltip} from "antd"; import { ScanOutlined } from "@ant-design/icons"; const useCommonOperationBarComponentEvent = props => { @@ -1021,8 +1021,17 @@ const CommonOperationBarComponent = basProps => {
{btnLeftConfig.map(item => { + console.log('ssss', item); + let sTooltip = item.showName +'-'+ item.sChinese || item.showName ; + if(item.showName === 'Proofreading/revision Complete'){ + sTooltip = item.showName + '-装校版结束'; + } else if(item.showName === 'All'){ + sTooltip = item.showName + '-全部'; + } + if (item.showName === "扫码上料") { return ( + + + ); })} @@ -1076,19 +1088,29 @@ const CommonOperationBarComponent = basProps => { "" )} {btnRightConfig.map(item => { + let sTooltip = item.showName +'-'+ item.sChinese || item.showName ; + if(item.showName === 'Proofreading/revision Complete'){ + sTooltip = item.showName + '-装校版结束'; + } else if(item.showName === 'All'){ + sTooltip = item.showName + '-全部'; + } return ( - + + + ); })} {!belongsToForm && commonUtils.isNotEmptyObject(searchField) && ( <> - + + )} diff --git a/src/mes/productionExec/noticeModal/index.js b/src/mes/productionExec/noticeModal/index.js index 1a6d25e..996975a 100644 --- a/src/mes/productionExec/noticeModal/index.js +++ b/src/mes/productionExec/noticeModal/index.js @@ -269,7 +269,7 @@ const firstNoticeModal = _props => { const firstNotice = commonFunc.showLocalMessage(props, 'firstNotice', '首签样通知'); const firstNoticeList = commonFunc.showLocalMessage(props, 'firstNoticeList', '版材消耗登记'); const employeeNameIdTitle = commonFunc.showLocalMessage(props, 'employeeName', '员工名称/工号'); - const btnAll = commonFunc.showLocalMessage(props, 'btnAll', '全部'); + const btnAll = 22222; const btnSearch = commonFunc.showLocalMessage(props, 'BtnSearch', '查询'); const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); const selectRecipient = commonFunc.showLocalMessage(props, 'selectRecipient', '请先选择接收人!'); diff --git a/src/mes/productionExec/productionExecMain/index.js b/src/mes/productionExec/productionExecMain/index.js index 1212da5..fdd1b1a 100644 --- a/src/mes/productionExec/productionExecMain/index.js +++ b/src/mes/productionExec/productionExecMain/index.js @@ -1,5 +1,5 @@ import React, { useEffect, useState, useRef, useMemo } from "react"; -import { Button, Spin, Row, Col } from "antd"; +import { Button, Spin, Row, Col, Tooltip } from "antd"; import { operationFetch } from "./operationFetch"; import * as commonUtils from "@/utils/utils"; @@ -685,13 +685,19 @@ const ProductionExecContent = props => { config.gdsconfigformslave.find( item => item.sControlName === sControlName ) || {}; + + // 从配置中解构出 tooltip(如果有) + const { tooltip, ...restConfig } = btnConfig; + console.log('btnConfig', btnConfig); + return { - ...btnConfig, + ...restConfig, disabled: props.onGetBtnStatus(tableName, btnConfig), onClick: async () => { if (!props.onGetBtnContinue()) return; await props.awaitPromiseReturn(); const { sButtonParam, sInstruct } = btnConfig; + // 调用指令集 if (sInstruct) { props.onExecInstructSet({ @@ -705,6 +711,7 @@ const ProductionExecContent = props => { }); return; } + // 调用存储过程 if (sButtonParam) { props.onProcedureCall({ @@ -717,7 +724,11 @@ const ProductionExecContent = props => { }); return; } - } + }, + // 如果有 tooltip,返回一个带 Tooltip 的按钮渲染函数 + ...(tooltip ? { + children: (button) => {button} + } : {}) }; }; @@ -864,6 +875,7 @@ const ProductionExecContent = props => {
+ - +
@@ -1135,13 +1150,16 @@ const ProductionExecContent0 = props => {
- + + +
diff --git a/src/mes/scheduledTasks/machineTasks/index.js b/src/mes/scheduledTasks/machineTasks/index.js index 406dcc8..7a8c37d 100644 --- a/src/mes/scheduledTasks/machineTasks/index.js +++ b/src/mes/scheduledTasks/machineTasks/index.js @@ -706,7 +706,7 @@ }); const feedbackIssues = commonFunc.showLocalMessage(props, 'feedbackIssues', '前期生产或反馈问题'); const btnsearch = commonFunc.showLocalMessage(props, 'BtnSearch', '查询'); - const btnAll = commonFunc.showLocalMessage(props, 'btnAll', '全部'); + const btnAll = 111111; const sWorkOrderNo = commonFunc.showLocalMessage(props, 'sWorkOrderNo', '工单编号'); const deviceInfo = commonFunc.showLocalMessage(props, 'deviceInfo', '设备信息'); const TasksQty = commonFunc.showLocalMessage(props, 'TasksQty', '今日完成任务批次/产量(个)');