Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
online-edu-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
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
online-edu
online-edu-admin
Commits
b027e386
Commit
b027e386
authored
Jul 06, 2021
by
lixin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程提问,分页
parent
8ffab53c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
detail.vue
src/views/biz/qa/detail.vue
+12
-14
index.vue
src/views/biz/qa/index.vue
+7
-1
No files found.
src/views/biz/qa/detail.vue
View file @
b027e386
...
...
@@ -82,11 +82,9 @@ export default {
return
{
columns
:
columns
,
data
:
[],
searchPage
:
{
pagination
:
{
pageIndex
:
1
,
pageSize
:
10
,
},
pagination
:
{
showQuickJumper
:
true
,
showSizeChanger
:
true
,
},
...
...
@@ -111,17 +109,15 @@ export default {
},
// 创建完毕
created
()
{
let
questionId
=
this
.
$route
.
query
.
id
;
if
(
questionId
)
{
this
.
searchPage
.
questionId
=
questionId
;
this
.
getAnswerList
(
this
.
searchPage
);
}
this
.
getAnswerList
(
this
.
pagination
);
},
// 即将更新渲染
beforeUpdate
()
{},
methods
:
{
getAnswerList
(
query
)
{
this
.
loading
=
true
;
let
questionId
=
this
.
$route
.
query
.
id
;
query
.
questionId
=
questionId
;
fetchAnswerList
(
query
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -146,7 +142,7 @@ export default {
.
then
((
res
)
=>
{
if
(
res
.
resp_code
==
200
)
{
this
.
$message
.
info
(
"回复成功"
);
this
.
getAnswerList
(
this
.
searchPage
);
this
.
getAnswerList
(
this
.
pagination
);
}
else
{
this
.
$message
.
info
(
res
.
resp_msg
);
}
...
...
@@ -176,11 +172,13 @@ export default {
this
.
$refs
.
formModelRef
.
resetFields
();
},
handleTableChange
()
{
let
queryParam
=
{
...
this
.
searchPage
};
queryParam
.
pageIndex
=
pagination
.
current
;
queryParam
.
pageSize
=
pagination
.
pageSize
;
this
.
getList
(
queryParam
);
handleTableChange
(
pagination
)
{
const
pager
=
{
...
this
.
pagination
};
pager
.
current
=
pagination
.
current
;
pager
.
pageIndex
=
pagination
.
current
;
pager
.
pageSize
=
pagination
.
pageSize
;
this
.
pagination
=
pager
;
this
.
getAnswerList
(
this
.
pagination
);
},
navigateIndexPage
(
row
)
{
let
queryParam
=
{
...
...
src/views/biz/qa/index.vue
View file @
b027e386
...
...
@@ -158,8 +158,14 @@ export default {
let
queryParam
=
{
...
this
.
searchPage
};
this
.
getList
(
queryParam
);
},
handleTableChange
()
{
handleTableChange
(
pagination
)
{
let
queryParam
=
{
...
this
.
searchPage
};
const
pager
=
{
...
this
.
pagination
};
pager
.
current
=
pagination
.
current
;
pager
.
pageIndex
=
pagination
.
current
;
pager
.
pageSize
=
pagination
.
pageSize
;
this
.
pagination
=
pager
;
queryParam
.
pageIndex
=
pagination
.
current
;
queryParam
.
pageSize
=
pagination
.
pageSize
;
this
.
getList
(
queryParam
);
...
...
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