Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/lightning-protection-detection.vue
@@ -10,6 +10,7 @@
    <el-table
      :data="tableData"
      height="calc(100vh - 18em)"
      :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
      style="width: 100%">
      <el-table-column label="序号" type="index" width="120">
        <template v-slot="scope">
@@ -46,7 +47,7 @@
    </el-table>
    <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]"
                   :total="search.total" layout="->,total, sizes, prev, pager, next, jumper"
                   @size-change="handleSizeChange"
                   @size-change="handleSizeChange" background
                   @current-change="handleCurrentChange">
    </el-pagination>
    <el-dialog
@@ -128,6 +129,7 @@
} from '@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment'
import axios from 'axios';
import {deleteCNASFile} from "@/api/cnas/personal/personalList";
export default {
  data() {
@@ -240,19 +242,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)
    }
  }
}