|
@@ -296,20 +296,15 @@ export default defineComponent({
|
|
|
onClick={async () => {
|
|
|
// state.addStudentVisible = true;
|
|
|
try {
|
|
|
- if (state.activeRow.id) {
|
|
|
- state.addStudentVisible = true;
|
|
|
- } else {
|
|
|
- const { schoolInfos } = userStore.getUserInfo;
|
|
|
- const schoolId =
|
|
|
- schoolInfos.length > 0 ? schoolInfos[0].id : null;
|
|
|
- if (schoolId) {
|
|
|
- const { data } = await schoolDetail({ id: schoolId });
|
|
|
- state.activeRow = data;
|
|
|
+ const { schoolInfos } = userStore.getUserInfo;
|
|
|
+ const schoolId =
|
|
|
+ schoolInfos.length > 0 ? schoolInfos[0].id : null;
|
|
|
+ if (schoolId) {
|
|
|
+ const { data } = await schoolDetail({ id: schoolId });
|
|
|
+ state.activeRow = data;
|
|
|
|
|
|
- state.addStudentVisible = true;
|
|
|
- }
|
|
|
+ state.addStudentVisible = true;
|
|
|
}
|
|
|
- //
|
|
|
} catch {
|
|
|
//
|
|
|
}
|