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