大模型首页

This commit is contained in:
朱浩 2024-12-11 11:11:47 +08:00
parent 7f595c09a9
commit 48d631a17c
1 changed files with 52 additions and 36 deletions

View File

@ -24,7 +24,7 @@
<kj-list-item
v-for="(item, index) in currentFileList"
:key="index"
:ref="'kjItemRef'+item.id"
:ref="collectRef('kjItemRef'+item.id)"
:item="item"
:show-tool="false"
:index="index"
@ -48,9 +48,9 @@
<div class="content-body-right">
<div class="content-body-right-title">模型辅助工具</div>
<div class="content-body-right-body">
<div class="content-body-right-item" v-for="(item,index) in tools" :key="index">
<div class="content-body-right-item" v-for="(item,index) in tools" :key="index" @click="gotoRoute(item)">
<div class="content-body-right-item-img">
<img :src="item.img" />
<FileImage :fileName="item.img"/>
</div>
<div class="content-body-right-item-text">{{item.name}}</div>
</div>
@ -62,7 +62,7 @@
</template>
<script setup>
import { onMounted, reactive, ref } from 'vue'
import { onMounted, reactive, ref, nextTick } from 'vue'
import { useRouter } from 'vue-router'
import useUserStore from '@/store/modules/user' //
//
@ -76,15 +76,18 @@ import { dataSetJson } from '@/utils/comm' // 数据集id文生图
import { sessionStore } from '@/utils/store'
import {listEntpcourse} from "@/api/teaching/classwork";
import {addEntpcoursefileReturnId, getEntpcoursefile} from "@/api/education/entpcoursefile";
import MsgEnum from "@/plugins/imChat/msgEnum";
import {updateClasscourse} from "@/api/teaching/classcourse";
import {useToolState} from "@/store/modules/tool";
import {createWindow, ipcMsgSend} from "@/utils/tool";
import {endClass} from "@/api/classManage";
import {ElMessage} from "element-plus"; //
const router = useRouter()
const userStore = useUserStore().user //
const currentNode = ref({})
const refs = ref([]);
const collectRef = (key) => {
return (el) => {
refs.value[key] = el;
};
};
const tags = reactive([{
name: '课标分析',
@ -114,24 +117,24 @@ const tags = reactive([{
const tools = reactive([{
name: '数字人生成',
path: '/',
img: '../../src/assets/images/ai-04.png'
path: '',
img: 'airobot'
},{
name: '语音生成',
path: '/',
img: '../../src/assets/images/ai-04.png'
path: '',
img: 'aiyuyin'
},{
name: '文生图片',
path: '/',
img: '../../src/assets/images/ai-04.png'
path: '/model/aiKolors',
img: 'aiimg'
},{
name: '文生连环画',
path: '/',
img: '../../src/assets/images/ai-04.png'
path: '',
img: 'aidraw'
},{
name: '视频生成',
path: '/',
img: '../../src/assets/images/ai-04.png'
path: '',
img: 'aivideo'
}])
const uploadData = ref({
@ -146,6 +149,16 @@ const currentFileList = ref([])
onMounted(() => {
})
const gotoRoute = (item) => {
if (item.path) {
if (item.path === '/model/aiKolors') {
gotoAiKolors(item.path)
}else {
router.push(item.path)
}
}
}
const createAIPPT = () => {
console.log(userStore)
listEntpcourse({
@ -189,11 +202,10 @@ const createAIPPT = () => {
fileId: slideid,
fileFlag: 'aippt',
fileShowName: currentNode.value.itemtitle + '.aippt'
}).then((res) => {
}).then(async (res) => {
currentFileList.value.unshift(res.resData)
setTimeout(()=>{
ref('kjItemRef'+res.resData.id)[0].openFileWin(res.resData);
},500)
await nextTick();
refs.value['kjItemRef'+res.resData.id].openFileWin(res.resData);
})
})
})
@ -230,6 +242,13 @@ const onchange = (item) => {
//
router.push({ path, query: { courseObj: JSON.stringify(courseObj) } })
} else if (path == '/model/aiKolors') {
gotoAiKolors(path)
} else {
router.push(path)
}
}
const gotoAiKolors = (path)=> {
// ai
let subjectdata = sessionStore.get('subject.curNode')
let datasubject = `课标-${subjectdata.edustage}-${subjectdata.edusubject}`
@ -244,9 +263,6 @@ const onchange = (item) => {
textbookId: subjectdata.rootid,
}
});
} else {
router.push(path)
}
}
const changeClass = async (type, row, other) => {