From f01d916828cf9746a0f438d9472af9271efd9729 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 03 三月 2025 14:47:47 +0800
Subject: [PATCH] 完成设备搬迁

---
 src/views/CNAS/resourceDemand/device/component/inspectionForm.vue |   46 +++++++++++++++-------------------------------
 1 files changed, 15 insertions(+), 31 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
index 6b6b36b..5e33adc 100644
--- a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
@@ -136,6 +136,13 @@
 </template>
 
 <script>
+import {
+  getDeviceInspectionRecord,
+  addDeviceInspectionRecord,
+  updateDeviceInspectionRecord,
+  reviewDeviceInspectionRecord,
+} from '@/api/cnas/resourceDemand/device.js'
+import { selectUserCondition } from "@/api/business/inspectionTask";
 export default {
   name: "inspection-form",
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -181,7 +188,9 @@
       }
     },
     searchInfo() {
-      this.$axios.get(this.$api.deviceInspectionRecord.getDeviceInspectionRecord + '?inspectionRecordId=' + this.form.inspectionRecordId).then(res => {
+      getDeviceInspectionRecord({
+        inspectionRecordId: this.form.inspectionRecordId
+      }).then(res => {
         if (res.code === 200) {
           this.form = { ...res.data }
           this.details = this.form.details || []
@@ -198,13 +207,7 @@
       this.form.details = this.HaveJson(this.details)
       this.submitFormLoading = true
       if (this.operationType === 'add') {
-        this.$axios.post(this.$api.deviceInspectionRecord.addDeviceInspectionRecord,
-          this.form, {
-          headers: {
-            'Content-Type': 'application/json'
-          },
-          noQs: true
-        }).then(res => {
+        addDeviceInspectionRecord(this.form).then(res => {
           if (res.code == 200) {
             this.$message.success('鏂板鎴愬姛')
             this.resetForm()
@@ -214,13 +217,7 @@
           this.submitFormLoading = false
         })
       } else {
-        this.$axios.post(this.$api.deviceInspectionRecord.updateDeviceInspectionRecord,
-          this.form, {
-          headers: {
-            'Content-Type': 'application/json'
-          },
-          noQs: true
-        }).then(res => {
+        updateDeviceInspectionRecord(this.form).then(res => {
           if (res.code == 200) {
             this.$message.success('鏂板鎴愬姛')
             this.resetForm()
@@ -236,13 +233,7 @@
         inspectionRecordId: this.form.inspectionRecordId,
         status: status,
       }
-      this.$axios.post(this.$api.deviceInspectionRecord.reviewDeviceInspectionRecord,
-        params, {
-        headers: {
-          'Content-Type': 'application/json'
-        },
-        noQs: true
-      }).then(res => {
+      reviewDeviceInspectionRecord(params).then(res => {
         if (res.code == 200) {
           this.$message.success('瀹℃牳鎴愬姛')
           this.resetForm()
@@ -257,18 +248,11 @@
       this.$emit('closeDialog')
     },
     getUserList() {
-      this.$axios.post(this.$api.user.selectUserList, {
-        page: { current: -1, size: -1, },
-        entity: { name: null }
-      }, {
-        headers: {
-          'Content-Type': 'application/json'
-        }
-      }).then(res => {
+      selectUserCondition().then(res => {
         if (res.code === 201) {
           return
         }
-        this.userList = res.data.records
+        this.userList = res.data
       })
     },
   },

--
Gitblit v1.9.3