Compare commits

..

No commits in common. "a92176174a9c21a55c58c75fd4997dcf40996f8e" and "e907a1c07adec0f1b3e2b85e7e20f3d2f33afd42" have entirely different histories.

6 changed files with 99 additions and 73 deletions

View File

@ -49,6 +49,7 @@
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
import FileImage from '@/components/file-image/index.vue' import FileImage from '@/components/file-image/index.vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { resourceType } from '@/utils/resourceDict'
import { getFileSuffix, getFileName } from '@/utils/ruoyi' import { getFileSuffix, getFileName } from '@/utils/ruoyi'
const props = defineProps({ const props = defineProps({
@ -57,22 +58,6 @@ const props = defineProps({
default: false default: false
}, },
}) })
const resourceType = ref([
{
label: '素材',
value: '素材'
},
{
label: '课件',
value: '课件'
},
{
label: '教案',
value: '教案'
}
])
const dialogValue = ref(false) const dialogValue = ref(false)
const limit = ref(5) const limit = ref(5)
// emit // emit

View File

@ -1,14 +1,14 @@
export const tabs = [ export const tabs = [
{ {
label: '平台', label: '平台资源',
value: '平台' value: '平台'
}, },
{ {
label: '校本', label: '校本资源',
value: '校本' value: '校本'
}, },
{ {
label: '第三方', label: '第三方资源',
value: '第三方' value: '第三方'
}, },
] ]
@ -57,23 +57,18 @@ export const resourceFormat = [
// 资源类型 // 资源类型
export const resourceType = [ export const resourceType = [
{ {
label: '课例库', label: '素材',
value: "'apt','课件','教案'" value: '素材'
},
{
label: '作业库',
value: '作业',
disabled: true
}, },
{ {
label: '素材库', label: '课件',
value: "'素材'" value: '课件'
}, },
{ {
label: '习题库', label: '教案',
value: '习题', value: '教案'
disabled: true
} }
] ]
// 年级划分 // 年级划分

View File

@ -1,29 +1,54 @@
<template> <template>
<div class="desktop-work-item"> <div class="desktop-work-item">
<div class="item-title flex"> <div class="item-title flex">
<span class="title">工作动态</span> <span>工作动态</span>
<el-radio-group v-model="type"> <el-radio-group v-model="type" @change="changeTab">
<el-radio-button label="全部" :value="-1" /> <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> </el-radio-group>
</div> </div>
<div class="item-content" v-loading="loading"> <div class="item-content" v-loading="loading">
<el-scrollbar height="500px"> <el-scrollbar height="500px">
<ul> <ul>
<!--作业--> <!--上课-->
<li class="flex class-item home-list" v-for="item in homeworkList" :key="item.id"> <template v-if="type == 2 || type == -1">
<div class="class-left flex"> <li class="flex class-item" v-for="item in classList" :key="item.id">
<div class="class-name flex"> <div class="class-left flex">
<span class="name">{{ item.uniquekey }}</span> <div class="class-name flex">
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{ <span class="name">{{ item.className }}</span>
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已结束' : '进行中' }}</el-tag> </div>
<div class="class-time"> {{ item.classDay }}&nbsp;{{ item.startTime }} ~ {{ item.classDay }}&nbsp;{{
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>
<div class="class-time">{{ item.classcaption }} | 截止时间{{ item.deaddate }} </div> <div class="class-right">
</div> <el-button type="primary" size="small">上课</el-button>
<div class="class-right"> </div>
<div><span class="num">{{ item.workdataresultcount }}</span> / {{ item.workdatacount }}</div> </li>
<div>已交</div> </template>
</div> <!--作业-->
</li> <template v-if="type == 3 || type == -1">
<li class="flex class-item home-list" v-for="item in homeworkList" :key="item.id">
<div class="class-left flex">
<div class="class-name flex">
<span class="name">{{ item.uniquekey }}</span>
<el-tag class="tag" round :type="tagType(item.deaddate)" effect="dark" size="small">{{
getCurrentTime('YYYY-MM-DD HH:mm') > item.deaddate ? '已结束' : '进行中' }}</el-tag>
</div>
<div class="class-time">{{ item.classcaption }} | 截止时间{{ item.deaddate }} </div>
</div>
<div class="class-right">
<div><span class="num">{{ item.workdataresultcount }}</span> / {{ item.workdatacount }}</div>
<div>已交</div>
</div>
</li>
</template>
</ul> </ul>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -59,7 +84,7 @@ const getHomework = async () => {
loading.value = true loading.value = true
const { edustage, edusubject } = user const { edustage, edusubject } = user
try { try {
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, status: '1' ,orderby: 'uniquekey DESC', pageSize: 500 }) const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, orderby: 'uniquekey DESC', pageSize: 500 })
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey) homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey)
homeworkList.value.forEach((item) => { homeworkList.value.forEach((item) => {
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
@ -72,7 +97,22 @@ const getHomework = async () => {
const tagType = (time) => { const tagType = (time) => {
return getCurrentTime('YYYY-MM-DD HH:mm') > time ? 'info' : 'warning' 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(() => { onMounted(() => {
// getClass() // getClass()
@ -92,9 +132,7 @@ onMounted(() => {
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
align-items: center; align-items: center;
.title{ justify-content: space-between;
margin-right: 5px;
}
} }
.item-content { .item-content {

View File

@ -3,7 +3,7 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="17"> <el-col :span="17">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="item.span" v-for="item in menuList" :key="item.id"> <el-col :span="12" v-for="item in menuList">
<div class="desktop-item"> <div class="desktop-item">
<div class="item-title">{{ item.name }}</div> <div class="item-title">{{ item.name }}</div>
<div class="item-content"> <div class="item-content">
@ -54,8 +54,6 @@ let chartInstance = null
const menuList = [{ const menuList = [{
name: '教学分析', name: '教学分析',
span: 24,
id: 1,
list: [ list: [
{ {
name: '课标分析', name: '课标分析',
@ -79,6 +77,16 @@ const menuList = [{
icon: 'icon-xueqingfenxi', icon: 'icon-xueqingfenxi',
disabled: true disabled: true
}, },
{
name: '资源分析',
icon: 'icon-ziyuanfenxi',
disabled: true
}
]
},
{
name: '课程教学',
list: [
{ {
name: '教学设计', name: '教学设计',
icon: 'icon-jiaoxuesheji', icon: 'icon-jiaoxuesheji',
@ -87,7 +95,7 @@ const menuList = [{
{ {
name: '教学实施', name: '教学实施',
icon: 'icon-jiaoxuefenxi', icon: 'icon-jiaoxuefenxi',
path: '/prepare' path: '/classReserv'
}, },
{ {
name: '教学反思', name: '教学反思',
@ -98,8 +106,6 @@ const menuList = [{
}, },
{ {
name: '作业管理', name: '作业管理',
span: 12,
id: 2,
list: [ list: [
{ {
name: '作业设计', name: '作业设计',
@ -125,8 +131,6 @@ const menuList = [{
}, },
{ {
name: '教学管控', name: '教学管控',
span: 12,
id: 3,
list: [ list: [
{ {
name: '教学计划', name: '教学计划',

View File

@ -2,9 +2,9 @@
<div class="resoure-search"> <div class="resoure-search">
<el-row justify="space-between"> <el-row justify="space-between">
<el-col :span="12" class="tab-btns flex"> <el-col :span="12" class="tab-btns flex">
<el-button text v-for="item in sourceStore.resourceTypeList" :key="item.id" <el-button text v-for="item in sourceStore.tabs" :key="item.id"
:type="sourceStore.query.fileFlags == item.value ? 'primary' : ''" :type="sourceStore.query.fileSource == item.value ? 'primary' : ''"
@click="sourceStore.changeType(item.value)" :disabled="item.disabled">{{ item.label @click="sourceStore.changeTab(item.value)">{{ item.label
}}</el-button> }}</el-button>
</el-col> </el-col>
@ -19,7 +19,7 @@
</el-row> </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"> <el-col :span="24" class="query-row flex">
<div class="flex row-left"> <div class="flex row-left">
<el-button v-for="item in coursewareTypeList" :key="item.id" <el-button v-for="item in coursewareTypeList" :key="item.id"
@ -29,8 +29,8 @@
</el-button> </el-button>
</div> </div>
</el-col> </el-col>
</el-row> --> </el-row>
<el-row class="resoure-btns"> <el-row class="resoure-btns" v-else>
<el-col :span="24" class="query-row flex"> <el-col :span="24" class="query-row flex">
<div class="flex row-left"> <el-select v-model="sourceStore.query.fileSuffix" @change="sourceStore.changeSuffix" <div class="flex row-left"> <el-select v-model="sourceStore.query.fileSuffix" @change="sourceStore.changeSuffix"
style="width: 110px"> style="width: 110px">
@ -38,9 +38,9 @@
:value="item.value" /> :value="item.value" />
</el-select> </el-select>
<div class="line"></div> <div class="line"></div>
<el-button v-for="item in sourceStore.tabs" :key="item.id" <el-button v-for="item in sourceStore.resourceTypeList" :key="item.id"
:type="sourceStore.query.fileSource == item.value ? 'primary' : ''" :type="sourceStore.query.fileFlag == item.value ? 'primary' : ''" round
@click="sourceStore.changeTab(item.value)">{{ @click="sourceStore.changeType(item.value)">{{
item.label }}</el-button> item.label }}</el-button>
</div> </div>
<div> <div>
@ -81,12 +81,12 @@ watch(() => sourceStore.query.fileSource,() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.resoure-search { .resoure-search {
padding: 15px; padding: 20px;
border-bottom: solid #f1f1f1 1px; border-bottom: solid #f1f1f1 1px;
.tab-btns { .tab-btns {
.el-button { .el-button {
font-size: 18px; font-size: 16px;
} }
} }

View File

@ -8,6 +8,10 @@ import { hasPermission } from '@/utils/hasPermission'
const userStore = useUserStore() const userStore = useUserStore()
const resourceTypeList = [ const resourceTypeList = [
{
label: '全部',
value: ''
},
...resourceType ...resourceType
] ]
const resourceFormatList = [ const resourceFormatList = [
@ -50,7 +54,7 @@ export default defineStore('resource', {
//资源格式 mp3 ppt ... //资源格式 mp3 ppt ...
fileSuffix: -1, fileSuffix: -1,
// 资源类型 课件 素材 教案 // 资源类型 课件 素材 教案
fileFlags: resourceType[0].value, fileFlag: '',
fileRoot: '资源', fileRoot: '资源',
fileName: '', fileName: '',
orderByColumn: 'uploadTime', orderByColumn: 'uploadTime',
@ -119,7 +123,7 @@ export default defineStore('resource', {
this.handleQuery() this.handleQuery()
}, },
changeType(val) { changeType(val) {
this.query.fileFlags = val this.query.fileFlag = val
this.handleQuery() this.handleQuery()
}, },
thirdChangeType(val) { thirdChangeType(val) {