diff --git a/src/api/method.js b/src/api/method.js
index ca7d2367..21d43e0c 100644
--- a/src/api/method.js
+++ b/src/api/method.js
@@ -1,3 +1,4 @@
+
function formatNumber(n) {
n = n.toString();
return n[1] ? n : "0" + n;
@@ -161,8 +162,12 @@ function autoComma(number) {
return 0;
}
}
+const commonData={
+ timeout:50
+}
export {
toDate,
getWeek,
autoComma,
+ commonData,
}
\ No newline at end of file
diff --git a/src/assets/scss/common.scss b/src/assets/scss/common.scss
index 1246b76f..09f462c8 100644
--- a/src/assets/scss/common.scss
+++ b/src/assets/scss/common.scss
@@ -443,7 +443,7 @@ textarea {
.aeLoading {
width: 100%;
height: 100%;
-background: rgba(0, 0, 0, 0.05);
+background: rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/views/learningpath/LearningPath.vue b/src/views/learningpath/LearningPath.vue
index dcf87f20..66b1263e 100644
--- a/src/views/learningpath/LearningPath.vue
+++ b/src/views/learningpath/LearningPath.vue
@@ -226,22 +226,8 @@
-
@@ -604,7 +590,7 @@ import QueryRight from "../../components/drawers/QueryRight";
import ManageRight from "../../components/drawers/ManageRight";
import * as api from "../../api/index1";
import { message } from "ant-design-vue";
-import { toDate } from "../../api/method";
+import { toDate,commonData } from "../../api/method";
import { storage } from "../../api/storage";
export default {
name: "learningPath",
@@ -734,6 +720,8 @@ export default {
routeStudentsNum: 0,
recallPathId: null, //撤回路径id
stopPathId: null, //停用路径id
+
+ lpLoading:false,
});
const selectProjectName = (value, index) => {
@@ -1300,7 +1288,7 @@ export default {
// message.destroy();
// return message.warning("请选择归属组织");
// }
- // state.createLoading = true;
+ state.lpLoading = true;
let obj = {
name: state.pathName,
picUrl: "",
@@ -1310,19 +1298,19 @@ export default {
api
.createLearnPath(obj)
.then((res) => {
- console.log("创建成功", res);
- message.destroy();
- message.success("创建成功");
- router.push("/leveladd");
- // setTimeout(() => {
- // console.log("创建成功", res);
- // message.destroy();
- // message.success("创建成功");
- // // state.createLoading = false;
- // state.currentPage = 1;
- // router.push("/leveladd");
- // // getLearnPath();
- // }, 1000);
+ // console.log("创建成功", res);
+ // message.destroy();
+ // message.success("创建成功");
+ // router.push("/leveladd");
+ setTimeout(() => {
+ console.log("创建成功", res);
+ message.destroy();
+ message.success("创建成功");
+ state.lpLoading = false;
+ state.currentPage = 1;
+ router.push("/leveladd");
+ // getLearnPath();
+ }, commonData.timeout);
})
.catch((err) => {
console.log("创建失败", err);