mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 10:12:54 +08:00
feat: 员工学习数据新增导出全部
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user