From 9bd92752306cace385176de6df377b30892d18d3 Mon Sep 17 00:00:00 2001 From: yezian Date: Thu, 25 Jul 2024 20:38:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=B5=E7=A7=B0=E5=92=8C=E5=A4=B4=E5=83=8F?= =?UTF-8?q?=E6=9C=BA=E5=AE=A1=E5=8A=A0=E4=B8=8A=E6=8B=92=E7=BB=9D=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ImageMachineReview/index.jsx | 15 ++++++++++++++- src/pages/TextMachineReview/index.jsx | 17 +++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/pages/ImageMachineReview/index.jsx b/src/pages/ImageMachineReview/index.jsx index b03ad27..9a7bc88 100644 --- a/src/pages/ImageMachineReview/index.jsx +++ b/src/pages/ImageMachineReview/index.jsx @@ -162,6 +162,9 @@ const ImageMachineReviewContent = (props) => { 通过 )} + {current !== "passbyoperator" && ( + + )} @@ -170,14 +173,24 @@ const ImageMachineReviewContent = (props) => { ]; //给表单绑定ref const formRef = useRef(null); - //点击修改状态按钮 + //点击通过按钮 const onClickSubmit = (record) => { formRef.current.record = record; formRef.current.btn = "submit"; formRef.current.submit(); }; + //点击拒绝按钮 + const onClickRefuse = (record) => { + formRef.current.record = record; + formRef.current.btn = "refuse"; + formRef.current.submit(); + }; //提交表单 const handleSubmit = async () => { + let opType = 0; + if (formRef.current.btn === "refuse") { + opType = 1; + } //提交数据 try { const base = baseRequest(); diff --git a/src/pages/TextMachineReview/index.jsx b/src/pages/TextMachineReview/index.jsx index 8bca5b2..9767998 100644 --- a/src/pages/TextMachineReview/index.jsx +++ b/src/pages/TextMachineReview/index.jsx @@ -168,6 +168,9 @@ const TextMachineReviewContent = (props) => { {current === "rollbackbymachine" && "通过"} )} + {current !== "passbyoperator" && ( + + )} @@ -176,14 +179,24 @@ const TextMachineReviewContent = (props) => { ]; //给表单绑定ref const formRef = useRef(null); - //点击修改状态按钮 + //点击通过按钮 const onClickSubmit = (record) => { formRef.current.record = record; formRef.current.btn = "submit"; formRef.current.submit(); }; + //点击拒绝按钮 + const onClickRefuse = (record) => { + formRef.current.record = record; + formRef.current.btn = "refuse"; + formRef.current.submit(); + }; //提交表单 const handleSubmit = async () => { + let opType = 0; + if (formRef.current.btn === "refuse") { + opType = 1; + } //提交数据 try { const base = baseRequest(); @@ -194,7 +207,7 @@ const TextMachineReviewContent = (props) => { }, body: JSON.stringify({ ids: [formRef.current.record.others.id], - op_type: 0, + op_type: opType, ...base, }), });