|
@ -99,6 +99,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="div_btn"> |
|
|
<div class="div_btn"> |
|
|
|
|
|
<!-- <el-button type="primary" size="small" class="diy-button--blue" @click="handleExport">导出</el-button> --> |
|
|
<el-button type="primary" size="small" class="diy-button--blue" @click="handleIncrementServeTimes">标记享受服务人员</el-button> |
|
|
<el-button type="primary" size="small" class="diy-button--blue" @click="handleIncrementServeTimes">标记享受服务人员</el-button> |
|
|
<el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch">查询</el-button> |
|
|
<el-button type="primary" size="small" class="diy-button--blue" @click="handleSearch">查询</el-button> |
|
|
</div> |
|
|
</div> |
|
@ -434,7 +435,43 @@ export default { |
|
|
handleCurrentChange (pageNo) { |
|
|
handleCurrentChange (pageNo) { |
|
|
this.searchFormData.pageNo = pageNo |
|
|
this.searchFormData.pageNo = pageNo |
|
|
this.handleSearch() |
|
|
this.handleSearch() |
|
|
} |
|
|
}, |
|
|
|
|
|
// 导出人员 |
|
|
|
|
|
async handleExport () { |
|
|
|
|
|
//导出接口>>> |
|
|
|
|
|
const url = ""; |
|
|
|
|
|
const { pageSize, pageNo, searchFormData } = this; |
|
|
|
|
|
axios({ |
|
|
|
|
|
url: window.SITE_CONFIG["apiURL"] + url, |
|
|
|
|
|
method: "post", |
|
|
|
|
|
data: { |
|
|
|
|
|
pageSize, |
|
|
|
|
|
pageNo, |
|
|
|
|
|
...searchFormData, |
|
|
|
|
|
}, |
|
|
|
|
|
responseType: "blob", |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
let fileName = window.decodeURI( |
|
|
|
|
|
res.headers["content-disposition"].split(";")[1].split("=")[1] |
|
|
|
|
|
); |
|
|
|
|
|
console.log("filename", fileName); |
|
|
|
|
|
let blob = new Blob([res.data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }); |
|
|
|
|
|
var url = window.URL.createObjectURL(blob); |
|
|
|
|
|
var aLink = document.createElement("a"); |
|
|
|
|
|
aLink.style.display = "none"; |
|
|
|
|
|
aLink.href = url; |
|
|
|
|
|
aLink.setAttribute("download", fileName); |
|
|
|
|
|
document.body.appendChild(aLink); |
|
|
|
|
|
aLink.click(); |
|
|
|
|
|
document.body.removeChild(aLink); //下载完成移除元素 |
|
|
|
|
|
window.URL.revokeObjectURL(url); //释放掉blob对象 |
|
|
|
|
|
}) |
|
|
|
|
|
.catch((err) => { |
|
|
|
|
|
console.log("获取导出情失败", err); |
|
|
|
|
|
return this.$message.error("网络错误"); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
serviceId: { |
|
|
serviceId: { |
|
|