Compare commits

...

3 Commits

8 changed files with 77 additions and 99 deletions

View File

@ -29,6 +29,7 @@
"@vue-office/excel": "^1.7.11",
"@vue-office/pdf": "^2.0.2",
"@vueuse/core": "^10.11.0",
"circular-json": "^0.5.9",
"cropperjs": "^1.6.2",
"crypto-js": "^4.2.0",
"echarts": "^5.5.1",

View File

@ -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

View File

@ -4,6 +4,7 @@
const isNode = typeof require !== 'undefined' // 是否支持node函数
const { ipcRenderer } = isNode?require('electron'):{} // app使用
import { sessionStore } from '@/utils/store'
import CircularJSON from 'circular-json'
// import { diff } from 'jsondiffpatch'
// const Remote = isNode?require('@electron/remote'):{} // 远程模块
@ -173,6 +174,7 @@ const findDifferences = (obj1, obj2) => {
for (const key in o1) {
if (o1.hasOwnProperty(key)) {
const newPath = path ? `${path}.${key}` : key;
if(!o2) return
if (o2.hasOwnProperty(key)) {
const v1 = toJsonStr(o1[key])
const v2 = toJsonStr(o2[key])
@ -202,6 +204,6 @@ const findDifferences = (obj1, obj2) => {
return differences;
}
// 对象克隆
const objClone = (obj) => JSON.parse(JSON.stringify(obj))
const objClone = (obj) => JSON.parse(CircularJSON.stringify(obj))
// 转换为json
const toJsonStr = (obj) => JSON.stringify(obj)
const toJsonStr = (obj) => CircularJSON.stringify(obj)

View File

@ -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
}
]
// 年级划分

View File

@ -1,54 +1,29 @@
<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 }}&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 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">
<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>
<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-right">
<div><span class="num">{{ item.workdataresultcount }}</span> / {{ item.workdatacount }}</div>
<div>已交</div>
</div>
</li>
</template>
<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>
</ul>
</el-scrollbar>
</div>
@ -85,6 +60,7 @@ const getHomework = async () => {
const { edustage, edusubject } = user
try {
const { rows } = await homeworklist({ edituserid: user.userId, edustage, edusubject, orderby: 'uniquekey DESC', pageSize: 500 })
console.log(rows,'rows')
homeworkList.value = rows.filter(item => item.deaddate && item.uniquekey)
homeworkList.value.forEach((item) => {
item.workdatacount = JSON.parse('[' + item.classworkdatastudentids + ']').length
@ -97,22 +73,7 @@ const getHomework = async () => {
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 +93,9 @@ onMounted(() => {
font-weight: bold;
margin-bottom: 10px;
align-items: center;
justify-content: space-between;
.title{
margin-right: 5px;
}
}
.item-content {

View File

@ -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,6 +98,8 @@ const menuList = [{
},
{
name: '作业管理',
span: 12,
id: 2,
list: [
{
name: '作业设计',
@ -131,6 +125,8 @@ const menuList = [{
},
{
name: '教学管控',
span: 12,
id: 3,
list: [
{
name: '教学计划',

View File

@ -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;
}
}

View File

@ -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) {