mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
style:添加路径图的loading
This commit is contained in:
@@ -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,
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -226,22 +226,8 @@
|
||||
<button class="samtn btn2" @click="createLearnPath">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
position:absolute;
|
||||
z-index: 100;
|
||||
left:0;
|
||||
top:0;
|
||||
"
|
||||
v-if="true"
|
||||
>
|
||||
<a-spin :spinning="true" />
|
||||
<div class="aeLoading" :style="{display:lpLoading?'flex':'none'}">
|
||||
<a-spin :spinning="lpLoading" tip="添加中..." />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user