diff --git a/src/renderer/src/api/mode/index.js b/src/renderer/src/api/mode/index.js index 3f2288a..a53a36f 100644 --- a/src/renderer/src/api/mode/index.js +++ b/src/renderer/src/api/mode/index.js @@ -59,7 +59,7 @@ export function editChildTemp(data) { // 删除子模板 export function removeChildTemp(id) { return request({ - url: '/education/llmModel/' + id, + url: '/education/llmModel/home/' + id, method: 'delete' }) } @@ -100,10 +100,3 @@ export function tempResult(params) { }) } -// 删除模板结果 -export function tempResultRemove(id) { - return request({ - url: `/education/result/${id}`, - method: 'get', - }) -} \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/header.vue b/src/renderer/src/components/template-study/container/header.vue index 94af579..219db88 100644 --- a/src/renderer/src/components/template-study/container/header.vue +++ b/src/renderer/src/components/template-study/container/header.vue @@ -32,7 +32,7 @@ - + @@ -43,6 +43,8 @@ import { ElMessageBox } from 'element-plus' import { modelList } from '@/api/mode/index' import Dialog from './dialog.vue' import keywordDialog from './keyword-dialog.vue' +import emitter from '@/utils/mitt'; + const wordDialog = ref(false) const props = defineProps({ @@ -53,7 +55,7 @@ const props = defineProps({ }) watch(() => props.type, (newValue) => { console.log(newValue, 'newValue2'); -}, { immediate: true }); +}, { immediate: true }); const emit = defineEmits(['changeTemp', 'onRead']) @@ -70,7 +72,7 @@ const curTemplate = reactive({ name: '', id: '' }) const templateList = ref([]) // 获取模板列表 const getTemplateList = () => { - modelList({ model: props.type, type: 1 }).then(res => { + modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000 }).then(res => { templateList.value = res.rows Object.assign(curTemplate, res.rows[0]); emit('changeTemp', res.rows[0].id) @@ -94,11 +96,18 @@ const changeTemplate = (val) => { }) } -const onAdd = () =>{ - wordDialog.value = true +emitter.on('onGetMain', () =>{ + getTemplateList() +}) +const onAdd = () => { + wordDialog.value = true } +onUnmounted(() => { + emitter.off('onGetMain') +}) + onMounted(() => { getTemplateList() }) @@ -129,5 +138,4 @@ onMounted(() => { font-weight: bold; } } - \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/keyword-dialog.vue b/src/renderer/src/components/template-study/container/keyword-dialog.vue index 01330b6..4821d6e 100644 --- a/src/renderer/src/components/template-study/container/keyword-dialog.vue +++ b/src/renderer/src/components/template-study/container/keyword-dialog.vue @@ -2,18 +2,18 @@
-

*当前模板为系统预设,不支持直接操作。会复制一份为自己的然后再操作

+

*当前模板为系统预设,不支持直接操作。需要复制一份为自己的然后再操作

- + @@ -33,10 +33,9 @@