From af00d8c8e8a52ce151b917ab94ad7f8e3f09c279 Mon Sep 17 00:00:00 2001
From: weidoudou7 <3059670696@qq.com>
Date: Sun, 1 Jun 2025 16:36:11 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BE=A9=E8=AE=BA=E7=BB=93=E6=9D=9F=E8=B7=B3?=
=?UTF-8?q?=E8=BD=AC=E5=A4=8D=E7=9B=98=EF=BC=8C=E5=B9=B6=E4=BC=A0=E9=80=92?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=88=B0=E5=A4=8D=E7=9B=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Debate_front/src/components/DebateCom.vue | 177 +++++++++++++++++++++-
1 file changed, 174 insertions(+), 3 deletions(-)
diff --git a/Debate_front/src/components/DebateCom.vue b/Debate_front/src/components/DebateCom.vue
index 9ab052f..1bafd46 100644
--- a/Debate_front/src/components/DebateCom.vue
+++ b/Debate_front/src/components/DebateCom.vue
@@ -76,6 +76,10 @@
{{ currentRound }}/{{ debateRounds }}
+
+
+
+
@@ -126,7 +130,23 @@
-
+
+
+
+
+
+
+
@@ -179,6 +199,9 @@ export default {
currentRound: 0, // 当前轮数
selectedOption: 0, // 选中的轮数选项
+ showReviewConfirm: false,// 控制复盘确认弹窗
+ showReviewButton: false,// 控制是否显示复盘按钮
+
scrollToView: "",
content: "",
debateTopics: [
@@ -201,6 +224,18 @@ export default {
},
},
+ watch: {
+ //监听当前轮数变化
+ currentRound(newVal) {
+ if (newVal >= this.debateRounds && this.debateRounds > 0) {
+ // 延迟显示弹窗,让用户看到最后一条消息
+ setTimeout(() => {
+ this.showReviewConfirm = true;
+ }, 1000);
+ }
+ }
+ },
+
methods: {
handleSheetClick() {
const pinia = this.$pinia;
@@ -349,6 +384,11 @@ export default {
});
};
+ if (this.currentRound >= this.debateRounds) {
+ // 显示复盘按钮
+ this.showReviewButton = true;
+ return;
+ }
},
@@ -427,6 +467,8 @@ export default {
this.currentRound = 0;
this.roundsSelected = true;
this.showRoundsPopup = false;
+ this.showReviewButton = false;
+ this.showReviewConfirm = false;
// 更新系统信息
this.message = [{
@@ -435,6 +477,38 @@ export default {
}];
this.scrollToBottom();
},
+
+ // 开始复盘
+ startReview() {
+ // // 收集所有消息
+ // let history = this.messages
+ // .filter((msg) => !msg.loading)
+ // .map((msg) => {
+ // if (msg.role === 'user') {
+ // return '用户:${ msg.content}';
+ // } else if (msg.role === 'ai') {
+ // return 'AI :${ msg.content}';
+ // }
+ // return '';
+ // }).join('\n');
+ //
+ // //存储到store
+ // const pinia = this.$pinia;
+ // const store = useDebateStore(pinia);
+ // store.setDebate(history);
+ // // 通知父组件切换到复盘界面
+ // this.$emit('tab-change', 3);
+ this.onLongPress();
+ // 关闭弹窗
+ this.showReviewConfirm = false;
+ },
+
+ // 显示复盘弹窗
+ showReviewModal() {
+ this.showReviewConfirm = true;
+ },
+
+
},
};
@@ -700,7 +774,6 @@ export default {
opacity: 0;
transform: translateY(20rpx);
}
-
to {
opacity: 1;
transform: translateY(0);
@@ -1188,7 +1261,7 @@ export default {
color: white;
}
-.confirm-button {
+.confirm-button-selectRounds {
background: #6839E0;
color: white;
border-radius: 0;
@@ -1198,4 +1271,102 @@ export default {
font-weight: 600;
border: none;
}
+
+/* 复盘确认弹窗样式 */
+.review-confirm-mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.6);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 2000;
+ animation: fadeIn 0.3s;
+}
+
+.review-confirm-popup {
+ width: 80%;
+ max-width: 600rpx;
+ background: white;
+ border-radius: 28rpx;
+ overflow: hidden;
+ box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.3);
+}
+
+.popup-header {
+ padding: 30rpx;
+ background: #7C3AED;
+ text-align: center;
+}
+
+.popup-title {
+ font-size: 36rpx;
+ font-weight: 700;
+ color: white;
+}
+
+.popup-content {
+ padding: 40rpx 30rpx;
+ font-size: 30rpx;
+ color: #333;
+ text-align: center;
+ line-height: 1.6;
+}
+
+.popup-buttons {
+ display: flex;
+ padding: 20rpx;
+ border-top: 1rpx solid #eee;
+}
+
+.cancel-button {
+ flex: 1;
+ background: #f5f5f5;
+ color: #666;
+ border-radius: 12rpx;
+ margin-right: 15rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 30rpx;
+}
+
+.confirm-button-gotoReview {
+ flex: 1;
+ background: #6839E0;
+ color: white;
+ border-radius: 12rpx;
+ margin-left: 15rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 30rpx;
+}
+
+/* 复盘按钮样式 */
+.review-button {
+ width: 50rpx;
+ height: 50rpx;
+ margin-left: 20rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: rgba(255, 255, 255, 0.2);
+ border-radius: 50%;
+ padding: 8rpx;
+}
+
+.review-button image {
+ width: 100%;
+ height: 100%;
+ filter: brightness(0) invert(1);
+}
+
+/* 调整进度条容器布局 */
+.progress-container {
+ flex: 1;
+ display: flex;
+ align-items: center;
+}