备课模块---查询作业列表

This commit is contained in:
lyc 2024-07-30 17:02:23 +08:00
parent d5165fa3b0
commit 12332348b0
12 changed files with 226 additions and 53 deletions

View File

@ -9,7 +9,6 @@ export const listEvaluation = (params)=> {
})
}
export const addFileToPrepare = (params) => {
return request({
url: '/smarttalk/file/addFileToPrepare',
@ -17,3 +16,4 @@ export const addFileToPrepare = (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-family: "iconfont"; /* Project id 2794390 */
src: url('iconfont.woff2?t=1721815727687') format('woff2'),
url('iconfont.woff?t=1721815727687') format('woff'),
url('iconfont.ttf?t=1721815727687') format('truetype'),
url('iconfont.svg?t=1721815727687#iconfont') format('svg');
src: url('iconfont.woff2?t=1722323882803') format('woff2'),
url('iconfont.woff?t=1722323882803') format('woff'),
url('iconfont.ttf?t=1722323882803') format('truetype'),
url('iconfont.svg?t=1722323882803#iconfont') format('svg');
}
.iconfont {
@ -14,6 +14,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-zuoye1:before {
content: "\e610";
}
.icon-xiazai9:before {
content: "\e60b";
}

File diff suppressed because one or more lines are too long

View File

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

View File

@ -14,6 +14,8 @@
/>
<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="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

@ -36,10 +36,15 @@ const getFileTypeIcon = () => {
rar: 'icon-rar',
}
if (iconObj[name]) {
return '#' + iconObj[name]
}
else {
return '#icon-zuoye1'
}
}
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

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

View File

@ -68,15 +68,19 @@ import ChooseTextbook from '@/components/choose-textbook/index.vue'
import uploadDialog from '@/components/upload-dialog/index.vue'
import { Refresh } from '@element-plus/icons-vue'
import uploaderState from '@/store/modules/uploader'
import useUserStore from '@/store/modules/user'
import MoveFile from '@/components/move-file/index.vue'
import FileListItem from '@/views/prepare/container/file-list-item.vue'
import { getSmarttalkPage, moveSmarttalk } from '@/api/file'
import { homeworklist, listEntpcourse } from '@/api/teaching/classwork'
import { toTimeText } from '@/utils/date'
import { ElMessage } from 'element-plus'
import { parseCataByNode, creatPPT, asyncLocalFile } from '@/utils/talkFile'
import FileOperBatch from '@/views/prepare/container/file-oper-batch.vue'
import outLink from '@/utils/linkConfig'
import { createWindow } from '@/utils/tool'
import { uniqBy, cloneDeep } from 'lodash'
const { ipcRenderer } = window.electron || {}
export default {
@ -104,6 +108,10 @@ export default {
},
//
curBookImg: '',
//
userStore: '',
entpcourseid: '',
timerId: null
}
},
computed: {
@ -114,6 +122,7 @@ export default {
}
},
created() {
this.userStore = useUserStore().user
ipcRenderer.removeAllListeners('copy-file-default-reply')
ipcRenderer.on('copy-file-default-reply', (e, param) => {
this.callback(param)
@ -245,7 +254,7 @@ export default {
this.isLoading = false
})
},
nodeClick(data) {
async nodeClick(data) {
if (this.currentNode.id === data.node.id) return
this.curBookImg = data.textBook.curBookImg
this.checkFileList = []
@ -256,9 +265,21 @@ export default {
this.uploadData.levelThirdId = cata[2]
this.uploadData.textbookId = data.textBook.curBookId
this.asyncAllFile()
if (this.uploadData.levelSecondId) {
// ID
const res = await this.getChapterId()
this.entpcourseid = res.rows[0].id
//
this.getHomeWorkList()
}
},
//
handleOutLink(key) {
if (key == 'homeWork') {
//
this.createTimer()
}
// key linkConfig.js
let configObj = outLink[key]
//
@ -267,6 +288,79 @@ export default {
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-
navtoPdf() {
createWindow('open-PDF', { url: '/classBegins/index' })
@ -275,6 +369,13 @@ export default {
openLesson() {
createWindow('tool-sphere', { url: '/tool/sphere' })
}
},
watch: {
$route(to) {
if (to.path != '/prepare' && this.timerId) {
clearInterval(this.timerId)
}
}
}
}
</script>
@ -330,6 +431,7 @@ export default {
justify-content: center;
position: relative;
background: linear-gradient(#b0d1ef, #3e7bcb);
.top-zoom-style {
position: absolute;
width: 90%;
@ -338,6 +440,7 @@ export default {
bottom: 0;
clip-path: polygon(3% 0%, 97% 0%, 100% 100%, 0% 100%);
}
.textbook-img {
height: 120px;
background-color: #ffffff;
@ -347,35 +450,42 @@ export default {
margin-right: 20px;
z-index: 1;
}
.top-item {
width: 230px;
position: relative;
flex-wrap: wrap;
z-index: 1;
.btn {
width: 102px;
background: none;
color: #ffffff;
border-width: 2px;
border-color: #ffffff;
&:hover {
background: rgba(255, 255, 255, 0.3)
}
&:first-child {
margin-left: 12px;
margin-bottom: 15px;
}
&:nth-child(2) {
margin-bottom: 15px;
}
}
}
.to-class-btn {
width: 130px;
height: 80px;
margin-left: 25px;
font-size: 18px;
z-index: 1;
.icon-lingdang {
margin-right: 5px;
color: #ffffff;