From be2afadd43d7db0bf16c4194086f8890f207b85e Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 13 Dec 2024 10:10:36 +0800 Subject: [PATCH 1/3] edit --- .../src/components/template-study/container/right.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue index 2ac4a57..bc06fd4 100644 --- a/src/renderer/src/components/template-study/container/right.vue +++ b/src/renderer/src/components/template-study/container/right.vue @@ -161,7 +161,7 @@ const isStarted = ref([]); const listRef = ref() // 查询模板结果 const getTempResult = () => { - tempResult({ mainModelId: curTemplate.id, pageNum: 1, pageSize: 10000 }).then(res => { + tempResult({ mainModelId: curTemplate.id, pageNum: 1, pageSize: 10000, ex1: curNode.id }).then(res => { let rows = res.rows childTempList.value.forEach(item => { rows.forEach(el => { @@ -309,7 +309,7 @@ const againResult = async (index, item) => { await nextTick() childTempList.value[index].loading = true item.aiShow = true - params.prompt = `按照${item.name}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析` + params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析` const { data } = await completion(params) childTempList.value[index].answer = getResult(data.answer); isStarted.value[index] = true @@ -333,7 +333,7 @@ const getCompletion = async () => { try { item.loading = true item.aiShow = true - params.prompt = `按照${item.name}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析` + params.prompt = `按照${item.prompt}的要求,针对${curNode.edustage}${curNode.edusubject}${modeType.value} 对${curNode.itemtitle}进行教学分析` const { data } = await completion(params) item.answer = getResult(data.answer) onSaveTemp(item) @@ -377,7 +377,8 @@ const onSaveTemp = (item) => { mainModelId: curTemplate.id, modelId: item.id, examDocld: '', - content: item.answer + content: item.answer, + ex1: curNode.id } tempSave(data).then(res => { }) } From b5669a97f1d0bd51d3e2b8024c5654524599a784 Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 13 Dec 2024 10:28:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/template-study/container/right.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue index bc06fd4..95c00a5 100644 --- a/src/renderer/src/components/template-study/container/right.vue +++ b/src/renderer/src/components/template-study/container/right.vue @@ -91,11 +91,12 @@ import keywordDialog from './keyword-dialog.vue'; import AdjustDialog from './adjust-dialog.vue' import EditDialog from './edit-dialog.vue' import TypingEffect from '@/components/typing-effect/index.vue' +import useUserStore from '@/store/modules/user' import emitter from '@/utils/mitt'; import { dataSetJson } from '@/utils/comm.js' const props = defineProps(['curNode', 'type']) - +const { user } = useUserStore() /*****************提示词相关****************/ /** @@ -137,7 +138,7 @@ const curTemplate = reactive({ name: '', id: '' }) const templateList = ref([]) const childTempList = ref([]) const getTemplateList = () => { - modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => { + modelList({ createUser: user.userId, model: props.type, type: 1, pageNum: 1, pageSize: 10000, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => { templateList.value = res.rows if(res.rows.length > 0){ Object.assign(curTemplate, res.rows[0]); From 83d885bcbea9d3a7d7278f73553148e83e5d7134 Mon Sep 17 00:00:00 2001 From: lyc Date: Fri, 13 Dec 2024 10:33:35 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/components/template-study/container/right.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue index 95c00a5..b763a63 100644 --- a/src/renderer/src/components/template-study/container/right.vue +++ b/src/renderer/src/components/template-study/container/right.vue @@ -97,6 +97,7 @@ import { dataSetJson } from '@/utils/comm.js' const props = defineProps(['curNode', 'type']) const { user } = useUserStore() + /*****************提示词相关****************/ /**