diff --git a/src/renderer/src/api/education/entpCourseWork.js b/src/renderer/src/api/education/entpCourseWork.js index 0ba694c..04582ba 100644 --- a/src/renderer/src/api/education/entpCourseWork.js +++ b/src/renderer/src/api/education/entpCourseWork.js @@ -108,4 +108,21 @@ export function pyOCRAPI(path) { imageBas64: path, } }) +} + + +/** + * @desc: 菁优网转发 + * @return: {*} + * @param {*} url + * @param {*} config + */ +export function getJYPath(url,config) { + config.params = config.params?config.params:{} + config.params["getjypath"] = url; + return request({ + url: "/jy/proxy", + method: config.method||"get", + params: config.params + }) } \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/adjust-dialog.vue b/src/renderer/src/components/template-study/container/adjust-dialog.vue index ef4d910..fb3cce1 100644 --- a/src/renderer/src/components/template-study/container/adjust-dialog.vue +++ b/src/renderer/src/components/template-study/container/adjust-dialog.vue @@ -45,6 +45,7 @@ import { conversation, completion } from '@/api/mode/index' import { sessionStore } from '@/utils/store' import { ElMessage } from 'element-plus' import { dataSetJson } from '@/utils/comm.js' +import emitter from '@/utils/mitt'; const textarea = ref('') @@ -109,13 +110,16 @@ const getCompletion = async (val) => { } const saveAdjust = (item) =>{ - emit('saveAdjust', item.msg) + isDialog.value = false ElMessage.success('操作成功') + emitter.on('saveAdjust', item.msg) + } onMounted(() => { let data = sessionStore.get('subject.curNode') + Object.assign(curNode, data); let text = props.modeType == 1||props.modeType == 2 ? '课标' : '考试' let jsonKey = `${text}-${data.edustage}-${data.edusubject}` diff --git a/src/renderer/src/components/template-study/container/edit-dialog.vue b/src/renderer/src/components/template-study/container/edit-dialog.vue index fa7ff5d..97dda43 100644 --- a/src/renderer/src/components/template-study/container/edit-dialog.vue +++ b/src/renderer/src/components/template-study/container/edit-dialog.vue @@ -29,6 +29,7 @@ import { ref, watch} from 'vue' import { ElMessage } from 'element-plus' import { editTempResult } from '@/api/mode/index.js' +import emitter from '@/utils/mitt'; const textarea = ref('') @@ -49,12 +50,12 @@ watch(() => props.item.answer, (newVal) => { } },{ deep: true }) -const emit = defineEmits(['saveEdit']) + const onSave = () =>{ editTempResult({id: props.item.reultId, content: textarea.value}).then( res =>{ isDialog.value = false ElMessage.success('操作成功') - emit('saveEdit', textarea.value) + emitter.emit('onGetChild', textarea.value) }) } diff --git a/src/renderer/src/components/template-study/container/header.vue b/src/renderer/src/components/template-study/container/header.vue deleted file mode 100644 index b6b368b..0000000 --- a/src/renderer/src/components/template-study/container/header.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - \ 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 4821d6e..a9888ed 100644 --- a/src/renderer/src/components/template-study/container/keyword-dialog.vue +++ b/src/renderer/src/components/template-study/container/keyword-dialog.vue @@ -1,5 +1,5 @@