Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AI_BOOK_TOOL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
AI_BOOK_TOOL
Commits
3f1b1d59
Commit
3f1b1d59
authored
May 13, 2025
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
parent
0177e9da
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
556 additions
and
398 deletions
+556
-398
index.css
form/index.css
+251
-132
index.html
form/index.html
+42
-35
index.js
form/index.js
+263
-231
No files found.
form/index.css
View file @
3f1b1d59
...
...
@@ -134,40 +134,50 @@ html, body {
/* 音频控制区域 */
.audio-control
{
height
:
200
px
;
height
:
185
px
;
position
:
fixed
;
bottom
:
0
;
left
:
0
;
right
:
0
;
z-index
:
1000
;
margin
:
0
;
border-radius
:
0
;
box-shadow
:
0
-2px
10px
rgba
(
0
,
0
,
0
,
0.1
);
}
.audio-control
.el-card__body
{
background
:
#fff
;
border-top
:
1px
dashed
#DCDFE6
;
padding
:
10px
20px
;
}
.waveform-container
{
height
:
100%
;
height
:
90px
;
display
:
flex
;
flex-direction
:
column
;
position
:
relative
;
background
:
white
;
}
/* 波形图区域样式 */
.waveform-wrapper
{
position
:
relative
;
padding
:
10px
10px
0
;
background
:
#fff
;
height
:
116px
;
overflow
:
visible
;
}
#waveform
{
flex
:
1
;
min-height
:
120px
;
height
:
116px
!important
;
position
:
relative
;
background
:
white
;
margin-bottom
:
5px
;
overflow
:
hidden
;
}
#wave-timeline
{
height
:
30px
;
margin-bottom
:
5px
;
position
:
relative
;
height
:
20px
!important
;
position
:
absolute
;
left
:
0px
;
right
:
0px
;
bottom
:
0px
;
overflow
:
visible
;
}
.audio-controls
{
...
...
@@ -178,7 +188,44 @@ html, body {
z-index
:
4
;
}
/* 添加时间调整控件样式 */
/* 控制按钮区域样式 */
.control-wrapper
{
position
:
absolute
;
bottom
:
0
;
left
:
0
;
right
:
0
;
z-index
:
1000
;
padding
:
10px
;
background
:
#fff
;
}
.basic-controls
{
display
:
flex
;
align-items
:
center
;
gap
:
10px
;
margin-bottom
:
10px
;
}
.basic-controls
.el-button-group
{
margin-right
:
20px
;
display
:
inline-flex
;
}
.basic-controls
.el-button-group
.el-button
{
margin
:
0
;
}
.basic-controls
.el-slider
{
margin
:
0
20px
;
width
:
200px
;
flex-shrink
:
0
;
}
.basic-controls
.el-button
:not
(
.el-button-group
.el-button
)
{
margin-left
:
10px
;
}
/* 时间调整控件样式 */
.time-adjust-controls
{
display
:
flex
;
align-items
:
center
;
...
...
@@ -197,6 +244,158 @@ html, body {
margin
:
0
5px
;
}
/* 确保滑块和按钮在最上层 */
.el-slider
{
position
:
relative
;
z-index
:
1000
;
}
.el-slider__runway
{
z-index
:
1000
;
}
.el-slider__bar
{
z-index
:
1000
;
}
.el-slider__button-wrapper
{
z-index
:
1000
;
}
.el-button-group
{
position
:
relative
;
z-index
:
1000
;
}
.el-button
{
position
:
relative
;
z-index
:
1000
;
}
/* 锁定按钮特殊样式 */
.el-button--danger.is-active
,
.el-button--danger
:active
{
background
:
#f56c6c
;
border-color
:
#f56c6c
;
color
:
#fff
;
}
/* 其他样式 */
.app
{
position
:
relative
;
top
:
0px
;
left
:
0px
;
width
:
100%
;
height
:
100%
;
}
/* 新建矩形框按钮 */
.add-rect-btn
{
position
:
absolute
;
right
:
15px
;
bottom
:
15px
;
z-index
:
100
;
opacity
:
0.8
;
transition
:
opacity
0.3s
;
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.1
);
}
.add-rect-btn
:hover
{
opacity
:
1
;
}
.group-header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
0
10px
;
margin
:
16px
0
;
border-bottom
:
1px
solid
#DCDFE6
;
}
.group-title
{
font-size
:
14px
;
font-weight
:
500
;
color
:
#303133
;
padding
:
0
8px
8px
;
position
:
relative
;
}
.group-title
::after
{
content
:
''
;
position
:
absolute
;
bottom
:
-1px
;
left
:
0
;
right
:
0
;
height
:
2px
;
background-color
:
#409EFF
;
}
/* 全屏按钮 */
.fullscreen-btn
{
position
:
absolute
;
right
:
15px
;
top
:
15px
;
z-index
:
100
;
opacity
:
0.8
;
transition
:
opacity
0.3s
;
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.1
);
}
.fullscreen-btn
:hover
{
opacity
:
1
;
}
/* 全屏编辑器 */
.fullscreen-editor
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.7
);
z-index
:
2000
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
20px
;
}
.fullscreen-content
{
background-color
:
#fff
;
border-radius
:
4px
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
}
.fullscreen-content
.image-container
{
flex
:
1
;
margin
:
0
;
border
:
none
;
border-radius
:
0
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#f5f7fa
;
}
.fullscreen-content
.image-wrapper
{
position
:
relative
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
line-height
:
0
;
}
.fullscreen-content
img
{
display
:
block
;
max-width
:
100%
;
max-height
:
100%
;
}
/* 分页器样式 */
.pagination-container
{
position
:
fixed
;
...
...
@@ -325,28 +524,16 @@ html, body {
line-height
:
40px
;
}
/* 区域样式 */
.wavesurfer-region
{
z-index
:
2
!important
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.1
);
box-shadow
:
0
1px
3px
rgba
(
0
,
0
,
0
,
0.1
);
transition
:
background-color
0.2s
ease
;
pointer-events
:
all
!important
;
cursor
:
pointer
!important
;
}
/* 页面区间样式 */
.wavesurfer-region
[
data-id
^=
"page-"
]
{
z-index
:
3
!important
;
background
:
rgba
(
255
,
192
,
203
,
0.3
)
!important
;
border
:
2px
solid
rgba
(
255
,
192
,
203
,
0.8
)
!important
;
pointer-events
:
all
!important
;
cursor
:
pointer
!important
;
}
/* 组区间样式 */
.wavesurfer-region
:not
([
data-id
^=
"page-"
])
{
z-index
:
1
!important
;
cursor
:
pointer
!important
;
}
/*
区间拖拽
手柄样式 */
/*
波形图的拖动
手柄样式 */
.wavesurfer-handle
{
display
:
block
!important
;
position
:
absolute
!important
;
...
...
@@ -366,122 +553,54 @@ html, body {
right
:
0
!important
;
}
/* 禁用状态下的手柄样式 */
.wavesurfer-region
[
data-drag
=
"false"
]
.wavesurfer-handle
{
display
:
none
!important
;
}
.app
{
position
:
relative
;
top
:
0px
;
left
:
0px
;
width
:
100%
;
height
:
100%
;
/* 波形图的进度条样式 */
.wavesurfer-cursor
{
z-index
:
4
!important
;
}
/* 新建矩形框按钮 */
.add-rect-btn
{
position
:
absolute
;
right
:
15px
;
bottom
:
15px
;
z-index
:
100
;
opacity
:
0.8
;
transition
:
opacity
0.3s
;
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.1
);
}
.add-rect-btn
:hover
{
opacity
:
1
;
}
.group-header
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
0
10px
;
margin
:
16px
0
;
border-bottom
:
1px
solid
#DCDFE6
;
}
.group-title
{
font-size
:
14px
;
font-weight
:
500
;
color
:
#303133
;
padding
:
0
8px
8px
;
position
:
relative
;
/* 页面区间样式 */
.wavesurfer-region
[
data-id
^=
"page-"
]
{
z-index
:
3
!important
;
background-color
:
rgba
(
255
,
0
,
0
,
0.2
)
!important
;
pointer-events
:
all
!important
;
cursor
:
pointer
!important
;
}
.group-title
::after
{
content
:
''
;
position
:
absolute
;
bottom
:
-1px
;
left
:
0
;
right
:
0
;
height
:
2px
;
background-color
:
#409EFF
;
.wavesurfer-region
[
data-id
^=
"page-"
]
:hover
{
background-color
:
rgba
(
255
,
0
,
0
,
0.3
)
!important
;
}
/* 全屏按钮 */
.fullscreen-btn
{
position
:
absolute
;
right
:
15px
;
top
:
15px
;
z-index
:
100
;
opacity
:
0.8
;
transition
:
opacity
0.3s
;
box-shadow
:
0
2px
12px
0
rgba
(
0
,
0
,
0
,
0.1
);
}
.fullscreen-btn
:hover
{
opacity
:
1
;
/* 组区间样式 */
.wavesurfer-region
:not
([
data-id
^=
"page-"
])
{
background-color
:
rgba
(
64
,
158
,
255
,
0.2
);
border
:
2px
solid
rgba
(
64
,
158
,
255
,
0.5
);
z-index
:
2
!important
;
cursor
:
pointer
!important
;
}
/* 全屏编辑器 */
.fullscreen-editor
{
position
:
fixed
;
top
:
0
;
left
:
0
;
right
:
0
;
bottom
:
0
;
background-color
:
rgba
(
0
,
0
,
0
,
0.7
);
z-index
:
2000
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
20px
;
.wavesurfer-region
:not
([
data-id
^=
"page-"
])
:hover
{
background-color
:
rgba
(
64
,
158
,
255
,
0.3
)
!important
;
}
.fullscreen-content
{
background-color
:
#fff
;
border-radius
:
4px
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
/* 锁定状态下的标记样式 */
.wavesurfer-region
[
data-id
$
=
"-start"
]
{
background-color
:
rgba
(
0
,
255
,
0
,
0.8
)
!important
;
width
:
1px
!important
;
z-index
:
5
!important
;
}
.fullscreen-content
.image-container
{
flex
:
1
;
margin
:
0
;
border
:
none
;
border-radius
:
0
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#f5f7fa
;
.wavesurfer-region
[
data-id
$
=
"-end"
]
{
background-color
:
rgba
(
255
,
0
,
0
,
0.8
)
!important
;
width
:
1px
!important
;
z-index
:
5
!important
;
}
.fullscreen-content
.image-wrapper
{
position
:
relative
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
line-height
:
0
;
/* 锁定状态下隐藏非当前页面的区间 */
.page-locked
.wavesurfer-region
:not
([
data-id
*=
"-start"
])
:not
([
data-id
*=
"-end"
])
:not
([
data-id
$
=
"-${currentPageIndex-1}"
])
{
display
:
none
!important
;
}
.fullscreen-content
img
{
display
:
block
;
max-width
:
100%
;
max-height
:
100%
;
/* 锁定状态下禁用区间拖动 */
.page-locked
.wavesurfer-region
.wavesurfer-handle
{
display
:
none
!important
;
}
\ No newline at end of file
form/index.html
View file @
3f1b1d59
...
...
@@ -278,11 +278,16 @@
</div>
<!-- 音频控制区域 -->
<el-card
class=
"audio-control"
v-loading=
"audioLoading"
>
<div
class=
"waveform-container"
>
<div
class=
"audio-control"
v-loading=
"audioLoading"
>
<!-- 波形图区域 -->
<div
class=
"waveform-wrapper"
:class=
"{ 'page-locked': isPageLocked }"
>
<div
id=
"waveform"
></div>
<div
id=
"wave-timeline"
></div>
<div
class=
"audio-controls"
>
</div>
<!-- 控制按钮区域 -->
<div
class=
"control-wrapper"
>
<div
class=
"basic-controls"
>
<el-button-group>
<el-button
size=
"small"
@
click=
"playAudio"
:disabled=
"audioLoading"
>
<i
:class=
"isPlaying ? 'el-icon-video-pause' : 'el-icon-video-play'"
></i>
...
...
@@ -291,54 +296,56 @@
<i
class=
"el-icon-video-stop"
></i>
</el-button>
</el-button-group>
<el-slider
v-model=
"zoomLevel"
:min=
"1"
:max=
"500"
@
change=
"handleZoom"
:disabled=
"audioLoading"
style=
"width: 200px;
margin-left: 20px;
"
>
style=
"width: 200px;"
>
</el-slider>
<el-button
size=
"small"
:type=
"isPageLocked ? 'danger' : 'primary'"
@
click=
"togglePageLock"
style=
"margin-left: 20px;
"
>
:class=
"{ 'is-active': isPageLocked }
"
>
<i
:class=
"isPageLocked ? 'el-icon-lock' : 'el-icon-unlock'"
></i>
{{ isPageLocked ? '解锁页面' : '锁定页面' }}
</el-button>
<!-- 添加时间调整控件 -->
<div
class=
"time-adjust-controls"
v-if=
"currentGroup"
>
<span
class=
"time-label"
>
开始时间:
</span
>
<el-input-number
v-model=
"currentGroup.start"
:min=
"0
"
:max=
"currentGroup.end
"
:step=
"0.1
"
:precision=
"3
"
size=
"small
"
:disabled=
"isPageLocked
"
@
change=
"handleTimeChange('start', $event)
"
style=
"width: 120px"
>
</el-input-number
>
<span
class=
"time-label"
style=
"margin-left: 10px"
>
结束时间:
</span
>
<el-input-number
v-model=
"currentGroup.end"
:min=
"currentGroup.start
"
:max=
"wavesurfer ? wavesurfer.getDuration() : 999999
"
:step=
"0.1
"
:precision=
"3
"
size=
"small
"
:disabled=
"isPageLocked
"
@
change=
"handleTimeChange('end', $event)
"
style=
"width: 120px"
>
</el-input-number
>
</
div
>
</div>
<!-- 添加时间调整控件 --
>
<div
class=
"time-adjust-controls"
v-if=
"currentGroup"
>
<span
class=
"time-label"
>
开始时间:
</span>
<el-input-number
v-model=
"currentGroup.start
"
:min=
"0
"
:max=
"currentGroup.end
"
:step=
"0.1
"
:precision=
"3
"
size=
"small
"
:disabled=
"isPageLocked
"
@
change=
"handleTimeChange('start', $event)"
style=
"width: 120px"
>
</el-input-number
>
<span
class=
"time-label"
style=
"margin-left: 10px"
>
结束时间:
</span>
<el-input-number
v-model=
"currentGroup.end
"
:min=
"currentGroup.start
"
:max=
"wavesurfer ? wavesurfer.getDuration() : 999999
"
:step=
"0.1
"
:precision=
"3
"
size=
"small
"
:disabled=
"isPageLocked
"
@
change=
"handleTimeChange('end', $event)"
style=
"width: 120px"
>
</
el-input-number
>
</div>
</div>
</
el-card
>
</div>
</
div
>
</div>
</body>
<script
src=
"./index.js"
></script>
</html>
\ No newline at end of file
form/index.js
View file @
3f1b1d59
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