diff --git a/src/renderer/src/components/ai-chart/container/text.vue b/src/renderer/src/components/ai-chart/container/text.vue index 68524ae..3372051 100644 --- a/src/renderer/src/components/ai-chart/container/text.vue +++ b/src/renderer/src/components/ai-chart/container/text.vue @@ -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('') diff --git a/src/renderer/src/components/ai-chart/index.vue b/src/renderer/src/components/ai-chart/index.vue index 03bb26b..8d95703 100644 --- a/src/renderer/src/components/ai-chart/index.vue +++ b/src/renderer/src/components/ai-chart/index.vue @@ -65,7 +65,7 @@ diff --git a/src/renderer/src/components/choose-textbook/index.vue b/src/renderer/src/components/choose-textbook/index.vue index 94b9e2b..7f3c178 100644 --- a/src/renderer/src/components/choose-textbook/index.vue +++ b/src/renderer/src/components/choose-textbook/index.vue @@ -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 diff --git a/src/renderer/src/components/upload-dialog/index.vue b/src/renderer/src/components/upload-dialog/index.vue index ea86172..358ab5c 100644 --- a/src/renderer/src/components/upload-dialog/index.vue +++ b/src/renderer/src/components/upload-dialog/index.vue @@ -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事件 diff --git a/src/renderer/src/utils/resourceDict.js b/src/renderer/src/utils/resourceDict.js index 9a26a2b..c86aaf8 100644 --- a/src/renderer/src/utils/resourceDict.js +++ b/src/renderer/src/utils/resourceDict.js @@ -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 } ] // 年级划分 diff --git a/src/renderer/src/views/classTask/classTask.vue b/src/renderer/src/views/classTask/classTask.vue index d02ba7f..f29b2f3 100644 --- a/src/renderer/src/views/classTask/classTask.vue +++ b/src/renderer/src/views/classTask/classTask.vue @@ -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 diff --git a/src/renderer/src/views/classTask/container/item-dialog-score.vue b/src/renderer/src/views/classTask/container/item-dialog-score.vue index 31d0e34..44e84de 100644 --- a/src/renderer/src/views/classTask/container/item-dialog-score.vue +++ b/src/renderer/src/views/classTask/container/item-dialog-score.vue @@ -150,6 +150,7 @@ :min-scale="0.2" :preview-src-list="stuItem.imagefile" :initial-index="4" + fit="contain" /> @@ -233,6 +234,7 @@ .map((item) => item.url) " :initial-index="4" + fit="contain" /> @@ -276,6 +278,7 @@ .map((item) => item.url) " :initial-index="4" + fit="contain" /> @@ -314,102 +317,102 @@ - - -