Commit c474e905314a65aaddeeaa24f581afcc87c33a0a

Authored by Min
1 parent f8746fbf

1.按钮操作栏增加通用的人脸采集BtnAddFace功能

src/components/Common/ToolBar/ToolBarNew.js
@@ -28,6 +28,7 @@ import styles from "./index.less"; @@ -28,6 +28,7 @@ import styles from "./index.less";
28 import SvgIcon from "../../SvgIcon"; 28 import SvgIcon from "../../SvgIcon";
29 import CommonList from "@/components/Common/CommonList"; 29 import CommonList from "@/components/Common/CommonList";
30 import instructSet from "@/components/Common/CommonInstructSet"; 30 import instructSet from "@/components/Common/CommonInstructSet";
  31 +import PersonCenterAddFace from "@/components/Common/PersonCenter/PersonCenterAddFace";
31 import FileImposition from "@/components/Common/FileImposition"; 32 import FileImposition from "@/components/Common/FileImposition";
32 import MakeUpPDF from "@/components/Common/MakeUpPDF"; 33 import MakeUpPDF from "@/components/Common/MakeUpPDF";
33 import BoxDesignCompontent from "@/components/Common/BoxDesignCompontent"; 34 import BoxDesignCompontent from "@/components/Common/BoxDesignCompontent";
@@ -1947,6 +1948,11 @@ class ToolBarComponent extends Component { @@ -1947,6 +1948,11 @@ class ToolBarComponent extends Component {
1947 this.props.onSaveState({ 1948 this.props.onSaveState({
1948 loading: false, 1949 loading: false,
1949 }); 1950 });
  1951 + } else if (key.includes("BtnAddFace")) {
  1952 + // 显示人脸采集弹窗
  1953 + this.props.onSaveState({
  1954 + addFaceVisible: true,
  1955 + });
1950 } else if (key.includes("BtnGetApiDialog")) { 1956 } else if (key.includes("BtnGetApiDialog")) {
1951 /* 从第三方拿数据 */ 1957 /* 从第三方拿数据 */
1952 /* 将当前界面所有数据集作为入参传到接口中 */ 1958 /* 将当前界面所有数据集作为入参传到接口中 */
@@ -3133,6 +3139,12 @@ class ToolBarComponent extends Component { @@ -3133,6 +3139,12 @@ class ToolBarComponent extends Component {
3133 } 3139 }
3134 this.props.onSaveState({ [modelVisible]: false }); 3140 this.props.onSaveState({ [modelVisible]: false });
3135 }; 3141 };
  3142 +
  3143 + onSaveFaceSuccess = () => {
  3144 + // 人脸采集成功后关闭弹窗
  3145 + this.props.onSaveState({ addFaceVisible: false });
  3146 + message.success("人脸采集成功");
  3147 + };
3136 handleFilfileManageOk = (modelVisible, selectConfig, filfileSelectedData, sSrcSlaveId, filfileDelData) => { 3148 handleFilfileManageOk = (modelVisible, selectConfig, filfileSelectedData, sSrcSlaveId, filfileDelData) => {
3137 if (commonUtils.isNotEmptyObject(sSrcSlaveId) && !location.pathname.includes("commonList")) { 3149 if (commonUtils.isNotEmptyObject(sSrcSlaveId) && !location.pathname.includes("commonList")) {
3138 /* 工单、工艺卡、报价单控制表数据带回 */ 3150 /* 工单、工艺卡、报价单控制表数据带回 */
@@ -4053,6 +4065,7 @@ class ToolBarComponent extends Component { @@ -4053,6 +4065,7 @@ class ToolBarComponent extends Component {
4053 visibleApiDialog, 4065 visibleApiDialog,
4054 getApiDialogData, 4066 getApiDialogData,
4055 bTabModal, 4067 bTabModal,
  4068 + addFaceVisible,
4056 } = this.props; 4069 } = this.props;
4057 const { userinfo } = app; 4070 const { userinfo } = app;
4058 const pane = app.panes.filter(paneTmp => paneTmp.key === sTabId)[0]; 4071 const pane = app.panes.filter(paneTmp => paneTmp.key === sTabId)[0];
@@ -4801,6 +4814,18 @@ class ToolBarComponent extends Component { @@ -4801,6 +4814,18 @@ class ToolBarComponent extends Component {
4801 <FileImposition {...this.props} {...fileImpositionData} /> 4814 <FileImposition {...this.props} {...fileImpositionData} />
4802 {makeUpPDFData?.pdfMakeUpVisible && <MakeUpPDF {...makeUpPDFData} />} 4815 {makeUpPDFData?.pdfMakeUpVisible && <MakeUpPDF {...makeUpPDFData} />}
4803 {BtnBoxData?.boxVisible && <BoxDesignCompontent {...BtnBoxData} />} 4816 {BtnBoxData?.boxVisible && <BoxDesignCompontent {...BtnBoxData} />}
  4817 + {
  4818 + <PersonCenterAddFace
  4819 + {...this.props}
  4820 + addFaceVisible={addFaceVisible}
  4821 + onCancel={this.handleFilfileManageCancel.bind(this, "addFaceVisible")}
  4822 + handelCance={this.handleFilfileManageCancel.bind(this, "addFaceVisible")}
  4823 + onSaveFaceSuccess={this.onSaveFaceSuccess}
  4824 + app={app}
  4825 + formItemLayout={this.formItemLayout}
  4826 + tailFormItemLayout={this.tailFormItemLayout}
  4827 + />
  4828 + }
4804 </div> 4829 </div>
4805 ); 4830 );
4806 } 4831 }