|
|
@@ -358,10 +358,9 @@
|
|
|
};
|
|
|
const params = ref()
|
|
|
const handleSubmit = async () => {
|
|
|
- // const ok = await handleValidate();
|
|
|
- // if (!ok) return;
|
|
|
+ const ok = await handleValidate();
|
|
|
+ if (!ok) return;
|
|
|
try {
|
|
|
- console.log(ruleFormData, '提交参数')
|
|
|
params.value = {
|
|
|
categoryId: ruleFormData.categoryId ?? 0,
|
|
|
hazardDesc: ruleFormData.hazardDesc || '',
|
|
|
@@ -422,40 +421,12 @@
|
|
|
console.log(payload)
|
|
|
await saveEmployeeHazardReport(payload);
|
|
|
ElMessage.success('提交成功');
|
|
|
- // if(isCreateMode.value){
|
|
|
-
|
|
|
- // }else{
|
|
|
- // const payload = buildSubmitPayload({
|
|
|
- // approvalInfoList,
|
|
|
- // approvalDescription: '',
|
|
|
- // templateId: form.approvalTemplateId,
|
|
|
- // });
|
|
|
- // await doSubmit(payload);
|
|
|
- // }
|
|
|
basicDialogRef.value.closeDialog();
|
|
|
router.back();
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-// const handleSubmitApproval = async ()=>{
|
|
|
-// try {
|
|
|
-// if (
|
|
|
-// operate.value === 'employee-report-hidden-trouble-create' ||
|
|
|
-// operate.value === 'hidden-trouble-review-create'
|
|
|
-// ) {
|
|
|
-// await saveEmployeeHazardReport(params.value);
|
|
|
-// ElMessage.success('提交成功');
|
|
|
-// } else if (currentId.value) {
|
|
|
-// await updateEmployeeHazardReport({ id: currentId.value, ...params.value });
|
|
|
-// ElMessage.success('保存成功');
|
|
|
-// }
|
|
|
-// router.back();
|
|
|
-// } catch (e:any) {
|
|
|
-// console.error('提交失败:', e);
|
|
|
-// ElMessage.error(e?.message || e?.data || '提交失败,请重试');
|
|
|
-// }
|
|
|
-// }
|
|
|
|
|
|
const previewOnline = (url: string | undefined, type) => {
|
|
|
if (url) {
|