gaoluyang
2025-02-26 6c76e7bdba80eb1317a08af2a5930b13e5f9ea34
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
      })
    },