Compare commits

...

21 Commits

Author SHA1 Message Date
白了个白 2ad1904802 Merge branch 'main' of http://27.128.240.72:3000/zhuhao/AIx_Smarttalk into baigl 2024-10-11 16:28:04 +08:00
zouyf 5b1986afaf Merge pull request 'zouyf_dev' (#309) from zouyf_dev into main
Reviewed-on: #309
2024-10-11 16:05:36 +08:00
“zouyf” df46413c1c Merge branch 'main' into zouyf_dev 2024-10-11 16:04:12 +08:00
“zouyf” cd5abd864d [考试分析] - 优化非绑定菁优网章节不显示试题 2024-10-11 16:03:56 +08:00
朱浩 155631a3e3 Merge pull request 'zhuhao_dev' (#308) from zhuhao_dev into main
Reviewed-on: #308
2024-10-11 15:01:02 +08:00
朱浩 f209bc673f Merge branch 'main' into zhuhao_dev 2024-10-11 15:00:23 +08:00
朱浩 acc20b79f1 #895 V2.1.5 【教学实践】“APT”“PPT”现在创建后是先生成文档,再点击进入,应该改成创建后直接默认打开进入编辑页面 2024-10-11 14:59:23 +08:00
朱浩 b4dca57828 #909 V2.1.5 平台版本号应该在平台内展示出来。方便查阅是否为最新版本 2024-10-11 14:51:46 +08:00
朱浩 3c064ebffd #924 V2.1.5 PPT上课,点击上课之后,默认打开当前课程PPT 2024-10-11 14:41:36 +08:00
朱浩 07fa4c9790 修改资源为活动,去除窗口和互动 2024-10-11 13:42:03 +08:00
朱浩 e253a6c9dc #876 教学实践,上课时检查未结束课程逻辑 2024-10-10 17:42:48 +08:00
“zouyf” f6f804a09e 1 2024-10-10 17:32:13 +08:00
zouyf 89097eab31 Merge pull request 'zouyf_dev' (#307) from zouyf_dev into main
Reviewed-on: #307
2024-10-10 16:03:06 +08:00
lyc ef18d4adf4 Merge pull request 'lyc-dev' (#306) from lyc-dev into main 2024-10-10 16:01:01 +08:00
lyc bff59d699f edit 2024-10-10 16:01:22 +08:00
lyc 7d457782cc edit 2024-10-10 16:00:13 +08:00
“zouyf” d0947da293 Merge branch 'main' into zouyf_dev 2024-10-10 15:58:45 +08:00
“zouyf” fd734ab645 客观题不许修改分数 2024-10-10 15:54:38 +08:00
baigl 233d065f9c Merge pull request 'baigl' (#305) from baigl into main
Reviewed-on: #305
2024-10-10 15:53:17 +08:00
朱浩 4b2f2aa73a Merge branch 'main' into zhuhao_dev 2024-10-10 10:12:57 +08:00
朱浩 71bd199f4a 打开调试窗口 2024-10-10 10:12:38 +08:00
17 changed files with 384 additions and 356 deletions

View File

@ -1,6 +1,6 @@
{
"name": "aix-win",
"version": "2.1.3",
"version": "2.1.5",
"description": "",
"main": "./out/main/index.js",
"author": "example.com",

View File

@ -74,7 +74,7 @@ function createLoginWindow() {
updateInit(loginWindow)
}
// loginWindow.webContents.openDevTools()
loginWindow.webContents.openDevTools()
loginWindow.once('ready-to-show', () => {
loginWindow.show()
})
@ -128,7 +128,7 @@ function createMainWindow() {
shell.openExternal(details.url)
return { action: 'deny' }
})
// mainWindow.webContents.openDevTools()
mainWindow.webContents.openDevTools()
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])

View File

@ -147,10 +147,11 @@ export function updateSmartClassReserv(data) {
})
}
//查询课程预约
export function getSelfReserv() {
export function getSelfReserv(params) {
return request({
url: '/smarttalk/classReserv/getSelfReserv',
method: 'get'
method: 'get',
params
})
}
export function deleteSmartReserv(id) {

View File

@ -9,6 +9,14 @@ export function listClasscourse(query) {
})
}
export function listClasscourseNew(query) {
return request({
url: '/education/classcourse/new/list',
method: 'get',
params: query
})
}
// 查询classcourse详细
export function getClasscourse(id) {
return request({

View File

@ -49,7 +49,7 @@ import { useGetSubject } from '@/hooks/useGetSubject'
const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
// emit
const emit = defineEmits(['nodeClick'])
const emit = defineEmits(['nodeClick', 'changeBook'])
let useSubject = null
const subjectList = ref([])
const dialogVisible = ref(false)
@ -164,7 +164,6 @@ const handleNodeClick = (data) => {
sessionStore.set('subject.defaultExpandedKeys', defaultExpandedKeys)
sessionStore.set('subject.curNode', nodeData)
emit('nodeClick', curData)
}
onMounted( async () => {
treeLoading.value = true

View File

@ -305,210 +305,11 @@ export const processList = (row) => {
.join('、')
row[i].workanswerFormat = answer
}
}
/*
//2、处理单选题
if(row[i].worktype == '单选题' || row[i].worktype == '多选题' ){
//1.选项前增加ABCD workdesc: "①②#&①③#&②④#&③④" || "<div>为了活着</div>#&<div>为了填报肚子</div>#&<div>为了吃饭而吃饭</div>"
let workDescArr = [];
if(row[i].workdesc.indexOf('[')!==-1 && row[i].workdesc.indexOf(']')!==-1) {
//123会直接被转换, 且不是数组对象, 故手动判断是否有[和]两个字符
workDescArr = JSON.parse(row[i].workdesc);
}
else if(row[i].workdesc.indexOf('#&')) {
workDescArr = row[i].workdesc.split('#&');
}
else if(row[i].workdesc.indexOf(',')){
workDescArr = row[i].workdesc.split(',');
}
else {
// 待考虑
workDescArr.push(item.workdesc)
}
//2.答案 - 数字转为ABCD
if(row[i].worktype == '单选题') {
const str2Char = String.fromCharCode(65+Number(row[i].workanswer));
row[i].workanswerFormat = str2Char;
} else if (row[i].worktype == '多选题') {
const answerArr = row[i].workanswer.split('#&');
let arr2Char = '';
for(let k=0; k<answerArr.length; k++){
arr2Char += String.fromCharCode(65+Number(answerArr[k]));
}
row[i].workanswerFormat = arr2Char;
}
}
else if(row[i].worktype == '填空题') {
// console.log(row[i].workanswer.replace(/<[^>]*>/g, "").split('#&'),'????')
// 填空题答案
row[i].workanswerFormat = row[i].workanswer.replace(/#&/g," ");
// 填空选项不需要展示,
row[i].workdescFormat = '';
}
else if(row[i].worktype == '判断题'){
// console.log(row[i].workanswer.replace(/<[^>]*>/g, "").split('#&'),'????')
// 判断题答案
row[i].workanswerFormat = row[i].workanswer.replace(/#&/g," ");
// 判断选项不需要展示,
row[i].workdescFormat = '';
}
else if(row[i].worktype == '复合题') {
// 1.选项解析替换
const options = JSON.parse(row[i].workdesc);
// 题目(背景材料+复合题目)
const bjTitle = row[i].title.split('!@#$%')[0];
const tmTitles = row[i].title.split('!@#$%').filter((it,ix)=>ix>0);
// console.log(bjTitle,'背景标题');
// console.log(tmTitles,'复合题目');
let titls = [];
options.forEach((element,index1) => {
const workDescArr = element.split('#&');
let tmp = '';
let j=0;
for(; j<jsonArr.length; j++){
if(j%2 == 0){
tmp += `<div style='width:80%;display:flex;'>`;
}
const char = String.fromCharCode(65+j);
tmp += `<div style='display:flex;margin-left: 2%; width: 36%'>${char}.${jsonArr[j]}</div>`;
if(j%2 == 1){
tmp += '</div>';
}
}
if(j%2== 0){
tmp += '</div>';
}
workdesc = tmp;
}
row[i].workdescFormat = workdesc; // 题目选项
// 答案处理
let workanswer = '';
if(row[i].workanswer && row[i].workanswer != '') {
// 因答案内容存在多种格式: 1.["123","1234"] 2.123#&1234 3.123
if(row[i].workanswer.indexOf('[')!==-1 && row[i].workanswer.indexOf(']')!==-1) {
//123会直接被转换, 且不是数组对象, 故手动判断是否有[和]两个字符
let json = JSON.parse(row[i].workanswer);
// 单选、多选 需要 数字转为ABCD
if(row[i].worktype == '单选题') {
const str2Char = String.fromCharCode(65+Number(json[0]));
workanswer = str2Char;
} else if (row[i].worktype == '多选题') {
// const answerArr = row[i].workanswer.split('#&');
let arr2Char = '';
for(let k=0; k<json.length; k++){
arr2Char += String.fromCharCode(65+Number(json[k]));
}
workanswer = arr2Char;
} else if(row[i].worktype == '主观题' ) {
let arr2Char = '';
for(let k=0; k<json.length; k++){
const itemArr = json[k];
arr2Char += '('+ (parseInt(k) + 1) +')'+ itemArr.join('、')+ '<br />';
}
workanswer = arr2Char;
row[i].titleFormat = row[i].titleFormat.replace(/!@#\$%/g, '');
} else {
workanswer = json.join('、');
}
} else if(row[i].workanswer.indexOf('#&')) {
// 意味着多个答案或者填空内容
let workanswerList = row[i].workanswer.split('#&');
if(row[i].worktype == '多选题') {
// 数字转为ABCD
let arr2Char = '';
for(let k=0; k<workanswerList.length; k++){
arr2Char += String.fromCharCode(65+Number(workanswerList[k]));
}
workanswer = arr2Char;
}else{
workanswer = workanswerList.join('、');
}
} else if(row[i].workanswer.indexOf(',')){
// 意味这同样多个答案或者填空内容
let workanswerList = row[i].workanswer.split(',');
if(row[i].worktype == '多选题') {
// 数字转为ABCD
let arr2Char = '';
for(let k=0; k<workanswerList.length; k++){
arr2Char += String.fromCharCode(65+Number(workanswerList[k]));
}
workanswer = arr2Char;
}else{
workanswer = workanswerList.join('、');
}
} else {
// 待考虑
workanswer = row[i].workanswer;
}
}
row[i].workanswerFormat = workanswer; // 题目正确答案
//2.答案 - 数字转为ABCD
const answerArr = JSON.parse(row[i].workanswer);
let indexLabel = 1;
let arr = [];
answerArr.forEach(item => {
const arrTmp = item.answer.split('#&');
let value = `(${indexLabel})`;
arrTmp.forEach((element,i) => {
if(item.type == '单选题' || item.type == '多选题'){
value += `${String.fromCharCode(65+Number(element))}`;
}
if(item.type == '判断题' || item.type == '填空题'){
// 去除下 html标签
value += `${element.replace(/<[^>]+>/g, '')}`+ (i==arrTmp.length-1?'':'、');
}
})
arr.push(value);
indexLabel++;
})
const answer = arr.join('<br />');
row[i].workanswerFormat = answer;
}
else if(row[i].worktype == '主观题') {
// 1.选项解析替换---主观题没选项
// 题目(背景材料+主观题目)
const bjTitle = row[i].title.split('!@#$%')[0];
const tmTitles = row[i].title.split('!@#$%').filter((it,ix)=>ix>0);
// console.log(bjTitle,'背景标题');
// console.log(tmTitles,'主观题目');
let titls = [];
const s = [];
tmTitles.map((it,ix)=>{
s.push(it);
})
// console.log(s,'?????????????????')
row[i].titleFormat = bjTitle + s.join('');
// 填空选项不需要展示,
row[i].workdescFormat = '';
//2.答案
// 填空题答案
const workanswerList = JSON.parse(row[i].workanswer);
let tmp='';
workanswerList&&workanswerList.map((item,index)=>{
tmp += '<div>'+(index+1)+'.'+item.replace(/#&/g, '')+'</div>';
})
row[i].workanswerFormat = tmp;
}
else {
//处理答案
row[i].workanswerFormat = '见试题解答内容';
}
*/
// else {
// // 其余类型试题类型(因学科不同, 大多为主观题类型, 结构为数组)
// row[i].workanswerFormat = workAnswerArr.join('、')
// }
}
}
}
}

View File

@ -138,7 +138,7 @@ export const createWindow = async (type, data) => {
wins_tool.setIgnoreMouseEvents(true, {forward: true}) // 忽略鼠标事件但是事件继续传递给窗口
wins_tool.setAlwaysOnTop(true,'screen-saver') // 将窗口设置为顶层窗口
wins_tool.setVisibleOnAllWorkspaces(true) // 如果窗口在所有工作区都可见
// wins_tool.webContents.openDevTools() // 打开调试工具
wins_tool.webContents.openDevTools() // 打开调试工具
eventHandles(type, wins_tool) // 事件监听处理
return wins_tool
}
@ -165,7 +165,7 @@ export const createWindow = async (type, data) => {
win.type = type // 唯一标识
win.show()
win.setFullScreen(true) // 设置窗口为全屏
// win.webContents.openDevTools() // 打开调试工具
win.webContents.openDevTools() // 打开调试工具
eventHandles(type, win) // 事件监听处理
winPdf=win
break

View File

@ -1,25 +1,25 @@
<template>
<el-container class="class-reserv-wrap">
<div class="class-reserv-tabs">
<!-- <div class="class-reserv-tabs">
<el-segmented v-model="tabActive" block :options="tabOptions" size="large" />
</div>
</div>-->
<div class="class-reserv-body">
<template v-for="(item, index) in dataList" :key="index">
<reserv-item
v-for="(item, index) in activeDataList"
v-show="tabActive === '进行中'"
:key="index"
:style="{'background-color': index%2==0?'#f5f5f5':''}"
:item="item"
v-if="item.bookImg"
@open-edit="reservDialog.openDialog(item)"
@delete-reserv="deleteReserv(item)"
></reserv-item>
<reserv-item
v-for="(item, index) in doneDataList"
v-show="tabActive === '已结束'"
:key="index"
<reserv-item-apt
v-if="!item.bookImg"
:style="{'background-color': index%2==0?'#f5f5f5':''}"
:item="item"
@open-edit="reservDialog.openDialog(item)"
@delete-reserv="deleteReserv(item)"
></reserv-item>
></reserv-item-apt>
</template>
</div>
<reserv ref="reservDialog"></reserv>
</el-container>
@ -28,44 +28,62 @@
<script setup>
import { ref, onMounted, computed, watch } from 'vue'
import { getSelfReserv } from '@/api/classManage'
import { listClasscourseNew } from '@/api/teaching/classcourse' // api
import ReservItem from '@/views/classManage/reserv-item.vue'
import Reserv from '@/views/prepare/container/reserv.vue'
import { useToolState } from '@/store/modules/tool'
import { sessionStore } from '@/utils/tool'
import useUserStore from '@/store/modules/user'
import ReservItemApt from '@/views/classManage/reserv-item-apt.vue'
const reservDialog = ref(null)
const tabOptions = ref(['进行中', '已结束'])
const tabActive = ref('进行中')
const dataList = ref([])
const activeDataList = computed(() => {
const toolStore = useToolState()
const userStore = useUserStore()
/*const activeDataList = computed(() => {
return dataList.value.filter((item) => {
return item.status !== '已结束'
})
})*/
const props = defineProps({
curNode: {
type: Object,
default: () => {}
}
})
const deleteReserv = (item) => {
dataList.value = dataList.value.filter((is) => {
return is.id !== item.id
})
}
const doneDataList = computed(() => {
/*const doneDataList = computed(() => {
return dataList.value.filter((item) => {
return item.status === '已结束'
})
})
})*/
//
const getData = () => {
getSelfReserv().then((res) => {
Promise.all([listClasscourseNew({teacherid: userStore.id,evalid: props.curNode.id,pageSize:1000}), getSelfReserv({ex2:props.curNode.id})]).then(([res1,res2])=>{
let list = res2.data || []
let list2 = res1.rows || []
// list.sort((a,b) => { if(a.status=='') return -1; else return 0 })
list = list.concat(list2)
list.sort((a,b) => { return new Date(b.createTime) - new Date(a.createTime) })
dataList.value = list
})
/*getSelfReserv().then((res) => {
const list = res.data || []
list.sort((a,b) => { if(a.status=='上课中') return -1; else return 0 })
dataList.value = list
})
})*/
}
const toolStore = useToolState()
watch(
() => [dataList,toolStore.isToolWin],
() => [dataList,toolStore.isToolWin,props.curNode],
() => {
console.log('====',toolStore)
setTimeout(()=>{
getData() //
},300)
@ -81,13 +99,14 @@ onMounted(() => {
height: 100%;
display: flex;
flex-direction: column;
padding: 15px 30px;
//padding: 15px 10px;
.class-reserv-tabs {
width: 30%;
text-align: left;
}
.class-reserv-body {
height: 100%;
font-size: 12px;
flex: 1;
overflow: auto;
padding: 10px 0;

View File

@ -0,0 +1,127 @@
<template>
<div class="class-reserv-item">
<div class="class-reserv-item-body">
{{ item.openDate }}&nbsp;{{ item.openTime }}
</div>
<div style="flex: 1;max-width: 400px">
<span>{{item.caption}}</span>
</div>
<div class="class-reserv-item-tool" style="width: 200px;max-width: 300px">
<el-tag v-if="item.status === 'close'" style="margin-right: 5px" type="success">已结束</el-tag>
<el-tag v-if="item.status === 'open'" style="margin-right: 5px" type="danger">上课中</el-tag>
<el-button v-if="item.status === 'open'" :disabled="toolStore.isToolWin" size="small" type="primary" @click="startClassR(item)"
>继续上课</el-button
>
<!-- <el-button v-if="item.status === '未开始'" @click="openEdit">编辑</el-button>-->
<el-button v-if="item.status === 'open'" size="small" type="info" @click="endClassR(item)"
>下课</el-button
>
</div>
<div class="class-reserv-item-tool" style="width: 50px;">
<!-- <el-button v-if="item.status!='open'" size="small" type="danger" @click="deleteReserv">删除</el-button>-->
<el-tag>APT</el-tag>
</div>
<div style="min-width: 150px;"><span> 浏览25955 点赞26605</span></div>
</div>
</template>
<script setup>
import { useToolState } from '@/store/modules/tool'
import useUserStore from '@/store/modules/user'
import { createWindow } from '@/utils/tool'
import { deleteSmartReserv, startClass, endClass } from '@/api/classManage'
import { ElMessage } from 'element-plus'
import { listEntpcourse } from '@/api/teaching/classwork'
const emit = defineEmits(['openEdit', 'deleteReserv'])
const props = defineProps({
item: {
type: Object,
default: () => {}
}
})
const basePath = import.meta.env.VITE_APP_BUILD_BASE_PATH
const toolStore = useToolState() // -tool
const openEdit = () => {
emit('openEdit', props.item)
}
const deleteReserv = () => {
deleteSmartReserv([props.item.id]).then((res) => {
if (res.data === true) {
ElMessage({
message: '删除成功',
type: 'success'
})
emit('deleteReserv', props.item)
}
})
}
const startClassR = (item) => {
// startClass(item.id).then((res) => {
// if (res.data === true) {
// item.status = ''
// openLesson()
// }
// })
// item.status = ''
openLesson()
}
const endClassR = (item) => {
/*endClass(item.id).then((res) => {
if (res.data === true) {
ElMessage({
message: '下课成功',
type: 'success'
})
item.status = '已结束'
}
})*/
}
// const toolStore = useToolState()
let wins = null;
// -
const openLesson = () => {
// startClass(props.item.id)
/*listEntpcourse({
evalid: props.item.ex2,
edituserid: useUserStore().user.userId,
pageSize: 500
}).then(async res=>{
if (res.rows[0].id) {
wins = await createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res.rows[0].id + "&reservId=" + props.item.id })
}
})*/
}
</script>
<style scoped lang="scss">
.class-reserv-item {
display: flex;
background-color: white;
border-radius: 10px;
padding: 5px;
margin-bottom: 10px;
.class-reserv-item-img {
width: 60px;
img {
width: 100%;
}
}
.class-reserv-item-body {
display: flex;
align-items: center;
text-align: left;
padding-left: 5px;
width: 120px;
.class-reserv-item-title1 {
flex: 1;
label {
font-size: 20px;
font-weight: bold;
}
}
}
.class-reserv-item-tool {
margin-left: 15px;
display: flex;
align-items: center;
}
}
</style>

View File

@ -1,34 +1,27 @@
<template>
<div class="class-reserv-item">
<div class="class-reserv-item-img">
<img :src="basePath + item.bookImg" alt="封面" />
</div>
<div class="class-reserv-item-body">
<div class="class-reserv-item-title1">
<label>{{ item.className }}</label>
<el-tag style="margin-left: 5px" type="primary"> {{ item.classType }}</el-tag>
<el-tag style="margin-left: 5px" type="primary"> {{ item.classSubject }}</el-tag>
{{ item.classDay }}&nbsp;{{ item.startTime }}
</div>
<div class="class-reserv-item-title2">
{{ item.classDay }}&nbsp;{{ item.startTime }} ~ {{ item.classDay }}&nbsp;{{ item.endTime }}
{{ item.createUserName }}老师
<div style="flex: 1;max-width: 400px">
<span v-for="(tag, index) in item.classItemList" :key="index">{{ index === 0 ? tag.name : '' + tag.name }}</span>
</div>
<div class="class-reserv-item-title3">
<span v-for="(tag, index) in item.classItemList" :key="index" style="margin-left: 5px">
{{ index === 0 ? tag.name : '、' + tag.name }}</span
<div class="class-reserv-item-tool" style="width: 200px;max-width: 300px">
<el-tag v-if="item.status === '已结束'" style="margin-right: 5px" type="success">已结束</el-tag>
<el-tag v-if="item.status === '上课中'" style="margin-right: 5px" type="danger">上课中</el-tag>
<el-button v-if="item.status === '上课中'" :disabled="toolStore.isToolWin" size="small" type="primary" @click="startClassR(item)"
>继续上课</el-button
>
</div>
</div>
<div class="class-reserv-item-tool">
<el-button v-if="item.status !== '已结束'" :disabled="toolStore.isToolWin" type="primary" @click="startClassR(item)"
>{{item.status == '上课中'?'上课中':'上课'}}</el-button
>
<el-button v-if="item.status === '未开始'" @click="openEdit">编辑</el-button>
<!-- <el-button v-if="item.status === '上课中'" type="info" @click="endClassR(item)"
<!-- <el-button v-if="item.status === '未开始'" @click="openEdit">编辑</el-button>-->
<el-button v-if="item.status === '上课中'" size="small" type="info" @click="endClassR(item)"
>下课</el-button
>-->
<el-button v-if="item.status!='上课中'" type="danger" @click="deleteReserv">删除</el-button>
>
</div>
<div class="class-reserv-item-tool" style="width: 50px;">
<!-- <el-button v-if="item.status!='上课中'" size="small" type="danger" @click="deleteReserv">删除</el-button>-->
<el-tag type="success">PPT</el-tag>
</div>
<div style="min-width: 150px;"></div>
</div>
</template>
<script setup>
@ -100,25 +93,24 @@ const endClassR = (item) => {
</script>
<style scoped lang="scss">
.class-reserv-item {
font-size: 13px;
display: flex;
background-color: white;
border-radius: 10px;
padding: 5px;
margin-bottom: 10px;
.class-reserv-item-img {
width: 80px;
padding-left: 20px;
width: 60px;
img {
width: 100%;
}
}
.class-reserv-item-body {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
text-align: left;
padding-left: 30px;
font-size: 14px;
padding-left: 5px;
width: 120px;
.class-reserv-item-title1 {
flex: 1;
label {

View File

@ -121,9 +121,7 @@
:max="classWorkFormScore.teacherRating[sIndex].maxScore"
size="small"
:disabled="
(quItem.worktype == '单选题' || quItem.worktype == '多选题') &&
stuItem.feedcontent == stuItem.rightanswer &&
stuItem.feedcontent != ''
(quItem.worktype == '单选题' || quItem.worktype == '多选题' || quItem.worktype == '判断题')
? true
: false
"

View File

@ -58,8 +58,8 @@
v-else-if="curTask.viewkey=='考点分析' "
/>
<examMocks v-else
<examMocks
v-else
/>
</div>
</div>
@ -75,12 +75,13 @@ import { ArrowRight } from '@element-plus/icons-vue'
import useResoureStore from '@/views/resource/store'
import ChooseTextbook from '@/components/choose-textbook/index.vue'
import {listEntpcoursework, listEntpcourseworkNew} from '@/api/education/entpCourseWork'
import {processExamQuestion} from '@/utils/examQuestion/tool'
import { processList } from '@/hooks/useProcessList'
import { JYApiListCT} from "@/utils/examQuestion/jyeoo"
import examReview from './container/examReview.vue'
import pointAnalysis from './container/pointAnalysis.vue'
import examMocks from './container/examMocks.vue'
import { ElMessage } from 'element-plus'
const {proxy} = getCurrentInstance();
const sourceStore = useResoureStore();
@ -106,6 +107,19 @@ const listWorkType = ref([{
value: 0,
}]);
const getCourseWorkList = async (params) => {
const res = await listEntpcourseworkNew(params);
if(res.data == null) {
listExamQuestion.value = [];
// queryParams.total = 0
return;
}
listExamQuestion.value = res.data;
// queryParams.total = res.total;
//
processList(listExamQuestion.value);
}
/**
* @desc: 选中单元章节后的回调, 获取单元章节信息
* @return: {*}
@ -134,6 +148,15 @@ const getData = async (data) => {
// const res = await listEntpcoursework(params);
// listExamQuestion.value = res.rows;
// id,
// : id[/evaluation/bind]
if (curNode.value.bookId == null || curNode.value.bookId == '' || curNode.value.bookId == '0') {
listExamQuestion.value = [];
loading.value = false;
ElMessage.error("当前单元/章节下无试题");
return;
}
// +()
const params = {
eid: curNode.value.id,
@ -144,17 +167,7 @@ const getData = async (data) => {
edustage: curNode.value.edustage,
sectionName: curNode.value.itemtitle,
}
const res = await listEntpcourseworkNew(params);
if(res.data == null) {
listExamQuestion.value = [];
// queryParams.total = 0
loading.value = false;
return;
}
listExamQuestion.value = res.data;
// queryParams.total = res.total;
//
processExamQuestion(listExamQuestion.value);
await getCourseWorkList(params);
loading.value = false;
}
@ -202,6 +215,13 @@ const queryExamQuestionByParams = async () => {
// const res = await listEntpcoursework(params);
// listExamQuestion.value = res.rows;
if (curNode.value.bookId == null || curNode.value.bookId == '' || curNode.value.bookId == '0') {
listExamQuestion.value = [];
loading.value = false;
ElMessage.error("当前单元/章节下无试题");
return;
}
// +()
const params = {
eid: curNode.value.id,
@ -212,17 +232,7 @@ const queryExamQuestionByParams = async () => {
edustage: curNode.value.edustage,
sectionName: curNode.value.itemtitle,
}
const res = await listEntpcourseworkNew(params);
if(res.data == null) {
listExamQuestion.value = [];
// queryParams.total = 0
loading.value = false;
return;
}
listExamQuestion.value = res.data;
// queryParams.total = res.total;
//
processExamQuestion(listExamQuestion.value);
await getCourseWorkList(params);
loading.value = false;
}

View File

@ -102,6 +102,11 @@ import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file'
import useUserStore from '@/store/modules/user'
import outLink from '@/utils/linkConfig'
import { sessionStore } from '@/utils/store'
import { listClasscourseNew } from '@/api/teaching/classcourse'
import { endClass, getSelfReserv } from '@/api/classManage'
import { listEntpcourse } from '@/api/teaching/classwork'
import { createWindow } from '@/utils/tool'
import { defineExpose } from 'vue'
const { ipcRenderer } = window.electron || {}
export default {
@ -131,6 +136,7 @@ export default {
default: ''
}
},
expose: ['openFileWin'],
emits: { 'on-start-class': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null,'on-filearg': null },
data() {
return {
@ -142,8 +148,87 @@ export default {
this.userInfo = useUserStore().user
},
methods: {
getOpenCourse() {
return Promise.all([listClasscourseNew({teacherid: this.userInfo.userId,status:"open",evalid: this.curNode.id,pageSize:1000}), getSelfReserv({ex2:this.curNode.id})]).then(([res1,res2])=>{
let list2 = res1.rows || []
let list = res2.data || []
let one = list.find(item1 => {
if (item1.status === "上课中") {
return true
}
})
if (one) {
return one
}
if (list2.length>0) {
one = list2[0]
}
return one
})
},
clickStartClass(item) {
this.getOpenCourse().then(res=>{
if(!res){
this.$emit('on-start-class', item)
}else{
ElMessageBox.alert('<strong>上次课程尚未结束,是否继续上课?</strong>', '', {
// if you want to disable its autofocus
// autofocus: false,
confirmButtonText: '下课  ',
cancelButtonText: '继续上课',
showCancelButton: true,
showClose: false,
closeOnClickModal: true,
distinguishCancelAndClose: true,
dangerouslyUseHTMLString: true,
cancelButtonClass: "el-button--primary",
confirmButtonClass: "el-button--danger",
center: true,
beforeClose: (action, instance, done) => {
if (action === 'confirm'){
//
if (res.bookImg) {
//PPT
endClass(res.id).then((res1) => {
if (res1.data === true) {
ElMessage({
message: '下课成功',
type: 'success'
})
res.status = '已结束'
done()
}
})
}else {
//APT
}
}
if (action === 'cancel'){
//
if (res.bookImg) {
//PPT
listEntpcourse({
evalid: res.ex2,
edituserid: useUserStore().user.userId,
pageSize: 500
}).then(async res1=>{
if (res1.rows[0].id) {
createWindow('tool-sphere', { url: '/tool/sphere?entpcourseid=' + res1.rows[0].id + "&reservId=" + res.id })
done()
}
})
}else {
//APT
}
}
if (action === 'close') {
done()
}
},
})
}
})
// this.$emit('on-start-class', item)
},
editTalk(item) {
ElMessageBox.prompt('请输入新的标签', '添加标签', {

View File

@ -18,6 +18,7 @@
<kj-list-item
v-for="(item, index) in currentKJFileList"
:key="index"
:ref="'kjItemRef'+item.id"
:item="item"
:index="index"
:curNode="currentNode"
@ -28,42 +29,11 @@
</div>
</el-tab-pane>
<el-tab-pane label="教学实录" name="教学实录" class="prepare-center-jxsl">
<class-reserv></class-reserv>
<class-reserv v-if="activeAptTab==='教学实录'" :curNode="currentNode"></class-reserv>
</el-tab-pane>
</el-tabs>
</div>
<div class="page-right">
<!-- <div class="header-top flex">
<div class="textbook-img" @click="navtoPdf">
<el-image style="width: 80px; height: 110px" :src="curBookImg" />
<el-progress
v-if="downloadNum > 0 && downloadNum < 100"
style="position: absolute; left: 0; z-index: 999"
type="circle"
:percentage="downloadNum"
/>
</div>
<div class="top-item">
<el-button class="btn" @click="handleOutLink('standard')">课标研读</el-button>
<el-button class="btn" @click="openReserv">预约课程</el-button>
<el-button class="btn" @click="handleOutLink('gk')">高考研读</el-button>
<el-button class="btn" @click="handleOutLink('aiModel')">教学大模型</el-button>
</div>
<el-button
:type="!curClassReserv.id ? 'info' : 'primary'"
:disabled="!curClassReserv.id || toolStore.isToolWin"
class="to-class-btn"
@click="openLesson"
>
<label
><i class="iconfont icon-lingdang"></i
>{{ curClassReserv.status == '上课中' ? '上课中' : '上课' }}</label
>
<label>{{ curClassReserv.classDay }} {{ getWeekday1(curClassReserv.classDay) }}</label>
<label>{{ curClassReserv.startTime }}-{{ curClassReserv.endTime }}</label>
</el-button>
<div class="top-zoom-style"></div>
</div>-->
<div style="padding: 0 20px;height: 100%;">
<el-tabs v-model="activeTab" class="prepare-tabs" >
<el-tab-pane label="素材" name="素材">
@ -303,29 +273,29 @@ export default {
// },
methods: {
startClass(item) {
// console.log(item, sessionStore)
// ()
const id = sessionStore.has('activeClass.id') ? sessionStore.get('activeClass.id') : null
if (id && id == item.id) return ElMessage.warning('当前正在上课,请勿重复操作')
// -store
sessionStore.set('activeClass', item)
this.activeClass = item
if(item.fileFlag === '课件') {
this.openReserv()
}
if(item.fileFlag === 'apt') {
this.$refs.calssRef.open(item.fileId)
}
// -store
sessionStore.set('activeClass', item)
this.activeClass = item
},
closeChange() { // -
console.log('关闭上课弹窗')
this.activeClass = null
// this.activeClass = null
sessionStore.delete('activeClass')
},
initReserv(id) {
getClassInfo(id).then((res) => {
this.curClassReserv = res.data
this.openLesson(res.data.id);
this.$refs['kjItemRef'+this.activeClass.id][0].openFileWin(this.activeClass);
})
},
getBookPathFromServer() {
@ -368,6 +338,9 @@ export default {
createFile() {
creatPPT(this.currentNode.itemtitle + '.pptx', this.uploadData).then((res) => {
this.currentFileList.unshift(res.resData)
setTimeout(()=>{
this.$refs['kjItemRef'+res.resData.id][0].openFileWin(res.resData);
},500)
})
},
createAptFile() {
@ -449,6 +422,9 @@ export default {
fileShowName: this.currentNode.itemtitle + '.apt'
}).then((res) => {
this.currentFileList.unshift(res.resData)
setTimeout(()=>{
this.$refs['kjItemRef'+res.resData.id][0].openFileWin(res.resData);
},500)
})
})
})

View File

@ -57,6 +57,13 @@
</div>
<div class="right-align">{{ state.user.createTime }}</div>
</li>
<li class="list-group-item">
<div class="left-align">
<Paperclip class="Calendar"/>
<span>版本编号</span>
</div>
<div class="right-align">v{{version}}</div>
</li>
</ul>
</div>
</el-card>
@ -83,13 +90,15 @@
</template>
<script setup name="Profile">
import { UserFilled, Cellphone, Message, Suitcase, Avatar, Calendar } from '@element-plus/icons-vue'
import { UserFilled, Cellphone, Message, Suitcase, Avatar, Calendar, Paperclip } from '@element-plus/icons-vue'
import { ref, reactive } from 'vue'
import userAvatar from './userAvatar.vue'
import userInfo from './userInfo.vue'
import resetPwd from './resetPwd.vue'
import { getUserProfile } from '@/api/system/user'
import pkc from "../../../../../package.json"
const version = ref(pkc.version)
const activeTab = ref('userinfo')
const state = reactive({
user: {},

View File

@ -14,7 +14,12 @@
<el-scrollbar height="360px">
<ul>
<!--资源-->
<li class="item flex" v-for="item in resourceList" :key="item.id">
<template v-for="item in resourceList" :key="item.id">
<!--
apt pptx 暂时不显示
2024-10-10
-->
<li class="item flex" v-if="item.fileFlag != 'apt' && item.fileSuffix != 'pptx' && item.fileSuffix != 'ppt'">
<div class="item-left flex" >
<FileImage :size="50" :file-name="item.fileShowName" />
<div class="item-info flex">
@ -27,6 +32,7 @@
</div>
<el-button color="#349d44" @click="openFileLink(item)">推送</el-button>
</li>
</template>
<!--作业-->
<li class="item flex" v-for="item in dataList" :key="item.id">
<div class="item-left flex">
@ -170,7 +176,6 @@ const openFileLink = async (item) =>{
//
const getResource = () => {
let querySearch = toRaw(toolStore.curSubjectNode).querySearch
querySearch.orderByColumn = 'uploadTime'
querySearch.isAsc = 'desc'
querySearch.pageSize = 500
@ -217,8 +222,6 @@ onMounted(async () => {
curNode.data = sessionStore.get('subject.curNode')
getHomework()
getResource()
})
</script>

View File

@ -48,9 +48,9 @@ const props = defineProps({
data: { //
type: Array,
default: () => [
{ label: '资源', prop: 'resource', icon: 'icon-kechengziyuan1' },
{ label: '互动', prop: 'interact', icon: 'icon-hudong' },
{ label: '窗口', prop: 'win', icon: 'icon-tubiaozhizuomobanyihuifu-' },
{ label: '活动', prop: 'resource', icon: 'icon-kechengziyuan1' },
// { label: '', prop: 'interact', icon: 'icon-hudong' },
// { label: '', prop: 'win', icon: 'icon-tubiaozhizuomobanyihuifu-' },
{ label: '下课', prop: 'over', isExtra: true, icon: 'icon-a-lujing13357' },
]
}
@ -103,7 +103,7 @@ const clickHandel = (o, e) => {
top: 50%;
transform: translateY(-50%);
right: 10px;
min-height: 40vh;
//min-height: 40vh;
min-width: 4em;
border-radius: 4em;
background-color: #121212;