|
|
|
@ -108,7 +108,7 @@ |
|
|
|
<el-button v-if="!authSearch" @click="getDataList()">查询</el-button> |
|
|
|
<el-button v-if="!authCheck" @click="checkModals()">批量审核</el-button> |
|
|
|
<el-button v-if="!authChange" type="primary" @click="changeModel()">更改执行人员</el-button> |
|
|
|
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button> |
|
|
|
<el-button @click="exportExcel()" type="primary" :loading="exportLoading" style="margin-left: 2px">{{'导出'}}</el-button> |
|
|
|
<!-- <download-excel--> |
|
|
|
<!-- :fields="fields()"--> |
|
|
|
<!-- :data="exportData"--> |
|
|
|
@ -771,6 +771,7 @@ import { |
|
|
|
queryHistoryRecord, // 查看维修历史 |
|
|
|
getSparPartImages, // 获取备件图片 |
|
|
|
getConfirmButtonOperator, // 获取确认按钮操作人 |
|
|
|
eamExchangeOrderExportExcel, |
|
|
|
} from "@/api/eam/eam.js" |
|
|
|
import { |
|
|
|
downLoadObjectFile, |
|
|
|
@ -787,7 +788,7 @@ import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/user |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
import {isAuth} from '../../../utils' |
|
|
|
import excel from "@/utils/excel-util.js"; |
|
|
|
import {abandonedEamWorkOrder, cancelDefectOrder} from "../../../api/eam/eam"; |
|
|
|
import {abandonedEamWorkOrder, cancelDefectOrder, eamWorkOrderExpiortExcel} from "../../../api/eam/eam"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Chooselist |
|
|
|
@ -809,6 +810,7 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
exportLoading: false, |
|
|
|
// 是否收藏 |
|
|
|
favorite: false, |
|
|
|
// 导出 start |
|
|
|
@ -1953,18 +1955,27 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async exportExcel() { |
|
|
|
this.searchData.limit = -1 |
|
|
|
this.searchData.page = 1 |
|
|
|
excel.exportTable({ |
|
|
|
url: "/pms/eam/eamWorkOrderSearchForDefect", |
|
|
|
columnMapping: this.columnList,//可以直接用table,不需要的列就剔除 |
|
|
|
mergeSetting: [],//需要合并的列 |
|
|
|
params: this.searchData, |
|
|
|
fileName: this.exportName+".xlsx", |
|
|
|
rowFetcher: res => res.data, |
|
|
|
columnFormatter: [], |
|
|
|
dropColumns: [],//需要剔除的列,例如dropColumns: ["netWeight"],即剔除净重列 |
|
|
|
}); |
|
|
|
try { |
|
|
|
this.exportLoading = true |
|
|
|
let params = this.searchData |
|
|
|
params.limit = -1 |
|
|
|
params.page = 1 |
|
|
|
const response = await eamExchangeOrderExportExcel(params) |
|
|
|
// 创建下载链接 |
|
|
|
const url = window.URL.createObjectURL(new Blob([response.data])) |
|
|
|
const link = document.createElement('a') |
|
|
|
link.href = url |
|
|
|
link.setAttribute('download', '换线专家组维修工单.xlsx') |
|
|
|
document.body.appendChild(link) |
|
|
|
link.click() |
|
|
|
link.remove() |
|
|
|
window.URL.revokeObjectURL(url) |
|
|
|
} catch (error) { |
|
|
|
console.error('导出失败:', error) |
|
|
|
this.$message.error('导出失败') |
|
|
|
} finally { |
|
|
|
this.exportLoading = false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//导出excel |
|
|
|
|