Merge pull request 'lyc-dev' (#86) from lyc-dev into main

This commit is contained in:
lyc 2024-07-30 17:03:01 +08:00
commit 9f5115f4a3
13 changed files with 237 additions and 54 deletions

View File

@ -9,7 +9,6 @@ export const listEvaluation = (params)=> {
}) })
} }
export const addFileToPrepare = (params) => { export const addFileToPrepare = (params) => {
return request({ return request({
url: '/smarttalk/file/addFileToPrepare', url: '/smarttalk/file/addFileToPrepare',
@ -17,3 +16,4 @@ export const addFileToPrepare = (params) => {
params params
}) })
} }

View File

@ -0,0 +1,19 @@
import request from '@/utils/request'
// 查询classwork列表
export function homeworklist(params) {
return request({
url: '/education/classwork/list',
method: 'get',
params
})
}
// 查询entpcourse列表
export function listEntpcourse(query) {
return request({
url: '/education/entpcourse/list',
method: 'get',
params: query
})
}

View File

@ -1,9 +1,9 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2794390 */ font-family: "iconfont"; /* Project id 2794390 */
src: url('iconfont.woff2?t=1721815727687') format('woff2'), src: url('iconfont.woff2?t=1722323882803') format('woff2'),
url('iconfont.woff?t=1721815727687') format('woff'), url('iconfont.woff?t=1722323882803') format('woff'),
url('iconfont.ttf?t=1721815727687') format('truetype'), url('iconfont.ttf?t=1722323882803') format('truetype'),
url('iconfont.svg?t=1721815727687#iconfont') format('svg'); url('iconfont.svg?t=1722323882803#iconfont') format('svg');
} }
.iconfont { .iconfont {
@ -14,6 +14,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-zuoye1:before {
content: "\e610";
}
.icon-xiazai9:before { .icon-xiazai9:before {
content: "\e60b"; content: "\e60b";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,13 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "8023423",
"name": "作业",
"font_class": "zuoye1",
"unicode": "e610",
"unicode_decimal": 58896
},
{ {
"icon_id": "720967", "icon_id": "720967",
"name": "更多", "name": "更多",

View File

@ -14,6 +14,8 @@
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="zuoye1" unicode="&#58896;" d="M839.415605-127.976172H184.563842A111.949251 111.949251 0 0 0 70.355065-18.697271V687.096536a111.949251 111.949251 0 0 0 114.208777 109.278902h133.928278a30.81172 30.81172 0 0 0 0-61.623441H184.563842A50.32581 50.32581 0 0 1 131.978506 687.096536v-705.793807a50.32581 50.32581 0 0 1 52.585336-47.655461h654.851763A50.32581 50.32581 0 0 1 892.000941-18.697271V687.096536a50.32581 50.32581 0 0 1-52.585336 47.655461h-121.809001a30.81172 30.81172 0 0 0 0 61.623441h121.809001A111.949251 111.949251 0 0 0 953.624381 687.096536v-705.793807a111.949251 111.949251 0 0 0-114.208776-109.278901zM662.145507 834.376559a20.541147 20.541147 0 0 0 20.541147-20.541147v-82.164587a20.541147 20.541147 0 0 0-20.541147-20.541147h-287.576056a20.541147 20.541147 0 0 0-20.541147 20.541147V813.835412a20.541147 20.541147 0 0 0 20.541147 20.541147h287.576056m0 61.623441h-287.576056a82.164588 82.164588 0 0 1-82.164588-82.164588v-82.164587a82.164588 82.164588 0 0 1 82.164588-82.164588h287.576056a82.164588 82.164588 0 0 1 82.164588 82.164588V813.835412a82.164588 82.164588 0 0 1-82.164588 82.164588zM757.251017 265.386791H274.534065a30.81172 30.81172 0 0 0 0 61.62344h482.716952a30.81172 30.81172 0 0 0 0-61.62344zM538.898626 429.715966H274.534065a30.81172 30.81172 0 0 0 0 61.62344h264.364561a30.81172 30.81172 0 0 0 0-61.62344zM662.145507 121.598762H274.534065a30.81172 30.81172 0 0 0 0 61.623441h387.611442a30.81172 30.81172 0 1 0 0-61.623441z" horiz-adv-x="1024" />
<glyph glyph-name="xiazai9" unicode="&#58891;" d="M102.4 486.4C46.08 486.4 0 440.32 0 384s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4C204.8 440.32 158.72 486.4 102.4 486.4zM921.6 486.4c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4S1024 327.68 1024 384C1024 440.32 977.92 486.4 921.6 486.4zM512 486.4c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4C614.4 440.32 568.32 486.4 512 486.4z" horiz-adv-x="1024" /> <glyph glyph-name="xiazai9" unicode="&#58891;" d="M102.4 486.4C46.08 486.4 0 440.32 0 384s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4C204.8 440.32 158.72 486.4 102.4 486.4zM921.6 486.4c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4S1024 327.68 1024 384C1024 440.32 977.92 486.4 921.6 486.4zM512 486.4c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4C614.4 440.32 568.32 486.4 512 486.4z" horiz-adv-x="1024" />
<glyph glyph-name="hudong" unicode="&#58892;" d="M99.776 554.24c0 169.408 141.056 306.816 315.008 306.816h0.768v-85.312h-0.768c-125.44 0-227.456-99.328-227.456-221.504v-1.92h106.944L147.2 409.344-0.064 552.32h99.84v1.92zM923.52 213.248c0-169.408-141.12-306.816-314.944-306.816h-0.768v85.312h0.768c125.44 0 227.456 99.392 227.456 221.568v1.92H729.088l147.072 142.976 147.2-142.976h-99.84v-1.984zM398.912 259.392c27.584 0 50.048-21.184 50.048-47.104v-194.752c0-25.984-22.464-47.104-49.984-47.104H114.048c-27.584 0-50.048 21.184-50.048 47.104v194.752c0 25.984 22.464 47.104 50.048 47.104h284.864m0 64H114.048c-62.976 0-114.048-49.792-114.048-111.104v-194.752c0-61.312 51.008-111.104 114.048-111.104h284.928c62.976 0 113.984 49.856 113.984 111.104v194.752c0 61.312-51.008 111.104-114.048 111.104zM906.176 797.184c27.584 0 50.048-21.12 50.048-47.104v-194.752c0-25.984-22.464-47.168-50.048-47.168H621.248c-27.584 0-49.984 21.184-49.984 47.168V750.08c0 25.984 22.464 47.104 49.984 47.104h284.928m0 64H621.248c-62.976 0-113.984-49.728-113.984-111.104v-194.752c0-61.376 51.008-111.168 113.984-111.168h284.992c62.912 0 114.048 49.728 114.048 111.168V750.08c-0.064 61.312-51.072 111.104-114.112 111.104z" horiz-adv-x="1024" /> <glyph glyph-name="hudong" unicode="&#58892;" d="M99.776 554.24c0 169.408 141.056 306.816 315.008 306.816h0.768v-85.312h-0.768c-125.44 0-227.456-99.328-227.456-221.504v-1.92h106.944L147.2 409.344-0.064 552.32h99.84v1.92zM923.52 213.248c0-169.408-141.12-306.816-314.944-306.816h-0.768v85.312h0.768c125.44 0 227.456 99.392 227.456 221.568v1.92H729.088l147.072 142.976 147.2-142.976h-99.84v-1.984zM398.912 259.392c27.584 0 50.048-21.184 50.048-47.104v-194.752c0-25.984-22.464-47.104-49.984-47.104H114.048c-27.584 0-50.048 21.184-50.048 47.104v194.752c0 25.984 22.464 47.104 50.048 47.104h284.864m0 64H114.048c-62.976 0-114.048-49.792-114.048-111.104v-194.752c0-61.312 51.008-111.104 114.048-111.104h284.928c62.976 0 113.984 49.856 113.984 111.104v194.752c0 61.312-51.008 111.104-114.048 111.104zM906.176 797.184c27.584 0 50.048-21.12 50.048-47.104v-194.752c0-25.984-22.464-47.168-50.048-47.168H621.248c-27.584 0-49.984 21.184-49.984 47.168V750.08c0 25.984 22.464 47.104 49.984 47.104h284.928m0 64H621.248c-62.976 0-113.984-49.728-113.984-111.104v-194.752c0-61.376 51.008-111.168 113.984-111.168h284.992c62.912 0 114.048 49.728 114.048 111.168V750.08c-0.064 61.312-51.072 111.104-114.112 111.104z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -1,5 +1,5 @@
<template> <template>
<svg class="icon file-icon" aria-hidden="true" :style="{'font-size': size + 'px'}"> <svg class="icon file-icon" aria-hidden="true" :style="{ 'font-size': size + 'px' }">
<use :xlink:href="getFileTypeIcon()"></use> <use :xlink:href="getFileTypeIcon()"></use>
</svg> </svg>
</template> </template>
@ -36,10 +36,15 @@ const getFileTypeIcon = () => {
rar: 'icon-rar', rar: 'icon-rar',
} }
if (iconObj[name]) {
return '#' + iconObj[name] return '#' + iconObj[name]
}
else {
return '#icon-zuoye1'
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

View File

@ -4,6 +4,7 @@ import useUserStore from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
const baseConfig = { const baseConfig = {
// Electron 设置cookie // Electron 设置cookie
// url: import.meta.env.VITE_APP_BASE_API,
url: 'https://file.ysaix.com:7868', url: 'https://file.ysaix.com:7868',
//cookie 名称 这里为 token //cookie 名称 这里为 token
name: 'Admin-Token', name: 'Admin-Token',
@ -14,13 +15,20 @@ const baseConfig = {
} }
// 作业 // 作业布置
const homeWork = { const homeWork = {
data: { ...baseConfig}, data: { ...baseConfig},
// 完整路径 // 完整路径
fullPath: `${baseConfig.url}/teaching/classtaskassign?titleName=%E4%BD%9C%E4%B8%9A%E5%B8%83%E7%BD%AE` fullPath: `${baseConfig.url}/teaching/classtaskassign?titleName=%E4%BD%9C%E4%B8%9A%E5%B8%83%E7%BD%AE`
} }
// 作业反馈
const feedback = {
data: { ...baseConfig},
// 完整路径
fullPath: `${baseConfig.url}/teaching/classtaskassign?titleName=作业反馈`
}
// 高考研读 // 高考研读
const gk = { const gk = {
data: { ...baseConfig}, data: { ...baseConfig},
@ -41,6 +49,7 @@ const aiModel = {
export default { export default {
homeWork, homeWork,
feedback,
gk, gk,
standard, standard,
aiModel aiModel

View File

@ -10,6 +10,10 @@
</div> </div>
<div class="prepare-item-info-message"> <div class="prepare-item-info-message">
<div style="width: 60px"> <div style="width: 60px">
<template v-if="item.uniquekey">
{{ item.worktype }}
</template>
<template v-else>
<el-icon <el-icon
v-loading="item.async === 'on'" v-loading="item.async === 'on'"
style="background-color: green; border-radius: 20px; color: white; top: 2px" style="background-color: green; border-radius: 20px; color: white; top: 2px"
@ -20,13 +24,15 @@
{{ item.async === true ? '已同步' : '' }} {{ item.async === true ? '已同步' : '' }}
{{ !item.async ? '待同步' : '' }} {{ !item.async ? '待同步' : '' }}
{{ item.async === 'on' ? '同步中' : '' }} {{ item.async === 'on' ? '同步中' : '' }}
</template>
</div> </div>
| <template v-if="item.fileSize">|</template>
<div style="width: 70px">{{ formatFileSize(item.fileSize) }}</div> <div style="width: 70px" v-if="item.fileSize">{{ formatFileSize(item.fileSize) }}</div>
| <template v-if="item.uploadTime">|</template>
<div style="width: 70px">{{ toTimeText(item.uploadTime, true) }}</div> <div style="width: 70px" v-if="item.uploadTime">{{ toTimeText(item.uploadTime, true) }}</div>
|&nbsp; <template v-if="item.levelFirstName">|&nbsp;</template>
<div <div
v-if="item.levelFirstName"
style=" style="
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -59,6 +65,21 @@
<template #default> <template #default>
<div style="width: 100%"> <div style="width: 100%">
<div class="item-popover" @click="closePopver(index)"> <div class="item-popover" @click="closePopver(index)">
<template v-if="item.uniquekey">
<div class="item-popover-item">
<el-button text @click="editTalk(item, index)">
<i class="iconfont icon-bianji"></i>
<span>布置</span>
</el-button>
</div>
<div class="item-popover-item">
<el-button text @click="deleteTalk(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
</el-button>
</div>
</template>
<template v-else>
<div class="item-popover-item"> <div class="item-popover-item">
<el-button text @click="editTalk(item, index)"> <el-button text @click="editTalk(item, index)">
<i class="iconfont icon-bianji"></i> <i class="iconfont icon-bianji"></i>
@ -85,6 +106,7 @@
<span>移动</span> <span>移动</span>
</el-button> </el-button>
</div> </div>
</template>
</div> </div>
</div> </div>
</template> </template>
@ -236,6 +258,10 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.icon-zuoye{
font-size: 40px;
color: #707070
}
} }
.prepare-body-main-item-tool { .prepare-body-main-item-tool {

View File

@ -38,6 +38,7 @@
</el-popover> </el-popover>
</div> </div>
<div style="display: flex"> <div style="display: flex">
<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-button type="primary" style="margin-left: 10px" @click="createFile">新建课件</el-button> <el-button type="primary" style="margin-left: 10px" @click="createFile">新建课件</el-button>
@ -67,15 +68,19 @@ import ChooseTextbook from '@/components/choose-textbook/index.vue'
import uploadDialog from '@/components/upload-dialog/index.vue' import uploadDialog from '@/components/upload-dialog/index.vue'
import { Refresh } from '@element-plus/icons-vue' import { Refresh } from '@element-plus/icons-vue'
import uploaderState from '@/store/modules/uploader' import uploaderState from '@/store/modules/uploader'
import useUserStore from '@/store/modules/user'
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 } from '@/api/file' import { getSmarttalkPage, moveSmarttalk } from '@/api/file'
import { homeworklist, listEntpcourse } from '@/api/teaching/classwork'
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 outLink from '@/utils/linkConfig' import outLink from '@/utils/linkConfig'
import { createWindow } from '@/utils/tool' import { createWindow } from '@/utils/tool'
import { uniqBy, cloneDeep } from 'lodash'
const { ipcRenderer } = window.electron || {} const { ipcRenderer } = window.electron || {}
export default { export default {
@ -103,6 +108,10 @@ export default {
}, },
// //
curBookImg: '', curBookImg: '',
//
userStore: '',
entpcourseid: '',
timerId: null
} }
}, },
computed: { computed: {
@ -113,6 +122,7 @@ export default {
} }
}, },
created() { created() {
this.userStore = useUserStore().user
ipcRenderer.removeAllListeners('copy-file-default-reply') ipcRenderer.removeAllListeners('copy-file-default-reply')
ipcRenderer.on('copy-file-default-reply', (e, param) => { ipcRenderer.on('copy-file-default-reply', (e, param) => {
this.callback(param) this.callback(param)
@ -244,7 +254,7 @@ export default {
this.isLoading = false this.isLoading = false
}) })
}, },
nodeClick(data) { async nodeClick(data) {
if (this.currentNode.id === data.node.id) return if (this.currentNode.id === data.node.id) return
this.curBookImg = data.textBook.curBookImg this.curBookImg = data.textBook.curBookImg
this.checkFileList = [] this.checkFileList = []
@ -255,15 +265,100 @@ export default {
this.uploadData.levelThirdId = cata[2] this.uploadData.levelThirdId = cata[2]
this.uploadData.textbookId = data.textBook.curBookId this.uploadData.textbookId = data.textBook.curBookId
this.asyncAllFile() this.asyncAllFile()
if (this.uploadData.levelSecondId) {
// ID
const res = await this.getChapterId()
this.entpcourseid = res.rows[0].id
//
this.getHomeWorkList()
}
}, },
// //
handleOutLink(key){ handleOutLink(key) {
if (key == 'homeWork') {
//
this.createTimer()
}
// key linkConfig.js // key linkConfig.js
let configObj = outLink[key] let configObj = outLink[key]
// //
ipcRenderer.send('openWindow', { ipcRenderer.send('openWindow', {
fullPath: configObj.fullPath, fullPath: configObj.fullPath,
cookieData: {...(configObj.data)} cookieData: { ...(configObj.data) }
})
},
// ID ID
getChapterId() {
return listEntpcourse({ evalid: this.uploadData.levelSecondId, edituserid: this.userStore.userId, pageSize: 500 })
},
//
createTimer() {
this.timerId = setInterval(() => {
this.getHomeWorkList()
}, 1500)
},
//
getHomeWorkList() {
homeworklist({ entpcourseid: this.entpcourseid, edituserid: this.userStore.userId, pageSize: 100 }).then(res => {
// AIx web
let list = []
for (var i = 0; i < res.rows.length; i++) {
res.rows[i].taskconfig = [];
// child
for (var j = 0; j < res.rows.length; j++) {
if (res.rows[j].parentid == res.rows[i].id) {
var ss = [];
if (res.rows[j].classworkdatastudentids != null) {
ss = JSON.parse('[' + res.rows[j].classworkdatastudentids + ']');
}
var js = {
id: res.rows[j].id,
classid: res.rows[j].classid,
classcaption: res.rows[j].classcaption,
parentid: 0,
worktype: '',
workkey: res.rows[j].workkey,
worktag: '',
entpcourseid: 0,
evalid: 0,
edusubject: '',
edudegree: '',
workdate: '',
title: '',
workcodes: '',
studentlist: ss,
deaddate: res.rows[j].deaddate,
timelength: res.rows[j].timelength,
weights: res.rows[j].weights,
feedtype: res.rows[j].feedtype
}
res.rows[i].taskconfig.push(js);
}
}
res.rows[i].fileShowName = res.rows[i].uniquekey
// slideid>0PPT
// 2024-05-15jackyshen
if (res.rows[i].classid == 0 && res.rows[i].slideid == 0) {
list.push(res.rows[i]);
}
//
if (res.rows[i].entpcourseworklist != '') {
res.rows[i].entpcourseworklistarray = JSON.parse('[' + res.rows[i].entpcourseworklist + ']');
} else {
res.rows[i].entpcourseworklistarray = [];
}
}
//
let ary = uniqBy([...this.currentFileList, ...list], 'id')
//
this.currentFileList = cloneDeep(ary)
}) })
}, },
// PDF- // PDF-
@ -274,6 +369,13 @@ export default {
openLesson() { openLesson() {
createWindow('tool-sphere', { url: '/tool/sphere' }) createWindow('tool-sphere', { url: '/tool/sphere' })
} }
},
watch: {
$route(to) {
if (to.path != '/prepare' && this.timerId) {
clearInterval(this.timerId)
}
}
} }
} }
</script> </script>
@ -329,7 +431,8 @@ export default {
justify-content: center; justify-content: center;
position: relative; position: relative;
background: linear-gradient(#b0d1ef, #3e7bcb); background: linear-gradient(#b0d1ef, #3e7bcb);
.top-zoom-style{
.top-zoom-style {
position: absolute; position: absolute;
width: 90%; width: 90%;
height: 30px; height: 30px;
@ -337,7 +440,8 @@ export default {
bottom: 0; bottom: 0;
clip-path: polygon(3% 0%, 97% 0%, 100% 100%, 0% 100%); clip-path: polygon(3% 0%, 97% 0%, 100% 100%, 0% 100%);
} }
.textbook-img{
.textbook-img {
height: 120px; height: 120px;
background-color: #ffffff; background-color: #ffffff;
padding: 5px; padding: 5px;
@ -346,36 +450,43 @@ export default {
margin-right: 20px; margin-right: 20px;
z-index: 1; z-index: 1;
} }
.top-item{
.top-item {
width: 230px; width: 230px;
position: relative; position: relative;
flex-wrap: wrap; flex-wrap: wrap;
z-index: 1; z-index: 1;
.btn{
.btn {
width: 102px; width: 102px;
background: none; background: none;
color: #ffffff; color: #ffffff;
border-width: 2px; border-width: 2px;
border-color: #ffffff; border-color: #ffffff;
&:hover{
&:hover {
background: rgba(255, 255, 255, 0.3) background: rgba(255, 255, 255, 0.3)
} }
&:first-child{
&:first-child {
margin-left: 12px; margin-left: 12px;
margin-bottom: 15px; margin-bottom: 15px;
} }
&:nth-child(2){
&:nth-child(2) {
margin-bottom: 15px; margin-bottom: 15px;
} }
} }
} }
.to-class-btn{
.to-class-btn {
width: 130px; width: 130px;
height: 80px; height: 80px;
margin-left: 25px; margin-left: 25px;
font-size: 18px; font-size: 18px;
z-index: 1; z-index: 1;
.icon-lingdang{
.icon-lingdang {
margin-right: 5px; margin-right: 5px;
color: #ffffff; color: #ffffff;
font-size: 20px; font-size: 20px;