mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 09:26:44 +08:00
搜索教师无数据处理,考试无学员导出数据添加提示
This commit is contained in:
@@ -370,7 +370,9 @@ export function usePage(_url, params, init = true,listing = false) {
|
|||||||
state.totalPage = r.data.total/10 || 1;
|
state.totalPage = r.data.total/10 || 1;
|
||||||
state.total = r.data.total;
|
state.total = r.data.total;
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
});
|
}).catch(err => {
|
||||||
|
state.loading = false;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
init && fetch();
|
init && fetch();
|
||||||
@@ -494,6 +496,9 @@ export async function request(_url, params) {
|
|||||||
if (res.code === 0 || res.code === 200) {
|
if (res.code === 0 || res.code === 200) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
if (res.code === 4 ){
|
||||||
|
return Promise.reject(res);
|
||||||
|
}
|
||||||
if (res.code === 1000 || res.code === 1002) {
|
if (res.code === 1000 || res.code === 1002) {
|
||||||
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
||||||
localStorage.removeItem('refreshPage')
|
localStorage.removeItem('refreshPage')
|
||||||
|
|||||||
@@ -442,6 +442,10 @@ export default {
|
|||||||
|
|
||||||
{/* 导出数据 */ }
|
{/* 导出数据 */ }
|
||||||
function exportData() {
|
function exportData() {
|
||||||
|
if(state.tabledata.length==0){
|
||||||
|
message.error("没有数据可以导出");
|
||||||
|
return
|
||||||
|
}
|
||||||
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`)
|
// window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?chapterId=${props.datasource.chapterId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&type=${1}`)
|
||||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?currentStageId=${props.datasource.chapterId}&type=${1}&pid=${props.datasource.routerId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&taskType=${props.datasource.type}`)
|
window.open(`${process.env.VUE_APP_BASE_API}/admin/exam/manage/exportExam?currentStageId=${props.datasource.chapterId}&type=${1}&pid=${props.datasource.routerId}&targetId=${props.datasource.routerId}&taskId=${props.datasource.courseId}&taskType=${props.datasource.type}`)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user