From b64d6db597d332c699f84e4928f6d3e5551851f1 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期二, 04 三月 2025 16:43:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/CNAS/resourceDemand/device/component/accidentForm.vue |   23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/device/component/accidentForm.vue b/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
index 102085b..6349287 100644
--- a/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
@@ -96,6 +96,10 @@
 
 <script>
 import { selectUserCondition } from "@/api/business/inspectionTask";
+import {
+  getDeviceAccidentReport,
+  addDeviceAccidentReport,
+} from '@/api/cnas/resourceDemand/device.js'
 export default {
   name: "accident-form",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -150,7 +154,7 @@
     },
     // 鏌ヨ璇︽儏
     searchInfo() {
-      this.$axios.get(this.$api.deviceAccidentReport.getDeviceAccidentReport + '?accidentReportId=' + this.form.accidentReportId).then(res => {
+      getDeviceAccidentReport({ accidentReportId: this.form.accidentReportId }).then(res => {
         if (res.code === 200) {
           this.form = { ...res.data }
           if (res.data.isFinish === 0) {
@@ -187,13 +191,7 @@
       this.form.flowType = this.currentStep
       this.$refs.modelForm.validate((valid) => {
         if (valid) {
-          this.$axios.post(this.$api.deviceAccidentReport.addDeviceAccidentReport,
-            this.form, {
-            headers: {
-              'Content-Type': 'application/json'
-            },
-            noQs: true
-          }).then(res => {
+          addDeviceAccidentReport(this.form).then(res => {
             if (res.code == 200) {
               this.$message.success('鏂板鎴愬姛')
               this.resetForm()
@@ -212,14 +210,7 @@
     },
     getUserList() {
       selectUserCondition().then(res => {
-        let data = [];
-        res.data.forEach((a) => {
-          data.push({
-            label: a.name,
-            value: a.id,
-          });
-        });
-        this.userList = data
+        this.userList = res.data
       })
     },
   },

--
Gitblit v1.9.3