Compare commits

...

19 Commits

Author SHA1 Message Date
朱浩 a67f801356 Merge pull request 'zhuhao_dev' (#210) from zhuhao_dev into main
Reviewed-on: #210
2024-09-14 16:01:51 +08:00
朱浩 1c89217fbf Merge branch 'main' into zhuhao_dev 2024-09-14 16:01:08 +08:00
朱浩 3a20f453c6 APT上课 2024-09-14 16:00:45 +08:00
朱浩 dfa5c7d99b APT上课 2024-09-14 15:59:40 +08:00
lyc e144fbe36a Merge pull request 'lyc-dev' (#209) from lyc-dev into main 2024-09-14 15:13:05 +08:00
lyc b279d36c89 edit 2024-09-14 15:12:36 +08:00
lyc 8013b1c2cc edit 2024-09-14 14:59:35 +08:00
baigl 610aac6985 Merge pull request 'baigl' (#208) from baigl into main
Reviewed-on: #208
2024-09-14 14:22:36 +08:00
白了个白 6c85654608 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-09-14 14:22:02 +08:00
白了个白 a5b6cd3516 1 2024-09-14 14:18:13 +08:00
lyc 01718f573b Merge pull request '警告' (#207) from lyc-dev into main 2024-09-14 13:44:42 +08:00
lyc ec9c673b5a 警告 2024-09-14 13:44:35 +08:00
白了个白 578fc9feba 1 2024-09-14 10:23:45 +08:00
白了个白 f49cba5e36 作业管理:放开作业设计弹窗、作业布置的外部链接跳转;批阅界面需求变更调整; 2024-09-14 10:14:40 +08:00
白了个白 490add5467 工作台右侧工作动态的作业, 新增可点击并弹框批改 2024-09-13 16:27:09 +08:00
白了个白 634ae460f3 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-09-13 15:32:58 +08:00
白了个白 1cc7007852 作业分离后 接口传参修改 2024-09-13 14:02:05 +08:00
朱浩 502cf13168 Merge branch 'main' into zhuhao_dev 2024-09-13 09:53:55 +08:00
朱浩 a4fa5be295 文件上传修改 2024-09-13 09:30:36 +08:00
17 changed files with 708 additions and 244 deletions

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "1.2.2",
"version": "1.2.3",
"description": "An Electron application with Vue",
"main": "./out/main/index.js",
"author": "example.com",

View File

@ -224,7 +224,7 @@ export default async function ({ app, shell, BrowserWindow, ipcMain }) {
formData.append(key, uploadData[key])
}
}
formData.append('fileFlag', '教案')
formData.append('fileFlag', '课件')
uploadFileByFS({
url: uploadUrl,
path,

View File

@ -68,7 +68,7 @@ function createLoginWindow() {
function createMainWindow() {
mainWindow = new BrowserWindow({
width: 1200,
minWidth: 1200,
minWidth: 1350,
height: 700,
show: false,
frame: false, // 无边框
@ -142,9 +142,9 @@ async function createLinkWin(data) {
.catch((error) => {})
data.fullPath = data.fullPath.replaceAll('//', '/')
if (data.fullPath.indexOf('?') !== -1) {
data.fullPath += '&urlSource=smarttalk'
data.fullPath += '&urlSource=smarttalk&t' + Date.now()
}else {
data.fullPath += '?urlSource=smarttalk'
data.fullPath += '?urlSource=smarttalk&t' + Date.now()
}
linkWin[data.key].loadURL(data.fullPath)

View File

@ -16,7 +16,7 @@ import { ref, onMounted, nextTick } from 'vue'
default: 50, // 100
},
})
const emit = defineEmits(['loaded'])
const emit = defineEmits(['loaded', 'onSuccess'])
const displayedText = ref('')

View File

@ -65,7 +65,7 @@
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { ref, onMounted, watch } from 'vue'
import useUserStore from '@/store/modules/user'
import outLink from '@/utils/linkConfig'
import Answer from './container/text.vue'
@ -200,12 +200,16 @@ const closeChart = () =>{
isOpen.value = false
}
watch(isOpen, (newVal)=>{
if(newVal){
if (!conversation_id) {
getChartId();
}
}
})
onMounted(() => {
conversation_id = localStorage.getItem("conversation_id");
if (!conversation_id) {
getChartId();
}
})
</script>

View File

@ -104,11 +104,16 @@ const getSubjectContent = async () => {
pageSize: 10000
}
let data;
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
data = rows
if(localStorage.getItem('evaluationList')){
evaluationList.value = JSON.parse(localStorage.getItem('evaluationList'))
}
else{
const { rows } = await listEvaluation(params)
localStorage.setItem('evaluationList', JSON.stringify(rows))
evaluationList.value = rows
}
treeLoading.value = false
//
@ -263,12 +268,16 @@ const transData = (data) => {
//
const getSubject = async () => {
if(localStorage.getItem('subjectList')){
subjectList.value = JSON.parse(localStorage.getItem('subjectList'))
}
else{
const { rows } = await listEvaluation({ itemkey: "version", edusubject, edustage, pageSize: 10000,orderby: 'orderidx asc', })
const { rows } = await listEvaluation({ itemkey: "version", edusubject, edustage, pageSize: 10000,orderby: 'orderidx asc', })
// subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject)
subjectList.value = rows
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
// subjectList.value = rows.filter(item => item.edustage == edustage && item.edusubject == edusubject)
subjectList.value = rows
localStorage.setItem('subjectList', JSON.stringify(subjectList.value))
}
//
if(!subjectList.value.length) return

View File

@ -34,7 +34,7 @@ const getFileTypeIcon = () => {
gif: 'icon-gif',
txt: 'icon-txt',
rar: 'icon-rar',
apt: 'icon-lunwen'
}
if (iconObj[name]) {
return '#' + iconObj[name]
@ -47,4 +47,4 @@ const getFileTypeIcon = () => {
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped></style>

View File

@ -9,7 +9,7 @@
</div>
</div> -->
<transition mode="out-in" name="fade-transform">
<div v-show="$route != null" style="height: 100%; flex: 1">
<div v-show="$route != null" style="height: 100%; flex: 1;width: 100%">
<router-view v-slot="{ Component, route }">
<keep-alive>
<component :is="Component" v-if="route.meta.keepAlive" :key="route.name" />

View File

@ -140,7 +140,7 @@ const getClassWorkList = () => {
edustage: userStore.edustage,//
edusubject: userStore.edusubject,//
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,//
orderby: 'uniquekey DESC',
orderby: 'concat(deaddate,uniquekey) DESC',
pageSize: 100
}).then((response) => {
for (var i = 0; i < response.rows.length; i++) {
@ -213,7 +213,8 @@ const getStudentClassWorkData = () => {
edustage: userStore.edustage,//
edusubject: userStore.edusubject,//
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,//
orderby: "uniquekey DESC",
status: '1', // 1-
orderby: "uniquekey DESC",// TODO deaddate
pageSize: 1000
}).then((res) => {
for (var t = 0; t < classWorkList.value.length; t++) {
@ -369,7 +370,8 @@ const getStudentVisible = async () => {
edustage: userStore.edustage,//
edusubject: userStore.edusubject,//
deaddate: tabActive.value === '进行中'? getTomorrow() : EndDate.value,//
orderby: 'uniquekey DESC',
status: '1', // 1-
orderby: 'concat(deaddate,uniquekey) DESC',
pageSize: 100
})
const curWorkList = response.rows

View File

@ -150,6 +150,7 @@
:min-scale="0.2"
:preview-src-list="stuItem.imagefile"
:initial-index="4"
fit="contain"
/>
</div>
</el-col>
@ -233,6 +234,7 @@
.map((item) => item.url)
"
:initial-index="4"
fit="contain"
/>
</div>
</div>
@ -276,6 +278,7 @@
.map((item) => item.url)
"
:initial-index="4"
fit="contain"
/>
</div>
</div>
@ -314,102 +317,102 @@
</el-card>
</div>
</div>
</div>
<!-- 批改评价与评语 -->
<div class="tacher_conten_foot">
<el-row style="padding: 1% 4%; border: 2px dotted">
<el-col :span="24" style="display: flex; flex-direction: column">
<el-row>
<el-col :span="14">
<div style="display: flex; margin: 10px auto">
<span style="display: flex; align-items: center">
<span v-if="dialogProps.studentObj.worktype == '习题训练'">
<span>得分 </span>
<span style="margin: 0; color: red">{{
classWorkFormScore.teacherRating.reduce((a, b) => a + b.score, 0).toFixed(2)
}}</span>
<span></span>
</span>
<span v-else>
<span>得分 </span>
<span v-if="classWorkFormScore.teacherRating.length > 0">
<el-input-number
v-model="classWorkFormScore.teacherRating[0].score"
:controls="false"
type="number"
:min="0"
:max="classWorkFormScore.teacherRating[0].maxScore"
size="small"
style="width: 60px"
@change="handleChange"
></el-input-number>
<!-- 批改评价与评语 -->
<div class="tacher_conten_foot">
<el-row style="padding: 1% 4%; border: 2px dotted">
<el-col :span="24" style="display: flex; flex-direction: column">
<el-row>
<el-col :span="14">
<div style="display: flex; margin: 10px auto">
<span style="display: flex; align-items: center">
<span v-if="dialogProps.studentObj.worktype == '习题训练'">
<span>得分 </span>
<span style="margin: 0; color: red">{{
classWorkFormScore.teacherRating.reduce((a, b) => a + b.score, 0).toFixed(2)
}}</span>
<span></span>
</span>
<span v-else>
<span>得分 </span>
<span v-if="classWorkFormScore.teacherRating.length > 0">
<el-input-number
v-model="classWorkFormScore.teacherRating[0].score"
:controls="false"
type="number"
:min="0"
:max="classWorkFormScore.teacherRating[0].maxScore"
size="small"
style="width: 60px"
@change="handleChange"
></el-input-number>
</span>
<span></span>
</span>
<span></span>
</span>
</span>
<div class="score-container">
<div
v-for="(score, index) in teacherRatingList"
:key="index"
:class="[
'score-circle',
{ active: classWorkFormScore.rating == score.ratingKey }
]"
@click="selectScore(score)"
>
{{ score.ratingValue }}
<div class="score-container">
<div
v-for="(score, index) in teacherRatingList"
:key="index"
:class="[
'score-circle',
{ active: classWorkFormScore.rating == score.ratingKey }
]"
@click="selectScore(score)"
>
{{ score.ratingValue }}
</div>
</div>
</div>
</div>
</el-col>
<el-col :span="10" style="display: flex; align-items: center">
<el-select
v-model="value"
placeholder="常用评语"
style="width: 240px"
@change="onSelectOption"
>
<el-option
v-for="item in cities"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<template #footer>
<el-button v-if="!isAdding" text bg size="small" @click="onAddOption">
新增常用语
</el-button>
<template v-else>
<el-input
v-model="optionName"
class="option-input"
placeholder="输入新的常用语"
size="small"
/>
<el-button type="primary" size="small" @click="onConfirm"> 确定 </el-button>
<el-button size="small" @click="clear">取消</el-button>
</el-col>
<el-col :span="10" style="display: flex; align-items: center">
<el-select
v-model="value"
placeholder="常用评语"
style="width: 240px"
@change="onSelectOption"
>
<el-option
v-for="item in cities"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<template #footer>
<el-button v-if="!isAdding" text bg size="small" @click="onAddOption">
新增常用语
</el-button>
<template v-else>
<el-input
v-model="optionName"
class="option-input"
placeholder="输入新的常用语"
size="small"
/>
<el-button type="primary" size="small" @click="onConfirm"> 确定 </el-button>
<el-button size="small" @click="clear">取消</el-button>
</template>
</template>
</template>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="24" style="display: flex; flex-direction: column">
<el-form-item label="评语说明">
<el-col :span="15" style="padding: 0px">
<el-input
v-model="classWorkFormScore.teacherremark"
type="textarea"
rows="3"
placeholder="请输入评语说明"
/>
</el-col>
</el-form-item>
</el-col>
</el-row>
<div style="margin: 10px">
<el-button type="primary" @click="onClassWorkFormScoreSave">批阅确认</el-button>
</el-select>
</el-col>
</el-row>
</el-col>
<el-col :span="24" style="display: flex; flex-direction: column">
<el-form-item label="评语说明">
<el-col :span="15" style="padding: 0px">
<el-input
v-model="classWorkFormScore.teacherremark"
type="textarea"
rows="1"
placeholder="请输入评语说明"
/>
</el-col>
</el-form-item>
</el-col>
</el-row>
<div style="margin: 10px">
<el-button type="primary" @click="onClassWorkFormScoreSave">批阅确认</el-button>
</div>
</div>
</div>
</div>

View File

@ -10,7 +10,7 @@
destory-on-close
:before-close="onBeforeClose"
>
<template #title>
<template #header>
<div style="font-size: 18px; display: flex; flex-wrap: nowrap">
<div style="flex: 1">
{{ classWorkAnalysis.title }}答题情况

View File

@ -10,7 +10,7 @@
<el-scrollbar height="500px">
<ul>
<!--作业-->
<li class="flex class-item home-list" v-for="item in homeworkList" :key="item.id">
<li class="flex class-item home-list" v-for="item in homeworkList" :key="item.id" @click="onClickItem(item)">
<div class="class-left flex">
<div class="class-name flex">
<span class="name">{{ item.uniquekey }}</span>
@ -24,9 +24,11 @@
<div>已交</div>
</div>
</li>
<el-empty v-if="!homeworkList.length" description="暂无数据" />
</ul>
</el-scrollbar>
</div>
<item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog>
</div>
</template>
<script setup>
@ -34,19 +36,21 @@ import { ref, onMounted } from 'vue'
import useUserStore from '@/store/modules/user'
import { getSelfReserv } from '@/api/classManage'
import { homeworklist } from '@/api/teaching/classwork'
import { getCurrentTime } from '@/utils/date'
import { getCurrentTime, getTomorrow } from '@/utils/date'
import ItemDialog from '@/views/classTask/container/item-dialog.vue'
const type = ref(-1)
const user = useUserStore().user
const loading = ref(false)
const classList = ref([])
const homeworkList = ref([])
const itemDialogRef = ref(null)
//
const getClass = async () => {
loading.value = true
try {
const res = await getSelfReserv()
const res = await getSelfReserv()
let list = res.data || []
list.sort((a, b) => { if (a.status == '上课中') return -1; else return 0 })
classList.value = list.filter(item => item.status !== '已结束')
@ -59,15 +63,34 @@ const getHomework = async () => {
loading.value = true
const { edustage, edusubject } = user
try {
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, status: '1' ,orderby: 'uniquekey DESC', pageSize: 500 })
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey)
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, deaddate: getTomorrow(), status: '1', orderby: 'uniquekey DESC', pageSize: 500 })
//
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey && getCurrentTime('YYYY-MM-DD HH:mm') < item.deaddate)
homeworkList.value.forEach((item) => {
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
//
if (item.entpcourseworklist != '') {
item.entpcourseworklistarray = JSON.parse(
'[' + item.entpcourseworklist + ']'
)
} else {
item.entpcourseworklistarray = []
}
})
} finally {
loading.value = false
}
}
//
const onClickItem = (item) => {
console.log('开启弹窗')
itemDialogRef.value.openDialog(item)
}
//
const closeDialog = () => {
console.log('关闭弹窗,查询一下作业数据,更新界面')
getHomework()
}
const tagType = (time) => {
return getCurrentTime('YYYY-MM-DD HH:mm') > time ? 'info' : 'warning'
@ -92,7 +115,8 @@ onMounted(() => {
font-weight: bold;
margin-bottom: 10px;
align-items: center;
.title{
.title {
margin-right: 5px;
}
}
@ -163,8 +187,7 @@ onMounted(() => {
}
.class-grade {
padding-top: 3px
}
padding-top: 3px }
}
}

View File

@ -104,12 +104,14 @@ const menuList = [{
{
name: '作业设计',
icon: 'icon-jiaoxuefansi',
disabled: true
isOuter: true,
path: '/teaching/classtaskassign?titleName=作业布置&&openDialog=newClassTask'
},
{
name: '作业布置',
icon: 'icon-xiezuo1',
disabled: true
isOuter: true,
path: '/teaching/classtaskassign?titleName=作业布置'
},
{
name: '作业批改',

View File

@ -0,0 +1,323 @@
<template>
<div class="prepare-body-main-item">
<div class="prepare-body-main-item-icon">
<slot name="default"></slot>
<FileImage :size="50" :file-name="item.fileShowName" @click="openFileWin(item)" />
</div>
<div class="prepare-body-main-item-info" @click="openFileWin(item)">
<div class="prepare-item-info-title" :title="item.fileShowName">
<div
style="
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 200px;
"
>
{{ item.fileShowName.substring(0, item.fileShowName.lastIndexOf('.')) }}
<el-tag type="danger" effect="dark">{{item.fileShowName.substring(item.fileShowName.lastIndexOf('.')+1)}}</el-tag>
<template v-if="item.fileTag">
<el-tag v-for="(item1, index1) in item.fileTag.split(',')" :key="index1" type="success" effect="dark" style="margin-left: 5px">{{item1}}</el-tag>
</template>
</div>
</div>
<div class="prepare-item-info-message">
<div v-if="item.fileFlag ==='课件'" style="width: 60px">
<el-icon
v-loading="item.async === 'on'"
style="background-color: green; border-radius: 20px; color: white; top: 2px"
>
<Check v-if="item.async === true" />
<UploadFilled v-if="!item.async" />
</el-icon>
{{ item.async === true ? '已同步' : '' }}
{{ !item.async ? '待同步' : '' }}
{{ item.async === 'on' ? '同步中' : '' }}
</div>
<template v-if="item.fileFlag ==='课件'">|</template>
<div style="width: 70px">访问 100</div>
|
<div style="width: 70px">引用 50</div>
|
<div
style="
flex: 1;
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 200px;
">点赞 20</div>
</div>
</div>
<div class="prepare-body-main-item-btn">
<el-button type="primary" @click="clickStartClass(item)">上课</el-button>
</div>
<div class="prepare-body-main-item-tool">
<el-popover
:ref="'popover_' + index"
placement="left-start"
:hide-after="100"
popper-class="prepare-popper"
trigger="click"
>
<template #default>
<div style="width: 100%">
<div class="item-popover" @click="closePopver(index)">
<div v-if="userInfo.userId === Number(item.createUserId)" class="item-popover-item">
<el-button text @click="editTalk(item, index)">
<i class="iconfont icon-bianji"></i>
<span>标签</span>
</el-button>
</div>
<div v-if="userInfo.userId === Number(item.createUserId)" class="item-popover-item">
<el-button text @click="deleteTalk(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
</el-button>
</div>
</div>
</div>
</template>
<template #reference>
<span class="iconfont icon-shenglvehao" style="cursor: pointer" @click.stop></span>
</template>
</el-popover>
</div>
</div>
</template>
<script setup>
import { Check, UploadFilled, Switch } from '@element-plus/icons-vue'
</script>
<script>
import FileImage from '@/components/file-image/index.vue'
import { asyncLocalFile } from '@/utils/talkFile'
import { toTimeText } from '@/utils/date'
import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file'
import useUserStore from '@/store/modules/user'
import outLink from '@/utils/linkConfig'
const { ipcRenderer } = window.electron || {}
export default {
name: 'FileListItem',
components: { FileImage },
props: {
item: {
type: Object,
default: function () {
return {}
}
},
index: {
type: Number,
default: function () {
return 0
}
}
},
emits: { 'on-start-class': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
data() {
return {
listenList: [],
userInfo:{}
}
},
mounted() {
this.userInfo = useUserStore().user
},
methods: {
clickStartClass(item) {
this.$emit('on-start-class', item)
},
editTalk(item) {
ElMessageBox.prompt('请输入新的标签', '添加标签', {
confirmButtonText: '确认',
cancelButtonText: '取消',
inputValue: "",
inputPattern: /^[a-zA-Z0-9\u4e00-\u9fa5]{1,5}$/,
inputErrorMessage: '请输入最多五个字的标签,不能携带标点符号'
})
.then(({ value }) => {
let fileTagList = []
if (!item.fileTag) {
item.fileTag="";
fileTagList = [];
}else {
fileTagList = item.fileTag.split(',');
}
fileTagList.push(value);
item.fileTagList = fileTagList;
item.fileTag = fileTagList.join(",")
updateSmarttalk({ id: item.id, fileTag: item.fileTag, fileShowName: item.fileShowName }).then((res) => {
if (res.data === true) {
ElMessage({
type: 'success',
message: `添加成功!`
})
}
})
})
.catch(() => {})
},
downloadFile(item) {
ipcRenderer.send('save-as', item.fileFullPath, item.fileShowName)
},
deleteTalk(item) {
deleteSmarttalk(item.id).then((res) => {
if (res.data === true) {
this.$emit('on-delete', item)
}
})
},
closePopver(index) {
this.$refs['popover_' + index].hide()
},
formatFileSize(fileSize) {
if (fileSize < 1024) {
return fileSize + 'B'
} else if (fileSize < 1024 * 1024) {
let temp = fileSize / 1024
temp = temp.toFixed(2)
return temp + 'KB'
} else if (fileSize < 1024 * 1024 * 1024) {
let temp = fileSize / (1024 * 1024)
temp = temp.toFixed(2)
return temp + 'MB'
} else {
let temp = fileSize / (1024 * 1024 * 1024)
temp = temp.toFixed(2)
return temp + 'GB'
}
},
openFileWin(items) {
if (items.fileFlag === 'apt') {
console.log(items);
const path="/teaching/aptindex?id="+items.fileId
let configObj = outLink().getBaseData()
let fullPath = configObj.fullPath + path
fullPath = fullPath.replaceAll('//', '/')
//
ipcRenderer.send('openWindow', {
key: path,
fullPath: fullPath,
cookieData: { ...configObj.data }
})
return
}
if (!items||!items.fileSuffix) return;
getPrepareById(items.id).then((item) => {
Object.assign(items, item)
asyncLocalFile(items).then(() => {
ipcRenderer.send('open-path-app', item.fileNewName)
if (this.listenList.indexOf(item.fileNewName) === -1) {
this.listenList.push(item.fileNewName)
let cookie = localStorage.getItem('Admin-Token')
ipcRenderer.send('listen-file-change', {
id: item.id,
fileNewName: item.fileNewName,
md5: item.fileMd5,
cookie,
fileType: item.fileType
})
ipcRenderer.on('listen-file-change-on' + item.fileNewName, () => {
items.async = 'on'
})
ipcRenderer.on('listen-file-change-success' + item.fileNewName, (e, { data, md5 }) => {
items.fileSize = data.fileSize
items.md5 = md5
items.async = true
})
}
})
})
},
//
setHomeWork(item) {
// this.$emit('on-set', item)
},
//
deleteHomework(item){
this.$emit('on-delhomework', item)
},
// web AIX
openFileLink(item){
let unitId = item.levelSecondId ? item.levelSecondId : item.levelFirstId
// key linkConfig.js
let key = 'filehomework'
let configObj = outLink()[key]
//
ipcRenderer.send('openWindow', {
key,
fullPath: configObj.fullPath + `&fileShowName=${item.fileShowName}&fileFullPath=${item.fileFullPath}&unitId=${unitId}`,
cookieData: { ...configObj.data }
})
this.$emit('on-filearg', item)
}
}
}
</script>
<style>
.prepare-item-info-message {
.circular {
width: 100% !important;
}
}
</style>
<style scoped lang="scss">
.prepare-body-main-item {
display: flex;
align-items: center;
border-bottom: 1px solid rgba(131, 131, 127, 0.17);
padding: 10px 0;
&:hover {
background-color: rgba(144, 147, 153, 0.2);
cursor: pointer;
}
.prepare-body-main-item-icon {
width: 80px;
display: flex;
justify-content: center;
align-items: center;
.icon-zuoye {
font-size: 40px;
color: #707070;
}
}
.prepare-body-main-item-tool {
font-size: 18px !important;
font-weight: bold;
width: 40px;
text-align: center;
}
.prepare-body-main-item-info {
display: flex;
flex-direction: column;
min-width: 0;
flex: 1;
.prepare-item-info-title {
text-align: left;
font-size: 16px;
display: flex;
}
.prepare-item-info-message {
font-size: 12px;
line-height: 23px;
color: #909399;
display: flex;
.circular {
width: 100% !important;
}
}
}
}
</style>

View File

@ -2,7 +2,7 @@
<el-dialog
v-model="centerDialogVisible"
class="reserv-dialog"
title="预约课程"
title="上课"
destroy-on-close
:before-close="closeDialog"
width="600"
@ -74,7 +74,7 @@
<template #footer>
<div class="dialog-footer">
<el-button @click="centerDialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitForm"> 提交 </el-button>
<el-button type="primary" @click="submitForm"> 上课 </el-button>
</div>
</template>
</el-dialog>
@ -105,7 +105,7 @@ const userStore = useUserStore().user
const centerDialogVisible = ref(false)
const form = reactive({
name: '',
type: '常规课',
type: '互动课',
day: '',
time: [],
resource: [],
@ -126,12 +126,6 @@ const ruleForm = reactive({
resource: [{ required: true, message: '请选择授课对象', trigger: 'change' }]
})
const locationOptions = [
{
label: '常规课',
value: '常规课',
disabled: false,
message: '现场公屏授课,学生无需长时间打开平板上。'
},
{
label: '互动课',
value: '互动课',
@ -288,13 +282,13 @@ const addClassReserv = (formData) => {
ex2: props.currentNode.id
}
addSmartClassReserv(param).then((res) => {
if (res.data === true) {
if (res.msg) {
closeDialog()
ElMessage({
type: 'success',
message: '预约成功!'
})
emit('addSuccess')
emit('addSuccess',res.msg)
} else {
ElMessage({
type: 'error',

View File

@ -1,8 +1,38 @@
<template>
<div v-loading="isLoading" class="page-resource flex">
<ChooseTextbook @change-book="nodeClick" @node-click="nodeClick" />
<div class="page-center-wrap">
<el-tabs v-model="activeAptTab" style="height: 100%;">
<el-tab-pane label="教学课件" name="教学课件" class="prepare-center-jxkj">
<div class="prepare-center-header">
<div class="center-create-btn" style="background-color: rgb(64,158,255)" @click="createAptFile">
<div class="create-btn-title"><el-icon><Plus /></el-icon><label>APT</label></div>
<div class="create-btn-info">智能交互课件</div>
</div>
<div class="center-create-btn" style="background-color: rgb(112,182,3)" @click="createFile">
<div class="create-btn-title"><el-icon><Plus /></el-icon><label>PPT</label></div>
<div class="create-btn-info">传统课件</div>
</div>
</div>
<div class="prepare-center-body">
<kj-list-item
v-for="(item, index) in currentKJFileList"
:key="index"
:item="item"
:index="index"
@on-delete="deleteTalk"
@on-start-class="startClass"
>
</kj-list-item>
</div>
</el-tab-pane>
<el-tab-pane label="教学实录" name="教学实录" class="prepare-center-jxsl">
<class-reserv></class-reserv>
</el-tab-pane>
</el-tabs>
</div>
<div class="page-right">
<div class="header-top flex">
<!-- <div class="header-top flex">
<div class="textbook-img" @click="navtoPdf">
<el-image style="width: 80px; height: 110px" :src="curBookImg" />
<el-progress
@ -32,85 +62,82 @@
<label>{{ curClassReserv.startTime }}-{{ curClassReserv.endTime }}</label>
</el-button>
<div class="top-zoom-style"></div>
</div>
<div class="prepare-body-header">
<div>
<label style="font-size: 15px">{{ currentFileList.length }}个文件</label>&nbsp;
<el-popover placement="top-start" :width="250" trigger="hover">
<template #default>
</div>-->
<div style="padding: 0 20px;height: 100%;">
<el-tabs v-model="activeTab" class="prepare-tabs" >
<el-tab-pane label="素材" name="素材">
<div class="prepare-body-header">
<div>
<el-button
v-if="lastAsyncAllTime"
type="success"
size="small"
:icon="Check"
circle
/>
{{ lastAsyncAllTime ? toTimeText(lastAsyncAllTime) + '同步成功' : '' }}
<label style="font-size: 15px">{{ currentFileList.length }}个文件</label>&nbsp;
<el-popover placement="top-start" :width="250" trigger="hover">
<template #default>
<div>
<el-button
v-if="lastAsyncAllTime"
type="success"
size="small"
:icon="Check"
circle
/>
{{ lastAsyncAllTime ? toTimeText(lastAsyncAllTime) + '同步成功' : '' }}
</div>
</template>
<template #reference>
<el-button size="small" text @click="asyncAllFile">
<el-icon v-loading="asyncAllFileVisiable">
<Refresh />
</el-icon>
{{ asyncAllFileVisiable ? '同步中' : '云同步' }}
</el-button>
</template>
</el-popover>
<el-button size="small" @click="isDialogOpen = true">上传资料</el-button>
</div>
</template>
<template #reference>
<el-button size="small" text @click="asyncAllFile">
<el-icon v-loading="asyncAllFileVisiable">
<Refresh />
</el-icon>
{{ asyncAllFileVisiable ? '同步中' : '云同步' }}
</el-button>
</template>
</el-popover>
</div>
<div style="display: flex">
<el-button @click="handleOutLink('feedback')">作业反馈</el-button>
<el-button @click="handleOutLink('homeWork')">布置作业</el-button>
<el-button @click="isDialogOpen = true">上传资料</el-button>
<el-dropdown trigger="click" style="margin-left: 12px">
<el-button type="primary">
新建课件<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>
<el-checkbox-group
v-model="checkFileList"
class="prepare-body-main"
:style="{ 'margin-bottom': checkFileList.length > 0 ? '40px' : '0' }"
>
<file-list-item
v-for="(item, index) in currentSCFileList"
:key="index"
:item="item"
:index="index"
@on-move="onMoveSingleFile"
@on-delete="deleteTalk"
@on-set="openSet"
@on-delhomework="delhomework"
@on-filearg="isOpenHomework = true"
>
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
</file-list-item>
</el-checkbox-group>
</el-tab-pane>
<el-tab-pane label="作业" name="作业">
<div class="prepare-body-header">
<div>
<label style="font-size: 15px">{{ currentWorkList.length }}个作业</label>&nbsp;
<el-button size="small" @click="handleOutLink('feedback')">作业反馈</el-button>
<el-button size="small" @click="handleOutLink('homeWork')">布置作业</el-button>
</div>
</div>
<div class="prepare-work-wrap">
<file-list-item
v-for="(item, index) in currentWorkList"
:key="index"
:item="item"
:index="index"
@on-move="onMoveSingleFile"
@on-delete="deleteTalk"
@on-set="openSet"
@on-delhomework="delhomework"
>
</file-list-item>
</div>
</el-tab-pane>
</el-tabs>
</div>
<el-checkbox-group
v-model="checkFileList"
class="prepare-body-main"
:style="{ 'margin-bottom': checkFileList.length > 0 ? '40px' : '0' }"
>
<file-list-item
v-for="(item, index) in currentFileList"
:key="index"
:item="item"
:index="index"
@on-move="onMoveSingleFile"
@on-delete="deleteTalk"
@on-set="openSet"
@on-delhomework="delhomework"
@on-filearg="isOpenHomework = true"
>
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
</file-list-item>
<file-list-item
v-for="(item, index) in currentWorkList"
:key="index"
:item="item"
:index="index"
@on-move="onMoveSingleFile"
@on-delete="deleteTalk"
@on-set="openSet"
@on-delhomework="delhomework"
>
<el-checkbox v-if="!item.uniquekey" label="" :value="item" />
</file-list-item>
</el-checkbox-group>
<file-oper-batch
v-show="checkFileList.length > 0"
:indeterminate="checkFileList.length > 0 && checkFileList.length < currentFileList.length"
@ -132,10 +159,9 @@
:book-id="uploadData.textbookId"
@add-success="initReserv"
></reserv>
<!-- <button @click="ipcMsgSend('tool-sphere:close')">测试</button> -->
</template>
<script setup>
import { Check } from '@element-plus/icons-vue'
import { Check,Plus } from '@element-plus/icons-vue'
import Reserv from '@/views/prepare/container/reserv.vue'
import { ArrowDown } from '@element-plus/icons-vue'
</script>
@ -149,6 +175,7 @@ import useUserStore from '@/store/modules/user'
import { useToolState } from '@/store/modules/tool'
import MoveFile from '@/components/move-file/index.vue'
import FileListItem from '@/views/prepare/container/file-list-item.vue'
import KjListItem from '@/views/prepare/container/kj-list-item.vue'
import { getSmarttalkPage, moveSmarttalk, creatAPT } from '@/api/file'
import { toTimeText } from '@/utils/date'
import { ElMessage } from 'element-plus'
@ -159,10 +186,10 @@ import outLink from '@/utils/linkConfig'
import { createWindow, sessionStore } from '@/utils/tool'
import { cloneDeep } from 'lodash'
import { delClasswork, listEntpcourse } from '@/api/teaching/classwork'
import { getSelfReserv } from '@/api/classManage'
import { getClassInfo, getSelfReserv } from '@/api/classManage'
import { useGetHomework } from '@/hooks/useGetHomework'
import { addEntpcoursefileReturnId } from '@/api/education/entpcoursefile'
import ClassReserv from '@/views/classManage/classReserv.vue'
const toolStore = useToolState()
const fs = require('fs')
@ -175,9 +202,11 @@ export default {
Refresh,
uploadDialog,
FileListItem,
KjListItem,
FileOperBatch,
MoveFile,
SetHomework
SetHomework,
ClassReserv
},
data() {
return {
@ -196,6 +225,8 @@ export default {
curClassReserv: {},
downloadNum: 0,
lastAsyncAllTime: '',
activeTab: "素材",
activeAptTab: "教学课件",
uploadData: {
textbookId: null,
levelFirstId: 39103,
@ -219,6 +250,12 @@ export default {
return (
this.checkFileList.length > 0 && this.checkFileList.length === this.currentFileList.length
)
},
currentKJFileList() {
return this.currentFileList.filter((item) => item.fileFlag === 'apt' || item.fileFlag === '课件')
},
currentSCFileList() {
return this.currentFileList.filter((item) => item.fileFlag !== 'apt' && item.fileFlag !== '课件')
}
},
@ -230,13 +267,13 @@ export default {
this.callback(param)
})
this.lastAsyncAllTime = localStorage.getItem('lastAsyncAllTime')
this.initReserv()
// this.initReserv()
},
mounted() {
this.$watch(
() => toolStore.isToolWin,
(newD, oldD) => {
setTimeout(this.initReserv, 500)
// setTimeout(this.initReserv, 500)
}
)
// electron
@ -256,16 +293,19 @@ export default {
// }
// },
methods: {
initReserv() {
getSelfReserv().then((res) => {
let list = res.data.filter((item) => {
return item.status !== '已结束'
})
if (list.length > 0) {
this.curClassReserv = list[list.length - 1]
} else {
this.curClassReserv = {}
}
startClass(item) {
console.log(item)
if(item.fileFlag === '课件') {
this.openReserv()
}
if(item.fileFlag === 'apt') {
//TODO apt
}
},
initReserv(id) {
getClassInfo(id).then((res) => {
this.curClassReserv = res.data
this.openLesson(res.data.id);
})
},
getBookPathFromServer() {
@ -312,7 +352,7 @@ export default {
},
createAptFile() {
listEntpcourse({
evalid: this.uploadData.levelSecondId,
evalid: this.currentNode.id,
edituserid: this.userStore.userId,
pageSize: 500
}).then((response) => {
@ -596,7 +636,7 @@ export default {
})
},
// -
async openLesson() {
async openLesson(id) {
// await startClass(this.curClassReserv.id)
createWindow('tool-sphere', {
url:
@ -605,7 +645,7 @@ export default {
'&label=' +
this.currentNode.label +
'&reservId=' +
this.curClassReserv.id
id
})
}
}
@ -643,20 +683,78 @@ export default {
user-select: none;
padding-top: 10px;
height: 100%;
:deep(.el-tabs__nav) {
.el-tabs__item{
font-weight: bold;
font-size: 18px;
}
}
.page-center-wrap{
flex: 1;
height: 100%;
padding: 0 10px;
.prepare-center-jxkj{
height: 100%;
display: flex;
flex-direction: column;
.prepare-center-header{
display: flex;
cursor: pointer;
.center-create-btn{
cursor: pointer;
margin: 5px;
flex: 1;
height: 60px;
border-radius: 5px;
.create-btn-title{
font-weight: 900;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
color: #ffffff;
height: 15px;
margin-top: 15px;
label{
cursor: pointer;
}
}
.create-btn-info{
cursor: pointer;
font-size: 12px;
color: #ffffff;
margin-top: 5px;
}
}
}
.prepare-center-body{
flex: 1;
overflow: auto;
}
}
.prepare-center-jxsl{
height: 100%;
}
}
.page-right {
overflow: hidden;
position: relative;
min-width: 0;
flex: 1;
margin-left: 20px;
min-width: 375px;
width: 375px;
height: 100%;
background: #ffffff;
border-radius: 10px;
box-shadow: 0px 0px 20px 0px rgba(99, 99, 99, 0.06);
display: flex;
flex-direction: column;
.prepare-tabs{
height: 100%;
:deep(.el-tab-pane) {
height: 100%;
display: flex;
flex-direction: column;
}
}
.header-top {
height: 150px;
align-items: center;
@ -742,20 +840,24 @@ export default {
}
.prepare-body-header {
height: 60px;
//height: 60px;
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: space-between;
padding: 0 20px;
//padding: 0 20px;
}
.prepare-work-wrap{
width: 100%;
flex: 1;
overflow: auto;
}
.prepare-body-main {
flex: 1;
width: 100%;
overflow: auto;
padding: 0 30px;
//padding: 0 30px;
line-height: normal;
}
}

View File

@ -135,6 +135,8 @@ function submit() {
userStore.login({username:props.user.userName,password:props.user.plainpwd}).then(() => {
userStore.getInfo().then(res => {
if(res.code === 200){
localStorage.removeItem('subjectList')
localStorage.removeItem('evaluationList')
ElMessage.success('修改成功')
}else{
ElMessage.error(response.msg)