feat: 新增范式润色功能页面

- 新增 ArticleRewritePanel.vue 组件
- 支持从文稿库选择文章或粘贴输入
- 支持句子多选(连续文本流展示)
- 支持基于范式 Prompt 进行 AI 检查
- 支持 AI 重写及选择性替换
- 新增全选/反选按钮
- 新增保存功能(创建版本历史)
- 新增复检功能(对重写内容再次检查)
- 在 GlobalSidebar.vue 添加导航入口
- 在 App.vue 添加路由渲染
This commit is contained in:
empty
2026-01-10 00:16:51 +08:00
parent e153e10d48
commit 56fda55709
3 changed files with 879 additions and 28 deletions

View File

@@ -1,40 +1,53 @@
<template>
<div class="flex h-full">
<!-- 对照检查页面全屏独占 -->
<ComparePanel v-if="currentPage === 'compare'" />
<!-- 常规布局 -->
<template v-else>
<!-- 左侧面板 -->
<WriterPanel v-if="currentPage === 'writer'" />
<AnalysisPanel v-else-if="currentPage === 'analysis'" />
<DocumentsPanel
v-else-if="currentPage === 'documents'"
@toggle-version-panel="toggleVersionPanel"
@document-selected="handleDocumentSelected"
/>
<MaterialsPanel v-else-if="currentPage === 'materials'" />
<SettingsPanel v-else-if="currentPage === 'settings'" />
<div class="flex h-screen w-full bg-slate-950 overflow-hidden">
<!-- 全局导航侧边栏 -->
<GlobalSidebar v-if="currentPage !== 'compare' && currentPage !== 'diffAnnotation' && currentPage !== 'rewrite'" />
<!-- 主体区域 -->
<main class="flex-1 flex overflow-hidden relative">
<!-- 对照检查页面全屏独占 -->
<ComparePanel v-if="currentPage === 'compare'" />
<!-- 右侧主内容区 -->
<MainContent />
<!-- 差异标注页面全屏独占 -->
<DiffAnnotationPanel v-else-if="currentPage === 'diffAnnotation'" />
<!-- 版本历史面板仅文稿管理页面显示 -->
<DocumentVersionPanel
v-if="currentPage === 'documents'"
:visible="showVersionPanel"
:document-id="selectedDocumentId"
:current-content="selectedDocumentContent"
@close="showVersionPanel = false"
@restore="handleVersionRestore"
/>
</template>
<!-- 范式润色页面全屏独占 -->
<ArticleRewritePanel v-else-if="currentPage === 'rewrite'" />
<!-- 持久化布局面板 -->
<template v-else>
<!-- 左侧/中间配置侧边栏 -->
<WriterPanel v-if="currentPage === 'writer'" />
<AnalysisPanel v-else-if="currentPage === 'analysis'" />
<DocumentsPanel
v-else-if="currentPage === 'documents'"
@toggle-version-panel="toggleVersionPanel"
@document-selected="handleDocumentSelected"
/>
<MaterialsPanel v-else-if="currentPage === 'materials'" />
<SettingsPanel v-else-if="currentPage === 'settings'" />
<!-- 右侧核心内容区 -->
<MainContent />
<!-- 侧滑浮层面板 (仅文稿页) -->
<DocumentVersionPanel
v-if="currentPage === 'documents'"
:visible="showVersionPanel"
:document-id="selectedDocumentId"
:current-content="selectedDocumentContent"
@close="showVersionPanel = false"
@restore="handleVersionRestore"
/>
</template>
</main>
</div>
</template>
<script setup>
import { ref, computed } from 'vue'
import { useAppStore } from './stores/app'
import GlobalSidebar from './components/GlobalSidebar.vue'
import WriterPanel from './components/WriterPanel.vue'
import AnalysisPanel from './components/AnalysisPanel.vue'
import DocumentsPanel from './components/DocumentsPanel.vue'
@@ -43,6 +56,8 @@ import SettingsPanel from './components/SettingsPanel.vue'
import MainContent from './components/MainContent.vue'
import ComparePanel from './components/ComparePanel.vue'
import DocumentVersionPanel from './components/DocumentVersionPanel.vue'
import DiffAnnotationPanel from './components/DiffAnnotationPanel.vue'
import ArticleRewritePanel from './components/ArticleRewritePanel.vue'
const appStore = useAppStore()
const currentPage = computed(() => appStore.currentPage)
@@ -72,3 +87,4 @@ const handleVersionRestore = (content) => {
}
}
</script>