Merge branch 'main' into zhuhao_dev
This commit is contained in:
commit
1c89217fbf
|
@ -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('')
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
conversation_id = localStorage.getItem("conversation_id");
|
||||
watch(isOpen, (newVal)=>{
|
||||
if(newVal){
|
||||
if (!conversation_id) {
|
||||
getChartId();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
conversation_id = localStorage.getItem("conversation_id");
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
|
@ -104,11 +104,16 @@ const getSubjectContent = async () => {
|
|||
pageSize: 10000
|
||||
}
|
||||
|
||||
let data;
|
||||
|
||||
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
|
||||
data = 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', })
|
||||
|
||||
// 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
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
import { ref, watch } from 'vue'
|
||||
import FileImage from '@/components/file-image/index.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { resourceType } from '@/utils/resourceDict'
|
||||
import { getFileSuffix, getFileName } from '@/utils/ruoyi'
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -58,6 +57,22 @@ const props = defineProps({
|
|||
default: false
|
||||
},
|
||||
})
|
||||
const resourceType = ref([
|
||||
{
|
||||
label: '素材',
|
||||
value: '素材'
|
||||
},
|
||||
|
||||
{
|
||||
label: '课件',
|
||||
value: '课件'
|
||||
},
|
||||
|
||||
{
|
||||
label: '教案',
|
||||
value: '教案'
|
||||
}
|
||||
])
|
||||
const dialogValue = ref(false)
|
||||
const limit = ref(5)
|
||||
// 定义要发送的emit事件
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
export const tabs = [
|
||||
{
|
||||
label: '平台资源',
|
||||
label: '平台',
|
||||
value: '平台'
|
||||
},
|
||||
{
|
||||
label: '校本资源',
|
||||
label: '校本',
|
||||
value: '校本'
|
||||
},
|
||||
{
|
||||
label: '第三方资源',
|
||||
label: '第三方',
|
||||
value: '第三方'
|
||||
},
|
||||
]
|
||||
|
@ -57,18 +57,23 @@ export const resourceFormat = [
|
|||
// 资源类型
|
||||
export const resourceType = [
|
||||
{
|
||||
label: '素材',
|
||||
value: '素材'
|
||||
label: '课例库',
|
||||
value: "'apt','课件','教案'"
|
||||
},
|
||||
{
|
||||
label: '作业库',
|
||||
value: '作业',
|
||||
disabled: true
|
||||
},
|
||||
|
||||
{
|
||||
label: '课件',
|
||||
value: '课件'
|
||||
label: '素材库',
|
||||
value: "'素材'"
|
||||
},
|
||||
|
||||
{
|
||||
label: '教案',
|
||||
value: '教案'
|
||||
label: '习题库',
|
||||
value: '习题',
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
// 年级划分
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,7 +317,6 @@
|
|||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 批改评价与评语 -->
|
||||
<div class="tacher_conten_foot">
|
||||
|
@ -401,7 +403,7 @@
|
|||
<el-input
|
||||
v-model="classWorkFormScore.teacherremark"
|
||||
type="textarea"
|
||||
rows="3"
|
||||
rows="1"
|
||||
placeholder="请输入评语说明"
|
||||
/>
|
||||
</el-col>
|
||||
|
@ -413,6 +415,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- :style="{ height: dialogProps.maxheight + 'px' }" -->
|
||||
<el-dialog
|
||||
|
|
|
@ -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 }}答题情况
|
||||
|
|
|
@ -1,40 +1,16 @@
|
|||
<template>
|
||||
<div class="desktop-work-item">
|
||||
<div class="item-title flex">
|
||||
<span>工作动态</span>
|
||||
<el-radio-group v-model="type" @change="changeTab">
|
||||
<span class="title">工作动态</span>
|
||||
<el-radio-group v-model="type">
|
||||
<el-radio-button label="全部" :value="-1" />
|
||||
<el-radio-button label="备课" :value="1" disabled />
|
||||
<el-radio-button label="上课" :value="2" disabled />
|
||||
<el-radio-button label="作业" :value="3" />
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="item-content" v-loading="loading">
|
||||
<el-scrollbar height="500px">
|
||||
<ul>
|
||||
<!--上课-->
|
||||
<template v-if="type == 2 || type == -1">
|
||||
<li class="flex class-item" v-for="item in classList" :key="item.id">
|
||||
<div class="class-left flex">
|
||||
<div class="class-name flex">
|
||||
<span class="name">{{ item.className }}</span>
|
||||
</div>
|
||||
<div class="class-time"> {{ item.classDay }} {{ item.startTime }} ~ {{ item.classDay }} {{
|
||||
item.endTime }}</div>
|
||||
<div class="class-grade">
|
||||
<span v-for="(tag, index) in item.classItemList" :key="index" style="margin-left: 5px">
|
||||
{{ index === 0 ? tag.name : '、' + tag.name }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="class-right">
|
||||
<el-button type="primary" size="small">上课</el-button>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
<!--作业-->
|
||||
<template v-if="type == 3 || type == -1">
|
||||
<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>
|
||||
|
@ -48,10 +24,11 @@
|
|||
<div>已交</div>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
<el-empty v-if="!homeworkList.length" description="暂无数据" />
|
||||
</ul>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<item-dialog ref="itemDialogRef" @cle-click="closeDialog"></item-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
@ -59,13 +36,15 @@ 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 () => {
|
||||
|
@ -84,35 +63,39 @@ const getHomework = async () => {
|
|||
loading.value = true
|
||||
const { edustage, edusubject } = user
|
||||
try {
|
||||
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, 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'
|
||||
}
|
||||
// 切换
|
||||
const changeTab = (val) =>{
|
||||
switch(val){
|
||||
case -1:
|
||||
// getClass()
|
||||
getHomework()
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
getClass()
|
||||
break;
|
||||
default:
|
||||
getHomework()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
// getClass()
|
||||
|
@ -132,7 +115,10 @@ onMounted(() => {
|
|||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-content {
|
||||
|
@ -201,8 +187,7 @@ onMounted(() => {
|
|||
}
|
||||
|
||||
.class-grade {
|
||||
padding-top: 3px
|
||||
}
|
||||
padding-top: 3px }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-row :gutter="20">
|
||||
<el-col :span="17">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" v-for="item in menuList">
|
||||
<el-col :span="item.span" v-for="item in menuList" :key="item.id">
|
||||
<div class="desktop-item">
|
||||
<div class="item-title">{{ item.name }}</div>
|
||||
<div class="item-content">
|
||||
|
@ -54,6 +54,8 @@ let chartInstance = null
|
|||
|
||||
const menuList = [{
|
||||
name: '教学分析',
|
||||
span: 24,
|
||||
id: 1,
|
||||
list: [
|
||||
{
|
||||
name: '课标分析',
|
||||
|
@ -77,16 +79,6 @@ const menuList = [{
|
|||
icon: 'icon-xueqingfenxi',
|
||||
disabled: true
|
||||
},
|
||||
{
|
||||
name: '资源分析',
|
||||
icon: 'icon-ziyuanfenxi',
|
||||
disabled: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '课程教学',
|
||||
list: [
|
||||
{
|
||||
name: '教学设计',
|
||||
icon: 'icon-jiaoxuesheji',
|
||||
|
@ -95,7 +87,7 @@ const menuList = [{
|
|||
{
|
||||
name: '教学实施',
|
||||
icon: 'icon-jiaoxuefenxi',
|
||||
path: '/classReserv'
|
||||
path: '/prepare'
|
||||
},
|
||||
{
|
||||
name: '教学反思',
|
||||
|
@ -106,16 +98,20 @@ const menuList = [{
|
|||
},
|
||||
{
|
||||
name: '作业管理',
|
||||
span: 12,
|
||||
id: 2,
|
||||
list: [
|
||||
{
|
||||
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: '作业批改',
|
||||
|
@ -131,6 +127,8 @@ const menuList = [{
|
|||
},
|
||||
{
|
||||
name: '教学管控',
|
||||
span: 12,
|
||||
id: 3,
|
||||
list: [
|
||||
{
|
||||
name: '教学计划',
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<div class="resoure-search">
|
||||
<el-row justify="space-between">
|
||||
<el-col :span="12" class="tab-btns flex">
|
||||
<el-button text v-for="item in sourceStore.tabs" :key="item.id"
|
||||
:type="sourceStore.query.fileSource == item.value ? 'primary' : ''"
|
||||
@click="sourceStore.changeTab(item.value)">{{ item.label
|
||||
<el-button text v-for="item in sourceStore.resourceTypeList" :key="item.id"
|
||||
:type="sourceStore.query.fileFlags == item.value ? 'primary' : ''"
|
||||
@click="sourceStore.changeType(item.value)" :disabled="item.disabled">{{ item.label
|
||||
}}</el-button>
|
||||
</el-col>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
</el-row>
|
||||
|
||||
<!-- 第三方资源筛选-->
|
||||
<el-row class="resoure-btns" v-if="isThird">
|
||||
<!-- <el-row class="resoure-btns" v-if="isThird">
|
||||
<el-col :span="24" class="query-row flex">
|
||||
<div class="flex row-left">
|
||||
<el-button v-for="item in coursewareTypeList" :key="item.id"
|
||||
|
@ -29,8 +29,8 @@
|
|||
</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="resoure-btns" v-else>
|
||||
</el-row> -->
|
||||
<el-row class="resoure-btns">
|
||||
<el-col :span="24" class="query-row flex">
|
||||
<div class="flex row-left"> <el-select v-model="sourceStore.query.fileSuffix" @change="sourceStore.changeSuffix"
|
||||
style="width: 110px">
|
||||
|
@ -38,9 +38,9 @@
|
|||
:value="item.value" />
|
||||
</el-select>
|
||||
<div class="line"></div>
|
||||
<el-button v-for="item in sourceStore.resourceTypeList" :key="item.id"
|
||||
:type="sourceStore.query.fileFlag == item.value ? 'primary' : ''" round
|
||||
@click="sourceStore.changeType(item.value)">{{
|
||||
<el-button v-for="item in sourceStore.tabs" :key="item.id"
|
||||
:type="sourceStore.query.fileSource == item.value ? 'primary' : ''"
|
||||
@click="sourceStore.changeTab(item.value)">{{
|
||||
item.label }}</el-button>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -81,12 +81,12 @@ watch(() => sourceStore.query.fileSource,() => {
|
|||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.resoure-search {
|
||||
padding: 20px;
|
||||
padding: 15px;
|
||||
border-bottom: solid #f1f1f1 1px;
|
||||
|
||||
.tab-btns {
|
||||
.el-button {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,10 +8,6 @@ import { hasPermission } from '@/utils/hasPermission'
|
|||
const userStore = useUserStore()
|
||||
|
||||
const resourceTypeList = [
|
||||
{
|
||||
label: '全部',
|
||||
value: ''
|
||||
},
|
||||
...resourceType
|
||||
]
|
||||
const resourceFormatList = [
|
||||
|
@ -54,7 +50,7 @@ export default defineStore('resource', {
|
|||
//资源格式 mp3 ppt ...
|
||||
fileSuffix: -1,
|
||||
// 资源类型 课件 素材 教案
|
||||
fileFlag: '',
|
||||
fileFlags: resourceType[0].value,
|
||||
fileRoot: '资源',
|
||||
fileName: '',
|
||||
orderByColumn: 'uploadTime',
|
||||
|
@ -123,7 +119,7 @@ export default defineStore('resource', {
|
|||
this.handleQuery()
|
||||
},
|
||||
changeType(val) {
|
||||
this.query.fileFlag = val
|
||||
this.query.fileFlags = val
|
||||
this.handleQuery()
|
||||
},
|
||||
thirdChangeType(val) {
|
||||
|
|
Loading…
Reference in New Issue