feat:故障记录导出

master
袁子龙 2024-09-25 22:11:45 +08:00
parent 5978988c32
commit 38fe335117
1 changed files with 19 additions and 6 deletions

View File

@ -28,19 +28,20 @@
</el-form-item>
</el-form>
<rl-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
type="warning"
plain
icon="el-icon-plus"
icon="el-icon-download"
size="mini"
@click="handelExport">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</rl-row>
</el-row>
<el-table v-loading="loading" :data="messageList" stripe>
<el-table v-loading="loading" :data="messageList" stripe @selection-chang="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="故障编号" align="center" prop="sysCarFaultId" />
<el-table-column label="VIN码" align="center" prop="vin" />
<el-table-column label="开始时间" align="center" prop="createTime" />
@ -175,6 +176,12 @@ export default {
props:{},
data() {
return {
//
ids:[],
//
single:true,
//
multiple:true,
activeName:'all',
loading:true,
messageList:[],
@ -256,7 +263,13 @@ export default {
this.download('breakdown/log/export',{
...this.queryParams
},`log_${new Date().getTime()}.xlsx`)
}
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
},
created() {
this.getList();