|
@@ -219,8 +219,14 @@ export default defineComponent({
|
|
|
const subjectList = catchStore.getSubjectList;
|
|
|
// 并且没有声部时才会更新
|
|
|
console.log(forms.subjectId, 'forms.subjectId');
|
|
|
- if (subjectList.length > 0 && !prepareStore.getSubjectId) {
|
|
|
- prepareStore.setSubjectId(forms.subjectId || subjectList[0].id);
|
|
|
+ if (subjectList.length > 0) {
|
|
|
+ // 判断浏览器上面是否有
|
|
|
+ if (forms.subjectId) {
|
|
|
+ prepareStore.setSubjectId(forms.subjectId);
|
|
|
+ } else if (!prepareStore.getSubjectId) {
|
|
|
+ // 判断是否有缓存
|
|
|
+ prepareStore.setSubjectId(subjectList[0].id);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
await getList();
|