| | |
| | | <!-- 操作按钮区域 --> |
| | | <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-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | |
| | | delete: '/eam/maintenanceStandard/delete', |
| | | deleteBatch: '/eam/maintenanceStandard/deleteBatch', |
| | | exportXlsUrl: 'eam/maintenanceStandard/exportXls', |
| | | importExcelUrl: 'eam/maintenanceStandard/importExcel' |
| | | inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel' |
| | | }, |
| | | fileUrl: '', |
| | | standardId: '-1' |
| | | } |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | inspectionImportExcel: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}` |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '序号', |
| | | align: 'center', |
| | | dataIndex: 'itemCode' |
| | | dataIndex: 'itemCode', |
| | | width: 60, |
| | | }, |
| | | { |
| | | title: '保养项', |