Compare commits
No commits in common. "cb1c3c23feaee5f5e36bfe45a326a8bd0c7c5560" and "de1dee73802e1eed14c107c7ec6a110ae8f6a974" have entirely different histories.
cb1c3c23fe
...
de1dee7380
|
@ -1,162 +0,0 @@
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询entpcoursefile列表
|
|
||||||
export function listEntpcoursefile(query) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// zdg:查询entpcoursefile列表-新
|
|
||||||
export function listEntpcoursefileNew(query) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/new/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 查询entpcoursefile详细
|
|
||||||
export function getEntpcoursefile(id) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增entpcoursefile
|
|
||||||
export function addEntpcoursefile(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增entpcoursefile
|
|
||||||
export function addEntpcoursefileReturnId(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/addReturnId',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// addFromId
|
|
||||||
export function addFromId(fromid, toid, entpid, entpcourseid, edituserid) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/addFromId/'+fromid+'/'+toid+'/'+entpid+'/'+entpcourseid+'/'+edituserid,
|
|
||||||
method: 'post'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改entpcoursefile
|
|
||||||
export function updateEntpcoursefile(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 新增 修改接口
|
|
||||||
export function updateEntpcoursefileNew(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/newUpdateFile',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// updateFileByIds
|
|
||||||
export function updateFileByIds(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/updateFileByIds',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// updateFileByArray
|
|
||||||
export function updateFileByArray(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/updateFileByArray',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改entpcoursefile
|
|
||||||
export function updateFile2Redis(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/updateFile2Redis',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除entpcoursefile
|
|
||||||
export function delEntpcoursefile(id) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保存base64图片,返回url
|
|
||||||
export function saveEntpCourseBase64File(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/saveBase64File',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 文件上传
|
|
||||||
export function saveEntpCourseBase64File2(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/saveBase64File2',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保存PPT页面预览base64图片,返回url
|
|
||||||
export function savePPTPreviewBase64File(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/savePreviewBase64',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// PPT文件上传
|
|
||||||
export function saveEntpCoursePPT(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/importPPT',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// PPT文件解析
|
|
||||||
export function parsePPT(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/parsePPT',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 修改ppt.slide.index
|
|
||||||
export function updateSlideIndex(data) {
|
|
||||||
return request({
|
|
||||||
url: '/education/entpcoursefile/saveSlideOrder',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,14 +9,6 @@ export const getSmarttalkPage = (params) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const creatAPT = (params) => {
|
|
||||||
return request({
|
|
||||||
url: '/smarttalk/file/createApt',
|
|
||||||
method: 'post',
|
|
||||||
params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export const getPrepareById = (id) => {
|
export const getPrepareById = (id) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/smarttalk/file/' + id,
|
url: '/smarttalk/file/' + id,
|
||||||
|
|
|
@ -230,10 +230,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openFileWin(items) {
|
openFileWin(items) {
|
||||||
if (items.fileFlag === 'apt') {
|
|
||||||
console.log(items);
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (!items||!items.fileSuffix) return;
|
if (!items||!items.fileSuffix) return;
|
||||||
getPrepareById(items.id).then((item) => {
|
getPrepareById(items.id).then((item) => {
|
||||||
Object.assign(items, item)
|
Object.assign(items, item)
|
||||||
|
|
|
@ -20,14 +20,11 @@
|
||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button
|
||||||
:type="!curClassReserv.id ? 'info' : 'primary'"
|
:type="!curClassReserv.id ? 'info' : 'primary'"
|
||||||
:disabled="!curClassReserv.id || toolStore.isToolWin"
|
:disabled="!curClassReserv.id||toolStore.isToolWin"
|
||||||
class="to-class-btn"
|
class="to-class-btn"
|
||||||
@click="openLesson"
|
@click="openLesson"
|
||||||
>
|
>
|
||||||
<label
|
<label><i class="iconfont icon-lingdang"></i>{{curClassReserv.status=='上课中'?'上课中':'上课'}}</label>
|
||||||
><i class="iconfont icon-lingdang"></i
|
|
||||||
>{{ curClassReserv.status == '上课中' ? '上课中' : '上课' }}</label
|
|
||||||
>
|
|
||||||
<label>{{ curClassReserv.classDay }} {{ getWeekday1(curClassReserv.classDay) }}</label>
|
<label>{{ curClassReserv.classDay }} {{ getWeekday1(curClassReserv.classDay) }}</label>
|
||||||
<label>{{ curClassReserv.startTime }}-{{ curClassReserv.endTime }}</label>
|
<label>{{ curClassReserv.startTime }}-{{ curClassReserv.endTime }}</label>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -63,21 +60,9 @@
|
||||||
<el-button @click="handleOutLink('feedback')">作业反馈</el-button>
|
<el-button @click="handleOutLink('feedback')">作业反馈</el-button>
|
||||||
<el-button @click="handleOutLink('homeWork')">布置作业</el-button>
|
<el-button @click="handleOutLink('homeWork')">布置作业</el-button>
|
||||||
<el-button @click="isDialogOpen = true">上传资料</el-button>
|
<el-button @click="isDialogOpen = true">上传资料</el-button>
|
||||||
<el-dropdown trigger="click" style="margin-left: 12px">
|
<el-button type="primary" style="margin-left: 10px" @click="createFile"
|
||||||
<el-button type="primary">
|
>新建课件</el-button
|
||||||
新建课件<el-icon class="el-icon--right"><arrow-down /></el-icon>
|
>
|
||||||
</el-button>
|
|
||||||
<template #dropdown>
|
|
||||||
<el-dropdown-menu>
|
|
||||||
<el-dropdown-item style="padding: 0">
|
|
||||||
<el-button type="default" style="" @click="createFile">PPT课件</el-button>
|
|
||||||
</el-dropdown-item>
|
|
||||||
<el-dropdown-item style="padding: 0">
|
|
||||||
<el-button type="default" style="" @click="createAptFile">APT课件</el-button>
|
|
||||||
</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</template>
|
|
||||||
</el-dropdown>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-checkbox-group
|
<el-checkbox-group
|
||||||
|
@ -107,6 +92,7 @@
|
||||||
@on-delete="deleteTalk"
|
@on-delete="deleteTalk"
|
||||||
@on-set="openSet"
|
@on-set="openSet"
|
||||||
@on-delhomework="delhomework"
|
@on-delhomework="delhomework"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
|
||||||
</file-list-item>
|
</file-list-item>
|
||||||
|
@ -124,7 +110,11 @@
|
||||||
</div>
|
</div>
|
||||||
<MoveFile v-model="isMoveDialogOpen" @on-submit="chooseMoveCata" />
|
<MoveFile v-model="isMoveDialogOpen" @on-submit="chooseMoveCata" />
|
||||||
<uploadDialog v-model="isDialogOpen" @submit-file="submitFile" />
|
<uploadDialog v-model="isDialogOpen" @submit-file="submitFile" />
|
||||||
<SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :row="row" />
|
<SetHomework
|
||||||
|
v-model="setDialog"
|
||||||
|
:entpcourseid="entpcourseid"
|
||||||
|
:row="row"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<reserv
|
<reserv
|
||||||
ref="reservDialog"
|
ref="reservDialog"
|
||||||
|
@ -137,7 +127,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { Check } from '@element-plus/icons-vue'
|
import { Check } from '@element-plus/icons-vue'
|
||||||
import Reserv from '@/views/prepare/container/reserv.vue'
|
import Reserv from '@/views/prepare/container/reserv.vue'
|
||||||
import { ArrowDown } from '@element-plus/icons-vue'
|
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
const Remote = require('@electron/remote')
|
const Remote = require('@electron/remote')
|
||||||
|
@ -149,20 +138,18 @@ import useUserStore from '@/store/modules/user'
|
||||||
import { useToolState } from '@/store/modules/tool'
|
import { useToolState } from '@/store/modules/tool'
|
||||||
import MoveFile from '@/components/move-file/index.vue'
|
import MoveFile from '@/components/move-file/index.vue'
|
||||||
import FileListItem from '@/views/prepare/container/file-list-item.vue'
|
import FileListItem from '@/views/prepare/container/file-list-item.vue'
|
||||||
import { getSmarttalkPage, moveSmarttalk, creatAPT } from '@/api/file'
|
import { getSmarttalkPage, moveSmarttalk } from '@/api/file'
|
||||||
import { toTimeText } from '@/utils/date'
|
import { toTimeText } from '@/utils/date'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { parseCataByNode, creatPPT, asyncLocalFile } from '@/utils/talkFile'
|
import { parseCataByNode, creatPPT, asyncLocalFile } from '@/utils/talkFile'
|
||||||
import FileOperBatch from '@/views/prepare/container/file-oper-batch.vue'
|
import FileOperBatch from '@/views/prepare/container/file-oper-batch.vue'
|
||||||
import SetHomework from '@/components/set-homework/index.vue'
|
import SetHomework from '@/components/set-homework/index.vue'
|
||||||
import outLink from '@/utils/linkConfig'
|
import outLink from '@/utils/linkConfig'
|
||||||
import { createWindow, sessionStore } from '@/utils/tool'
|
import { createWindow, ipcMsgSend, sessionStore } from '@/utils/tool'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import { delClasswork, listEntpcourse } from '@/api/teaching/classwork'
|
import { delClasswork } from '@/api/teaching/classwork'
|
||||||
import { getSelfReserv } from '@/api/classManage'
|
import { getSelfReserv, startClass } from '@/api/classManage'
|
||||||
import { useGetHomework } from '@/hooks/useGetHomework'
|
import { useGetHomework } from '@/hooks/useGetHomework'
|
||||||
import { addEntpcoursefileReturnId } from '@/api/education/entpcoursefile'
|
|
||||||
|
|
||||||
const toolStore = useToolState()
|
const toolStore = useToolState()
|
||||||
|
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
|
@ -233,6 +220,8 @@ export default {
|
||||||
this.initReserv()
|
this.initReserv()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
window.test = sessionStore
|
||||||
|
window.test1 = toolStore
|
||||||
this.$watch(
|
this.$watch(
|
||||||
() => toolStore.isToolWin,
|
() => toolStore.isToolWin,
|
||||||
(newD, oldD) => {
|
(newD, oldD) => {
|
||||||
|
@ -241,12 +230,14 @@ export default {
|
||||||
)
|
)
|
||||||
// electron 当前窗口
|
// electron 当前窗口
|
||||||
const curWin = Remote.getCurrentWindow()
|
const curWin = Remote.getCurrentWindow()
|
||||||
curWin.on('focus', () => {
|
curWin.on('focus', ()=>{
|
||||||
if (!this.isOpenHomework) return
|
if(!this.isOpenHomework) return
|
||||||
this.initHomeWork()
|
this.initHomeWork()
|
||||||
this.asyncAllFile()
|
this.asyncAllFile()
|
||||||
this.isOpenHomework = false
|
this.isOpenHomework = false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// activated() {
|
// activated() {
|
||||||
// if (this.uploadData.textbookId !== null) {
|
// if (this.uploadData.textbookId !== null) {
|
||||||
|
@ -310,90 +301,6 @@ export default {
|
||||||
this.currentFileList.unshift(res.resData)
|
this.currentFileList.unshift(res.resData)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
createAptFile() {
|
|
||||||
listEntpcourse({
|
|
||||||
evalid: this.uploadData.levelSecondId,
|
|
||||||
edituserid: this.userStore.userId,
|
|
||||||
pageSize: 500
|
|
||||||
}).then((response) => {
|
|
||||||
if (response.rows.length <= 0) return
|
|
||||||
let resCourse = response.rows[0]
|
|
||||||
// 添加
|
|
||||||
let form = {
|
|
||||||
parentid: 0,
|
|
||||||
entpid: this.userStore.deptId,
|
|
||||||
entpcourseid: resCourse.id,
|
|
||||||
ppttype: 'file',
|
|
||||||
title: resCourse.coursetitle,
|
|
||||||
fileurl: '',
|
|
||||||
filetype: 'ppt',
|
|
||||||
datacontent: '',
|
|
||||||
filekey: '',
|
|
||||||
filetag: '',
|
|
||||||
fileidx: 0,
|
|
||||||
dflag: 0,
|
|
||||||
status: '',
|
|
||||||
edituserid: this.userStore.userId
|
|
||||||
}
|
|
||||||
addEntpcoursefileReturnId(form).then((slideid) => {
|
|
||||||
let pagearray = []
|
|
||||||
// 公屏
|
|
||||||
pagearray.push({
|
|
||||||
key: '公屏',
|
|
||||||
title: '公屏页',
|
|
||||||
slidedata: {
|
|
||||||
attrs: { width: 1333, height: 749.8125 },
|
|
||||||
className: 'Stage',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
attrs: {},
|
|
||||||
className: 'Layer',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
attrs: {
|
|
||||||
width: 1333,
|
|
||||||
height: 749.8125,
|
|
||||||
fill: 'white',
|
|
||||||
name: 'fixedbackground',
|
|
||||||
listening: true
|
|
||||||
},
|
|
||||||
className: 'Rect'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 添加
|
|
||||||
var form = {
|
|
||||||
parentid: slideid,
|
|
||||||
entpid: resCourse.entpid,
|
|
||||||
entpcourseid: resCourse.id,
|
|
||||||
ppttype: 'file',
|
|
||||||
title: '第一页',
|
|
||||||
fileurl: '',
|
|
||||||
filetype: 'slide',
|
|
||||||
datacontent: JSON.stringify(pagearray),
|
|
||||||
filekey: '',
|
|
||||||
filetag: '',
|
|
||||||
fileidx: 0,
|
|
||||||
dflag: 0,
|
|
||||||
status: '',
|
|
||||||
edituserid: this.userStore.userId
|
|
||||||
}
|
|
||||||
addEntpcoursefileReturnId(form).then((res) => {
|
|
||||||
creatAPT({
|
|
||||||
...this.uploadData,
|
|
||||||
fileId: res,
|
|
||||||
fileShowName: this.currentNode.label + '.apt'
|
|
||||||
}).then((res) => {
|
|
||||||
this.currentFileList.unshift(res.resData)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
onMoveSingleFile(item) {
|
onMoveSingleFile(item) {
|
||||||
this.moveFile = [item]
|
this.moveFile = [item]
|
||||||
this.isMoveDialogOpen = true
|
this.isMoveDialogOpen = true
|
||||||
|
@ -497,7 +404,6 @@ export default {
|
||||||
this.asyncAllFileVisiable = true
|
this.asyncAllFileVisiable = true
|
||||||
for (let i = 0; i < this.currentFileList.length; i++) {
|
for (let i = 0; i < this.currentFileList.length; i++) {
|
||||||
let item = this.currentFileList[i]
|
let item = this.currentFileList[i]
|
||||||
if (item.fileFlag === 'apt') continue;
|
|
||||||
await asyncLocalFile(item)
|
await asyncLocalFile(item)
|
||||||
}
|
}
|
||||||
this.asyncAllFileVisiable = false
|
this.asyncAllFileVisiable = false
|
||||||
|
@ -522,9 +428,7 @@ export default {
|
||||||
this.uploadData.textbookId = data.textBook.curBookId
|
this.uploadData.textbookId = data.textBook.curBookId
|
||||||
toolStore.curSubjectNode.data = data
|
toolStore.curSubjectNode.data = data
|
||||||
// 不要同时修改共享数据,这样只会触发一次
|
// 不要同时修改共享数据,这样只会触发一次
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() =>{ toolStore.curSubjectNode.querySearch = this.uploadData })
|
||||||
toolStore.curSubjectNode.querySearch = this.uploadData
|
|
||||||
})
|
|
||||||
this.initHomeWork()
|
this.initHomeWork()
|
||||||
await this.asyncAllFile()
|
await this.asyncAllFile()
|
||||||
},
|
},
|
||||||
|
@ -539,20 +443,19 @@ export default {
|
||||||
},
|
},
|
||||||
// 打开外部链接
|
// 打开外部链接
|
||||||
handleOutLink(key) {
|
handleOutLink(key) {
|
||||||
if (key == 'homeWork') {
|
if(key == 'homeWork'){
|
||||||
this.isOpenHomework = true
|
this.isOpenHomework = true
|
||||||
}
|
}
|
||||||
// key 对应的 linkConfig.js 外部链接配置
|
// key 对应的 linkConfig.js 外部链接配置
|
||||||
let configObj = outLink()[key]
|
let configObj = outLink()[key]
|
||||||
let fullPath = configObj.fullPath
|
let fullPath = configObj.fullPath
|
||||||
//打开作业 高考 url增加unitId 章节ID
|
//打开作业 高考 url增加unitId 章节ID
|
||||||
if (key != 'standard' && key != 'aiModel') {
|
if(key != 'standard' && key != 'aiModel'){
|
||||||
let unitId = this.uploadData.levelSecondId
|
let unitId = this.uploadData.levelSecondId ? this.uploadData.levelSecondId : this.uploadData.levelFirstId
|
||||||
? this.uploadData.levelSecondId
|
if(key == 'gk'){
|
||||||
: this.uploadData.levelFirstId
|
|
||||||
if (key == 'gk') {
|
|
||||||
fullPath += `?unitId=${unitId}`
|
fullPath += `?unitId=${unitId}`
|
||||||
} else {
|
}
|
||||||
|
else{
|
||||||
fullPath += `&unitId=${unitId}`
|
fullPath += `&unitId=${unitId}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue