master
parent
62050a9e68
commit
8884607c59
|
|
@ -31,7 +31,7 @@
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-to-print": "^3.2.0",
|
"react-to-print": "^3.2.0",
|
||||||
"zy-react-library": "^1.0.99"
|
"zy-react-library": "^1.0.116"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,15 @@ function Rectification(props) {
|
||||||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
await uploadFile({ single: false, files: values.files, params: { type: UPLOAD_FILE_TYPE_ENUM["5"], foreignKey: query.hiddenId } });
|
await uploadFile({ single: false, files: values.files, params: { type: UPLOAD_FILE_TYPE_ENUM["5"], foreignKey: query.hiddenId } });
|
||||||
await props["acceptanceReview"]({
|
const { success } = await props["acceptanceReview"]({
|
||||||
id: query.id,
|
id: query.id,
|
||||||
hiddenId: query.hiddenId,
|
hiddenId: query.hiddenId,
|
||||||
...values,
|
...values,
|
||||||
});
|
});
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.history.goBack();
|
message.success("操作成功");
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,17 @@ function Confirm(props) {
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "是否确认隐患?",
|
content: "是否确认隐患?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await props["confirmSubmit"]({
|
const { success } = await props["confirmSubmit"]({
|
||||||
status: "1",
|
status: "1",
|
||||||
rectificationType: data.rectificationType,
|
rectificationType: data.rectificationType,
|
||||||
...values,
|
...values,
|
||||||
id: data.id,
|
id: data.id,
|
||||||
hiddenId: data.hiddenId,
|
hiddenId: data.hiddenId,
|
||||||
});
|
});
|
||||||
message.success("确认成功");
|
if (success) {
|
||||||
props.history.goBack();
|
message.success("确认成功");
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -217,16 +219,18 @@ function Confirm(props) {
|
||||||
const RejectModalComponent = (props) => {
|
const RejectModalComponent = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
await props["confirmSubmit"]({
|
const { success } = await props["confirmSubmit"]({
|
||||||
status: "0",
|
status: "0",
|
||||||
...values,
|
...values,
|
||||||
id: props.data.id,
|
id: props.data.id,
|
||||||
hiddenId: props.data.hiddenId,
|
hiddenId: props.data.hiddenId,
|
||||||
rectificationType: props.data.rectificationType,
|
rectificationType: props.data.rectificationType,
|
||||||
});
|
});
|
||||||
message.success("打回成功");
|
if (success) {
|
||||||
props.onCancel();
|
message.success("打回成功");
|
||||||
window.history.back();
|
props.onCancel();
|
||||||
|
window.history.back();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,11 @@ function HiddenConfirmUser(props) {
|
||||||
title: "删除确认",
|
title: "删除确认",
|
||||||
content: "确定要删除吗?",
|
content: "确定要删除吗?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await props["confirmUserDelete"]({ id });
|
const { success } = await props["confirmUserDelete"]({ id });
|
||||||
message.success("删除成功");
|
if (success) {
|
||||||
getData();
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -84,11 +86,13 @@ const AddModalComponent = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const deptId = Form.useWatch("deptId", form);
|
const deptId = Form.useWatch("deptId", form);
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
await props["confirmUserAdd"]({ ...values });
|
const { success } = await props["confirmUserAdd"]({ ...values });
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.onCancel();
|
message.success("操作成功");
|
||||||
form.resetFields();
|
props.onCancel();
|
||||||
props.getData();
|
form.resetFields();
|
||||||
|
props.getData();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -115,14 +115,16 @@ function Add(props) {
|
||||||
if (hiddenPartType === "input") {
|
if (hiddenPartType === "input") {
|
||||||
await props["partAdd"]({ hiddenregion: values.hiddenPart });
|
await props["partAdd"]({ hiddenregion: values.hiddenPart });
|
||||||
}
|
}
|
||||||
await props[!query.id ? "hiddenAdd" : "hiddenEdit"]({
|
const { success } = await props[!query.id ? "hiddenAdd" : "hiddenEdit"]({
|
||||||
...values,
|
...values,
|
||||||
id: query.id,
|
id: query.id,
|
||||||
hiddenId: id,
|
hiddenId: id,
|
||||||
source: "1",
|
source: "1",
|
||||||
});
|
});
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.history.goBack();
|
message.success("操作成功");
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const getAIHiddenImageRecognize = async () => {
|
const getAIHiddenImageRecognize = async () => {
|
||||||
const hiddenImageFiles = form.getFieldValue("hiddenImageFiles");
|
const hiddenImageFiles = form.getFieldValue("hiddenImageFiles");
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,11 @@ function List(props) {
|
||||||
title: "删除确认",
|
title: "删除确认",
|
||||||
content: "确定要删除吗?",
|
content: "确定要删除吗?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await props["hiddenDelete"]({ id });
|
const { success } = await props["hiddenDelete"]({ id });
|
||||||
message.success("删除成功");
|
if (success) {
|
||||||
getData();
|
message.success("删除成功");
|
||||||
|
getData();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,12 @@ function Part(props) {
|
||||||
title: "删除确认",
|
title: "删除确认",
|
||||||
content: "确定要删除吗?",
|
content: "确定要删除吗?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await props["partDelete"]({ id });
|
const { success } = await props["partDelete"]({ id });
|
||||||
message.success("删除成功");
|
if (success) {
|
||||||
getData();
|
message.success("删除成功");
|
||||||
getTreeData();
|
getData();
|
||||||
|
getTreeData();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -186,11 +188,13 @@ const AddModalComponent = (props) => {
|
||||||
props.id && getData();
|
props.id && getData();
|
||||||
}, [props.id]);
|
}, [props.id]);
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
await props[!props.id ? "partAdd" : "partEdit"]({ ...values, parentId: props.parentId, id: props.id });
|
const { success } = await props[!props.id ? "partAdd" : "partEdit"]({ ...values, parentId: props.parentId, id: props.id });
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.onCancel();
|
message.success("操作成功");
|
||||||
props.getData();
|
props.onCancel();
|
||||||
props.getTreeData();
|
props.getData();
|
||||||
|
props.getTreeData();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,15 @@ function Review(props) {
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "是否确认通过延期?",
|
content: "是否确认通过延期?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await props["postponementReview"]({
|
const { success } = await props["postponementReview"]({
|
||||||
id: query.id,
|
id: query.id,
|
||||||
hiddenId: query.hiddenId,
|
hiddenId: query.hiddenId,
|
||||||
state: 3,
|
state: 3,
|
||||||
});
|
});
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.history.goBack();
|
message.success("操作成功");
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -45,15 +47,17 @@ function Review(props) {
|
||||||
const RejectModalComponent = (props) => {
|
const RejectModalComponent = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
await props["postponementReview"]({
|
const { success } = await props["postponementReview"]({
|
||||||
state: "4",
|
state: "4",
|
||||||
...values,
|
...values,
|
||||||
id: props.data.id,
|
id: props.data.id,
|
||||||
hiddenId: props.data.hiddenId,
|
hiddenId: props.data.hiddenId,
|
||||||
});
|
});
|
||||||
message.success("打回成功");
|
if (success) {
|
||||||
props.onCancel();
|
message.success("打回成功");
|
||||||
window.history.back();
|
props.onCancel();
|
||||||
|
window.history.back();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -166,10 +166,12 @@ function List(props) {
|
||||||
const TemporarySafetyMeasuresModalComponent = (props) => {
|
const TemporarySafetyMeasuresModalComponent = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
await props["rectificationAddTemporarySafetyMeasures"]({ id: props.id, ...values });
|
const { success } = await props["rectificationAddTemporarySafetyMeasures"]({ id: props.id, ...values });
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.onCancel();
|
message.success("操作成功");
|
||||||
props.getData();
|
props.onCancel();
|
||||||
|
props.getData();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -200,10 +202,12 @@ const RequestAnExtensionModalComponent = (props) => {
|
||||||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
const { filePath } = await uploadFile({ files: values.files, params: { type: UPLOAD_FILE_TYPE_ENUM["138"] } });
|
const { filePath } = await uploadFile({ files: values.files, params: { type: UPLOAD_FILE_TYPE_ENUM["138"] } });
|
||||||
await props["rectificationRequestAnExtension"]({ hiddenId: props.id, ...values, disposalFile: filePath });
|
const { success } = await props["rectificationRequestAnExtension"]({ hiddenId: props.id, ...values, disposalFile: filePath });
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.onCancel();
|
message.success("操作成功");
|
||||||
props.getData();
|
props.onCancel();
|
||||||
|
props.getData();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,15 @@ function Rectification(props) {
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
await uploadFile({ single: false, files: values.afterRectificationImageFiles, params: { type: UPLOAD_FILE_TYPE_ENUM["4"], foreignKey: query.hiddenId } });
|
await uploadFile({ single: false, files: values.afterRectificationImageFiles, params: { type: UPLOAD_FILE_TYPE_ENUM["4"], foreignKey: query.hiddenId } });
|
||||||
await uploadFile({ single: false, files: values.rectificationPlanImageFiles, params: { type: UPLOAD_FILE_TYPE_ENUM["8"], foreignKey: query.hiddenId } });
|
await uploadFile({ single: false, files: values.rectificationPlanImageFiles, params: { type: UPLOAD_FILE_TYPE_ENUM["8"], foreignKey: query.hiddenId } });
|
||||||
await props["rectificationSave"]({
|
const { success } = await props["rectificationSave"]({
|
||||||
id: query.id,
|
id: query.id,
|
||||||
hiddenId: query.hiddenId,
|
hiddenId: query.hiddenId,
|
||||||
...values,
|
...values,
|
||||||
});
|
});
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.history.goBack();
|
message.success("操作成功");
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const range = (start, end) => {
|
const range = (start, end) => {
|
||||||
const result = [];
|
const result = [];
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,16 @@ function Review(props) {
|
||||||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
const { filePath } = await uploadFile({ files: values.files, params: { type: UPLOAD_FILE_TYPE_ENUM["138"] } });
|
const { filePath } = await uploadFile({ files: values.files, params: { type: UPLOAD_FILE_TYPE_ENUM["138"] } });
|
||||||
await props["specialDisposalReview"]({
|
const { success } = await props["specialDisposalReview"]({
|
||||||
...values,
|
...values,
|
||||||
id: query.id,
|
id: query.id,
|
||||||
hiddenId: query.hiddenId,
|
hiddenId: query.hiddenId,
|
||||||
disposalFile: filePath,
|
disposalFile: filePath,
|
||||||
});
|
});
|
||||||
message.success("操作成功");
|
if (success) {
|
||||||
props.history.goBack();
|
message.success("操作成功");
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue