Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Тернов Михаил Андреевич
Frontend tasks
Commits
6c8e9370
Commit
6c8e9370
authored
3 years ago
by
Тернов Михаил Андреевич
Browse files
Options
Download
Patches
Plain Diff
Upload New File
parent
c994d9e8
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Solution3.vue
+78
-0
Solution3.vue
with
78 additions
and
0 deletions
+78
-0
Solution3.vue
0 → 100644
+
78
−
0
View file @
6c8e9370
<
template
>
<q-page>
<div
class =
"q-pa-md"
>
<q-table
v-model:pagination=
"pagination"
:loading=
"loading"
:rows =
"lessons"
:columns =
"columns"
:rows-per-page-options=
"[5, 10, 15]"
@
request=
"handleRequest"
/>
</div>
</q-page>
</
template
>
<
script
>
import
{
defineComponent
,
ref
}
from
'
vue
'
import
axios
from
'
axios
'
export
default
defineComponent
({
name
:
'
TableLessons
'
,
setup
(){
const
loading
=
ref
(
true
)
const
lessons
=
ref
([])
const
pagination
=
ref
({
sortBy
:
'
ruz_auditorium
'
,
descending
:
false
,
page
:
1
,
rowsPerPage
:
15
,
rowsNumber
:
0
})
const
columns
=
[
{
name
:
'
ruz_auditorium
'
,
label
:
'
Auditorium
'
,
field
:
'
ruz_auditorium
'
,
align
:
'
left
'
},
{
name
:
'
ruz_begin_lesson
'
,
label
:
'
Beginning of the lesson
'
,
field
:
'
ruz_begin_lesson
'
,
align
:
'
left
'
},
{
name
:
'
ruz_date
'
,
label
:
'
Date
'
,
field
:
'
ruz_date
'
,
align
:
'
left
'
},
{
name
:
'
ruz_day_of_week_string
'
,
label
:
'
Day of week
'
,
field
:
'
ruz_day_of_week_string
'
,
align
:
'
left
'
},
{
name
:
'
ruz_end_lesson
'
,
label
:
'
End of the lesson
'
,
field
:
'
ruz_end_lesson
'
,
align
:
'
left
'
},
{
name
:
'
ruz_discipline
'
,
label
:
'
Discipline
'
,
field
:
'
ruz_discipline
'
,
align
:
'
left
'
},
{
name
:
'
ruz_kind_of_work
'
,
label
:
'
Kind of work
'
,
field
:
'
ruz_kind_of_work
'
,
align
:
'
left
'
},
{
name
:
'
ruz_lecturer
'
,
label
:
'
Lecturer
'
,
field
:
'
ruz_lecturer
'
,
align
:
'
left
'
},
{
name
:
'
ruz_lecturer_email
'
,
label
:
'
Lecturer email
'
,
field
:
'
ruz_lecturer_email
'
,
align
:
'
left
'
},
{
name
:
'
ruz_lecturer_rank
'
,
label
:
'
Lecturer rank
'
,
field
:
'
ruz_lecturer_rank
'
,
align
:
'
left
'
},
{
name
:
'
ruz_lecturer_title
'
,
label
:
'
Lecturer title
'
,
field
:
'
ruz_lecturer_title
'
,
align
:
'
left
'
},
{
name
:
'
ruz_parentschedule
'
,
label
:
'
Parentschedule
'
,
field
:
'
ruz_parentschedule
'
,
align
:
'
left
'
}
]
const
fetchLessons
=
(
page
=
0
,
page_size
=
15
)
=>
{
axios
.
get
(
'
https://constructor.auditory.ru/epi/api/v1/lessons
'
,{
params
:
{
page
:
page
,
page_size
:
page_size
}
})
.
then
(
response
=>
{
lessons
.
value
=
response
.
data
.
lessons
pagination
.
value
.
page
=
page
pagination
.
value
.
rowsPerPage
=
page_size
pagination
.
value
.
rowsNumber
=
response
.
data
.
total
})
.
finally
(()
=>
{
loading
.
value
=
false
})
}
const
handleRequest
=
(
props
)
=>
{
console
.
log
(
props
)
fetchLessons
(
props
.
pagination
.
page
)
//fetchLessons(props.pagination.rowsPerPage)
}
fetchLessons
()
return
{
handleRequest
,
pagination
,
loading
,
lessons
,
columns
}
}
})
</
script
>
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets