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