|
|
@@ -53,7 +53,8 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- 右侧工作区域 -->
|
|
|
- <div class="main-work" :style="{ background: showExamDetail ? 'transparent' : '#ebf3ff' }">
|
|
|
+ <div class="main-work" :style="{ background: showExamDetail ? 'transparent' : '#ebf3ff', position: 'relative' }">
|
|
|
+
|
|
|
<!-- 头部 -->
|
|
|
<div class="work-header" v-if="showExamDetail">
|
|
|
<h2>考试工坊</h2>
|
|
|
@@ -69,9 +70,12 @@
|
|
|
<!-- 考试工坊主界面 -->
|
|
|
<div v-if="!showExamDetail" class="exam-workshop-card app-container">
|
|
|
<!-- 中间主操作区 -->
|
|
|
- <main class="main-content">
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
+ <main class="main-content" style="padding-top: 36px;">
|
|
|
+ <div class="form-group" style="position: relative;">
|
|
|
+ <!-- 返回AI问答按钮 -->
|
|
|
+ <button v-if="hideSidebar && !showExamDetail" class="return-ai-btn" @click="handleReturnToAI">
|
|
|
+ 返回AI问答
|
|
|
+ </button>
|
|
|
<label class="form-label">试卷名称</label>
|
|
|
<input type="text" class="form-control" v-model="examName" maxlength="32" placeholder="请输入试卷名称..." :disabled="isGenerating">
|
|
|
<div class="char-count">{{ examName?.length || 0 }}/32</div>
|
|
|
@@ -560,7 +564,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, computed, onMounted, onUnmounted, reactive, watch, defineProps } from "vue";
|
|
|
+import { ref, computed, onMounted, onUnmounted, reactive, watch, defineProps, defineEmits } from "vue";
|
|
|
import Sidebar from "@/components/Sidebar.vue";
|
|
|
import DeleteConfirmModal from "@/components/DeleteConfirmModal.vue";
|
|
|
|
|
|
@@ -570,6 +574,12 @@ const props = defineProps({
|
|
|
default: false
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+const emit = defineEmits(['return-to-ai']);
|
|
|
+
|
|
|
+const handleReturnToAI = () => {
|
|
|
+ emit('return-to-ai');
|
|
|
+};
|
|
|
import { apis } from '@/request/apis.js'
|
|
|
import { ElMessage } from 'element-plus'
|
|
|
// ===== 已删除:getUserId - 不再需要,改用token =====
|
|
|
@@ -2168,6 +2178,7 @@ const createHTMLContent = (exportData, includeAnswers = true) => {
|
|
|
font-weight: bold;
|
|
|
color: #2c5aa0;
|
|
|
}
|
|
|
+
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
@@ -5562,6 +5573,35 @@ onUnmounted(() => {
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
|
|
|
+.return-ai-btn {
|
|
|
+ position: absolute;
|
|
|
+ top: -15px;
|
|
|
+ right: 0;
|
|
|
+ z-index: 100;
|
|
|
+ background: white;
|
|
|
+ border: 1px solid rgba(0, 0, 0, 0.06);
|
|
|
+ border-radius: 12px;
|
|
|
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
|
+ padding: 6px 16px;
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #2563eb; /* 改为蓝色文字 */
|
|
|
+ cursor: pointer;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 5px;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+}
|
|
|
|
|
|
+.return-ai-btn:hover {
|
|
|
+ box-shadow: 0 8px 24px rgba(13, 110, 253, 0.12);
|
|
|
+ color: #0d6efd;
|
|
|
+ border-color: rgba(13, 110, 253, 0.2);
|
|
|
+}
|
|
|
|
|
|
+.return-ai-btn::before {
|
|
|
+ content: '←';
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
</style>
|