Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue
@@ -5,8 +5,8 @@
        <el-upload ref='upload'
                   :action="fileAction"
                   :auto-upload="true"
                   :before-upload="fileBeforeUpload" :data="{detailsEvaluateId: info.detailsEvaluateId}"
                   :headers="headers" :on-error="onError"
                   :before-upload="fileBeforeUpload" :data="{qualityMonitorDetailsId: info.qualityMonitorDetailsId}"
                   :headers="uploadHeader" :on-error="onError"
                   :on-success="handleSuccessUp"
                   :show-file-list="false"
                   accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;">
@@ -32,6 +32,11 @@
import file from '@/utils/file';
import filePreview from '@/components/Preview/filePreview.vue';
import limsTable from "@/components/Table/lims-table.vue";
import {
  delVerifyEvaluateFileList,
  getEvaluateFileList
} from '@/api/cnas/process/ensureResults/qualityMonitor'
export default {
  name: 'ViewRecord',
@@ -96,10 +101,11 @@
    // 查询附件列表
    searchTableList () {
      this.tableLoading = true
      this.$axios.get(this.$api.qualityMonitor.getEvaluateFileList + '?detailsEvaluateId=' + this.info.detailsEvaluateId).then(res => {
      getEvaluateFileList({qualityMonitorDetailsId:this.info.qualityMonitorDetailsId}).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data
        if (res.code === 200){
          this.tableData = res.data
        }
      }).catch(err => {
        this.tableLoading = false
        console.log('err---', err);
@@ -125,9 +131,8 @@
    // 删除
    delete (row) {
      this.tableLoading = true
      this.$axios.get(this.$api.qualityMonitor.delVerifyEvaluateFileList + '?evaluateFileId=' + row.evaluateFileId).then(res => {
      delVerifyEvaluateFileList({evaluateFileId : row.evaluateFileId}).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.$message.success('删除成功')
        this.searchTableList()
      }).catch(err => {
@@ -156,6 +161,8 @@
      if (response.code == 200) {
        this.$message.success('上传成功');
        this.searchTableList()
      } else {
        this.$message.error(response.msg);
      }
    },
    // 查看文件
@@ -165,13 +172,8 @@
    },
  },
  computed: {
    headers() {
      return {
        'token': sessionStorage.getItem('token')
      }
    },
    fileAction() {
      return this.javaApi + this.$api.qualityMonitor.uploadEvaluateFile
      return this.javaApi + '/qualityMonitor/uploadEvaluateFile'
    }
  },