|
@@ -46,6 +46,7 @@ export default defineComponent({
|
|
const localStorageSubjectId = localStorage.getItem(
|
|
const localStorageSubjectId = localStorage.getItem(
|
|
'prepareLessonSubjectId'
|
|
'prepareLessonSubjectId'
|
|
);
|
|
);
|
|
|
|
+
|
|
const forms = reactive({
|
|
const forms = reactive({
|
|
// 选取参数带的,后取缓存
|
|
// 选取参数带的,后取缓存
|
|
messageLoading: false,
|
|
messageLoading: false,
|
|
@@ -53,7 +54,7 @@ export default defineComponent({
|
|
? Number(route.query.subjectId)
|
|
? Number(route.query.subjectId)
|
|
: localStorageSubjectId
|
|
: localStorageSubjectId
|
|
? Number(localStorageSubjectId)
|
|
? Number(localStorageSubjectId)
|
|
- : null,
|
|
|
|
|
|
+ : '',
|
|
courseScheduleSubjectId: route.query.courseScheduleSubjectId,
|
|
courseScheduleSubjectId: route.query.courseScheduleSubjectId,
|
|
classGroupId: route.query.classGroupId,
|
|
classGroupId: route.query.classGroupId,
|
|
preStudentNum: route.query.preStudentNum,
|
|
preStudentNum: route.query.preStudentNum,
|
|
@@ -87,7 +88,7 @@ export default defineComponent({
|
|
// 判断是否有选择对应的课件 或声部
|
|
// 判断是否有选择对应的课件 或声部
|
|
if (!prepareStore.getSelectKey) return (forms.loading = false);
|
|
if (!prepareStore.getSelectKey) return (forms.loading = false);
|
|
const { data } = await teacherChapterLessonCoursewareList({
|
|
const { data } = await teacherChapterLessonCoursewareList({
|
|
- subjectId: prepareStore.getSubjectId,
|
|
|
|
|
|
+ subjectId: forms.subjectId,
|
|
coursewareDetailKnowledgeId: prepareStore.getSelectKey
|
|
coursewareDetailKnowledgeId: prepareStore.getSelectKey
|
|
});
|
|
});
|
|
if (!Array.isArray(data)) {
|
|
if (!Array.isArray(data)) {
|
|
@@ -122,7 +123,7 @@ export default defineComponent({
|
|
// 判断是否有选择对应的课件 或声部
|
|
// 判断是否有选择对应的课件 或声部
|
|
if (!prepareStore.getSelectKey) return (forms.openLoading = false);
|
|
if (!prepareStore.getSelectKey) return (forms.openLoading = false);
|
|
const { data } = await api_queryOpenCoursewareByPage({
|
|
const { data } = await api_queryOpenCoursewareByPage({
|
|
- subjectId: prepareStore.getSubjectId,
|
|
|
|
|
|
+ subjectId: forms.subjectId,
|
|
coursewareDetailKnowledgeId: prepareStore.getSelectKey,
|
|
coursewareDetailKnowledgeId: prepareStore.getSelectKey,
|
|
page: 1,
|
|
page: 1,
|
|
rows: 20
|
|
rows: 20
|
|
@@ -186,6 +187,13 @@ export default defineComponent({
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|
|
|
|
+ watch(
|
|
|
|
+ () => prepareStore.getSubjectList,
|
|
|
|
+ () => {
|
|
|
|
+ checkSubjectIds();
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+
|
|
const checkSubjectIds = () => {
|
|
const checkSubjectIds = () => {
|
|
const subjectList = prepareStore.getSubjectList;
|
|
const subjectList = prepareStore.getSubjectList;
|
|
|
|
|
|
@@ -247,14 +255,14 @@ export default defineComponent({
|
|
// 获取教材分类列表
|
|
// 获取教材分类列表
|
|
checkSubjectIds();
|
|
checkSubjectIds();
|
|
|
|
|
|
- useResizeObserver(
|
|
|
|
- document.querySelector('#coursewarePresets') as HTMLElement,
|
|
|
|
- (entries: any) => {
|
|
|
|
- const entry = entries[0];
|
|
|
|
- const { width } = entry.contentRect;
|
|
|
|
- forms.bodyWidth = width + 'px';
|
|
|
|
- }
|
|
|
|
- );
|
|
|
|
|
|
+ // useResizeObserver(
|
|
|
|
+ // document.querySelector('#coursewarePresets') as HTMLElement,
|
|
|
|
+ // (entries: any) => {
|
|
|
|
+ // const entry = entries[0];
|
|
|
|
+ // const { width } = entry.contentRect;
|
|
|
|
+ // forms.bodyWidth = width + 'px';
|
|
|
|
+ // }
|
|
|
|
+ // );
|
|
|
|
|
|
await getCoursewareList();
|
|
await getCoursewareList();
|
|
await getOpenCoursewareList();
|
|
await getOpenCoursewareList();
|
|
@@ -417,7 +425,7 @@ export default defineComponent({
|
|
]}
|
|
]}
|
|
labelField="name"
|
|
labelField="name"
|
|
valueField="id"
|
|
valueField="id"
|
|
- value={prepareStore.getSubjectId}
|
|
|
|
|
|
+ value={forms.subjectId}
|
|
onUpdate:value={(val: any) => {
|
|
onUpdate:value={(val: any) => {
|
|
prepareStore.setSubjectId(val);
|
|
prepareStore.setSubjectId(val);
|
|
// 保存
|
|
// 保存
|
|
@@ -532,7 +540,7 @@ export default defineComponent({
|
|
slidesPerView={1}
|
|
slidesPerView={1}
|
|
loop={false}
|
|
loop={false}
|
|
ref={carouselRef}
|
|
ref={carouselRef}
|
|
- style={{ width: forms.bodyWidth }}
|
|
|
|
|
|
+ // style={{ width: forms.bodyWidth }}
|
|
v-model:currentIndex={forms.carouselIndex}>
|
|
v-model:currentIndex={forms.carouselIndex}>
|
|
{forms.openTableList.map((item: any) => (
|
|
{forms.openTableList.map((item: any) => (
|
|
<div class={[styles.list, styles.listSame]}>
|
|
<div class={[styles.list, styles.listSame]}>
|