From 7bbab0e74d1d0208fa24ec67e3201427078980cd Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期日, 04 一月 2026 17:01:59 +0800
Subject: [PATCH] 器具校准,校准记录

---
 src/views/diagnosis/Modal/MaintainModal.vue |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/src/views/diagnosis/Modal/MaintainModal.vue b/src/views/diagnosis/Modal/MaintainModal.vue
new file mode 100644
index 0000000..648614b
--- /dev/null
+++ b/src/views/diagnosis/Modal/MaintainModal.vue
@@ -0,0 +1,58 @@
+<template>
+  <el-dialog v-model="visible" :title="modalOptions.title" direction="ltr">
+    <MaintainForm ref="maintainFormRef" />
+    <template #footer>
+			<el-button type="primary" @click="sendForm" :loading="loading">
+				{{ modalOptions.confirmText }}
+			</el-button>
+      <el-button @click="closeModal">{{ modalOptions.cancelText }}</el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script setup>
+import { useModal } from "../../../hooks/useModal";
+import MaintainForm from "../Form/MaintainForm.vue";
+import { addMaintain } from "../../../api/equipmentManagement/repair";
+
+defineOptions({
+  name: "缁翠慨妯℃�佹",
+});
+
+const maintainFormRef = ref();
+const emits = defineEmits(["ok"]);
+
+const {
+  id,
+  visible,
+  loading,
+  openModal,
+  modalOptions,
+  handleConfirm,
+  closeModal,
+} = useModal({ title: "璁惧缁翠慨" });
+
+const sendForm = async () => {
+  loading.value = true;
+  const form = await maintainFormRef.value.getForm();
+  const { code } = await addMaintain({ id: id.value, ...form });
+  if (code == 200) {
+    emits("ok");
+    maintainFormRef.value.resetForm();
+    closeModal();
+  }
+  loading.value = false;
+};
+
+const open = async (id, row) => {
+  openModal(id);
+  await nextTick();
+  maintainFormRef.value.setForm(row);
+};
+
+defineExpose({
+  open,
+});
+</script>
+
+<style lang="scss" scoped></style>

--
Gitblit v1.9.3