|  | @@ -123,7 +123,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          // 判断是否有选择对应的课件 或声部
 | 
	
		
			
				|  |  |          if (!prepareStore.getSelectKey) return (forms.openLoading = false);
 | 
	
		
			
				|  |  |          const { data } = await api_queryOpenCoursewareByPage({
 | 
	
		
			
				|  |  | -          subjectId: forms.subjectId,
 | 
	
		
			
				|  |  | +          subjectId: prepareStore.getSubjectId,
 | 
	
		
			
				|  |  |            coursewareDetailKnowledgeId: prepareStore.getSelectKey,
 | 
	
		
			
				|  |  |            page: 1,
 | 
	
		
			
				|  |  |            rows: 20
 | 
	
	
		
			
				|  | @@ -173,20 +173,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      );
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    // 检测数据是否存在
 | 
	
		
			
				|  |  | -    // watch(
 | 
	
		
			
				|  |  | -    //   () => forms.tableList,
 | 
	
		
			
				|  |  | -    //   () => {
 | 
	
		
			
				|  |  | -    //     // fromChapterLessonCoursewareId;
 | 
	
		
			
				|  |  | -    //     forms.openTableList.forEach((item: any) => {
 | 
	
		
			
				|  |  | -    //       const index = forms.tableList.findIndex(
 | 
	
		
			
				|  |  | -    //         (i: any) => i.fromChapterLessonCoursewareId === item.id
 | 
	
		
			
				|  |  | -    //       );
 | 
	
		
			
				|  |  | -    //       item.isAdd = index !== -1 ? true : false;
 | 
	
		
			
				|  |  | -    //     });
 | 
	
		
			
				|  |  | -    //   }
 | 
	
		
			
				|  |  | -    // );
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      watch(
 | 
	
		
			
				|  |  |        () => prepareStore.getSubjectList,
 | 
	
		
			
				|  |  |        () => {
 | 
	
	
		
			
				|  | @@ -199,6 +185,14 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        // 并且没有声部时才会更新
 | 
	
		
			
				|  |  |        if (subjectList.length > 0) {
 | 
	
		
			
				|  |  | +        const prepareLessonCourseWareSubjectIsNull = sessionStorage.getItem(
 | 
	
		
			
				|  |  | +          'prepareLessonCourseWareSubjectIsNull'
 | 
	
		
			
				|  |  | +        );
 | 
	
		
			
				|  |  | +        if (prepareLessonCourseWareSubjectIsNull === 'true') {
 | 
	
		
			
				|  |  | +          prepareStore.setSubjectId('');
 | 
	
		
			
				|  |  | +          return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          // 并且声部在列表中
 | 
	
		
			
				|  |  |          const localStorageSubjectId = localStorage.getItem(
 | 
	
		
			
				|  |  |            'prepareLessonSubjectId'
 | 
	
	
		
			
				|  | @@ -235,12 +229,13 @@ export default defineComponent({
 | 
	
		
			
				|  |  |              subjectId = Number(localStorageSubjectId);
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +        // 判断是否选择为空
 | 
	
		
			
				|  |  |          if (subjectId && index >= 0) {
 | 
	
		
			
				|  |  |            prepareStore.setSubjectId(subjectId);
 | 
	
		
			
				|  |  |            // forms.subjectId = subjectId;
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |            // 判断是否有缓存
 | 
	
		
			
				|  |  | -          prepareStore.setSubjectId(subjectList[0].id);
 | 
	
		
			
				|  |  | +          // prepareStore.setSubjectId(subjectList[0].id);
 | 
	
		
			
				|  |  |            // forms.subjectId = subjectList[0].id;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -436,6 +431,13 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                  prepareStore.setSubjectId(val);
 | 
	
		
			
				|  |  |                  // 保存
 | 
	
		
			
				|  |  |                  forms.subjectId = val;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                if (!val) {
 | 
	
		
			
				|  |  | +                  sessionStorage.setItem(
 | 
	
		
			
				|  |  | +                    'prepareLessonCourseWareSubjectIsNull',
 | 
	
		
			
				|  |  | +                    val ? false : true
 | 
	
		
			
				|  |  | +                  );
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  |                }}
 | 
	
		
			
				|  |  |              />
 | 
	
		
			
				|  |  |              <NButton
 | 
	
	
		
			
				|  | @@ -443,7 +445,10 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                type="primary"
 | 
	
		
			
				|  |  |                onClick={() => {
 | 
	
		
			
				|  |  |                  eventGlobal.emit('teacher-slideshow', true);
 | 
	
		
			
				|  |  | -                emit('change', { status: true, type: 'create' });
 | 
	
		
			
				|  |  | +                emit('change', {
 | 
	
		
			
				|  |  | +                  status: true,
 | 
	
		
			
				|  |  | +                  type: 'create'
 | 
	
		
			
				|  |  | +                });
 | 
	
		
			
				|  |  |                }}>
 | 
	
		
			
				|  |  |                <NImage
 | 
	
		
			
				|  |  |                  class={styles.addBtnIcon}
 | 
	
	
		
			
				|  | @@ -489,7 +494,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                    </div>
 | 
	
		
			
				|  |  |                  ))}
 | 
	
		
			
				|  |  |                  {!forms.loading && forms.tableList.length <= 0 && (
 | 
	
		
			
				|  |  | -                  <TheEmpty class={styles.empty1} />
 | 
	
		
			
				|  |  | +                  <TheEmpty class={styles.empty1} description="暂无课件" />
 | 
	
		
			
				|  |  |                  )}
 | 
	
		
			
				|  |  |                </div>
 | 
	
		
			
				|  |  |              </NSpin>
 |