From cbc12a3d4379445cd87676ca550793d4bf89c6be Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 11 Dec 2024 15:07:25 +0800 Subject: [PATCH] =?UTF-8?q?edit=20=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template-study/container/right.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/components/template-study/container/right.vue b/src/renderer/src/components/template-study/container/right.vue index 8bc77e1..2ac4a57 100644 --- a/src/renderer/src/components/template-study/container/right.vue +++ b/src/renderer/src/components/template-study/container/right.vue @@ -15,10 +15,10 @@
- + 删除 - + 添加提示词 @@ -137,15 +137,17 @@ const curTemplate = reactive({ name: '', id: '' }) const templateList = ref([]) const childTempList = ref([]) const getTemplateList = () => { - modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000 }).then(res => { + modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => { templateList.value = res.rows - Object.assign(curTemplate, res.rows[0]); - getChildTemplate() + if(res.rows.length > 0){ + Object.assign(curTemplate, res.rows[0]); + getChildTemplate() + } }) } const getChildTemplate = () => { tempLoading.value = true - modelList({ model: props.type, type: 2, parentId: curTemplate.id }).then(res => { + modelList({ model: props.type, type: 2, parentId: curTemplate.id, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => { childTempList.value = res.rows if(childTempList.value.length){ childTempList.value.forEach(item => item.answer = '') @@ -398,9 +400,9 @@ emitter.on('onGetMain', () => { const curNode = reactive({}) onMounted(() => { - getTemplateList() let data = sessionStore.get('subject.curNode') Object.assign(curNode, data); + getTemplateList() let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}` params.dataset_id = dataSetJson[jsonKey] })