| | |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-button type="primary" icon="download" @click="importTemplate('计划停机模板')">导入模板</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('计划停机')">导出</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> |
| | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | :scroll="{x:true}" |
| | | :scroll="{x:'max-content',y:465}" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | |
| | | { |
| | | title:'类型', |
| | | align:"center", |
| | | dataIndex: 'planCloseType' |
| | | dataIndex: 'planCloseType', |
| | | width:500 |
| | | }, |
| | | { |
| | | title:'时间类型', |
| | | align:"center", |
| | | dataIndex: 'planCloseTimeType' |
| | | dataIndex: 'planCloseTimeType', |
| | | width:350 |
| | | }, |
| | | { |
| | | title:'时长(分钟)', |
| | | align:"center", |
| | | dataIndex: 'planCloseTimeLong' |
| | | dataIndex: 'planCloseTimeLong', |
| | | width:350 |
| | | }, |
| | | { |
| | | title:'备注', |
| | | align:"center", |
| | | dataIndex: 'remark' |
| | | dataIndex: 'remark', |
| | | width:380 |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | width:150, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | |
| | | list: "/mdc/mdcPlanClose/list", |
| | | delete: "/mdc/mdcPlanClose/delete", |
| | | deleteBatch: "/mdc/mdcPlanClose/deleteBatch", |
| | | exportXlsUrl: "/plan/mdcplanclose/exportXls", |
| | | importExcelUrl: "plan/mdcplanclose/importExcel", |
| | | exportXlsUrl: "/mdc/mdcPlanClose/exportXls", |
| | | importExcelUrl: "mdc/mdcPlanClose/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | |
| | | methods: { |
| | | importTemplate(fileName){ |
| | | var a = document.createElement("a"); |
| | | a.href = "/static/计划停机.xls"; |
| | | a.download = "计划停机.xls"; |
| | | a.href = "/static/计划停机管理.xls"; |
| | | a.download = "计划停机管理.xls"; |
| | | a.style.display = "none"; |
| | | document.body.appendChild(a); |
| | | a.click(); |