From 2de27f3d880204b5ca41475026ab0e8675c27828 Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 13 Nov 2024 10:11:36 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/template-study/container/adjust-dialog.vue | 2 +- src/renderer/src/components/template-study/container/result.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 0ed1521..77e2e6c 100644 --- a/src/renderer/src/components/template-study/container/adjust-dialog.vue +++ b/src/renderer/src/components/template-study/container/adjust-dialog.vue @@ -30,7 +30,7 @@
- +
diff --git a/src/renderer/src/components/template-study/container/result.vue b/src/renderer/src/components/template-study/container/result.vue index 160ae6a..1bdd4d3 100644 --- a/src/renderer/src/components/template-study/container/result.vue +++ b/src/renderer/src/components/template-study/container/result.vue @@ -33,7 +33,7 @@
- + From 601e9f023a7de1181872d2469cd53bbcef42766c Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 13 Nov 2024 10:23:56 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/template-study/container/result.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/renderer/src/components/template-study/container/result.vue b/src/renderer/src/components/template-study/container/result.vue index 1bdd4d3..909d36c 100644 --- a/src/renderer/src/components/template-study/container/result.vue +++ b/src/renderer/src/components/template-study/container/result.vue @@ -55,12 +55,6 @@ import { conversation, completion, modelList } from '@/api/mode/index' const userStore = useUserStore() const props = defineProps({ - curTemp: { - type: Array, - default: () => { - return [] - } - }, tempId: { type: [String, Number], default: '' From 3f6f6124b3617d9ff20a807e9faee09f0234b6fa Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 13 Nov 2024 11:22:53 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template-study/container/dialog.vue | 14 +- .../template-study/container/header.vue | 15 +- .../template-study/container/pdf.vue | 1 - .../template-study/container/result.vue | 7 +- .../src/components/template-study/index.vue | 12 +- src/renderer/src/layout/components/Aside.vue | 1 - src/renderer/src/layout/components/Header.vue | 1 - .../container/pdf-template.vue | 28 -- .../container/question-answer.vue | 153 --------- .../container/read-result.vue | 301 ------------------ .../container/read-template.vue | 132 -------- .../src/views/curriculum-standards/index.vue | 182 +---------- src/renderer/src/views/model/index.vue | 2 +- .../src/views/teaching-material/index.vue | 175 +--------- 14 files changed, 38 insertions(+), 986 deletions(-) delete mode 100644 src/renderer/src/views/curriculum-standards/container/pdf-template.vue delete mode 100644 src/renderer/src/views/curriculum-standards/container/question-answer.vue delete mode 100644 src/renderer/src/views/curriculum-standards/container/read-result.vue delete mode 100644 src/renderer/src/views/curriculum-standards/container/read-template.vue diff --git a/src/renderer/src/components/template-study/container/dialog.vue b/src/renderer/src/components/template-study/container/dialog.vue index e1cd782..801158f 100644 --- a/src/renderer/src/components/template-study/container/dialog.vue +++ b/src/renderer/src/components/template-study/container/dialog.vue @@ -1,5 +1,5 @@ diff --git a/src/renderer/src/components/template-study/container/result.vue b/src/renderer/src/components/template-study/container/result.vue index 909d36c..d853dd3 100644 --- a/src/renderer/src/components/template-study/container/result.vue +++ b/src/renderer/src/components/template-study/container/result.vue @@ -59,8 +59,8 @@ const props = defineProps({ type: [String, Number], default: '' }, - model: { - type: [String, Number], + modeType: { + type: Number, default: 1 } }) @@ -70,9 +70,8 @@ const tempLoading = ref(false) const childTempList = ref([]) const getChildTemplate = () => { tempLoading.value = true - modelList({ model: props.model, type: 2, parentId: props.tempId }).then(res => { + modelList({ model: props.modeType, type: 2, parentId: props.tempId }).then(res => { childTempList.value = res.rows - console.log('res.rows=====>', res.rows) }).finally(() => { tempLoading.value = false diff --git a/src/renderer/src/components/template-study/index.vue b/src/renderer/src/components/template-study/index.vue index 37d443e..2963151 100644 --- a/src/renderer/src/components/template-study/index.vue +++ b/src/renderer/src/components/template-study/index.vue @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/src/renderer/src/views/job-management/components/customSelect.vue b/src/renderer/src/views/job-management/components/customSelect.vue index 6d82c16..2a27566 100644 --- a/src/renderer/src/views/job-management/components/customSelect.vue +++ b/src/renderer/src/views/job-management/components/customSelect.vue @@ -21,7 +21,8 @@ \ No newline at end of file From 3d2b102355549377ca5101a9046f2a8fa3aeade9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Wed, 13 Nov 2024 17:07:06 +0800 Subject: [PATCH 6/9] =?UTF-8?q?add=EF=BC=9A=E4=B8=BB=E9=A1=B5=E8=BF=9B?= =?UTF-8?q?=E5=85=A5=E8=AF=A6=E6=83=85=E7=9A=84=E9=A1=B5=E9=9D=A2=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/router/index.js | 16 ++- .../Details/classroomPresentation/index.vue | 5 + .../views/job-management/Details/index.vue | 97 ++++++++++++++++++ .../Details/selfSearchQuestions/index.vue | 5 + .../src/views/job-management/Right/index.vue | 98 ++++++++++++++++--- .../components/customSelect.vue | 1 - .../src/views/job-management/index.vue | 82 ++++++++++------ 7 files changed, 258 insertions(+), 46 deletions(-) create mode 100644 src/renderer/src/views/job-management/Details/classroomPresentation/index.vue create mode 100644 src/renderer/src/views/job-management/Details/index.vue create mode 100644 src/renderer/src/views/job-management/Details/selfSearchQuestions/index.vue diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js index 9a1a89c..97cb925 100644 --- a/src/renderer/src/router/index.js +++ b/src/renderer/src/router/index.js @@ -60,7 +60,21 @@ export const constantRoutes = [ path: 'management', component: () => import('@/views/job-management/index.vue'), name: 'job-management', - meta: { title: '作业管理' } + meta: { title: '作业管理' }, + // children: [ + // { + // path: 'details', + // component: () => import('@/views/job-management/Details/index.vue'), + // name: 'details', + // meta: { title: '详情' } + // }, + // { + // path: 'right', + // component: () => import('@/views/job-management/Right/index.vue'), + // name: 'right', + // meta: { title: '主页' } + // }, + // ] }, ] }, diff --git a/src/renderer/src/views/job-management/Details/classroomPresentation/index.vue b/src/renderer/src/views/job-management/Details/classroomPresentation/index.vue new file mode 100644 index 0000000..40f3699 --- /dev/null +++ b/src/renderer/src/views/job-management/Details/classroomPresentation/index.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/renderer/src/views/job-management/Details/index.vue b/src/renderer/src/views/job-management/Details/index.vue new file mode 100644 index 0000000..94704e2 --- /dev/null +++ b/src/renderer/src/views/job-management/Details/index.vue @@ -0,0 +1,97 @@ + + + \ No newline at end of file diff --git a/src/renderer/src/views/job-management/Details/selfSearchQuestions/index.vue b/src/renderer/src/views/job-management/Details/selfSearchQuestions/index.vue new file mode 100644 index 0000000..f0b5731 --- /dev/null +++ b/src/renderer/src/views/job-management/Details/selfSearchQuestions/index.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/renderer/src/views/job-management/Right/index.vue b/src/renderer/src/views/job-management/Right/index.vue index 4f966cc..95e164f 100644 --- a/src/renderer/src/views/job-management/Right/index.vue +++ b/src/renderer/src/views/job-management/Right/index.vue @@ -12,29 +12,90 @@ - + + @@ -96,12 +157,23 @@ const handleClick = (item) => { text-overflow: ellipsis; word-break: break-all; } -.title-header{ + +.title-header { display: flex; justify-content: space-between; align-items: center; } -.item-bottom{ + +.item-bottom { text-align: right; } + +/* 过渡动画 */ +.fade-enter-active, .fade-leave-active { + transition: opacity 0.3s; +} + +.fade-enter, .fade-leave-to { + opacity: 0; +} \ No newline at end of file diff --git a/src/renderer/src/views/job-management/components/customSelect.vue b/src/renderer/src/views/job-management/components/customSelect.vue index 2a27566..82cec0b 100644 --- a/src/renderer/src/views/job-management/components/customSelect.vue +++ b/src/renderer/src/views/job-management/components/customSelect.vue @@ -46,7 +46,6 @@ const toggleDropup = () => { }; const selectOption = (option) => { - selectedOption.value = option; isDropdownOpen.value = false; emits('select-click', option) }; diff --git a/src/renderer/src/views/job-management/index.vue b/src/renderer/src/views/job-management/index.vue index 0fed1bb..f72e1f1 100644 --- a/src/renderer/src/views/job-management/index.vue +++ b/src/renderer/src/views/job-management/index.vue @@ -1,36 +1,37 @@ - + - + \ No newline at end of file From 39efd18bc616d030b707d297fb44fe49879cd331 Mon Sep 17 00:00:00 2001 From: lyc Date: Wed, 13 Nov 2024 17:30:15 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../container/keyword-dialog.vue | 0 .../template-study/container/result.vue | 77 ++++++++++++++----- 2 files changed, 56 insertions(+), 21 deletions(-) create mode 100644 src/renderer/src/components/template-study/container/keyword-dialog.vue diff --git a/src/renderer/src/components/template-study/container/keyword-dialog.vue b/src/renderer/src/components/template-study/container/keyword-dialog.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/renderer/src/components/template-study/container/result.vue b/src/renderer/src/components/template-study/container/result.vue index d853dd3..716b730 100644 --- a/src/renderer/src/components/template-study/container/result.vue +++ b/src/renderer/src/components/template-study/container/result.vue @@ -3,10 +3,24 @@
- +
-
#{{ item.name }}
+
+
+ #{{ item.name }} +
+ + + + +
{{ item.prompt }}
@@ -37,9 +51,9 @@
- + - +
@@ -102,10 +116,10 @@ const params = reactive( ) const curNode = reactive({}) const getConversation = async () => { - + const { user: { userId } } = userStore const result = await conversation({ user_id: String(userId) }) - console.log('result',result) + console.log('result', result) params.conversation_id = result.data.data.id getCompletion() } @@ -120,7 +134,7 @@ const getCompletion = async () => { let answer = res.data.data.answer item.oldAnswer = answer item.answer = getResult(answer); - + } finally { item.loading = false } @@ -129,15 +143,15 @@ const getCompletion = async () => { // 重新研读 -const againResult = async (index,item) =>{ - try{ +const againResult = async (index, item) => { + try { childTempList.value[index].loading = true params.messages[0].content = `根据${curNode.edustage}语文课标,提炼出${item.name}` const res = await completion(params) let answer = res.data.data.answer item.oldAnswer = answer item.answer = getResult(answer); - }finally { + } finally { childTempList.value[index].loading = false } } @@ -155,26 +169,26 @@ let getResult = (text) => { // 编辑 const curIndex = ref(-1) const editItem = reactive({}) -const onEdit = (index,item) =>{ +const onEdit = (index, item) => { curIndex.value = index Object.assign(editItem, item) isEdit.value = true } // 保存编辑 -const saveEdit = (data) =>{ +const saveEdit = (data) => { childTempList.value[curIndex.value].oldAnswer = data let answer = getResult(data); childTempList.value[curIndex.value].answer = answer } const isAdjust = ref(false) -const onAdjust = (index, item) =>{ +const onAdjust = (index, item) => { curIndex.value = index Object.assign(editItem, item) isAdjust.value = true } -const saveAdjust = (item) =>{ +const saveAdjust = (item) => { childTempList.value[curIndex.value].oldAnswer = item let answer = getResult(item); childTempList.value[curIndex.value].answer = answer @@ -249,6 +263,7 @@ defineExpose({ font-size: 16px; font-weight: bold; color: #000; + justify-content: space-between; .blue { font-size: 22px; @@ -290,20 +305,25 @@ defineExpose({ } } - .text-answer{ + + .text-answer { color: #409eff; } - .ai-btn{ + + .ai-btn { margin-top: 10px; display: flex; justify-content: flex-end; - .iconfont{ + + .iconfont { margin-right: 3px; } - :deep(.el-button){ + + :deep(.el-button) { font-size: 13px; } - .icon-ai1{ + + .icon-ai1 { font-size: 18px; } } @@ -382,8 +402,23 @@ defineExpose({ } } - +.icon-shenglvehao{ + font-weight: bold; + font-size: 22px; +} +:deep(.el-popover) { + min-width: 50px; + width: 50px !important; +} .pl-25 { padding-left: 25px; } - \ No newline at end of file + + + + From 27017fc9466b0e67a2c22652b3cc14ff48e2cdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Thu, 14 Nov 2024 09:51:13 +0800 Subject: [PATCH 8/9] =?UTF-8?q?fix=EF=BC=9A=E9=83=A8=E5=88=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BC=98=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/job-management/Details/index.vue | 1 - .../src/views/job-management/Right/index.vue | 12 +++++++++--- src/renderer/src/views/job-management/index.vue | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/views/job-management/Details/index.vue b/src/renderer/src/views/job-management/Details/index.vue index 94704e2..696f090 100644 --- a/src/renderer/src/views/job-management/Details/index.vue +++ b/src/renderer/src/views/job-management/Details/index.vue @@ -92,6 +92,5 @@ onMounted(() => { background-color: #fff; padding:5px; border-radius: 4px; - overflow-y: auto; } \ No newline at end of file diff --git a/src/renderer/src/views/job-management/Right/index.vue b/src/renderer/src/views/job-management/Right/index.vue index 95e164f..be8ef4f 100644 --- a/src/renderer/src/views/job-management/Right/index.vue +++ b/src/renderer/src/views/job-management/Right/index.vue @@ -1,5 +1,6 @@ @@ -100,12 +102,16 @@ const handleClick = (item) => { \ No newline at end of file From 18495d081176381b47de42b4c4e72e68e20a9c66 Mon Sep 17 00:00:00 2001 From: lyc Date: Thu, 14 Nov 2024 11:17:52 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E8=AF=8D=20dialog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template-study/container/header.vue | 53 ++------------ .../container/keyword-dialog.vue | 72 +++++++++++++++++++ .../template-study/container/result.vue | 17 ++++- 3 files changed, 90 insertions(+), 52 deletions(-) diff --git a/src/renderer/src/components/template-study/container/header.vue b/src/renderer/src/components/template-study/container/header.vue index 1b9baba..12f42ab 100644 --- a/src/renderer/src/components/template-study/container/header.vue +++ b/src/renderer/src/components/template-study/container/header.vue @@ -20,7 +20,7 @@
- + @@ -31,35 +31,7 @@
- - -
- - - - - - - - - - - -
- -
+ @@ -69,8 +41,9 @@ import { Plus } from '@element-plus/icons-vue' import { ElMessageBox } from 'element-plus' import { modelList } from '@/api/mode/index' import Dialog from './dialog.vue' +import keywordDialog from './keyword-dialog.vue' -const keywordDialog = ref(false) +const wordDialog = ref(false) const props = defineProps({ type: { type: Number, @@ -120,13 +93,6 @@ const changeTemplate = (val) => { }) } - -const form = reactive({ - name: '', - desc: '', -}) - - onMounted(() => { getTemplateList() }) @@ -143,8 +109,6 @@ onMounted(() => { width: 50%; align-items: center; padding-left: 20px; - - } .header-right { @@ -160,13 +124,4 @@ onMounted(() => { } } -.custom-header { - justify-content: space-between; - align-items: center; - - .icon-guanbi { - cursor: pointer; - 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 e69de29..7ce82f2 100644 --- a/src/renderer/src/components/template-study/container/keyword-dialog.vue +++ b/src/renderer/src/components/template-study/container/keyword-dialog.vue @@ -0,0 +1,72 @@ + + + + + \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/result.vue b/src/renderer/src/components/template-study/container/result.vue index 716b730..5805a87 100644 --- a/src/renderer/src/components/template-study/container/result.vue +++ b/src/renderer/src/components/template-study/container/result.vue @@ -16,7 +16,7 @@ @@ -54,6 +54,8 @@ + + @@ -61,6 +63,7 @@ import { ref, reactive, onMounted, watch } from 'vue'; import EditDialog from './edit-dialog.vue' import AdjustDialog from './adjust-dialog.vue' +import keywordDialog from './keyword-dialog.vue'; import { sessionStore } from '@/utils/store' import useUserStore from '@/store/modules/user' import { conversation, completion, modelList } from '@/api/mode/index' @@ -194,10 +197,19 @@ const saveAdjust = (item) => { childTempList.value[curIndex.value].answer = answer } +// 编辑提示词 +const keywordItem = reactive({}) +const isEditKeyWord = ref(false) +const editKeyWord = (item) =>{ + isEditKeyWord.value = true + Object.assign(keywordItem, item) +} + + + onMounted(() => { let data = sessionStore.get('subject.curNode') Object.assign(curNode, data); - }) defineExpose({ @@ -414,7 +426,6 @@ defineExpose({ padding-left: 25px; } -