diff --git a/src/api/config.js b/src/api/config.js index a8b7f4dd..f2297b0e 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -83,3 +83,6 @@ http.interceptors.response.use( ); export default http; +export function setHttpTimeout(newTimeout) { + http.defaults.timeout = newTimeout; + } diff --git a/src/views/learningpath/LevelAdd.vue b/src/views/learningpath/LevelAdd.vue index 6e59bef2..1f728e3f 100644 --- a/src/views/learningpath/LevelAdd.vue +++ b/src/views/learningpath/LevelAdd.vue @@ -47,9 +47,17 @@ :tabBarStyle="{ marginLeft: '10px' }" > -
+
+
+
+
关卡概览
+
+
+ 重新加载 +
+
快速创建路径图详情
@@ -1486,6 +1494,7 @@ import TaskImpStu from "../../components/drawers/TaskFaceIn"; import { checkPer,fixDoublePer } from "@/utils/utils"; import {getCookieForName} from "@/api/method"; import qrCode from "@/utils/qrCode"; +import { setHttpTimeout } from '@/api/config'; export default { name: "LevelAdd", components: { @@ -1514,6 +1523,13 @@ export default { AddOpenCourse }, setup() { + const totaskaaa = ()=>{ + setHttpTimeout(1000*60); + state.addLoading = true; + getOverview(); + myGetRouterDetail(); + reget(); + } const getTaskListAll = () =>{ state.addLoading = true; getOverview(); @@ -1623,6 +1639,7 @@ export default { const headers = { token: getCookieForName("token") }; // const store = useStore(); const state = reactive({ + reuse:false, createId: null, permissions: "", hasTask: false, @@ -2456,6 +2473,7 @@ export default { state.addLoading = false; message.error("概览获取失败"); console.log("获取失败" + err); + state.reuse = true }); }; @@ -3169,7 +3187,8 @@ export default { coursePlanRef, openCourse, exportScore, - getTaskListAll + getTaskListAll, + totaskaaa }; }, }; @@ -4558,7 +4577,24 @@ export default { } } } - + .reuse{ + display: flex; + justify-content: space-between; + margin-bottom: 50px; + .reuse_btn{ + width: 102px; + height: 42px; + text-align: center; + line-height: 34px; + border-radius: 6px; + color: #ffffff; + font-size: 16px; + background: #4ea6ff; + margin-right: 38px; + margin-top: 15px; + cursor: pointer; + } + } .taskbox { width: 412px; height: 160px;