|
|
@@ -13,12 +13,14 @@
|
|
|
<div class="end-time">截止时间:{{ formatDate(aiSpeakingAssignmentInfo.endTime) }}</div>
|
|
|
|
|
|
</div>
|
|
|
- <div class="data-item">
|
|
|
- <span class="data-label">作业描述 </span>
|
|
|
- <span class="data-value">{{ aiSpeakingAssignmentInfo.description !== null ? aiSpeakingAssignmentInfo.description : '未设置' }}</span>
|
|
|
- </div>
|
|
|
- <div class="data-item">
|
|
|
- <span v-if="aiSpeakingAssignmentInfo.descriptionFile" class="data-label">作业附件</span>
|
|
|
+ <div class="data-item">
|
|
|
+ <span class="data-label">作业描述</span>
|
|
|
+ <div class="scrollable-description">
|
|
|
+ {{ aiSpeakingAssignmentInfo.description !== null ? aiSpeakingAssignmentInfo.description : '未设置' }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="data-item" v-if="aiSpeakingAssignmentInfo.descriptionFile">
|
|
|
+ <span class="data-label">作业附件</span>
|
|
|
<el-icon @click="openEditor(aiSpeakingAssignmentInfo.descriptionFile, aiSpeakingAssignmentInfo.assignmentName)"><Document /></el-icon>
|
|
|
</div>
|
|
|
<div class="data-item">
|
|
|
@@ -795,9 +797,6 @@ const resetHomework = async() => {
|
|
|
return;
|
|
|
}
|
|
|
if (isHomeworkStarted.value) {
|
|
|
- if (mediaRecorder.value && mediaRecorder.value.state === "recording") {
|
|
|
- mediaRecorder.value.stop();
|
|
|
- }
|
|
|
// 停止录制时长计时器
|
|
|
if (recordingTimer) {
|
|
|
clearInterval(recordingTimer);
|
|
|
@@ -807,6 +806,10 @@ const resetHomework = async() => {
|
|
|
if (cameraPreview.value) {
|
|
|
cameraPreview.value.srcObject = null;
|
|
|
}
|
|
|
+ // 关闭摄像头和麦克风
|
|
|
+ if (mediaRecorder.value && mediaRecorder.value.stream) {
|
|
|
+ mediaRecorder.value.stream.getTracks().forEach((track) => track.stop());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 显示加载状态
|
|
|
@@ -1124,6 +1127,20 @@ onMounted(() => {
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ .scrollable-description {
|
|
|
+ max-height: 12em; /* 10行高度(假设1em=1行) */
|
|
|
+ line-height: 1.3em; /* 行高设定 */
|
|
|
+ overflow-y: auto; /* 垂直滚动 */
|
|
|
+ white-space: pre-wrap; /* 保留换行符 */
|
|
|
+ color: #777;
|
|
|
+ margin-top: 10px;
|
|
|
+ scrollbar-width: none; /* Firefox */
|
|
|
+ -ms-overflow-style: none; /* IE/Edge */
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
.homework-button-group {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
@@ -1369,7 +1386,7 @@ progress {
|
|
|
}
|
|
|
|
|
|
.wechat-audio-button {
|
|
|
- margin-left: 20px;
|
|
|
+ margin-left: 25px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
background-color: #90caf9;
|
|
|
@@ -1378,6 +1395,7 @@ progress {
|
|
|
padding: 8px 15px;
|
|
|
cursor: pointer;
|
|
|
transition: background-color 0.3s;
|
|
|
+ margin-bottom:8px;
|
|
|
}
|
|
|
|
|
|
.wechat-audio-button:hover {
|