昵称和头像机审加上拒绝选项

This commit is contained in:
yezian 2024-07-25 20:38:20 +08:00
parent 40c27bdb41
commit 9bd9275230
2 changed files with 29 additions and 3 deletions

View File

@ -162,6 +162,9 @@ const ImageMachineReviewContent = (props) => {
通过
</Button>
)}
{current !== "passbyoperator" && (
<Button onClick={() => onClickRefuse(record)}>拒绝</Button>
)}
</Space.Compact>
</Space>
</div>
@ -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();

View File

@ -168,6 +168,9 @@ const TextMachineReviewContent = (props) => {
{current === "rollbackbymachine" && "通过"}
</Button>
)}
{current !== "passbyoperator" && (
<Button onClick={() => onClickRefuse(record)}>拒绝</Button>
)}
</Space.Compact>
</Space>
</div>
@ -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,
}),
});