Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk_WS into zdg_dev
This commit is contained in:
commit
8990ffdc58
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import 'animate.css'
|
||||||
import { ref, onMounted, watch, onBeforeMount } from 'vue'
|
import { ref, onMounted, watch, onBeforeMount } from 'vue'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { useScreenStore, useMainStore, useSnapshotStore, useSlidesStore } from './store'
|
import { useScreenStore, useMainStore, useSnapshotStore, useSlidesStore } from './store'
|
||||||
|
|
|
@ -30,7 +30,7 @@ let params = {
|
||||||
levelSecondId: null,
|
levelSecondId: null,
|
||||||
fileSource: '个人',
|
fileSource: '个人',
|
||||||
fileRoot: '备课',
|
fileRoot: '备课',
|
||||||
orderByColumn: 'uploadTime',
|
orderByColumn: 'createTime',
|
||||||
isAsc: 'desc',
|
isAsc: 'desc',
|
||||||
pageSize: 500
|
pageSize: 500
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,6 @@ const runAnimation = (elId: string, effect: string, duration: number) => {
|
||||||
const animationName = `${ANIMATION_CLASS_PREFIX}${effect}`
|
const animationName = `${ANIMATION_CLASS_PREFIX}${effect}`
|
||||||
document.documentElement.style.setProperty('--animate-duration', `${duration}ms`)
|
document.documentElement.style.setProperty('--animate-duration', `${duration}ms`)
|
||||||
elRef.classList.add(`${ANIMATION_CLASS_PREFIX}animated`, animationName)
|
elRef.classList.add(`${ANIMATION_CLASS_PREFIX}animated`, animationName)
|
||||||
|
|
||||||
const handleAnimationEnd = () => {
|
const handleAnimationEnd = () => {
|
||||||
document.documentElement.style.removeProperty('--animate-duration')
|
document.documentElement.style.removeProperty('--animate-duration')
|
||||||
elRef.classList.remove(`${ANIMATION_CLASS_PREFIX}animated`, animationName)
|
elRef.classList.remove(`${ANIMATION_CLASS_PREFIX}animated`, animationName)
|
||||||
|
|
|
@ -34,7 +34,10 @@
|
||||||
<IconLeftTwo class="tool-btn" theme="two-tone" :fill="['#111', '#fff']" @click="execPrev()" />
|
<IconLeftTwo class="tool-btn" theme="two-tone" :fill="['#111', '#fff']" @click="execPrev()" />
|
||||||
<IconRightTwo class="tool-btn" theme="two-tone" :fill="['#111', '#fff']" @click="execNext()" />
|
<IconRightTwo class="tool-btn" theme="two-tone" :fill="['#111', '#fff']" @click="execNext()" />
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 点赞组件 -->
|
||||||
|
<div style="z-index: 999;position: absolute;top:10px">
|
||||||
|
<upvote-vue ref="upvoteRef" :test='true' type="2"></upvote-vue>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="tools-right" :class="{ 'visible': rightToolsVisible }"
|
class="tools-right" :class="{ 'visible': rightToolsVisible }"
|
||||||
@mouseleave="rightToolsVisible = false"
|
@mouseleave="rightToolsVisible = false"
|
||||||
|
@ -69,7 +72,7 @@ import ScreenSlideList from './ScreenSlideList.vue'
|
||||||
import SlideThumbnails from './SlideThumbnails.vue'
|
import SlideThumbnails from './SlideThumbnails.vue'
|
||||||
import WritingBoardTool from './WritingBoardTool.vue'
|
import WritingBoardTool from './WritingBoardTool.vue'
|
||||||
import CountdownTimer from './CountdownTimer.vue'
|
import CountdownTimer from './CountdownTimer.vue'
|
||||||
|
import upvoteVue from '@/views/tool/components/upvote.vue' // 点赞-子组件
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
changeViewMode: (mode: 'base' | 'presenter') => void
|
changeViewMode: (mode: 'base' | 'presenter') => void
|
||||||
}>()
|
}>()
|
||||||
|
|
|
@ -35,7 +35,7 @@ const getFileTypeIcon = () => {
|
||||||
txt: 'icon-txt',
|
txt: 'icon-txt',
|
||||||
rar: 'icon-rar',
|
rar: 'icon-rar',
|
||||||
apt: 'icon-A',
|
apt: 'icon-A',
|
||||||
aippt: 'icon-A',
|
aippt: 'icon-a-ziyuan91',
|
||||||
aiyuyin: 'icon-yuyin', // 语音生成
|
aiyuyin: 'icon-yuyin', // 语音生成
|
||||||
aivideo: 'icon-dianying', // 视频生成
|
aivideo: 'icon-dianying', // 视频生成
|
||||||
airobot: 'icon-jiqirenfushi', // 数字人生成
|
airobot: 'icon-jiqirenfushi', // 数字人生成
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="danger" link @click="removeItem(curTemplate, false)">
|
<el-button type="danger" link :disabled="!(templateList.length)" @click="removeItem(curTemplate, false)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" link @click="onAdd">
|
<el-button type="primary" link :disabled="!(templateList.length)" @click="onAdd">
|
||||||
<i class="iconfont icon-jiahao"></i>
|
<i class="iconfont icon-jiahao"></i>
|
||||||
添加提示词
|
添加提示词
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -137,15 +137,17 @@ const curTemplate = reactive({ name: '', id: '' })
|
||||||
const templateList = ref([])
|
const templateList = ref([])
|
||||||
const childTempList = ref([])
|
const childTempList = ref([])
|
||||||
const getTemplateList = () => {
|
const getTemplateList = () => {
|
||||||
modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000 }).then(res => {
|
modelList({ model: props.type, type: 1, pageNum: 1, pageSize: 10000, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => {
|
||||||
templateList.value = res.rows
|
templateList.value = res.rows
|
||||||
|
if(res.rows.length > 0){
|
||||||
Object.assign(curTemplate, res.rows[0]);
|
Object.assign(curTemplate, res.rows[0]);
|
||||||
getChildTemplate()
|
getChildTemplate()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getChildTemplate = () => {
|
const getChildTemplate = () => {
|
||||||
tempLoading.value = true
|
tempLoading.value = true
|
||||||
modelList({ model: props.type, type: 2, parentId: curTemplate.id }).then(res => {
|
modelList({ model: props.type, type: 2, parentId: curTemplate.id, ex1: curNode.edustage, ex2: curNode.edusubject }).then(res => {
|
||||||
childTempList.value = res.rows
|
childTempList.value = res.rows
|
||||||
if(childTempList.value.length){
|
if(childTempList.value.length){
|
||||||
childTempList.value.forEach(item => item.answer = '')
|
childTempList.value.forEach(item => item.answer = '')
|
||||||
|
@ -398,9 +400,9 @@ emitter.on('onGetMain', () => {
|
||||||
|
|
||||||
const curNode = reactive({})
|
const curNode = reactive({})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getTemplateList()
|
|
||||||
let data = sessionStore.get('subject.curNode')
|
let data = sessionStore.get('subject.curNode')
|
||||||
Object.assign(curNode, data);
|
Object.assign(curNode, data);
|
||||||
|
getTemplateList()
|
||||||
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
|
let jsonKey = `${modeType.value}-${data.edustage}-${data.edusubject}`
|
||||||
params.dataset_id = dataSetJson[jsonKey]
|
params.dataset_id = dataSetJson[jsonKey]
|
||||||
})
|
})
|
||||||
|
|
|
@ -93,6 +93,12 @@ const headerMenus = [
|
||||||
icon: 'icon-jiaoxueshijian',
|
icon: 'icon-jiaoxueshijian',
|
||||||
path: '/prepare'
|
path: '/prepare'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '教学活动',
|
||||||
|
id: 5,
|
||||||
|
icon: 'icon-zuoyepigai',
|
||||||
|
path: '/classTask'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: '资源中心',
|
name: '资源中心',
|
||||||
id: 3,
|
id: 3,
|
||||||
|
|
|
@ -44,9 +44,9 @@ const breadList = ref([])
|
||||||
watch(
|
watch(
|
||||||
() => router.currentRoute.value,
|
() => router.currentRoute.value,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
let path = newValue.path
|
console.log(newValue)
|
||||||
|
const { showBread } = newValue.meta
|
||||||
if (path.includes('/model') && path !== ('/model/index')) {
|
if (showBread) {
|
||||||
isShowBack.value = true
|
isShowBack.value = true
|
||||||
breadList.value = newValue.matched.map(item => item.meta)
|
breadList.value = newValue.matched.map(item => item.meta)
|
||||||
let data = sessionStore.get('subject.curNode')
|
let data = sessionStore.get('subject.curNode')
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<el-header>
|
<el-header>
|
||||||
<Header/>
|
<Header/>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main :style="{ 'padding-top' : isShowBread ? 0 : '20px'}">
|
<el-main style="padding-top : 20px">
|
||||||
<template v-if="isShowBread">
|
<!-- <template v-if="isShowBread">
|
||||||
<div class="bread-row">
|
<div class="bread-row">
|
||||||
<div class="back" @click="onBack">
|
<div class="back" @click="onBack">
|
||||||
<i class="iconfont icon-fanhui"></i>
|
<i class="iconfont icon-fanhui"></i>
|
||||||
|
@ -19,8 +19,8 @@
|
||||||
<el-breadcrumb-item v-for="item in breadList"> {{ item.title }} </el-breadcrumb-item>
|
<el-breadcrumb-item v-for="item in breadList"> {{ item.title }} </el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template> -->
|
||||||
<AppMain :style="{ height: isShowBread ? 'calc(100% - 45px)' : '100%' }" />
|
<AppMain />
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<Uploader v-if="uploaderStore.uploadList && uploaderStore.uploadList.length > 0" />
|
<Uploader v-if="uploaderStore.uploadList && uploaderStore.uploadList.length > 0" />
|
||||||
|
|
|
@ -47,19 +47,19 @@ export const constantRoutes = [
|
||||||
path: 'curriculum',
|
path: 'curriculum',
|
||||||
component: () => import('@/views/curriculum-standards/index.vue'),
|
component: () => import('@/views/curriculum-standards/index.vue'),
|
||||||
name: 'curriculum-standard',
|
name: 'curriculum-standard',
|
||||||
meta: { title: '课标研读' }
|
meta: { title: '课标研读', showBread: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'teaching',
|
path: 'teaching',
|
||||||
component: () => import('@/views/teaching-material/index.vue'),
|
component: () => import('@/views/teaching-material/index.vue'),
|
||||||
name: 'teaching-material',
|
name: 'teaching-material',
|
||||||
meta: { title: '教材研读' }
|
meta: { title: '教材研读', showBread: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'examination',
|
path: 'examination',
|
||||||
component: () => import('@/views/examination-analysis/index.vue'),
|
component: () => import('@/views/examination-analysis/index.vue'),
|
||||||
name: 'examination-analysis',
|
name: 'examination-analysis',
|
||||||
meta: { title: '考试分析' }
|
meta: { title: '考试分析', showBread: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'management',
|
path: 'management',
|
||||||
|
@ -71,13 +71,13 @@ export const constantRoutes = [
|
||||||
path: 'design',
|
path: 'design',
|
||||||
component: () => import('@/views/teachingDesign/index.vue'),
|
component: () => import('@/views/teachingDesign/index.vue'),
|
||||||
name: 'teaching-design',
|
name: 'teaching-design',
|
||||||
meta: { title: '教学框架设计' },
|
meta: { title: '教学框架设计' , showBread: true},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'newClassTaskAssign',
|
path: 'newClassTaskAssign',
|
||||||
component: () => import('@/views/classTask/newClassTaskAssign/index.vue'),
|
component: () => import('@/views/classTask/newClassTaskAssign/index.vue'),
|
||||||
name: 'newClassTaskAssign',
|
name: 'newClassTaskAssign',
|
||||||
meta: { title: '作业管理' }
|
meta: { title: '作业设计', showBread: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'questionUpload',
|
path: 'questionUpload',
|
||||||
|
@ -89,7 +89,7 @@ export const constantRoutes = [
|
||||||
path: 'aiKolors',
|
path: 'aiKolors',
|
||||||
component: () => import('@/components/ai-kolors/index.vue'),
|
component: () => import('@/components/ai-kolors/index.vue'),
|
||||||
name: 'aiKolors',
|
name: 'aiKolors',
|
||||||
meta: { title: '文生图片' }
|
meta: { title: '文生图片', showBread: true }
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -132,7 +132,7 @@ const dynamicRoutes = [
|
||||||
path: 'prepare',
|
path: 'prepare',
|
||||||
component: () => import('@/views/prepare/index.vue'),
|
component: () => import('@/views/prepare/index.vue'),
|
||||||
name: 'prepare',
|
name: 'prepare',
|
||||||
meta: { title: '教学实践', showBread: true }
|
meta: { title: '教学实践' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'newClassTask',
|
path: 'newClassTask',
|
||||||
|
@ -152,13 +152,6 @@ const dynamicRoutes = [
|
||||||
name: 'classCorrect',
|
name: 'classCorrect',
|
||||||
meta: { title: '作业批改', showBread: true }
|
meta: { title: '作业批改', showBread: true }
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/teach',
|
|
||||||
component: () => import('@/views/teach/index.vue'),
|
|
||||||
name: 'teach',
|
|
||||||
meta: { title: '授课' }
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/profile',
|
path: '/profile',
|
||||||
component: () => import('@/views/profile/index.vue'),
|
component: () => import('@/views/profile/index.vue'),
|
||||||
|
|
|
@ -461,7 +461,6 @@ watch(tabActive, (newVal,oldVal)=>{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 15px 30px;
|
|
||||||
.class-reserv-tabs {
|
.class-reserv-tabs {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|
|
@ -703,6 +703,7 @@ const handleClassWorkSave = async () => {
|
||||||
entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串
|
entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(cform.uniquekey.trim() == '') return ElMessage({ type: 'warning', message: '作业名称不能为空!'});
|
||||||
|
|
||||||
// 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态
|
// 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态
|
||||||
if(classWorkForm.id != '' ) {// 编辑状态 有id
|
if(classWorkForm.id != '' ) {// 编辑状态 有id
|
||||||
|
@ -741,6 +742,7 @@ const handleClassWorkSave = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(classWorkForm.worktype === "常规作业"){
|
else if(classWorkForm.worktype === "常规作业"){
|
||||||
|
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
|
||||||
fileLoading.value = true
|
fileLoading.value = true
|
||||||
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
||||||
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
||||||
|
@ -832,7 +834,12 @@ const editWork = async (cform) =>{
|
||||||
}
|
}
|
||||||
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
|
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
|
||||||
// 不做校验
|
// 不做校验
|
||||||
|
// 不做校验
|
||||||
|
if(classWorkForm.worktype == '课堂展示'){
|
||||||
|
//
|
||||||
|
}else{
|
||||||
|
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
if (classWorkForm.chooseWorkLists.length == 0) {
|
if (classWorkForm.chooseWorkLists.length == 0) {
|
||||||
// 框架梳理
|
// 框架梳理
|
||||||
|
|
|
@ -134,7 +134,6 @@ onMounted(() => {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page-newcalsetask {
|
.page-newcalsetask {
|
||||||
padding-top: 10px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
|
@ -489,6 +489,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串
|
entpcourseworklist: '', // 选择的 习题训练 list 需要转字符串
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(cform.uniquekey.trim() == '') return ElMessage({ type: 'warning', message: '作业名称不能为空!'});
|
||||||
|
|
||||||
// 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态
|
// 当前为[编辑]状态下点进来得处理 newWorkSpaceEdit true 为编辑状态
|
||||||
if(isShow.value === false){
|
if(isShow.value === false){
|
||||||
|
@ -530,6 +531,7 @@ const handleClassWorkFormQuizRemove = (index) =>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(classWorkForm.worktype === "常规作业"){
|
else if(classWorkForm.worktype === "常规作业"){
|
||||||
|
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
|
||||||
fileLoading.value = true
|
fileLoading.value = true
|
||||||
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
cform.workcodes = JSON.stringify(classWorkForm.fileHomeworkList);
|
||||||
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
cform.entpcourseworklist = JSON.stringify([{'id':-2, 'score': '10'}]);
|
||||||
|
@ -634,7 +636,11 @@ const editWork = async (cform) =>{
|
||||||
}
|
}
|
||||||
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
|
}else if (classWorkForm.worktype == '课堂展示' || classWorkForm.worktype == '常规作业') {
|
||||||
// 不做校验
|
// 不做校验
|
||||||
|
if(classWorkForm.worktype == '课堂展示'){
|
||||||
|
//
|
||||||
|
}else{
|
||||||
|
if (classWorkForm.fileHomeworkList.length == 0) return ElMessage({ type: 'warning', message: '请上传常规作业附件!'});
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
if (classWorkForm.chooseWorkLists.length == 0) {
|
if (classWorkForm.chooseWorkLists.length == 0) {
|
||||||
// 框架梳理
|
// 框架梳理
|
||||||
|
|
|
@ -1,246 +1,180 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="page-resource flex mb-4">
|
<el-row class="model-wrap">
|
||||||
<!-- 左侧 教材 目录 -->
|
|
||||||
<!-- <ChooseTextbook @change-book="getData" @node-click="getData" /> -->
|
|
||||||
|
|
||||||
<div class="page-right">
|
|
||||||
<div class="button-container">
|
|
||||||
<el-button type="primary" @click="onchange('/model/curriculum')">课标研读</el-button>
|
|
||||||
<!-- <el-button type="primary" @click="onchange('/model/management')">作业管理1</el-button> -->
|
|
||||||
<el-button type="primary" @click="onchange('/model/newClassTaskAssign')">作业管理</el-button>
|
|
||||||
<el-button type="success" @click="onchange('/model/teaching')">教材研读</el-button>
|
|
||||||
<el-button type="info" @click="onchange('/model/design')">教学框架设计</el-button>
|
|
||||||
<!-- <el-button type="success" @click="openPPTist">打开PPTist</el-button>-->
|
|
||||||
<el-button type="info" @click="onchange('/model/examination')">考试分析</el-button>
|
|
||||||
<el-button type="primary" v-menus="dt.menus">测试</el-button>
|
|
||||||
<el-button type="success" @click="onchange('/model/aiKolors')">文生图片</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-row class="container">
|
|
||||||
<!-- 左侧 选择教材 目录 -->
|
<!-- 左侧 选择教材 目录 -->
|
||||||
<ChooseTextbook @change-book="changeBook" @node-click="changeBook" />
|
<ChooseTextbook @change-book="changeBook" @node-click="changeBook" />
|
||||||
<!-- 中间 展示内容 -->
|
<!-- 右侧 展示内容 -->
|
||||||
<el-col :span="10">
|
<div class="right-content">
|
||||||
<div class="c-item mb-4 mx-4">
|
<div class="content-header-wrap">
|
||||||
<div class="flex justify-between pb-2">
|
<div v-for="(item,index) in tags" :key="index" :style="{'background-color':item.bgcolor}" @click="onchange(item)">
|
||||||
<h3>教师资源</h3>
|
<el-icon class="item-icon"><Flag /></el-icon>
|
||||||
<span class="c-btns">
|
<div class="content-header-title">{{item.name}}</div>
|
||||||
<template v-for="item in resourBtns">
|
<div class="content-header-body">
|
||||||
<el-button :size="item.size" text :icon="item.icon" @click="handleAll(item.prop)">{{ item.name }}</el-button>
|
<div class="content-header-num">6</div>
|
||||||
</template>
|
<div class="content-header-text">分析结果</div>
|
||||||
</span>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content-body-wrap">
|
||||||
|
<div class="content-body-left">
|
||||||
|
<div class="content-body-left-title">
|
||||||
|
文枢课件
|
||||||
|
<el-button class="add-btn" size="small" type="primary" @click="createAIPPT">新建</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="content-body-left-body">
|
||||||
|
<kj-list-item
|
||||||
|
v-for="(item, index) in currentFileList"
|
||||||
|
:key="index"
|
||||||
|
:ref="collectRef('kjItemRef'+item.id)"
|
||||||
|
:item="item"
|
||||||
|
:show-tool="false"
|
||||||
|
:index="index"
|
||||||
|
:curNode="currentNode"
|
||||||
|
@on-delete="deleteTalk"
|
||||||
|
@change="changeClass"
|
||||||
|
>
|
||||||
|
</kj-list-item>
|
||||||
|
<!-- <div class="content-body-left-item" v-for="item in 5">
|
||||||
|
<div class="content-body-left-item-img">
|
||||||
|
<FileImage :size="50" :file-name="'aaa.aippt'" />
|
||||||
|
</div>
|
||||||
|
<div class="content-body-left-item-text">
|
||||||
|
<div class="content-body-left-item-title">沁园春*长沙</div>
|
||||||
|
<div class="content-body-left-item-info">21页 访问 100 引用 50 点赞 20 更新时间 2022-01-01 15:20</div>
|
||||||
|
</div>
|
||||||
|
<div></div>
|
||||||
|
</div>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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" @click="gotoRoute(item)">
|
||||||
|
<div class="content-body-right-item-img">
|
||||||
|
<FileImage :fileName="item.img"/>
|
||||||
|
</div>
|
||||||
|
<div class="content-body-right-item-text">{{item.name}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<c-table ref="resourRef" v-bind="sourceOpt" t-class="rounded">
|
|
||||||
<template #title="{row,value}">
|
|
||||||
<el-link :underline="false" @click="handleAll('open', row)">
|
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use :xlink:href="`#icon-${getIcon(row)}`"></use>
|
|
||||||
</svg>
|
|
||||||
<b class="ml-1">{{ value }}</b>
|
|
||||||
</el-link>
|
|
||||||
</template>
|
|
||||||
</c-table>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref, watch, reactive } from 'vue'
|
import { onMounted, reactive, ref, nextTick } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { Plus, Refresh, Upload, Files, UploadFilled } from '@element-plus/icons-vue'
|
|
||||||
import useUserStore from '@/store/modules/user' // 用户信息
|
import useUserStore from '@/store/modules/user' // 用户信息
|
||||||
import msgUtils from '@/plugins/modal' // 消息工具
|
|
||||||
import { createWindow } from '@/utils/tool' // 相关工具
|
|
||||||
import * as API_smarttalk from '@/api/file' // 文件相关api
|
|
||||||
import * as API_entpcourse from '@/api/education/entpcourse' // 相关api
|
|
||||||
import * as API_entpcoursefile from '@/api/education/entpcoursefile' // 相关api
|
|
||||||
import { dataSetJson } from '@/utils/comm' // 数据集id文生图
|
|
||||||
import { sessionStore } from '@/utils/store' // 学科名字文生图
|
|
||||||
// 组件引入
|
// 组件引入
|
||||||
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||||
import { menusEvent } from '@/plugins/vue3-menus' // 右键菜单
|
import KjListItem from '@/views/prepare/container/kj-list-item.vue'
|
||||||
|
import FileImage from '@/components/file-image/index.vue'
|
||||||
|
import {creatAPT, getSmarttalkPage} from '@/api/file'
|
||||||
|
import {Flag, Position} from '@element-plus/icons-vue'
|
||||||
|
import {asyncLocalFile, parseCataByNode} from "@/utils/talkFile";
|
||||||
|
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 {createWindow, ipcMsgSend} from "@/utils/tool";
|
||||||
|
import {ElMessage} from "element-plus"; // 学科名字文生图
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const userStore = useUserStore() // 用户信息
|
const userStore = useUserStore().user // 用户信息
|
||||||
|
const currentNode = ref({})
|
||||||
|
const refs = ref([]);
|
||||||
|
|
||||||
const courseObj = reactive({
|
const collectRef = (key) => {
|
||||||
// 课程相关参数: 教材id,单元id,章节id,课程名称
|
return (el) => {
|
||||||
textbookId: '',
|
refs.value[key] = el;
|
||||||
levelFirstId: '',
|
};
|
||||||
levelSecondId: '',
|
};
|
||||||
coursetitle: '',
|
|
||||||
node: null, // 选择的课程节点
|
|
||||||
entp: null, // 当前课程
|
|
||||||
})
|
|
||||||
const dt = reactive({
|
|
||||||
curRow: null, // 当前行数据
|
|
||||||
menus: [ // 右键菜单
|
|
||||||
{ label: '打开', click: (_, args) => handleAll('open', args) },
|
|
||||||
{ label: '删除', click: (_, args) => handleAll('delete', args) },
|
|
||||||
],
|
|
||||||
})
|
|
||||||
// ref定义
|
|
||||||
const resourRef = ref() // 资源ref
|
|
||||||
// 资源按钮配置
|
|
||||||
const resourBtns = [
|
|
||||||
{ name: '刷新', prop: 'refresh', size: 'small', icon: Refresh },
|
|
||||||
{ name: '资源库', prop:'resource', size:'small', icon: Files },
|
|
||||||
{ name: '上传', prop:'upload', size:'small', icon: UploadFilled },
|
|
||||||
{ name: '添加', prop:'add', size:'small', icon: Plus },
|
|
||||||
]
|
|
||||||
// 资源相关配置-cTable
|
|
||||||
const sourceOpt = reactive({
|
|
||||||
data: [], // 数据
|
|
||||||
option: [ // 列配置
|
|
||||||
{ label: '名称', prop: 'title', align: 'left' },
|
|
||||||
{ label: '类型', prop: 'filetype', width: 80, },
|
|
||||||
{ label: '时间', prop: 'timestamp', width: 160, sortable: true },
|
|
||||||
],
|
|
||||||
noPage: true, // 不显示分页
|
|
||||||
isMain: false, // 主界面
|
|
||||||
highlightCurrentRow: true, // 高亮当前行
|
|
||||||
rowClick: (r, c, e) => { // 行点击事件-处理高亮(再次点击取消选中)
|
|
||||||
if (dt.curRow == r) { // 重复点击-取消选中
|
|
||||||
resourRef.value.$refs.table.setCurrentRow()
|
|
||||||
dt.curRow = null
|
|
||||||
} else dt.curRow = r
|
|
||||||
},
|
|
||||||
rowContextmenu: (r, c, e) => { // 行—右键菜单事件
|
|
||||||
dt.menus.forEach(item => {
|
|
||||||
if(item.label == '打开') item.icon = getIcon(r, 'svg')
|
|
||||||
else if(item.label == '删除') item.icon = getIcon('icon-shanchu', 'class')
|
|
||||||
})
|
|
||||||
menusEvent(e, dt.menus, r)
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
const tags = reactive([{
|
||||||
|
name: '课标分析',
|
||||||
|
path: '/model/curriculum',
|
||||||
|
bgcolor: 'rgb(241,65,108)'
|
||||||
|
},{
|
||||||
|
name: '教材分析',
|
||||||
|
path: '/model/teaching',
|
||||||
|
bgcolor: 'rgb(114,57,234)'
|
||||||
|
},{
|
||||||
|
name: '考试分析',
|
||||||
|
path: '/model/examination',
|
||||||
|
bgcolor: 'rgb(251,132,4)'
|
||||||
|
},{
|
||||||
|
name: '素材设计',
|
||||||
|
path: '/model/aiKolors',
|
||||||
|
bgcolor: 'rgb(25,123,237)'
|
||||||
|
},{
|
||||||
|
name: '作业设计',
|
||||||
|
path: '/model/newClassTaskAssign',
|
||||||
|
bgcolor: 'rgb(23,198,83)'
|
||||||
|
},{
|
||||||
|
name: '框架设计',
|
||||||
|
path: '/model/design',
|
||||||
|
bgcolor: 'rgb(34,35,43)'
|
||||||
|
}])
|
||||||
|
|
||||||
|
const tools = reactive([{
|
||||||
|
name: '数字人生成',
|
||||||
|
path: '',
|
||||||
|
img: 'airobot'
|
||||||
|
},{
|
||||||
|
name: '语音生成',
|
||||||
|
path: '',
|
||||||
|
img: 'aiyuyin'
|
||||||
|
},{
|
||||||
|
name: '文生图片',
|
||||||
|
path: '/model/aiKolors',
|
||||||
|
img: 'aiimg'
|
||||||
|
},{
|
||||||
|
name: '文生连环画',
|
||||||
|
path: '',
|
||||||
|
img: 'aidraw'
|
||||||
|
},{
|
||||||
|
name: '视频生成',
|
||||||
|
path: '',
|
||||||
|
img: 'aivideo'
|
||||||
|
}])
|
||||||
|
|
||||||
|
const uploadData = ref({
|
||||||
|
textbookId: null,
|
||||||
|
levelFirstId: null,
|
||||||
|
levelSecondId: null,
|
||||||
|
fileSource: '个人',
|
||||||
|
fileRoot: '备课'
|
||||||
|
})
|
||||||
|
const currentFileList = ref([])
|
||||||
// 页面加载
|
// 页面加载
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 相关方法-methods
|
const gotoRoute = (item) => {
|
||||||
// 教材选中
|
if (item.path) {
|
||||||
const changeBook = async(data) => {
|
if (item.path === '/model/aiKolors') {
|
||||||
// console.log(data)
|
gotoAiKolors(item.path)
|
||||||
const { textBook, node } = data
|
|
||||||
let textbookId = textBook.curBookId
|
|
||||||
let levelSecondId = node.id
|
|
||||||
let levelFirstId
|
|
||||||
if (node.parentNode) {
|
|
||||||
levelFirstId = node.parentNode.id
|
|
||||||
}else {
|
}else {
|
||||||
levelFirstId = node.id
|
router.push(item.path)
|
||||||
levelSecondId = ''
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
courseObj.textbookId = textbookId // 版本
|
const createAIPPT = () => {
|
||||||
courseObj.levelFirstId = levelFirstId // 单元
|
console.log(userStore)
|
||||||
courseObj.levelSecondId = levelSecondId // 章节
|
listEntpcourse({
|
||||||
courseObj.coursetitle = node.itemtitle // (单元/章节) 名称
|
evalid: currentNode.value.id,
|
||||||
courseObj.node = node; // 保存当前节点
|
edituserid: userStore.userId,
|
||||||
|
pageSize: 500
|
||||||
// 头部 教材分析打开外部链接需要当前章节ID
|
}).then((response) => {
|
||||||
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId }))
|
if (response.rows.length <= 0) return
|
||||||
// 获取当前章节对应的课程信息
|
let resCourse = response.rows[0]
|
||||||
const params = { evalid: node.id, edituserid: userStore.id, pageSize: 1 }
|
// 添加
|
||||||
const res = await HTTP_SERVER_API('getCourseList', params)
|
let form = {
|
||||||
courseObj.entp = res?.rows?.[0] || null
|
|
||||||
sessionStore.set('curr.entp', courseObj.entp) // 缓存当前课程信息
|
|
||||||
// 更新-资源列表
|
|
||||||
getResourceList()
|
|
||||||
}
|
|
||||||
|
|
||||||
const openPPTist = () => {
|
|
||||||
createWindow('open-win', { url: '/pptist' })
|
|
||||||
}
|
|
||||||
|
|
||||||
const onchange = (path) => {
|
|
||||||
if (path == '/model/newClassTaskAssign') {
|
|
||||||
// 作业管理
|
|
||||||
router.push({ path, query: { courseObj: JSON.stringify(courseObj) } })
|
|
||||||
} else if (path == '/model/aiKolors') {
|
|
||||||
// ai生图
|
|
||||||
let subjectdata = sessionStore.get('subject.curNode')
|
|
||||||
let datasubject = `课标-${subjectdata.edustage}-${subjectdata.edusubject}`
|
|
||||||
console.log(subjectdata)
|
|
||||||
router.push({
|
|
||||||
path,
|
|
||||||
query: {
|
|
||||||
datasetId: dataSetJson[datasubject],
|
|
||||||
coursetitle: courseObj.coursetitle,
|
|
||||||
levelFirstId: subjectdata.parentid,
|
|
||||||
levelSecondId: subjectdata.id,
|
|
||||||
textbookId: subjectdata.rootid,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
router.push(path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 获取资源列表
|
|
||||||
const getResourceList = async () => {
|
|
||||||
const entpcourseidarray = courseObj?.entp?.id
|
|
||||||
if (!entpcourseidarray) return msgUtils.msgWarning('请选择章节?')
|
|
||||||
const params = {
|
|
||||||
pageSize: 100, parentid: 0, entpcourseidarray,
|
|
||||||
orderByColumn: 'timestamp', isAsc: 'desc',
|
|
||||||
}
|
|
||||||
const res = await HTTP_SERVER_API('getCourseFileList', params)
|
|
||||||
if (res?.code == 200) {
|
|
||||||
sourceOpt.data = res?.rows || []
|
|
||||||
} else {
|
|
||||||
msgUtils.msgWarning('获取资源列表, 请重试')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 统一HTTP处理
|
|
||||||
const HTTP_SERVER_API = (type, params = {}) => {
|
|
||||||
switch (type) {
|
|
||||||
case 'addSmarttalk': { // 获取课程
|
|
||||||
const def = {
|
|
||||||
fileId: '', // 文件id - Entpcoursefile 对应id
|
|
||||||
fileFlag: 'aippt',
|
|
||||||
fileShowName: courseObj.coursetitle + '.aippt',
|
|
||||||
textbookId: courseObj.textbookId,
|
|
||||||
levelFirstId: courseObj.levelFirstId,
|
|
||||||
levelSecondId: courseObj.levelSecondId,
|
|
||||||
fileSource: '个人',
|
|
||||||
fileRoot: '备课'
|
|
||||||
}
|
|
||||||
return API_smarttalk.creatAPT({...def, ...params})
|
|
||||||
}
|
|
||||||
case 'addEntpcourse': { // 添加课程
|
|
||||||
const node = courseObj.node || {}
|
|
||||||
if (!node) return msgUtils.msgWarning('请选择章节?')
|
|
||||||
const def = { // 默认参数
|
|
||||||
entpid: userStore.user.deptId, // 部门id
|
|
||||||
level: 1, // 层级
|
|
||||||
parentid: 0, // 父级id
|
|
||||||
dictid: 0, // 字典id
|
|
||||||
evalid: node.id, // 章节id
|
|
||||||
evalparentid: node.parentid, // 单元id(父级id)
|
|
||||||
edusubject: node.edusubject, // 学科
|
|
||||||
edudegree: node.edudegree, // 年级
|
|
||||||
edustage: node.edustage, // 阶段
|
|
||||||
coursetype: '课标学科', // 课程类型
|
|
||||||
coursetitle: node.itemtitle, // 课程名称
|
|
||||||
coursedesc: '', // 课程描述
|
|
||||||
status: '', // 状态
|
|
||||||
dflag: 0, // 状态
|
|
||||||
edituserid: userStore.id, // 编辑人id
|
|
||||||
createblankfile: 'no', // 创建空白文件
|
|
||||||
}
|
|
||||||
courseObj.entp = def
|
|
||||||
return API_entpcourse.addEntpcourse(def)
|
|
||||||
}
|
|
||||||
case 'addEntpcoursefile': { // 添加课程文件
|
|
||||||
const enpt = courseObj.entp
|
|
||||||
const def = {
|
|
||||||
parentid: 0,
|
parentid: 0,
|
||||||
entpid: userStore.user.deptId,
|
entpid: userStore.deptId,
|
||||||
entpcourseid: enpt.id,
|
entpcourseid: resCourse.id,
|
||||||
ppttype: 'file',
|
ppttype: 'file',
|
||||||
title: enpt.coursetitle,
|
title: resCourse.coursetitle,
|
||||||
fileurl: '',
|
fileurl: '',
|
||||||
filetype: 'aippt',
|
filetype: 'aippt',
|
||||||
datacontent: '',
|
datacontent: '',
|
||||||
|
@ -249,141 +183,280 @@ const HTTP_SERVER_API = (type, params = {}) => {
|
||||||
fileidx: 0,
|
fileidx: 0,
|
||||||
dflag: 0,
|
dflag: 0,
|
||||||
status: '',
|
status: '',
|
||||||
edituserid: userStore.id
|
edituserid: userStore.userId
|
||||||
}
|
}
|
||||||
// return Promise.resolve(1)
|
addEntpcoursefileReturnId(form).then((slideid) => {
|
||||||
return API_entpcoursefile.addEntpcoursefileReturnId({...def,...params})
|
// 添加
|
||||||
}
|
var form = {
|
||||||
case 'getCourseList': { // 获取课程列表
|
parentid: slideid,
|
||||||
return API_entpcourse.listEntpcourse(params)
|
entpid: resCourse.entpid,
|
||||||
}
|
entpcourseid: resCourse.id,
|
||||||
case 'getCourseFileList':{ // 获取课程文件列表
|
|
||||||
return API_entpcoursefile.listEntpcoursefileNew(params)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 事件回调
|
|
||||||
const handleAll = async(type, row) =>{
|
|
||||||
// console.log(type)
|
|
||||||
switch (type) {
|
|
||||||
case 'refresh': // 刷新
|
|
||||||
getResourceList()
|
|
||||||
break;
|
|
||||||
case 'resource': // 资源库
|
|
||||||
break;
|
|
||||||
case 'upload': // 上传
|
|
||||||
break;
|
|
||||||
case 'add':{ // 添加PPT-list - 课程文件
|
|
||||||
const enpt = courseObj.entp // 获取课程信息
|
|
||||||
if (!enpt) { // 如果没有,就新增课程
|
|
||||||
const resid = await HTTP_SERVER_API('addEntpcourse')
|
|
||||||
courseObj.entp.id = resid
|
|
||||||
}
|
|
||||||
// 生成ppt课件-父级
|
|
||||||
const p_params = {parentContent: '{"width":1000,"ratio":0.5625}'}
|
|
||||||
const id = await HTTP_SERVER_API('addEntpcoursefile', p_params)
|
|
||||||
if (!!id??null) { // 生成第一个幻灯片
|
|
||||||
const params = {
|
|
||||||
parentid: id,
|
|
||||||
title: '第一页',
|
title: '第一页',
|
||||||
filetype: 'slide',
|
filetype: 'slide',
|
||||||
datacontent: '{"elements":[],"background":{"type":"solid","color":"#fff"}}' // json内容
|
datacontent: '{"elements":[],"background":{"type":"solid","color":"#fff"}}',
|
||||||
|
edituserid: userStore.userId
|
||||||
}
|
}
|
||||||
// 生成ppt课件-子级(slide)
|
addEntpcoursefileReturnId(form).then((res) => {
|
||||||
await HTTP_SERVER_API('addEntpcoursefile', params)
|
creatAPT({
|
||||||
// 生成备课资源-Smarttalk
|
...uploadData.value,
|
||||||
await HTTP_SERVER_API('addSmarttalk',{fileId: id})
|
fileId: slideid,
|
||||||
// 刷新资源列表
|
fileFlag: 'aippt',
|
||||||
await getResourceList()
|
fileShowName: currentNode.value.itemtitle + '.aippt'
|
||||||
|
}).then(async (res) => {
|
||||||
|
currentFileList.value.unshift(res.resData)
|
||||||
|
await nextTick();
|
||||||
|
refs.value['kjItemRef'+res.resData.id].openFileWin(res.resData);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const deleteTalk = (item) => {
|
||||||
|
let index = currentFileList.value.indexOf(item)
|
||||||
|
currentFileList.value.splice(index, 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 教材选中
|
||||||
|
const changeBook = async(data) => {
|
||||||
|
console.log(data)
|
||||||
|
let cata = parseCataByNode(data.node)
|
||||||
|
currentNode.value = data.node
|
||||||
|
uploadData.value.levelFirstId = cata[0]
|
||||||
|
uploadData.value.levelSecondId = cata[1]
|
||||||
|
uploadData.value.levelThirdId = cata[2]
|
||||||
|
uploadData.value.textbookId = data.textBook.curBookId
|
||||||
|
getSmarttalkPage({
|
||||||
|
...uploadData.value,
|
||||||
|
orderByColumn: 'createTime',
|
||||||
|
fileFlags: "'aippt'",
|
||||||
|
isAsc: 'desc',
|
||||||
|
pageSize: 500
|
||||||
|
}).then((res) => {
|
||||||
|
currentFileList.value = [...res.rows]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const onchange = (item) => {
|
||||||
|
let path = item.path
|
||||||
|
if (path == '/model/newClassTaskAssign') {
|
||||||
|
uploadData.value.coursetitle = currentNode.value.itemtitle // (单元/章节) 名称
|
||||||
|
uploadData.value.node = currentNode.value; // 保存当前节点
|
||||||
|
// 作业管理
|
||||||
|
router.push({ path, query: { courseObj: JSON.stringify(uploadData.value) } })
|
||||||
|
} else if (path == '/model/aiKolors') {
|
||||||
|
gotoAiKolors(path)
|
||||||
} else {
|
} else {
|
||||||
msgUtils.msgWarning('添加失败!')
|
router.push(path)
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 'open': { // 打开资源-pptist
|
|
||||||
if (row.filetype != 'aippt') return msgUtils.msgWarning('暂不支持该类型文件操作!')
|
const gotoAiKolors = (path)=> {
|
||||||
sessionStore.set('curr.resource', row) // 缓存当前资源信息
|
// ai生图
|
||||||
|
let subjectdata = sessionStore.get('subject.curNode')
|
||||||
|
let datasubject = `课标-${subjectdata.edustage}-${subjectdata.edusubject}`
|
||||||
|
console.log(subjectdata)
|
||||||
|
router.push({
|
||||||
|
path,
|
||||||
|
query: {
|
||||||
|
datasetId: dataSetJson[datasubject],
|
||||||
|
coursetitle: currentNode.value.itemtitle,
|
||||||
|
levelFirstId: subjectdata.parentid,
|
||||||
|
levelSecondId: subjectdata.id,
|
||||||
|
textbookId: subjectdata.rootid,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const changeClass = async (type, row, other) => {
|
||||||
|
switch(type) {
|
||||||
|
case 'click': { // 点击-打开课件-aippt
|
||||||
|
if (row.fileFlag === 'aippt' && !!row.fileId) {
|
||||||
|
const res = await getEntpcoursefile(row.fileId)
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
sessionStore.set('curr.resource', res.data) // 缓存当前资源信息
|
||||||
|
sessionStore.set('curr.smarttalk', row) // 缓存当前文件smarttalk
|
||||||
createWindow('open-win', {
|
createWindow('open-win', {
|
||||||
url: '/pptist', // 窗口关闭时,清除缓存
|
url: '/pptist', // 窗口关闭时,清除缓存
|
||||||
close: () => {
|
close: () => {
|
||||||
sessionStore.set('curr.resource', null) // 清除缓存
|
sessionStore.set('curr.resource', null) // 清除缓存
|
||||||
getResourceList() // 刷新资源列表
|
sessionStore.set('curr.smarttalk', null) // 清除缓存
|
||||||
|
getSmarttalkPage({
|
||||||
|
...uploadData.value,
|
||||||
|
orderByColumn: 'createTime',
|
||||||
|
fileFlags: "'aippt'",
|
||||||
|
isAsc: 'desc',
|
||||||
|
pageSize: 500
|
||||||
|
}).then((res) => {
|
||||||
|
currentFileList.value = [...res.rows]
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(res.msg||'文件获取异常!')
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ElMessage.warning('该功能暂未开放!')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'delete':{ // 删除资源
|
default:
|
||||||
if (!(row && row.id)) return msgUtils.msgWarning('请选择要删除的资源!')
|
break
|
||||||
await msgUtils.confirm(`是否确认删除【${row.title}】课程课件?`)
|
|
||||||
await API_entpcoursefile.delEntpcoursefileNew(row.id)
|
|
||||||
msgUtils.msgSuccess('删除成功!')
|
|
||||||
// 刷新资源列表
|
|
||||||
await getResourceList()
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// icons 处理 type 代表传递svg
|
|
||||||
const getIcon = (o, type) => {
|
|
||||||
let icon = typeof o == 'string' ? o : o?.filetype
|
|
||||||
if (['aippt'].includes(o?.filetype)) icon = 'pptx'
|
|
||||||
if (!!type) { // 其他格式icon
|
|
||||||
switch(type) {
|
|
||||||
case 'svg': // 返回svg格式
|
|
||||||
return `<svg class="icon svg-icon" aria-hidden="true">
|
|
||||||
<use xlink:href="#icon-${icon}"></use>
|
|
||||||
</svg>`
|
|
||||||
case 'class': // class
|
|
||||||
return `<span class="icon iconfont ${icon}"></span>`
|
|
||||||
case 'unicode': // unicode
|
|
||||||
return `<span class="icon iconfont">${icon}</span>`
|
|
||||||
default: // 返回icon-class
|
|
||||||
return `icon-${icon}`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return icon
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page-resource {
|
.model-wrap{
|
||||||
// height: 100%;
|
width: 100%;
|
||||||
// padding: 10px 15px 0;
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
.page-right {
|
flex-direction: row;
|
||||||
min-width: 0;
|
.right-content{
|
||||||
|
flex: 1;
|
||||||
|
margin-left: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex: 1;
|
|
||||||
// margin-left: 20px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: #ffffff;
|
.content-header-wrap{
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
|
|
||||||
}
|
|
||||||
|
|
||||||
.button-container {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-direction: row;
|
||||||
gap: 10px;
|
justify-content: space-between;
|
||||||
margin: 1rem;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
width: 100%;
|
||||||
|
//height: 215px;
|
||||||
|
&>div{
|
||||||
|
&:hover{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
width: calc(100%/6 - 10px);
|
||||||
|
aspect-ratio: 0.718 / 1;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: white;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #999999;
|
||||||
|
position: relative;
|
||||||
|
.item-icon{
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
left: 20px;
|
||||||
|
font-size: calc(1.8vw);
|
||||||
|
}
|
||||||
|
.content-header-title{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 50%;
|
||||||
|
width: 100%;
|
||||||
|
font-size: calc(1.8vw);
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
.content-header-body{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.27);
|
||||||
|
width: 100%;
|
||||||
|
height: 25%;
|
||||||
|
padding-left: 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: calc(1vw);
|
||||||
|
border-radius: 0 0 10px 10px;
|
||||||
|
.content-header-num{
|
||||||
|
}
|
||||||
|
.content-header-text{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content-body-wrap{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 20px;
|
||||||
|
flex: 1;
|
||||||
|
overflow: auto;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 10px;
|
||||||
|
.content-body-left{
|
||||||
|
width: calc(50% - 7px);
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
.content-body-left-title{
|
||||||
|
text-align: left;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
position: relative;
|
||||||
|
height: 40px;
|
||||||
|
.add-btn{
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content-body-left-body{
|
||||||
|
flex: 1;
|
||||||
|
overflow: auto;
|
||||||
|
.content-body-left-item{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
border-bottom: 1px solid rgba(153, 153, 153, 0.29);
|
||||||
|
padding: 10px 0;
|
||||||
|
.content-body-left-item-img{
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
.content-body-left-item-text{
|
||||||
|
text-align: left;
|
||||||
|
.content-body-left-item-title{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
.content-body-left-item-info{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content-body-right{
|
||||||
|
width: calc(50% - 8px);
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 10px;
|
||||||
|
.content-body-right-title{
|
||||||
|
text-align: left;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.content-body-right-body{
|
||||||
|
display: flex;
|
||||||
|
.content-body-right-item{
|
||||||
|
&:hover{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
height: 80px;
|
||||||
|
width: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
.content-body-right-item-img{
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border-radius: 25px;
|
||||||
|
border: 1px solid rgba(153, 153, 153, 0.18);
|
||||||
|
img{
|
||||||
|
border-radius: 25px;
|
||||||
|
width: 25px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content-body-right-item-text{
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.el-button {
|
|
||||||
flex: 1 1 15%;
|
|
||||||
max-width: 15%;
|
|
||||||
min-width: 15%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.container{
|
|
||||||
height: calc(100% - 32px - 3rem);
|
|
||||||
.c-item{
|
|
||||||
.c-btns{
|
|
||||||
.el-button{margin: 0;}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
">{{formatDate(item.createTime, 'yyyy-MM-dd hh:mm:ss')}}</div>
|
">{{formatDate(item.createTime, 'yyyy-MM-dd hh:mm:ss')}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="prepare-body-main-item-btn">
|
<div class="prepare-body-main-item-btn" v-if="showTool">
|
||||||
<!-- <el-button v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button> -->
|
<!-- <el-button v-if="activeClassId==item.id" type="success" @click="clickStartClass(item)">上课中</el-button> -->
|
||||||
<el-button type="primary" @click="clickStartClass(item)">上课</el-button>
|
<el-button type="primary" @click="clickStartClass(item)">上课</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -145,6 +145,10 @@ export default {
|
||||||
activeClassId: { // 当前上课id
|
activeClassId: { // 当前上课id
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: ''
|
||||||
|
},
|
||||||
|
showTool: { //是否显示上课工具
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
expose: ['openFileWin'],
|
expose: ['openFileWin'],
|
||||||
|
@ -414,6 +418,11 @@ export default {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.prepare-popper{
|
||||||
|
width: 80px !important;
|
||||||
|
min-width: 80px !important;
|
||||||
|
padding: 5px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.prepare-body-main-item {
|
.prepare-body-main-item {
|
||||||
|
|
|
@ -104,10 +104,10 @@
|
||||||
</file-list-item>
|
</file-list-item>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="作业" name="作业">
|
<el-tab-pane label="教学活动" name="教学活动">
|
||||||
<div class="prepare-body-header">
|
<div class="prepare-body-header">
|
||||||
<div>
|
<div>
|
||||||
<label style="font-size: 15px">共{{ currentWorkList.length }}个作业</label>
|
<label style="font-size: 15px">共{{ currentWorkList.length }}个教学活动</label>
|
||||||
<!-- <el-button size="small" @click="handleOutLink('homeWork')">作业设计</el-button> -->
|
<!-- <el-button size="small" @click="handleOutLink('homeWork')">作业设计</el-button> -->
|
||||||
<el-button size="small" @click="goNewClassTask()">作业设计</el-button>
|
<el-button size="small" @click="goNewClassTask()">作业设计</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -249,7 +249,7 @@ export default {
|
||||||
activeAptTab: "教学课件",
|
activeAptTab: "教学课件",
|
||||||
uploadData: {
|
uploadData: {
|
||||||
textbookId: null,
|
textbookId: null,
|
||||||
levelFirstId: 39103,
|
levelFirstId: null,
|
||||||
levelSecondId: null,
|
levelSecondId: null,
|
||||||
fileSource: '个人',
|
fileSource: '个人',
|
||||||
fileRoot: '备课'
|
fileRoot: '备课'
|
||||||
|
@ -898,7 +898,7 @@ export default {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
return getSmarttalkPage({
|
return getSmarttalkPage({
|
||||||
...this.uploadData,
|
...this.uploadData,
|
||||||
orderByColumn: 'uploadTime',
|
orderByColumn: 'createTime',
|
||||||
isAsc: 'desc',
|
isAsc: 'desc',
|
||||||
pageSize: 500
|
pageSize: 500
|
||||||
})
|
})
|
||||||
|
|
|
@ -53,7 +53,7 @@ export default defineStore('resource', {
|
||||||
fileFlags: resourceType[0].value,
|
fileFlags: resourceType[0].value,
|
||||||
fileRoot: '资源',
|
fileRoot: '资源',
|
||||||
fileName: '',
|
fileName: '',
|
||||||
orderByColumn: 'uploadTime',
|
orderByColumn: 'createTime',
|
||||||
isAsc: 'desc',
|
isAsc: 'desc',
|
||||||
...structQuery
|
...structQuery
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
授课Page
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
|
|
||||||
</style>
|
|
|
@ -346,7 +346,6 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.page-con {
|
.page-con {
|
||||||
padding-top: 20px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
&-left{
|
&-left{
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
|
|
@ -362,7 +362,6 @@ onMounted(async () => {
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.page-con {
|
.page-con {
|
||||||
padding-top: 20px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
&-left{
|
&-left{
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
|
|
@ -203,7 +203,7 @@ const openFileLink = async (item) =>{
|
||||||
// 获取资源数据
|
// 获取资源数据
|
||||||
const getResource = () => {
|
const getResource = () => {
|
||||||
let querySearch = toRaw(toolStore.curSubjectNode).querySearch
|
let querySearch = toRaw(toolStore.curSubjectNode).querySearch
|
||||||
querySearch.orderByColumn = 'uploadTime'
|
querySearch.orderByColumn = 'createTime'
|
||||||
querySearch.isAsc = 'desc'
|
querySearch.isAsc = 'desc'
|
||||||
querySearch.pageSize = 500
|
querySearch.pageSize = 500
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue