代码补正
This commit is contained in:
parent
eb126928f2
commit
e7ade0eb34
@ -34,7 +34,7 @@
|
||||
<span>{{ scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" align="center" prop="sort" />
|
||||
<!-- <el-table-column label="排序" align="center" prop="sort" />-->
|
||||
|
||||
<el-table-column label="扣车地址" align="center" prop="dictLabel">
|
||||
<template slot-scope="scope">
|
||||
|
@ -53,3 +53,12 @@ export function listCar() {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function exportCarSpend(params) {
|
||||
return request({
|
||||
url: 'rescue/rescueCarSpend/export',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
@ -94,7 +94,7 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" :loading="exportLoading" size="mini" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@ -392,6 +392,8 @@ export default {
|
||||
dicts: ['dljy_type', 'fee_type', 'rescue_car_type', 'yes_no','jy_status','jy_order_status'],
|
||||
data() {
|
||||
return {
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
chooseDriverId:'',
|
||||
rescueInfoId:'',
|
||||
// 遮罩层
|
||||
@ -686,10 +688,15 @@ export default {
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
try {
|
||||
this.exportLoading = true
|
||||
this.queryParams.pageNo = 1
|
||||
this.queryParams.pageSize = 500
|
||||
const data = await downloadOrder(this.queryParams)
|
||||
this.$download.excel(data, `救援订单_${new Date().getTime()}.xls`)
|
||||
}catch {}
|
||||
finally {}
|
||||
finally {
|
||||
this.exportLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -83,7 +83,7 @@
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
|
||||
:loading="exportLoading"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
@ -215,7 +215,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRescueCarSpend, getRescueCarSpend, delRescueCarSpend, addRescueCarSpend, updateRescueCarSpend,listCar } from "./api/rescueCarSpend";
|
||||
import { listRescueCarSpend, getRescueCarSpend, delRescueCarSpend, addRescueCarSpend, updateRescueCarSpend,listCar,exportCarSpend } from "./api/rescueCarSpend";
|
||||
|
||||
export default {
|
||||
name: "RescueCarSpend",
|
||||
@ -258,6 +258,8 @@ export default {
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
time1:[],
|
||||
@ -419,10 +421,15 @@ export default {
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('rescue/rescueCarSpend/export', {
|
||||
...this.queryParams
|
||||
}, `rescueCarSpend_${new Date().getTime()}.xlsx`)
|
||||
async handleExport() {
|
||||
try {
|
||||
this.exportLoading = true
|
||||
const data = await exportCarSpend(this.queryParams)
|
||||
this.$download.excel(data, `rescueCarSpend_${new Date().getTime()}.xlsx`)
|
||||
}catch{}
|
||||
finally {
|
||||
this.exportLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -72,6 +72,7 @@
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -137,7 +138,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { moneyManagement, moneyManagementData,exportManagement } from '@/api/rescue/info'
|
||||
import { moneyManagement, moneyManagementData, exportManagement } from '@/api/rescue/info'
|
||||
import { getmap } from '@/api/Map/map'
|
||||
import Map from '../../components/Map/index'
|
||||
|
||||
@ -146,6 +147,8 @@ export default {
|
||||
dicts: ['dljy_type', 'fee_type', 'car_type', 'yes_no', 'jy_status', 'jy_order_status'],
|
||||
data() {
|
||||
return {
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
pickerOptions: null,
|
||||
chooseDriverId: '',
|
||||
rescueInfoId: '',
|
||||
@ -428,8 +431,17 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
const data = await exportManagement(this.queryParams)
|
||||
this.$download.excel(data, `救援财务报表_${new Date().getTime()}.xlsx`)
|
||||
try {
|
||||
this.exportLoading = true
|
||||
this.queryParams.pageNo = 1
|
||||
this.queryParams.pageSize = 500
|
||||
this.$modal.msgError("系统故障,联系管理员")
|
||||
// const data = await exportManagement(this.queryParams)
|
||||
// this.$download.excel(data, `救援财务报表_${new Date().getTime()}.xlsx`)
|
||||
} catch {
|
||||
} finally {
|
||||
this.exportLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user