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