|
|
|
@ -76,6 +76,10 @@
|
|
|
|
|
<view class="progress-inner" :style="{ width: progressPercentage + '%' }"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="rounds-counter">{{ currentRound }}/{{ debateRounds }}</view>
|
|
|
|
|
<!-- 添加复盘按钮 -->
|
|
|
|
|
<view v-if="showReviewButton" class="review-button" @click="showReviewModal">
|
|
|
|
|
<image src="/static/icons/file-chart-line.png" mode="aspectFit"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
@ -126,7 +130,23 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<button class="confirm-button" @click="confirmRounds">开始辩论</button>
|
|
|
|
|
<button class="confirm-button-selectRounds" @click="confirmRounds">开始辩论</button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<!-- 复盘确认弹窗 -->
|
|
|
|
|
<view v-if="showReviewConfirm" class="review-confirm-mask" @click="showReviewConfirm = false">
|
|
|
|
|
<view class="review-confirm-popup" @click.stop>
|
|
|
|
|
<view class="popup-header">
|
|
|
|
|
<view class="popup-title">辩论完成</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="popup-content">
|
|
|
|
|
<text>辩论已完成{{ debateRounds }}回合,是否立即进行复盘分析?</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="popup-buttons">
|
|
|
|
|
<button class="cancel-button" @click="showReviewConfirm = false">稍后再说</button>
|
|
|
|
|
<button class="confirm-button-gotoReview" @click="startReview">立即复盘</button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
@ -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;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|