mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-12 04:16:50 +08:00
style:修改项目列表加载
This commit is contained in:
@@ -40,6 +40,12 @@
|
|||||||
</button>
|
</button>
|
||||||
<button class="searchBtn" @click="resetClick">重置</button>
|
<button class="searchBtn" @click="resetClick">重置</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="projectList" v-if="isLoading==true" style="display:flex;color:#909399;">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
{{ loading.close() }}
|
||||||
<div class="projectList" v-if="!projectList.length" style="display:flex;color:#909399;">
|
<div class="projectList" v-if="!projectList.length" style="display:flex;color:#909399;">
|
||||||
<img class="img2" style="margin-left:359px;margin-top:100px;width:148px;height:220px;"
|
<img class="img2" style="margin-left:359px;margin-top:100px;width:148px;height:220px;"
|
||||||
src="../../assets/image/notask.png" />
|
src="../../assets/image/notask.png" />
|
||||||
@@ -79,6 +85,7 @@
|
|||||||
已结束
|
已结束
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- <div
|
<!-- <div
|
||||||
style="display: flex; justify-content: center; margin-top: 30px"
|
style="display: flex; justify-content: center; margin-top: 30px"
|
||||||
v-if="projectTotal > 10"
|
v-if="projectTotal > 10"
|
||||||
@@ -120,6 +127,7 @@ import { useRouter } from "vue-router";
|
|||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { toDate } from "../../api/method";
|
import { toDate } from "../../api/method";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
import { ElLoading } from 'element-plus';
|
||||||
|
|
||||||
const projectClassify = [];
|
const projectClassify = [];
|
||||||
const studyProgress = [];
|
const studyProgress = [];
|
||||||
@@ -134,8 +142,17 @@ const endTime = ref(""); //开始时间
|
|||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const userInfo = computed(() => store.state.userInfo);
|
const userInfo = computed(() => store.state.userInfo);
|
||||||
|
|
||||||
|
const isLoading = ref(false);
|
||||||
|
|
||||||
|
const loading = ref(false);
|
||||||
//获取项目列表--------start------------------------------------
|
//获取项目列表--------start------------------------------------
|
||||||
const getProject = () => {
|
const getProject = () => {
|
||||||
|
isLoading.value = true;
|
||||||
|
loading.value = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: 'Loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
})
|
||||||
request(PROJECT_LIST, {
|
request(PROJECT_LIST, {
|
||||||
beginTime: beginTime.value,
|
beginTime: beginTime.value,
|
||||||
endTime: endTime.value,
|
endTime: endTime.value,
|
||||||
@@ -149,10 +166,13 @@ const getProject = () => {
|
|||||||
projectList.value = res.data.rows;
|
projectList.value = res.data.rows;
|
||||||
projectTotal.value = Number(res.data.total);
|
projectTotal.value = Number(res.data.total);
|
||||||
console.log("projectTotal.value", projectTotal.value);
|
console.log("projectTotal.value", projectTotal.value);
|
||||||
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("获取失败", err);
|
console.log("获取失败", err);
|
||||||
|
projectList.value = [];
|
||||||
|
isLoading.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
getProject();
|
getProject();
|
||||||
|
|||||||
Reference in New Issue
Block a user