Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
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
罗超
confucius
Commits
29123da1
Commit
29123da1
authored
Aug 30, 2024
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善上课消耗表
parent
3790833d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
323 additions
and
110 deletions
+323
-110
index.js
src/api/course/index.js
+7
-0
scrollBar.vue
src/components/common/scrollBar.vue
+33
-7
StudentProgress.vue
src/pages/stuMan/StudentProgress.vue
+283
-103
No files found.
src/api/course/index.js
View file @
29123da1
...
@@ -277,6 +277,13 @@ export function queryChapterTree(data) {
...
@@ -277,6 +277,13 @@ export function queryChapterTree(data) {
})
})
}
}
export
function
queryScheduleCourseStu
(
data
)
{
return
request
({
url
:
"/ScheduleCourse/GetScheduleCourseStu "
,
method
:
'post'
,
data
})
}
/**
/**
* 保存课程章节
* 保存课程章节
* @param {JSON参数} data
* @param {JSON参数} data
...
...
src/components/common/scrollBar.vue
View file @
29123da1
<
template
>
<
template
>
<div
class=
"col"
></div>
<div
class=
"col scroll-box"
id=
"scrollBox"
@
scroll=
"(e)=>scrollHandle(e)"
>
<div
:style=
"
{width: innerW}" id="scrollInnerTemplate">
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -15,26 +17,45 @@ export default {
...
@@ -15,26 +17,45 @@ export default {
}
}
},
},
data
()
{
data
()
{
return
{};
return
{
innerW
:
'0px'
,
ratio
:
0
,
boxRatio
:
0
};
},
},
methods
:
{
methods
:
{
createResizeObserver
()
{
createResizeObserver
()
{
this
.
resizeObserver
=
new
ResizeObserver
(
entries
=>
{
this
.
resizeObserver
=
new
ResizeObserver
(
entries
=>
{
for
(
let
entry
of
entries
)
{
this
.
calcHandle
()
console
.
log
(
"Element size changed:"
,
entry
.
contentRect
);
// 你可以在这里处理大小变化的逻辑
}
});
});
this
.
resizeObserver
.
observe
(
this
.
$refs
.
resizeElement
);
this
.
resizeObserver
.
observe
(
document
.
querySelector
(
`#
${
this
.
targetBox
}
`
));
this
.
resizeObserver
.
observe
(
document
.
querySelector
(
`#
${
this
.
targetWrap
}
`
));
},
},
destroyResizeObserver
()
{
destroyResizeObserver
()
{
if
(
this
.
resizeObserver
)
{
if
(
this
.
resizeObserver
)
{
this
.
resizeObserver
.
disconnect
();
this
.
resizeObserver
.
disconnect
();
}
}
},
calcHandle
(){
const
box
=
document
.
querySelector
(
'#scrollBox'
)
const
tb
=
document
.
querySelector
(
`#
${
this
.
targetBox
}
`
)
const
tw
=
document
.
querySelector
(
`#
${
this
.
targetWrap
}
`
)
if
(
box
&&
tb
&&
tw
){
this
.
ratio
=
tw
.
offsetWidth
/
tb
.
offsetWidth
this
.
innerW
=
`
${
this
.
ratio
*
box
.
offsetWidth
}
px`
this
.
boxRatio
=
tb
.
offsetWidth
/
box
.
offsetWidth
}
},
scrollHandle
(
e
){
const
box
=
document
.
querySelector
(
'#scrollBox'
)
const
sl
=
box
.
scrollLeft
*
this
.
boxRatio
this
.
$emit
(
"scrollChange"
,
sl
);
}
}
},
},
mounted
()
{
mounted
()
{
this
.
createResizeObserver
();
this
.
createResizeObserver
();
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
destroyResizeObserver
();
this
.
destroyResizeObserver
();
...
@@ -43,6 +64,11 @@ export default {
...
@@ -43,6 +64,11 @@ export default {
</
script
>
</
script
>
<
style
>
<
style
>
.scroll-box
{
overflow-x
:
auto
;
overflow-y
:
hidden
;
height
:
15px
;
}
.scroll-box
::-webkit-scrollbar
{
.scroll-box
::-webkit-scrollbar
{
width
:
6px
;
width
:
6px
;
height
:
6px
;
height
:
6px
;
...
...
src/pages/stuMan/StudentProgress.vue
View file @
29123da1
This diff is collapsed.
Click to expand it.
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