From 6c76e7bdba80eb1317a08af2a5930b13e5f9ea34 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 26 二月 2025 11:03:13 +0800
Subject: [PATCH] 质量监控计划联调

---
 src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue |   43 +++++++++++++++++--------------------------
 1 files changed, 17 insertions(+), 26 deletions(-)

diff --git a/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue b/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue
index d63fc50..3f671c2 100644
--- a/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue
+++ b/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue
@@ -159,6 +159,11 @@
 
 <script>
 import ViewRecord from './ViewRecord.vue';
+import {
+  addMonitorEvaluateOpinion, addQualityMonitorEvaluate,
+  getQualityMonitorEvaluate, selectUserDepartmentLimsName
+} from "@/api/cnas/process/ensureResultsValidity/qualityMonitor";
+import {selectUserCondition} from "@/api/business/inspectionTask";
 
 export default {
   name: 'evaluateDialog',
@@ -202,8 +207,7 @@
     // 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅
     searchInfo (row) {
       this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId
-      this.$axios.get(this.$api.qualityMonitor.getQualityMonitorEvaluate + '?qualityMonitorDetailsId=' + row.qualityMonitorDetailsId).then(res => {
-        if (res.code === 201) return
+      getQualityMonitorEvaluate({qualityMonitorDetailsId: row.qualityMonitorDetailsId}).then(res => {
         if (res.data === null) {
           this.showStep = 0
           this.currentStep = 0
@@ -229,14 +233,8 @@
     // 鎻愪氦
     handleEdit () {
       if (this.currentStep === 2) {
-        this.$axios.post(this.$api.qualityMonitor.addMonitorEvaluateOpinion, this.form, {
-          headers: {
-            "Content-Type": "application/json"
-          },
-          noQs: true
-        }).then(res => {
+        addMonitorEvaluateOpinion(this.form).then(res => {
           this.editLoad = false
-          if (res.code === 201) return
           this.$message.success('鎿嶄綔鎴愬姛')
           this.closeEvaDia()
         }).catch(err => {
@@ -270,14 +268,8 @@
             return
           }
         }
-        this.$axios.post(this.$api.qualityMonitor.addQualityMonitorEvaluate, this.form, {
-          headers: {
-            "Content-Type": "application/json"
-          },
-          noQs: true
-        }).then(res => {
+        addQualityMonitorEvaluate(this.form).then(res => {
           this.editLoad = false
-          if (res.code === 201) return
           this.$message.success('鎿嶄綔鎴愬姛')
           this.closeEvaDia()
         }).catch(err => {
@@ -301,20 +293,19 @@
       })
     },
     getAuthorizedPerson() {
-      this.$axios.get(this.$api.user.getUserMenu).then(res => {
-        let data = []
-        res.data.forEach(a => {
+      selectUserCondition({ type: 1 }).then((res) => {
+        let data = [];
+        res.data.forEach((a) => {
           data.push({
             label: a.name,
-            value: a.id
-          })
-        })
-        this.personList = data
-      })
+            value: a.id,
+          });
+        });
+        this.personList = data;
+      });
     },
     getDepartment() {
-      this.$axios.get(this.$api.user.selectUserDepartmentLimsName).then(res => {
-        if (res.code === 201) return
+      selectUserDepartmentLimsName().then(res => {
         this.form.implementDepartment = res.data
       })
     },

--
Gitblit v1.9.3