mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
Merge branch 'dev_m' into 'develop'
feat: 概览页面新增全部导出接口 See merge request !49
This commit is contained in:
@@ -56,6 +56,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div
|
||||
class="btn btn3"
|
||||
@click="exportClickAll"
|
||||
style="margin-right: 15px"
|
||||
>
|
||||
<div>
|
||||
<img src="../../assets/svg/export.png" alt="" />
|
||||
</div>
|
||||
<div class="btnText">全部导出</div>
|
||||
</div>
|
||||
<div class="btn btn3" @click="exportClick">
|
||||
<div>
|
||||
<img src="../../assets/svg/export.png" alt="" />
|
||||
@@ -403,6 +413,106 @@ export default {
|
||||
}
|
||||
}
|
||||
};
|
||||
// 全部导出接口
|
||||
const exportClickAll = async () => {
|
||||
if (state.currentTab === 5) {
|
||||
axios({
|
||||
method: "post",
|
||||
url: "/report/boeu/case/exportAll",
|
||||
data: {
|
||||
name: state.name,
|
||||
organizationId: state.orgId,
|
||||
createName: state.creator,
|
||||
},
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
token: Cookies.get("token"),
|
||||
},
|
||||
}).then((res) => {
|
||||
downLoad(res.data, "案例.xlsx");
|
||||
});
|
||||
} else if (state.currentTab === 4) {
|
||||
axios({
|
||||
method: "post",
|
||||
url: "/report/boeu/exam/exportAll",
|
||||
data: {
|
||||
name: state.name,
|
||||
organizationId: state.orgId,
|
||||
createName: state.creator,
|
||||
},
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
token: Cookies.get("token"),
|
||||
},
|
||||
}).then((res) => {
|
||||
downLoad(res.data, "考试.xlsx");
|
||||
});
|
||||
} else if (state.currentTab === 3) {
|
||||
axios({
|
||||
method: "post",
|
||||
url: "/report/boeu/course/exportAll",
|
||||
data: {
|
||||
name: state.name,
|
||||
organizationId: state.orgId,
|
||||
createName: state.creator,
|
||||
},
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
token: Cookies.get("token"),
|
||||
},
|
||||
}).then((res) => {
|
||||
downLoad(res.data, "课程.xlsx");
|
||||
});
|
||||
} else if (state.currentTab === 2) {
|
||||
axios({
|
||||
method: "post",
|
||||
url: "/report/boeu/teaching/exportAll",
|
||||
data: {
|
||||
name: state.name,
|
||||
organizationId: state.orgId,
|
||||
createName: state.creator,
|
||||
},
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
token: Cookies.get("token"),
|
||||
},
|
||||
}).then((res) => {
|
||||
downLoad(res.data, "授课.xlsx");
|
||||
});
|
||||
} else if (state.currentTab === 1) {
|
||||
axios({
|
||||
method: "post",
|
||||
url: "/report/boeu/router/exportAll",
|
||||
data: {
|
||||
name: state.name,
|
||||
organizationId: state.orgId,
|
||||
createName: state.creator,
|
||||
},
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
token: Cookies.get("token"),
|
||||
},
|
||||
}).then((res) => {
|
||||
downLoad(res.data, "学习路径图.xlsx");
|
||||
});
|
||||
} else if (state.currentTab === 0) {
|
||||
axios({
|
||||
method: "post",
|
||||
url: "/report/boeu/project/exportAll",
|
||||
data:{
|
||||
name: state.name,
|
||||
organizationId: state.orgId,
|
||||
createName: state.creator,
|
||||
},
|
||||
responseType: "blob",
|
||||
headers: {
|
||||
token: Cookies.get("token"),
|
||||
},
|
||||
}).then((res) => {
|
||||
downLoad(res.data, "项目.xlsx");
|
||||
});
|
||||
}
|
||||
};
|
||||
// table选中
|
||||
const onSelectChange = (selectedRowKeys) => {
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
@@ -1226,6 +1336,7 @@ export default {
|
||||
getOrgList();
|
||||
});
|
||||
return {
|
||||
exportClickAll,
|
||||
getTabData,
|
||||
reset,
|
||||
getOrgList,
|
||||
|
||||
Reference in New Issue
Block a user