Compare commits
No commits in common. "471d73a224cf62dae02e8c93f4d48894b16497b2" and "d4b1e547def236f58cbbe7dbffdb27a17068d9a4" have entirely different histories.
471d73a224
...
d4b1e547de
|
@ -27,35 +27,24 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="class-reserv-body">
|
<div class="class-reserv-body">
|
||||||
<!-- loading <el-skeleton :rows="5" animated />-->
|
<task-item
|
||||||
<el-skeleton :rows="5" :loading="loading" animated />
|
v-for="(item, index) in activeDataList"
|
||||||
<div v-if="classWorkList.length > 0">
|
v-show="tabActive === '进行中'"
|
||||||
<task-item
|
:key="index"
|
||||||
v-for="(item, index) in activeDataList"
|
:item="item"
|
||||||
v-show="tabActive === '进行中'"
|
:tabactive="tabActive"
|
||||||
:key="index"
|
@click="onClickItem(item)"
|
||||||
:item="item"
|
@delete-reserv="deleteReserv(item)"
|
||||||
:tabactive="tabActive"
|
></task-item>
|
||||||
@click="onClickItem(item)"
|
<task-item
|
||||||
@delete-reserv="deleteReserv(item)"
|
v-for="(item, index) in doneDataList"
|
||||||
></task-item>
|
v-show="tabActive === '已结束'"
|
||||||
<task-item
|
:key="index"
|
||||||
v-for="(item, index) in doneDataList"
|
:item="item"
|
||||||
v-show="tabActive === '已结束'"
|
:tabactive="tabActive"
|
||||||
:key="index"
|
@click="onClickItem(item)"
|
||||||
:item="item"
|
@delete-reserv="deleteReserv(item)"
|
||||||
:tabactive="tabActive"
|
></task-item>
|
||||||
@click="onClickItem(item)"
|
|
||||||
@delete-reserv="deleteReserv(item)"
|
|
||||||
></task-item>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
<el-empty
|
|
||||||
v-show="classWorkList.length == 0 && !loading"
|
|
||||||
:description="'暂无'+tabActive+'作业数据'"
|
|
||||||
style="width: 100%; height: 400px"
|
|
||||||
></el-empty>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog>
|
<item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
@ -110,8 +99,6 @@ const changeEndDate = (val) => {
|
||||||
|
|
||||||
// 获取数据
|
// 获取数据
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
classWorkList.value = []
|
|
||||||
loading.value = true
|
|
||||||
// 1、班级列表
|
// 1、班级列表
|
||||||
getClassList()
|
getClassList()
|
||||||
// 2、班级作业
|
// 2、班级作业
|
||||||
|
@ -194,9 +181,6 @@ const getClassWorkList = () => {
|
||||||
classWorkList.value = response.rows && response.rows.filter((item) => item.workdatacount > 0)
|
classWorkList.value = response.rows && response.rows.filter((item) => item.workdatacount > 0)
|
||||||
//TODO: 这里没分页,貌似这个 total 不重要,后续看
|
//TODO: 这里没分页,貌似这个 total 不重要,后续看
|
||||||
total.value = response.total
|
total.value = response.total
|
||||||
}else{
|
|
||||||
classWorkList.value = []
|
|
||||||
total.value = 0
|
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
@ -418,7 +402,9 @@ watch(
|
||||||
)
|
)
|
||||||
watch(tabActive, (newVal,oldVal)=>{
|
watch(tabActive, (newVal,oldVal)=>{
|
||||||
console.log('newVal',newVal);
|
console.log('newVal',newVal);
|
||||||
getData() // 加载数据
|
setTimeout(() => {
|
||||||
|
getData() // 加载数据
|
||||||
|
}, 300)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue