From e9bc48963b157fac2fd8ac2b58b45f8664b02b4e Mon Sep 17 00:00:00 2001 From: lyc Date: Sun, 5 Jan 2025 20:53:39 +0800 Subject: [PATCH 01/21] edit --- src/renderer/src/api/mode/index.js | 33 +++++- .../template-study/container/right.vue | 3 + .../views/teachingDesign/container/center.vue | 83 +++++++++---- .../teachingDesign/container/edit-dialog.vue | 19 ++- .../views/teachingDesign/container/left2.vue | 110 ++++++++++-------- .../src/views/teachingDesign/index.vue | 50 ++++---- 6 files changed, 198 insertions(+), 100 deletions(-) diff --git a/src/renderer/src/api/mode/index.js b/src/renderer/src/api/mode/index.js index add0402..26540bb 100644 --- a/src/renderer/src/api/mode/index.js +++ b/src/renderer/src/api/mode/index.js @@ -118,7 +118,6 @@ export function docList(params) { }) } - // 保存教学大纲 export function addSyllabus(data) { return request({ @@ -128,3 +127,35 @@ export function addSyllabus(data) { }) } +// 获取保存的大纲列表 +export function syllabusList(params) { + return request({ + url: '/education/generate/list', + method: 'get', + params + }) +} + +// 大纲详情 +export function syllabuss(id) { + return request({ + url: '/education/generate/' + id, + method: 'get', + }) +} + +// 删除大纲 +export function removeSyllabus(id) { + return request({ + url: '/education/generate/' + id, + method: 'delete', + }) +} + +export function editSyllabus(data) { + return request({ + url: '/education/generate', + method: 'put', + data + }) +} diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue index ea67d82..543c928 100644 --- a/src/renderer/src/components/template-study/container/right.vue +++ b/src/renderer/src/components/template-study/container/right.vue @@ -344,6 +344,8 @@ const againResult = async (index, item) => { } } + +const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms)); // 一键研读 const getCompletion = async () => { isStarted.value = new Array(childTempList.length).fill(false) @@ -372,6 +374,7 @@ const getCompletion = async () => { conversationId: conversation_id.value, stream: false }) + await delay(1000); // 每个请求之间延迟 1 秒 data = res.data } // 知识库模型 diff --git a/src/renderer/src/views/teachingDesign/container/center.vue b/src/renderer/src/views/teachingDesign/container/center.vue index 2bb122c..ab35643 100644 --- a/src/renderer/src/views/teachingDesign/container/center.vue +++ b/src/renderer/src/views/teachingDesign/container/center.vue @@ -9,29 +9,41 @@ 生成教学大纲 + + + 删除大纲 + + + + 编辑大纲 +
- +
+ \ No newline at end of file From 9f42f93cb99659a081f34aab71001bac07db57e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Mon, 6 Jan 2025 09:48:11 +0800 Subject: [PATCH 02/21] =?UTF-8?q?=E5=BD=93=E5=89=8D=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/layout/components/Aside.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue index 005d8fb..bde5ccd 100644 --- a/src/renderer/src/layout/components/Aside.vue +++ b/src/renderer/src/layout/components/Aside.vue @@ -345,6 +345,7 @@ onMounted(() => { color: #fff; font-size: 12px; margin-top: 5px; + text-align: center; } .pointer-events{ pointer-events: none; From 86ae0fa0cdd0362f4c8373fb818a92ac6b14565b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Mon, 6 Jan 2025 09:54:21 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=89=B9=E6=94=B9=E9=A1=B5=E9=9D=A2=E5=9B=A0=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E4=BF=AE=E6=94=B9=E8=80=8C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/classTask/teachClassTask.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/src/views/classTask/teachClassTask.vue b/src/renderer/src/views/classTask/teachClassTask.vue index 0d1afe6..0617952 100644 --- a/src/renderer/src/views/classTask/teachClassTask.vue +++ b/src/renderer/src/views/classTask/teachClassTask.vue @@ -821,6 +821,7 @@ onUnmounted(() => { \ No newline at end of file + From fb428ba5cae411026d617b1325401674096452ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E4=BA=86=E4=B8=AA=E7=99=BD?= <543593352@qq.com> Date: Tue, 7 Jan 2025 10:52:36 +0800 Subject: [PATCH 09/21] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=8D=95=E5=85=83?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=85=A5=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=B8=8E=E8=B6=85=E9=95=BF=E2=80=A6=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/choose-textbook/index.vue | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index 50526fb..811c1cc 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -11,15 +11,21 @@ :default-expanded-keys="defaultExpandedKeys" :current-node-key="curNode.data.id" highlight-current @node-click="handleNodeClick"> @@ -334,7 +340,7 @@ onMounted( async () => { } } -.tree-label { +.tree-label-wrap, .tree-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; From 586ce134f84f08933b03c947236de3cf2251f43c Mon Sep 17 00:00:00 2001 From: lyc Date: Tue, 7 Jan 2025 11:02:11 +0800 Subject: [PATCH 10/21] =?UTF-8?q?edit=20=E6=A1=86=E6=9E=B6=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/teachingDesign/container/center.vue | 49 ++++++++++++------- .../views/teachingDesign/container/left2.vue | 4 +- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/renderer/src/views/teachingDesign/container/center.vue b/src/renderer/src/views/teachingDesign/container/center.vue index 96515a1..0627f9f 100644 --- a/src/renderer/src/views/teachingDesign/container/center.vue +++ b/src/renderer/src/views/teachingDesign/container/center.vue @@ -20,8 +20,20 @@
- - + +
封面页
+
+
标题:{{ answer.title }}
+
副标题:{{answer.subTitle }}
+
+
目录页
+
+
{{index + 1}}:{{ item.chapterTitle }}
+
+

{{ index + 1 }} - {{ i + 1}} : {{ el.chapterTitle }}

+
+
+
@@ -37,7 +49,6 @@ import * as commUtils from '@/utils/comm.js' import { createChart, sendChart } from '@/api/ai/index' import { completion, addSyllabus, syllabuss, removeSyllabus } from '@/api/mode/index.js' import { createOutlineV2 } from '@/utils/ppt-request.js' -import TypingEffect from '@/components/typing-effect/index.vue' import useUserStore from '@/store/modules/user' const curMode = ref(2) @@ -60,14 +71,14 @@ const modeOptions = ref([ // 选中的环节 const selectedData = ref([]) emitter.on('selected', (data)=>{ - console.log(data,3000) selectedData.value = data }) // 回显大纲 const curItem = reactive({}) emitter.on('onShow', (data)=>{ + console.log(data) aiShow.value = false - answer.value = getResult(data.outline) + Object.assign(answer, JSON.parse(data.outline)) Object.assign(curItem, data) curItem.answer = curItem.outline getDetails(data.id) @@ -90,10 +101,9 @@ const params = reactive( // 研读 const loading = ref(false) -const answer = ref('') +const answer = reactive({}) const createAi = async ()=>{ - console.log(selectedData.value) if(selectedData.value.length == 0){ ElMessage.warning('请先选择教学环节后再生成教学大纲') return @@ -126,14 +136,12 @@ const createAi = async ()=>{ } const res = await createOutlineV2({query: data.answer}) console.log(res) - emitter.emit('onResult', data.answer) - answer.value = getResult(data.answer) - - onSaveTemp(data.answer) + emitter.emit('onResult', res) + Object.assign(answer, res.outline) + onSaveTemp(JSON.stringify(res.outline)) } finally { loading.value = false } - } @@ -174,11 +182,6 @@ const delAnswer = () =>{ } -// 去掉字符串中的 ### ** -let getResult = (str) => { - let newStr = str.replace(/#+|(\*\*)/g, ''); - return newStr -} // 千帆创建对话 const conversation_id = ref('') @@ -231,6 +234,18 @@ onMounted(() => { border-radius: 5px; text-align: left; overflow-y: auto; + padding: 15px; + .con-item{ + display: flex; + flex-direction: column; + margin-top: 15px; + .item-text{ + background: #F2F2F2; + padding: 15px; + border-radius: 5px; + margin-top: 10px; + } + } } } diff --git a/src/renderer/src/views/teachingDesign/container/left2.vue b/src/renderer/src/views/teachingDesign/container/left2.vue index def98d7..0ac347c 100644 --- a/src/renderer/src/views/teachingDesign/container/left2.vue +++ b/src/renderer/src/views/teachingDesign/container/left2.vue @@ -5,8 +5,8 @@
重置 新增
From 57caed47dd33721931fd76a40549696f6dc1442a Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Tue, 7 Jan 2025 11:03:05 +0800 Subject: [PATCH 11/21] =?UTF-8?q?=E7=94=9F=E6=88=90ppt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/views/model/index.vue | 1 + .../views/prepare/container/pptist-dialog.vue | 156 +++++++++- .../views/teachingDesign/container/center.vue | 12 +- .../container/progress-dialog.vue | 11 +- .../views/teachingDesign/container/right2.vue | 293 +++++++++++++++++- .../src/views/teachingDesign/index.vue | 12 +- 6 files changed, 455 insertions(+), 30 deletions(-) diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue index f869bee..8e2049a 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -680,6 +680,7 @@ onMounted(async () => { display: flex; flex-wrap: wrap; gap: 15px; + padding: 10px; .content-body-right-item{ &:hover{ cursor: pointer; diff --git a/src/renderer/src/views/prepare/container/pptist-dialog.vue b/src/renderer/src/views/prepare/container/pptist-dialog.vue index 22b2155..0d907b4 100644 --- a/src/renderer/src/views/prepare/container/pptist-dialog.vue +++ b/src/renderer/src/views/prepare/container/pptist-dialog.vue @@ -1,30 +1,120 @@ diff --git a/src/renderer/src/views/teachingDesign/container/center.vue b/src/renderer/src/views/teachingDesign/container/center.vue index ae9fa30..ed59b32 100644 --- a/src/renderer/src/views/teachingDesign/container/center.vue +++ b/src/renderer/src/views/teachingDesign/container/center.vue @@ -9,11 +9,11 @@ 生成教学大纲 - + 删除大纲 - + 编辑大纲 @@ -96,7 +96,7 @@ const createAi = async ()=>{ ElMessage.warning('请先选择教学环节后再生成教学大纲') return } - + let str = selectedData.value.map( item => item.name).join('、') let bookV = curNode.roottitle.split('-')[1] + '版' loading.value = true @@ -167,7 +167,7 @@ const delAnswer = () =>{ emitter.emit('resetSelect') }) .catch(() => {}) - + } // 去掉字符串中的 ### ** @@ -188,7 +188,7 @@ const getChartId = () => { onUnmounted(()=>{ emitter.off('selected') emitter.off('onShow') - + }) const curNode = reactive({}) @@ -230,4 +230,4 @@ onMounted(() => { } } - \ No newline at end of file + diff --git a/src/renderer/src/views/teachingDesign/container/progress-dialog.vue b/src/renderer/src/views/teachingDesign/container/progress-dialog.vue index 5bfe036..7f01c73 100644 --- a/src/renderer/src/views/teachingDesign/container/progress-dialog.vue +++ b/src/renderer/src/views/teachingDesign/container/progress-dialog.vue @@ -1,6 +1,6 @@ @@ -29,5 +29,10 @@ const dAttrs = computed(() => { }) \ No newline at end of file + + diff --git a/src/renderer/src/views/teachingDesign/container/right2.vue b/src/renderer/src/views/teachingDesign/container/right2.vue index 03ce212..e3e5d72 100644 --- a/src/renderer/src/views/teachingDesign/container/right2.vue +++ b/src/renderer/src/views/teachingDesign/container/right2.vue @@ -4,22 +4,73 @@ 课件预览
一键生成 - 编辑课件 + 编辑课件
- + +
+
{{index+1}}
+
+ + \ No newline at end of file diff --git a/src/renderer/src/views/teachingDesign/container/edit-dialog.vue b/src/renderer/src/views/teachingDesign/container/edit-dialog.vue index 49c7601..24c8528 100644 --- a/src/renderer/src/views/teachingDesign/container/edit-dialog.vue +++ b/src/renderer/src/views/teachingDesign/container/edit-dialog.vue @@ -7,11 +7,28 @@
- - - - - + +
+ +.sidebar { + width: 100%; + padding: 5px; + display: flex; + justify-content: space-between; +} - \ No newline at end of file +.nav-level-one,.nav-level-two { + margin-bottom: 20px; + width: 120px; +} +.nav-level-two .nav-item{ + text-align: center; +} + +.nav-item { + display: flex; + align-items: center; + margin-bottom: 10px; + padding: 8px 10px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +.nav-item:hover { + background-color: rgb(245, 247, 250); +} + +.nav-text { + flex: 1; + font-size: 14px; + color: #333; +} + +.nav-arrow { + font-size: 12px; + margin-left: auto; +} + +.nav-level-one.nav-item:first-child.nav-text { + color: blue; +} +.active .nav-text{ + font-weight: bold; + color:rgb(64, 158, 255) +} +.active .icon{ + font-weight: bold; + color:rgb(64, 158, 255) +} + \ No newline at end of file From dbaf861bef10c10e256e20e785c22e4b75865570 Mon Sep 17 00:00:00 2001 From: zdg Date: Wed, 8 Jan 2025 16:48:31 +0800 Subject: [PATCH 18/21] =?UTF-8?q?=E8=AF=BE=E5=A0=82=E7=82=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/public/icon/avatar.svg | 3 + .../AixPPTist/src/views/Screen/BaseView.vue | 7 +- .../src/views/Screen/PresenterView.vue | 9 ++- .../src/AixPPTist/src/views/Screen/index.vue | 5 +- src/renderer/src/api/teaching/classcourse.js | 12 +++ src/renderer/src/utils/ppt/index.js | 81 ++++++++++++++++++- 6 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 src/renderer/public/icon/avatar.svg diff --git a/src/renderer/public/icon/avatar.svg b/src/renderer/public/icon/avatar.svg new file mode 100644 index 0000000..386fffa --- /dev/null +++ b/src/renderer/public/icon/avatar.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/renderer/src/AixPPTist/src/views/Screen/BaseView.vue b/src/renderer/src/AixPPTist/src/views/Screen/BaseView.vue index 4b747bd..e2dba4a 100644 --- a/src/renderer/src/AixPPTist/src/views/Screen/BaseView.vue +++ b/src/renderer/src/AixPPTist/src/views/Screen/BaseView.vue @@ -47,9 +47,10 @@ + + -
@@ -76,8 +77,8 @@ import WritingBoardTool from './WritingBoardTool.vue' import CountdownTimer from './CountdownTimer.vue' import emitter from '@/utils/mitt'; import Chat from '../../api/chat' // 聊天 -import { CircleDoubleDown, CircleDoubleUp, Share } from '@icon-park/vue-next' // icon-park 图标库 -import { ShareCode } from '@/utils/ppt' // ppt相关 +import { CircleDoubleDown, CircleDoubleUp, Share, Hands } from '@icon-park/vue-next' // icon-park 图标库 +import { ShareCode, ToolHandle } from '@/utils/ppt' // ppt相关 const props = defineProps<{ changeViewMode: (mode: 'base' | 'presenter') => void diff --git a/src/renderer/src/AixPPTist/src/views/Screen/PresenterView.vue b/src/renderer/src/AixPPTist/src/views/Screen/PresenterView.vue index 5ece2f4..56e930b 100644 --- a/src/renderer/src/AixPPTist/src/views/Screen/PresenterView.vue +++ b/src/renderer/src/AixPPTist/src/views/Screen/PresenterView.vue @@ -10,7 +10,10 @@ {{ fullscreenState ? '退出全屏' : '全屏' }}
-
分享
+
结束放映
结束课堂
@@ -79,7 +82,7 @@