mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-24 18:22:55 +08:00
@@ -55,6 +55,10 @@
|
||||
</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>
|
||||
@@ -129,7 +133,7 @@ export default {
|
||||
};
|
||||
});
|
||||
state.option = list;
|
||||
getOrgId()
|
||||
getOrgId();
|
||||
}
|
||||
};
|
||||
//导出
|
||||
@@ -282,7 +286,7 @@ export default {
|
||||
token: Cookies.get("token"),
|
||||
},
|
||||
}).then((res) => {
|
||||
downLoad(res.data, "案例.xlsx");
|
||||
downLoad(res.data, "学习员工数据.xlsx");
|
||||
});
|
||||
};
|
||||
//table 分页事件
|
||||
@@ -315,11 +319,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 +333,31 @@ export default {
|
||||
getTableData();
|
||||
}
|
||||
};
|
||||
// 导出全部按钮
|
||||
const exportAllBtn = async () => {
|
||||
axios({
|
||||
method: "post",
|
||||
url: "/report/boeu/studyData/exportAll",
|
||||
data: {
|
||||
userNo: state.userNo,
|
||||
name: state.name,
|
||||
departmentId: state.orgId,
|
||||
bandCode: state.band,
|
||||
},
|
||||
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