diff --git a/src/renderer/src/api/file/index.js b/src/renderer/src/api/file/index.js index 64cfdfb..25c7e76 100644 --- a/src/renderer/src/api/file/index.js +++ b/src/renderer/src/api/file/index.js @@ -64,3 +64,10 @@ export const addFileToPrepareThird = (data) => { data }) } + +export const addFileToKj = (id) => { + return request({ + url: '/smarttalk/file/addFileToKj/' + id, + method: 'get' + }) +} 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/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 @@ + + \ No newline at end of file diff --git a/src/renderer/src/components/template-study/container/pdf.vue b/src/renderer/src/components/template-study/container/pdf.vue index 26f1ea9..c83dfd0 100644 --- a/src/renderer/src/components/template-study/container/pdf.vue +++ b/src/renderer/src/components/template-study/container/pdf.vue @@ -16,7 +16,6 @@ onMounted(async () =>{ await nextTick() const { fileurl } = sessionStore.get('subject.curBook') pdfUrl.value = import.meta.env.VITE_APP_RES_FILE_PATH + fileurl.replace('.txt','.pdf') - console.log('pdfUrl.value', pdfUrl.value) }) diff --git a/src/renderer/src/components/template-study/container/result.vue b/src/renderer/src/components/template-study/container/result.vue index 160ae6a..5805a87 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 }}
@@ -33,13 +47,15 @@
- +
- + - + + +
@@ -47,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' @@ -55,18 +72,12 @@ import { conversation, completion, modelList } from '@/api/mode/index' const userStore = useUserStore() const props = defineProps({ - curTemp: { - type: Array, - default: () => { - return [] - } - }, tempId: { type: [String, Number], default: '' }, - model: { - type: [String, Number], + modeType: { + type: Number, default: 1 } }) @@ -76,9 +87,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 @@ -109,10 +119,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() } @@ -127,7 +137,7 @@ const getCompletion = async () => { let answer = res.data.data.answer item.oldAnswer = answer item.answer = getResult(answer); - + } finally { item.loading = false } @@ -136,15 +146,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 } } @@ -162,35 +172,44 @@ 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 } +// 编辑提示词 +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({ @@ -256,6 +275,7 @@ defineExpose({ font-size: 16px; font-weight: bold; color: #000; + justify-content: space-between; .blue { font-size: 22px; @@ -297,20 +317,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; } } @@ -389,8 +414,22 @@ 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 + + + 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..82cec0b 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 diff --git a/src/renderer/src/views/model/index.vue b/src/renderer/src/views/model/index.vue index fe64262..0bc7793 100644 --- a/src/renderer/src/views/model/index.vue +++ b/src/renderer/src/views/model/index.vue @@ -3,7 +3,7 @@
课标研读 作业管理 - + 教材研读
diff --git a/src/renderer/src/views/prepare/container/file-list-item.vue b/src/renderer/src/views/prepare/container/file-list-item.vue index eeb77d0..8d9bc5f 100644 --- a/src/renderer/src/views/prepare/container/file-list-item.vue +++ b/src/renderer/src/views/prepare/container/file-list-item.vue @@ -126,6 +126,12 @@ 下载 +
+ + + 加入课件 + +
@@ -153,7 +159,7 @@ import FileImage from '@/components/file-image/index.vue' import { asyncLocalFile } from '@/utils/talkFile' import { toTimeText } from '@/utils/date' import { ElMessage, ElMessageBox } from 'element-plus' -import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file' +import { deleteSmarttalk, updateSmarttalk, getPrepareById, addFileToKj } from '@/api/file' import useUserStore from '@/store/modules/user' import outLink from '@/utils/linkConfig' @@ -183,6 +189,14 @@ export default { } }, methods: { + adToKj(item) { + addFileToKj(item.id).then(res=>{ + console.log(res) + item.fileFlag = "课件" + },error=>{ + console.log(error) + }) + }, editTalk(item) { console.log(item,this.userInfo,'this.userInfo') ElMessageBox.prompt('请输入新的名称', '重命名', { diff --git a/src/renderer/src/views/prepare/index.vue b/src/renderer/src/views/prepare/index.vue index a6960a6..4984483 100644 --- a/src/renderer/src/views/prepare/index.vue +++ b/src/renderer/src/views/prepare/index.vue @@ -538,7 +538,7 @@ export default { } }, clickChoose(value) { - this.checkFileList = value ? this.currentFileList : [] + this.checkFileList = value ? this.currentSCFileList : [] }, deleteTalk(item) { let index = this.currentFileList.indexOf(item) diff --git a/src/renderer/src/views/teaching-material/index.vue b/src/renderer/src/views/teaching-material/index.vue index ba787fb..f722d32 100644 --- a/src/renderer/src/views/teaching-material/index.vue +++ b/src/renderer/src/views/teaching-material/index.vue @@ -1,178 +1,11 @@ - - \ No newline at end of file + \ No newline at end of file