| | |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | v-has="'sparePartList:add'" |
| | | icon="plus" |
| | | :hidden="disabled" |
| | | >新增</a-button> |
| | | <a-button |
| | | type="primary" |
| | | icon="download" |
| | | @click="handleExportXls('???')" |
| | | @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> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-button style="margin-left: 8px"> |
| | | 批量操作 |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | <a-menu slot="overlay"> |
| | | <a-menu slot="overlay" > |
| | | <a-menu-item @click="batchDel"> |
| | | <a-icon type="delete" />删除 |
| | | </a-menu-item> |
| | |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | v-has="'sparePartList:edit'" |
| | | @click="handleEdit(record)" |
| | | >编辑</a> |
| | | <a-divider type="vertical" /> |
| | |
| | | 更多 |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu slot="overlay" v-has="'sparePartList:delete'"> |
| | | <!-- <a-menu-item> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | </a-menu-item> --> |
| | | <a-menu-item> |
| | | <a-menu-item > |
| | | <a-popconfirm |
| | | title="确定删除吗?" |
| | | @confirm="() => handleDelete(record.id)" |
| | |
| | | delete: "/spare/sparePart/delete", |
| | | deleteBatch: "/spare/sparePart/deleteBatch", |
| | | exportXlsUrl: '/spare/sparePart/exportXls', |
| | | // importExcelUrl: 'base/site/importExcel', |
| | | importExcelUrl: '/spare/sparePart/importExcel', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: "", |
| | |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | }; |
| | | }, |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | |