From 249e1c047c6552ad60a6e23b000f58698e4fd108 Mon Sep 17 00:00:00 2001 From: zhuhao <979263092@qq.com> Date: Wed, 13 Nov 2024 11:07:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=89=E6=96=B9=E8=B5=84=E6=BA=90=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E5=A4=87=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/renderer/src/api/file/index.js | 7 +++++++ .../views/prepare/container/file-list-item.vue | 16 +++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 83fb360..4a81cfa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aix-win", - "version": "2.1.28", + "version": "2.1.30", "description": "", "main": "./out/main/index.js", "author": "上海交大重庆人工智能研究院", diff --git a/src/renderer/src/api/file/index.js b/src/renderer/src/api/file/index.js index 64cfdfb..7d401d6 100644 --- a/src/renderer/src/api/file/index.js +++ b/src/renderer/src/api/file/index.js @@ -24,6 +24,13 @@ export const getPrepareById = (id) => { }) } +export const addFileToKj = (id) => { + return request({ + url: '/smarttalk/file/addFileToKj/' + id, + method: 'get' + }) +} + export function deleteSmarttalk(id) { return request({ url: '/smarttalk/file/' + id, 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('请输入新的名称', '重命名', {