Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-excel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何远江
topsun-baoshen-excel
Commits
8f645e4c
Commit
8f645e4c
authored
Jun 09, 2025
by
tanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页查询
parent
11ec22d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
15 deletions
+36
-15
customer.ts
src/api/customer.ts
+12
-1
InformationList.vue
src/views/information/InformationList.vue
+24
-14
No files found.
src/api/customer.ts
View file @
8f645e4c
...
@@ -95,15 +95,26 @@ export const getInformationListTitlesApi = (params: any) => {
...
@@ -95,15 +95,26 @@ export const getInformationListTitlesApi = (params: any) => {
})
})
}
}
// /**
// * 获取资料库列表数据
// * @param params
// * @returns
// */
// export const getInformationListApi = (data: any) => {
// return axios.post('/api/information/listInformation', data)
// }
/**
/**
* 获取资料库列表数据
* 获取资料库列表数据
* @param params
* @param params
* @returns
* @returns
*/
*/
export
const
getInformationListApi
=
(
data
:
any
)
=>
{
export
const
getInformationListApi
=
(
data
:
any
)
=>
{
return
axios
.
post
(
'/api/information/
list
Information'
,
data
)
return
axios
.
post
(
'/api/information/
page
Information'
,
data
)
}
}
/**
/**
* 导入客户资料
* 导入客户资料
* @param params
* @param params
...
...
src/views/information/InformationList.vue
View file @
8f645e4c
...
@@ -45,8 +45,8 @@
...
@@ -45,8 +45,8 @@
</
template
>
</
template
>
</vxe-column>
</vxe-column>
</vxe-table>
</vxe-table>
<vxe-pager
v-if=
"total > 0"
size=
"small"
background
v-model:current-page=
"form.
currentPage"
<vxe-pager
size=
"small"
background
v-model:current-page=
"
currentPage"
v-model:page-size=
"
form.
pageSize"
:total=
"total"
@
page-change=
"onSearch"
v-model:page-size=
"pageSize"
:total=
"total"
@
page-change=
"onSearch"
:layouts=
"['PrevPage', 'JumpNumber', 'NextPage', 'Sizes', 'FullJump', 'Total']"
>
:layouts=
"['PrevPage', 'JumpNumber', 'NextPage', 'Sizes', 'FullJump', 'Total']"
>
</vxe-pager>
</vxe-pager>
</div>
</div>
...
@@ -72,6 +72,9 @@ const form = ref<any>({})
...
@@ -72,6 +72,9 @@ const form = ref<any>({})
const
defualtForm
=
ref
<
any
>
({})
const
defualtForm
=
ref
<
any
>
({})
const
total
=
ref
(
0
)
const
total
=
ref
(
0
)
const
currentPage
=
ref
(
1
)
const
pageSize
=
ref
(
10
)
const
xTable
=
ref
<
VxeTableInstance
>
()
const
xTable
=
ref
<
VxeTableInstance
>
()
const
tableData
=
ref
([])
const
tableData
=
ref
([])
const
tableColumn
=
ref
([])
const
tableColumn
=
ref
([])
...
@@ -102,11 +105,11 @@ const initData = async () => {
...
@@ -102,11 +105,11 @@ const initData = async () => {
form
.
value
[
ele
]
=
""
form
.
value
[
ele
]
=
""
defualtForm
.
value
[
ele
]
=
""
defualtForm
.
value
[
ele
]
=
""
});
});
getInformationListApi
(
params
).
then
((
res
)
=>
{
//
getInformationListApi(params).then((res) => {
if
(
res
.
data
?.
code
==
200
)
{
//
if (res.data?.code == 200) {
tableData
.
value
=
res
.
data
?.
result
//
tableData.value = res.data?.result
}
//
}
})
//
})
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -120,7 +123,9 @@ const getInformationList = async (params: any) => {
...
@@ -120,7 +123,9 @@ const getInformationList = async (params: any) => {
try
{
try
{
const
res
=
await
getInformationListApi
(
params
);
const
res
=
await
getInformationListApi
(
params
);
if
(
res
.
data
?.
code
==
200
)
{
if
(
res
.
data
?.
code
==
200
)
{
tableData
.
value
=
res
.
data
?.
result
console
.
log
(
res
)
tableData
.
value
=
res
.
data
?.
result
.
records
total
.
value
=
res
.
data
?.
result
.
total
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -129,20 +134,24 @@ const getInformationList = async (params: any) => {
...
@@ -129,20 +134,24 @@ const getInformationList = async (params: any) => {
}
}
}
}
const
onReset
=
()
=>
{
const
onReset
=
()
=>
{
if
(
formRef
?.
value
)
{
if
(
formRef
?.
value
)
{
formRef
?.
value
.
resetFields
()
formRef
?.
value
.
resetFields
()
}
}
const
params
=
{
// const params = {
informationType
:
route
.
query
.
informationType
// informationType: route.query.informationType
}
// }
getInformationList
(
params
)
// getInformationList(params)
onSearch
()
}
}
const
onSearch
=
()
=>
{
const
onSearch
=
()
=>
{
const
params
=
{
const
params
=
{
informationType
:
route
.
query
.
informationType
,
informationType
:
route
.
query
.
informationType
,
json
:
JSON
.
stringify
(
form
.
value
)
json
:
JSON
.
stringify
(
form
.
value
),
currentPage
:
currentPage
.
value
,
pageSize
:
pageSize
.
value
}
}
getInformationList
(
params
)
getInformationList
(
params
)
}
}
...
@@ -221,7 +230,7 @@ const handleImport = () => {
...
@@ -221,7 +230,7 @@ const handleImport = () => {
const onImportChange = (type: any) => {
const onImportChange = (type: any) => {
importVisible.value = false
importVisible.value = false
if (type != 'close') {
if (type != 'close') {
initData
()
onSearch
()
}
}
}
}
...
@@ -230,6 +239,7 @@ onMounted(() => {
...
@@ -230,6 +239,7 @@ onMounted(() => {
return
return
}
}
initData()
initData()
onSearch()
})
})
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment