@@ -20,6 +21,7 @@ import { ref, onMounted, nextTick, reactive } from 'vue'
import { sessionStore } from '@/utils/store'
import PDF from '@/components/PdfJs/index.vue'
import LeftDialog from './left-dialog.vue'
+import emitter from '@/utils/mitt'
const props = defineProps(['type'])
@@ -29,6 +31,12 @@ const onClick = () => {
showDialog.value = true
}
+emitter.on('changePdfUrl', async (data) => {
+ pdfUrl.value = ''
+ await nextTick()
+ pdfUrl.value = data.fileUrl
+})
+
// 加载PDF
const pdfUrl = ref('')
const curNode = reactive({})
@@ -36,16 +44,15 @@ onMounted(async () => {
await nextTick()
// 当前节点
let nodeData = sessionStore.get('subject.curNode')
- Object.assign(curNode, nodeData);
+ Object.assign(curNode, nodeData)
let data = sessionStore.get('subject.curBook')
let fileurl = data.fileurl
- if(props.type == 1){
+ if (props.type == 1) {
fileurl = `${data.edustage}-${data.edusubject}-课标.txt`
}
- if(fileurl == '') return
+ if (fileurl == '') return
pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt', '.pdf')
-
})
@@ -53,6 +60,7 @@ onMounted(async () => {
.container-left-page {
height: 100%;
flex-direction: column;
+
.container-left-header {
height: 45px;
background: #fff;
@@ -70,4 +78,4 @@ onMounted(async () => {
flex: 1;
}
}
-
\ No newline at end of file
+
diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue
index 543c928..e2cba23 100644
--- a/src/renderer/src/components/template-study/container/right.vue
+++ b/src/renderer/src/components/template-study/container/right.vue
@@ -16,7 +16,7 @@
-
+
删除
@@ -104,6 +104,12 @@ import { cloneDeep } from 'lodash'
const props = defineProps(['type'])
const { user } = useUserStore()
+const params = reactive(
+ {
+ prompt: '',
+ dataset_id: ''
+ }
+)
const curMode = ref(2)
const modeOptions = ref([
{
@@ -112,7 +118,8 @@ const modeOptions = ref([
},
{
label: '知识库模型',
- value: 2
+ value: 2,
+ disabled: false
}
])
@@ -288,12 +295,7 @@ const onEdit = (index, item) => {
}
// 重新研读
-const params = reactive(
- {
- prompt: '',
- dataset_id: ''
- }
-)
+
const prompt = ref('')
// 重新研读
@@ -483,7 +485,18 @@ onMounted(() => {
getTemplateList()
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
+
+
params.dataset_id = dataSetJson[jsonKey]
+ if(!params.dataset_id){
+ curMode.value = 1
+ modeOptions.value.forEach(item => {
+ if(item.value == 2){
+ item.disabled = true
+ }
+ })
+ }
+
// 获取百度千帆会话ID
conversation_id.value = localStorage.getItem('conversation_id')
if (!conversation_id.value) {
diff --git a/src/renderer/src/views/teachingDesign/container/center.vue b/src/renderer/src/views/teachingDesign/container/center.vue
index b6472fe..f3efd8b 100644
--- a/src/renderer/src/views/teachingDesign/container/center.vue
+++ b/src/renderer/src/views/teachingDesign/container/center.vue
@@ -22,24 +22,22 @@
-
+
From 5ff9a5387a2a4ee30783b4db54138ab8e23108c6 Mon Sep 17 00:00:00 2001
From: lyc
Date: Wed, 15 Jan 2025 16:07:47 +0800
Subject: [PATCH 22/23] edit
---
.../template-study/container/left-dialog.vue | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/renderer/src/components/template-study/container/left-dialog.vue b/src/renderer/src/components/template-study/container/left-dialog.vue
index e251cc2..678b0ca 100644
--- a/src/renderer/src/components/template-study/container/left-dialog.vue
+++ b/src/renderer/src/components/template-study/container/left-dialog.vue
@@ -8,6 +8,7 @@
+
@@ -51,7 +52,7 @@
-
+
@@ -97,7 +98,7 @@ const props = defineProps({
const isPrev = (item) => {
return computed(() => {
- return ['pdf', 'png', 'jpg', 'jpeg', 'gif'].includes(getFileSuffix(item.fileUrl))
+ return ['pdf', 'png', 'jpg', 'jpeg', 'gif', 'webp'].includes(getFileSuffix(item.fileUrl))
})
}
@@ -135,12 +136,14 @@ const fileList = ref([])
const curFile = reactive({})
const getList = () => {
docList({
- userId: userInfo.userId,
- dataset_id: dataset_id.value
+ createUser: userInfo.userId,
+ datasetId: dataset_id.value
}).then((res) => {
fileList.value = [...res.rows]
- Object.assign(curFile, fileList.value[0])
- curFileId.value = fileList.value[0].id
+ if(res.rows.length){
+ Object.assign(curFile, fileList.value[0])
+ curFileId.value = fileList.value[0].id
+ }
})
}
From 95a80c2b9939f3d095464ac5ebd5f578a674a7eb Mon Sep 17 00:00:00 2001
From: zhangxuelin <959231531@qq.com>
Date: Thu, 16 Jan 2025 15:00:24 +0800
Subject: [PATCH 23/23] =?UTF-8?q?=E6=A1=8C=E9=9D=A2=E4=B8=8D=E5=8F=91?=
=?UTF-8?q?=E6=B6=88=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/renderer/src/AixPPTist/src/api/classcourse.ts | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/renderer/src/AixPPTist/src/api/classcourse.ts b/src/renderer/src/AixPPTist/src/api/classcourse.ts
index c92a6b6..8a4d9a1 100644
--- a/src/renderer/src/AixPPTist/src/api/classcourse.ts
+++ b/src/renderer/src/AixPPTist/src/api/classcourse.ts
@@ -38,12 +38,12 @@ export class Classcourse {
if (isCourse) {
// 连接socket
ChatWs.id = classcourse.timgroupid // 群组id
- if (!ChatWs.ws) {
- ChatWs.init().then(_ => {
- isPublic && ChatWs.sendMsg('open', {id: classcourse.id})
- // isPublic && console.log('socket-开课消息-已发送')
- })
- }
+ // if (!ChatWs.ws) {
+ // ChatWs.init().then(_ => {
+ // isPublic && ChatWs.sendMsg('open', {id: classcourse.id})
+ // // isPublic && console.log('socket-开课消息-已发送')
+ // })
+ // }
this.classcourse = classcourse // 课堂信息
this.id = classcourse.id // 课堂id
// 如果课堂信息有paging,则更新当前页码