Commit 3f1b1d59 authored by liujiangnan's avatar liujiangnan

feat:

parent 0177e9da
...@@ -134,40 +134,50 @@ html, body { ...@@ -134,40 +134,50 @@ html, body {
/* 音频控制区域 */ /* 音频控制区域 */
.audio-control { .audio-control {
height: 200px; height: 185px;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
z-index: 1000; z-index: 1000;
margin: 0; margin: 0;
border-radius: 0; background: #fff;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); border-top: 1px dashed #DCDFE6;
}
.audio-control .el-card__body {
padding: 10px 20px; padding: 10px 20px;
} }
.waveform-container { .waveform-container {
height: 100%; height: 90px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
background: white; background: white;
} }
/* 波形图区域样式 */
.waveform-wrapper {
position: relative;
padding: 10px 10px 0;
background: #fff;
height: 116px;
overflow: visible;
}
#waveform { #waveform {
flex: 1; height: 116px !important;
min-height: 120px;
position: relative; position: relative;
background: white; background: white;
margin-bottom: 5px;
overflow: hidden;
} }
#wave-timeline { #wave-timeline {
height: 30px; height: 20px !important;
margin-bottom: 5px; position: absolute;
position: relative; left: 0px;
right: 0px;
bottom: 0px;
overflow: visible;
} }
.audio-controls { .audio-controls {
...@@ -178,7 +188,44 @@ html, body { ...@@ -178,7 +188,44 @@ html, body {
z-index: 4; 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 { .time-adjust-controls {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -197,6 +244,158 @@ html, body { ...@@ -197,6 +244,158 @@ html, body {
margin: 0 5px; 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 { .pagination-container {
position: fixed; position: fixed;
...@@ -325,28 +524,16 @@ html, body { ...@@ -325,28 +524,16 @@ html, body {
line-height: 40px; line-height: 40px;
} }
/* 区域样式 */
.wavesurfer-region { .wavesurfer-region {
z-index: 2 !important; 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; 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 { .wavesurfer-handle {
display: block !important; display: block !important;
position: absolute !important; position: absolute !important;
...@@ -366,122 +553,54 @@ html, body { ...@@ -366,122 +553,54 @@ html, body {
right: 0 !important; right: 0 !important;
} }
/* 禁用状态下的手柄样式 */ /* 波形图的进度条样式 */
.wavesurfer-region[data-drag="false"] .wavesurfer-handle { .wavesurfer-cursor {
display: none !important; z-index: 4 !important;
}
.app{
position: relative;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
} }
/* 新建矩形框按钮 */ /* 页面区间样式 */
.add-rect-btn { .wavesurfer-region[data-id^="page-"] {
position: absolute; z-index: 3 !important;
right: 15px; background-color: rgba(255, 0, 0, 0.2) !important;
bottom: 15px; pointer-events: all !important;
z-index: 100; cursor: pointer !important;
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 { .wavesurfer-region[data-id^="page-"]:hover {
content: ''; background-color: rgba(255, 0, 0, 0.3) !important;
position: absolute;
bottom: -1px;
left: 0;
right: 0;
height: 2px;
background-color: #409EFF;
} }
/* 全屏按钮 */ /* 组区间样式 */
.fullscreen-btn { .wavesurfer-region:not([data-id^="page-"]) {
position: absolute; background-color: rgba(64, 158, 255, 0.2);
right: 15px; border: 2px solid rgba(64, 158, 255, 0.5);
top: 15px; z-index: 2 !important;
z-index: 100; cursor: pointer !important;
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-"]):hover {
.fullscreen-editor { background-color: rgba(64, 158, 255, 0.3) !important;
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; .wavesurfer-region[data-id$="-start"] {
border-radius: 4px; background-color: rgba(0, 255, 0, 0.8) !important;
width: 100%; width: 1px !important;
height: 100%; z-index: 5 !important;
display: flex;
flex-direction: column;
overflow: hidden;
} }
.fullscreen-content .image-container { .wavesurfer-region[data-id$="-end"] {
flex: 1; background-color: rgba(255, 0, 0, 0.8) !important;
margin: 0; width: 1px !important;
border: none; z-index: 5 !important;
border-radius: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: #f5f7fa;
} }
.fullscreen-content .image-wrapper { /* 锁定状态下隐藏非当前页面的区间 */
position: relative; .page-locked .wavesurfer-region:not([data-id*="-start"]):not([data-id*="-end"]):not([data-id$="-${currentPageIndex-1}"]) {
display: flex; display: none !important;
justify-content: center;
align-items: center;
line-height: 0;
} }
.fullscreen-content img { /* 锁定状态下禁用区间拖动 */
display: block; .page-locked .wavesurfer-region .wavesurfer-handle {
max-width: 100%; display: none !important;
max-height: 100%;
} }
\ No newline at end of file
...@@ -278,11 +278,16 @@ ...@@ -278,11 +278,16 @@
</div> </div>
<!-- 音频控制区域 --> <!-- 音频控制区域 -->
<el-card class="audio-control" v-loading="audioLoading"> <div class="audio-control" v-loading="audioLoading">
<div class="waveform-container"> <!-- 波形图区域 -->
<div class="waveform-wrapper" :class="{ 'page-locked': isPageLocked }">
<div id="waveform"></div> <div id="waveform"></div>
<div id="wave-timeline"></div> <div id="wave-timeline"></div>
<div class="audio-controls"> </div>
<!-- 控制按钮区域 -->
<div class="control-wrapper">
<div class="basic-controls">
<el-button-group> <el-button-group>
<el-button size="small" @click="playAudio" :disabled="audioLoading"> <el-button size="small" @click="playAudio" :disabled="audioLoading">
<i :class="isPlaying ? 'el-icon-video-pause' : 'el-icon-video-play'"></i> <i :class="isPlaying ? 'el-icon-video-pause' : 'el-icon-video-play'"></i>
...@@ -291,22 +296,25 @@ ...@@ -291,22 +296,25 @@
<i class="el-icon-video-stop"></i> <i class="el-icon-video-stop"></i>
</el-button> </el-button>
</el-button-group> </el-button-group>
<el-slider <el-slider
v-model="zoomLevel" v-model="zoomLevel"
:min="1" :min="1"
:max="500" :max="500"
@change="handleZoom" @change="handleZoom"
:disabled="audioLoading" :disabled="audioLoading"
style="width: 200px; margin-left: 20px;"> style="width: 200px;">
</el-slider> </el-slider>
<el-button <el-button
size="small" size="small"
:type="isPageLocked ? 'danger' : 'primary'" :type="isPageLocked ? 'danger' : 'primary'"
@click="togglePageLock" @click="togglePageLock"
style="margin-left: 20px;"> :class="{ 'is-active': isPageLocked }">
<i :class="isPageLocked ? 'el-icon-lock' : 'el-icon-unlock'"></i> <i :class="isPageLocked ? 'el-icon-lock' : 'el-icon-unlock'"></i>
{{ isPageLocked ? '解锁页面' : '锁定页面' }} {{ isPageLocked ? '解锁页面' : '锁定页面' }}
</el-button> </el-button>
</div>
<!-- 添加时间调整控件 --> <!-- 添加时间调整控件 -->
<div class="time-adjust-controls" v-if="currentGroup"> <div class="time-adjust-controls" v-if="currentGroup">
...@@ -337,7 +345,6 @@ ...@@ -337,7 +345,6 @@
</div> </div>
</div> </div>
</div> </div>
</el-card>
</div> </div>
</body> </body>
<script src="./index.js"></script> <script src="./index.js"></script>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment