feat: 员工学习数据新增导出全部

This commit is contained in:
mx00085@163.com
2023-03-03 14:45:22 +08:00
parent 106b8afad6
commit 92c07c476d

View File

@@ -55,10 +55,15 @@
</div>
<!-- 以下为导出按钮 -->
<div class="btns">
<div class="btn btn3" @click="exportAllBtn" style="margin-right: 20px;">
<div><img src="../../assets/svg/export.png" alt="" /></div>
<div class="btnText">导出全部</div>
</div>
<div class="btn btn3" @click="exportBtn">
<div><img src="../../assets/svg/export.png" alt="" /></div>
<div class="btnText">导出</div>
</div>
</div>
<!-- 以下为table表格 -->
<div class="tableBox">
@@ -129,7 +134,7 @@ export default {
};
});
state.option = list;
getOrgId()
getOrgId();
}
};
//导出
@@ -315,11 +320,11 @@ export default {
};
// 重置按钮
const reset = async () => {
state.tableLoading=true
state.tableLoading = true;
state.name = "";
state.band = "";
state.userNo = "";
getOrgId()
getOrgId();
};
// 获取登录人员组织
const getOrgId = async () => {
@@ -329,11 +334,26 @@ export default {
getTableData();
}
};
// 导出全部按钮
const exportAllBtn = async () => {
axios({
method: "post",
url: "/report/boeu/studyData/exportAll",
data: {},
responseType: "blob",
headers: {
token: Cookies.get("token"),
},
}).then((res) => {
downLoad(res.data, "学习员工数据.xlsx");
});
};
onMounted(() => {
getOrgList();
state.tableLoading=true
state.tableLoading = true;
});
return {
exportAllBtn,
onSelectChange,
exportBtn,
reset,