zhuo
2025-03-16 8fd9e43b8ae22e64c62afee56c24df682f8c47c9
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/lightning-protection-detection.vue
@@ -128,6 +128,7 @@
} from '@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment'
import axios from 'axios';
import {deleteCNASFile} from "@/api/cnas/personal/personalList";
export default {
  data() {
@@ -240,19 +241,20 @@
      })
    },
    handleRemove(file) {
      this.$axios.delete(this.$api.personnel.deleteCNASFile + "?fileName=" + file.name).then(res => {
        if (res.code === 201) return;
      deleteCNASFile({fileName: file.name}).then(res => {
        this.$message.success('删除成功!')
        let index = this.form.fileList.indexOf(fileName)
        if (index != -1) {
          this.successFileList.splice(index, 1)
        let index = this.form.fileList.indexOf(file.name)
        if (index !== -1) {
          this.form.fileList.splice(index, 1)
        }
      })
    },
    download(row) {
      let url = '';
      url = this.javaApi + '/img/' + row.systemFileName
      this.$download.saveAs(url, row.fileName)
      if (!row.systemFileName) {
        this.$message.warning('暂无文件')
        return
      }
      this.$download.saveAs(row.systemFileName, row.fileName)
    }
  }
}