zhangherong
2025-04-01 a9ac68fb33e7ff5b2b41d21e11d749e2667869c4
src/views/eam/base/EamMaintenanceStandardList.vue
@@ -46,11 +46,11 @@
      <!-- 操作按钮区域 -->
      <div class="table-operator">
        <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
        <a-button type="primary" icon="download" @click="handleExportXls('保养标准')">导出</a-button>
        <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
                  @change="handleImportExcel">
          <a-button type="primary" icon="import">导入</a-button>
        <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="inspectionImportExcel"
                  @change="inspectionImportExcel">
          <a-button type="primary" icon="import">点检导入</a-button>
        </a-upload>
        <a-button type="primary" icon="download" @click="handleTemplateXlsDownload">点检模板下载</a-button>
        <a-dropdown v-if="selectedRowKeys.length > 0">
          <a-menu slot="overlay">
            <a-menu-item key="1" @click="batchDel">
@@ -130,6 +130,7 @@
import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList'
import { templateXlsDownload } from '@api/manage'
export default {
@@ -208,15 +209,16 @@
        delete: '/eam/maintenanceStandard/delete',
        deleteBatch: '/eam/maintenanceStandard/deleteBatch',
        exportXlsUrl: 'eam/maintenanceStandard/exportXls',
        importExcelUrl: 'eam/maintenanceStandard/importExcel'
        inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel',
        inspectionXlsDownloadUrl: '导入模板/点检标准导入模板_v1.0.xlsx'
      },
      fileUrl: '',
      standardId: '-1'
    }
  },
  computed: {
    importExcelUrl: function() {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
    inspectionImportExcel: function() {
      return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}`
    }
  },
  created() {
@@ -276,7 +278,10 @@
      this.standardId = '-1'
      this.queryParam = {}
      this.loadData(1)
    }
    },
    handleTemplateXlsDownload() {
      templateXlsDownload(this.url.inspectionXlsDownloadUrl)
    },
  }
}
</script>