mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
fix:模板库分页问题修复,隐藏学习时间字段
This commit is contained in:
@@ -37,8 +37,23 @@
|
||||
</div>
|
||||
<div class="tmpl_body">
|
||||
<div class="tmpl_tabbox">
|
||||
<a-table :columns="columns1" :data-source="tableData1" :loading="tableDataTotal === -1 ? true : false"
|
||||
expandRowByClick="true" @expand="expandTable" :pagination="pagination" />
|
||||
<a-table :columns="columns1" :data-source="tableData1"
|
||||
expandRowByClick="true" @expand="expandTable" :pagination="false"/>
|
||||
<div class="tableBox" style="display:flex;justify-content:center;padding:20px;">
|
||||
<div class="pa">
|
||||
<a-pagination
|
||||
v-if="tableDataTotal > 10"
|
||||
showSizeChanger="true"
|
||||
showQuickJumper="true"
|
||||
hideOnSinglePage="true"
|
||||
:pageSize="pageSize"
|
||||
v-model:current="currentPage"
|
||||
:total="tableDataTotal"
|
||||
class="pagination"
|
||||
@change="changePagination"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,13 +88,13 @@ const columns1 = [
|
||||
key: "creator",
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "最近学习时间",
|
||||
width: "25%",
|
||||
dataIndex: "stutime",
|
||||
key: "stutime",
|
||||
align: "center",
|
||||
},
|
||||
// {
|
||||
// title: "最近学习时间",
|
||||
// width: "25%",
|
||||
// dataIndex: "stutime",
|
||||
// key: "stutime",
|
||||
// align: "center",
|
||||
// },
|
||||
{
|
||||
title: "操作",
|
||||
width: "22%",
|
||||
@@ -100,6 +115,7 @@ export default defineComponent({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total:50,
|
||||
tableDataTotal:0,
|
||||
tableData1: [
|
||||
{
|
||||
key: "1",
|
||||
@@ -180,6 +196,12 @@ export default defineComponent({
|
||||
getLibraryList();
|
||||
})
|
||||
|
||||
// 翻页
|
||||
const changePagination = (page) => {
|
||||
pagination.current = page;
|
||||
getLibraryList();
|
||||
};
|
||||
|
||||
// 获取模板列表
|
||||
const getLibraryList = () => {
|
||||
let date = Math.ceil(new Date(state.time).getTime() / 1000);
|
||||
@@ -193,6 +215,7 @@ export default defineComponent({
|
||||
}
|
||||
api.templateList(obj).then((res) => {
|
||||
state.tableData1 = []
|
||||
state.tableDataTotal = res.data.data.total;
|
||||
console.log(res);
|
||||
let resData = res.data.data.rows
|
||||
if (resData.length) {
|
||||
@@ -253,6 +276,7 @@ export default defineComponent({
|
||||
resetLevel,
|
||||
pagination,
|
||||
toLibraryAdd,
|
||||
changePagination
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user