|
|
@@ -87,6 +87,9 @@
|
|
|
:scrollbar="true"
|
|
|
@page-change="onPageChange"
|
|
|
>
|
|
|
+ <template #index="{ rowIndex }">
|
|
|
+ {{ rowIndex + 1 + (pagination.current - 1) * pagination.pageSize }}
|
|
|
+ </template>
|
|
|
<template #status="{ record }">
|
|
|
<a-tag :color="record.status === 1 ? 'green' : 'red'">{{
|
|
|
record.status ? t('tag.status.enable') : t('tag.status.disable')
|
|
|
@@ -150,8 +153,8 @@ const { loading, setLoading } = useLoading(true);
|
|
|
const cloneColumns = computed(() => [
|
|
|
{
|
|
|
title: t('searchTable.table.number'),
|
|
|
- dataIndex: 'number',
|
|
|
- slotName: 'number',
|
|
|
+ dataIndex: 'index',
|
|
|
+ slotName: 'index',
|
|
|
ellipsis: true,
|
|
|
tooltip: true,
|
|
|
width: 60,
|
|
|
@@ -209,13 +212,15 @@ const cloneColumns = computed(() => [
|
|
|
|
|
|
const basePagination: Pagination = {
|
|
|
current: 1,
|
|
|
- pageSize: 20,
|
|
|
+ pageSize: 1000,
|
|
|
};
|
|
|
const pagination = reactive({
|
|
|
...basePagination,
|
|
|
});
|
|
|
const generateFormModel = () => {
|
|
|
return {
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 1000,
|
|
|
dictId: '0',
|
|
|
} as DictItemParams;
|
|
|
};
|
|
|
@@ -227,10 +232,11 @@ const listObj = ref<ItemDataList>({} as ItemDataList);
|
|
|
|
|
|
const this_ = getCurrentInstance()?.appContext.config.globalProperties;
|
|
|
function searchTable() {
|
|
|
- // setLoading(true);
|
|
|
+ setLoading(true);
|
|
|
formModel.value.dictId = id.toString();
|
|
|
getDictItemList(formModel.value)
|
|
|
.then(res => {
|
|
|
+ formModel.value.pageIndex = 1;
|
|
|
pagination.current = 1;
|
|
|
pagination.total = res.data.length;
|
|
|
renderData.value = res.data;
|