|
|
|
@ -42,6 +42,27 @@ |
|
|
|
<el-form-item :label="'人员部门'"> |
|
|
|
<el-input v-model="searchData.departmentName" readonly style="width: 200px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'核心备件更换记录时间'"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 120px" |
|
|
|
v-model="searchData2.startDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-top: 23px;"> |
|
|
|
<laber style="margin-left: -9px;font-size: 19px">➞</laber> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 120px" |
|
|
|
v-model="searchData2.endDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="searchData"> |
|
|
|
<el-form-item :label="'状态'"> |
|
|
|
@ -108,7 +129,8 @@ |
|
|
|
<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="exportExcel2()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button> |
|
|
|
<el-button @click="exportExcel2()" :loading="exportLoading" type="primary" style="margin-left: 2px">{{'导出'}}</el-button> |
|
|
|
<el-button @click="exportPartExcel()" :loading="exportLoading2" type="primary" style="margin-left: 2px">{{'核心备件导出'}}</el-button> |
|
|
|
<!-- <download-excel--> |
|
|
|
<!-- :fields="fields()"--> |
|
|
|
<!-- :data="exportData"--> |
|
|
|
@ -561,7 +583,6 @@ |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="核心备品备件更换记录" name="core_component"> |
|
|
|
<div class="rq "> |
|
|
|
<el-button @click="exportPartExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button> |
|
|
|
<el-table |
|
|
|
:height="280" |
|
|
|
:data="corePartSpareList" |
|
|
|
@ -778,7 +799,7 @@ import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
import {isAuth} from '../../../utils' |
|
|
|
import excel from "@/utils/excel-util.js"; |
|
|
|
import {deleteSchedulingRecord} from "../../../api/scheduling/scheduling"; |
|
|
|
import {eamWorkOrderExpiortExcel} from "../../../api/eam/eam"; |
|
|
|
import {coreComponentsExpiortExcel, eamWorkOrderExpiortExcel} from "../../../api/eam/eam"; |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Chooselist |
|
|
|
@ -848,6 +869,10 @@ export default { |
|
|
|
repairReportingType: '', |
|
|
|
repairType: '设备维修组' |
|
|
|
}, |
|
|
|
searchData2:{ |
|
|
|
startDate: '', |
|
|
|
endDate: '' |
|
|
|
}, |
|
|
|
height: 200, |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 50, |
|
|
|
@ -1556,6 +1581,9 @@ export default { |
|
|
|
}, |
|
|
|
], |
|
|
|
userBuList: [], |
|
|
|
//导出按钮 加载 |
|
|
|
exportLoading: false, |
|
|
|
exportLoading2: false, |
|
|
|
authSearch: false, |
|
|
|
authChange: false, |
|
|
|
authDetail: false, |
|
|
|
@ -2028,6 +2056,7 @@ export default { |
|
|
|
}, |
|
|
|
async exportExcel2() { |
|
|
|
try { |
|
|
|
this.exportLoading = true |
|
|
|
let params = this.searchData |
|
|
|
params.limit = -1 |
|
|
|
params.page = 1 |
|
|
|
@ -2044,22 +2073,38 @@ export default { |
|
|
|
} catch (error) { |
|
|
|
console.error('导出失败:', error) |
|
|
|
this.$message.error('导出失败') |
|
|
|
} finally { |
|
|
|
this.exportLoading = false |
|
|
|
} |
|
|
|
}, |
|
|
|
//备品备件更换记录导出 |
|
|
|
async exportPartExcel() { |
|
|
|
this.searchData.limit = -1 |
|
|
|
this.searchData.page = 1 |
|
|
|
excel.exportTable({ |
|
|
|
url: "/pms/resourcespare/getDeviceCorePartList", |
|
|
|
columnMapping: this.columnListMapping, // 可以直接用table,不需要的列就剔除 |
|
|
|
mergeSetting: [], // 需要合并的列 |
|
|
|
params: this.partSearchData, |
|
|
|
fileName: this.exportName2 + ".xlsx", |
|
|
|
rowFetcher: res => res.data, |
|
|
|
columnFormatter: [], |
|
|
|
dropColumns: [] // 需要剔除的列,例如dropColumns: ["netWeight"],即剔除净重列 |
|
|
|
}) |
|
|
|
try { |
|
|
|
this.exportLoading2 = true |
|
|
|
let params = this.searchData2 |
|
|
|
if (!this.searchData.buDesc || this.searchData.buDesc === '' || this.searchData.buDesc === null) { |
|
|
|
this.$message.warning('请选择BU') |
|
|
|
return |
|
|
|
} |
|
|
|
const item = this.userBuList.find(i => i.buDesc === this.searchData.buDesc) |
|
|
|
params.site = item.buNo.split('_')[0] |
|
|
|
params.buNo = item.buNo.split('_')[1] |
|
|
|
const response = await coreComponentsExpiortExcel(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.exportLoading2 = false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//导出excel |
|
|
|
|