Commit e6d09b9d425e35c925791b4f5e6e426811dcebe6

Authored by chenxt
1 parent f898dd11

走自定义按钮后查询数据

src/mes/common/commonOperationBarComponent/MesToolbar.js
@@ -20,7 +20,6 @@ const ToolbarFun = async (props) => { @@ -20,7 +20,6 @@ const ToolbarFun = async (props) => {
20 20
21 // const { sControlName } = btnConfig; 21 // const { sControlName } = btnConfig;
22 // const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); 22 // const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase();
23 - console.log(btnName, props, 'btnName');  
24 let flag = 0; 23 let flag = 0;
25 let interfaceArr = btnConfig.interface; 24 let interfaceArr = btnConfig.interface;
26 if (btnName === 'btnadd') { 25 if (btnName === 'btnadd') {
@@ -333,7 +332,6 @@ const handleBtnEent = async (props, btnConfig, name, sValue, nextInParams) => { @@ -333,7 +332,6 @@ const handleBtnEent = async (props, btnConfig, name, sValue, nextInParams) => {
333 props.onSaveState({ sCurrMemoProps }); 332 props.onSaveState({ sCurrMemoProps });
334 } 333 }
335 const sButtonParam = btnConfig.sButtonParam; 334 const sButtonParam = btnConfig.sButtonParam;
336 - console.log("11", btnConfig);  
337 const btn = commonUtils.convertStrToObj(sButtonParam); 335 const btn = commonUtils.convertStrToObj(sButtonParam);
338 const sProName = btn.sproName; 336 const sProName = btn.sproName;
339 const inParams = []; 337 const inParams = [];
@@ -474,7 +472,6 @@ const handleBtnEent = async (props, btnConfig, name, sValue, nextInParams) => { @@ -474,7 +472,6 @@ const handleBtnEent = async (props, btnConfig, name, sValue, nextInParams) => {
474 item.bFilter = slaveFilterCondition; 472 item.bFilter = slaveFilterCondition;
475 }); 473 });
476 } 474 }
477 - console.log("inParams", inParams);  
478 } 475 }
479 476
480 const iIndex = commonUtils.isNotEmptyObject(btnConfig) ? menuData.findIndex(item => item.sControlName === btnConfig.sControlName) : -1; 477 const iIndex = commonUtils.isNotEmptyObject(btnConfig) ? menuData.findIndex(item => item.sControlName === btnConfig.sControlName) : -1;
@@ -545,7 +542,6 @@ const handleBtnEent = async (props, btnConfig, name, sValue, nextInParams) => { @@ -545,7 +542,6 @@ const handleBtnEent = async (props, btnConfig, name, sValue, nextInParams) => {
545 sProName, 542 sProName,
546 JSON.stringify({ params: inParams, changeValue: sValue, sButtonParam: btn }) 543 JSON.stringify({ params: inParams, changeValue: sValue, sButtonParam: btn })
547 ); 544 );
548 - console.log("result", result);  
549 if (result > 0) { 545 if (result > 0) {
550 /* 只有成功 才能调用接口 -5代表失败 */ 546 /* 只有成功 才能调用接口 -5代表失败 */
551 const asyncFunc = async () => { 547 const asyncFunc = async () => {
@@ -610,19 +606,10 @@ const handleProcedureCall = async (props, btnConfig, proName, proInParam, other) @@ -610,19 +606,10 @@ const handleProcedureCall = async (props, btnConfig, proName, proInParam, other)
610 slave3Data[iIndex].sCalcProDetail = returnData.msg; 606 slave3Data[iIndex].sCalcProDetail = returnData.msg;
611 props.onSaveState({ slave3Data }); 607 props.onSaveState({ slave3Data });
612 } 608 }
613 - props.onExecInstructSet({  
614 - btnConfig: {  
615 - showName: "刷新",  
616 - sInstruct: JSON.stringify([  
617 - {  
618 - opr: "refresh",  
619 - },  
620 - ])  
621 - }  
622 - }); 609 +
623 } else if (returnData.code === 1) { 610 } else if (returnData.code === 1) {
624 message.success(returnData.msg); 611 message.success(returnData.msg);
625 - // props.onButtonClick("BtnRefresh"); 612 + props.onRefresh()
626 } else if (returnData.code === -8) { 613 } else if (returnData.code === -8) {
627 Modal.info({ 614 Modal.info({
628 title: "温馨提示:", 615 title: "温馨提示:",
src/mes/common/commonOperationBarComponent/index.js
@@ -822,7 +822,6 @@ const useCommonOperationBarComponentEvent = props => { @@ -822,7 +822,6 @@ const useCommonOperationBarComponentEvent = props => {
822 style.color = "#000"; 822 style.color = "#000";
823 defaultProps.style = style; 823 defaultProps.style = style;
824 } 824 }
825 - console.log(defaultProps, 'defaultProps');  
826 825
827 return defaultProps; 826 return defaultProps;
828 }; 827 };
@@ -933,7 +932,6 @@ const CommonOperationBarComponent = basProps => { @@ -933,7 +932,6 @@ const CommonOperationBarComponent = basProps => {
933 const btnLeftConfig = gdsconfigformslave.filter( 932 const btnLeftConfig = gdsconfigformslave.filter(
934 item => item.bVisible && item.sControlName.includes("BtnLeft.") 933 item => item.bVisible && item.sControlName.includes("BtnLeft.")
935 ); 934 );
936 - console.log(btnLeftConfig, gdsconfigformslave, 'btnLeftConfig');  
937 935
938 // 将扫码上料放到最后 936 // 将扫码上料放到最后
939 const scanCodeToLoadMaterialsIndex = btnLeftConfig.findIndex( 937 const scanCodeToLoadMaterialsIndex = btnLeftConfig.findIndex(
src/utils/config.js
@@ -4,10 +4,10 @@ const bHttps = location.protocol === 'https:'; @@ -4,10 +4,10 @@ const bHttps = location.protocol === 'https:';
4 export const webSite = { 4 export const webSite = {
5 // ipAddress: '//t0.xlyprint.com:8000/xlyEntry/', /* 服务器地址 */ 5 // ipAddress: '//t0.xlyprint.com:8000/xlyEntry/', /* 服务器地址 */
6 // faceAddress: isDev ? '//192.168.11.22:8080/xlyFace' : '//' + location.host + '/xlyFace', 6 // faceAddress: isDev ? '//192.168.11.22:8080/xlyFace' : '//' + location.host + '/xlyFace',
7 - fileAddress: isDev ? '//km5cjx.gnway.cc:47400/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址  
8 - faceAddress: isDev ? '//km5cjx.gnway.cc:47400/xlyFace' : '//' + location.host + '/xlyFace',  
9 - ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:47400/xlyEntry/' : '//' + location.host + '/xlyEntry/',  
10 - interfaceAddress: isDev ? '//km5cjx.gnway.cc:47400/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 7 + fileAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址
  8 + faceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyFace' : '//' + location.host + '/xlyFace',
  9 + ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:43920/xlyEntry/' : '//' + location.host + '/xlyEntry/',
  10 + interfaceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
11 // ipAddress: isDev ? '//ebc.jinjia.com:8091/xlyEntry/' : '//' + location.host + '/xlyEntry/', 11 // ipAddress: isDev ? '//ebc.jinjia.com:8091/xlyEntry/' : '//' + location.host + '/xlyEntry/',
12 // interfaceAddress: isDev ? '//ebc.jinjia.com:8091/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 12 // interfaceAddress: isDev ? '//ebc.jinjia.com:8091/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
13 // ipAddress: isDev ? '//192.168.11.26:8080/xlyEntry/' : '//' + location.host + '/xlyEntry/', 13 // ipAddress: isDev ? '//192.168.11.26:8080/xlyEntry/' : '//' + location.host + '/xlyEntry/',